wacom 20.2.0 → 20.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/wacom.mjs +4 -4
- package/fesm2022/wacom.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +51 -2
package/fesm2022/wacom.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wacom.mjs","sources":["../../../projects/wacom/src/interfaces/alert.interface.ts","../../../projects/wacom/src/interfaces/config.interface.ts","../../../projects/wacom/src/interfaces/modal.interface.ts","../../../projects/wacom/src/services/meta.service.ts","../../../projects/wacom/src/guard/meta.guard.ts","../../../projects/wacom/src/components/alert/alert/alert.component.ts","../../../projects/wacom/src/components/alert/alert/alert.component.html","../../../projects/wacom/src/components/base.component.ts","../../../projects/wacom/src/components/alert/wrapper/wrapper.component.ts","../../../projects/wacom/src/components/alert/wrapper/wrapper.component.html","../../../projects/wacom/src/services/dom.service.ts","../../../projects/wacom/src/services/alert.service.ts","../../../projects/wacom/src/services/core.service.ts","../../../projects/wacom/src/components/crud.component.ts","../../../projects/wacom/src/components/loader/loader.component.ts","../../../projects/wacom/src/components/loader/loader.component.html","../../../projects/wacom/src/components/modal/modal.component.ts","../../../projects/wacom/src/components/modal/modal.component.html","../../../projects/wacom/src/directives/click-outside.directive.ts","../../../projects/wacom/src/pipes/arr.pipe.ts","../../../projects/wacom/src/pipes/mongodate.pipe.ts","../../../projects/wacom/src/pipes/number.pipe.ts","../../../projects/wacom/src/pipes/pagination.pipe.ts","../../../projects/wacom/src/pipes/safe.pipe.ts","../../../projects/wacom/src/pipes/search.pipe.ts","../../../projects/wacom/src/pipes/splice.pipe.ts","../../../projects/wacom/src/pipes/split.pipe.ts","../../../projects/wacom/src/services/base.service.ts","../../../projects/wacom/src/interfaces/http.interface.ts","../../../projects/wacom/src/services/store.service.ts","../../../projects/wacom/src/services/http.service.ts","../../../projects/wacom/src/services/crud.service.ts","../../../projects/wacom/src/components/files/files.component.ts","../../../projects/wacom/src/components/files/files.component.html","../../../projects/wacom/src/services/file.service.ts","../../../projects/wacom/src/interfaces/loader.interface.ts","../../../projects/wacom/src/services/loader.service.ts","../../../projects/wacom/src/services/modal.service.ts","../../../projects/wacom/src/services/rtc.service.ts","../../../projects/wacom/src/services/socket.service.ts","../../../projects/wacom/src/services/time.service.ts","../../../projects/wacom/src/services/util.service.ts","../../../projects/wacom/src/theme.ts","../../../projects/wacom/src/provide-wacom.ts","../../../projects/wacom/src/wacom.module.ts","../../../projects/wacom/public-api.ts","../../../projects/wacom/wacom.ts"],"sourcesContent":["import { Signal, Type } from '@angular/core';\r\n\r\n/**\r\n * Possible alert variants that control styling and default icons.\r\n */\r\nexport const ALERT_TYPES = ['info', 'error', 'success', 'warning', 'question'];\r\nexport type AlertType = (typeof ALERT_TYPES)[number];\r\n\r\n/**\r\n * Possible screen positions where alerts can be placed.\r\n */\r\nexport const ALERT_POSITIONS = ['topLeft', 'top', 'topRight', 'left', 'center', 'right', 'bottomLeft', 'bottom', 'bottomRight'];\r\nexport type AlertPosition = (typeof ALERT_POSITIONS)[number];\r\n\r\n/**\r\n * Configuration for a button rendered inside an alert.\r\n */\r\nexport interface AlertButton {\r\n\t/** Text displayed on the button. */\r\n\ttext: string;\r\n\t/** Optional click handler invoked when the button is pressed. */\r\n\tcallback?: () => void;\r\n}\r\n\r\n/**\r\n * Base options that can be supplied when showing an alert.\r\n */\r\nexport interface AlertConfig {\r\n\t/** Message text displayed to the user. */\r\n\ttext?: string;\r\n\t/** One of {@link ALERT_TYPES} determining alert style. */\r\n\ttype?: AlertType;\r\n\t/** Location on screen where the alert should appear. */\r\n\tposition?: AlertPosition;\r\n\t/** Optional action buttons displayed within the alert. */\r\n\tbuttons?: AlertButton[];\r\n\t/** Optional icon name to show with the message. */\r\n\ticon?: string;\r\n\t/** Custom CSS class applied to the alert container. */\r\n\tclass?: string;\r\n\t/** Identifier used to ensure only one alert with this key exists. */\r\n\tunique?: string;\r\n\t/** Whether to show a progress bar. */\r\n\tprogress?: boolean;\r\n\t/** Milliseconds before auto dismissal. */\r\n\ttimeout?: number;\r\n\t/** Callback executed when the alert is closed. */\r\n\tclose?: () => void;\r\n\tclosable?: boolean;\r\n}\r\n\r\nexport interface Alert extends AlertConfig {\r\n\t/** Unique identifier for the alert instance. */\r\n\tid?: number;\r\n\t/** Reactive signal tracking progress bar value. */\r\n\tprogressPercentage?: Signal<number>;\r\n\t/** Handler executed when the alert closes. */\r\n\tonClose?: () => void;\r\n\t/** Component rendered inside the alert body. */\r\n\tcomponent?: Type<unknown>;\r\n\t[x: string]: unknown;\r\n}\r\n\r\n/**\r\n * Default values applied when an alert is shown without specific options.\r\n */\r\nexport const DEFAULT_ALERT_CONFIG: Alert = {\r\n\ttext: '',\r\n\ttype: 'info',\r\n\tclass: '',\r\n\tprogress: true,\r\n\tposition: 'bottom',\r\n\ttimeout: 3000,\r\n\tclosable: true,\r\n\tbuttons: [],\r\n};\r\n","import { InjectionToken } from '@angular/core';\r\nimport { AlertConfig } from './alert.interface';\r\nimport { HttpConfig } from './http.interface';\r\nimport { LoaderConfig } from './loader.interface';\r\nimport { MetaConfig } from './meta.interface';\r\nimport { ModalConfig } from './modal.interface';\r\nimport { StoreConfig } from './store.interface';\r\n\r\n/**\r\n * Root configuration object used to initialize the library.\r\n * Each property allows consumers to override the default\r\n * behavior of the corresponding service.\r\n */\r\nexport interface Config {\r\n\t/** Options for the key‑value storage service. */\r\n\tstore?: StoreConfig;\r\n\t/** Defaults applied to page metadata handling. */\r\n\tmeta?: MetaConfig;\r\n\t/** Global settings for the alert service. */\r\n\talert?: AlertConfig;\r\n\t/** Default options for loader overlays. */\r\n\tloader?: LoaderConfig;\r\n\t/** Configuration for modal dialogs. */\r\n\tmodal?: ModalConfig;\r\n\t/** Base HTTP settings such as API URL and headers. */\r\n\thttp?: HttpConfig;\r\n\t/** Optional socket connection configuration. */\r\n\tsocket?: any;\r\n\t/** Raw Socket.IO client instance, if used. */\r\n\tio?: any;\r\n\ttheme?: {\r\n\t\tprimary: string;\r\n\t\tsecondary: string;\r\n\t\tinfo: string;\r\n\t\terror: string;\r\n\t\tsuccess: string;\r\n\t\twarning: string;\r\n\t\tquestion: string;\r\n\t};\r\n}\r\n\r\nexport const CONFIG_TOKEN = new InjectionToken<Config>('config');\r\n\r\nexport const DEFAULT_CONFIG: Config = {\r\n\tstore: {\r\n\t\tprefix: 'waStore',\r\n\t},\r\n\tmeta: {\r\n\t\tuseTitleSuffix: false,\r\n\t\twarnMissingGuard: true,\r\n\t\tdefaults: { links: {} },\r\n\t},\r\n\tsocket: false,\r\n\thttp: {\r\n\t\turl: '',\r\n\t\theaders: {},\r\n\t},\r\n\ttheme: {\r\n\t\tprimary: '#fff',\r\n\t\tsecondary: '#000',\r\n\t\tinfo: '#9ddeff',\r\n\t\terror: '#ffafb4',\r\n\t\tsuccess: '#a6efb8',\r\n\t\twarning: '#ffcfa5',\r\n\t\tquestion: '#fff9b2',\r\n\t},\r\n};\r\n","import { Signal, Type } from '@angular/core';\r\n\r\nexport const MODAL_SIZES = ['small', 'mid', 'big', 'full'];\r\nexport type ModalSizes = (typeof MODAL_SIZES)[number];\r\n\r\n/**\r\n * Configuration for a button rendered inside an modal.\r\n */\r\nexport interface ModalButton {\r\n\t/** Text displayed on the button. */\r\n\ttext: string;\r\n\t/** Optional click handler invoked when the button is pressed. */\r\n\tcallback?: () => void;\r\n}\r\n\r\nexport interface ModalConfig {\r\n\t/** Size of the modal window. */\r\n\tsize?: ModalSizes;\r\n\t/** Optional action buttons displayed within the Modal. */\r\n\tbuttons?: ModalButton[];\r\n\t/** Custom CSS class applied to the Modal container. */\r\n\tclass?: string;\r\n\t/** Identifier used to ensure only one Modal with this key exists. */\r\n\tunique?: string;\r\n\t/** Whether to show a progress bar. */\r\n\tprogress?: boolean;\r\n\t/** Milliseconds before auto dismissal. */\r\n\ttimeout?: number;\r\n\t/** Callback executed when the Modal is closed. */\r\n\tclose?: () => void;\r\n\t/** Allow closing the modal via UI controls. */\r\n\tclosable?: boolean;\r\n}\r\n\r\nexport interface Modal extends ModalConfig {\r\n\t/** Component used to render the modal content. */\r\n\tcomponent: Type<unknown>;\r\n\t/** Unique identifier for the modal instance. */\r\n\tid?: number;\r\n\t/** Signal emitting the current progress percentage. */\r\n\tprogressPercentage?: Signal<number>;\r\n\t/** Handler called when the user clicks outside the modal. */\r\n\tonClickOutside?: () => void;\r\n\t/** Callback executed when the modal closes. */\r\n\tonClose?: () => void;\r\n\t/** Callback executed when the modal opens. */\r\n\tonOpen?: () => void;\r\n\t[x: string]: unknown;\r\n}\r\n\r\nexport const DEFAULT_MODAL_CONFIG: ModalConfig = {\r\n\tsize: 'mid',\r\n\ttimeout: 0,\r\n\tclass: '',\r\n\tclosable: true,\r\n};\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { Meta, Title } from '@angular/platform-browser';\r\nimport { Route, Router } from '@angular/router';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config.interface';\r\nimport { MetaConfig, MetaDefaults } from '../interfaces/meta.interface';\r\n\r\nconst isDefined = (val: any) => typeof val !== 'undefined';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class MetaService {\r\n\tprivate _meta: MetaConfig;\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config,\r\n\t\tprivate router: Router,\r\n\t\tprivate meta: Meta,\r\n\t\tprivate titleService: Title,\r\n\t) {\r\n\t\tthis.config = this.config || DEFAULT_CONFIG;\r\n\r\n\t\tthis._meta = this.config.meta || {};\r\n\r\n\t\tthis._warnMissingGuard();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the default meta tags.\r\n\t *\r\n\t * @param defaults - The default meta tags.\r\n\t */\r\n\tsetDefaults(defaults: MetaDefaults) {\r\n\t\tthis._meta.defaults = {\r\n\t\t\t...this._meta.defaults,\r\n\t\t\t...defaults,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the title and optional title suffix.\r\n\t *\r\n\t * @param title - The title to set.\r\n\t * @param titleSuffix - The title suffix to append.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetTitle(title?: string, titleSuffix?: string): MetaService {\r\n\t\tlet titleContent = isDefined(title) ? title || '' : this._meta.defaults?.['title'] || '';\r\n\r\n\t\tif (this._meta.useTitleSuffix) {\r\n\t\t\ttitleContent += isDefined(titleSuffix) ? titleSuffix : this._meta.defaults?.['titleSuffix'] || '';\r\n\t\t}\r\n\r\n\t\tthis._updateMetaTag('title', titleContent);\r\n\r\n\t\tthis._updateMetaTag('og:title', titleContent);\r\n\r\n\t\tthis._updateMetaTag('twitter:title', titleContent);\r\n\r\n\t\tthis.titleService.setTitle(titleContent);\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets link tags.\r\n\t *\r\n\t * @param links - The links to set.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetLink(links: { [key: string]: string }): MetaService {\r\n\t\tObject.keys(links).forEach((rel) => {\r\n\t\t\tlet link: HTMLLinkElement = document.createElement('link');\r\n\r\n\t\t\tlink.setAttribute('rel', rel);\r\n\r\n\t\t\tlink.setAttribute('href', links[rel]);\r\n\r\n\t\t\tdocument.head.appendChild(link);\r\n\t\t});\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param value - The meta tag value.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tsetTag(tag: string, value: string, prop?: string) {\r\n\t\tif (tag === 'title' || tag === 'titleSuffix') {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Attempt to set ${tag} through 'setTag': 'title' and 'titleSuffix' are reserved. Use 'MetaService.setTitle' instead.`,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tconst content = (isDefined(value) ? value || '' : this._meta.defaults?.[tag] || '') + '';\r\n\r\n\t\tthis._updateMetaTag(tag, content, prop);\r\n\r\n\t\tif (tag === 'description') {\r\n\t\t\tthis._updateMetaTag('og:description', content, prop);\r\n\r\n\t\t\tthis._updateMetaTag('twitter:description', content, prop);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param value - The meta tag value.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tprivate _updateMetaTag(tag: string, value: string, prop?: string): void {\r\n\t\tprop = prop || (tag.startsWith('og:') || tag.startsWith('twitter:') ? 'property' : 'name');\r\n\r\n\t\tthis.meta.updateTag({ [prop]: tag, content: value });\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tremoveTag(tag: string, prop?: string): void {\r\n\t\tprop = prop || (tag.startsWith('og:') || tag.startsWith('twitter:') ? 'property' : 'name');\r\n\r\n\t\tthis.meta.removeTag(`${prop}=\"${tag}\"`);\r\n\t}\r\n\r\n\t/**\r\n\t * Warns about missing meta guards in routes.\r\n\t */\r\n\tprivate _warnMissingGuard(): void {\r\n\t\tif (isDefined(this._meta.warnMissingGuard) && !this._meta.warnMissingGuard) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst hasDefaultMeta = !!Object.keys(this._meta.defaults ?? {}).length;\r\n\r\n\t\tconst hasMetaGuardInArr = (it: any) => it && it.IDENTIFIER === 'MetaGuard';\r\n\r\n\t\tlet hasShownWarnings = false;\r\n\r\n\t\tconst checkRoute = (route: Route) => {\r\n\t\t\tconst hasRouteMeta = route.data && route.data['meta'];\r\n\r\n\t\t\tconst showWarning =\r\n\t\t\t\t!isDefined(route.redirectTo) && (hasDefaultMeta || hasRouteMeta) && !(route.canActivate || []).some(hasMetaGuardInArr);\r\n\r\n\t\t\tif (showWarning) {\r\n\t\t\t\tconsole.warn(\r\n\t\t\t\t\t`Route with path \"${route.path}\" has ${\r\n\t\t\t\t\t\thasRouteMeta ? '' : 'default '\r\n\t\t\t\t\t}meta tags, but does not use MetaGuard. Please add MetaGuard to the canActivate array in your route configuration`,\r\n\t\t\t\t);\r\n\t\t\t\thasShownWarnings = true;\r\n\t\t\t}\r\n\r\n\t\t\t(route.children || []).forEach(checkRoute);\r\n\t\t};\r\n\r\n\t\tthis.router.config.forEach(checkRoute);\r\n\r\n\t\tif (hasShownWarnings) {\r\n\t\t\tconsole.warn(\r\n\t\t\t\t`To disable these warnings, set metaConfig.warnMissingGuard: false in your MetaConfig passed to MetaModule.forRoot()`,\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config.interface';\r\nimport { MetaService } from '../services/meta.service';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class MetaGuard {\r\n\tpublic static IDENTIFIER = 'MetaGuard';\r\n\tprivate _meta: any;\r\n\tpublic constructor(\r\n\t\tprivate metaService: MetaService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config,\r\n\t) {\r\n\t\tif (!this.config) this.config = DEFAULT_CONFIG;\r\n\t\tthis._meta = this.config.meta || {};\r\n\t\tthis._meta.defaults = this._meta.defaults || {};\r\n\t}\r\n\tpublic canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n\t\tthis._processRouteMetaTags(route.data && route.data['meta']);\r\n\t\treturn true;\r\n\t}\r\n\tprivate _processRouteMetaTags(meta: any = {}) {\r\n\t\tif (meta.disableUpdate) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (meta.title) {\r\n\t\t\tthis.metaService.setTitle(meta.title, meta.titleSuffix);\r\n\t\t}\r\n\t\tif (meta.links && Object.keys(meta.links).length) {\r\n\t\t\tthis.metaService.setLink(meta.links);\r\n\t\t}\r\n\t\tif (this._meta.defaults?.links && Object.keys(this._meta.defaults.links).length) {\r\n\t\t\tthis.metaService.setLink(this._meta.defaults.links);\r\n\t\t}\r\n\t\tObject.keys(meta).forEach((prop) => {\r\n\t\t\tif (prop === 'title' || prop === 'titleSuffix' || prop === 'links') {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tObject.keys(meta[prop]).forEach((key) => {\r\n\t\t\t\tthis.metaService.setTag(key, meta[prop][key], prop);\r\n\t\t\t});\r\n\t\t});\r\n\t\tObject.keys(this._meta.defaults).forEach((key) => {\r\n\t\t\tif (key in meta || key === 'title' || key === 'titleSuffix' || key === 'links') {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.metaService.setTag(key, this._meta.defaults[key] as string);\r\n\t\t});\r\n\t}\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core';\r\nimport { AlertButton, AlertPosition, AlertType } from '../../../interfaces/alert.interface';\r\n\r\n@Component({\r\n\tselector: 'alert',\r\n\ttemplateUrl: './alert.component.html',\r\n\tstyleUrls: ['./alert.component.scss'],\r\n\timports: [CommonModule],\r\n})\r\n/**\r\n * Displays an individual alert message with optional icon, actions and\r\n * auto‑dismiss behaviour. All inputs are configured by the service when the\r\n * component is created dynamically.\r\n */\r\nexport class AlertComponent implements AfterViewInit {\r\n\t/** Reference to the DOM element hosting the alert. */\r\n\t@ViewChild('alertRef') alertRef!: ElementRef<HTMLDivElement>;\r\n\r\n\t/** Callback invoked to remove the alert from the DOM. */\r\n\tclose!: () => void;\r\n\r\n\t/** Text content displayed inside the alert. */\r\n\ttext!: string;\r\n\r\n\t/** Additional CSS classes applied to the alert container. */\r\n\tclass!: string;\r\n\r\n\t/** Type of alert which determines styling and icon. */\r\n\ttype: AlertType = 'info';\r\n\r\n\t/** Position on the screen where the alert appears. */\r\n\tposition: AlertPosition = 'bottom';\r\n\r\n\t/** Whether a progress bar indicating remaining time is shown. */\r\n\tprogress!: boolean;\r\n\r\n\t/** Icon name displayed alongside the message. */\r\n\ticon!: string;\r\n\r\n\t/** Time in milliseconds before the alert auto closes. */\r\n\ttimeout!: number;\r\n\r\n\t/** Determines if a manual close button is visible. */\r\n\tclosable!: boolean;\r\n\r\n\t/** Flag used to trigger the deletion animation. */\r\n\tdelete_animation = false;\r\n\r\n\t/** Optional action buttons rendered within the alert. */\r\n\tbuttons: AlertButton[] = [];\r\n\r\n\t/**\r\n\t * Starts the auto‑dismiss timer and pauses it while the alert is\r\n\t * hovered, resuming when the mouse leaves.\r\n\t */\r\n\tngAfterViewInit(): void {\r\n\t\tif (this.timeout) {\r\n\t\t\tlet remaining = JSON.parse(JSON.stringify(this.timeout));\r\n\r\n\t\t\tlet timer: number = window.setTimeout(() => {\r\n\t\t\t\tthis.remove();\r\n\t\t\t}, remaining);\r\n\r\n\t\t\tlet start = new Date();\r\n\r\n\t\t\tthis.alertRef.nativeElement.addEventListener(\r\n\t\t\t\t'mouseenter',\r\n\t\t\t\t() => {\r\n\t\t\t\t\tclearTimeout(timer);\r\n\r\n\t\t\t\t\tremaining -= new Date().getTime() - start.getTime();\r\n\t\t\t\t},\r\n\t\t\t\tfalse,\r\n\t\t\t);\r\n\r\n\t\t\tthis.alertRef.nativeElement.addEventListener(\r\n\t\t\t\t'mouseleave',\r\n\t\t\t\t() => {\r\n\t\t\t\t\tstart = new Date();\r\n\r\n\t\t\t\t\tclearTimeout(timer);\r\n\r\n\t\t\t\t\ttimer = window.setTimeout(() => {\r\n\t\t\t\t\t\tthis.remove();\r\n\t\t\t\t\t}, remaining);\r\n\t\t\t\t},\r\n\t\t\t\tfalse,\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Triggers the closing animation and invokes the provided close\r\n\t * callback once finished.\r\n\t */\r\n\tremove(callback?: () => void) {\r\n\t\tif (this._removed) return;\r\n\r\n\t\tthis._removed = true;\r\n\r\n\t\tcallback?.();\r\n\r\n\t\tthis.delete_animation = true;\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.close();\r\n\r\n\t\t\tthis.delete_animation = false;\r\n\t\t}, 350);\r\n\t}\r\n\tprivate _removed = false;\r\n}\r\n","@if (text) {\r\n\t<div class=\"wacom-alert wacom-alert--auto-height\" [class.wacom-alert--closing]=\"delete_animation\" [ngClass]=\"class\">\r\n\t\t<div [ngClass]=\"'wacom-alert__content--color-' + type\" class=\"wacom-alert__content wacom-alert__content--bounce-in-up\" #alertRef>\r\n\t\t\t@if (progress) {\r\n\t\t\t\t<div class=\"wacom-alert__progress\">\r\n\t\t\t\t\t<span\r\n\t\t\t\t\t\tclass=\"wacom-alert__progress-bar\"\r\n\t\t\t\t\t\t[ngClass]=\"'wacom-alert__progress-bar--' + type\"\r\n\t\t\t\t\t\t[ngStyle]=\"{\r\n\t\t\t\t\t\t\t'animation-duration': (timeout + 350) / 1000 + 's',\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></span>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t\t<div class=\"wacom-alert__body\">\r\n\t\t\t\t<div class=\"wacom-alert__texts\">\r\n\t\t\t\t\t@if (icon) {\r\n\t\t\t\t\t\t<div class=\"{{ icon }}\"></div>\r\n\t\t\t\t\t}\r\n\t\t\t\t\t<div class=\"wacom-alert__message wacom-alert__message--slide-in\">\r\n\t\t\t\t\t\t{{ text }}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t@if (type === \"question\") {\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t@for (button of buttons; track button.text) {\r\n\t\t\t\t\t\t\t<button (click)=\"remove(button.callback)\" class=\"wacom-alert__button\">\r\n\t\t\t\t\t\t\t\t{{ button.text }}\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t\t@if (closable) {\r\n\t\t\t\t\t<div class=\"wacom-alert__close\" (click)=\"remove()\"></div>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n}\r\n","/**\n * BaseComponent is an abstract class that provides basic functionality for managing the current timestamp.\n */\nexport abstract class BaseComponent {\n\t/**\n\t * The current timestamp in milliseconds since the Unix epoch.\n\t */\n\tnow = new Date().getTime();\n\n\t/**\n\t * Refreshes the `now` property with the current timestamp.\n\t */\n\trefreshNow(): void {\n\t\tthis.now = new Date().getTime();\n\t}\n}\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-wrapper',\r\n\ttemplateUrl: './wrapper.component.html',\r\n\tstyleUrls: ['./wrapper.component.scss'],\r\n\timports: [],\r\n})\r\n/**\r\n * Container component that provides placeholder elements for alert instances\r\n * rendered in different screen positions.\r\n */\r\nexport class WrapperComponent {}\r\n","<div class=\"wacom-wrapper\">\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--top-left\" id=\"topLeft\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--top\" id=\"top\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--top-right\" id=\"topRight\"></div>\r\n\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--left\" id=\"left\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--center\" id=\"center\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--right\" id=\"right\"></div>\r\n\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--bottom-left\" id=\"bottomLeft\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--bottom\" id=\"bottom\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--bottom-right\" id=\"bottomRight\"></div>\r\n</div>\r\n","import {\r\n\tApplicationRef,\r\n\tComponentRef,\r\n\tEmbeddedViewRef,\r\n\tEnvironmentInjector,\r\n\tInjectable,\r\n\tType,\r\n\tcreateComponent,\r\n\tinject,\r\n} from '@angular/core';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\n/**\r\n * Utility service for programmatically creating and interacting with Angular\r\n * components within the DOM.\r\n */\r\nexport class DomService {\r\n\t/**\r\n\t * Appends a component to a specified element by ID.\r\n\t *\r\n\t * @param component - The component to append.\r\n\t * @param options - The options to project into the component.\r\n\t * @param id - The ID of the element to append the component to.\r\n\t * @returns An object containing the native element and the component reference.\r\n\t */\r\n\tappendById<T>(component: Type<T>, options: Partial<T> = {}, id: string): DomComponent<T> {\r\n\t\tconst componentRef = createComponent(component, {\r\n\t\t\tenvironmentInjector: this._injector,\r\n\t\t});\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\r\n\t\tthis._appRef.attachView(componentRef.hostView);\r\n\r\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<T>).rootNodes[0] as HTMLElement;\r\n\r\n\t\tconst element = document.getElementById(id);\r\n\r\n\t\tif (element && typeof element.appendChild === 'function') {\r\n\t\t\telement.appendChild(domElem);\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnativeElement: domElem,\r\n\t\t\tcomponentRef: componentRef,\r\n\t\t\tremove: () => this.removeComponent(componentRef),\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Appends a component to a specified element or to the body.\r\n\t *\r\n\t * @param component - The component to append.\r\n\t * @param options - The options to project into the component.\r\n\t * @param element - The element to append the component to. Defaults to body.\r\n\t * @returns An object containing the native element and the component reference.\r\n\t */\r\n\tappendComponent<T>(\r\n\t\tcomponent: Type<T>,\r\n\t\toptions: Partial<T & { providedIn?: string }> = {},\r\n\t\telement: HTMLElement = document.body,\r\n\t): DomComponent<T> | void {\r\n\t\tif (options.providedIn) {\r\n\t\t\tif (this._providedIn[options.providedIn]) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._providedIn[options.providedIn] = true;\r\n\t\t}\r\n\r\n\t\tconst componentRef = createComponent(component, {\r\n\t\t\tenvironmentInjector: this._injector,\r\n\t\t});\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\r\n\t\tthis._appRef.attachView(componentRef.hostView);\r\n\r\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<T>).rootNodes[0] as HTMLElement;\r\n\r\n\t\tif (element && typeof element.appendChild === 'function') {\r\n\t\t\telement.appendChild(domElem);\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnativeElement: domElem,\r\n\t\t\tcomponentRef: componentRef,\r\n\t\t\tremove: () => this.removeComponent(componentRef, options.providedIn),\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a reference to a dynamically created component.\r\n\t *\r\n\t * @param component - The component to create.\r\n\t * @param options - The options to project into the component.\r\n\t * @returns The component reference.\r\n\t */\r\n\tgetComponentRef<T>(component: Type<T>, options: Partial<T> = {}): ComponentRef<T> {\r\n\t\tconst componentRef = createComponent(component, {\r\n\t\t\tenvironmentInjector: this._injector,\r\n\t\t});\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\r\n\t\tthis._appRef.attachView(componentRef.hostView);\r\n\r\n\t\treturn componentRef;\r\n\t}\r\n\r\n\t/**\r\n\t * Projects the inputs onto the component.\r\n\t *\r\n\t * @param component - The component reference.\r\n\t * @param options - The options to project into the component.\r\n\t * @returns The component reference with the projected inputs.\r\n\t */\r\n\tprivate projectComponentInputs<T>(component: ComponentRef<T>, options: Partial<T>): ComponentRef<T> {\r\n\t\tif (options) {\r\n\t\t\tconst props = Object.getOwnPropertyNames(options);\r\n\r\n\t\t\tfor (const prop of props) {\r\n\t\t\t\t(component.instance as any)[prop] = (options as any)[prop];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn component;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a previously attached component and optionally clears its\r\n\t * unique `providedIn` flag.\r\n\t *\r\n\t * @param componentRef - Reference to the component to be removed.\r\n\t * @param providedIn - Optional key used to track unique instances.\r\n\t */\r\n\tremoveComponent<T>(componentRef: ComponentRef<T>, providedIn?: string): void {\r\n\t\tthis._appRef.detachView(componentRef.hostView);\r\n\r\n\t\tcomponentRef.destroy();\r\n\r\n\t\tif (providedIn) {\r\n\t\t\tdelete this._providedIn[providedIn];\r\n\t\t}\r\n\t}\r\n\r\n\t/** Reference to the root application used for view attachment. */\r\n\tprivate _appRef = inject(ApplicationRef);\r\n\r\n\t/** Injector utilized when creating dynamic components. */\r\n\tprivate _injector = inject(EnvironmentInjector);\r\n\r\n\t/**\r\n\t * Flags to ensure components with a specific `providedIn` key are only\r\n\t * instantiated once at a time.\r\n\t */\r\n\tprivate _providedIn: Record<string, boolean> = {};\r\n}\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { AlertComponent } from '../components/alert/alert/alert.component';\r\nimport { WrapperComponent } from '../components/alert/wrapper/wrapper.component';\r\nimport { Alert, AlertConfig, DEFAULT_ALERT_CONFIG } from '../interfaces/alert.interface';\r\nimport { Config, CONFIG_TOKEN } from '../interfaces/config.interface';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\nimport { DomService } from './dom.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class AlertService {\r\n\t/**\r\n\t * Creates a new alert service.\r\n\t *\r\n\t * @param config Optional global configuration provided via the\r\n\t * `CONFIG_TOKEN` injection token.\r\n\t * @param _dom Service responsible for DOM manipulation and dynamic\r\n\t * component creation.\r\n\t */\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() config: Config,\r\n\t\tprivate _dom: DomService,\r\n\t) {\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_ALERT_CONFIG,\r\n\t\t\t...(config?.alert || {}),\r\n\t\t};\r\n\r\n\t\tthis._container = this._dom.appendComponent(WrapperComponent)!;\r\n\t}\r\n\r\n\t/**\r\n\t * Displays an alert. Accepts either an options object or a simple string\r\n\t * which will be used as the alert text.\r\n\t *\r\n\t * @returns Reference to the created alert or embedded component\r\n\t * element.\r\n\t */\r\n\tshow(opts: Alert | string): Alert {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\tif (opts.unique && this._alerts.find((m) => m.unique === opts.unique)) {\r\n\t\t\treturn this._alerts.find((m) => m.unique === opts.unique) as Alert;\r\n\t\t}\r\n\r\n\t\tthis._alerts.push(opts);\r\n\r\n\t\topts.id ||= Math.floor(Math.random() * Date.now()) + Date.now();\r\n\r\n\t\tif (!opts.type) opts.type = 'info';\r\n\r\n\t\tif (!opts.position) opts.position = 'bottomRight';\r\n\r\n\t\tlet alertComponent: DomComponent<AlertComponent> | undefined;\r\n\r\n\t\tlet content: DomComponent<any> | undefined;\r\n\r\n\t\topts.close = () => {\r\n\t\t\tcontent?.remove();\r\n\r\n\t\t\talertComponent?.remove();\r\n\r\n\t\t\tcontent = undefined;\r\n\r\n\t\t\talertComponent = undefined;\r\n\r\n\t\t\tif (typeof (opts as Alert).onClose == 'function') {\r\n\t\t\t\t(opts as Alert).onClose?.();\r\n\t\t\t}\r\n\r\n\t\t\tthis._alerts.splice(\r\n\t\t\t\tthis._alerts.findIndex((m) => m.id === opts.id),\r\n\t\t\t\t1,\r\n\t\t\t);\r\n\t\t};\r\n\r\n\t\talertComponent = this._dom.appendById(AlertComponent, opts, opts.position);\r\n\r\n\t\tif (typeof opts.component === 'function') {\r\n\t\t\tcontent = this._dom.appendComponent(\r\n\t\t\t\topts.component,\r\n\t\t\t\topts as Partial<{ providedIn?: string | undefined }>,\r\n\t\t\t\tthis._container.nativeElement.children[0].children[this._positionNumber[opts.position] || 0] as HTMLElement,\r\n\t\t\t)!;\r\n\t\t}\r\n\r\n\t\tif (typeof opts.timeout !== 'number') {\r\n\t\t\topts.timeout = 3000;\r\n\t\t}\r\n\r\n\t\tif (opts.timeout) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\topts.close?.();\r\n\t\t\t}, opts.timeout);\r\n\t\t}\r\n\r\n\t\treturn opts;\r\n\t}\r\n\r\n\t/**\r\n\t * Convenience alias for `show`.\r\n\t */\r\n\topen(opts: Alert) {\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays an informational alert.\r\n\t */\r\n\tinfo(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'info';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays a success alert.\r\n\t */\r\n\tsuccess(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'success';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays a warning alert.\r\n\t */\r\n\twarning(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'warning';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays an error alert.\r\n\t */\r\n\terror(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'error';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays a question alert.\r\n\t */\r\n\tquestion(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'question';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Removes all alert elements from the document.\r\n\t */\r\n\tdestroy() {\r\n\t\tfor (let i = this._alerts.length - 1; i >= 0; i--) {\r\n\t\t\tthis._alerts[i].close?.();\r\n\t\t}\r\n\t}\r\n\tprivate _alerts: Alert[] = [];\r\n\r\n\t/** Merged configuration applied to new alerts. */\r\n\tprivate _config: AlertConfig;\r\n\r\n\t/** Wrapper component that contains all alert placeholders. */\r\n\tprivate _container: DomComponent<WrapperComponent>;\r\n\r\n\t/** Mapping of alert positions to wrapper child indexes. */\r\n\tprivate _positionNumber: Record<string, number> = {\r\n\t\ttopLeft: 0,\r\n\t\ttop: 1,\r\n\t\ttopRight: 2,\r\n\t\tleft: 3,\r\n\t\tcenter: 4,\r\n\t\tright: 5,\r\n\t\tbottomLeft: 6,\r\n\t\tbottom: 7,\r\n\t\tbottomRight: 8,\r\n\t};\r\n\r\n\tprivate _opts(opts: Alert | string): Alert {\r\n\t\treturn typeof opts === 'string'\r\n\t\t\t? {\r\n\t\t\t\t\t...this._config,\r\n\t\t\t\t\ttext: opts,\r\n\t\t\t\t}\r\n\t\t\t: {\r\n\t\t\t\t\t...this._config,\r\n\t\t\t\t\t...opts,\r\n\t\t\t\t};\r\n\t}\r\n}\r\n","import { Inject, Injectable, PLATFORM_ID, Signal, WritableSignal, signal } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { Selectitem } from '../interfaces/select.item.interface';\r\n\r\n// Add capitalize method to String prototype if it doesn't already exist\r\nif (!String.prototype.capitalize) {\r\n\tString.prototype.capitalize = function (): string {\r\n\t\tif (this.length > 0) {\r\n\t\t\treturn this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();\r\n\t\t}\r\n\t\treturn '';\r\n\t};\r\n}\r\n\r\n// Extend the String interface to include the new method\r\ndeclare global {\r\n\tinterface String {\r\n\t\tcapitalize(): string;\r\n\t}\r\n}\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class CoreService {\r\n\tdeviceID = localStorage.getItem('deviceID') || (typeof crypto?.randomUUID === 'function' ? crypto.randomUUID() : this.UUID());\r\n\r\n\tconstructor(@Inject(PLATFORM_ID) private platformId: boolean) {\r\n\t\tlocalStorage.setItem('deviceID', this.deviceID);\r\n\r\n\t\tthis.detectDevice();\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a UUID (Universally Unique Identifier) version 4.\r\n\t *\r\n\t * This implementation uses `Math.random()` to generate random values,\r\n\t * making it suitable for general-purpose identifiers, but **not** for\r\n\t * cryptographic or security-sensitive use cases.\r\n\t *\r\n\t * The format follows the UUID v4 standard: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`\r\n\t * where:\r\n\t * - `x` is a random hexadecimal digit (0–f)\r\n\t * - `4` indicates UUID version 4\r\n\t * - `y` is one of 8, 9, A, or B\r\n\t *\r\n\t * Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479`\r\n\t *\r\n\t * @returns A string containing a UUID v4.\r\n\t */\r\n\tUUID(): string {\r\n\t\treturn 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c: string) => {\r\n\t\t\tconst r = (Math.random() * 16) | 0;\r\n\t\t\tconst v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n\t\t\treturn v.toString(16);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Converts an object to an array. Optionally holds keys instead of values.\r\n\t *\r\n\t * @param {any} obj - The object to be converted.\r\n\t * @param {boolean} [holder=false] - If true, the keys will be held in the array; otherwise, the values will be held.\r\n\t * @returns {any[]} The resulting array.\r\n\t */\r\n\tota(obj: any, holder: boolean = false): any[] {\r\n\t\tif (Array.isArray(obj)) return obj;\r\n\t\tif (typeof obj !== 'object' || obj === null) return [];\r\n\t\tconst arr = [];\r\n\t\tfor (const each in obj) {\r\n\t\t\tif (obj.hasOwnProperty(each) && (obj[each] || typeof obj[each] === 'number' || typeof obj[each] === 'boolean')) {\r\n\t\t\t\tif (holder) {\r\n\t\t\t\t\tarr.push(each);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tarr.push(obj[each]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes elements from `fromArray` that are present in `removeArray` based on a comparison field.\r\n\t *\r\n\t * @param {any[]} removeArray - The array of elements to remove.\r\n\t * @param {any[]} fromArray - The array from which to remove elements.\r\n\t * @param {string} [compareField='_id'] - The field to use for comparison.\r\n\t * @returns {any[]} The modified `fromArray` with elements removed.\r\n\t */\r\n\tsplice(removeArray: any[], fromArray: any[], compareField: string = '_id'): any[] {\r\n\t\tif (!Array.isArray(removeArray) || !Array.isArray(fromArray)) {\r\n\t\t\treturn fromArray;\r\n\t\t}\r\n\r\n\t\tconst removeSet = new Set(removeArray.map((item) => item[compareField]));\r\n\t\treturn fromArray.filter((item) => !removeSet.has(item[compareField]));\r\n\t}\r\n\r\n\t/**\r\n\t * Unites multiple _id values into a single unique _id.\r\n\t * The resulting _id is unique regardless of the order of the input _id values.\r\n\t *\r\n\t * @param {...string[]} args - The _id values to be united.\r\n\t * @returns {string} The unique combined _id.\r\n\t */\r\n\tids2id(...args: string[]): string {\r\n\t\targs.sort((a, b) => {\r\n\t\t\tif (Number(a.toString().substring(0, 8)) > Number(b.toString().substring(0, 8))) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t});\r\n\r\n\t\treturn args.join();\r\n\t}\r\n\r\n\t// After While\r\n\tprivate _afterWhile: Record<string, number> = {};\r\n\t/**\r\n\t * Delays the execution of a callback function for a specified amount of time.\r\n\t * If called again within that time, the timer resets.\r\n\t *\r\n\t * @param {string | object | (() => void)} doc - A unique identifier for the timer, an object to host the timer, or the callback function.\r\n\t * @param {() => void} [cb] - The callback function to execute after the delay.\r\n\t * @param {number} [time=1000] - The delay time in milliseconds.\r\n\t */\r\n\tafterWhile(doc: string | object | (() => void), cb?: () => void, time: number = 1000): void {\r\n\t\tif (typeof doc === 'function') {\r\n\t\t\tcb = doc as () => void;\r\n\t\t\tdoc = 'common';\r\n\t\t}\r\n\r\n\t\tif (typeof cb === 'function' && typeof time === 'number') {\r\n\t\t\tif (typeof doc === 'string') {\r\n\t\t\t\tclearTimeout(this._afterWhile[doc]);\r\n\t\t\t\tthis._afterWhile[doc] = window.setTimeout(cb, time);\r\n\t\t\t} else if (typeof doc === 'object') {\r\n\t\t\t\tclearTimeout((doc as { __afterWhile: number }).__afterWhile);\r\n\t\t\t\t(doc as { __afterWhile: number }).__afterWhile = window.setTimeout(cb, time);\r\n\t\t\t} else {\r\n\t\t\t\tconsole.warn('badly configured after while');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Recursively copies properties from one object to another.\r\n\t * Handles nested objects, arrays, and Date instances appropriately.\r\n\t *\r\n\t * @param from - The source object from which properties are copied.\r\n\t * @param to - The target object to which properties are copied.\r\n\t */\r\n\tcopy(from: any, to: any) {\r\n\t\tfor (const each in from) {\r\n\t\t\tif (typeof from[each] !== 'object' || from[each] instanceof Date || Array.isArray(from[each]) || from[each] === null) {\r\n\t\t\t\tto[each] = from[each];\r\n\t\t\t} else {\r\n\t\t\t\tif (typeof to[each] !== 'object' || to[each] instanceof Date || Array.isArray(to[each]) || to[each] === null) {\r\n\t\t\t\t\tto[each] = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.copy(from[each], to[each]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Device management\r\n\tdevice = '';\r\n\t/**\r\n\t * Detects the device type based on the user agent.\r\n\t */\r\n\tdetectDevice(): void {\r\n\t\tconst userAgent = navigator.userAgent || navigator.vendor || (window as any).opera;\r\n\t\tif (/windows phone/i.test(userAgent)) {\r\n\t\t\tthis.device = 'Windows Phone';\r\n\t\t} else if (/android/i.test(userAgent)) {\r\n\t\t\tthis.device = 'Android';\r\n\t\t} else if (/iPad|iPhone|iPod/.test(userAgent) && !(window as any).MSStream) {\r\n\t\t\tthis.device = 'iOS';\r\n\t\t} else {\r\n\t\t\tthis.device = 'Web';\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a mobile device.\r\n\t * @returns {boolean} - Returns true if the device is a mobile device.\r\n\t */\r\n\tisMobile(): boolean {\r\n\t\treturn this.device === 'Windows Phone' || this.device === 'Android' || this.device === 'iOS';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a tablet.\r\n\t * @returns {boolean} - Returns true if the device is a tablet.\r\n\t */\r\n\tisTablet(): boolean {\r\n\t\treturn this.device === 'iOS' && /iPad/.test(navigator.userAgent);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a web browser.\r\n\t * @returns {boolean} - Returns true if the device is a web browser.\r\n\t */\r\n\tisWeb(): boolean {\r\n\t\treturn this.device === 'Web';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is an Android device.\r\n\t * @returns {boolean} - Returns true if the device is an Android device.\r\n\t */\r\n\tisAndroid(): boolean {\r\n\t\treturn this.device === 'Android';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is an iOS device.\r\n\t * @returns {boolean} - Returns true if the device is an iOS device.\r\n\t */\r\n\tisIos(): boolean {\r\n\t\treturn this.device === 'iOS';\r\n\t}\r\n\r\n\t// Version management\r\n\tversion = '1.0.0';\r\n\r\n\tappVersion = '';\r\n\r\n\tdateVersion = '';\r\n\r\n\t/**\r\n\t * Sets the combined version string based on appVersion and dateVersion.\r\n\t */\r\n\tsetVersion(): void {\r\n\t\tthis.version = this.appVersion || '';\r\n\r\n\t\tthis.version += this.version && this.dateVersion ? ' ' : '';\r\n\r\n\t\tthis.version += this.dateVersion || '';\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the app version and updates the combined version string.\r\n\t *\r\n\t * @param {string} appVersion - The application version to set.\r\n\t */\r\n\tsetAppVersion(appVersion: string): void {\r\n\t\tthis.appVersion = appVersion;\r\n\r\n\t\tthis.setVersion();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the date version and updates the combined version string.\r\n\t *\r\n\t * @param {string} dateVersion - The date version to set.\r\n\t */\r\n\tsetDateVersion(dateVersion: string): void {\r\n\t\tthis.dateVersion = dateVersion;\r\n\r\n\t\tthis.setVersion();\r\n\t}\r\n\r\n\t// Signal management\r\n\tprivate _signals: Record<string, Subject<any>> = {};\r\n\r\n\t/**\r\n\t * Emits a signal, optionally passing data to the listeners.\r\n\t * @param signal - The name of the signal to emit.\r\n\t * @param data - Optional data to pass to the listeners.\r\n\t */\r\n\temit(signal: string, data?: any): void {\r\n\t\tif (!this._signals[signal]) {\r\n\t\t\tthis._signals[signal] = new Subject<any>();\r\n\t\t}\r\n\r\n\t\tthis._signals[signal].next(data);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an Observable that emits values when the specified signal is emitted.\r\n\t * Multiple components or services can subscribe to this Observable to be notified of the signal.\r\n\t * @param signal - The name of the signal to listen for.\r\n\t * @returns An Observable that emits when the signal is emitted.\r\n\t */\r\n\ton(signal: string): Observable<any> {\r\n\t\tif (!this._signals[signal]) {\r\n\t\t\tthis._signals[signal] = new Subject<any>();\r\n\t\t}\r\n\r\n\t\treturn this._signals[signal].asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Completes the Subject for a specific signal, effectively stopping any future emissions.\r\n\t * This also unsubscribes all listeners for the signal.\r\n\t * @param signal - The name of the signal to stop.\r\n\t */\r\n\toff(signal: string): void {\r\n\t\tif (!this._signals[signal]) return;\r\n\t\tthis._signals[signal].complete();\r\n\t\tdelete this._signals[signal];\r\n\t}\r\n\r\n\t// Await management\r\n\tprivate _completed: Record<string, unknown> = {};\r\n\r\n\tprivate _completeResolvers: Record<string, ((doc: unknown) => void)[]> = {};\r\n\r\n\t/**\r\n\t * Marks a task as complete.\r\n\t * @param task - The task to mark as complete, identified by a string.\r\n\t */\r\n\tcomplete(task: string, document: unknown = true): void {\r\n\t\tthis._completed[task] = document;\r\n\r\n\t\tif (this._completeResolvers[task]) {\r\n\t\t\tthis._completeResolvers[task].forEach((resolve) => resolve(document));\r\n\r\n\t\t\tthis._completeResolvers[task] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Waits for one or more tasks to be marked as complete.\r\n\t *\r\n\t * @param {string | string[]} tasks - The task or array of tasks to wait for.\r\n\t * @returns {Promise<unknown>} A promise that resolves when all specified tasks are complete.\r\n\t * - If a single task is provided, resolves with its completion result.\r\n\t * - If multiple tasks are provided, resolves with an array of results in the same order.\r\n\t *\r\n\t * @remarks\r\n\t * If any task is not yet completed, a resolver is attached. The developer is responsible for managing\r\n\t * resolver cleanup if needed. Resolvers remain after resolution and are not removed automatically.\r\n\t */\r\n\tonComplete(tasks: string | string[]): Promise<unknown> {\r\n\t\tif (typeof tasks === 'string') {\r\n\t\t\ttasks = [tasks];\r\n\t\t}\r\n\r\n\t\tif (this._isCompleted(tasks)) {\r\n\t\t\treturn Promise.resolve(tasks.length > 1 ? tasks.map((task) => this._completed[task]) : this._completed[tasks[0]]);\r\n\t\t}\r\n\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tfor (const task of tasks) {\r\n\t\t\t\tif (!this._completeResolvers[task]) {\r\n\t\t\t\t\tthis._completeResolvers[task] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._completeResolvers[task].push(this._allCompleted(tasks, resolve));\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a resolver function that checks if all given tasks are completed,\r\n\t * and if so, calls the provided resolve function with their results.\r\n\t *\r\n\t * @param {string[]} tasks - The list of task names to monitor for completion.\r\n\t * @param {(value: unknown) => void} resolve - The resolver function to call once all tasks are complete.\r\n\t * @returns {(doc: unknown) => void} A function that can be registered as a resolver for each task.\r\n\t *\r\n\t * @remarks\r\n\t * This function does not manage or clean up resolvers. It assumes the developer handles any potential duplicates or memory concerns.\r\n\t */\r\n\tprivate _allCompleted(tasks: string[], resolve: (value: unknown) => void): (doc: unknown) => void {\r\n\t\treturn (doc: unknown) => {\r\n\t\t\tif (this._isCompleted(tasks)) {\r\n\t\t\t\tresolve(tasks.length > 1 ? tasks.map((task) => this._completed[task]) : this._completed[tasks[0]]);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Checks whether all specified tasks have been marked as completed.\r\n\t *\r\n\t * @param {string[]} tasks - The array of task names to check.\r\n\t * @returns {boolean} `true` if all tasks are completed, otherwise `false`.\r\n\t */\r\n\tprivate _isCompleted(tasks: string[]): boolean {\r\n\t\tfor (const task of tasks) {\r\n\t\t\tif (!this._completed[task]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a task is completed.\r\n\t * @param task - The task to check, identified by a string.\r\n\t * @returns True if the task is completed, false otherwise.\r\n\t */\r\n\tcompleted(task: string): unknown {\r\n\t\treturn this._completed[task];\r\n\t}\r\n\r\n\t/**\r\n\t * Clears the completed state for a specific task.\r\n\t *\r\n\t * This removes the task from the internal `_completed` store,\r\n\t * allowing it to be awaited again in the future if needed.\r\n\t * It does not affect pending resolvers or trigger any callbacks.\r\n\t *\r\n\t * @param task - The task identifier to clear from completed state.\r\n\t */\r\n\tclearCompleted(task: string) {\r\n\t\tdelete this._completed[task];\r\n\t}\r\n\r\n\t// Locking management\r\n\tprivate _locked: Record<string, boolean> = {};\r\n\tprivate _unlockResolvers: Record<string, (() => void)[]> = {};\r\n\r\n\t/**\r\n\t * Locks a resource to prevent concurrent access.\r\n\t * @param which - The resource to lock, identified by a string.\r\n\t */\r\n\tlock(which: string): void {\r\n\t\tthis._locked[which] = true;\r\n\r\n\t\tif (!this._unlockResolvers[which]) {\r\n\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Unlocks a resource, allowing access.\r\n\t * @param which - The resource to unlock, identified by a string.\r\n\t */\r\n\tunlock(which: string): void {\r\n\t\tthis._locked[which] = false;\r\n\r\n\t\tif (this._unlockResolvers[which]) {\r\n\t\t\tthis._unlockResolvers[which].forEach((resolve) => resolve());\r\n\r\n\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a Promise that resolves when the specified resource is unlocked.\r\n\t * @param which - The resource to watch for unlocking, identified by a string.\r\n\t * @returns A Promise that resolves when the resource is unlocked.\r\n\t */\r\n\tonUnlock(which: string): Promise<void> {\r\n\t\tif (!this._locked[which]) {\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tif (!this._unlockResolvers[which]) {\r\n\t\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis._unlockResolvers[which].push(resolve);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a resource is locked.\r\n\t * @param which - The resource to check, identified by a string.\r\n\t * @returns True if the resource is locked, false otherwise.\r\n\t */\r\n\tlocked(which: string): boolean {\r\n\t\treturn !!this._locked[which];\r\n\t}\r\n\r\n\t// Linking management\r\n\tlinkCollections: string[] = [];\r\n\tlinkRealCollectionName: Record<string, string> = {};\r\n\tlinkIds: Record<string, Selectitem[]> = {};\r\n\r\n\taddLink(name: string, reset: () => Selectitem[], realName = ''): void {\r\n\t\tthis.linkCollections.push(name);\r\n\r\n\t\tthis.linkRealCollectionName[name] = realName || name;\r\n\r\n\t\tthis.onComplete(name.toLowerCase() + '_loaded').then(() => {\r\n\t\t\tthis.linkIds[name] = reset();\r\n\t\t});\r\n\r\n\t\tthis.on(name.toLowerCase() + '_changed').subscribe(() => {\r\n\t\t\tthis.linkIds[name].splice(0, this.linkIds[name].length);\r\n\r\n\t\t\tthis.linkIds[name].push(...reset());\r\n\t\t});\r\n\t}\r\n\r\n\t// Angular Signals //\r\n\t/**\r\n\t * Converts a plain object into a signal-wrapped object.\r\n\t * Optionally wraps specific fields of the object as individual signals,\r\n\t * and merges them into the returned signal for fine-grained reactivity.\r\n\t *\r\n\t * @template Document - The type of the object being wrapped.\r\n\t * @param {Document} document - The plain object to wrap into a signal.\r\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\r\n\t * Optional map where each key is a field name and the value is a function\r\n\t * to extract the initial value for that field. These fields will be wrapped\r\n\t * as separate signals and embedded in the returned object.\r\n\t *\r\n\t * @returns {Signal<Document>} A signal-wrapped object, possibly containing\r\n\t * nested field signals for more granular control.\r\n\t *\r\n\t * @example\r\n\t * const user = { _id: '1', name: 'Alice', score: 42 };\r\n\t * const sig = toSignal(user, { score: (u) => u.score });\r\n\t * console.log(sig().name); // 'Alice'\r\n\t * console.log(sig().score()); // 42 — field is now a signal\r\n\t */\r\n\ttoSignal<Document>(document: Document, signalFields: Record<string, (doc: Document) => unknown> = {}): Signal<Document> {\r\n\t\tif (Object.keys(signalFields).length) {\r\n\t\t\tconst fields: Record<string, Signal<unknown>> = {};\r\n\r\n\t\t\tfor (const key in signalFields) {\r\n\t\t\t\tfields[key] = signal(signalFields[key](document));\r\n\t\t\t}\r\n\r\n\t\t\treturn signal({ ...document, ...fields });\r\n\t\t} else {\r\n\t\t\treturn signal(document);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Converts an array of objects into an array of Angular signals.\r\n\t * Optionally wraps specific fields of each object as individual signals.\r\n\t *\r\n\t * @template Document - The type of each object in the array.\r\n\t * @param {Document[]} arr - Array of plain objects to convert into signals.\r\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\r\n\t * Optional map where keys are field names and values are functions that extract the initial value\r\n\t * from the object. These fields will be turned into separate signals.\r\n\t *\r\n\t * @returns {Signal<Document>[]} An array where each item is a signal-wrapped object,\r\n\t * optionally with individual fields also wrapped in signals.\r\n\t *\r\n\t * @example\r\n\t * toSignalsArray(users, {\r\n\t * name: (u) => u.name,\r\n\t * score: (u) => u.score,\r\n\t * });\r\n\t */\r\n\ttoSignalsArray<Document>(arr: Document[], signalFields: Record<string, (doc: Document) => unknown> = {}): Signal<Document>[] {\r\n\t\treturn arr.map((obj) => this.toSignal(obj, signalFields));\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a new object to the signals array.\r\n\t * Optionally wraps specific fields of the object as individual signals before wrapping the whole object.\r\n\t *\r\n\t * @template Document - The type of the object being added.\r\n\t * @param {Signal<Document>[]} signals - The signals array to append to.\r\n\t * @param {Document} item - The object to wrap and push as a signal.\r\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\r\n\t * Optional map of fields to be wrapped as signals within the object.\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tpushSignal<Document>(signals: Signal<Document>[], item: Document, signalFields: Record<string, (doc: Document) => unknown> = {}): void {\r\n\t\tsignals.push(this.toSignal(item, signalFields));\r\n\t}\r\n\r\n\t/**\r\n\t * Removes the first signal from the array whose object's field matches the provided value.\r\n\t * @template Document\r\n\t * @param {WritableSignal<Document>[]} signals - The signals array to modify.\r\n\t * @param {unknown} value - The value to match.\r\n\t * @param {string} [field='_id'] - The object field to match against.\r\n\t * @returns {void}\r\n\t */\r\n\tremoveSignalByField<Document extends Record<string, unknown>>(\r\n\t\tsignals: WritableSignal<Document>[],\r\n\t\tvalue: unknown,\r\n\t\tfield: string = '_id',\r\n\t): void {\r\n\t\tconst idx = signals.findIndex((sig) => sig()[field] === value);\r\n\r\n\t\tif (idx > -1) signals.splice(idx, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a generic trackBy function for *ngFor, tracking by the specified object field.\r\n\t * @template Document\r\n\t * @param {string} field - The object field to use for tracking (e.g., '_id').\r\n\t * @returns {(index: number, sig: Signal<Document>) => unknown} TrackBy function for Angular.\r\n\t */\r\n\ttrackBySignalField<Document extends Record<string, unknown>>(field: string) {\r\n\t\treturn (_: number, sig: Signal<Document>) => sig()[field];\r\n\t}\r\n\r\n\t/**\r\n\t * Finds the first signal in the array whose object's field matches the provided value.\r\n\t * @template Document\r\n\t * @param {Signal<Document>[]} signals - Array of signals to search.\r\n\t * @param {unknown} value - The value to match.\r\n\t * @param {string} [field='_id'] - The object field to match against.\r\n\t * @returns {Signal<Document> | undefined} The found signal or undefined if not found.\r\n\t */\r\n\tfindSignalByField<Document extends Record<string, unknown>>(\r\n\t\tsignals: Signal<Document>[],\r\n\t\tvalue: unknown,\r\n\t\tfield = '_id',\r\n\t): Signal<Document> | undefined {\r\n\t\treturn signals.find((sig) => sig()[field] === value) as Signal<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the first writable signal in the array whose object's field matches the provided value.\r\n\t * @template Document\r\n\t * @param {WritableSignal<Document>[]} signals - Array of writable signals to search.\r\n\t * @param {unknown} value - The value to match.\r\n\t * @param {(val: Document) => Document} updater - Function to produce the updated object.\r\n\t * @param {string} field - The object field to match against.\r\n\t * @returns {void}\r\n\t */\r\n\tupdateSignalByField<Document extends Record<string, unknown>>(\r\n\t\tsignals: WritableSignal<Document>[],\r\n\t\tvalue: unknown,\r\n\t\tupdater: (val: Document) => Document,\r\n\t\tfield: string,\r\n\t): void {\r\n\t\tconst sig = this.findSignalByField<Document>(signals, value, field) as WritableSignal<Document>;\r\n\r\n\t\tif (sig) sig.update(updater);\r\n\t}\r\n}\r\n","import { ChangeDetectorRef, inject, Signal, signal, WritableSignal } from '@angular/core';\r\nimport { firstValueFrom } from 'rxjs';\r\nimport { CrudDocument, CrudOptions, CrudServiceInterface, TableConfig } from '../interfaces/crud.interface';\r\nimport { AlertService } from '../services/alert.service';\r\nimport { CoreService } from '../services/core.service';\r\n\r\n/**\r\n * Interface representing the shape of a form service used by the CrudComponent.\r\n * The consuming app must provide a service that implements this structure.\r\n */\r\ninterface FormServiceInterface<FormInterface> {\r\n\tprepareForm: (form: FormInterface) => any;\r\n\tmodal: <T>(form: any, options?: any, doc?: T) => Promise<T>;\r\n\tmodalDocs: <T>(docs: T[]) => Promise<T[]>;\r\n\tmodalUnique: <T>(collection: string, key: string, doc: T) => void;\r\n\talert?: {\r\n\t\tquestion: (config: { text: string; buttons: { text: string; callback?: () => void }[] }) => void;\r\n\t};\r\n}\r\n\r\n/**\r\n * Abstract reusable base class for CRUD list views.\r\n * It encapsulates pagination, modals, and document handling logic.\r\n *\r\n * @template Service - A service implementing CrudServiceInterface for a specific document type\r\n * @template Document - The data model extending CrudDocument\r\n */\r\nexport abstract class CrudComponent<Service extends CrudServiceInterface<Document>, Document extends CrudDocument, FormInterface> {\r\n\t/** Service responsible for data fetching, creating, updating, deleting */\r\n\tprotected crudService: Service;\r\n\r\n\t/** The array of documents currently loaded and shown */\r\n\tprotected documents = signal<Signal<Document>[]>([]);\r\n\r\n\t/** The reactive form instance generated from the provided config */\r\n\tprotected form: any;\r\n\r\n\t/** Current pagination page */\r\n\tprotected page = 1;\r\n\r\n\t/** CoreService handles timing and copying helpers */\r\n\tprivate __core = inject(CoreService);\r\n\r\n\t/** AlertService handles alerts */\r\n\tprivate __alert = inject(AlertService);\r\n\r\n\t/** ChangeDetectorRef handles on push strategy */\r\n\tprivate __cdr = inject(ChangeDetectorRef);\r\n\r\n\t/** Internal reference to form service matching FormServiceInterface */\r\n\tprivate __form: FormServiceInterface<FormInterface>;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t *\r\n\t * @param formConfig - Object describing form title and its component structure\r\n\t * @param formService - Any service that conforms to FormServiceInterface (usually casted)\r\n\t * @param translateService - An object providing a translate() method for i18n\r\n\t * @param crudService - CRUD service implementing get/create/update/delete\r\n\t */\r\n\tconstructor(\r\n\t\tformConfig: unknown,\r\n\t\tprotected formService: unknown,\r\n\t\tprotected translateService: { translate: (key: string) => string },\r\n\t\tcrudService: Service,\r\n\t\tmodule = '',\r\n\t) {\r\n\t\tconst form = formConfig as FormInterface;\r\n\r\n\t\tthis.__form = formService as FormServiceInterface<FormInterface>;\r\n\r\n\t\tthis.form = this.__form.prepareForm(form);\r\n\r\n\t\tthis.crudService = crudService;\r\n\r\n\t\tthis._module = module;\r\n\t}\r\n\r\n\t/**\r\n\t * Loads documents for a given page.\r\n\t */\r\n\tprotected setDocuments(page = this.page): Promise<void> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tif (this.configType === 'server') {\r\n\t\t\t\tthis.page = page;\r\n\r\n\t\t\t\tthis.__core.afterWhile(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t() => {\r\n\t\t\t\t\t\tthis.crudService.get({ page }, this.getOptions()).subscribe((docs: Document[]) => {\r\n\t\t\t\t\t\t\tthis.documents.update(() => this.__core.toSignalsArray(docs));\r\n\r\n\t\t\t\t\t\t\tresolve();\r\n\r\n\t\t\t\t\t\t\tthis.__cdr.markForCheck();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\t\t\t\t\t250,\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tthis.documents.update(() => this.__core.toSignalsArray(this.crudService.getDocs()));\r\n\r\n\t\t\t\tthis.crudService.loaded.then(() => {\r\n\t\t\t\t\tresolve();\r\n\r\n\t\t\t\t\tthis.__cdr.markForCheck();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/** Fields considered when performing bulk updates. */\r\n\tprotected updatableFields = ['_id', 'name', 'description', 'data'];\r\n\r\n\t/**\r\n\t * Clears temporary metadata before document creation.\r\n\t */\r\n\tprotected preCreate(doc: Document): void {\r\n\t\tdelete doc.__created;\r\n\t}\r\n\r\n\t/**\r\n\t * Funciton which controls whether the create functionality is available.\r\n\t */\r\n\tprotected allowCreate(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Funciton which controls whether the update and delete functionality is available.\r\n\t */\r\n\tprotected allowMutate(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Funciton which controls whether the unique url functionality is available.\r\n\t */\r\n\tprotected allowUrl(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/** Determines whether manual sorting controls are available. */\r\n\tprotected allowSort(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Funciton which prepare get crud options.\r\n\t */\r\n\tprotected getOptions(): CrudOptions<Document> {\r\n\t\treturn {} as CrudOptions<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Handles bulk creation and updating of documents.\r\n\t * In creation mode, adds new documents.\r\n\t * In update mode, syncs changes and deletes removed entries.\r\n\t */\r\n\tprotected bulkManagement(create = true): () => void {\r\n\t\treturn (): void => {\r\n\t\t\tthis.__form\r\n\t\t\t\t.modalDocs<Document>(\r\n\t\t\t\t\tcreate\r\n\t\t\t\t\t\t? []\r\n\t\t\t\t\t\t: this.documents().map(\r\n\t\t\t\t\t\t\t\t(obj: any) => Object.fromEntries(this.updatableFields.map((key) => [key, obj()[key]])) as Document,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t)\r\n\t\t\t\t.then(async (docs: Document[]) => {\r\n\t\t\t\t\tif (create) {\r\n\t\t\t\t\t\tfor (const doc of docs) {\r\n\t\t\t\t\t\t\tthis.preCreate(doc);\r\n\r\n\t\t\t\t\t\t\tawait firstValueFrom(this.crudService.create(doc));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (const document of this.documents()) {\r\n\t\t\t\t\t\t\tif (!docs.find((d) => d._id === document()._id)) {\r\n\t\t\t\t\t\t\t\tawait firstValueFrom(this.crudService.delete(document()));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (const doc of docs) {\r\n\t\t\t\t\t\t\tconst local = this.documents().find((document) => document()._id === doc._id);\r\n\r\n\t\t\t\t\t\t\tif (local) {\r\n\t\t\t\t\t\t\t\t(local as WritableSignal<Document>).update((document) => {\r\n\t\t\t\t\t\t\t\t\tthis.__core.copy(doc, document);\r\n\r\n\t\t\t\t\t\t\t\t\treturn document;\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tawait firstValueFrom(this.crudService.update(local()));\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.preCreate(doc);\r\n\r\n\t\t\t\t\t\t\t\tawait firstValueFrom(this.crudService.create(doc));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.setDocuments();\r\n\t\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\t/** Opens a modal to create a new document. */\r\n\tprotected create() {\r\n\t\tthis.__form.modal<Document>(this.form, {\r\n\t\t\tlabel: 'Create',\r\n\t\t\tclick: async (created: unknown, close: () => void) => {\r\n\t\t\t\tclose();\r\n\t\t\t\tthis.preCreate(created as Document);\r\n\r\n\t\t\t\tawait firstValueFrom(this.crudService.create(created as Document));\r\n\r\n\t\t\t\tthis.setDocuments();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\t/** Displays a modal to edit an existing document. */\r\n\tprotected update(doc: Document) {\r\n\t\tthis.__form.modal<Document>(this.form, [], doc).then((updated: Document) => {\r\n\t\t\tthis.__core.copy(updated, doc);\r\n\r\n\t\t\tthis.crudService.update(doc);\r\n\r\n\t\t\tthis.__cdr.markForCheck();\r\n\t\t});\r\n\t}\r\n\r\n\t/** Requests confirmation before deleting the provided document. */\r\n\tprotected delete(doc: Document) {\r\n\t\tthis.__alert.question({\r\n\t\t\ttext: this.translateService.translate(`Common.Are you sure you want to delete this${this._module ? ' ' + this._module : ''}?`),\r\n\t\t\tbuttons: [\r\n\t\t\t\t{ text: this.translateService.translate('Common.No') },\r\n\t\t\t\t{\r\n\t\t\t\t\ttext: this.translateService.translate('Common.Yes'),\r\n\t\t\t\t\tcallback: async (): Promise<void> => {\r\n\t\t\t\t\t\tawait firstValueFrom(this.crudService.delete(doc));\r\n\r\n\t\t\t\t\t\tthis.setDocuments();\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t});\r\n\t}\r\n\r\n\t/** Opens a modal to edit the document's unique URL. */\r\n\tprotected mutateUrl(doc: Document) {\r\n\t\tthis.__form.modalUnique<Document>(this._module, 'url', doc);\r\n\t}\r\n\r\n\t/** Moves the given document one position up and updates ordering. */\r\n\tprotected moveUp(doc: Document) {\r\n\t\tconst index = this.documents().findIndex((document) => document()._id === doc._id);\r\n\r\n\t\tif (index) {\r\n\t\t\tthis.documents.update((documents) => {\r\n\t\t\t\tdocuments.splice(index, 1);\r\n\r\n\t\t\t\tdocuments.splice(index - 1, 0, this.__core.toSignal(doc));\r\n\r\n\t\t\t\treturn documents;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < this.documents().length; i++) {\r\n\t\t\tif (this.documents()[i]().order !== i) {\r\n\t\t\t\tthis.documents()[i]().order = i;\r\n\r\n\t\t\t\tthis.crudService.update(this.documents()[i]());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.__cdr.markForCheck();\r\n\t}\r\n\r\n\t/** Data source mode used for document retrieval. */\r\n\tprotected configType: 'server' | 'local' = 'server';\r\n\r\n\t/** Number of documents fetched per page when paginating. */\r\n\tprotected perPage = 20;\r\n\r\n\t/**\r\n\t * Configuration object used by the UI for rendering table and handling actions.\r\n\t */\r\n\tprotected getConfig(): TableConfig<Document> {\r\n\t\tconst config = {\r\n\t\t\tcreate: this.allowCreate()\r\n\t\t\t\t? (): void => {\r\n\t\t\t\t\t\tthis.create();\r\n\t\t\t\t\t}\r\n\t\t\t\t: null,\r\n\r\n\t\t\tupdate: this.allowMutate()\r\n\t\t\t\t? (doc: Document): void => {\r\n\t\t\t\t\t\tthis.update(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t: null,\r\n\r\n\t\t\tdelete: this.allowMutate()\r\n\t\t\t\t? (doc: Document): void => {\r\n\t\t\t\t\t\tthis.delete(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t: null,\r\n\r\n\t\t\tbuttons: [\r\n\t\t\t\tthis.allowUrl() && this._module\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\ticon: 'cloud_download',\r\n\t\t\t\t\t\t\tclick: (doc: Document): void => {\r\n\t\t\t\t\t\t\t\tthis.mutateUrl(doc);\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t: null,\r\n\t\t\t\tthis.allowSort()\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\ticon: 'arrow_upward',\r\n\t\t\t\t\t\t\tclick: (doc: Document): void => {\r\n\t\t\t\t\t\t\t\tthis.moveUp(doc);\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t: null,\r\n\t\t\t],\r\n\r\n\t\t\theaderButtons: [\r\n\t\t\t\tthis.allowCreate()\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\ticon: 'playlist_add',\r\n\t\t\t\t\t\t\tclick: this.bulkManagement(),\r\n\t\t\t\t\t\t\tclass: 'playlist',\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t: null,\r\n\t\t\t\tthis.allowMutate()\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\ticon: 'edit_note',\r\n\t\t\t\t\t\t\tclick: this.bulkManagement(false),\r\n\t\t\t\t\t\t\tclass: 'edit',\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t: null,\r\n\t\t\t],\r\n\t\t\tallDocs: true,\r\n\t\t};\r\n\r\n\t\treturn this.configType === 'server'\r\n\t\t\t? {\r\n\t\t\t\t\t...config,\r\n\t\t\t\t\tpaginate: this.setDocuments.bind(this),\r\n\t\t\t\t\tperPage: this.perPage,\r\n\t\t\t\t\tsetPerPage: this.crudService.setPerPage?.bind(this.crudService),\r\n\t\t\t\t\tallDocs: false,\r\n\t\t\t\t}\r\n\t\t\t: config;\r\n\t}\r\n\r\n\t/** Name of the collection or module used for contextual actions. */\r\n\tprivate _module = '';\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit, Signal } from '@angular/core';\r\n\r\n@Component({\r\n\ttemplateUrl: './loader.component.html',\r\n\tstyleUrls: ['./loader.component.scss'],\r\n\timports: [CommonModule],\r\n})\r\nexport class LoaderComponent implements OnInit {\r\n\tclose!: () => void;\r\n\r\n\ttext!: string;\r\n\r\n\tclass!: string;\r\n\r\n\tprogress!: boolean;\r\n\r\n\tprogressPercentage?: Signal<number>;\r\n\r\n\ttimeout!: number;\r\n\r\n\tclosable!: boolean;\r\n\r\n\tngOnInit(): void {\r\n\t\tif (this.timeout) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.close();\r\n\t\t\t}, this.timeout);\r\n\t\t}\r\n\t}\r\n}\r\n","<div class=\"wacom-loader\" [ngClass]=\"class\">\r\n\t@if (progressPercentage) {\r\n\t\t<div class=\"wacom-loader__progress\">\r\n\t\t\t<span class=\"wacom-loader__progress-bar\" [style.width.%]=\"progressPercentage()\" style=\"animation: none\"></span>\r\n\t\t</div>\r\n\t} @else if (progress) {\r\n\t\t<div class=\"wacom-loader__progress\">\r\n\t\t\t<span\r\n\t\t\t\tclass=\"wacom-loader__progress-bar\"\r\n\t\t\t\t[ngStyle]=\"{\r\n\t\t\t\t\t'animation-duration': (timeout + 350) / 1000 + 's',\r\n\t\t\t\t}\"\r\n\t\t\t></span>\r\n\t\t</div>\r\n\t}\r\n\t@if (closable) {\r\n\t\t<span class=\"wacom-loader__close\" (click)=\"close()\">×</span>\r\n\t}\r\n\t@if (text) {\r\n\t\t<span class=\"wacom-loader__text\">\r\n\t\t\t{{ text }}\r\n\t\t</span>\r\n\t}\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-modal',\r\n\ttemplateUrl: './modal.component.html',\r\n\tstyleUrls: ['./modal.component.scss'],\r\n\tstandalone: true,\r\n\timports: [CommonModule],\r\n})\r\nexport class ModalComponent implements OnInit {\r\n\tclosable: boolean = true;\r\n\tclose: any;\r\n\tonOpen: any;\r\n\ttimestart: any;\r\n\ttimeout: any;\r\n\tallowClose = true;\r\n\tonClickOutside: any;\r\n\tngOnInit() {\r\n\t\tif (typeof this.onClickOutside !== 'function') {\r\n\t\t\tthis.onClickOutside = this.close;\r\n\t\t\t// this.onClickOutside = () => {\r\n\t\t\t// \tif (this.allowClose) {\r\n\t\t\t// \t\tthis.close();\r\n\t\t\t// \t}\r\n\r\n\t\t\t// \tthis.allowClose = true;\r\n\t\t\t// };\r\n\t\t}\r\n\r\n\t\tif (typeof this.onOpen == 'function') this.onOpen();\r\n\r\n\t\twindow.addEventListener('popstate', this.popStateListener.bind(this));\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\twindow.removeEventListener('popstate', this.popStateListener.bind(this));\r\n\t}\r\n\r\n\tpopStateListener(e: Event) {\r\n\t\tthis.close();\r\n\t}\r\n}\r\n","<div class=\"wacom-modal\" (click)=\"onClickOutside()\">\r\n\t<div class=\"wacom-modal__content\" (click)=\"$event.stopPropagation()\">\r\n\t\t<div><!-- Content Will Drop Here --></div>\r\n\t\t<span class=\"wacom-modal__close\" (click)=\"close()\" *ngIf=\"closable\">×</span>\r\n\t</div>\r\n</div>\r\n","import { ChangeDetectorRef, DestroyRef, Directive, ElementRef, inject, output } from '@angular/core';\r\n\r\n/**\r\n * Stand-alone “click outside” directive (zoneless-safe).\r\n *\r\n * Usage:\r\n * <div (clickOutside)=\"close()\">…</div>\r\n */\r\n@Directive({\r\n\tselector: '[clickOutside]',\r\n})\r\nexport class ClickOutsideDirective {\r\n\treadonly clickOutside = output<MouseEvent>();\r\n\r\n\tconstructor() {\r\n\t\tdocument.addEventListener('pointerdown', this.handler, true);\r\n\r\n\t\t// cleanup\r\n\t\tthis._dref.onDestroy(() => document.removeEventListener('pointerdown', this.handler, true));\r\n\t}\r\n\r\n\tprivate _host = inject(ElementRef<HTMLElement>);\r\n\r\n\tprivate _cdr = inject(ChangeDetectorRef);\r\n\r\n\tprivate _dref = inject(DestroyRef);\r\n\r\n\tprivate handler = (e: MouseEvent): void => {\r\n\t\tif (!this._host.nativeElement.contains(e.target as Node)) {\r\n\t\t\tthis.clickOutside.emit(e); // notify parent\r\n\t\t\tthis._cdr.markForCheck(); // trigger CD for OnPush comps\r\n\t\t}\r\n\t};\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'arr',\r\n})\r\nexport class ArrPipe implements PipeTransform {\r\n\ttransform(data: any, type?: any, refresh?: any): any {\r\n\t\tif (!data) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tif (typeof data == 'string') return data.split(type || ' ');\r\n\r\n\t\tif (Array.isArray(data)) {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tif (typeof data != 'object') {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tlet arr = [];\r\n\r\n\t\tfor (let each in data) {\r\n\t\t\tif (!data[each]) continue;\r\n\r\n\t\t\tif (type == 'prop') {\r\n\t\t\t\tarr.push(each);\r\n\t\t\t} else if (type == 'value') {\r\n\t\t\t\tarr.push(data[each]);\r\n\t\t\t} else {\r\n\t\t\t\tarr.push({\r\n\t\t\t\t\tprop: each,\r\n\t\t\t\t\tvalue: data[each],\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'mongodate',\r\n})\r\nexport class MongodatePipe implements PipeTransform {\r\n\ttransform(_id: any) {\r\n\t\tif (!_id) return new Date();\r\n\r\n\t\tlet timestamp = _id.toString().substring(0, 8);\r\n\r\n\t\treturn new Date(parseInt(timestamp, 16) * 1000);\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'number',\r\n})\r\nexport class NumberPipe implements PipeTransform {\r\n\ttransform(value: unknown): number {\r\n\t\tconst result = Number(value); // Convert value to a number\r\n\r\n\t\treturn isNaN(result) ? 0 : result; // Return 0 if conversion fails\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'page',\r\n\tpure: false,\r\n})\r\nexport class PaginationPipe implements PipeTransform {\r\n\ttransform(arr: any, config: any, sort: any, search = ''): any {\r\n\t\tif (!Array.isArray(arr)) return [];\r\n\r\n\t\tarr = arr.slice();\r\n\r\n\t\tfor (let i = 0; i < arr.length; i++) {\r\n\t\t\tarr[i].num = i + 1;\r\n\t\t}\r\n\r\n\t\tif (sort.direction) {\r\n\t\t\tarr.sort((a: any, b: any) => {\r\n\t\t\t\tif (a[sort.title] < b[sort.title]) {\r\n\t\t\t\t\treturn sort.direction == 'desc' ? 1 : -1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (a[sort.title] > b[sort.title]) {\r\n\t\t\t\t\treturn sort.direction == 'desc' ? -1 : 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn arr.slice((config.page - 1) * config.perPage, config.page * config.perPage);\r\n\t}\r\n}\r\n","import { inject, Pipe } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n@Pipe({\r\n\tname: 'safe',\r\n})\r\nexport class SafePipe {\r\n\ttransform(html: any) {\r\n\t\treturn this._sanitizer.bypassSecurityTrustResourceUrl(html);\r\n\t}\r\n\r\n\tprivate _sanitizer = inject(DomSanitizer);\r\n}\r\n","import { Pipe, PipeTransform, Signal, isSignal } from '@angular/core';\r\n\r\ntype Query = string | string[] | Record<string, unknown> | Signal<string | string[] | Record<string, unknown> | undefined>;\r\n\r\ntype Field = string | string[] | number | Signal<string | string[] | number | undefined>;\r\n\r\n@Pipe({ name: 'search', pure: true })\r\nexport class SearchPipe implements PipeTransform {\r\n\ttransform<T>(items: T[] | Record<string, T>, query?: Query, fields?: Field, limit?: number, ignore = false, _reload?: unknown): T[] {\r\n\t\t/* unwrap signals */\r\n\t\tconst q = isSignal(query) ? query() : query;\r\n\r\n\t\tlet f = isSignal(fields) ? fields() : fields;\r\n\r\n\t\t/* allow “fields” to be a number (=limit) */\r\n\t\tif (typeof f === 'number') {\r\n\t\t\tlimit = f;\r\n\r\n\t\t\tf = undefined;\r\n\t\t}\r\n\r\n\t\tconst docs = Array.isArray(items) ? items : Object.values(items);\r\n\r\n\t\tif (ignore || !q) return limit ? docs.slice(0, limit) : docs;\r\n\r\n\t\t/* normalise fields */\r\n\t\tconst paths: string[] = !f ? ['name'] : Array.isArray(f) ? f : f.trim().split(/\\s+/);\r\n\r\n\t\t/* normalise query */\r\n\t\tconst needles: string[] = Array.isArray(q)\r\n\t\t\t? q.map((s) => s.toLowerCase())\r\n\t\t\t: typeof q === 'object'\r\n\t\t\t\t? Object.keys(q)\r\n\t\t\t\t\t\t.filter((k) => (q as any)[k])\r\n\t\t\t\t\t\t.map((k) => k.toLowerCase())\r\n\t\t\t\t: [q.toLowerCase()];\r\n\r\n\t\tconst txtMatches = (val: any) => {\r\n\t\t\tif (val == null) return false;\r\n\r\n\t\t\tconst hay = val.toString().toLowerCase();\r\n\r\n\t\t\treturn needles.some((n) => hay.includes(n) || n.includes(hay));\r\n\t\t};\r\n\r\n\t\tconst walk = (obj: any, parts: string[]): boolean => {\r\n\t\t\tif (!obj) return false;\r\n\r\n\t\t\tconst [head, ...rest] = parts;\r\n\r\n\t\t\tconst next = obj[head];\r\n\r\n\t\t\tif (Array.isArray(next)) return next.some((v) => (rest.length ? walk(v, rest) : txtMatches(v)));\r\n\r\n\t\t\treturn rest.length ? walk(next, rest) : txtMatches(next);\r\n\t\t};\r\n\r\n\t\tconst out: T[] = [];\r\n\r\n\t\tconst seen = new Set<number | string>();\r\n\r\n\t\tconst check = (doc: T, key: number | string) => {\r\n\t\t\tfor (const p of paths) {\r\n\t\t\t\tif (walk(doc, p.split('.'))) {\r\n\t\t\t\t\tif (!seen.has(key)) {\r\n\t\t\t\t\t\tout.push(doc);\r\n\r\n\t\t\t\t\t\tseen.add(key);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tArray.isArray(items) ? docs.forEach((d, i) => check(d, i)) : Object.entries(items).forEach(([k, v]) => check(v, k));\r\n\r\n\t\treturn limit ? out.slice(0, limit) : out;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'splice',\r\n})\r\nexport class SplicePipe implements PipeTransform {\r\n\ttransform(from: any, which: any, refresh?: number): any {\r\n\t\tif (Array.isArray(from)) from = { arr: from, prop: '_id' };\r\n\r\n\t\tlet arr = (which.keep && []) || from.arr.slice();\r\n\r\n\t\tif (Array.isArray(which)) which = { arr: which, prop: '_id' };\r\n\r\n\t\tfor (let i = from.arr.length - 1; i >= 0; i--) {\r\n\t\t\tfor (let j = 0; j < which.arr.length; j++) {\r\n\t\t\t\tif (from.prop && which.prop) {\r\n\t\t\t\t\tif (from.arr[i][from.prop] == which.arr[j][which.prop]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (from.prop) {\r\n\t\t\t\t\tif (from.arr[i][from.prop] == which.arr[j]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (which.prop) {\r\n\t\t\t\t\tif (from.arr[i] == which.arr[j][which.prop]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (from.arr[i] == which.arr[j]) {\r\n\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'split',\r\n})\r\nexport class SplitPipe implements PipeTransform {\r\n\ttransform(value: string, index = 0, devider = ':'): unknown {\r\n\t\tconst arr = value.split(devider);\r\n\r\n\t\treturn arr.length > index ? arr[index] : '';\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class BaseService {\r\n\tnow = new Date().getTime();\r\n\r\n\trefreshNow(): void {\r\n\t\tthis.now = new Date().getTime();\r\n\t}\r\n}\r\n","/**\r\n * Configuration values used by the HTTP service when\r\n * issuing requests to a backend API.\r\n */\r\nexport interface HttpConfig {\r\n\t/** Map of default headers appended to each request. */\r\n\theaders?: Record<string, unknown>;\r\n\t/** Base URL for all HTTP requests. */\r\n\turl?: string;\r\n}\r\n\r\nexport const DEFAULT_HTTP_CONFIG: HttpConfig = {\r\n\theaders: {},\r\n\turl: '',\r\n};\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config.interface';\r\nimport { StoreConfig } from '../interfaces/store.interface';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class StoreService {\r\n\tconstructor(@Inject(CONFIG_TOKEN) @Optional() config: Config) {\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_CONFIG,\r\n\t\t\t...(config?.store || {}),\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the prefix for storage keys.\r\n\t *\r\n\t * @param prefix - The prefix to set.\r\n\t */\r\n\tsetPrefix(prefix: string): void {\r\n\t\tthis._prefix = prefix;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a value in storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync set(\r\n\t\tkey: string,\r\n\t\tvalue: string,\r\n\t\tcallback: () => void = () => {},\r\n\t\terrCallback: (err: unknown) => void = () => {},\r\n\t): Promise<boolean> {\r\n\t\tkey = this._applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this._config.set) {\r\n\t\t\t\tawait this._config.set(key, value, callback, errCallback);\r\n\t\t\t} else {\r\n\t\t\t\tlocalStorage.setItem(key, value);\r\n\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\terrCallback(err);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a value from storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns A promise that resolves to the retrieved value or `null` if the key is missing.\r\n\t */\r\n\tasync get(\r\n\t\tkey: string,\r\n\t\tcallback?: (value: string | null) => void,\r\n\t\terrCallback: (err: unknown) => void = () => {},\r\n\t): Promise<string | null> {\r\n\t\tkey = this._applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this._config.get) {\r\n\t\t\t\tconst value = await this._config.get(\r\n\t\t\t\t\tkey,\r\n\t\t\t\t\t(val: string) => {\r\n\t\t\t\t\t\tcallback?.(val ?? null);\r\n\t\t\t\t\t},\r\n\t\t\t\t\terrCallback,\r\n\t\t\t\t);\r\n\r\n\t\t\t\treturn value ?? null;\r\n\t\t\t} else {\r\n\t\t\t\tconst value = localStorage.getItem(key);\r\n\r\n\t\t\t\tcallback?.(value ?? null);\r\n\r\n\t\t\t\treturn value ?? null;\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\terrCallback(err);\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a JSON value in storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync setJson<T>(key: string, value: T): Promise<boolean> {\r\n\t\treturn await this.set(key, JSON.stringify(value));\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a JSON value from storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns A promise that resolves to the retrieved value.\r\n\t */\r\n\tasync getJson<T = any>(key: string): Promise<T | null> {\r\n\t\tconst value = await this.get(key);\r\n\r\n\t\tif (value === null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\treturn JSON.parse(value);\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a value from storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync remove(key: string, callback: () => void = () => {}, errCallback: (err: unknown) => void = () => {}): Promise<boolean> {\r\n\t\tkey = this._applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this._config.remove) {\r\n\t\t\t\treturn await this._config.remove(key, callback, errCallback);\r\n\t\t\t} else {\r\n\t\t\t\tlocalStorage.removeItem(key);\r\n\r\n\t\t\t\tcallback();\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\terrCallback(err);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Clears all values from storage.\r\n\t *\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync clear(callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean> {\r\n\t\ttry {\r\n\t\t\tif (this._config.clear) {\r\n\t\t\t\tawait this._config.clear();\r\n\t\t\t} else {\r\n\t\t\t\tlocalStorage.clear();\r\n\t\t\t}\r\n\r\n\t\t\tcallback?.();\r\n\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\terrCallback?.(err);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _prefix = '';\r\n\r\n\tprivate _config: StoreConfig;\r\n\r\n\t/**\r\n\t * Applies the configured prefix to a storage key.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns The prefixed storage key.\r\n\t */\r\n\tprivate _applyPrefix(key: string): string {\r\n\t\tif (this._config.prefix) {\r\n\t\t\tkey = this._config.prefix + key;\r\n\t\t}\r\n\r\n\t\tif (this._prefix) {\r\n\t\t\tkey = this._prefix + key;\r\n\t\t}\r\n\r\n\t\treturn key;\r\n\t}\r\n}\r\n","import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';\r\nimport { Inject, Injectable, Optional } from '@angular/core';\r\nimport { EMPTY, Observable, ReplaySubject } from 'rxjs';\r\nimport { catchError, first } from 'rxjs/operators';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config.interface';\r\nimport { DEFAULT_HTTP_CONFIG, HttpConfig } from '../interfaces/http.interface';\r\nimport { StoreService } from './store.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class HttpService {\r\n\t// An array of error handling callbacks\r\n\terrors: ((err: HttpErrorResponse, retry?: () => void) => {})[] = [];\r\n\r\n\t// Base URL for HTTP requests\r\n\turl = '';\r\n\r\n\t// Flag to lock the service to prevent multiple requests\r\n\tlocked = false;\r\n\r\n\t// Array to store setTimeout IDs for managing request locks\r\n\tawaitLocked: any[] = [];\r\n\r\n\t// Configuration object for HTTP settings\r\n\tprivate _config: HttpConfig;\r\n\r\n\t// Object to store HTTP headers\r\n\tprivate _headers: any = {};\r\n\r\n\t// Instance of HttpHeaders with current headers\r\n\tprivate _http_headers = new HttpHeaders(this._headers);\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() config: Config,\r\n\t\tprivate store: StoreService,\r\n\t\tprivate http: HttpClient,\r\n\t) {\r\n\t\t// Initialize HTTP configuration and headers from injected config\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_HTTP_CONFIG,\r\n\t\t\t...config.http,\r\n\t\t};\r\n\r\n\t\tif (typeof this._config.headers === 'object') {\r\n\t\t\tfor (const header in this._config.headers) {\r\n\t\t\t\tthis._headers[header] = this._config.headers[header];\r\n\t\t\t}\r\n\r\n\t\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t\t}\r\n\r\n\t\t// Retrieve and set the base URL and headers from the store\r\n\t\tthis.store.get('http_url', (url) => {\r\n\t\t\tthis.url = url || this._config.url || '';\r\n\t\t});\r\n\r\n\t\tthis.store.getJson<Record<string, string>>('http_headers').then((headers) => {\r\n\t\t\theaders ||= {};\r\n\r\n\t\t\tfor (const header in headers) {\r\n\t\t\t\tthis._headers[header] = headers[header];\r\n\t\t\t}\r\n\r\n\t\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t\t});\r\n\t}\r\n\r\n\t// Set a new base URL and save it in the store\r\n\tsetUrl(url: string) {\r\n\t\tthis.url = url;\r\n\r\n\t\tthis.store.set('http_url', url);\r\n\t}\r\n\r\n\t// Remove the base URL and revert to the default or stored one\r\n\tremoveUrl() {\r\n\t\tthis.url = this._config.url || '';\r\n\r\n\t\tthis.store.remove('http_url');\r\n\t}\r\n\r\n\t// Set a new HTTP header and update the stored headers\r\n\tset(key: any, value: any) {\r\n\t\tthis._headers[key] = value;\r\n\r\n\t\tthis.store.setJson<Record<string, string>>('http_headers', this._headers);\r\n\r\n\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t}\r\n\r\n\t// Get the value of a specific HTTP header\r\n\theader(key: any) {\r\n\t\treturn this._headers[key];\r\n\t}\r\n\r\n\t// Remove a specific HTTP header and update the stored headers\r\n\tremove(key: any) {\r\n\t\tdelete this._headers[key];\r\n\r\n\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\r\n\t\tthis.store.setJson<Record<string, string>>('http_headers', this._headers);\r\n\t}\r\n\r\n\t// Internal method to make HTTP requests based on the method type\r\n\tprivate _httpMethod(method: string, _url: string, doc: unknown, headers: any): Observable<any> {\r\n\t\tif (method === 'post') {\r\n\t\t\treturn this.http.post<any>(_url, doc, headers);\r\n\t\t} else if (method === 'put') {\r\n\t\t\treturn this.http.put<any>(_url, doc, headers);\r\n\t\t} else if (method === 'patch') {\r\n\t\t\treturn this.http.patch<any>(_url, doc, headers);\r\n\t\t} else if (method === 'delete') {\r\n\t\t\treturn this.http.delete<any>(_url, headers);\r\n\t\t} else {\r\n\t\t\treturn this.http.get<any>(_url, headers);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Internal method to handle HTTP requests for various methods (POST, PUT, PATCH, DELETE, GET).\r\n\t *\r\n\t * Features:\r\n\t * - **Request Locking**: Manages request locking to prevent simultaneous requests.\r\n\t * - **Acceptance Check**: Validates the server response against a user-defined `acceptance` function.\r\n\t * If the check fails, the response is rejected with an error.\r\n\t * - **Replace Logic**: Allows modification of specific parts of the response object, determined by a user-defined `replace` function.\r\n\t * Can handle both objects and arrays within the response.\r\n\t * - **Field Filtering**: Supports extracting specific fields from response objects or arrays.\r\n\t * - **Legacy Support**: Compatible with callback-based usage alongside Observables.\r\n\t * - **ReplaySubject**: Ensures that the response can be shared across multiple subscribers.\r\n\t *\r\n\t * @param url - The endpoint to send the HTTP request to (relative to the base URL).\r\n\t * @param doc - The request payload for methods like POST, PUT, and PATCH.\r\n\t * @param callback - A legacy callback function to handle the response.\r\n\t * @param opts - Additional options:\r\n\t * - `err`: Error handling callback.\r\n\t * - `acceptance`: Function to validate the server response. Should return `true` for valid responses.\r\n\t * - `replace`: Function to modify specific parts of the response data.\r\n\t * - `fields`: Array of fields to extract from the response object(s).\r\n\t * - `data`: Path in the response where the data resides for `replace` and `fields` operations.\r\n\t * - `skipLock`: If `true`, bypasses request locking.\r\n\t * - `url`: Overrides the base URL for this request.\r\n\t * @param method - The HTTP method (e.g., 'post', 'put', 'patch', 'delete', 'get').\r\n\t * @returns An Observable that emits the processed HTTP response or an error.\r\n\t */\r\n\tprivate _post(url: string, doc: unknown, callback = (resp: unknown) => {}, opts: any = {}, method = 'post'): Observable<any> {\r\n\t\tif (typeof opts === 'function') {\r\n\t\t\topts = { err: opts };\r\n\t\t}\r\n\r\n\t\tif (!opts.err) {\r\n\t\t\topts.err = (err: HttpErrorResponse) => {};\r\n\t\t}\r\n\r\n\t\t// Handle request locking to avoid multiple simultaneous requests\r\n\t\tif (this.locked && !opts.skipLock) {\r\n\t\t\treturn new Observable((observer) => {\r\n\t\t\t\tconst wait = setTimeout(() => {\r\n\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(observer);\r\n\t\t\t\t}, 100);\r\n\t\t\t\tthis.awaitLocked.push(wait);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst _url = (opts.url || this.url) + url;\r\n\r\n\t\tthis.prepare_handle(_url, doc);\r\n\r\n\t\t// Using ReplaySubject to allow multiple subscriptions without re-triggering the HTTP request\r\n\t\tconst responseSubject = new ReplaySubject<any>(1);\r\n\r\n\t\tthis._httpMethod(method, _url, doc, { headers: this._http_headers })\r\n\t\t\t.pipe(\r\n\t\t\t\tfirst(),\r\n\t\t\t\tcatchError((error: HttpErrorResponse) => {\r\n\t\t\t\t\tthis.handleError(opts.err, () => {\r\n\t\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(responseSubject);\r\n\t\t\t\t\t})(error);\r\n\r\n\t\t\t\t\tresponseSubject.error(error);\r\n\r\n\t\t\t\t\treturn EMPTY;\r\n\t\t\t\t}),\r\n\t\t\t)\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\t\tif (opts.acceptance && typeof opts.acceptance === 'function') {\r\n\t\t\t\t\t\tif (!opts.acceptance(resp)) {\r\n\t\t\t\t\t\t\tconst error = new HttpErrorResponse({\r\n\t\t\t\t\t\t\t\terror: 'Acceptance failed',\r\n\t\t\t\t\t\t\t\tstatus: 400,\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tthis.handleError(opts.err, () => {})(error);\r\n\r\n\t\t\t\t\t\t\tresponseSubject.error(error);\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opts.replace && typeof opts.replace === 'function') {\r\n\t\t\t\t\t\tif (Array.isArray(this._getObjectToReplace(resp, opts.data))) {\r\n\t\t\t\t\t\t\t(this._getObjectToReplace(resp, opts.data) as Array<unknown>).map((item: unknown) => opts.replace(item));\r\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\r\n\t\t\t\t\t\t\topts.replace(this._getObjectToReplace(resp, opts.data));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (Array.isArray(opts.fields)) {\r\n\t\t\t\t\t\tif (Array.isArray(this._getObjectToReplace(resp, opts.data))) {\r\n\t\t\t\t\t\t\t(this._getObjectToReplace(resp, opts.data) as Array<unknown>).map((item: unknown) => {\r\n\t\t\t\t\t\t\t\treturn this._newDoc(item, opts.fields);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\r\n\t\t\t\t\t\t\tconst newDoc = this._newDoc(this._getObjectToReplace(resp, opts.data), opts.fields);\r\n\r\n\t\t\t\t\t\t\tif (opts.data) {\r\n\t\t\t\t\t\t\t\tthis._setObjectToReplace(resp, opts.data, newDoc);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tresp = newDoc;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.response_handle(_url, resp, () => callback(resp));\r\n\r\n\t\t\t\t\tresponseSubject.next(resp);\r\n\r\n\t\t\t\t\tresponseSubject.complete();\r\n\t\t\t\t},\r\n\t\t\t\terror: (err) => responseSubject.error(err),\r\n\t\t\t\tcomplete: () => responseSubject.complete(),\r\n\t\t\t});\r\n\r\n\t\treturn responseSubject.asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a POST request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tpost(url: string, doc: any, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a PUT request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tput(url: string, doc: any, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts, 'put');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a PATCH request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tpatch(url: string, doc: any, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts, 'patch');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a DELETE request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tdelete(url: string, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, null, callback, opts, 'delete');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a GET request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tget(url: string, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, null, callback, opts, 'get');\r\n\t}\r\n\r\n\t// Clear all pending request locks\r\n\tclearLocked() {\r\n\t\tfor (const awaitLocked of this.awaitLocked) {\r\n\t\t\tclearTimeout(awaitLocked);\r\n\t\t}\r\n\t\tthis.awaitLocked = [];\r\n\t}\r\n\r\n\t// Lock the service to prevent multiple simultaneous requests\r\n\tlock() {\r\n\t\tthis.locked = true;\r\n\t}\r\n\r\n\t// Unlock the service to allow new requests\r\n\tunlock() {\r\n\t\tthis.locked = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Handles HTTP errors.\r\n\t * - Calls provided error callback and retries the request if needed.\r\n\t */\r\n\tprivate handleError(callback: any, retry: () => void) {\r\n\t\treturn (error: HttpErrorResponse): Promise<void> => {\r\n\t\t\treturn new Promise((resolve) => {\r\n\t\t\t\tthis.err_handle(error, callback, retry);\r\n\t\t\t\tresolve();\r\n\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Internal method to trigger error handling callbacks.\r\n\t */\r\n\tprivate err_handle(err: HttpErrorResponse, next: (err: HttpErrorResponse) => void, retry: () => void) {\r\n\t\tif (typeof next === 'function') {\r\n\t\t\tnext(err);\r\n\t\t}\r\n\r\n\t\tfor (const callback of this.errors) {\r\n\t\t\tif (typeof callback === 'function') {\r\n\t\t\t\tcallback(err, retry);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Placeholder method for handling request preparation (can be customized)\r\n\tprivate prepare_handle(url: string, body: unknown) {}\r\n\r\n\t// Placeholder method for handling the response (can be customized)\r\n\tprivate response_handle(url: string, body: unknown, next: () => void) {\r\n\t\tif (typeof next === 'function') {\r\n\t\t\tnext();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves a nested object or property from the response based on a dot-separated path.\r\n\t *\r\n\t * @param resp - The response object to retrieve data from.\r\n\t * @param base - A dot-separated string indicating the path to the desired property within the response.\r\n\t * - Example: `'data.items'` will navigate through `resp.data.items`.\r\n\t * - If empty, the entire response is returned.\r\n\t * @returns The object or property located at the specified path within the response.\r\n\t */\r\n\tprivate _getObjectToReplace(resp: unknown, base = ''): unknown {\r\n\t\tif (base.includes('.')) {\r\n\t\t\tconst newBase = base.split('');\r\n\r\n\t\t\tconst currentBase: string = newBase.pop() || '';\r\n\r\n\t\t\treturn this._getObjectToReplace((resp as Record<string, unknown>)[currentBase] || {}, newBase.join('.'));\r\n\t\t} else if (base) {\r\n\t\t\treturn (resp as Record<string, unknown>)[base];\r\n\t\t} else {\r\n\t\t\treturn resp;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets or replaces a nested object or property in the response based on a dot-separated path.\r\n\t *\r\n\t * @param resp - The response object to modify.\r\n\t * @param base - A dot-separated string indicating the path to the property to replace.\r\n\t * - Example: `'data.items'` will navigate through `resp.data.items`.\r\n\t * @param doc - The new data or object to set at the specified path.\r\n\t * @returns `void`.\r\n\t */\r\n\tprivate _setObjectToReplace(resp: unknown, base = '', doc: unknown): void {\r\n\t\twhile (base.includes('.')) {\r\n\t\t\tconst newBase = base.split('');\r\n\r\n\t\t\tconst currentBase: string = newBase.pop() || '';\r\n\r\n\t\t\tresp = (resp as Record<string, unknown>)[currentBase] || {};\r\n\r\n\t\t\tbase = newBase.join('.');\r\n\t\t}\r\n\r\n\t\t(resp as Record<string, unknown>)[base] = doc;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new object containing only specified fields from the input item.\r\n\t *\r\n\t * @param item - The input object to extract fields from.\r\n\t * @param fields - An array of field names to include in the new object.\r\n\t * - Example: `['id', 'name']` will create a new object with only the `id` and `name` properties from `item`.\r\n\t * @returns A new object containing only the specified fields.\r\n\t */\r\n\tprivate _newDoc(item: unknown, fields: string[]): unknown {\r\n\t\tconst newDoc: Record<string, unknown> = {};\r\n\r\n\t\tfor (const field of fields) {\r\n\t\t\tnewDoc[field] = (item as Record<string, unknown>)[field];\r\n\t\t}\r\n\r\n\t\treturn newDoc;\r\n\t}\r\n}\r\n","import { inject } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { CrudDocument, CrudOptions } from '../interfaces/crud.interface';\r\nimport { AlertService } from './alert.service';\r\nimport { BaseService } from './base.service';\r\nimport { CoreService } from './core.service';\r\nimport { HttpService } from './http.service';\r\nimport { StoreService } from './store.service';\r\n\r\ninterface CrudConfig<Document> {\r\n\tsignalFields?: Record<string, (doc: Document) => unknown>;\r\n\tname: string;\r\n\t_id?: string;\r\n\treplace?: (doc: Document) => void;\r\n\tunauthorized?: boolean;\r\n\tappId?: string;\r\n}\r\n\r\ninterface GetConfig {\r\n\tpage?: number;\r\n\tperPage?: number;\r\n\tquery?: string;\r\n}\r\n\r\n/**\r\n * Abstract class representing a CRUD (Create, Read, Update, Delete) service.\r\n *\r\n * This class provides methods for managing documents, interacting with an API,\r\n * and storing/retrieving data from local storage. It is designed to be extended\r\n * for specific document types.\r\n *\r\n * @template Document - The type of the document the service handles.\r\n */\r\nexport abstract class CrudService<Document extends CrudDocument> extends BaseService {\r\n\t/**\r\n\t * URL for the API.\r\n\t */\r\n\tprivate _url = '/api/';\r\n\r\n\t/**\r\n\t * Array of documents managed by this service.\r\n\t */\r\n\tprivate _docs: Document[] = [];\r\n\r\n\t/**\r\n\t * Number of documents per page.\r\n\t */\r\n\tprivate _perPage = 20;\r\n\r\n\t/**\r\n\t * Callbacks for filtering documents.\r\n\t */\r\n\tprivate _filteredDocumentsCallbacks: (() => void)[] = [];\r\n\r\n\t/**\r\n\t * Constructs a CRUD service instance.\r\n\t *\r\n\t * @param _config - Configuration options for the CRUD service.\r\n\t * @param __http - Service to handle HTTP requests.\r\n\t * @param __store - Service to manage local storage of documents.\r\n\t * @param __alert - Service to display alerts.\r\n\t * @param __core - Core service for utility functions.\r\n\t */\r\n\tprotected __http = inject(HttpService);\r\n\r\n\tprotected __store = inject(StoreService);\r\n\r\n\tprotected __alert = inject(AlertService);\r\n\r\n\tprotected __core = inject(CoreService);\r\n\r\n\tloaded: Promise<unknown>;\r\n\r\n\tconstructor(private _config: CrudConfig<Document>) {\r\n\t\tsuper();\r\n\r\n\t\tthis._config.signalFields = this._config.signalFields || {};\r\n\r\n\t\tthis._url += this._config.name;\r\n\r\n\t\tthis.loaded = this.__core.onComplete(this._config.name + '_loaded');\r\n\r\n\t\tif (this._config.unauthorized) {\r\n\t\t\tthis.restoreDocs();\r\n\t\t} else if (localStorage.getItem('waw_user')) {\r\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\r\n\r\n\t\t\tif (user._id === localStorage.getItem(this._config.name + 'waw_user_id')) {\r\n\t\t\t\tthis.restoreDocs();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.__core.on('wipe').subscribe((): void => {\r\n\t\t\tthis.clearDocs();\r\n\r\n\t\t\tthis._filterDocuments();\r\n\t\t});\r\n\t}\r\n\r\n\tasync restoreDocs() {\r\n\t\tconst docs = await this.__store.getJson<Document[]>('docs_' + this._config.name);\r\n\r\n\t\tif (Array.isArray(docs)) {\r\n\t\t\tthis._docs.push(...docs);\r\n\r\n\t\t\tthis._filterDocuments();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Saves the current set of documents to local storage.\r\n\t */\r\n\tsetDocs(): void {\r\n\t\tthis.__store.setJson<Document[]>('docs_' + this._config.name, this._docs);\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the current list of documents.\r\n\t *\r\n\t * @returns The list of documents.\r\n\t */\r\n\tgetDocs(): Document[] {\r\n\t\treturn this._docs;\r\n\t}\r\n\r\n\t/**\r\n\t * Clears the current list of documents.\r\n\t *\r\n\t * Empties the internal documents array and saves the updated state to local storage.\r\n\t */\r\n\tclearDocs(): void {\r\n\t\tthis._docs.splice(0, this._docs.length);\r\n\r\n\t\tthis.setDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Adds multiple documents to the service and saves them to local storage.\r\n\t *\r\n\t * @param docs - An array of documents to add.\r\n\t */\r\n\taddDocs(docs: Document[]): void {\r\n\t\tif (Array.isArray(docs)) {\r\n\t\t\tfor (const doc of docs) {\r\n\t\t\t\tthis.addDoc(doc);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a single document to the service. If it already exists, it will be updated.\r\n\t *\r\n\t * @param doc - The document to add.\r\n\t */\r\n\taddDoc(doc: Document): void {\r\n\t\tif (this._config.replace) {\r\n\t\t\tthis._config.replace(doc);\r\n\t\t}\r\n\r\n\t\tconst existingDoc = this._docs.find((d) => this._id(d) === this._id(doc));\r\n\r\n\t\tif (existingDoc) {\r\n\t\t\t// Update the existing document\r\n\t\t\tthis.__core.copy(doc, existingDoc);\r\n\r\n\t\t\tthis.__core.copy(existingDoc, doc);\r\n\t\t} else {\r\n\t\t\t// Add new document\r\n\t\t\tthis._docs.push(doc);\r\n\t\t}\r\n\r\n\t\tthis.setDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new document with a temporary ID and status flags.\r\n\t *\r\n\t * @param doc - Optional base document to use for the new document.\r\n\t * @returns A new document instance with default properties.\r\n\t */\r\n\tnew(doc: Document = {} as Document): Document {\r\n\t\treturn {\r\n\t\t\t...doc,\r\n\t\t\t_id: doc._id || Date.now().toString(),\r\n\t\t\t__created: false,\r\n\t\t\t__modified: false,\r\n\t\t} as Document;\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves a document by its unique ID or creates a new one if it doesn't exist.\r\n\t *\r\n\t * @param _id - The document ID to search for.\r\n\t * @returns The found document or a new document if not found.\r\n\t */\r\n\tdoc(_id: string): Document {\r\n\t\tconst doc =\r\n\t\t\tthis._docs.find((d) => this._id(d) === _id) ||\r\n\t\t\tthis.new({\r\n\t\t\t\t_id,\r\n\t\t\t} as Document);\r\n\r\n\t\tif (!this._docs.find((d) => this._id(d) === _id) && !this._fetchingId[_id]) {\r\n\t\t\tthis._fetchingId[_id] = true;\r\n\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.fetch({ _id }).subscribe((_doc: Document) => {\r\n\t\t\t\t\tthis._fetchingId[_id] = false;\r\n\r\n\t\t\t\t\tif (_doc) {\r\n\t\t\t\t\t\tthis.__core.copy(_doc, doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn doc;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the number of documents to display per page.\r\n\t *\r\n\t * @param _perPage - Number of documents per page.\r\n\t */\r\n\tsetPerPage(_perPage: number): void {\r\n\t\tthis._perPage = _perPage;\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches a list of documents from the API with optional pagination.\r\n\t *\r\n\t * @param config - Optional pagination configuration.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the list of documents.\r\n\t */\r\n\tget(config: GetConfig = {}, options: CrudOptions<Document> = {}): Observable<Document[]> {\r\n\t\tif (!this._config.unauthorized && localStorage.getItem('waw_user')) {\r\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\r\n\r\n\t\t\tlocalStorage.setItem(this._config.name + 'waw_user_id', user._id);\r\n\t\t}\r\n\r\n\t\tconst url = `${this._url}/get${options.name || ''}`;\r\n\r\n\t\tconst params =\r\n\t\t\t(typeof config.page === 'number' || config.query ? '?' : '') +\r\n\t\t\t(config.query || '') +\r\n\t\t\t(typeof config.page === 'number' ? `&skip=${this._perPage * (config.page - 1)}&limit=${this._perPage}` : '');\r\n\r\n\t\tconst obs = this.__http.get(`${url}${params}`);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown): void => {\r\n\t\t\t\tresp = resp || [];\r\n\r\n\t\t\t\tif (typeof config.page !== 'number') {\r\n\t\t\t\t\tthis.clearDocs();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t(resp as Document[]).forEach((doc) => this.addDoc(doc));\r\n\r\n\t\t\t\tif (options.callback) {\r\n\t\t\t\t\toptions.callback(resp as Document[]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof config.page !== 'number') {\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tthis.__core.complete(this._config.name + '_loaded', this._docs);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_get`, this._docs);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown): void => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document[]>;\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a request to the API to create a new document.\r\n\t *\r\n\t * @param doc - The document to create.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the created document, or emits an error if already created.\r\n\t */\r\n\tcreate(doc: Document = {} as Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tif (doc.__created) {\r\n\t\t\t// Emit an error observable if the document is already created\r\n\t\t\treturn new Observable<Document>((observer) => {\r\n\t\t\t\tobserver.error(new Error('Document has already been created.'));\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this._config.appId) {\r\n\t\t\tdoc.appId = this._config.appId;\r\n\t\t}\r\n\r\n\t\tdoc.__created = true;\r\n\r\n\t\tconst obs = this.__http.post(`${this._url}/create${options.name || ''}`, doc);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.__core.copy(resp, doc);\r\n\r\n\t\t\t\t\tthis.addDoc(doc);\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdoc.__created = false;\r\n\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_create`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_list`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tdoc.__created = false;\r\n\r\n\t\t\t\tif (options.errCallback) options.errCallback(err);\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches a document from the API based on a query.\r\n\t *\r\n\t * @param query - The query object used to filter documents.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the fetched document.\r\n\t */\r\n\tfetch(query: object = {}, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tconst obs = this.__http.post(`${this._url}/fetch${options.name || ''}`, query);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (doc: unknown) => {\r\n\t\t\t\tif (doc) {\r\n\t\t\t\t\tthis.addDoc(doc as Document);\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) options.callback(doc as Document);\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(doc as Document);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a document after a specified delay and returns an observable.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that emits the updated document.\r\n\t */\r\n\tupdateAfterWhile(doc: Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\treturn new Observable<Document>((observer) => {\r\n\t\t\tthis.__core.afterWhile(this._id(doc), () => {\r\n\t\t\t\tthis.update(doc, options).subscribe({\r\n\t\t\t\t\tnext: (updatedDoc) => {\r\n\t\t\t\t\t\tobserver.next(updatedDoc); // Emit the updated document\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (err) => {\r\n\t\t\t\t\t\tobserver.error(err); // Forward the error\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\tobserver.complete(); // Complete the observable\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a document in the API.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the updated document.\r\n\t */\r\n\tupdate(doc: Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\tconst obs = this.__http.post(`${this._url}/update${options.name || ''}`, doc);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tdoc.__modified = false;\r\n\r\n\t\t\t\t\tconst storedDoc = this.doc(doc._id);\r\n\r\n\t\t\t\t\tthis.__core.copy(resp, storedDoc);\r\n\r\n\t\t\t\t\tthis.__core.copy(resp, doc);\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}update`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_update`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Unique update a document field in the API.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the updated document.\r\n\t */\r\n\tunique(doc: Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\tconst obs = this.__http.post(`${this._url}/unique${options.name || ''}`, doc);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tdoc.__modified = false;\r\n\r\n\t\t\t\t\t(doc as any)[options.name as string] = resp;\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}unique`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_unique`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Deletes a document from the API.\r\n\t *\r\n\t * @param doc - The document to delete.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the deleted document.\r\n\t */\r\n\tdelete(doc: Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tconst obs = this.__http.post(`${this._url}/delete${options.name || ''}`, doc);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis._docs.splice(\r\n\t\t\t\t\t\tthis._docs.findIndex((d) => this._id(d) === this._id(doc)),\r\n\t\t\t\t\t\t1,\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tthis.setDocs();\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}delete`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_delete`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_list`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Filters documents based on specific conditions and stores the result in a provided object.\r\n\t *\r\n\t * @param storeObject - Object to store filtered documents.\r\n\t * @param field - The field to filter by or a function to extract the field.\r\n\t * @param valid - Optional function to check the validity of a document.\r\n\t * @param sort - Function to sort the filtered documents.\r\n\t * @returns A callback function that triggers the filtering process.\r\n\t */\r\n\tfilteredDocuments(\r\n\t\tstoreObject: Record<string, Document[]>,\r\n\t\tfield: string | ((doc: Document) => string) = 'author',\r\n\t\tvalid?: (doc: Document) => boolean,\r\n\t\tsort: (a: Document, b: Document) => number = (a: Document, b: Document) => {\r\n\t\t\tif ((a as any)[this._id(a)] < (b as any)[this._id(b)]) return -1;\r\n\r\n\t\t\tif ((a as any)[this._id(a)] > (b as any)[this._id(b)]) return 1;\r\n\r\n\t\t\treturn 0;\r\n\t\t},\r\n\t): () => void {\r\n\t\tconst callback = (): void => {\r\n\t\t\t/* remove docs if they were removed */\r\n\t\t\tfor (const parentId in storeObject) {\r\n\t\t\t\tfor (let i = storeObject[parentId].length - 1; i >= 0; i--) {\r\n\t\t\t\t\tconst _field = typeof field === 'function' ? field(storeObject[parentId][i]) : field;\r\n\t\t\t\t\tconst _doc: any = storeObject[parentId][i];\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!this._docs.find((doc: any) =>\r\n\t\t\t\t\t\t\tArray.isArray(doc[_field]) ? doc[_field].includes(_doc[this._id(doc)]) : doc[_field] === _doc[this._id(doc)],\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tstoreObject[parentId].splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* add docs if they are not added */\r\n\t\t\tfor (const doc of this._docs) {\r\n\t\t\t\tconst _field = typeof field === 'function' ? field(doc) : field;\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\ttypeof valid === 'function'\r\n\t\t\t\t\t\t? !valid(doc)\r\n\t\t\t\t\t\t: Array.isArray((doc as any)[_field])\r\n\t\t\t\t\t\t\t? !(doc as any)[_field]?.length\r\n\t\t\t\t\t\t\t: !(doc as any)[_field]\r\n\t\t\t\t) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof field === 'function') {\r\n\t\t\t\t\tif (field(doc) && !storeObject[(doc as any)[_field]].find((c) => c._id === doc._id)) {\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (Array.isArray((doc as any)[_field])) {\r\n\t\t\t\t\t(doc as any)[_field].forEach((_field: string) => {\r\n\t\t\t\t\t\tstoreObject[_field] = storeObject[_field] || [];\r\n\r\n\t\t\t\t\t\tif (!storeObject[_field].find((c) => c._id === doc._id)) {\r\n\t\t\t\t\t\t\tstoreObject[_field].push(doc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstoreObject[(doc as any)[_field]] = storeObject[(doc as any)[_field]] || [];\r\n\r\n\t\t\t\t\tif (!storeObject[(doc as any)[_field]].find((c) => c._id === doc._id)) {\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* sort the array's */\r\n\t\t\tfor (const parentId in storeObject) {\r\n\t\t\t\tstoreObject[parentId].sort(sort);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis._filteredDocumentsCallbacks.push(callback);\r\n\r\n\t\treturn callback;\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a unique ID for a document.\r\n\t *\r\n\t * @param doc - The document for which to generate the ID.\r\n\t * @returns The unique ID as a string.\r\n\t */\r\n\tprivate _id(doc: Document): string {\r\n\t\treturn (doc as unknown as Record<string, unknown>)[this._config._id || '_id']?.toString() as string;\r\n\t}\r\n\r\n\t/**\r\n\t * Executes all registered filter document callbacks.\r\n\t */\r\n\tprivate _filterDocuments(): void {\r\n\t\tfor (const callback of this._filteredDocumentsCallbacks) {\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis.__core.emit(`${this._config.name}_filtered`);\r\n\t}\r\n\r\n\tprivate _fetchingId: Record<string, boolean> = {};\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-files',\r\n\ttemplateUrl: './files.component.html',\r\n\timports: [CommonModule],\r\n})\r\nexport class FilesComponent {\r\n\tfs: any;\r\n}\r\n","@for (file of fs.files; track $index) {\r\n\t<input\r\n\t\t[id]=\"file.id\"\r\n\t\ttype=\"file\"\r\n\t\tname=\"file\"\r\n\t\t(change)=\"fs.change($event, file); input.value = ''\"\r\n\t\t#input\r\n\t\t[hidden]=\"true\"\r\n\t\t[accept]=\"file.accept || (file.part && 'image/*') || ''\"\r\n\t\t[multiple]=\"(file.multiple && true) || ''\"\r\n\t/>\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FilesComponent } from '../components/files/files.component';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\nimport { DomService } from './dom.service';\r\nimport { HttpService } from './http.service';\r\n\r\ninterface FileOptions {\r\n\tid: string;\r\n\ttype?: string;\r\n\tresize?: number | { width: number; height: number };\r\n\tmultiple?: boolean;\r\n\tmultiple_cb?: (files: { dataUrl: string; file: File }[]) => void;\r\n\tcb?: (dataUrl: string | false, file: File) => void;\r\n\tsave?: boolean;\r\n\tcomplete?: () => void;\r\n\tapi?: string;\r\n\tpart?: string;\r\n\tname?: string;\r\n\tbody?: () => object | object;\r\n\tresp?: (response: any) => void;\r\n\tappend?: (formData: FormData, files: File[]) => void;\r\n\tmultiple_files?: { dataUrl: string; file: File }[];\r\n\tmultiple_counter?: number;\r\n\turl?: string;\r\n}\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class FileService {\r\n\tprivate added: Record<string, FileOptions> = {};\r\n\tprivate files: FileOptions[] = [];\r\n\tprivate _component: DomComponent<FilesComponent>;\r\n\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\tprivate http: HttpService,\r\n\t) {\r\n\t\tthis._component = this.dom.appendComponent(FilesComponent, {\r\n\t\t\tfs: this,\r\n\t\t})!;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a file input configuration.\r\n\t *\r\n\t * @param opts - The file options.\r\n\t */\r\n\tadd(opts: FileOptions | string): void | (() => void) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = { id: opts };\r\n\t\t}\r\n\r\n\t\tif (!opts.id) {\r\n\t\t\tconsole.log('You have to pass ID into file object');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\topts.type = opts.type || 'image';\r\n\r\n\t\tif (typeof opts.resize === 'number') {\r\n\t\t\topts.resize = { width: opts.resize, height: opts.resize };\r\n\t\t}\r\n\r\n\t\tif (this.added[opts.id]) {\r\n\t\t\tthis.files = this.files.filter((file) => file.id !== opts.id);\r\n\t\t}\r\n\r\n\t\tthis.files.push(opts);\r\n\t\tthis.added[opts.id] = opts;\r\n\r\n\t\tif (opts.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\topts.complete?.();\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles file input change event.\r\n\t *\r\n\t * @param event - The input change event.\r\n\t * @param info - The file options.\r\n\t */\r\n\tchange(event: Event, info: FileOptions): void {\r\n\t\tconst input = event.target as HTMLInputElement;\r\n\t\tif (!input.files) return;\r\n\r\n\t\tif (info.type === 'image') {\r\n\t\t\tif (info.multiple) {\r\n\t\t\t\tif (info.multiple_cb) {\r\n\t\t\t\t\tinfo.multiple_files = [];\r\n\t\t\t\t\tinfo.multiple_counter = input.files.length;\r\n\t\t\t\t}\r\n\t\t\t\tArray.from(input.files).forEach((file) => this.process(file, info));\r\n\t\t\t} else {\r\n\t\t\t\tthis.process(input.files[0], info);\r\n\t\t\t}\r\n\t\t} else if (info.type === 'file') {\r\n\t\t\tif (info.multiple) {\r\n\t\t\t\tinfo.multiple_cb?.(\r\n\t\t\t\t\tArray.from(input.files).map((file) => ({\r\n\t\t\t\t\t\tdataUrl: '',\r\n\t\t\t\t\t\tfile,\r\n\t\t\t\t\t})),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tArray.from(input.files).forEach((file) => info.cb?.('', file));\r\n\t\t\tif (info.part || info.url) {\r\n\t\t\t\tthis.uploadFiles(info, input.files as any);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.log('Provide type `image` or `file`');\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a file.\r\n\t *\r\n\t * @param part - The part of the API.\r\n\t * @param url - The URL of the file.\r\n\t * @param opts - Additional options.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tremove(part: string, url: string, opts: any = {}, cb: (resp: any) => void = () => {}): void | (() => void) {\r\n\t\topts.url = url;\r\n\t\tif (opts.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\tthis.http.post(opts.api || `/api/${part}/file/delete`, opts, cb);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(opts.api || `/api/${part}/file/delete`, opts, cb);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Uploads files to the server.\r\n\t *\r\n\t * @param info - The file options.\r\n\t * @param files - The files to upload.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tuploadFiles(info: FileOptions, files: File[], cb: (resp: any) => void = () => {}): void {\r\n\t\tconst formData = new FormData();\r\n\r\n\t\tif (info.append) {\r\n\t\t\tinfo.append(formData, files);\r\n\t\t} else {\r\n\t\t\tfiles.forEach((file, index) => formData.append(`file[${index}]`, file));\r\n\t\t}\r\n\r\n\t\tconst body = typeof info.body === 'function' ? info.body() : info.body || {};\r\n\t\tObject.entries(body).forEach(([key, value]) => formData.append(key, value));\r\n\r\n\t\tif (info.save) {\r\n\t\t\tinfo.complete = () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, formData, (resp: any) => {\r\n\t\t\t\t\tinfo.resp?.(resp);\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t});\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, formData, (resp: any) => {\r\n\t\t\t\tinfo.resp?.(resp);\r\n\t\t\t\tcb(resp);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Uploads an image to the server.\r\n\t *\r\n\t * @param info - The file options.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\timage(info: FileOptions, cb: (resp: any) => void = () => {}): void | (() => void) {\r\n\t\tif (info.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, info, cb);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, info, cb);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the file information after processing.\r\n\t *\r\n\t * @param dataUrl - The data URL of the processed file.\r\n\t * @param info - The file options.\r\n\t * @param file - The file object.\r\n\t */\r\n\t// private update(dataUrl: string, info: FileOptions, file: File): void {\r\n\tprivate update(dataUrl: string, info: any, file: File): void {\r\n\t\tinfo.cb?.(dataUrl, file);\r\n\t\tif (info.multiple_cb) {\r\n\t\t\tinfo.multiple_files.push({ dataUrl, file });\r\n\t\t\tif (--info.multiple_counter === 0) info.multiple_cb(info.multiple_files);\r\n\t\t}\r\n\r\n\t\tif (!info.part) return;\r\n\r\n\t\tconst obj = typeof info.body === 'function' ? info.body() : info.body || {};\r\n\t\tobj['dataUrl'] = dataUrl;\r\n\r\n\t\tif (info.save) {\r\n\t\t\tinfo.complete = () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, obj, (resp: any) => {\r\n\t\t\t\t\tinfo.cb?.(resp);\r\n\t\t\t\t});\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, obj, (resp: any) => {\r\n\t\t\t\tinfo.cb?.(resp);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Processes an image file for resizing.\r\n\t *\r\n\t * @param file - The file object.\r\n\t * @param info - The file options.\r\n\t */\r\n\t// private process(file: File, info: FileOptions): void {\r\n\tprocess(file: File, info: any): void {\r\n\t\tif (!file.type.startsWith('image/')) {\r\n\t\t\tinfo.cb?.(false, file);\r\n\t\t\tif (info.multiple_cb) {\r\n\t\t\t\tinfo.multiple_files.push({ dataUrl: '', file });\r\n\t\t\t\tif (--info.multiple_counter === 0) info.multiple_cb(info.multiple_files);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (info.resize) {\r\n\t\t\tinfo.resize.width = info.resize.width || 1920;\r\n\t\t\tinfo.resize.height = info.resize.height || 1080;\r\n\t\t}\r\n\r\n\t\tconst reader = new FileReader();\r\n\t\treader.onload = (loadEvent) => {\r\n\t\t\tif (!info.resize) {\r\n\t\t\t\treturn this.update(loadEvent.target?.result as string, info, file);\r\n\t\t\t}\r\n\r\n\t\t\tconst canvas = document.createElement('canvas');\r\n\t\t\tconst img = document.createElement('img');\r\n\t\t\timg.onload = () => {\r\n\t\t\t\tif (img.width <= info.resize.width && img.height <= info.resize.height) {\r\n\t\t\t\t\treturn this.update(loadEvent.target?.result as string, info, file);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst infoRatio = info.resize.width / info.resize.height;\r\n\t\t\t\tconst imgRatio = img.width / img.height;\r\n\t\t\t\tlet width, height;\r\n\t\t\t\tif (imgRatio > infoRatio) {\r\n\t\t\t\t\twidth = Math.min(info.resize.width, img.width);\r\n\t\t\t\t\theight = width / imgRatio;\r\n\t\t\t\t} else {\r\n\t\t\t\t\theight = Math.min(info.resize.height, img.height);\r\n\t\t\t\t\twidth = height * imgRatio;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcanvas.width = width;\r\n\t\t\t\tcanvas.height = height;\r\n\t\t\t\tconst context = canvas.getContext('2d');\r\n\t\t\t\tcontext?.drawImage(img, 0, 0, width, height);\r\n\t\t\t\tconst dataUrl = canvas.toDataURL('image/jpeg', 1);\r\n\t\t\t\tthis.update(dataUrl, info, file);\r\n\t\t\t};\r\n\t\t\timg.src = loadEvent.target?.result as string;\r\n\t\t};\r\n\t\treader.readAsDataURL(file);\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tthis._component.remove();\r\n\t}\r\n}\r\n","import { Signal, Type } from '@angular/core';\r\n\r\n/**\r\n * Configuration for a button rendered inside an Loader.\r\n */\r\nexport interface LoaderButton {\r\n\t/** Text displayed on the button. */\r\n\ttext: string;\r\n\t/** Optional click handler invoked when the button is pressed. */\r\n\tcallback?: () => void;\r\n}\r\n\r\n/**\r\n * Base options that can be supplied when showing an Loader.\r\n */\r\nexport interface LoaderConfig {\r\n\t/** Message text displayed to the user. */\r\n\ttext?: string;\r\n\t/** Optional action buttons displayed within the Loader. */\r\n\tbuttons?: LoaderButton[];\r\n\t/** Custom CSS class applied to the Loader container. */\r\n\tclass?: string;\r\n\t/** Identifier used to ensure only one Loader with this key exists. */\r\n\tunique?: string;\r\n\t/** Whether to show a progress bar. */\r\n\tprogress?: boolean;\r\n\t/** Milliseconds before auto dismissal. */\r\n\ttimeout?: number;\r\n\t/** Callback executed when the Loader is closed. */\r\n\tclose?: () => void;\r\n\tclosable?: boolean;\r\n}\r\n\r\nexport interface Loader extends LoaderConfig {\r\n\t/** Unique identifier for the loader instance. */\r\n\tid?: number;\r\n\t/** Signal emitting the current progress percentage. */\r\n\tprogressPercentage?: Signal<number>;\r\n\t/** Called when the loader is dismissed. */\r\n\tonClose?: () => void;\r\n\t/** Element to which the loader should be appended. */\r\n\tappend?: HTMLElement;\r\n\t/** Component used to render custom loader content. */\r\n\tcomponent?: Type<unknown>;\r\n\t[x: string]: unknown;\r\n}\r\n\r\n/**\r\n * Default values applied when an Loader is shown without specific options.\r\n */\r\nexport const DEFAULT_LOADER_CONFIG: Loader = {\r\n\ttext: '',\r\n\tclass: '',\r\n\tprogress: false,\r\n\ttimeout: 0,\r\n\tclosable: true,\r\n};\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { LoaderComponent } from '../components/loader/loader.component';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config.interface';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\nimport { DEFAULT_LOADER_CONFIG, Loader, LoaderConfig } from '../interfaces/loader.interface';\r\nimport { DomService } from './dom.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class LoaderService {\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() config: Config,\r\n\t\tprivate _dom: DomService,\r\n\t) {\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_LOADER_CONFIG,\r\n\t\t\t...(config?.loader || {}),\r\n\t\t};\r\n\t}\r\n\r\n\tshow(opts: Loader | string = 'Loading...'): Loader {\r\n\t\topts = {\r\n\t\t\t...this._config,\r\n\t\t\t...(typeof opts === 'object' ? opts : { text: opts }),\r\n\t\t};\r\n\r\n\t\tif (opts.unique && this._loaders.find((m) => m.unique === opts.unique)) {\r\n\t\t\treturn this._loaders.find((m) => m.unique === opts.unique) as Loader;\r\n\t\t}\r\n\r\n\t\tthis._loaders.push(opts);\r\n\r\n\t\tlet component!: DomComponent<LoaderComponent> | undefined;\r\n\r\n\t\topts.close = () => {\r\n\t\t\tcomponent?.remove();\r\n\r\n\t\t\tcomponent = undefined;\r\n\r\n\t\t\tif (typeof opts.onClose === 'function') opts.onClose();\r\n\r\n\t\t\tthis._loaders.splice(\r\n\t\t\t\tthis._loaders.findIndex((m) => m.id === opts.id),\r\n\t\t\t\t1,\r\n\t\t\t);\r\n\t\t};\r\n\r\n\t\tif (opts.append) {\r\n\t\t\tcomponent = this._dom.appendComponent(LoaderComponent, opts, opts.append)!;\r\n\t\t} else {\r\n\t\t\tcomponent = this._dom.appendComponent(LoaderComponent, opts)!;\r\n\t\t}\r\n\r\n\t\tif (opts.unique) {\r\n\t\t\tif (this._uniques[opts.unique]) this._uniques[opts.unique].remove();\r\n\r\n\t\t\tthis._uniques[opts.unique] = component;\r\n\t\t}\r\n\r\n\t\tthis._loaders.push(opts);\r\n\r\n\t\treturn opts;\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tfor (let i = this._loaders.length - 1; i >= 0; i--) {\r\n\t\t\tthis._loaders[i].close?.();\r\n\t\t}\r\n\t}\r\n\r\n\t/** Merged configuration applied to new alerts. */\r\n\tprivate _config: LoaderConfig;\r\n\r\n\t/** References to alerts that must remain unique by identifier. */\r\n\tprivate _uniques: Record<string, DomComponent<any>> = {};\r\n\r\n\tprivate _loaders: Loader[] = [];\r\n}\r\n","import { Inject, Injectable, Optional, Type } from '@angular/core';\r\nimport { ModalComponent } from '../components/modal/modal.component';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config.interface';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\nimport { DEFAULT_MODAL_CONFIG, Modal, ModalConfig } from '../interfaces/modal.interface';\r\nimport { DomService } from './dom.service';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class ModalService {\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() config: Config,\r\n\t\tprivate _dom: DomService,\r\n\t) {\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_MODAL_CONFIG,\r\n\t\t\t...(config?.modal || {}),\r\n\t\t};\r\n\t}\r\n\r\n\tshow(opts: Modal | Type<unknown>): Modal {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\tif (opts.unique && this._modals.find((m) => m.unique === opts.unique)) {\r\n\t\t\treturn this._modals.find((m) => m.unique === opts.unique) as Modal;\r\n\t\t}\r\n\r\n\t\tthis._modals.push(opts);\r\n\r\n\t\topts.class ||= '';\r\n\r\n\t\topts.id ||= Math.floor(Math.random() * Date.now()) + Date.now();\r\n\r\n\t\tdocument.body.classList.add('modalOpened');\r\n\r\n\t\tlet component!: DomComponent<ModalComponent> | undefined;\r\n\r\n\t\tlet content!: DomComponent<any> | undefined;\r\n\r\n\t\topts.close = () => {\r\n\t\t\tcontent?.remove();\r\n\r\n\t\t\tcontent = undefined;\r\n\r\n\t\t\tcomponent?.remove();\r\n\r\n\t\t\tcomponent = undefined;\r\n\r\n\t\t\tif (typeof opts.onClose === 'function') opts.onClose();\r\n\r\n\t\t\tthis._modals.splice(\r\n\t\t\t\tthis._modals.findIndex((m) => m.id === opts.id),\r\n\t\t\t\t1,\r\n\t\t\t);\r\n\r\n\t\t\tif (!this._modals.length) {\r\n\t\t\t\tdocument.body.classList.remove('modalOpened');\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (typeof opts.timeout === 'number' && opts.timeout > 0) {\r\n\t\t\tsetTimeout(opts.close, opts.timeout);\r\n\t\t}\r\n\r\n\t\tcomponent = this._dom.appendComponent(ModalComponent, opts)!;\r\n\r\n\t\tcontent = this._dom.appendComponent(\r\n\t\t\topts.component,\r\n\t\t\topts as Partial<{ providedIn?: string | undefined }>,\r\n\t\t\tcomponent.nativeElement.children[0].children[0].children[0] as HTMLElement,\r\n\t\t)!;\r\n\r\n\t\treturn opts;\r\n\t}\r\n\r\n\topen(opts: Modal | Type<unknown>) {\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tsmall(opts: Modal) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.size = 'small';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tmid(opts: Modal) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.size = 'mid';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tbig(opts: Modal) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.size = 'big';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tfull(opts: Modal) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.size = 'full';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tfor (let i = this._modals.length - 1; i >= 0; i--) {\r\n\t\t\tthis._modals[i].close?.();\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _modals: Modal[] = [];\r\n\r\n\t/** Merged configuration applied to new alerts. */\r\n\tprivate _config: ModalConfig;\r\n\r\n\tprivate _opts(opts: Modal | Type<unknown>): Modal {\r\n\t\treturn typeof opts === 'function'\r\n\t\t\t? { ...this._config, component: opts }\r\n\t\t\t: {\r\n\t\t\t\t\t...this._config,\r\n\t\t\t\t\t...opts,\r\n\t\t\t\t\tcomponent: opts.component,\r\n\t\t\t\t};\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n/**\r\n * RtcService handles WebRTC peer connections and local media stream setup.\r\n * It provides functionality to initialize the user's camera/microphone,\r\n * manage multiple peer connections, and handle offer/answer negotiation.\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class RtcService {\r\n\t/**\r\n\t * Map of peer connections, keyed by peer ID.\r\n\t */\r\n\tprivate peers = new Map<string, RTCPeerConnection>();\r\n\r\n\t/**\r\n\t * Local media stream from user's camera and microphone.\r\n\t */\r\n\tprivate localStream: MediaStream | null = null;\r\n\r\n\t/**\r\n\t * Initializes the local media stream (audio/video).\r\n\t * Requests permissions and stores the stream internally.\r\n\t */\r\n\tasync initLocalStream(): Promise<MediaStream> {\r\n\t\tif (!this.localStream) {\r\n\t\t\tthis.localStream = await navigator.mediaDevices.getUserMedia({\r\n\t\t\t\tvideo: true,\r\n\t\t\t\taudio: true,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.localStream;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new RTCPeerConnection for the given ID and attaches local tracks.\r\n\t */\r\n\tasync createPeer(id: string): Promise<RTCPeerConnection> {\r\n\t\tconst peer = new RTCPeerConnection();\r\n\r\n\t\tthis.localStream?.getTracks().forEach((track) => peer.addTrack(track, this.localStream!));\r\n\r\n\t\tthis.peers.set(id, peer);\r\n\r\n\t\treturn peer;\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves an existing peer connection by ID.\r\n\t */\r\n\tgetPeer(id: string): RTCPeerConnection | undefined {\r\n\t\treturn this.peers.get(id);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an SDP offer for the specified peer and sets it as the local description.\r\n\t */\r\n\tasync createOffer(id: string): Promise<RTCSessionDescriptionInit> {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (!peer) throw new Error('Peer not found');\r\n\r\n\t\tconst offer = await peer.createOffer();\r\n\r\n\t\tawait peer.setLocalDescription(offer);\r\n\r\n\t\treturn offer;\r\n\t}\r\n\r\n\t/**\r\n\t * Accepts an SDP offer, creates an answer, and sets it as the local description.\r\n\t */\r\n\tasync createAnswer(id: string, offer: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (!peer) throw new Error('Peer not found');\r\n\r\n\t\tawait peer.setRemoteDescription(new RTCSessionDescription(offer));\r\n\r\n\t\tconst answer = await peer.createAnswer();\r\n\r\n\t\tawait peer.setLocalDescription(answer);\r\n\r\n\t\treturn answer;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the remote description with an SDP answer for the given peer.\r\n\t */\r\n\tasync setRemoteAnswer(id: string, answer: RTCSessionDescriptionInit) {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (!peer) throw new Error('Peer not found');\r\n\r\n\t\tawait peer.setRemoteDescription(new RTCSessionDescription(answer));\r\n\t}\r\n\r\n\t/**\r\n\t * Adds an ICE candidate to the specified peer connection.\r\n\t */\r\n\taddIceCandidate(id: string, candidate: RTCIceCandidateInit) {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (peer) peer.addIceCandidate(new RTCIceCandidate(candidate));\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the initialized local media stream.\r\n\t */\r\n\tgetLocalStream(): MediaStream | null {\r\n\t\treturn this.localStream;\r\n\t}\r\n\r\n\t/**\r\n\t * Closes a specific peer connection and removes it from the map.\r\n\t */\r\n\tclosePeer(id: string) {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (peer) {\r\n\t\t\tpeer.close();\r\n\r\n\t\t\tthis.peers.delete(id);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Closes all peer connections and stops the local media stream.\r\n\t */\r\n\tcloseAll() {\r\n\t\tthis.peers.forEach((peer) => peer.close());\r\n\r\n\t\tthis.peers.clear();\r\n\r\n\t\tthis.localStream?.getTracks().forEach((track) => track.stop());\r\n\r\n\t\tthis.localStream = null;\r\n\t}\r\n}\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config.interface';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class SocketService {\r\n\tprivate _url = '';\r\n\r\n\tprivate _io: any;\r\n\r\n\tprivate _connected = false;\r\n\r\n\tprivate _opts: any = {};\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private _config: Config,\r\n\t\tprivate _core: CoreService,\r\n\t) {\r\n\t\tthis._config = { ...DEFAULT_CONFIG, ...(this._config || {}) };\r\n\r\n\t\tif (!this._config.io) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst url = new URL(window.location.origin);\r\n\r\n\t\tif (typeof this._config.socket === 'object') {\r\n\t\t\tif (this._config.socket.port) {\r\n\t\t\t\turl.port = this._config.socket.port;\r\n\t\t\t}\r\n\r\n\t\t\tif (this._config.socket.opts) {\r\n\t\t\t\tthis._opts = this._config.socket.opts;\r\n\t\t\t}\r\n\r\n\t\t\tthis._url = this._config.socket.url ?? url.origin;\r\n\t\t} else {\r\n\t\t\tthis._url = url.origin;\r\n\t\t}\r\n\r\n\t\tif (this._config.socket) {\r\n\t\t\tthis.load();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the URL for the WebSocket connection and reloads the socket.\r\n\t * @param url - The URL of the WebSocket server.\r\n\t */\r\n\tsetUrl(url: string): void {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (!this._config.socket) {\r\n\t\t\tthis._config.socket = true;\r\n\t\t}\r\n\r\n\t\tthis.load();\r\n\t}\r\n\r\n\t/**\r\n\t * Loads and initializes the WebSocket connection.\r\n\t */\r\n\tprivate load(): void {\r\n\t\tif (this._config.io) {\r\n\t\t\tconst ioFunc = this._config.io.default ? this._config.io.default : this._config.io;\r\n\r\n\t\t\tthis._io = ioFunc(this._url, this._opts);\r\n\r\n\t\t\tthis._io.on('connect', () => {\r\n\t\t\t\tthis._connected = true;\r\n\t\t\t\tthis._core.complete('socket');\r\n\t\t\t});\r\n\r\n\t\t\tthis._io.on('disconnect', (reason: any) => {\r\n\t\t\t\tthis._connected = false;\r\n\t\t\t\tif (this._core && typeof this._core.emit === 'function') {\r\n\t\t\t\t\tthis._core.emit('socket_disconnect', reason);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.warn('Socket disconnected', reason);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis._io.on('error', (err: any) => {\r\n\t\t\t\tthis._connected = false;\r\n\t\t\t\tif (this._core && typeof this._core.emit === 'function') {\r\n\t\t\t\t\tthis._core.emit('socket_error', err);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.warn('Socket error', err);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Disconnects the WebSocket connection and resets the connection state.\r\n\t */\r\n\tdisconnect(): void {\r\n\t\tif (this._io) {\r\n\t\t\tthis._io.disconnect();\r\n\t\t}\r\n\r\n\t\tthis._connected = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Subscribes to a WebSocket event.\r\n\t * @param to - The event to subscribe to.\r\n\t * @param cb - The callback function to execute when the event is received.\r\n\t */\r\n\ton(to: string, cb: (message: any) => void = () => {}): void {\r\n\t\tif (!this._config.socket) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._io) {\r\n\t\t\tconsole.warn('Socket client not loaded.');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._connected) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.on(to, cb);\r\n\t\t\t}, 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._io.on(to, cb);\r\n\t}\r\n\r\n\t/**\r\n\t * Emits a message to a WebSocket event.\r\n\t * @param to - The event to emit the message to.\r\n\t * @param message - The message to emit.\r\n\t * @param room - Optional room to emit the message to.\r\n\t */\r\n\temit(to: string, message: any, room: any = false): void {\r\n\t\tif (!this._config.socket) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._io) {\r\n\t\t\tconsole.warn('Socket client not loaded.');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._connected) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.emit(to, message, room);\r\n\t\t\t}, 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._io.emit(to, message, room);\r\n\t}\r\n}\r\n","import { DatePipe } from '@angular/common';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class TimeService {\r\n\tprivate weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\r\n\r\n\tprivate monthNames = [\r\n\t\t'January',\r\n\t\t'February',\r\n\t\t'March',\r\n\t\t'April',\r\n\t\t'May',\r\n\t\t'June',\r\n\t\t'July',\r\n\t\t'August',\r\n\t\t'September',\r\n\t\t'October',\r\n\t\t'November',\r\n\t\t'December',\r\n\t];\r\n\r\n\tconstructor(private datePipe: DatePipe) {}\r\n\r\n\t/**\r\n\t * Returns the name of the day of the week for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the day of the week.\r\n\t * @param format - The format in which to return the day name. Default is 'long'.\r\n\t * @returns The name of the day of the week.\r\n\t */\r\n\tgetDayName(date: Date, format: 'short' | 'long' = 'long'): string {\r\n\t\tconst dayIndex = date.getDay();\r\n\t\treturn format === 'short' ? this.weekDays[dayIndex].substring(0, 3) : this.weekDays[dayIndex];\r\n\t}\r\n\t/**\r\n\t * Returns the name of the month for a given index.\r\n\t *\r\n\t * @param monthIndex - The month index (0-11).\r\n\t * @param format - The format in which to return the month name. Default is 'long'.\r\n\t * @returns The name of the month.\r\n\t */\r\n\tgetMonthName(monthIndex: number, format: 'short' | 'long' = 'long'): string {\r\n\t\tif (!Number.isInteger(monthIndex) || monthIndex < 0 || monthIndex > 11) {\r\n\t\t\tthrow new RangeError('monthIndex must be an integer between 0 and 11');\r\n\t\t}\r\n\t\treturn format === 'short' ? this.monthNames[monthIndex].substring(0, 3) : this.monthNames[monthIndex];\r\n\t}\r\n\r\n\t/**\r\n\t * Formats a date according to the specified format and timezone.\r\n\t *\r\n\t * @param date - The date to format.\r\n\t * @param format - The format string (see Angular DatePipe documentation for format options).\r\n\t * @param timezone - The timezone to use for formatting.\r\n\t * @returns The formatted date string.\r\n\t */\r\n\tformatDate(date: Date, format: string = 'mediumDate', timezone: string = 'UTC'): string {\r\n\t\treturn this.datePipe.transform(date, format, timezone) || '';\r\n\t}\r\n\r\n\t/**\r\n\t * Converts a date to a different timezone.\r\n\t *\r\n\t * @param date - The date to convert.\r\n\t * @param timezone - The timezone to convert to.\r\n\t * @returns The date in the new timezone.\r\n\t */\r\n\tconvertToTimezone(date: Date, timezone: string): Date {\r\n\t\treturn new Date(date.toLocaleString('en-US', { timeZone: timezone }));\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the day for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the day.\r\n\t * @returns The start of the day (midnight) for the given date.\r\n\t */\r\n\tstartOfDay(date: Date): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(0, 0, 0, 0);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the day for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the day.\r\n\t * @returns The end of the day (one millisecond before midnight) for the given date.\r\n\t */\r\n\tendOfDay(date: Date): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(23, 59, 59, 999);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the week for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the week.\r\n\t * @param locale - A BCP 47 language tag to determine the first day of the week. Defaults to the runtime locale.\r\n\t * @returns The start of the week adjusted for the locale.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.startOfWeek(date); // => Monday May 13 2024 00:00:00 for en-GB\r\n\t */\r\n\tstartOfWeek(date: Date, locale?: string): Date {\r\n\t\tconst newDate = this.startOfDay(date);\r\n\t\tconst dtf = new Intl.DateTimeFormat(locale);\r\n\t\tconst resolved = dtf.resolvedOptions().locale;\r\n\t\tconst region = resolved.split('-')[1]?.toUpperCase();\r\n\t\tconst sundayFirst = ['US', 'CA', 'AU', 'NZ', 'PH', 'BR'];\r\n\t\tconst firstDay = sundayFirst.includes(region) ? 0 : 1;\r\n\t\tconst day = newDate.getDay();\r\n\t\tconst diff = (day - firstDay + 7) % 7;\r\n\t\tnewDate.setDate(newDate.getDate() - diff);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the week for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the week.\r\n\t * @param locale - A BCP 47 language tag to determine the first day of the week. Defaults to the runtime locale.\r\n\t * @returns The end of the week adjusted for the locale.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.endOfWeek(date); // => Sunday May 19 2024 23:59:59.999 for en-GB\r\n\t */\r\n\tendOfWeek(date: Date, locale?: string): Date {\r\n\t\tconst start = this.startOfWeek(date, locale);\r\n\t\tconst end = this.addDays(start, 6);\r\n\t\treturn this.endOfDay(end);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the month for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the month.\r\n\t * @returns The start of the month.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.startOfMonth(date); // => May 1 2024 00:00:00\r\n\t */\r\n\tstartOfMonth(date: Date): Date {\r\n\t\tconst newDate = this.startOfDay(date);\r\n\t\tnewDate.setDate(1);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the month for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the month.\r\n\t * @returns The end of the month.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.endOfMonth(date); // => May 31 2024 23:59:59.999\r\n\t */\r\n\tendOfMonth(date: Date): Date {\r\n\t\tconst start = this.startOfMonth(date);\r\n\t\tconst end = new Date(start);\r\n\t\tend.setMonth(end.getMonth() + 1);\r\n\t\tend.setDate(0);\r\n\t\treturn this.endOfDay(end);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the year for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the year.\r\n\t * @returns The start of the year.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.startOfYear(date); // => Jan 1 2024 00:00:00\r\n\t */\r\n\tstartOfYear(date: Date): Date {\r\n\t\tconst newDate = this.startOfDay(date);\r\n\t\tnewDate.setMonth(0, 1);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the year for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the year.\r\n\t * @returns The end of the year.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.endOfYear(date); // => Dec 31 2024 23:59:59.999\r\n\t */\r\n\tendOfYear(date: Date): Date {\r\n\t\tconst end = new Date(date.getFullYear(), 11, 31);\r\n\t\treturn this.endOfDay(end);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of days in a given month and year.\r\n\t *\r\n\t * @param month - The month (0-11).\r\n\t * @param year - The year.\r\n\t * @returns The number of days in the month.\r\n\t */\r\n\tgetDaysInMonth(month: number, year: number): number {\r\n\t\treturn new Date(year, month + 1, 0).getDate();\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a given year is a leap year.\r\n\t *\r\n\t * @param year - The year to check.\r\n\t * @returns True if the year is a leap year, false otherwise.\r\n\t */\r\n\tisLeapYear(year: number): boolean {\r\n\t\treturn (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of days to a date.\r\n\t *\r\n\t * @param date - The date to which to add days.\r\n\t * @param days - The number of days to add.\r\n\t * @returns The new date with the added days.\r\n\t */\r\n\taddDays(date: Date, days: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setDate(newDate.getDate() + days);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of months to a date.\r\n\t *\r\n\t * @param date - The date to which to add months.\r\n\t * @param months - The number of months to add.\r\n\t * @returns The new date with the added months.\r\n\t */\r\n\taddMonths(date: Date, months: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setMonth(newDate.getMonth() + months);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of years to a date.\r\n\t *\r\n\t * @param date - The date to which to add years.\r\n\t * @param years - The number of years to add.\r\n\t * @returns The new date with the added years.\r\n\t */\r\n\taddYears(date: Date, years: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setFullYear(newDate.getFullYear() + years);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of hours to a date.\r\n\t *\r\n\t * @param date - The date to which to add hours.\r\n\t * @param hours - The number of hours to add.\r\n\t * @returns The new date with the added hours.\r\n\t */\r\n\taddHours(date: Date, hours: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(newDate.getHours() + hours);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of minutes to a date.\r\n\t *\r\n\t * @param date - The date to which to add minutes.\r\n\t * @param minutes - The number of minutes to add.\r\n\t * @returns The new date with the added minutes.\r\n\t */\r\n\taddMinutes(date: Date, minutes: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setMinutes(newDate.getMinutes() + minutes);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of seconds to a date.\r\n\t *\r\n\t * @param date - The date to which to add seconds.\r\n\t * @param seconds - The number of seconds to add.\r\n\t * @returns The new date with the added seconds.\r\n\t */\r\n\taddSeconds(date: Date, seconds: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setSeconds(newDate.getSeconds() + seconds);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of days from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract days.\r\n\t * @param days - The number of days to subtract.\r\n\t * @returns The new date with the subtracted days.\r\n\t */\r\n\tsubtractDays(date: Date, days: number): Date {\r\n\t\treturn this.addDays(date, -days);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of months from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract months.\r\n\t * @param months - The number of months to subtract.\r\n\t * @returns The new date with the subtracted months.\r\n\t */\r\n\tsubtractMonths(date: Date, months: number): Date {\r\n\t\treturn this.addMonths(date, -months);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of years from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract years.\r\n\t * @param years - The number of years to subtract.\r\n\t * @returns The new date with the subtracted years.\r\n\t */\r\n\tsubtractYears(date: Date, years: number): Date {\r\n\t\treturn this.addYears(date, -years);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of hours from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract hours.\r\n\t * @param hours - The number of hours to subtract.\r\n\t * @returns The new date with the subtracted hours.\r\n\t */\r\n\tsubtractHours(date: Date, hours: number): Date {\r\n\t\treturn this.addHours(date, -hours);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of minutes from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract minutes.\r\n\t * @param minutes - The number of minutes to subtract.\r\n\t * @returns The new date with the subtracted minutes.\r\n\t */\r\n\tsubtractMinutes(date: Date, minutes: number): Date {\r\n\t\treturn this.addMinutes(date, -minutes);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of seconds from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract seconds.\r\n\t * @param seconds - The number of seconds to subtract.\r\n\t * @returns The new date with the subtracted seconds.\r\n\t */\r\n\tsubtractSeconds(date: Date, seconds: number): Date {\r\n\t\treturn this.addSeconds(date, -seconds);\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates the difference in days between two dates.\r\n\t *\r\n\t * @param date1 - The earlier date.\r\n\t * @param date2 - The later date.\r\n\t * @returns The number of days between the two dates.\r\n\t */\r\n\tdifferenceInDays(date1: Date, date2: Date): number {\r\n\t\tconst diff = date2.getTime() - date1.getTime();\r\n\t\treturn diff / (1000 * 60 * 60 * 24);\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates the difference in hours between two dates.\r\n\t *\r\n\t * @param date1 - The earlier date.\r\n\t * @param date2 - The later date.\r\n\t * @returns The number of hours between the two dates.\r\n\t */\r\n\tdifferenceInHours(date1: Date, date2: Date): number {\r\n\t\tconst diff = date2.getTime() - date1.getTime();\r\n\t\treturn diff / (1000 * 60 * 60);\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates the difference in minutes between two dates.\r\n\t *\r\n\t * @param date1 - The earlier date.\r\n\t * @param date2 - The later date.\r\n\t * @returns The number of minutes between the two dates.\r\n\t */\r\n\tdifferenceInMinutes(date1: Date, date2: Date): number {\r\n\t\tconst diff = date2.getTime() - date1.getTime();\r\n\t\treturn diff / (1000 * 60);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if two dates are on the same day.\r\n\t *\r\n\t * @param date1 - The first date.\r\n\t * @param date2 - The second date.\r\n\t * @returns True if the dates are on the same day, false otherwise.\r\n\t */\r\n\tisSameDay(date1: Date, date2: Date): boolean {\r\n\t\treturn date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the ISO week number for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the week number.\r\n\t * @returns The ISO week number (1-53).\r\n\t */\r\n\tgetWeekNumber(date: Date): number {\r\n\t\tconst tempDate = new Date(date.getTime());\r\n\t\ttempDate.setHours(0, 0, 0, 0);\r\n\t\t// Set to nearest Thursday: current date + 4 - current day number, making Thursday day 4\r\n\t\ttempDate.setDate(tempDate.getDate() + 4 - (tempDate.getDay() || 7));\r\n\t\tconst yearStart = new Date(tempDate.getFullYear(), 0, 1);\r\n\t\t// Calculate full weeks to nearest Thursday\r\n\t\treturn Math.ceil(((tempDate.getTime() - yearStart.getTime()) / 86400000 + 1) / 7);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of weeks in a month for a given month and year.\r\n\t *\r\n\t * @param month - The month (0-11).\r\n\t * @param year - The year.\r\n\t * @returns The number of weeks in the month.\r\n\t */\r\n\tgetWeeksInMonth(month: number, year: number): number {\r\n\t\tconst firstDayOfMonth = new Date(year, month, 1);\r\n\t\tconst lastDayOfMonth = new Date(year, month + 1, 0);\r\n\t\t// Get ISO week numbers for the first and last day of the month\r\n\t\tconst firstWeek = this.getWeekNumber(firstDayOfMonth);\r\n\t\tlet lastWeek = this.getWeekNumber(lastDayOfMonth);\r\n\t\t// Special case: when January 1st is in the last week of the previous year\r\n\t\tif (firstWeek > lastWeek) {\r\n\t\t\tlastWeek = this.getWeekNumber(new Date(year, 11, 31)); // Get week of the last day of the year\r\n\t\t}\r\n\t\treturn lastWeek - firstWeek + 1;\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class UtilService {\r\n\tprivate variables: { [key: string]: string } = {};\r\n\r\n\tprivate _forms: { [key: string]: any } = {};\r\n\r\n\t// global variable use for design purposes\r\n\tvar: Record<string, unknown> = {};\r\n\r\n\tconstructor() {\r\n\t\tconst storedVariables = localStorage.getItem('css_variables');\r\n\r\n\t\tthis.variables = storedVariables ? JSON.parse(storedVariables) : {};\r\n\r\n\t\tfor (const key in this.variables) {\r\n\t\t\tthis.setProperty(key, this.variables[key]);\r\n\t\t}\r\n\t}\r\n\r\n\t/* Forms Management */\r\n\t/**\r\n\t * Manages form states.\r\n\t *\r\n\t * @param id - The form identifier.\r\n\t * @returns The form state object.\r\n\t */\r\n\tpublic form(id: string): any {\r\n\t\tif (typeof id !== 'string') return {};\r\n\r\n\t\tif (!this._forms[id]) this._forms[id] = {};\r\n\r\n\t\treturn this._forms[id];\r\n\t}\r\n\r\n\t/**\r\n\t * Validates input values based on the specified type.\r\n\t *\r\n\t * @param value - The value to validate.\r\n\t * @param kind - The type of validation.\r\n\t * @param extra - Additional validation criteria.\r\n\t * @returns True if the value is valid, false otherwise.\r\n\t */\r\n\tpublic valid(value: any, kind = 'email', extra = 0): boolean {\r\n\t\tconst validators: { [key: string]: (value: any) => boolean } = {\r\n\t\t\temail: (value) => /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,10})+$/.test(value || ''),\r\n\t\t\ttext: (value) => typeof value === 'string',\r\n\t\t\tarray: (value) => Array.isArray(value),\r\n\t\t\tobject: (value) => typeof value === 'object' && !Array.isArray(value) && value !== null,\r\n\t\t\tnumber: (value) => typeof value === 'number',\r\n\t\t\tpassword: (value) => {\r\n\t\t\t\tif (!value) return false;\r\n\t\t\t\tswitch (extra) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))/.test(value || '');\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn /^(((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[@#$%&!-_]))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn !!value;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t};\r\n\r\n\t\treturn validators[kind] ? validators[kind](value) : false;\r\n\t}\r\n\r\n\t/**\r\n\t * Determines the strength of a password.\r\n\t *\r\n\t * @param value - The password to evaluate.\r\n\t * @returns The strength level of the password.\r\n\t */\r\n\tpublic level(value = ''): number {\r\n\t\tif (!value) return 0;\r\n\r\n\t\tlet level = 0;\r\n\r\n\t\tif (value.length > 8) level++;\r\n\r\n\t\tif (/[a-z]/.test(value)) level++;\r\n\r\n\t\tif (/[A-Z]/.test(value)) level++;\r\n\r\n\t\tif (/[1-9]/.test(value)) level++;\r\n\r\n\t\tif (/[`!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~]/.test(value)) level++;\r\n\r\n\t\treturn level;\r\n\t}\r\n\r\n\t/* CSS Management */\r\n\t/**\r\n\t * Saves the CSS variables to local storage.\r\n\t */\r\n\tprivate save(): void {\r\n\t\tlocalStorage.setItem('css_variables', JSON.stringify(this.variables));\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a CSS variable.\r\n\t *\r\n\t * @param key - The CSS variable name.\r\n\t * @param value - The CSS variable value.\r\n\t */\r\n\tprivate setProperty(key: string, value: string): void {\r\n\t\tdocument.documentElement.style.setProperty(key, value);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets multiple CSS variables.\r\n\t *\r\n\t * @param variables - The CSS variables to set.\r\n\t * @param opts - Options for setting the variables.\r\n\t */\r\n\tpublic set(variables: { [key: string]: string }, opts: any = {}): void {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = opts === 'local' ? { local: true } : { host: opts };\r\n\t\t}\r\n\t\tif (opts.host && window.location.host !== opts.host) return;\r\n\t\tfor (const key in variables) {\r\n\t\t\tif (opts.local) {\r\n\t\t\t\tthis.variables[key] = variables[key];\r\n\t\t\t} else if (this.variables[key]) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tthis.setProperty(key, variables[key]);\r\n\t\t}\r\n\t\tif (opts.local) this.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the stored CSS variables.\r\n\t *\r\n\t * @returns The stored CSS variables.\r\n\t */\r\n\tpublic get(): { [key: string]: string } {\r\n\t\treturn this.variables;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes specified CSS variables.\r\n\t *\r\n\t * @param keys - The keys of the CSS variables to remove.\r\n\t */\r\n\tpublic remove(keys: string | string[]): void {\r\n\t\tconst keyArray = Array.isArray(keys) ? keys : keys.split(' ');\r\n\r\n\t\tfor (const key of keyArray) {\r\n\t\t\tdelete this.variables[key];\r\n\t\t}\r\n\r\n\t\tthis.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Generates an array of sample data.\r\n\t *\r\n\t * @param arrLen - The length of the array.\r\n\t * @param type - The type of data to generate.\r\n\t * @returns An array of sample data.\r\n\t */\r\n\tpublic arr(arrLen = 10, type: string = 'number'): any[] {\r\n\t\tconst arr = [];\r\n\r\n\t\tfor (let i = 0; i < arrLen; i++) {\r\n\t\t\tswitch (type) {\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\tarr.push(i + 1);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\tarr.push(this.text());\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\tarr.push(new Date(new Date().getTime() + i * 86400000));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tarr.push(type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a random text string.\r\n\t *\r\n\t * @param length - The length of the text string.\r\n\t * @returns A random text string.\r\n\t */\r\n\tpublic text(length = 10): string {\r\n\t\tconst characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n\r\n\t\tlet result = '';\r\n\r\n\t\tfor (let i = 0; i < length; i++) {\r\n\t\t\tresult += characters.charAt(Math.floor(Math.random() * characters.length));\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n}\r\n","import { DOCUMENT, inject, provideEnvironmentInitializer } from '@angular/core';\r\nimport { Config, CONFIG_TOKEN, DEFAULT_CONFIG } from '../public-api';\r\n\r\nexport const themeProvider = () => {\r\n\treturn provideEnvironmentInitializer(() => {\r\n\t\tconst doc = inject(DOCUMENT);\r\n\r\n\t\tconst config = inject<Config>(CONFIG_TOKEN);\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-primary', config.theme?.primary || DEFAULT_CONFIG.theme?.primary || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-secondary', config.theme?.secondary || DEFAULT_CONFIG.theme?.secondary || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-info', config.theme?.info || DEFAULT_CONFIG.theme?.info || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-error', config.theme?.error || DEFAULT_CONFIG.theme?.error || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-success', config.theme?.success || DEFAULT_CONFIG.theme?.success || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-warning', config.theme?.warning || DEFAULT_CONFIG.theme?.warning || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-question', config.theme?.question || DEFAULT_CONFIG.theme?.question || '');\r\n\t});\r\n};\r\n","import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\r\nimport { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from './interfaces/config.interface';\r\nimport { themeProvider } from './theme';\r\n\r\nexport function provideWacom(config: Config = DEFAULT_CONFIG): EnvironmentProviders {\r\n\treturn makeEnvironmentProviders([\r\n\t\t{ provide: CONFIG_TOKEN, useValue: config },\r\n\t\tprovideHttpClient(withInterceptorsFromDi()),\r\n\t\tthemeProvider(),\r\n\t]);\r\n}\r\n","/* initialize */\r\nimport { CommonModule } from '@angular/common';\r\nimport { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { Config, CONFIG_TOKEN, DEFAULT_CONFIG } from './interfaces/config.interface';\r\n\r\n/* directives */\r\nimport { ClickOutsideDirective } from './directives/click-outside.directive';\r\nconst DIRECTIVES = [ClickOutsideDirective];\r\n\r\n/* pipes */\r\nimport { ArrPipe } from './pipes/arr.pipe';\r\nimport { MongodatePipe } from './pipes/mongodate.pipe';\r\nimport { PaginationPipe } from './pipes/pagination.pipe';\r\nimport { SafePipe } from './pipes/safe.pipe';\r\nimport { SearchPipe } from './pipes/search.pipe';\r\nimport { SplicePipe } from './pipes/splice.pipe';\r\nconst PIPES = [ArrPipe, SafePipe, SplicePipe, SearchPipe, MongodatePipe, PaginationPipe];\r\n\r\n/* components */\r\nimport { AlertComponent } from './components/alert/alert/alert.component';\r\nimport { WrapperComponent } from './components/alert/wrapper/wrapper.component';\r\nimport { FilesComponent } from './components/files/files.component';\r\nimport { LoaderComponent } from './components/loader/loader.component';\r\nimport { ModalComponent } from './components/modal/modal.component';\r\nimport { themeProvider } from './theme';\r\nconst LOCAL_COMPONENTS = [WrapperComponent, FilesComponent];\r\nconst COMPONENTS = [LoaderComponent, ModalComponent, AlertComponent];\r\n\r\n@NgModule({\r\n\timports: [CommonModule, FormsModule, ...LOCAL_COMPONENTS, ...PIPES, ...COMPONENTS, ...DIRECTIVES],\r\n\texports: [...PIPES, ...COMPONENTS, ...DIRECTIVES],\r\n\tproviders: [{ provide: CONFIG_TOKEN, useValue: DEFAULT_CONFIG }, provideHttpClient(withInterceptorsFromDi())],\r\n})\r\n/**\r\n * @deprecated Use provideWacom instead.\r\n */\r\nexport class WacomModule {\r\n\tstatic forRoot(config: Config = DEFAULT_CONFIG): ModuleWithProviders<WacomModule> {\r\n\t\treturn {\r\n\t\t\tngModule: WacomModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: CONFIG_TOKEN,\r\n\t\t\t\t\tuseValue: config,\r\n\t\t\t\t},\r\n\t\t\t\tthemeProvider(),\r\n\t\t\t],\r\n\t\t};\r\n\t}\r\n}\r\n","/*\r\n *\tInterfaces\r\n */\r\nexport * from './src/interfaces/alert.interface';\r\nexport * from './src/interfaces/config.interface';\r\nexport * from './src/interfaces/crud.interface';\r\nexport * from './src/interfaces/modal.interface';\r\n/*\r\n *\tGuard\r\n */\r\nexport * from './src/guard/meta.guard';\r\n/*\r\n *\tComponents\r\n */\r\nexport * from './src/components/alert/alert/alert.component';\r\nexport * from './src/components/base.component';\r\nexport * from './src/components/crud.component';\r\nexport * from './src/components/loader/loader.component';\r\nexport * from './src/components/modal/modal.component';\r\n/*\r\n *\tDirectives\r\n */\r\nexport * from './src/directives/click-outside.directive';\r\n/*\r\n *\tPipes\r\n */\r\nexport * from './src/pipes/arr.pipe';\r\nexport * from './src/pipes/mongodate.pipe';\r\nexport * from './src/pipes/number.pipe';\r\nexport * from './src/pipes/pagination.pipe';\r\nexport * from './src/pipes/safe.pipe';\r\nexport * from './src/pipes/search.pipe';\r\nexport * from './src/pipes/splice.pipe';\r\nexport * from './src/pipes/split.pipe';\r\n/*\r\n *\tServices\r\n */\r\nexport * from './src/services/alert.service';\r\nexport * from './src/services/base.service';\r\nexport * from './src/services/core.service';\r\nexport * from './src/services/crud.service';\r\nexport * from './src/services/dom.service';\r\nexport * from './src/services/file.service';\r\nexport * from './src/services/http.service';\r\nexport * from './src/services/loader.service';\r\nexport * from './src/services/meta.service';\r\nexport * from './src/services/modal.service';\r\nexport * from './src/services/rtc.service';\r\nexport * from './src/services/socket.service';\r\nexport * from './src/services/store.service';\r\nexport * from './src/services/time.service';\r\nexport * from './src/services/util.service';\r\n/*\r\n *\tInitial\r\n *\r\n *\tmake different kind of modules, one which import all, other for piece by piece\r\n */\r\nexport * from './src/provide-wacom';\r\nexport * from './src/wacom.module';\r\n/*\r\n *\tEnd of Support\r\n */\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","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AAE,iBAAiB,CAAC,sBAAsB,EAAE,CAAC,CAAC;AAC7G,iBAAA;;;AClCD;;AAEG;AAyDH;;AAEG;;AC7DH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"wacom.mjs","sources":["../../../projects/wacom/src/interfaces/alert.interface.ts","../../../projects/wacom/src/interfaces/config.interface.ts","../../../projects/wacom/src/interfaces/modal.interface.ts","../../../projects/wacom/src/services/meta.service.ts","../../../projects/wacom/src/guard/meta.guard.ts","../../../projects/wacom/src/components/alert/alert/alert.component.ts","../../../projects/wacom/src/components/alert/alert/alert.component.html","../../../projects/wacom/src/components/base.component.ts","../../../projects/wacom/src/components/alert/wrapper/wrapper.component.ts","../../../projects/wacom/src/components/alert/wrapper/wrapper.component.html","../../../projects/wacom/src/services/dom.service.ts","../../../projects/wacom/src/services/alert.service.ts","../../../projects/wacom/src/services/core.service.ts","../../../projects/wacom/src/components/crud.component.ts","../../../projects/wacom/src/components/loader/loader.component.ts","../../../projects/wacom/src/components/loader/loader.component.html","../../../projects/wacom/src/components/modal/modal.component.ts","../../../projects/wacom/src/components/modal/modal.component.html","../../../projects/wacom/src/directives/click-outside.directive.ts","../../../projects/wacom/src/pipes/arr.pipe.ts","../../../projects/wacom/src/pipes/mongodate.pipe.ts","../../../projects/wacom/src/pipes/number.pipe.ts","../../../projects/wacom/src/pipes/pagination.pipe.ts","../../../projects/wacom/src/pipes/safe.pipe.ts","../../../projects/wacom/src/pipes/search.pipe.ts","../../../projects/wacom/src/pipes/splice.pipe.ts","../../../projects/wacom/src/pipes/split.pipe.ts","../../../projects/wacom/src/services/base.service.ts","../../../projects/wacom/src/interfaces/http.interface.ts","../../../projects/wacom/src/services/store.service.ts","../../../projects/wacom/src/services/http.service.ts","../../../projects/wacom/src/services/crud.service.ts","../../../projects/wacom/src/components/files/files.component.ts","../../../projects/wacom/src/components/files/files.component.html","../../../projects/wacom/src/services/file.service.ts","../../../projects/wacom/src/interfaces/loader.interface.ts","../../../projects/wacom/src/services/loader.service.ts","../../../projects/wacom/src/services/modal.service.ts","../../../projects/wacom/src/services/rtc.service.ts","../../../projects/wacom/src/services/socket.service.ts","../../../projects/wacom/src/services/time.service.ts","../../../projects/wacom/src/services/util.service.ts","../../../projects/wacom/src/theme.ts","../../../projects/wacom/src/provide-wacom.ts","../../../projects/wacom/src/wacom.module.ts","../../../projects/wacom/public-api.ts","../../../projects/wacom/wacom.ts"],"sourcesContent":["import { Signal, Type } from '@angular/core';\r\n\r\n/**\r\n * Possible alert variants that control styling and default icons.\r\n */\r\nexport const ALERT_TYPES = ['info', 'error', 'success', 'warning', 'question'];\r\nexport type AlertType = (typeof ALERT_TYPES)[number];\r\n\r\n/**\r\n * Possible screen positions where alerts can be placed.\r\n */\r\nexport const ALERT_POSITIONS = ['topLeft', 'top', 'topRight', 'left', 'center', 'right', 'bottomLeft', 'bottom', 'bottomRight'];\r\nexport type AlertPosition = (typeof ALERT_POSITIONS)[number];\r\n\r\n/**\r\n * Configuration for a button rendered inside an alert.\r\n */\r\nexport interface AlertButton {\r\n\t/** Text displayed on the button. */\r\n\ttext: string;\r\n\t/** Optional click handler invoked when the button is pressed. */\r\n\tcallback?: () => void;\r\n}\r\n\r\n/**\r\n * Base options that can be supplied when showing an alert.\r\n */\r\nexport interface AlertConfig {\r\n\t/** Message text displayed to the user. */\r\n\ttext?: string;\r\n\t/** One of {@link ALERT_TYPES} determining alert style. */\r\n\ttype?: AlertType;\r\n\t/** Location on screen where the alert should appear. */\r\n\tposition?: AlertPosition;\r\n\t/** Optional action buttons displayed within the alert. */\r\n\tbuttons?: AlertButton[];\r\n\t/** Optional icon name to show with the message. */\r\n\ticon?: string;\r\n\t/** Custom CSS class applied to the alert container. */\r\n\tclass?: string;\r\n\t/** Identifier used to ensure only one alert with this key exists. */\r\n\tunique?: string;\r\n\t/** Whether to show a progress bar. */\r\n\tprogress?: boolean;\r\n\t/** Milliseconds before auto dismissal. */\r\n\ttimeout?: number;\r\n\t/** Callback executed when the alert is closed. */\r\n\tclose?: () => void;\r\n\tclosable?: boolean;\r\n}\r\n\r\nexport interface Alert extends AlertConfig {\r\n\t/** Unique identifier for the alert instance. */\r\n\tid?: number;\r\n\t/** Reactive signal tracking progress bar value. */\r\n\tprogressPercentage?: Signal<number>;\r\n\t/** Handler executed when the alert closes. */\r\n\tonClose?: () => void;\r\n\t/** Component rendered inside the alert body. */\r\n\tcomponent?: Type<unknown>;\r\n\t[x: string]: unknown;\r\n}\r\n\r\n/**\r\n * Default values applied when an alert is shown without specific options.\r\n */\r\nexport const DEFAULT_ALERT_CONFIG: Alert = {\r\n\ttext: '',\r\n\ttype: 'info',\r\n\tclass: '',\r\n\tprogress: true,\r\n\tposition: 'bottom',\r\n\ttimeout: 3000,\r\n\tclosable: true,\r\n\tbuttons: [],\r\n};\r\n","import { InjectionToken } from '@angular/core';\r\nimport { AlertConfig } from './alert.interface';\r\nimport { HttpConfig } from './http.interface';\r\nimport { LoaderConfig } from './loader.interface';\r\nimport { MetaConfig } from './meta.interface';\r\nimport { ModalConfig } from './modal.interface';\r\nimport { StoreConfig } from './store.interface';\r\n\r\n/**\r\n * Root configuration object used to initialize the library.\r\n * Each property allows consumers to override the default\r\n * behavior of the corresponding service.\r\n */\r\nexport interface Config {\r\n\t/** Options for the key‑value storage service. */\r\n\tstore?: StoreConfig;\r\n\t/** Defaults applied to page metadata handling. */\r\n\tmeta?: MetaConfig;\r\n\t/** Global settings for the alert service. */\r\n\talert?: AlertConfig;\r\n\t/** Default options for loader overlays. */\r\n\tloader?: LoaderConfig;\r\n\t/** Configuration for modal dialogs. */\r\n\tmodal?: ModalConfig;\r\n\t/** Base HTTP settings such as API URL and headers. */\r\n\thttp?: HttpConfig;\r\n\t/** Optional socket connection configuration. */\r\n\tsocket?: any;\r\n\t/** Raw Socket.IO client instance, if used. */\r\n\tio?: any;\r\n\ttheme?: {\r\n\t\tprimary: string;\r\n\t\tsecondary: string;\r\n\t\tinfo: string;\r\n\t\terror: string;\r\n\t\tsuccess: string;\r\n\t\twarning: string;\r\n\t\tquestion: string;\r\n\t};\r\n}\r\n\r\nexport const CONFIG_TOKEN = new InjectionToken<Config>('config');\r\n\r\nexport const DEFAULT_CONFIG: Config = {\r\n\tstore: {\r\n\t\tprefix: 'waStore',\r\n\t},\r\n\tmeta: {\r\n\t\tuseTitleSuffix: false,\r\n\t\twarnMissingGuard: true,\r\n\t\tdefaults: { links: {} },\r\n\t},\r\n\tsocket: false,\r\n\thttp: {\r\n\t\turl: '',\r\n\t\theaders: {},\r\n\t},\r\n\ttheme: {\r\n\t\tprimary: '#fff',\r\n\t\tsecondary: '#000',\r\n\t\tinfo: '#9ddeff',\r\n\t\terror: '#ffafb4',\r\n\t\tsuccess: '#a6efb8',\r\n\t\twarning: '#ffcfa5',\r\n\t\tquestion: '#fff9b2',\r\n\t},\r\n};\r\n","import { Signal, Type } from '@angular/core';\r\n\r\nexport const MODAL_SIZES = ['small', 'mid', 'big', 'full'];\r\nexport type ModalSizes = (typeof MODAL_SIZES)[number];\r\n\r\n/**\r\n * Configuration for a button rendered inside an modal.\r\n */\r\nexport interface ModalButton {\r\n\t/** Text displayed on the button. */\r\n\ttext: string;\r\n\t/** Optional click handler invoked when the button is pressed. */\r\n\tcallback?: () => void;\r\n}\r\n\r\nexport interface ModalConfig {\r\n\t/** Size of the modal window. */\r\n\tsize?: ModalSizes;\r\n\t/** Optional action buttons displayed within the Modal. */\r\n\tbuttons?: ModalButton[];\r\n\t/** Custom CSS class applied to the Modal container. */\r\n\tclass?: string;\r\n\t/** Identifier used to ensure only one Modal with this key exists. */\r\n\tunique?: string;\r\n\t/** Whether to show a progress bar. */\r\n\tprogress?: boolean;\r\n\t/** Milliseconds before auto dismissal. */\r\n\ttimeout?: number;\r\n\t/** Callback executed when the Modal is closed. */\r\n\tclose?: () => void;\r\n\t/** Allow closing the modal via UI controls. */\r\n\tclosable?: boolean;\r\n}\r\n\r\nexport interface Modal extends ModalConfig {\r\n\t/** Component used to render the modal content. */\r\n\tcomponent: Type<unknown>;\r\n\t/** Unique identifier for the modal instance. */\r\n\tid?: number;\r\n\t/** Signal emitting the current progress percentage. */\r\n\tprogressPercentage?: Signal<number>;\r\n\t/** Handler called when the user clicks outside the modal. */\r\n\tonClickOutside?: () => void;\r\n\t/** Callback executed when the modal closes. */\r\n\tonClose?: () => void;\r\n\t/** Callback executed when the modal opens. */\r\n\tonOpen?: () => void;\r\n\t[x: string]: unknown;\r\n}\r\n\r\nexport const DEFAULT_MODAL_CONFIG: ModalConfig = {\r\n\tsize: 'mid',\r\n\ttimeout: 0,\r\n\tclass: '',\r\n\tclosable: true,\r\n};\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { Meta, Title } from '@angular/platform-browser';\r\nimport { Route, Router } from '@angular/router';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config.interface';\r\nimport { MetaConfig, MetaDefaults } from '../interfaces/meta.interface';\r\n\r\nconst isDefined = (val: any) => typeof val !== 'undefined';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class MetaService {\r\n\tprivate _meta: MetaConfig;\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config,\r\n\t\tprivate router: Router,\r\n\t\tprivate meta: Meta,\r\n\t\tprivate titleService: Title,\r\n\t) {\r\n\t\tthis.config = this.config || DEFAULT_CONFIG;\r\n\r\n\t\tthis._meta = this.config.meta || {};\r\n\r\n\t\tthis._warnMissingGuard();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the default meta tags.\r\n\t *\r\n\t * @param defaults - The default meta tags.\r\n\t */\r\n\tsetDefaults(defaults: MetaDefaults) {\r\n\t\tthis._meta.defaults = {\r\n\t\t\t...this._meta.defaults,\r\n\t\t\t...defaults,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the title and optional title suffix.\r\n\t *\r\n\t * @param title - The title to set.\r\n\t * @param titleSuffix - The title suffix to append.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetTitle(title?: string, titleSuffix?: string): MetaService {\r\n\t\tlet titleContent = isDefined(title) ? title || '' : this._meta.defaults?.['title'] || '';\r\n\r\n\t\tif (this._meta.useTitleSuffix) {\r\n\t\t\ttitleContent += isDefined(titleSuffix) ? titleSuffix : this._meta.defaults?.['titleSuffix'] || '';\r\n\t\t}\r\n\r\n\t\tthis._updateMetaTag('title', titleContent);\r\n\r\n\t\tthis._updateMetaTag('og:title', titleContent);\r\n\r\n\t\tthis._updateMetaTag('twitter:title', titleContent);\r\n\r\n\t\tthis.titleService.setTitle(titleContent);\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets link tags.\r\n\t *\r\n\t * @param links - The links to set.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetLink(links: { [key: string]: string }): MetaService {\r\n\t\tObject.keys(links).forEach((rel) => {\r\n\t\t\tlet link: HTMLLinkElement = document.createElement('link');\r\n\r\n\t\t\tlink.setAttribute('rel', rel);\r\n\r\n\t\t\tlink.setAttribute('href', links[rel]);\r\n\r\n\t\t\tdocument.head.appendChild(link);\r\n\t\t});\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param value - The meta tag value.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tsetTag(tag: string, value: string, prop?: string) {\r\n\t\tif (tag === 'title' || tag === 'titleSuffix') {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Attempt to set ${tag} through 'setTag': 'title' and 'titleSuffix' are reserved. Use 'MetaService.setTitle' instead.`,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tconst content = (isDefined(value) ? value || '' : this._meta.defaults?.[tag] || '') + '';\r\n\r\n\t\tthis._updateMetaTag(tag, content, prop);\r\n\r\n\t\tif (tag === 'description') {\r\n\t\t\tthis._updateMetaTag('og:description', content, prop);\r\n\r\n\t\t\tthis._updateMetaTag('twitter:description', content, prop);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param value - The meta tag value.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tprivate _updateMetaTag(tag: string, value: string, prop?: string): void {\r\n\t\tprop = prop || (tag.startsWith('og:') || tag.startsWith('twitter:') ? 'property' : 'name');\r\n\r\n\t\tthis.meta.updateTag({ [prop]: tag, content: value });\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tremoveTag(tag: string, prop?: string): void {\r\n\t\tprop = prop || (tag.startsWith('og:') || tag.startsWith('twitter:') ? 'property' : 'name');\r\n\r\n\t\tthis.meta.removeTag(`${prop}=\"${tag}\"`);\r\n\t}\r\n\r\n\t/**\r\n\t * Warns about missing meta guards in routes.\r\n\t */\r\n\tprivate _warnMissingGuard(): void {\r\n\t\tif (isDefined(this._meta.warnMissingGuard) && !this._meta.warnMissingGuard) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst hasDefaultMeta = !!Object.keys(this._meta.defaults ?? {}).length;\r\n\r\n\t\tconst hasMetaGuardInArr = (it: any) => it && it.IDENTIFIER === 'MetaGuard';\r\n\r\n\t\tlet hasShownWarnings = false;\r\n\r\n\t\tconst checkRoute = (route: Route) => {\r\n\t\t\tconst hasRouteMeta = route.data && route.data['meta'];\r\n\r\n\t\t\tconst showWarning =\r\n\t\t\t\t!isDefined(route.redirectTo) && (hasDefaultMeta || hasRouteMeta) && !(route.canActivate || []).some(hasMetaGuardInArr);\r\n\r\n\t\t\tif (showWarning) {\r\n\t\t\t\tconsole.warn(\r\n\t\t\t\t\t`Route with path \"${route.path}\" has ${\r\n\t\t\t\t\t\thasRouteMeta ? '' : 'default '\r\n\t\t\t\t\t}meta tags, but does not use MetaGuard. Please add MetaGuard to the canActivate array in your route configuration`,\r\n\t\t\t\t);\r\n\t\t\t\thasShownWarnings = true;\r\n\t\t\t}\r\n\r\n\t\t\t(route.children || []).forEach(checkRoute);\r\n\t\t};\r\n\r\n\t\tthis.router.config.forEach(checkRoute);\r\n\r\n\t\tif (hasShownWarnings) {\r\n\t\t\tconsole.warn(\r\n\t\t\t\t`To disable these warnings, set metaConfig.warnMissingGuard: false in your MetaConfig passed to MetaModule.forRoot()`,\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config.interface';\r\nimport { MetaService } from '../services/meta.service';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class MetaGuard {\r\n\tpublic static IDENTIFIER = 'MetaGuard';\r\n\tprivate _meta: any;\r\n\tpublic constructor(\r\n\t\tprivate metaService: MetaService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config,\r\n\t) {\r\n\t\tif (!this.config) this.config = DEFAULT_CONFIG;\r\n\t\tthis._meta = this.config.meta || {};\r\n\t\tthis._meta.defaults = this._meta.defaults || {};\r\n\t}\r\n\tpublic canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n\t\tthis._processRouteMetaTags(route.data && route.data['meta']);\r\n\t\treturn true;\r\n\t}\r\n\tprivate _processRouteMetaTags(meta: any = {}) {\r\n\t\tif (meta.disableUpdate) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (meta.title) {\r\n\t\t\tthis.metaService.setTitle(meta.title, meta.titleSuffix);\r\n\t\t}\r\n\t\tif (meta.links && Object.keys(meta.links).length) {\r\n\t\t\tthis.metaService.setLink(meta.links);\r\n\t\t}\r\n\t\tif (this._meta.defaults?.links && Object.keys(this._meta.defaults.links).length) {\r\n\t\t\tthis.metaService.setLink(this._meta.defaults.links);\r\n\t\t}\r\n\t\tObject.keys(meta).forEach((prop) => {\r\n\t\t\tif (prop === 'title' || prop === 'titleSuffix' || prop === 'links') {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tObject.keys(meta[prop]).forEach((key) => {\r\n\t\t\t\tthis.metaService.setTag(key, meta[prop][key], prop);\r\n\t\t\t});\r\n\t\t});\r\n\t\tObject.keys(this._meta.defaults).forEach((key) => {\r\n\t\t\tif (key in meta || key === 'title' || key === 'titleSuffix' || key === 'links') {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.metaService.setTag(key, this._meta.defaults[key] as string);\r\n\t\t});\r\n\t}\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core';\r\nimport { AlertButton, AlertPosition, AlertType } from '../../../interfaces/alert.interface';\r\n\r\n@Component({\r\n\tselector: 'alert',\r\n\ttemplateUrl: './alert.component.html',\r\n\tstyleUrls: ['./alert.component.scss'],\r\n\timports: [CommonModule],\r\n})\r\n/**\r\n * Displays an individual alert message with optional icon, actions and\r\n * auto‑dismiss behaviour. All inputs are configured by the service when the\r\n * component is created dynamically.\r\n */\r\nexport class AlertComponent implements AfterViewInit {\r\n\t/** Reference to the DOM element hosting the alert. */\r\n\t@ViewChild('alertRef') alertRef!: ElementRef<HTMLDivElement>;\r\n\r\n\t/** Callback invoked to remove the alert from the DOM. */\r\n\tclose!: () => void;\r\n\r\n\t/** Text content displayed inside the alert. */\r\n\ttext!: string;\r\n\r\n\t/** Additional CSS classes applied to the alert container. */\r\n\tclass!: string;\r\n\r\n\t/** Type of alert which determines styling and icon. */\r\n\ttype: AlertType = 'info';\r\n\r\n\t/** Position on the screen where the alert appears. */\r\n\tposition: AlertPosition = 'bottom';\r\n\r\n\t/** Whether a progress bar indicating remaining time is shown. */\r\n\tprogress!: boolean;\r\n\r\n\t/** Icon name displayed alongside the message. */\r\n\ticon!: string;\r\n\r\n\t/** Time in milliseconds before the alert auto closes. */\r\n\ttimeout!: number;\r\n\r\n\t/** Determines if a manual close button is visible. */\r\n\tclosable!: boolean;\r\n\r\n\t/** Flag used to trigger the deletion animation. */\r\n\tdelete_animation = false;\r\n\r\n\t/** Optional action buttons rendered within the alert. */\r\n\tbuttons: AlertButton[] = [];\r\n\r\n\t/**\r\n\t * Starts the auto‑dismiss timer and pauses it while the alert is\r\n\t * hovered, resuming when the mouse leaves.\r\n\t */\r\n\tngAfterViewInit(): void {\r\n\t\tif (this.timeout) {\r\n\t\t\tlet remaining = JSON.parse(JSON.stringify(this.timeout));\r\n\r\n\t\t\tlet timer: number = window.setTimeout(() => {\r\n\t\t\t\tthis.remove();\r\n\t\t\t}, remaining);\r\n\r\n\t\t\tlet start = new Date();\r\n\r\n\t\t\tthis.alertRef.nativeElement.addEventListener(\r\n\t\t\t\t'mouseenter',\r\n\t\t\t\t() => {\r\n\t\t\t\t\tclearTimeout(timer);\r\n\r\n\t\t\t\t\tremaining -= new Date().getTime() - start.getTime();\r\n\t\t\t\t},\r\n\t\t\t\tfalse,\r\n\t\t\t);\r\n\r\n\t\t\tthis.alertRef.nativeElement.addEventListener(\r\n\t\t\t\t'mouseleave',\r\n\t\t\t\t() => {\r\n\t\t\t\t\tstart = new Date();\r\n\r\n\t\t\t\t\tclearTimeout(timer);\r\n\r\n\t\t\t\t\ttimer = window.setTimeout(() => {\r\n\t\t\t\t\t\tthis.remove();\r\n\t\t\t\t\t}, remaining);\r\n\t\t\t\t},\r\n\t\t\t\tfalse,\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Triggers the closing animation and invokes the provided close\r\n\t * callback once finished.\r\n\t */\r\n\tremove(callback?: () => void) {\r\n\t\tif (this._removed) return;\r\n\r\n\t\tthis._removed = true;\r\n\r\n\t\tcallback?.();\r\n\r\n\t\tthis.delete_animation = true;\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.close();\r\n\r\n\t\t\tthis.delete_animation = false;\r\n\t\t}, 350);\r\n\t}\r\n\tprivate _removed = false;\r\n}\r\n","@if (text) {\r\n\t<div class=\"wacom-alert wacom-alert--auto-height\" [class.wacom-alert--closing]=\"delete_animation\" [ngClass]=\"class\">\r\n\t\t<div [ngClass]=\"'wacom-alert__content--color-' + type\" class=\"wacom-alert__content wacom-alert__content--bounce-in-up\" #alertRef>\r\n\t\t\t@if (progress) {\r\n\t\t\t\t<div class=\"wacom-alert__progress\">\r\n\t\t\t\t\t<span\r\n\t\t\t\t\t\tclass=\"wacom-alert__progress-bar\"\r\n\t\t\t\t\t\t[ngClass]=\"'wacom-alert__progress-bar--' + type\"\r\n\t\t\t\t\t\t[ngStyle]=\"{\r\n\t\t\t\t\t\t\t'animation-duration': (timeout + 350) / 1000 + 's',\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></span>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t\t<div class=\"wacom-alert__body\">\r\n\t\t\t\t<div class=\"wacom-alert__texts\">\r\n\t\t\t\t\t@if (icon) {\r\n\t\t\t\t\t\t<div class=\"{{ icon }}\"></div>\r\n\t\t\t\t\t}\r\n\t\t\t\t\t<div class=\"wacom-alert__message wacom-alert__message--slide-in\">\r\n\t\t\t\t\t\t{{ text }}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t@if (type === \"question\") {\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t@for (button of buttons; track button.text) {\r\n\t\t\t\t\t\t\t<button (click)=\"remove(button.callback)\" class=\"wacom-alert__button\">\r\n\t\t\t\t\t\t\t\t{{ button.text }}\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t\t@if (closable) {\r\n\t\t\t\t\t<div class=\"wacom-alert__close\" (click)=\"remove()\"></div>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n}\r\n","/**\n * BaseComponent is an abstract class that provides basic functionality for managing the current timestamp.\n */\nexport abstract class BaseComponent {\n\t/**\n\t * The current timestamp in milliseconds since the Unix epoch.\n\t */\n\tnow = new Date().getTime();\n\n\t/**\n\t * Refreshes the `now` property with the current timestamp.\n\t */\n\trefreshNow(): void {\n\t\tthis.now = new Date().getTime();\n\t}\n}\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-wrapper',\r\n\ttemplateUrl: './wrapper.component.html',\r\n\tstyleUrls: ['./wrapper.component.scss'],\r\n\timports: [],\r\n})\r\n/**\r\n * Container component that provides placeholder elements for alert instances\r\n * rendered in different screen positions.\r\n */\r\nexport class WrapperComponent {}\r\n","<div class=\"wacom-wrapper\">\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--top-left\" id=\"topLeft\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--top\" id=\"top\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--top-right\" id=\"topRight\"></div>\r\n\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--left\" id=\"left\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--center\" id=\"center\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--right\" id=\"right\"></div>\r\n\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--bottom-left\" id=\"bottomLeft\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--bottom\" id=\"bottom\"></div>\r\n\t<div class=\"wacom-wrapper__alert wacom-wrapper__alert--bottom-right\" id=\"bottomRight\"></div>\r\n</div>\r\n","import {\r\n\tApplicationRef,\r\n\tComponentRef,\r\n\tEmbeddedViewRef,\r\n\tEnvironmentInjector,\r\n\tInjectable,\r\n\tType,\r\n\tcreateComponent,\r\n\tinject,\r\n} from '@angular/core';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\n/**\r\n * Utility service for programmatically creating and interacting with Angular\r\n * components within the DOM.\r\n */\r\nexport class DomService {\r\n\t/**\r\n\t * Appends a component to a specified element by ID.\r\n\t *\r\n\t * @param component - The component to append.\r\n\t * @param options - The options to project into the component.\r\n\t * @param id - The ID of the element to append the component to.\r\n\t * @returns An object containing the native element and the component reference.\r\n\t */\r\n\tappendById<T>(component: Type<T>, options: Partial<T> = {}, id: string): DomComponent<T> {\r\n\t\tconst componentRef = createComponent(component, {\r\n\t\t\tenvironmentInjector: this._injector,\r\n\t\t});\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\r\n\t\tthis._appRef.attachView(componentRef.hostView);\r\n\r\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<T>).rootNodes[0] as HTMLElement;\r\n\r\n\t\tconst element = document.getElementById(id);\r\n\r\n\t\tif (element && typeof element.appendChild === 'function') {\r\n\t\t\telement.appendChild(domElem);\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnativeElement: domElem,\r\n\t\t\tcomponentRef: componentRef,\r\n\t\t\tremove: () => this.removeComponent(componentRef),\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Appends a component to a specified element or to the body.\r\n\t *\r\n\t * @param component - The component to append.\r\n\t * @param options - The options to project into the component.\r\n\t * @param element - The element to append the component to. Defaults to body.\r\n\t * @returns An object containing the native element and the component reference.\r\n\t */\r\n\tappendComponent<T>(\r\n\t\tcomponent: Type<T>,\r\n\t\toptions: Partial<T & { providedIn?: string }> = {},\r\n\t\telement: HTMLElement = document.body,\r\n\t): DomComponent<T> | void {\r\n\t\tif (options.providedIn) {\r\n\t\t\tif (this._providedIn[options.providedIn]) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._providedIn[options.providedIn] = true;\r\n\t\t}\r\n\r\n\t\tconst componentRef = createComponent(component, {\r\n\t\t\tenvironmentInjector: this._injector,\r\n\t\t});\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\r\n\t\tthis._appRef.attachView(componentRef.hostView);\r\n\r\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<T>).rootNodes[0] as HTMLElement;\r\n\r\n\t\tif (element && typeof element.appendChild === 'function') {\r\n\t\t\telement.appendChild(domElem);\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnativeElement: domElem,\r\n\t\t\tcomponentRef: componentRef,\r\n\t\t\tremove: () => this.removeComponent(componentRef, options.providedIn),\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a reference to a dynamically created component.\r\n\t *\r\n\t * @param component - The component to create.\r\n\t * @param options - The options to project into the component.\r\n\t * @returns The component reference.\r\n\t */\r\n\tgetComponentRef<T>(component: Type<T>, options: Partial<T> = {}): ComponentRef<T> {\r\n\t\tconst componentRef = createComponent(component, {\r\n\t\t\tenvironmentInjector: this._injector,\r\n\t\t});\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\r\n\t\tthis._appRef.attachView(componentRef.hostView);\r\n\r\n\t\treturn componentRef;\r\n\t}\r\n\r\n\t/**\r\n\t * Projects the inputs onto the component.\r\n\t *\r\n\t * @param component - The component reference.\r\n\t * @param options - The options to project into the component.\r\n\t * @returns The component reference with the projected inputs.\r\n\t */\r\n\tprivate projectComponentInputs<T>(component: ComponentRef<T>, options: Partial<T>): ComponentRef<T> {\r\n\t\tif (options) {\r\n\t\t\tconst props = Object.getOwnPropertyNames(options);\r\n\r\n\t\t\tfor (const prop of props) {\r\n\t\t\t\t(component.instance as any)[prop] = (options as any)[prop];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn component;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a previously attached component and optionally clears its\r\n\t * unique `providedIn` flag.\r\n\t *\r\n\t * @param componentRef - Reference to the component to be removed.\r\n\t * @param providedIn - Optional key used to track unique instances.\r\n\t */\r\n\tremoveComponent<T>(componentRef: ComponentRef<T>, providedIn?: string): void {\r\n\t\tthis._appRef.detachView(componentRef.hostView);\r\n\r\n\t\tcomponentRef.destroy();\r\n\r\n\t\tif (providedIn) {\r\n\t\t\tdelete this._providedIn[providedIn];\r\n\t\t}\r\n\t}\r\n\r\n\t/** Reference to the root application used for view attachment. */\r\n\tprivate _appRef = inject(ApplicationRef);\r\n\r\n\t/** Injector utilized when creating dynamic components. */\r\n\tprivate _injector = inject(EnvironmentInjector);\r\n\r\n\t/**\r\n\t * Flags to ensure components with a specific `providedIn` key are only\r\n\t * instantiated once at a time.\r\n\t */\r\n\tprivate _providedIn: Record<string, boolean> = {};\r\n}\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { AlertComponent } from '../components/alert/alert/alert.component';\r\nimport { WrapperComponent } from '../components/alert/wrapper/wrapper.component';\r\nimport { Alert, AlertConfig, DEFAULT_ALERT_CONFIG } from '../interfaces/alert.interface';\r\nimport { Config, CONFIG_TOKEN } from '../interfaces/config.interface';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\nimport { DomService } from './dom.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class AlertService {\r\n\t/**\r\n\t * Creates a new alert service.\r\n\t *\r\n\t * @param config Optional global configuration provided via the\r\n\t * `CONFIG_TOKEN` injection token.\r\n\t * @param _dom Service responsible for DOM manipulation and dynamic\r\n\t * component creation.\r\n\t */\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() config: Config,\r\n\t\tprivate _dom: DomService,\r\n\t) {\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_ALERT_CONFIG,\r\n\t\t\t...(config?.alert || {}),\r\n\t\t};\r\n\r\n\t\tthis._container = this._dom.appendComponent(WrapperComponent)!;\r\n\t}\r\n\r\n\t/**\r\n\t * Displays an alert. Accepts either an options object or a simple string\r\n\t * which will be used as the alert text.\r\n\t *\r\n\t * @returns Reference to the created alert or embedded component\r\n\t * element.\r\n\t */\r\n\tshow(opts: Alert | string): Alert {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\tif (opts.unique && this._alerts.find((m) => m.unique === opts.unique)) {\r\n\t\t\treturn this._alerts.find((m) => m.unique === opts.unique) as Alert;\r\n\t\t}\r\n\r\n\t\tthis._alerts.push(opts);\r\n\r\n\t\topts.id ||= Math.floor(Math.random() * Date.now()) + Date.now();\r\n\r\n\t\tif (!opts.type) opts.type = 'info';\r\n\r\n\t\tif (!opts.position) opts.position = 'bottomRight';\r\n\r\n\t\tlet alertComponent: DomComponent<AlertComponent> | undefined;\r\n\r\n\t\tlet content: DomComponent<any> | undefined;\r\n\r\n\t\topts.close = () => {\r\n\t\t\tcontent?.remove();\r\n\r\n\t\t\talertComponent?.remove();\r\n\r\n\t\t\tcontent = undefined;\r\n\r\n\t\t\talertComponent = undefined;\r\n\r\n\t\t\tif (typeof (opts as Alert).onClose == 'function') {\r\n\t\t\t\t(opts as Alert).onClose?.();\r\n\t\t\t}\r\n\r\n\t\t\tthis._alerts.splice(\r\n\t\t\t\tthis._alerts.findIndex((m) => m.id === opts.id),\r\n\t\t\t\t1,\r\n\t\t\t);\r\n\t\t};\r\n\r\n\t\talertComponent = this._dom.appendById(AlertComponent, opts, opts.position);\r\n\r\n\t\tif (typeof opts.component === 'function') {\r\n\t\t\tcontent = this._dom.appendComponent(\r\n\t\t\t\topts.component,\r\n\t\t\t\topts as Partial<{ providedIn?: string | undefined }>,\r\n\t\t\t\tthis._container.nativeElement.children[0].children[this._positionNumber[opts.position] || 0] as HTMLElement,\r\n\t\t\t)!;\r\n\t\t}\r\n\r\n\t\tif (typeof opts.timeout !== 'number') {\r\n\t\t\topts.timeout = 3000;\r\n\t\t}\r\n\r\n\t\tif (opts.timeout) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\topts.close?.();\r\n\t\t\t}, opts.timeout);\r\n\t\t}\r\n\r\n\t\treturn opts;\r\n\t}\r\n\r\n\t/**\r\n\t * Convenience alias for `show`.\r\n\t */\r\n\topen(opts: Alert) {\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays an informational alert.\r\n\t */\r\n\tinfo(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'info';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays a success alert.\r\n\t */\r\n\tsuccess(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'success';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays a warning alert.\r\n\t */\r\n\twarning(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'warning';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays an error alert.\r\n\t */\r\n\terror(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'error';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Displays a question alert.\r\n\t */\r\n\tquestion(opts: Alert) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.type = 'question';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Removes all alert elements from the document.\r\n\t */\r\n\tdestroy() {\r\n\t\tfor (let i = this._alerts.length - 1; i >= 0; i--) {\r\n\t\t\tthis._alerts[i].close?.();\r\n\t\t}\r\n\t}\r\n\tprivate _alerts: Alert[] = [];\r\n\r\n\t/** Merged configuration applied to new alerts. */\r\n\tprivate _config: AlertConfig;\r\n\r\n\t/** Wrapper component that contains all alert placeholders. */\r\n\tprivate _container: DomComponent<WrapperComponent>;\r\n\r\n\t/** Mapping of alert positions to wrapper child indexes. */\r\n\tprivate _positionNumber: Record<string, number> = {\r\n\t\ttopLeft: 0,\r\n\t\ttop: 1,\r\n\t\ttopRight: 2,\r\n\t\tleft: 3,\r\n\t\tcenter: 4,\r\n\t\tright: 5,\r\n\t\tbottomLeft: 6,\r\n\t\tbottom: 7,\r\n\t\tbottomRight: 8,\r\n\t};\r\n\r\n\tprivate _opts(opts: Alert | string): Alert {\r\n\t\treturn typeof opts === 'string'\r\n\t\t\t? {\r\n\t\t\t\t\t...this._config,\r\n\t\t\t\t\ttext: opts,\r\n\t\t\t\t}\r\n\t\t\t: {\r\n\t\t\t\t\t...this._config,\r\n\t\t\t\t\t...opts,\r\n\t\t\t\t};\r\n\t}\r\n}\r\n","import { Inject, Injectable, PLATFORM_ID, Signal, WritableSignal, signal } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { Selectitem } from '../interfaces/select.item.interface';\r\n\r\n// Add capitalize method to String prototype if it doesn't already exist\r\nif (!String.prototype.capitalize) {\r\n\tString.prototype.capitalize = function (): string {\r\n\t\tif (this.length > 0) {\r\n\t\t\treturn this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();\r\n\t\t}\r\n\t\treturn '';\r\n\t};\r\n}\r\n\r\n// Extend the String interface to include the new method\r\ndeclare global {\r\n\tinterface String {\r\n\t\tcapitalize(): string;\r\n\t}\r\n}\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class CoreService {\r\n\tdeviceID = localStorage.getItem('deviceID') || (typeof crypto?.randomUUID === 'function' ? crypto.randomUUID() : this.UUID());\r\n\r\n\tconstructor(@Inject(PLATFORM_ID) private platformId: boolean) {\r\n\t\tlocalStorage.setItem('deviceID', this.deviceID);\r\n\r\n\t\tthis.detectDevice();\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a UUID (Universally Unique Identifier) version 4.\r\n\t *\r\n\t * This implementation uses `Math.random()` to generate random values,\r\n\t * making it suitable for general-purpose identifiers, but **not** for\r\n\t * cryptographic or security-sensitive use cases.\r\n\t *\r\n\t * The format follows the UUID v4 standard: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`\r\n\t * where:\r\n\t * - `x` is a random hexadecimal digit (0–f)\r\n\t * - `4` indicates UUID version 4\r\n\t * - `y` is one of 8, 9, A, or B\r\n\t *\r\n\t * Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479`\r\n\t *\r\n\t * @returns A string containing a UUID v4.\r\n\t */\r\n\tUUID(): string {\r\n\t\treturn 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c: string) => {\r\n\t\t\tconst r = (Math.random() * 16) | 0;\r\n\t\t\tconst v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n\t\t\treturn v.toString(16);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Converts an object to an array. Optionally holds keys instead of values.\r\n\t *\r\n\t * @param {any} obj - The object to be converted.\r\n\t * @param {boolean} [holder=false] - If true, the keys will be held in the array; otherwise, the values will be held.\r\n\t * @returns {any[]} The resulting array.\r\n\t */\r\n\tota(obj: any, holder: boolean = false): any[] {\r\n\t\tif (Array.isArray(obj)) return obj;\r\n\t\tif (typeof obj !== 'object' || obj === null) return [];\r\n\t\tconst arr = [];\r\n\t\tfor (const each in obj) {\r\n\t\t\tif (obj.hasOwnProperty(each) && (obj[each] || typeof obj[each] === 'number' || typeof obj[each] === 'boolean')) {\r\n\t\t\t\tif (holder) {\r\n\t\t\t\t\tarr.push(each);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tarr.push(obj[each]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes elements from `fromArray` that are present in `removeArray` based on a comparison field.\r\n\t *\r\n\t * @param {any[]} removeArray - The array of elements to remove.\r\n\t * @param {any[]} fromArray - The array from which to remove elements.\r\n\t * @param {string} [compareField='_id'] - The field to use for comparison.\r\n\t * @returns {any[]} The modified `fromArray` with elements removed.\r\n\t */\r\n\tsplice(removeArray: any[], fromArray: any[], compareField: string = '_id'): any[] {\r\n\t\tif (!Array.isArray(removeArray) || !Array.isArray(fromArray)) {\r\n\t\t\treturn fromArray;\r\n\t\t}\r\n\r\n\t\tconst removeSet = new Set(removeArray.map((item) => item[compareField]));\r\n\t\treturn fromArray.filter((item) => !removeSet.has(item[compareField]));\r\n\t}\r\n\r\n\t/**\r\n\t * Unites multiple _id values into a single unique _id.\r\n\t * The resulting _id is unique regardless of the order of the input _id values.\r\n\t *\r\n\t * @param {...string[]} args - The _id values to be united.\r\n\t * @returns {string} The unique combined _id.\r\n\t */\r\n\tids2id(...args: string[]): string {\r\n\t\targs.sort((a, b) => {\r\n\t\t\tif (Number(a.toString().substring(0, 8)) > Number(b.toString().substring(0, 8))) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t});\r\n\r\n\t\treturn args.join();\r\n\t}\r\n\r\n\t// After While\r\n\tprivate _afterWhile: Record<string, number> = {};\r\n\t/**\r\n\t * Delays the execution of a callback function for a specified amount of time.\r\n\t * If called again within that time, the timer resets.\r\n\t *\r\n\t * @param {string | object | (() => void)} doc - A unique identifier for the timer, an object to host the timer, or the callback function.\r\n\t * @param {() => void} [cb] - The callback function to execute after the delay.\r\n\t * @param {number} [time=1000] - The delay time in milliseconds.\r\n\t */\r\n\tafterWhile(doc: string | object | (() => void), cb?: () => void, time: number = 1000): void {\r\n\t\tif (typeof doc === 'function') {\r\n\t\t\tcb = doc as () => void;\r\n\t\t\tdoc = 'common';\r\n\t\t}\r\n\r\n\t\tif (typeof cb === 'function' && typeof time === 'number') {\r\n\t\t\tif (typeof doc === 'string') {\r\n\t\t\t\tclearTimeout(this._afterWhile[doc]);\r\n\t\t\t\tthis._afterWhile[doc] = window.setTimeout(cb, time);\r\n\t\t\t} else if (typeof doc === 'object') {\r\n\t\t\t\tclearTimeout((doc as { __afterWhile: number }).__afterWhile);\r\n\t\t\t\t(doc as { __afterWhile: number }).__afterWhile = window.setTimeout(cb, time);\r\n\t\t\t} else {\r\n\t\t\t\tconsole.warn('badly configured after while');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Recursively copies properties from one object to another.\r\n\t * Handles nested objects, arrays, and Date instances appropriately.\r\n\t *\r\n\t * @param from - The source object from which properties are copied.\r\n\t * @param to - The target object to which properties are copied.\r\n\t */\r\n\tcopy(from: any, to: any) {\r\n\t\tfor (const each in from) {\r\n\t\t\tif (typeof from[each] !== 'object' || from[each] instanceof Date || Array.isArray(from[each]) || from[each] === null) {\r\n\t\t\t\tto[each] = from[each];\r\n\t\t\t} else {\r\n\t\t\t\tif (typeof to[each] !== 'object' || to[each] instanceof Date || Array.isArray(to[each]) || to[each] === null) {\r\n\t\t\t\t\tto[each] = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.copy(from[each], to[each]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Device management\r\n\tdevice = '';\r\n\t/**\r\n\t * Detects the device type based on the user agent.\r\n\t */\r\n\tdetectDevice(): void {\r\n\t\tconst userAgent = navigator.userAgent || navigator.vendor || (window as any).opera;\r\n\t\tif (/windows phone/i.test(userAgent)) {\r\n\t\t\tthis.device = 'Windows Phone';\r\n\t\t} else if (/android/i.test(userAgent)) {\r\n\t\t\tthis.device = 'Android';\r\n\t\t} else if (/iPad|iPhone|iPod/.test(userAgent) && !(window as any).MSStream) {\r\n\t\t\tthis.device = 'iOS';\r\n\t\t} else {\r\n\t\t\tthis.device = 'Web';\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a mobile device.\r\n\t * @returns {boolean} - Returns true if the device is a mobile device.\r\n\t */\r\n\tisMobile(): boolean {\r\n\t\treturn this.device === 'Windows Phone' || this.device === 'Android' || this.device === 'iOS';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a tablet.\r\n\t * @returns {boolean} - Returns true if the device is a tablet.\r\n\t */\r\n\tisTablet(): boolean {\r\n\t\treturn this.device === 'iOS' && /iPad/.test(navigator.userAgent);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a web browser.\r\n\t * @returns {boolean} - Returns true if the device is a web browser.\r\n\t */\r\n\tisWeb(): boolean {\r\n\t\treturn this.device === 'Web';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is an Android device.\r\n\t * @returns {boolean} - Returns true if the device is an Android device.\r\n\t */\r\n\tisAndroid(): boolean {\r\n\t\treturn this.device === 'Android';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is an iOS device.\r\n\t * @returns {boolean} - Returns true if the device is an iOS device.\r\n\t */\r\n\tisIos(): boolean {\r\n\t\treturn this.device === 'iOS';\r\n\t}\r\n\r\n\t// Version management\r\n\tversion = '1.0.0';\r\n\r\n\tappVersion = '';\r\n\r\n\tdateVersion = '';\r\n\r\n\t/**\r\n\t * Sets the combined version string based on appVersion and dateVersion.\r\n\t */\r\n\tsetVersion(): void {\r\n\t\tthis.version = this.appVersion || '';\r\n\r\n\t\tthis.version += this.version && this.dateVersion ? ' ' : '';\r\n\r\n\t\tthis.version += this.dateVersion || '';\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the app version and updates the combined version string.\r\n\t *\r\n\t * @param {string} appVersion - The application version to set.\r\n\t */\r\n\tsetAppVersion(appVersion: string): void {\r\n\t\tthis.appVersion = appVersion;\r\n\r\n\t\tthis.setVersion();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the date version and updates the combined version string.\r\n\t *\r\n\t * @param {string} dateVersion - The date version to set.\r\n\t */\r\n\tsetDateVersion(dateVersion: string): void {\r\n\t\tthis.dateVersion = dateVersion;\r\n\r\n\t\tthis.setVersion();\r\n\t}\r\n\r\n\t// Signal management\r\n\tprivate _signals: Record<string, Subject<any>> = {};\r\n\r\n\t/**\r\n\t * Emits a signal, optionally passing data to the listeners.\r\n\t * @param signal - The name of the signal to emit.\r\n\t * @param data - Optional data to pass to the listeners.\r\n\t */\r\n\temit(signal: string, data?: any): void {\r\n\t\tif (!this._signals[signal]) {\r\n\t\t\tthis._signals[signal] = new Subject<any>();\r\n\t\t}\r\n\r\n\t\tthis._signals[signal].next(data);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an Observable that emits values when the specified signal is emitted.\r\n\t * Multiple components or services can subscribe to this Observable to be notified of the signal.\r\n\t * @param signal - The name of the signal to listen for.\r\n\t * @returns An Observable that emits when the signal is emitted.\r\n\t */\r\n\ton(signal: string): Observable<any> {\r\n\t\tif (!this._signals[signal]) {\r\n\t\t\tthis._signals[signal] = new Subject<any>();\r\n\t\t}\r\n\r\n\t\treturn this._signals[signal].asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Completes the Subject for a specific signal, effectively stopping any future emissions.\r\n\t * This also unsubscribes all listeners for the signal.\r\n\t * @param signal - The name of the signal to stop.\r\n\t */\r\n\toff(signal: string): void {\r\n\t\tif (!this._signals[signal]) return;\r\n\t\tthis._signals[signal].complete();\r\n\t\tdelete this._signals[signal];\r\n\t}\r\n\r\n\t// Await management\r\n\tprivate _completed: Record<string, unknown> = {};\r\n\r\n\tprivate _completeResolvers: Record<string, ((doc: unknown) => void)[]> = {};\r\n\r\n\t/**\r\n\t * Marks a task as complete.\r\n\t * @param task - The task to mark as complete, identified by a string.\r\n\t */\r\n\tcomplete(task: string, document: unknown = true): void {\r\n\t\tthis._completed[task] = document;\r\n\r\n\t\tif (this._completeResolvers[task]) {\r\n\t\t\tthis._completeResolvers[task].forEach((resolve) => resolve(document));\r\n\r\n\t\t\tthis._completeResolvers[task] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Waits for one or more tasks to be marked as complete.\r\n\t *\r\n\t * @param {string | string[]} tasks - The task or array of tasks to wait for.\r\n\t * @returns {Promise<unknown>} A promise that resolves when all specified tasks are complete.\r\n\t * - If a single task is provided, resolves with its completion result.\r\n\t * - If multiple tasks are provided, resolves with an array of results in the same order.\r\n\t *\r\n\t * @remarks\r\n\t * If any task is not yet completed, a resolver is attached. The developer is responsible for managing\r\n\t * resolver cleanup if needed. Resolvers remain after resolution and are not removed automatically.\r\n\t */\r\n\tonComplete(tasks: string | string[]): Promise<unknown> {\r\n\t\tif (typeof tasks === 'string') {\r\n\t\t\ttasks = [tasks];\r\n\t\t}\r\n\r\n\t\tif (this._isCompleted(tasks)) {\r\n\t\t\treturn Promise.resolve(tasks.length > 1 ? tasks.map((task) => this._completed[task]) : this._completed[tasks[0]]);\r\n\t\t}\r\n\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tfor (const task of tasks) {\r\n\t\t\t\tif (!this._completeResolvers[task]) {\r\n\t\t\t\t\tthis._completeResolvers[task] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._completeResolvers[task].push(this._allCompleted(tasks, resolve));\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a resolver function that checks if all given tasks are completed,\r\n\t * and if so, calls the provided resolve function with their results.\r\n\t *\r\n\t * @param {string[]} tasks - The list of task names to monitor for completion.\r\n\t * @param {(value: unknown) => void} resolve - The resolver function to call once all tasks are complete.\r\n\t * @returns {(doc: unknown) => void} A function that can be registered as a resolver for each task.\r\n\t *\r\n\t * @remarks\r\n\t * This function does not manage or clean up resolvers. It assumes the developer handles any potential duplicates or memory concerns.\r\n\t */\r\n\tprivate _allCompleted(tasks: string[], resolve: (value: unknown) => void): (doc: unknown) => void {\r\n\t\treturn (doc: unknown) => {\r\n\t\t\tif (this._isCompleted(tasks)) {\r\n\t\t\t\tresolve(tasks.length > 1 ? tasks.map((task) => this._completed[task]) : this._completed[tasks[0]]);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Checks whether all specified tasks have been marked as completed.\r\n\t *\r\n\t * @param {string[]} tasks - The array of task names to check.\r\n\t * @returns {boolean} `true` if all tasks are completed, otherwise `false`.\r\n\t */\r\n\tprivate _isCompleted(tasks: string[]): boolean {\r\n\t\tfor (const task of tasks) {\r\n\t\t\tif (!this._completed[task]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a task is completed.\r\n\t * @param task - The task to check, identified by a string.\r\n\t * @returns True if the task is completed, false otherwise.\r\n\t */\r\n\tcompleted(task: string): unknown {\r\n\t\treturn this._completed[task];\r\n\t}\r\n\r\n\t/**\r\n\t * Clears the completed state for a specific task.\r\n\t *\r\n\t * This removes the task from the internal `_completed` store,\r\n\t * allowing it to be awaited again in the future if needed.\r\n\t * It does not affect pending resolvers or trigger any callbacks.\r\n\t *\r\n\t * @param task - The task identifier to clear from completed state.\r\n\t */\r\n\tclearCompleted(task: string) {\r\n\t\tdelete this._completed[task];\r\n\t}\r\n\r\n\t// Locking management\r\n\tprivate _locked: Record<string, boolean> = {};\r\n\tprivate _unlockResolvers: Record<string, (() => void)[]> = {};\r\n\r\n\t/**\r\n\t * Locks a resource to prevent concurrent access.\r\n\t * @param which - The resource to lock, identified by a string.\r\n\t */\r\n\tlock(which: string): void {\r\n\t\tthis._locked[which] = true;\r\n\r\n\t\tif (!this._unlockResolvers[which]) {\r\n\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Unlocks a resource, allowing access.\r\n\t * @param which - The resource to unlock, identified by a string.\r\n\t */\r\n\tunlock(which: string): void {\r\n\t\tthis._locked[which] = false;\r\n\r\n\t\tif (this._unlockResolvers[which]) {\r\n\t\t\tthis._unlockResolvers[which].forEach((resolve) => resolve());\r\n\r\n\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a Promise that resolves when the specified resource is unlocked.\r\n\t * @param which - The resource to watch for unlocking, identified by a string.\r\n\t * @returns A Promise that resolves when the resource is unlocked.\r\n\t */\r\n\tonUnlock(which: string): Promise<void> {\r\n\t\tif (!this._locked[which]) {\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tif (!this._unlockResolvers[which]) {\r\n\t\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t\t}\r\n\r\n\t\t\tthis._unlockResolvers[which].push(resolve);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a resource is locked.\r\n\t * @param which - The resource to check, identified by a string.\r\n\t * @returns True if the resource is locked, false otherwise.\r\n\t */\r\n\tlocked(which: string): boolean {\r\n\t\treturn !!this._locked[which];\r\n\t}\r\n\r\n\t// Linking management\r\n\tlinkCollections: string[] = [];\r\n\tlinkRealCollectionName: Record<string, string> = {};\r\n\tlinkIds: Record<string, Selectitem[]> = {};\r\n\r\n\taddLink(name: string, reset: () => Selectitem[], realName = ''): void {\r\n\t\tthis.linkCollections.push(name);\r\n\r\n\t\tthis.linkRealCollectionName[name] = realName || name;\r\n\r\n\t\tthis.onComplete(name.toLowerCase() + '_loaded').then(() => {\r\n\t\t\tthis.linkIds[name] = reset();\r\n\t\t});\r\n\r\n\t\tthis.on(name.toLowerCase() + '_changed').subscribe(() => {\r\n\t\t\tthis.linkIds[name].splice(0, this.linkIds[name].length);\r\n\r\n\t\t\tthis.linkIds[name].push(...reset());\r\n\t\t});\r\n\t}\r\n\r\n\t// Angular Signals //\r\n\t/**\r\n\t * Converts a plain object into a signal-wrapped object.\r\n\t * Optionally wraps specific fields of the object as individual signals,\r\n\t * and merges them into the returned signal for fine-grained reactivity.\r\n\t *\r\n\t * @template Document - The type of the object being wrapped.\r\n\t * @param {Document} document - The plain object to wrap into a signal.\r\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\r\n\t * Optional map where each key is a field name and the value is a function\r\n\t * to extract the initial value for that field. These fields will be wrapped\r\n\t * as separate signals and embedded in the returned object.\r\n\t *\r\n\t * @returns {Signal<Document>} A signal-wrapped object, possibly containing\r\n\t * nested field signals for more granular control.\r\n\t *\r\n\t * @example\r\n\t * const user = { _id: '1', name: 'Alice', score: 42 };\r\n\t * const sig = toSignal(user, { score: (u) => u.score });\r\n\t * console.log(sig().name); // 'Alice'\r\n\t * console.log(sig().score()); // 42 — field is now a signal\r\n\t */\r\n\ttoSignal<Document>(document: Document, signalFields: Record<string, (doc: Document) => unknown> = {}): Signal<Document> {\r\n\t\tif (Object.keys(signalFields).length) {\r\n\t\t\tconst fields: Record<string, Signal<unknown>> = {};\r\n\r\n\t\t\tfor (const key in signalFields) {\r\n\t\t\t\tfields[key] = signal(signalFields[key](document));\r\n\t\t\t}\r\n\r\n\t\t\treturn signal({ ...document, ...fields });\r\n\t\t} else {\r\n\t\t\treturn signal(document);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Converts an array of objects into an array of Angular signals.\r\n\t * Optionally wraps specific fields of each object as individual signals.\r\n\t *\r\n\t * @template Document - The type of each object in the array.\r\n\t * @param {Document[]} arr - Array of plain objects to convert into signals.\r\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\r\n\t * Optional map where keys are field names and values are functions that extract the initial value\r\n\t * from the object. These fields will be turned into separate signals.\r\n\t *\r\n\t * @returns {Signal<Document>[]} An array where each item is a signal-wrapped object,\r\n\t * optionally with individual fields also wrapped in signals.\r\n\t *\r\n\t * @example\r\n\t * toSignalsArray(users, {\r\n\t * name: (u) => u.name,\r\n\t * score: (u) => u.score,\r\n\t * });\r\n\t */\r\n\ttoSignalsArray<Document>(arr: Document[], signalFields: Record<string, (doc: Document) => unknown> = {}): Signal<Document>[] {\r\n\t\treturn arr.map((obj) => this.toSignal(obj, signalFields));\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a new object to the signals array.\r\n\t * Optionally wraps specific fields of the object as individual signals before wrapping the whole object.\r\n\t *\r\n\t * @template Document - The type of the object being added.\r\n\t * @param {Signal<Document>[]} signals - The signals array to append to.\r\n\t * @param {Document} item - The object to wrap and push as a signal.\r\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\r\n\t * Optional map of fields to be wrapped as signals within the object.\r\n\t *\r\n\t * @returns {void}\r\n\t */\r\n\tpushSignal<Document>(signals: Signal<Document>[], item: Document, signalFields: Record<string, (doc: Document) => unknown> = {}): void {\r\n\t\tsignals.push(this.toSignal(item, signalFields));\r\n\t}\r\n\r\n\t/**\r\n\t * Removes the first signal from the array whose object's field matches the provided value.\r\n\t * @template Document\r\n\t * @param {WritableSignal<Document>[]} signals - The signals array to modify.\r\n\t * @param {unknown} value - The value to match.\r\n\t * @param {string} [field='_id'] - The object field to match against.\r\n\t * @returns {void}\r\n\t */\r\n\tremoveSignalByField<Document extends Record<string, unknown>>(\r\n\t\tsignals: WritableSignal<Document>[],\r\n\t\tvalue: unknown,\r\n\t\tfield: string = '_id',\r\n\t): void {\r\n\t\tconst idx = signals.findIndex((sig) => sig()[field] === value);\r\n\r\n\t\tif (idx > -1) signals.splice(idx, 1);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a generic trackBy function for *ngFor, tracking by the specified object field.\r\n\t * @template Document\r\n\t * @param {string} field - The object field to use for tracking (e.g., '_id').\r\n\t * @returns {(index: number, sig: Signal<Document>) => unknown} TrackBy function for Angular.\r\n\t */\r\n\ttrackBySignalField<Document extends Record<string, unknown>>(field: string) {\r\n\t\treturn (_: number, sig: Signal<Document>) => sig()[field];\r\n\t}\r\n\r\n\t/**\r\n\t * Finds the first signal in the array whose object's field matches the provided value.\r\n\t * @template Document\r\n\t * @param {Signal<Document>[]} signals - Array of signals to search.\r\n\t * @param {unknown} value - The value to match.\r\n\t * @param {string} [field='_id'] - The object field to match against.\r\n\t * @returns {Signal<Document> | undefined} The found signal or undefined if not found.\r\n\t */\r\n\tfindSignalByField<Document extends Record<string, unknown>>(\r\n\t\tsignals: Signal<Document>[],\r\n\t\tvalue: unknown,\r\n\t\tfield = '_id',\r\n\t): Signal<Document> | undefined {\r\n\t\treturn signals.find((sig) => sig()[field] === value) as Signal<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the first writable signal in the array whose object's field matches the provided value.\r\n\t * @template Document\r\n\t * @param {WritableSignal<Document>[]} signals - Array of writable signals to search.\r\n\t * @param {unknown} value - The value to match.\r\n\t * @param {(val: Document) => Document} updater - Function to produce the updated object.\r\n\t * @param {string} field - The object field to match against.\r\n\t * @returns {void}\r\n\t */\r\n\tupdateSignalByField<Document extends Record<string, unknown>>(\r\n\t\tsignals: WritableSignal<Document>[],\r\n\t\tvalue: unknown,\r\n\t\tupdater: (val: Document) => Document,\r\n\t\tfield: string,\r\n\t): void {\r\n\t\tconst sig = this.findSignalByField<Document>(signals, value, field) as WritableSignal<Document>;\r\n\r\n\t\tif (sig) sig.update(updater);\r\n\t}\r\n}\r\n","import { ChangeDetectorRef, inject, Signal, signal, WritableSignal } from '@angular/core';\r\nimport { firstValueFrom } from 'rxjs';\r\nimport { CrudDocument, CrudOptions, CrudServiceInterface, TableConfig } from '../interfaces/crud.interface';\r\nimport { AlertService } from '../services/alert.service';\r\nimport { CoreService } from '../services/core.service';\r\n\r\n/**\r\n * Interface representing the shape of a form service used by the CrudComponent.\r\n * The consuming app must provide a service that implements this structure.\r\n */\r\ninterface FormServiceInterface<FormInterface> {\r\n\tprepareForm: (form: FormInterface) => any;\r\n\tmodal: <T>(form: any, options?: any, doc?: T) => Promise<T>;\r\n\tmodalDocs: <T>(docs: T[]) => Promise<T[]>;\r\n\tmodalUnique: <T>(collection: string, key: string, doc: T) => void;\r\n\talert?: {\r\n\t\tquestion: (config: { text: string; buttons: { text: string; callback?: () => void }[] }) => void;\r\n\t};\r\n}\r\n\r\n/**\r\n * Abstract reusable base class for CRUD list views.\r\n * It encapsulates pagination, modals, and document handling logic.\r\n *\r\n * @template Service - A service implementing CrudServiceInterface for a specific document type\r\n * @template Document - The data model extending CrudDocument\r\n */\r\nexport abstract class CrudComponent<Service extends CrudServiceInterface<Document>, Document extends CrudDocument, FormInterface> {\r\n\t/** Service responsible for data fetching, creating, updating, deleting */\r\n\tprotected crudService: Service;\r\n\r\n\t/** The array of documents currently loaded and shown */\r\n\tprotected documents = signal<Signal<Document>[]>([]);\r\n\r\n\t/** The reactive form instance generated from the provided config */\r\n\tprotected form: any;\r\n\r\n\t/** Current pagination page */\r\n\tprotected page = 1;\r\n\r\n\t/** CoreService handles timing and copying helpers */\r\n\tprivate __core = inject(CoreService);\r\n\r\n\t/** AlertService handles alerts */\r\n\tprivate __alert = inject(AlertService);\r\n\r\n\t/** ChangeDetectorRef handles on push strategy */\r\n\tprivate __cdr = inject(ChangeDetectorRef);\r\n\r\n\t/** Internal reference to form service matching FormServiceInterface */\r\n\tprivate __form: FormServiceInterface<FormInterface>;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t *\r\n\t * @param formConfig - Object describing form title and its component structure\r\n\t * @param formService - Any service that conforms to FormServiceInterface (usually casted)\r\n\t * @param translateService - An object providing a translate() method for i18n\r\n\t * @param crudService - CRUD service implementing get/create/update/delete\r\n\t */\r\n\tconstructor(\r\n\t\tformConfig: unknown,\r\n\t\tprotected formService: unknown,\r\n\t\tprotected translateService: { translate: (key: string) => string },\r\n\t\tcrudService: Service,\r\n\t\tmodule = '',\r\n\t) {\r\n\t\tconst form = formConfig as FormInterface;\r\n\r\n\t\tthis.__form = formService as FormServiceInterface<FormInterface>;\r\n\r\n\t\tthis.form = this.__form.prepareForm(form);\r\n\r\n\t\tthis.crudService = crudService;\r\n\r\n\t\tthis._module = module;\r\n\t}\r\n\r\n\t/**\r\n\t * Loads documents for a given page.\r\n\t */\r\n\tprotected setDocuments(page = this.page): Promise<void> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tif (this.configType === 'server') {\r\n\t\t\t\tthis.page = page;\r\n\r\n\t\t\t\tthis.__core.afterWhile(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t() => {\r\n\t\t\t\t\t\tthis.crudService.get({ page }, this.getOptions()).subscribe((docs: Document[]) => {\r\n\t\t\t\t\t\t\tthis.documents.update(() => this.__core.toSignalsArray(docs));\r\n\r\n\t\t\t\t\t\t\tresolve();\r\n\r\n\t\t\t\t\t\t\tthis.__cdr.markForCheck();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\t\t\t\t\t250,\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tthis.documents.update(() => this.__core.toSignalsArray(this.crudService.getDocs()));\r\n\r\n\t\t\t\tthis.crudService.loaded.then(() => {\r\n\t\t\t\t\tresolve();\r\n\r\n\t\t\t\t\tthis.__cdr.markForCheck();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/** Fields considered when performing bulk updates. */\r\n\tprotected updatableFields = ['_id', 'name', 'description', 'data'];\r\n\r\n\t/**\r\n\t * Clears temporary metadata before document creation.\r\n\t */\r\n\tprotected preCreate(doc: Document): void {\r\n\t\tdelete doc.__created;\r\n\t}\r\n\r\n\t/**\r\n\t * Funciton which controls whether the create functionality is available.\r\n\t */\r\n\tprotected allowCreate(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Funciton which controls whether the update and delete functionality is available.\r\n\t */\r\n\tprotected allowMutate(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Funciton which controls whether the unique url functionality is available.\r\n\t */\r\n\tprotected allowUrl(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/** Determines whether manual sorting controls are available. */\r\n\tprotected allowSort(): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Funciton which prepare get crud options.\r\n\t */\r\n\tprotected getOptions(): CrudOptions<Document> {\r\n\t\treturn {} as CrudOptions<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Handles bulk creation and updating of documents.\r\n\t * In creation mode, adds new documents.\r\n\t * In update mode, syncs changes and deletes removed entries.\r\n\t */\r\n\tprotected bulkManagement(create = true): () => void {\r\n\t\treturn (): void => {\r\n\t\t\tthis.__form\r\n\t\t\t\t.modalDocs<Document>(\r\n\t\t\t\t\tcreate\r\n\t\t\t\t\t\t? []\r\n\t\t\t\t\t\t: this.documents().map(\r\n\t\t\t\t\t\t\t\t(obj: any) => Object.fromEntries(this.updatableFields.map((key) => [key, obj()[key]])) as Document,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t)\r\n\t\t\t\t.then(async (docs: Document[]) => {\r\n\t\t\t\t\tif (create) {\r\n\t\t\t\t\t\tfor (const doc of docs) {\r\n\t\t\t\t\t\t\tthis.preCreate(doc);\r\n\r\n\t\t\t\t\t\t\tawait firstValueFrom(this.crudService.create(doc));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (const document of this.documents()) {\r\n\t\t\t\t\t\t\tif (!docs.find((d) => d._id === document()._id)) {\r\n\t\t\t\t\t\t\t\tawait firstValueFrom(this.crudService.delete(document()));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (const doc of docs) {\r\n\t\t\t\t\t\t\tconst local = this.documents().find((document) => document()._id === doc._id);\r\n\r\n\t\t\t\t\t\t\tif (local) {\r\n\t\t\t\t\t\t\t\t(local as WritableSignal<Document>).update((document) => {\r\n\t\t\t\t\t\t\t\t\tthis.__core.copy(doc, document);\r\n\r\n\t\t\t\t\t\t\t\t\treturn document;\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tawait firstValueFrom(this.crudService.update(local()));\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.preCreate(doc);\r\n\r\n\t\t\t\t\t\t\t\tawait firstValueFrom(this.crudService.create(doc));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.setDocuments();\r\n\t\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\t/** Opens a modal to create a new document. */\r\n\tprotected create() {\r\n\t\tthis.__form.modal<Document>(this.form, {\r\n\t\t\tlabel: 'Create',\r\n\t\t\tclick: async (created: unknown, close: () => void) => {\r\n\t\t\t\tclose();\r\n\t\t\t\tthis.preCreate(created as Document);\r\n\r\n\t\t\t\tawait firstValueFrom(this.crudService.create(created as Document));\r\n\r\n\t\t\t\tthis.setDocuments();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\t/** Displays a modal to edit an existing document. */\r\n\tprotected update(doc: Document) {\r\n\t\tthis.__form.modal<Document>(this.form, [], doc).then((updated: Document) => {\r\n\t\t\tthis.__core.copy(updated, doc);\r\n\r\n\t\t\tthis.crudService.update(doc);\r\n\r\n\t\t\tthis.__cdr.markForCheck();\r\n\t\t});\r\n\t}\r\n\r\n\t/** Requests confirmation before deleting the provided document. */\r\n\tprotected delete(doc: Document) {\r\n\t\tthis.__alert.question({\r\n\t\t\ttext: this.translateService.translate(`Common.Are you sure you want to delete this${this._module ? ' ' + this._module : ''}?`),\r\n\t\t\tbuttons: [\r\n\t\t\t\t{ text: this.translateService.translate('Common.No') },\r\n\t\t\t\t{\r\n\t\t\t\t\ttext: this.translateService.translate('Common.Yes'),\r\n\t\t\t\t\tcallback: async (): Promise<void> => {\r\n\t\t\t\t\t\tawait firstValueFrom(this.crudService.delete(doc));\r\n\r\n\t\t\t\t\t\tthis.setDocuments();\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t});\r\n\t}\r\n\r\n\t/** Opens a modal to edit the document's unique URL. */\r\n\tprotected mutateUrl(doc: Document) {\r\n\t\tthis.__form.modalUnique<Document>(this._module, 'url', doc);\r\n\t}\r\n\r\n\t/** Moves the given document one position up and updates ordering. */\r\n\tprotected moveUp(doc: Document) {\r\n\t\tconst index = this.documents().findIndex((document) => document()._id === doc._id);\r\n\r\n\t\tif (index) {\r\n\t\t\tthis.documents.update((documents) => {\r\n\t\t\t\tdocuments.splice(index, 1);\r\n\r\n\t\t\t\tdocuments.splice(index - 1, 0, this.__core.toSignal(doc));\r\n\r\n\t\t\t\treturn documents;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < this.documents().length; i++) {\r\n\t\t\tif (this.documents()[i]().order !== i) {\r\n\t\t\t\tthis.documents()[i]().order = i;\r\n\r\n\t\t\t\tthis.crudService.update(this.documents()[i]());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.__cdr.markForCheck();\r\n\t}\r\n\r\n\t/** Data source mode used for document retrieval. */\r\n\tprotected configType: 'server' | 'local' = 'server';\r\n\r\n\t/** Number of documents fetched per page when paginating. */\r\n\tprotected perPage = 20;\r\n\r\n\t/**\r\n\t * Configuration object used by the UI for rendering table and handling actions.\r\n\t */\r\n\tprotected getConfig(): TableConfig<Document> {\r\n\t\tconst config = {\r\n\t\t\tcreate: this.allowCreate()\r\n\t\t\t\t? (): void => {\r\n\t\t\t\t\t\tthis.create();\r\n\t\t\t\t\t}\r\n\t\t\t\t: null,\r\n\r\n\t\t\tupdate: this.allowMutate()\r\n\t\t\t\t? (doc: Document): void => {\r\n\t\t\t\t\t\tthis.update(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t: null,\r\n\r\n\t\t\tdelete: this.allowMutate()\r\n\t\t\t\t? (doc: Document): void => {\r\n\t\t\t\t\t\tthis.delete(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t: null,\r\n\r\n\t\t\tbuttons: [\r\n\t\t\t\tthis.allowUrl() && this._module\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\ticon: 'cloud_download',\r\n\t\t\t\t\t\t\tclick: (doc: Document): void => {\r\n\t\t\t\t\t\t\t\tthis.mutateUrl(doc);\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t: null,\r\n\t\t\t\tthis.allowSort()\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\ticon: 'arrow_upward',\r\n\t\t\t\t\t\t\tclick: (doc: Document): void => {\r\n\t\t\t\t\t\t\t\tthis.moveUp(doc);\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t: null,\r\n\t\t\t],\r\n\r\n\t\t\theaderButtons: [\r\n\t\t\t\tthis.allowCreate()\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\ticon: 'playlist_add',\r\n\t\t\t\t\t\t\tclick: this.bulkManagement(),\r\n\t\t\t\t\t\t\tclass: 'playlist',\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t: null,\r\n\t\t\t\tthis.allowMutate()\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\ticon: 'edit_note',\r\n\t\t\t\t\t\t\tclick: this.bulkManagement(false),\r\n\t\t\t\t\t\t\tclass: 'edit',\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t: null,\r\n\t\t\t],\r\n\t\t\tallDocs: true,\r\n\t\t};\r\n\r\n\t\treturn this.configType === 'server'\r\n\t\t\t? {\r\n\t\t\t\t\t...config,\r\n\t\t\t\t\tpaginate: this.setDocuments.bind(this),\r\n\t\t\t\t\tperPage: this.perPage,\r\n\t\t\t\t\tsetPerPage: this.crudService.setPerPage?.bind(this.crudService),\r\n\t\t\t\t\tallDocs: false,\r\n\t\t\t\t}\r\n\t\t\t: config;\r\n\t}\r\n\r\n\t/** Name of the collection or module used for contextual actions. */\r\n\tprivate _module = '';\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit, Signal } from '@angular/core';\r\n\r\n@Component({\r\n\ttemplateUrl: './loader.component.html',\r\n\tstyleUrls: ['./loader.component.scss'],\r\n\timports: [CommonModule],\r\n})\r\nexport class LoaderComponent implements OnInit {\r\n\tclose!: () => void;\r\n\r\n\ttext!: string;\r\n\r\n\tclass!: string;\r\n\r\n\tprogress!: boolean;\r\n\r\n\tprogressPercentage?: Signal<number>;\r\n\r\n\ttimeout!: number;\r\n\r\n\tclosable!: boolean;\r\n\r\n\tngOnInit(): void {\r\n\t\tif (this.timeout) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.close();\r\n\t\t\t}, this.timeout);\r\n\t\t}\r\n\t}\r\n}\r\n","<div class=\"wacom-loader\" [ngClass]=\"class\">\r\n\t@if (progressPercentage) {\r\n\t\t<div class=\"wacom-loader__progress\">\r\n\t\t\t<span class=\"wacom-loader__progress-bar\" [style.width.%]=\"progressPercentage()\" style=\"animation: none\"></span>\r\n\t\t</div>\r\n\t} @else if (progress) {\r\n\t\t<div class=\"wacom-loader__progress\">\r\n\t\t\t<span\r\n\t\t\t\tclass=\"wacom-loader__progress-bar\"\r\n\t\t\t\t[ngStyle]=\"{\r\n\t\t\t\t\t'animation-duration': (timeout + 350) / 1000 + 's',\r\n\t\t\t\t}\"\r\n\t\t\t></span>\r\n\t\t</div>\r\n\t}\r\n\t@if (closable) {\r\n\t\t<span class=\"wacom-loader__close\" (click)=\"close()\">×</span>\r\n\t}\r\n\t@if (text) {\r\n\t\t<span class=\"wacom-loader__text\">\r\n\t\t\t{{ text }}\r\n\t\t</span>\r\n\t}\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-modal',\r\n\ttemplateUrl: './modal.component.html',\r\n\tstyleUrls: ['./modal.component.scss'],\r\n\tstandalone: true,\r\n\timports: [CommonModule],\r\n})\r\nexport class ModalComponent implements OnInit {\r\n\tclosable: boolean = true;\r\n\tclose: any;\r\n\tonOpen: any;\r\n\ttimestart: any;\r\n\ttimeout: any;\r\n\tallowClose = true;\r\n\tonClickOutside: any;\r\n\tngOnInit() {\r\n\t\tif (typeof this.onClickOutside !== 'function') {\r\n\t\t\tthis.onClickOutside = this.close;\r\n\t\t\t// this.onClickOutside = () => {\r\n\t\t\t// \tif (this.allowClose) {\r\n\t\t\t// \t\tthis.close();\r\n\t\t\t// \t}\r\n\r\n\t\t\t// \tthis.allowClose = true;\r\n\t\t\t// };\r\n\t\t}\r\n\r\n\t\tif (typeof this.onOpen == 'function') this.onOpen();\r\n\r\n\t\twindow.addEventListener('popstate', this.popStateListener.bind(this));\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\twindow.removeEventListener('popstate', this.popStateListener.bind(this));\r\n\t}\r\n\r\n\tpopStateListener(e: Event) {\r\n\t\tthis.close();\r\n\t}\r\n}\r\n","<div class=\"wacom-modal\" (click)=\"onClickOutside()\">\r\n\t<div class=\"wacom-modal__content\" (click)=\"$event.stopPropagation()\">\r\n\t\t<div><!-- Content Will Drop Here --></div>\r\n\t\t<span class=\"wacom-modal__close\" (click)=\"close()\" *ngIf=\"closable\">×</span>\r\n\t</div>\r\n</div>\r\n","import { ChangeDetectorRef, DestroyRef, Directive, ElementRef, inject, output } from '@angular/core';\r\n\r\n/**\r\n * Stand-alone “click outside” directive (zoneless-safe).\r\n *\r\n * Usage:\r\n * <div (clickOutside)=\"close()\">…</div>\r\n */\r\n@Directive({\r\n\tselector: '[clickOutside]',\r\n})\r\nexport class ClickOutsideDirective {\r\n\treadonly clickOutside = output<MouseEvent>();\r\n\r\n\tconstructor() {\r\n\t\tdocument.addEventListener('pointerdown', this.handler, true);\r\n\r\n\t\t// cleanup\r\n\t\tthis._dref.onDestroy(() => document.removeEventListener('pointerdown', this.handler, true));\r\n\t}\r\n\r\n\tprivate _host = inject(ElementRef<HTMLElement>);\r\n\r\n\tprivate _cdr = inject(ChangeDetectorRef);\r\n\r\n\tprivate _dref = inject(DestroyRef);\r\n\r\n\tprivate handler = (e: MouseEvent): void => {\r\n\t\tif (!this._host.nativeElement.contains(e.target as Node)) {\r\n\t\t\tthis.clickOutside.emit(e); // notify parent\r\n\t\t\tthis._cdr.markForCheck(); // trigger CD for OnPush comps\r\n\t\t}\r\n\t};\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'arr',\r\n})\r\nexport class ArrPipe implements PipeTransform {\r\n\ttransform(data: any, type?: any, refresh?: any): any {\r\n\t\tif (!data) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tif (typeof data == 'string') return data.split(type || ' ');\r\n\r\n\t\tif (Array.isArray(data)) {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tif (typeof data != 'object') {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tlet arr = [];\r\n\r\n\t\tfor (let each in data) {\r\n\t\t\tif (!data[each]) continue;\r\n\r\n\t\t\tif (type == 'prop') {\r\n\t\t\t\tarr.push(each);\r\n\t\t\t} else if (type == 'value') {\r\n\t\t\t\tarr.push(data[each]);\r\n\t\t\t} else {\r\n\t\t\t\tarr.push({\r\n\t\t\t\t\tprop: each,\r\n\t\t\t\t\tvalue: data[each],\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'mongodate',\r\n})\r\nexport class MongodatePipe implements PipeTransform {\r\n\ttransform(_id: any) {\r\n\t\tif (!_id) return new Date();\r\n\r\n\t\tlet timestamp = _id.toString().substring(0, 8);\r\n\r\n\t\treturn new Date(parseInt(timestamp, 16) * 1000);\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'number',\r\n})\r\nexport class NumberPipe implements PipeTransform {\r\n\ttransform(value: unknown): number {\r\n\t\tconst result = Number(value); // Convert value to a number\r\n\r\n\t\treturn isNaN(result) ? 0 : result; // Return 0 if conversion fails\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'page',\r\n\tpure: false,\r\n})\r\nexport class PaginationPipe implements PipeTransform {\r\n\ttransform(arr: any, config: any, sort: any, search = ''): any {\r\n\t\tif (!Array.isArray(arr)) return [];\r\n\r\n\t\tarr = arr.slice();\r\n\r\n\t\tfor (let i = 0; i < arr.length; i++) {\r\n\t\t\tarr[i].num = i + 1;\r\n\t\t}\r\n\r\n\t\tif (sort.direction) {\r\n\t\t\tarr.sort((a: any, b: any) => {\r\n\t\t\t\tif (a[sort.title] < b[sort.title]) {\r\n\t\t\t\t\treturn sort.direction == 'desc' ? 1 : -1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (a[sort.title] > b[sort.title]) {\r\n\t\t\t\t\treturn sort.direction == 'desc' ? -1 : 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn 0;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn arr.slice((config.page - 1) * config.perPage, config.page * config.perPage);\r\n\t}\r\n}\r\n","import { inject, Pipe } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n@Pipe({\r\n\tname: 'safe',\r\n})\r\nexport class SafePipe {\r\n\ttransform(html: any) {\r\n\t\treturn this._sanitizer.bypassSecurityTrustResourceUrl(html);\r\n\t}\r\n\r\n\tprivate _sanitizer = inject(DomSanitizer);\r\n}\r\n","import { Pipe, PipeTransform, Signal, isSignal } from '@angular/core';\r\n\r\ntype Query = string | string[] | Record<string, unknown> | Signal<string | string[] | Record<string, unknown> | undefined>;\r\n\r\ntype Field = string | string[] | number | Signal<string | string[] | number | undefined>;\r\n\r\n@Pipe({ name: 'search', pure: true })\r\nexport class SearchPipe implements PipeTransform {\r\n\ttransform<T>(items: T[] | Record<string, T>, query?: Query, fields?: Field, limit?: number, ignore = false, _reload?: unknown): T[] {\r\n\t\t/* unwrap signals */\r\n\t\tconst q = isSignal(query) ? query() : query;\r\n\r\n\t\tlet f = isSignal(fields) ? fields() : fields;\r\n\r\n\t\t/* allow “fields” to be a number (=limit) */\r\n\t\tif (typeof f === 'number') {\r\n\t\t\tlimit = f;\r\n\r\n\t\t\tf = undefined;\r\n\t\t}\r\n\r\n\t\tconst docs = Array.isArray(items) ? items : Object.values(items);\r\n\r\n\t\tif (ignore || !q) return limit ? docs.slice(0, limit) : docs;\r\n\r\n\t\t/* normalise fields */\r\n\t\tconst paths: string[] = !f ? ['name'] : Array.isArray(f) ? f : f.trim().split(/\\s+/);\r\n\r\n\t\t/* normalise query */\r\n\t\tconst needles: string[] = Array.isArray(q)\r\n\t\t\t? q.map((s) => s.toLowerCase())\r\n\t\t\t: typeof q === 'object'\r\n\t\t\t\t? Object.keys(q)\r\n\t\t\t\t\t\t.filter((k) => (q as any)[k])\r\n\t\t\t\t\t\t.map((k) => k.toLowerCase())\r\n\t\t\t\t: [q.toLowerCase()];\r\n\r\n\t\tconst txtMatches = (val: any) => {\r\n\t\t\tif (val == null) return false;\r\n\r\n\t\t\tconst hay = val.toString().toLowerCase();\r\n\r\n\t\t\treturn needles.some((n) => hay.includes(n) || n.includes(hay));\r\n\t\t};\r\n\r\n\t\tconst walk = (obj: any, parts: string[]): boolean => {\r\n\t\t\tif (!obj) return false;\r\n\r\n\t\t\tconst [head, ...rest] = parts;\r\n\r\n\t\t\tconst next = obj[head];\r\n\r\n\t\t\tif (Array.isArray(next)) return next.some((v) => (rest.length ? walk(v, rest) : txtMatches(v)));\r\n\r\n\t\t\treturn rest.length ? walk(next, rest) : txtMatches(next);\r\n\t\t};\r\n\r\n\t\tconst out: T[] = [];\r\n\r\n\t\tconst seen = new Set<number | string>();\r\n\r\n\t\tconst check = (doc: T, key: number | string) => {\r\n\t\t\tfor (const p of paths) {\r\n\t\t\t\tif (walk(doc, p.split('.'))) {\r\n\t\t\t\t\tif (!seen.has(key)) {\r\n\t\t\t\t\t\tout.push(doc);\r\n\r\n\t\t\t\t\t\tseen.add(key);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tArray.isArray(items) ? docs.forEach((d, i) => check(d, i)) : Object.entries(items).forEach(([k, v]) => check(v, k));\r\n\r\n\t\treturn limit ? out.slice(0, limit) : out;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'splice',\r\n})\r\nexport class SplicePipe implements PipeTransform {\r\n\ttransform(from: any, which: any, refresh?: number): any {\r\n\t\tif (Array.isArray(from)) from = { arr: from, prop: '_id' };\r\n\r\n\t\tlet arr = (which.keep && []) || from.arr.slice();\r\n\r\n\t\tif (Array.isArray(which)) which = { arr: which, prop: '_id' };\r\n\r\n\t\tfor (let i = from.arr.length - 1; i >= 0; i--) {\r\n\t\t\tfor (let j = 0; j < which.arr.length; j++) {\r\n\t\t\t\tif (from.prop && which.prop) {\r\n\t\t\t\t\tif (from.arr[i][from.prop] == which.arr[j][which.prop]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (from.prop) {\r\n\t\t\t\t\tif (from.arr[i][from.prop] == which.arr[j]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (which.prop) {\r\n\t\t\t\t\tif (from.arr[i] == which.arr[j][which.prop]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (from.arr[i] == which.arr[j]) {\r\n\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'split',\r\n})\r\nexport class SplitPipe implements PipeTransform {\r\n\ttransform(value: string, index = 0, devider = ':'): unknown {\r\n\t\tconst arr = value.split(devider);\r\n\r\n\t\treturn arr.length > index ? arr[index] : '';\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class BaseService {\r\n\tnow = new Date().getTime();\r\n\r\n\trefreshNow(): void {\r\n\t\tthis.now = new Date().getTime();\r\n\t}\r\n}\r\n","/**\r\n * Configuration values used by the HTTP service when\r\n * issuing requests to a backend API.\r\n */\r\nexport interface HttpConfig {\r\n\t/** Map of default headers appended to each request. */\r\n\theaders?: Record<string, unknown>;\r\n\t/** Base URL for all HTTP requests. */\r\n\turl?: string;\r\n}\r\n\r\nexport const DEFAULT_HTTP_CONFIG: HttpConfig = {\r\n\theaders: {},\r\n\turl: '',\r\n};\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config.interface';\r\nimport { StoreConfig } from '../interfaces/store.interface';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class StoreService {\r\n\tconstructor(@Inject(CONFIG_TOKEN) @Optional() config: Config) {\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_CONFIG,\r\n\t\t\t...(config?.store || {}),\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the prefix for storage keys.\r\n\t *\r\n\t * @param prefix - The prefix to set.\r\n\t */\r\n\tsetPrefix(prefix: string): void {\r\n\t\tthis._prefix = prefix;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a value in storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync set(\r\n\t\tkey: string,\r\n\t\tvalue: string,\r\n\t\tcallback: () => void = () => {},\r\n\t\terrCallback: (err: unknown) => void = () => {},\r\n\t): Promise<boolean> {\r\n\t\tkey = this._applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this._config.set) {\r\n\t\t\t\tawait this._config.set(key, value, callback, errCallback);\r\n\t\t\t} else {\r\n\t\t\t\tlocalStorage.setItem(key, value);\r\n\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\terrCallback(err);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a value from storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns A promise that resolves to the retrieved value or `null` if the key is missing.\r\n\t */\r\n\tasync get(\r\n\t\tkey: string,\r\n\t\tcallback?: (value: string | null) => void,\r\n\t\terrCallback: (err: unknown) => void = () => {},\r\n\t): Promise<string | null> {\r\n\t\tkey = this._applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this._config.get) {\r\n\t\t\t\tconst value = await this._config.get(\r\n\t\t\t\t\tkey,\r\n\t\t\t\t\t(val: string) => {\r\n\t\t\t\t\t\tcallback?.(val ?? null);\r\n\t\t\t\t\t},\r\n\t\t\t\t\terrCallback,\r\n\t\t\t\t);\r\n\r\n\t\t\t\treturn value ?? null;\r\n\t\t\t} else {\r\n\t\t\t\tconst value = localStorage.getItem(key);\r\n\r\n\t\t\t\tcallback?.(value ?? null);\r\n\r\n\t\t\t\treturn value ?? null;\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\terrCallback(err);\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a JSON value in storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync setJson<T>(\r\n\t\tkey: string,\r\n\t\tvalue: T,\r\n\t\tcallback: () => void = () => {},\r\n\t\terrCallback: (err: unknown) => void = () => {},\r\n\t): Promise<boolean> {\r\n\t\treturn await this.set(key, JSON.stringify(value), callback, errCallback);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a JSON value from storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns A promise that resolves to the retrieved value.\r\n\t */\r\n\tasync getJson<T = any>(\r\n\t\tkey: string,\r\n\t\tcallback?: (value: string | null) => void,\r\n\t\terrCallback: (err: unknown) => void = () => {},\r\n\t): Promise<T | null> {\r\n\t\tconst value = await this.get(key, callback, errCallback);\r\n\r\n\t\tif (value === null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\treturn JSON.parse(value);\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a value from storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync remove(key: string, callback: () => void = () => {}, errCallback: (err: unknown) => void = () => {}): Promise<boolean> {\r\n\t\tkey = this._applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this._config.remove) {\r\n\t\t\t\treturn await this._config.remove(key, callback, errCallback);\r\n\t\t\t} else {\r\n\t\t\t\tlocalStorage.removeItem(key);\r\n\r\n\t\t\t\tcallback();\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\terrCallback(err);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Clears all values from storage.\r\n\t *\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync clear(callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean> {\r\n\t\ttry {\r\n\t\t\tif (this._config.clear) {\r\n\t\t\t\tawait this._config.clear();\r\n\t\t\t} else {\r\n\t\t\t\tlocalStorage.clear();\r\n\t\t\t}\r\n\r\n\t\t\tcallback?.();\r\n\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\r\n\t\t\terrCallback?.(err);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _prefix = '';\r\n\r\n\tprivate _config: StoreConfig;\r\n\r\n\t/**\r\n\t * Applies the configured prefix to a storage key.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns The prefixed storage key.\r\n\t */\r\n\tprivate _applyPrefix(key: string): string {\r\n\t\tif (this._config.prefix) {\r\n\t\t\tkey = this._config.prefix + key;\r\n\t\t}\r\n\r\n\t\tif (this._prefix) {\r\n\t\t\tkey = this._prefix + key;\r\n\t\t}\r\n\r\n\t\treturn key;\r\n\t}\r\n}\r\n","import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';\r\nimport { Inject, Injectable, Optional } from '@angular/core';\r\nimport { EMPTY, Observable, ReplaySubject } from 'rxjs';\r\nimport { catchError, first } from 'rxjs/operators';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config.interface';\r\nimport { DEFAULT_HTTP_CONFIG, HttpConfig } from '../interfaces/http.interface';\r\nimport { StoreService } from './store.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class HttpService {\r\n\t// An array of error handling callbacks\r\n\terrors: ((err: HttpErrorResponse, retry?: () => void) => {})[] = [];\r\n\r\n\t// Base URL for HTTP requests\r\n\turl = '';\r\n\r\n\t// Flag to lock the service to prevent multiple requests\r\n\tlocked = false;\r\n\r\n\t// Array to store setTimeout IDs for managing request locks\r\n\tawaitLocked: any[] = [];\r\n\r\n\t// Configuration object for HTTP settings\r\n\tprivate _config: HttpConfig;\r\n\r\n\t// Object to store HTTP headers\r\n\tprivate _headers: any = {};\r\n\r\n\t// Instance of HttpHeaders with current headers\r\n\tprivate _http_headers = new HttpHeaders(this._headers);\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() config: Config,\r\n\t\tprivate store: StoreService,\r\n\t\tprivate http: HttpClient,\r\n\t) {\r\n\t\t// Initialize HTTP configuration and headers from injected config\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_HTTP_CONFIG,\r\n\t\t\t...config.http,\r\n\t\t};\r\n\r\n\t\tif (typeof this._config.headers === 'object') {\r\n\t\t\tfor (const header in this._config.headers) {\r\n\t\t\t\tthis._headers[header] = this._config.headers[header];\r\n\t\t\t}\r\n\r\n\t\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t\t}\r\n\r\n\t\t// Retrieve and set the base URL and headers from the store\r\n\t\tthis.store.get('http_url', (url) => {\r\n\t\t\tthis.url = url || this._config.url || '';\r\n\t\t});\r\n\r\n\t\tthis.store.getJson<Record<string, string>>('http_headers').then((headers) => {\r\n\t\t\theaders ||= {};\r\n\r\n\t\t\tfor (const header in headers) {\r\n\t\t\t\tthis._headers[header] = headers[header];\r\n\t\t\t}\r\n\r\n\t\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t\t});\r\n\t}\r\n\r\n\t// Set a new base URL and save it in the store\r\n\tsetUrl(url: string) {\r\n\t\tthis.url = url;\r\n\r\n\t\tthis.store.set('http_url', url);\r\n\t}\r\n\r\n\t// Remove the base URL and revert to the default or stored one\r\n\tremoveUrl() {\r\n\t\tthis.url = this._config.url || '';\r\n\r\n\t\tthis.store.remove('http_url');\r\n\t}\r\n\r\n\t// Set a new HTTP header and update the stored headers\r\n\tset(key: any, value: any) {\r\n\t\tthis._headers[key] = value;\r\n\r\n\t\tthis.store.setJson<Record<string, string>>('http_headers', this._headers);\r\n\r\n\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t}\r\n\r\n\t// Get the value of a specific HTTP header\r\n\theader(key: any) {\r\n\t\treturn this._headers[key];\r\n\t}\r\n\r\n\t// Remove a specific HTTP header and update the stored headers\r\n\tremove(key: any) {\r\n\t\tdelete this._headers[key];\r\n\r\n\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\r\n\t\tthis.store.setJson<Record<string, string>>('http_headers', this._headers);\r\n\t}\r\n\r\n\t// Internal method to make HTTP requests based on the method type\r\n\tprivate _httpMethod(method: string, _url: string, doc: unknown, headers: any): Observable<any> {\r\n\t\tif (method === 'post') {\r\n\t\t\treturn this.http.post<any>(_url, doc, headers);\r\n\t\t} else if (method === 'put') {\r\n\t\t\treturn this.http.put<any>(_url, doc, headers);\r\n\t\t} else if (method === 'patch') {\r\n\t\t\treturn this.http.patch<any>(_url, doc, headers);\r\n\t\t} else if (method === 'delete') {\r\n\t\t\treturn this.http.delete<any>(_url, headers);\r\n\t\t} else {\r\n\t\t\treturn this.http.get<any>(_url, headers);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Internal method to handle HTTP requests for various methods (POST, PUT, PATCH, DELETE, GET).\r\n\t *\r\n\t * Features:\r\n\t * - **Request Locking**: Manages request locking to prevent simultaneous requests.\r\n\t * - **Acceptance Check**: Validates the server response against a user-defined `acceptance` function.\r\n\t * If the check fails, the response is rejected with an error.\r\n\t * - **Replace Logic**: Allows modification of specific parts of the response object, determined by a user-defined `replace` function.\r\n\t * Can handle both objects and arrays within the response.\r\n\t * - **Field Filtering**: Supports extracting specific fields from response objects or arrays.\r\n\t * - **Legacy Support**: Compatible with callback-based usage alongside Observables.\r\n\t * - **ReplaySubject**: Ensures that the response can be shared across multiple subscribers.\r\n\t *\r\n\t * @param url - The endpoint to send the HTTP request to (relative to the base URL).\r\n\t * @param doc - The request payload for methods like POST, PUT, and PATCH.\r\n\t * @param callback - A legacy callback function to handle the response.\r\n\t * @param opts - Additional options:\r\n\t * - `err`: Error handling callback.\r\n\t * - `acceptance`: Function to validate the server response. Should return `true` for valid responses.\r\n\t * - `replace`: Function to modify specific parts of the response data.\r\n\t * - `fields`: Array of fields to extract from the response object(s).\r\n\t * - `data`: Path in the response where the data resides for `replace` and `fields` operations.\r\n\t * - `skipLock`: If `true`, bypasses request locking.\r\n\t * - `url`: Overrides the base URL for this request.\r\n\t * @param method - The HTTP method (e.g., 'post', 'put', 'patch', 'delete', 'get').\r\n\t * @returns An Observable that emits the processed HTTP response or an error.\r\n\t */\r\n\tprivate _post(url: string, doc: unknown, callback = (resp: unknown) => {}, opts: any = {}, method = 'post'): Observable<any> {\r\n\t\tif (typeof opts === 'function') {\r\n\t\t\topts = { err: opts };\r\n\t\t}\r\n\r\n\t\tif (!opts.err) {\r\n\t\t\topts.err = (err: HttpErrorResponse) => {};\r\n\t\t}\r\n\r\n\t\t// Handle request locking to avoid multiple simultaneous requests\r\n\t\tif (this.locked && !opts.skipLock) {\r\n\t\t\treturn new Observable((observer) => {\r\n\t\t\t\tconst wait = setTimeout(() => {\r\n\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(observer);\r\n\t\t\t\t}, 100);\r\n\t\t\t\tthis.awaitLocked.push(wait);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst _url = (opts.url || this.url) + url;\r\n\r\n\t\tthis.prepare_handle(_url, doc);\r\n\r\n\t\t// Using ReplaySubject to allow multiple subscriptions without re-triggering the HTTP request\r\n\t\tconst responseSubject = new ReplaySubject<any>(1);\r\n\r\n\t\tthis._httpMethod(method, _url, doc, { headers: this._http_headers })\r\n\t\t\t.pipe(\r\n\t\t\t\tfirst(),\r\n\t\t\t\tcatchError((error: HttpErrorResponse) => {\r\n\t\t\t\t\tthis.handleError(opts.err, () => {\r\n\t\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(responseSubject);\r\n\t\t\t\t\t})(error);\r\n\r\n\t\t\t\t\tresponseSubject.error(error);\r\n\r\n\t\t\t\t\treturn EMPTY;\r\n\t\t\t\t}),\r\n\t\t\t)\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\t\tif (opts.acceptance && typeof opts.acceptance === 'function') {\r\n\t\t\t\t\t\tif (!opts.acceptance(resp)) {\r\n\t\t\t\t\t\t\tconst error = new HttpErrorResponse({\r\n\t\t\t\t\t\t\t\terror: 'Acceptance failed',\r\n\t\t\t\t\t\t\t\tstatus: 400,\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tthis.handleError(opts.err, () => {})(error);\r\n\r\n\t\t\t\t\t\t\tresponseSubject.error(error);\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opts.replace && typeof opts.replace === 'function') {\r\n\t\t\t\t\t\tif (Array.isArray(this._getObjectToReplace(resp, opts.data))) {\r\n\t\t\t\t\t\t\t(this._getObjectToReplace(resp, opts.data) as Array<unknown>).map((item: unknown) => opts.replace(item));\r\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\r\n\t\t\t\t\t\t\topts.replace(this._getObjectToReplace(resp, opts.data));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (Array.isArray(opts.fields)) {\r\n\t\t\t\t\t\tif (Array.isArray(this._getObjectToReplace(resp, opts.data))) {\r\n\t\t\t\t\t\t\t(this._getObjectToReplace(resp, opts.data) as Array<unknown>).map((item: unknown) => {\r\n\t\t\t\t\t\t\t\treturn this._newDoc(item, opts.fields);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\r\n\t\t\t\t\t\t\tconst newDoc = this._newDoc(this._getObjectToReplace(resp, opts.data), opts.fields);\r\n\r\n\t\t\t\t\t\t\tif (opts.data) {\r\n\t\t\t\t\t\t\t\tthis._setObjectToReplace(resp, opts.data, newDoc);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tresp = newDoc;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.response_handle(_url, resp, () => callback(resp));\r\n\r\n\t\t\t\t\tresponseSubject.next(resp);\r\n\r\n\t\t\t\t\tresponseSubject.complete();\r\n\t\t\t\t},\r\n\t\t\t\terror: (err) => responseSubject.error(err),\r\n\t\t\t\tcomplete: () => responseSubject.complete(),\r\n\t\t\t});\r\n\r\n\t\treturn responseSubject.asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a POST request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tpost(url: string, doc: any, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a PUT request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tput(url: string, doc: any, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts, 'put');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a PATCH request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tpatch(url: string, doc: any, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts, 'patch');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a DELETE request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tdelete(url: string, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, null, callback, opts, 'delete');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a GET request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tget(url: string, callback = (resp: any) => {}, opts: any = {}): Observable<any> {\r\n\t\treturn this._post(url, null, callback, opts, 'get');\r\n\t}\r\n\r\n\t// Clear all pending request locks\r\n\tclearLocked() {\r\n\t\tfor (const awaitLocked of this.awaitLocked) {\r\n\t\t\tclearTimeout(awaitLocked);\r\n\t\t}\r\n\t\tthis.awaitLocked = [];\r\n\t}\r\n\r\n\t// Lock the service to prevent multiple simultaneous requests\r\n\tlock() {\r\n\t\tthis.locked = true;\r\n\t}\r\n\r\n\t// Unlock the service to allow new requests\r\n\tunlock() {\r\n\t\tthis.locked = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Handles HTTP errors.\r\n\t * - Calls provided error callback and retries the request if needed.\r\n\t */\r\n\tprivate handleError(callback: any, retry: () => void) {\r\n\t\treturn (error: HttpErrorResponse): Promise<void> => {\r\n\t\t\treturn new Promise((resolve) => {\r\n\t\t\t\tthis.err_handle(error, callback, retry);\r\n\t\t\t\tresolve();\r\n\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Internal method to trigger error handling callbacks.\r\n\t */\r\n\tprivate err_handle(err: HttpErrorResponse, next: (err: HttpErrorResponse) => void, retry: () => void) {\r\n\t\tif (typeof next === 'function') {\r\n\t\t\tnext(err);\r\n\t\t}\r\n\r\n\t\tfor (const callback of this.errors) {\r\n\t\t\tif (typeof callback === 'function') {\r\n\t\t\t\tcallback(err, retry);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Placeholder method for handling request preparation (can be customized)\r\n\tprivate prepare_handle(url: string, body: unknown) {}\r\n\r\n\t// Placeholder method for handling the response (can be customized)\r\n\tprivate response_handle(url: string, body: unknown, next: () => void) {\r\n\t\tif (typeof next === 'function') {\r\n\t\t\tnext();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves a nested object or property from the response based on a dot-separated path.\r\n\t *\r\n\t * @param resp - The response object to retrieve data from.\r\n\t * @param base - A dot-separated string indicating the path to the desired property within the response.\r\n\t * - Example: `'data.items'` will navigate through `resp.data.items`.\r\n\t * - If empty, the entire response is returned.\r\n\t * @returns The object or property located at the specified path within the response.\r\n\t */\r\n\tprivate _getObjectToReplace(resp: unknown, base = ''): unknown {\r\n\t\tif (base.includes('.')) {\r\n\t\t\tconst newBase = base.split('');\r\n\r\n\t\t\tconst currentBase: string = newBase.pop() || '';\r\n\r\n\t\t\treturn this._getObjectToReplace((resp as Record<string, unknown>)[currentBase] || {}, newBase.join('.'));\r\n\t\t} else if (base) {\r\n\t\t\treturn (resp as Record<string, unknown>)[base];\r\n\t\t} else {\r\n\t\t\treturn resp;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets or replaces a nested object or property in the response based on a dot-separated path.\r\n\t *\r\n\t * @param resp - The response object to modify.\r\n\t * @param base - A dot-separated string indicating the path to the property to replace.\r\n\t * - Example: `'data.items'` will navigate through `resp.data.items`.\r\n\t * @param doc - The new data or object to set at the specified path.\r\n\t * @returns `void`.\r\n\t */\r\n\tprivate _setObjectToReplace(resp: unknown, base = '', doc: unknown): void {\r\n\t\twhile (base.includes('.')) {\r\n\t\t\tconst newBase = base.split('');\r\n\r\n\t\t\tconst currentBase: string = newBase.pop() || '';\r\n\r\n\t\t\tresp = (resp as Record<string, unknown>)[currentBase] || {};\r\n\r\n\t\t\tbase = newBase.join('.');\r\n\t\t}\r\n\r\n\t\t(resp as Record<string, unknown>)[base] = doc;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new object containing only specified fields from the input item.\r\n\t *\r\n\t * @param item - The input object to extract fields from.\r\n\t * @param fields - An array of field names to include in the new object.\r\n\t * - Example: `['id', 'name']` will create a new object with only the `id` and `name` properties from `item`.\r\n\t * @returns A new object containing only the specified fields.\r\n\t */\r\n\tprivate _newDoc(item: unknown, fields: string[]): unknown {\r\n\t\tconst newDoc: Record<string, unknown> = {};\r\n\r\n\t\tfor (const field of fields) {\r\n\t\t\tnewDoc[field] = (item as Record<string, unknown>)[field];\r\n\t\t}\r\n\r\n\t\treturn newDoc;\r\n\t}\r\n}\r\n","import { inject } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { CrudDocument, CrudOptions } from '../interfaces/crud.interface';\r\nimport { AlertService } from './alert.service';\r\nimport { BaseService } from './base.service';\r\nimport { CoreService } from './core.service';\r\nimport { HttpService } from './http.service';\r\nimport { StoreService } from './store.service';\r\n\r\ninterface CrudConfig<Document> {\r\n\tsignalFields?: Record<string, (doc: Document) => unknown>;\r\n\tname: string;\r\n\t_id?: string;\r\n\treplace?: (doc: Document) => void;\r\n\tunauthorized?: boolean;\r\n\tappId?: string;\r\n}\r\n\r\ninterface GetConfig {\r\n\tpage?: number;\r\n\tperPage?: number;\r\n\tquery?: string;\r\n}\r\n\r\n/**\r\n * Abstract class representing a CRUD (Create, Read, Update, Delete) service.\r\n *\r\n * This class provides methods for managing documents, interacting with an API,\r\n * and storing/retrieving data from local storage. It is designed to be extended\r\n * for specific document types.\r\n *\r\n * @template Document - The type of the document the service handles.\r\n */\r\nexport abstract class CrudService<Document extends CrudDocument> extends BaseService {\r\n\t/**\r\n\t * URL for the API.\r\n\t */\r\n\tprivate _url = '/api/';\r\n\r\n\t/**\r\n\t * Array of documents managed by this service.\r\n\t */\r\n\tprivate _docs: Document[] = [];\r\n\r\n\t/**\r\n\t * Number of documents per page.\r\n\t */\r\n\tprivate _perPage = 20;\r\n\r\n\t/**\r\n\t * Callbacks for filtering documents.\r\n\t */\r\n\tprivate _filteredDocumentsCallbacks: (() => void)[] = [];\r\n\r\n\t/**\r\n\t * Constructs a CRUD service instance.\r\n\t *\r\n\t * @param _config - Configuration options for the CRUD service.\r\n\t * @param __http - Service to handle HTTP requests.\r\n\t * @param __store - Service to manage local storage of documents.\r\n\t * @param __alert - Service to display alerts.\r\n\t * @param __core - Core service for utility functions.\r\n\t */\r\n\tprotected __http = inject(HttpService);\r\n\r\n\tprotected __store = inject(StoreService);\r\n\r\n\tprotected __alert = inject(AlertService);\r\n\r\n\tprotected __core = inject(CoreService);\r\n\r\n\tloaded: Promise<unknown>;\r\n\r\n\tconstructor(private _config: CrudConfig<Document>) {\r\n\t\tsuper();\r\n\r\n\t\tthis._config.signalFields = this._config.signalFields || {};\r\n\r\n\t\tthis._url += this._config.name;\r\n\r\n\t\tthis.loaded = this.__core.onComplete(this._config.name + '_loaded');\r\n\r\n\t\tif (this._config.unauthorized) {\r\n\t\t\tthis.restoreDocs();\r\n\t\t} else if (localStorage.getItem('waw_user')) {\r\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\r\n\r\n\t\t\tif (user._id === localStorage.getItem(this._config.name + 'waw_user_id')) {\r\n\t\t\t\tthis.restoreDocs();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.__core.on('wipe').subscribe((): void => {\r\n\t\t\tthis.clearDocs();\r\n\r\n\t\t\tthis._filterDocuments();\r\n\t\t});\r\n\t}\r\n\r\n\tasync restoreDocs() {\r\n\t\tconst docs = await this.__store.getJson<Document[]>('docs_' + this._config.name);\r\n\r\n\t\tif (Array.isArray(docs)) {\r\n\t\t\tthis._docs.push(...docs);\r\n\r\n\t\t\tthis._filterDocuments();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Saves the current set of documents to local storage.\r\n\t */\r\n\tsetDocs(): void {\r\n\t\tthis.__store.setJson<Document[]>('docs_' + this._config.name, this._docs);\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the current list of documents.\r\n\t *\r\n\t * @returns The list of documents.\r\n\t */\r\n\tgetDocs(): Document[] {\r\n\t\treturn this._docs;\r\n\t}\r\n\r\n\t/**\r\n\t * Clears the current list of documents.\r\n\t *\r\n\t * Empties the internal documents array and saves the updated state to local storage.\r\n\t */\r\n\tclearDocs(): void {\r\n\t\tthis._docs.splice(0, this._docs.length);\r\n\r\n\t\tthis.setDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Adds multiple documents to the service and saves them to local storage.\r\n\t *\r\n\t * @param docs - An array of documents to add.\r\n\t */\r\n\taddDocs(docs: Document[]): void {\r\n\t\tif (Array.isArray(docs)) {\r\n\t\t\tfor (const doc of docs) {\r\n\t\t\t\tthis.addDoc(doc);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a single document to the service. If it already exists, it will be updated.\r\n\t *\r\n\t * @param doc - The document to add.\r\n\t */\r\n\taddDoc(doc: Document): void {\r\n\t\tif (this._config.replace) {\r\n\t\t\tthis._config.replace(doc);\r\n\t\t}\r\n\r\n\t\tconst existingDoc = this._docs.find((d) => this._id(d) === this._id(doc));\r\n\r\n\t\tif (existingDoc) {\r\n\t\t\t// Update the existing document\r\n\t\t\tthis.__core.copy(doc, existingDoc);\r\n\r\n\t\t\tthis.__core.copy(existingDoc, doc);\r\n\t\t} else {\r\n\t\t\t// Add new document\r\n\t\t\tthis._docs.push(doc);\r\n\t\t}\r\n\r\n\t\tthis.setDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new document with a temporary ID and status flags.\r\n\t *\r\n\t * @param doc - Optional base document to use for the new document.\r\n\t * @returns A new document instance with default properties.\r\n\t */\r\n\tnew(doc: Document = {} as Document): Document {\r\n\t\treturn {\r\n\t\t\t...doc,\r\n\t\t\t_id: doc._id || Date.now().toString(),\r\n\t\t\t__created: false,\r\n\t\t\t__modified: false,\r\n\t\t} as Document;\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves a document by its unique ID or creates a new one if it doesn't exist.\r\n\t *\r\n\t * @param _id - The document ID to search for.\r\n\t * @returns The found document or a new document if not found.\r\n\t */\r\n\tdoc(_id: string): Document {\r\n\t\tconst doc =\r\n\t\t\tthis._docs.find((d) => this._id(d) === _id) ||\r\n\t\t\tthis.new({\r\n\t\t\t\t_id,\r\n\t\t\t} as Document);\r\n\r\n\t\tif (!this._docs.find((d) => this._id(d) === _id) && !this._fetchingId[_id]) {\r\n\t\t\tthis._fetchingId[_id] = true;\r\n\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.fetch({ _id }).subscribe((_doc: Document) => {\r\n\t\t\t\t\tthis._fetchingId[_id] = false;\r\n\r\n\t\t\t\t\tif (_doc) {\r\n\t\t\t\t\t\tthis.__core.copy(_doc, doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn doc;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the number of documents to display per page.\r\n\t *\r\n\t * @param _perPage - Number of documents per page.\r\n\t */\r\n\tsetPerPage(_perPage: number): void {\r\n\t\tthis._perPage = _perPage;\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches a list of documents from the API with optional pagination.\r\n\t *\r\n\t * @param config - Optional pagination configuration.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the list of documents.\r\n\t */\r\n\tget(config: GetConfig = {}, options: CrudOptions<Document> = {}): Observable<Document[]> {\r\n\t\tif (!this._config.unauthorized && localStorage.getItem('waw_user')) {\r\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\r\n\r\n\t\t\tlocalStorage.setItem(this._config.name + 'waw_user_id', user._id);\r\n\t\t}\r\n\r\n\t\tconst url = `${this._url}/get${options.name || ''}`;\r\n\r\n\t\tconst params =\r\n\t\t\t(typeof config.page === 'number' || config.query ? '?' : '') +\r\n\t\t\t(config.query || '') +\r\n\t\t\t(typeof config.page === 'number' ? `&skip=${this._perPage * (config.page - 1)}&limit=${this._perPage}` : '');\r\n\r\n\t\tconst obs = this.__http.get(`${url}${params}`);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown): void => {\r\n\t\t\t\tresp = resp || [];\r\n\r\n\t\t\t\tif (typeof config.page !== 'number') {\r\n\t\t\t\t\tthis.clearDocs();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t(resp as Document[]).forEach((doc) => this.addDoc(doc));\r\n\r\n\t\t\t\tif (options.callback) {\r\n\t\t\t\t\toptions.callback(resp as Document[]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof config.page !== 'number') {\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tthis.__core.complete(this._config.name + '_loaded', this._docs);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_get`, this._docs);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown): void => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document[]>;\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a request to the API to create a new document.\r\n\t *\r\n\t * @param doc - The document to create.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the created document, or emits an error if already created.\r\n\t */\r\n\tcreate(doc: Document = {} as Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tif (doc.__created) {\r\n\t\t\t// Emit an error observable if the document is already created\r\n\t\t\treturn new Observable<Document>((observer) => {\r\n\t\t\t\tobserver.error(new Error('Document has already been created.'));\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this._config.appId) {\r\n\t\t\tdoc.appId = this._config.appId;\r\n\t\t}\r\n\r\n\t\tdoc.__created = true;\r\n\r\n\t\tconst obs = this.__http.post(`${this._url}/create${options.name || ''}`, doc);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.__core.copy(resp, doc);\r\n\r\n\t\t\t\t\tthis.addDoc(doc);\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdoc.__created = false;\r\n\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_create`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_list`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tdoc.__created = false;\r\n\r\n\t\t\t\tif (options.errCallback) options.errCallback(err);\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches a document from the API based on a query.\r\n\t *\r\n\t * @param query - The query object used to filter documents.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the fetched document.\r\n\t */\r\n\tfetch(query: object = {}, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tconst obs = this.__http.post(`${this._url}/fetch${options.name || ''}`, query);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (doc: unknown) => {\r\n\t\t\t\tif (doc) {\r\n\t\t\t\t\tthis.addDoc(doc as Document);\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) options.callback(doc as Document);\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(doc as Document);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a document after a specified delay and returns an observable.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that emits the updated document.\r\n\t */\r\n\tupdateAfterWhile(doc: Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\treturn new Observable<Document>((observer) => {\r\n\t\t\tthis.__core.afterWhile(this._id(doc), () => {\r\n\t\t\t\tthis.update(doc, options).subscribe({\r\n\t\t\t\t\tnext: (updatedDoc) => {\r\n\t\t\t\t\t\tobserver.next(updatedDoc); // Emit the updated document\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (err) => {\r\n\t\t\t\t\t\tobserver.error(err); // Forward the error\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\tobserver.complete(); // Complete the observable\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a document in the API.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the updated document.\r\n\t */\r\n\tupdate(doc: Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\tconst obs = this.__http.post(`${this._url}/update${options.name || ''}`, doc);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tdoc.__modified = false;\r\n\r\n\t\t\t\t\tconst storedDoc = this.doc(doc._id);\r\n\r\n\t\t\t\t\tthis.__core.copy(resp, storedDoc);\r\n\r\n\t\t\t\t\tthis.__core.copy(resp, doc);\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}update`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_update`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Unique update a document field in the API.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the updated document.\r\n\t */\r\n\tunique(doc: Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\tconst obs = this.__http.post(`${this._url}/unique${options.name || ''}`, doc);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tdoc.__modified = false;\r\n\r\n\t\t\t\t\t(doc as any)[options.name as string] = resp;\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}unique`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_unique`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Deletes a document from the API.\r\n\t *\r\n\t * @param doc - The document to delete.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the deleted document.\r\n\t */\r\n\tdelete(doc: Document, options: CrudOptions<Document> = {}): Observable<Document> {\r\n\t\tconst obs = this.__http.post(`${this._url}/delete${options.name || ''}`, doc);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis._docs.splice(\r\n\t\t\t\t\t\tthis._docs.findIndex((d) => this._id(d) === this._id(doc)),\r\n\t\t\t\t\t\t1,\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tthis.setDocs();\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}delete`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_delete`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_list`, doc);\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Filters documents based on specific conditions and stores the result in a provided object.\r\n\t *\r\n\t * @param storeObject - Object to store filtered documents.\r\n\t * @param field - The field to filter by or a function to extract the field.\r\n\t * @param valid - Optional function to check the validity of a document.\r\n\t * @param sort - Function to sort the filtered documents.\r\n\t * @returns A callback function that triggers the filtering process.\r\n\t */\r\n\tfilteredDocuments(\r\n\t\tstoreObject: Record<string, Document[]>,\r\n\t\tfield: string | ((doc: Document) => string) = 'author',\r\n\t\tvalid?: (doc: Document) => boolean,\r\n\t\tsort: (a: Document, b: Document) => number = (a: Document, b: Document) => {\r\n\t\t\tif ((a as any)[this._id(a)] < (b as any)[this._id(b)]) return -1;\r\n\r\n\t\t\tif ((a as any)[this._id(a)] > (b as any)[this._id(b)]) return 1;\r\n\r\n\t\t\treturn 0;\r\n\t\t},\r\n\t): () => void {\r\n\t\tconst callback = (): void => {\r\n\t\t\t/* remove docs if they were removed */\r\n\t\t\tfor (const parentId in storeObject) {\r\n\t\t\t\tfor (let i = storeObject[parentId].length - 1; i >= 0; i--) {\r\n\t\t\t\t\tconst _field = typeof field === 'function' ? field(storeObject[parentId][i]) : field;\r\n\t\t\t\t\tconst _doc: any = storeObject[parentId][i];\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!this._docs.find((doc: any) =>\r\n\t\t\t\t\t\t\tArray.isArray(doc[_field]) ? doc[_field].includes(_doc[this._id(doc)]) : doc[_field] === _doc[this._id(doc)],\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tstoreObject[parentId].splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* add docs if they are not added */\r\n\t\t\tfor (const doc of this._docs) {\r\n\t\t\t\tconst _field = typeof field === 'function' ? field(doc) : field;\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\ttypeof valid === 'function'\r\n\t\t\t\t\t\t? !valid(doc)\r\n\t\t\t\t\t\t: Array.isArray((doc as any)[_field])\r\n\t\t\t\t\t\t\t? !(doc as any)[_field]?.length\r\n\t\t\t\t\t\t\t: !(doc as any)[_field]\r\n\t\t\t\t) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof field === 'function') {\r\n\t\t\t\t\tif (field(doc) && !storeObject[(doc as any)[_field]].find((c) => c._id === doc._id)) {\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (Array.isArray((doc as any)[_field])) {\r\n\t\t\t\t\t(doc as any)[_field].forEach((_field: string) => {\r\n\t\t\t\t\t\tstoreObject[_field] = storeObject[_field] || [];\r\n\r\n\t\t\t\t\t\tif (!storeObject[_field].find((c) => c._id === doc._id)) {\r\n\t\t\t\t\t\t\tstoreObject[_field].push(doc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstoreObject[(doc as any)[_field]] = storeObject[(doc as any)[_field]] || [];\r\n\r\n\t\t\t\t\tif (!storeObject[(doc as any)[_field]].find((c) => c._id === doc._id)) {\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* sort the array's */\r\n\t\t\tfor (const parentId in storeObject) {\r\n\t\t\t\tstoreObject[parentId].sort(sort);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis._filteredDocumentsCallbacks.push(callback);\r\n\r\n\t\treturn callback;\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a unique ID for a document.\r\n\t *\r\n\t * @param doc - The document for which to generate the ID.\r\n\t * @returns The unique ID as a string.\r\n\t */\r\n\tprivate _id(doc: Document): string {\r\n\t\treturn (doc as unknown as Record<string, unknown>)[this._config._id || '_id']?.toString() as string;\r\n\t}\r\n\r\n\t/**\r\n\t * Executes all registered filter document callbacks.\r\n\t */\r\n\tprivate _filterDocuments(): void {\r\n\t\tfor (const callback of this._filteredDocumentsCallbacks) {\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis.__core.emit(`${this._config.name}_filtered`);\r\n\t}\r\n\r\n\tprivate _fetchingId: Record<string, boolean> = {};\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-files',\r\n\ttemplateUrl: './files.component.html',\r\n\timports: [CommonModule],\r\n})\r\nexport class FilesComponent {\r\n\tfs: any;\r\n}\r\n","@for (file of fs.files; track $index) {\r\n\t<input\r\n\t\t[id]=\"file.id\"\r\n\t\ttype=\"file\"\r\n\t\tname=\"file\"\r\n\t\t(change)=\"fs.change($event, file); input.value = ''\"\r\n\t\t#input\r\n\t\t[hidden]=\"true\"\r\n\t\t[accept]=\"file.accept || (file.part && 'image/*') || ''\"\r\n\t\t[multiple]=\"(file.multiple && true) || ''\"\r\n\t/>\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FilesComponent } from '../components/files/files.component';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\nimport { DomService } from './dom.service';\r\nimport { HttpService } from './http.service';\r\n\r\ninterface FileOptions {\r\n\tid: string;\r\n\ttype?: string;\r\n\tresize?: number | { width: number; height: number };\r\n\tmultiple?: boolean;\r\n\tmultiple_cb?: (files: { dataUrl: string; file: File }[]) => void;\r\n\tcb?: (dataUrl: string | false, file: File) => void;\r\n\tsave?: boolean;\r\n\tcomplete?: () => void;\r\n\tapi?: string;\r\n\tpart?: string;\r\n\tname?: string;\r\n\tbody?: () => object | object;\r\n\tresp?: (response: any) => void;\r\n\tappend?: (formData: FormData, files: File[]) => void;\r\n\tmultiple_files?: { dataUrl: string; file: File }[];\r\n\tmultiple_counter?: number;\r\n\turl?: string;\r\n}\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class FileService {\r\n\tprivate added: Record<string, FileOptions> = {};\r\n\tprivate files: FileOptions[] = [];\r\n\tprivate _component: DomComponent<FilesComponent>;\r\n\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\tprivate http: HttpService,\r\n\t) {\r\n\t\tthis._component = this.dom.appendComponent(FilesComponent, {\r\n\t\t\tfs: this,\r\n\t\t})!;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a file input configuration.\r\n\t *\r\n\t * @param opts - The file options.\r\n\t */\r\n\tadd(opts: FileOptions | string): void | (() => void) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = { id: opts };\r\n\t\t}\r\n\r\n\t\tif (!opts.id) {\r\n\t\t\tconsole.log('You have to pass ID into file object');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\topts.type = opts.type || 'image';\r\n\r\n\t\tif (typeof opts.resize === 'number') {\r\n\t\t\topts.resize = { width: opts.resize, height: opts.resize };\r\n\t\t}\r\n\r\n\t\tif (this.added[opts.id]) {\r\n\t\t\tthis.files = this.files.filter((file) => file.id !== opts.id);\r\n\t\t}\r\n\r\n\t\tthis.files.push(opts);\r\n\t\tthis.added[opts.id] = opts;\r\n\r\n\t\tif (opts.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\topts.complete?.();\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles file input change event.\r\n\t *\r\n\t * @param event - The input change event.\r\n\t * @param info - The file options.\r\n\t */\r\n\tchange(event: Event, info: FileOptions): void {\r\n\t\tconst input = event.target as HTMLInputElement;\r\n\t\tif (!input.files) return;\r\n\r\n\t\tif (info.type === 'image') {\r\n\t\t\tif (info.multiple) {\r\n\t\t\t\tif (info.multiple_cb) {\r\n\t\t\t\t\tinfo.multiple_files = [];\r\n\t\t\t\t\tinfo.multiple_counter = input.files.length;\r\n\t\t\t\t}\r\n\t\t\t\tArray.from(input.files).forEach((file) => this.process(file, info));\r\n\t\t\t} else {\r\n\t\t\t\tthis.process(input.files[0], info);\r\n\t\t\t}\r\n\t\t} else if (info.type === 'file') {\r\n\t\t\tif (info.multiple) {\r\n\t\t\t\tinfo.multiple_cb?.(\r\n\t\t\t\t\tArray.from(input.files).map((file) => ({\r\n\t\t\t\t\t\tdataUrl: '',\r\n\t\t\t\t\t\tfile,\r\n\t\t\t\t\t})),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tArray.from(input.files).forEach((file) => info.cb?.('', file));\r\n\t\t\tif (info.part || info.url) {\r\n\t\t\t\tthis.uploadFiles(info, input.files as any);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.log('Provide type `image` or `file`');\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a file.\r\n\t *\r\n\t * @param part - The part of the API.\r\n\t * @param url - The URL of the file.\r\n\t * @param opts - Additional options.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tremove(part: string, url: string, opts: any = {}, cb: (resp: any) => void = () => {}): void | (() => void) {\r\n\t\topts.url = url;\r\n\t\tif (opts.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\tthis.http.post(opts.api || `/api/${part}/file/delete`, opts, cb);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(opts.api || `/api/${part}/file/delete`, opts, cb);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Uploads files to the server.\r\n\t *\r\n\t * @param info - The file options.\r\n\t * @param files - The files to upload.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tuploadFiles(info: FileOptions, files: File[], cb: (resp: any) => void = () => {}): void {\r\n\t\tconst formData = new FormData();\r\n\r\n\t\tif (info.append) {\r\n\t\t\tinfo.append(formData, files);\r\n\t\t} else {\r\n\t\t\tfiles.forEach((file, index) => formData.append(`file[${index}]`, file));\r\n\t\t}\r\n\r\n\t\tconst body = typeof info.body === 'function' ? info.body() : info.body || {};\r\n\t\tObject.entries(body).forEach(([key, value]) => formData.append(key, value));\r\n\r\n\t\tif (info.save) {\r\n\t\t\tinfo.complete = () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, formData, (resp: any) => {\r\n\t\t\t\t\tinfo.resp?.(resp);\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t});\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, formData, (resp: any) => {\r\n\t\t\t\tinfo.resp?.(resp);\r\n\t\t\t\tcb(resp);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Uploads an image to the server.\r\n\t *\r\n\t * @param info - The file options.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\timage(info: FileOptions, cb: (resp: any) => void = () => {}): void | (() => void) {\r\n\t\tif (info.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, info, cb);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, info, cb);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the file information after processing.\r\n\t *\r\n\t * @param dataUrl - The data URL of the processed file.\r\n\t * @param info - The file options.\r\n\t * @param file - The file object.\r\n\t */\r\n\t// private update(dataUrl: string, info: FileOptions, file: File): void {\r\n\tprivate update(dataUrl: string, info: any, file: File): void {\r\n\t\tinfo.cb?.(dataUrl, file);\r\n\t\tif (info.multiple_cb) {\r\n\t\t\tinfo.multiple_files.push({ dataUrl, file });\r\n\t\t\tif (--info.multiple_counter === 0) info.multiple_cb(info.multiple_files);\r\n\t\t}\r\n\r\n\t\tif (!info.part) return;\r\n\r\n\t\tconst obj = typeof info.body === 'function' ? info.body() : info.body || {};\r\n\t\tobj['dataUrl'] = dataUrl;\r\n\r\n\t\tif (info.save) {\r\n\t\t\tinfo.complete = () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, obj, (resp: any) => {\r\n\t\t\t\t\tinfo.cb?.(resp);\r\n\t\t\t\t});\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, obj, (resp: any) => {\r\n\t\t\t\tinfo.cb?.(resp);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Processes an image file for resizing.\r\n\t *\r\n\t * @param file - The file object.\r\n\t * @param info - The file options.\r\n\t */\r\n\t// private process(file: File, info: FileOptions): void {\r\n\tprocess(file: File, info: any): void {\r\n\t\tif (!file.type.startsWith('image/')) {\r\n\t\t\tinfo.cb?.(false, file);\r\n\t\t\tif (info.multiple_cb) {\r\n\t\t\t\tinfo.multiple_files.push({ dataUrl: '', file });\r\n\t\t\t\tif (--info.multiple_counter === 0) info.multiple_cb(info.multiple_files);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (info.resize) {\r\n\t\t\tinfo.resize.width = info.resize.width || 1920;\r\n\t\t\tinfo.resize.height = info.resize.height || 1080;\r\n\t\t}\r\n\r\n\t\tconst reader = new FileReader();\r\n\t\treader.onload = (loadEvent) => {\r\n\t\t\tif (!info.resize) {\r\n\t\t\t\treturn this.update(loadEvent.target?.result as string, info, file);\r\n\t\t\t}\r\n\r\n\t\t\tconst canvas = document.createElement('canvas');\r\n\t\t\tconst img = document.createElement('img');\r\n\t\t\timg.onload = () => {\r\n\t\t\t\tif (img.width <= info.resize.width && img.height <= info.resize.height) {\r\n\t\t\t\t\treturn this.update(loadEvent.target?.result as string, info, file);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst infoRatio = info.resize.width / info.resize.height;\r\n\t\t\t\tconst imgRatio = img.width / img.height;\r\n\t\t\t\tlet width, height;\r\n\t\t\t\tif (imgRatio > infoRatio) {\r\n\t\t\t\t\twidth = Math.min(info.resize.width, img.width);\r\n\t\t\t\t\theight = width / imgRatio;\r\n\t\t\t\t} else {\r\n\t\t\t\t\theight = Math.min(info.resize.height, img.height);\r\n\t\t\t\t\twidth = height * imgRatio;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcanvas.width = width;\r\n\t\t\t\tcanvas.height = height;\r\n\t\t\t\tconst context = canvas.getContext('2d');\r\n\t\t\t\tcontext?.drawImage(img, 0, 0, width, height);\r\n\t\t\t\tconst dataUrl = canvas.toDataURL('image/jpeg', 1);\r\n\t\t\t\tthis.update(dataUrl, info, file);\r\n\t\t\t};\r\n\t\t\timg.src = loadEvent.target?.result as string;\r\n\t\t};\r\n\t\treader.readAsDataURL(file);\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tthis._component.remove();\r\n\t}\r\n}\r\n","import { Signal, Type } from '@angular/core';\r\n\r\n/**\r\n * Configuration for a button rendered inside an Loader.\r\n */\r\nexport interface LoaderButton {\r\n\t/** Text displayed on the button. */\r\n\ttext: string;\r\n\t/** Optional click handler invoked when the button is pressed. */\r\n\tcallback?: () => void;\r\n}\r\n\r\n/**\r\n * Base options that can be supplied when showing an Loader.\r\n */\r\nexport interface LoaderConfig {\r\n\t/** Message text displayed to the user. */\r\n\ttext?: string;\r\n\t/** Optional action buttons displayed within the Loader. */\r\n\tbuttons?: LoaderButton[];\r\n\t/** Custom CSS class applied to the Loader container. */\r\n\tclass?: string;\r\n\t/** Identifier used to ensure only one Loader with this key exists. */\r\n\tunique?: string;\r\n\t/** Whether to show a progress bar. */\r\n\tprogress?: boolean;\r\n\t/** Milliseconds before auto dismissal. */\r\n\ttimeout?: number;\r\n\t/** Callback executed when the Loader is closed. */\r\n\tclose?: () => void;\r\n\tclosable?: boolean;\r\n}\r\n\r\nexport interface Loader extends LoaderConfig {\r\n\t/** Unique identifier for the loader instance. */\r\n\tid?: number;\r\n\t/** Signal emitting the current progress percentage. */\r\n\tprogressPercentage?: Signal<number>;\r\n\t/** Called when the loader is dismissed. */\r\n\tonClose?: () => void;\r\n\t/** Element to which the loader should be appended. */\r\n\tappend?: HTMLElement;\r\n\t/** Component used to render custom loader content. */\r\n\tcomponent?: Type<unknown>;\r\n\t[x: string]: unknown;\r\n}\r\n\r\n/**\r\n * Default values applied when an Loader is shown without specific options.\r\n */\r\nexport const DEFAULT_LOADER_CONFIG: Loader = {\r\n\ttext: '',\r\n\tclass: '',\r\n\tprogress: false,\r\n\ttimeout: 0,\r\n\tclosable: true,\r\n};\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { LoaderComponent } from '../components/loader/loader.component';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config.interface';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\nimport { DEFAULT_LOADER_CONFIG, Loader, LoaderConfig } from '../interfaces/loader.interface';\r\nimport { DomService } from './dom.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class LoaderService {\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() config: Config,\r\n\t\tprivate _dom: DomService,\r\n\t) {\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_LOADER_CONFIG,\r\n\t\t\t...(config?.loader || {}),\r\n\t\t};\r\n\t}\r\n\r\n\tshow(opts: Loader | string = 'Loading...'): Loader {\r\n\t\topts = {\r\n\t\t\t...this._config,\r\n\t\t\t...(typeof opts === 'object' ? opts : { text: opts }),\r\n\t\t};\r\n\r\n\t\tif (opts.unique && this._loaders.find((m) => m.unique === opts.unique)) {\r\n\t\t\treturn this._loaders.find((m) => m.unique === opts.unique) as Loader;\r\n\t\t}\r\n\r\n\t\tthis._loaders.push(opts);\r\n\r\n\t\tlet component!: DomComponent<LoaderComponent> | undefined;\r\n\r\n\t\topts.close = () => {\r\n\t\t\tcomponent?.remove();\r\n\r\n\t\t\tcomponent = undefined;\r\n\r\n\t\t\tif (typeof opts.onClose === 'function') opts.onClose();\r\n\r\n\t\t\tthis._loaders.splice(\r\n\t\t\t\tthis._loaders.findIndex((m) => m.id === opts.id),\r\n\t\t\t\t1,\r\n\t\t\t);\r\n\t\t};\r\n\r\n\t\tif (opts.append) {\r\n\t\t\tcomponent = this._dom.appendComponent(LoaderComponent, opts, opts.append)!;\r\n\t\t} else {\r\n\t\t\tcomponent = this._dom.appendComponent(LoaderComponent, opts)!;\r\n\t\t}\r\n\r\n\t\tif (opts.unique) {\r\n\t\t\tif (this._uniques[opts.unique]) this._uniques[opts.unique].remove();\r\n\r\n\t\t\tthis._uniques[opts.unique] = component;\r\n\t\t}\r\n\r\n\t\tthis._loaders.push(opts);\r\n\r\n\t\treturn opts;\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tfor (let i = this._loaders.length - 1; i >= 0; i--) {\r\n\t\t\tthis._loaders[i].close?.();\r\n\t\t}\r\n\t}\r\n\r\n\t/** Merged configuration applied to new alerts. */\r\n\tprivate _config: LoaderConfig;\r\n\r\n\t/** References to alerts that must remain unique by identifier. */\r\n\tprivate _uniques: Record<string, DomComponent<any>> = {};\r\n\r\n\tprivate _loaders: Loader[] = [];\r\n}\r\n","import { Inject, Injectable, Optional, Type } from '@angular/core';\r\nimport { ModalComponent } from '../components/modal/modal.component';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config.interface';\r\nimport { DomComponent } from '../interfaces/dom.interface';\r\nimport { DEFAULT_MODAL_CONFIG, Modal, ModalConfig } from '../interfaces/modal.interface';\r\nimport { DomService } from './dom.service';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class ModalService {\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() config: Config,\r\n\t\tprivate _dom: DomService,\r\n\t) {\r\n\t\tthis._config = {\r\n\t\t\t...DEFAULT_MODAL_CONFIG,\r\n\t\t\t...(config?.modal || {}),\r\n\t\t};\r\n\t}\r\n\r\n\tshow(opts: Modal | Type<unknown>): Modal {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\tif (opts.unique && this._modals.find((m) => m.unique === opts.unique)) {\r\n\t\t\treturn this._modals.find((m) => m.unique === opts.unique) as Modal;\r\n\t\t}\r\n\r\n\t\tthis._modals.push(opts);\r\n\r\n\t\topts.class ||= '';\r\n\r\n\t\topts.id ||= Math.floor(Math.random() * Date.now()) + Date.now();\r\n\r\n\t\tdocument.body.classList.add('modalOpened');\r\n\r\n\t\tlet component!: DomComponent<ModalComponent> | undefined;\r\n\r\n\t\tlet content!: DomComponent<any> | undefined;\r\n\r\n\t\topts.close = () => {\r\n\t\t\tcontent?.remove();\r\n\r\n\t\t\tcontent = undefined;\r\n\r\n\t\t\tcomponent?.remove();\r\n\r\n\t\t\tcomponent = undefined;\r\n\r\n\t\t\tif (typeof opts.onClose === 'function') opts.onClose();\r\n\r\n\t\t\tthis._modals.splice(\r\n\t\t\t\tthis._modals.findIndex((m) => m.id === opts.id),\r\n\t\t\t\t1,\r\n\t\t\t);\r\n\r\n\t\t\tif (!this._modals.length) {\r\n\t\t\t\tdocument.body.classList.remove('modalOpened');\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (typeof opts.timeout === 'number' && opts.timeout > 0) {\r\n\t\t\tsetTimeout(opts.close, opts.timeout);\r\n\t\t}\r\n\r\n\t\tcomponent = this._dom.appendComponent(ModalComponent, opts)!;\r\n\r\n\t\tcontent = this._dom.appendComponent(\r\n\t\t\topts.component,\r\n\t\t\topts as Partial<{ providedIn?: string | undefined }>,\r\n\t\t\tcomponent.nativeElement.children[0].children[0].children[0] as HTMLElement,\r\n\t\t)!;\r\n\r\n\t\treturn opts;\r\n\t}\r\n\r\n\topen(opts: Modal | Type<unknown>) {\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tsmall(opts: Modal) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.size = 'small';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tmid(opts: Modal) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.size = 'mid';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tbig(opts: Modal) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.size = 'big';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tfull(opts: Modal) {\r\n\t\topts = this._opts(opts);\r\n\r\n\t\topts.size = 'full';\r\n\r\n\t\tthis.show(opts);\r\n\t}\r\n\r\n\tdestroy() {\r\n\t\tfor (let i = this._modals.length - 1; i >= 0; i--) {\r\n\t\t\tthis._modals[i].close?.();\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _modals: Modal[] = [];\r\n\r\n\t/** Merged configuration applied to new alerts. */\r\n\tprivate _config: ModalConfig;\r\n\r\n\tprivate _opts(opts: Modal | Type<unknown>): Modal {\r\n\t\treturn typeof opts === 'function'\r\n\t\t\t? { ...this._config, component: opts }\r\n\t\t\t: {\r\n\t\t\t\t\t...this._config,\r\n\t\t\t\t\t...opts,\r\n\t\t\t\t\tcomponent: opts.component,\r\n\t\t\t\t};\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n/**\r\n * RtcService handles WebRTC peer connections and local media stream setup.\r\n * It provides functionality to initialize the user's camera/microphone,\r\n * manage multiple peer connections, and handle offer/answer negotiation.\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class RtcService {\r\n\t/**\r\n\t * Map of peer connections, keyed by peer ID.\r\n\t */\r\n\tprivate peers = new Map<string, RTCPeerConnection>();\r\n\r\n\t/**\r\n\t * Local media stream from user's camera and microphone.\r\n\t */\r\n\tprivate localStream: MediaStream | null = null;\r\n\r\n\t/**\r\n\t * Initializes the local media stream (audio/video).\r\n\t * Requests permissions and stores the stream internally.\r\n\t */\r\n\tasync initLocalStream(): Promise<MediaStream> {\r\n\t\tif (!this.localStream) {\r\n\t\t\tthis.localStream = await navigator.mediaDevices.getUserMedia({\r\n\t\t\t\tvideo: true,\r\n\t\t\t\taudio: true,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.localStream;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new RTCPeerConnection for the given ID and attaches local tracks.\r\n\t */\r\n\tasync createPeer(id: string): Promise<RTCPeerConnection> {\r\n\t\tconst peer = new RTCPeerConnection();\r\n\r\n\t\tthis.localStream?.getTracks().forEach((track) => peer.addTrack(track, this.localStream!));\r\n\r\n\t\tthis.peers.set(id, peer);\r\n\r\n\t\treturn peer;\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves an existing peer connection by ID.\r\n\t */\r\n\tgetPeer(id: string): RTCPeerConnection | undefined {\r\n\t\treturn this.peers.get(id);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an SDP offer for the specified peer and sets it as the local description.\r\n\t */\r\n\tasync createOffer(id: string): Promise<RTCSessionDescriptionInit> {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (!peer) throw new Error('Peer not found');\r\n\r\n\t\tconst offer = await peer.createOffer();\r\n\r\n\t\tawait peer.setLocalDescription(offer);\r\n\r\n\t\treturn offer;\r\n\t}\r\n\r\n\t/**\r\n\t * Accepts an SDP offer, creates an answer, and sets it as the local description.\r\n\t */\r\n\tasync createAnswer(id: string, offer: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (!peer) throw new Error('Peer not found');\r\n\r\n\t\tawait peer.setRemoteDescription(new RTCSessionDescription(offer));\r\n\r\n\t\tconst answer = await peer.createAnswer();\r\n\r\n\t\tawait peer.setLocalDescription(answer);\r\n\r\n\t\treturn answer;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the remote description with an SDP answer for the given peer.\r\n\t */\r\n\tasync setRemoteAnswer(id: string, answer: RTCSessionDescriptionInit) {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (!peer) throw new Error('Peer not found');\r\n\r\n\t\tawait peer.setRemoteDescription(new RTCSessionDescription(answer));\r\n\t}\r\n\r\n\t/**\r\n\t * Adds an ICE candidate to the specified peer connection.\r\n\t */\r\n\taddIceCandidate(id: string, candidate: RTCIceCandidateInit) {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (peer) peer.addIceCandidate(new RTCIceCandidate(candidate));\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the initialized local media stream.\r\n\t */\r\n\tgetLocalStream(): MediaStream | null {\r\n\t\treturn this.localStream;\r\n\t}\r\n\r\n\t/**\r\n\t * Closes a specific peer connection and removes it from the map.\r\n\t */\r\n\tclosePeer(id: string) {\r\n\t\tconst peer = this.peers.get(id);\r\n\r\n\t\tif (peer) {\r\n\t\t\tpeer.close();\r\n\r\n\t\t\tthis.peers.delete(id);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Closes all peer connections and stops the local media stream.\r\n\t */\r\n\tcloseAll() {\r\n\t\tthis.peers.forEach((peer) => peer.close());\r\n\r\n\t\tthis.peers.clear();\r\n\r\n\t\tthis.localStream?.getTracks().forEach((track) => track.stop());\r\n\r\n\t\tthis.localStream = null;\r\n\t}\r\n}\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config.interface';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class SocketService {\r\n\tprivate _url = '';\r\n\r\n\tprivate _io: any;\r\n\r\n\tprivate _connected = false;\r\n\r\n\tprivate _opts: any = {};\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private _config: Config,\r\n\t\tprivate _core: CoreService,\r\n\t) {\r\n\t\tthis._config = { ...DEFAULT_CONFIG, ...(this._config || {}) };\r\n\r\n\t\tif (!this._config.io) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst url = new URL(window.location.origin);\r\n\r\n\t\tif (typeof this._config.socket === 'object') {\r\n\t\t\tif (this._config.socket.port) {\r\n\t\t\t\turl.port = this._config.socket.port;\r\n\t\t\t}\r\n\r\n\t\t\tif (this._config.socket.opts) {\r\n\t\t\t\tthis._opts = this._config.socket.opts;\r\n\t\t\t}\r\n\r\n\t\t\tthis._url = this._config.socket.url ?? url.origin;\r\n\t\t} else {\r\n\t\t\tthis._url = url.origin;\r\n\t\t}\r\n\r\n\t\tif (this._config.socket) {\r\n\t\t\tthis.load();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the URL for the WebSocket connection and reloads the socket.\r\n\t * @param url - The URL of the WebSocket server.\r\n\t */\r\n\tsetUrl(url: string): void {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (!this._config.socket) {\r\n\t\t\tthis._config.socket = true;\r\n\t\t}\r\n\r\n\t\tthis.load();\r\n\t}\r\n\r\n\t/**\r\n\t * Loads and initializes the WebSocket connection.\r\n\t */\r\n\tprivate load(): void {\r\n\t\tif (this._config.io) {\r\n\t\t\tconst ioFunc = this._config.io.default ? this._config.io.default : this._config.io;\r\n\r\n\t\t\tthis._io = ioFunc(this._url, this._opts);\r\n\r\n\t\t\tthis._io.on('connect', () => {\r\n\t\t\t\tthis._connected = true;\r\n\t\t\t\tthis._core.complete('socket');\r\n\t\t\t});\r\n\r\n\t\t\tthis._io.on('disconnect', (reason: any) => {\r\n\t\t\t\tthis._connected = false;\r\n\t\t\t\tif (this._core && typeof this._core.emit === 'function') {\r\n\t\t\t\t\tthis._core.emit('socket_disconnect', reason);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.warn('Socket disconnected', reason);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis._io.on('error', (err: any) => {\r\n\t\t\t\tthis._connected = false;\r\n\t\t\t\tif (this._core && typeof this._core.emit === 'function') {\r\n\t\t\t\t\tthis._core.emit('socket_error', err);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.warn('Socket error', err);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Disconnects the WebSocket connection and resets the connection state.\r\n\t */\r\n\tdisconnect(): void {\r\n\t\tif (this._io) {\r\n\t\t\tthis._io.disconnect();\r\n\t\t}\r\n\r\n\t\tthis._connected = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Subscribes to a WebSocket event.\r\n\t * @param to - The event to subscribe to.\r\n\t * @param cb - The callback function to execute when the event is received.\r\n\t */\r\n\ton(to: string, cb: (message: any) => void = () => {}): void {\r\n\t\tif (!this._config.socket) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._io) {\r\n\t\t\tconsole.warn('Socket client not loaded.');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._connected) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.on(to, cb);\r\n\t\t\t}, 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._io.on(to, cb);\r\n\t}\r\n\r\n\t/**\r\n\t * Emits a message to a WebSocket event.\r\n\t * @param to - The event to emit the message to.\r\n\t * @param message - The message to emit.\r\n\t * @param room - Optional room to emit the message to.\r\n\t */\r\n\temit(to: string, message: any, room: any = false): void {\r\n\t\tif (!this._config.socket) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._io) {\r\n\t\t\tconsole.warn('Socket client not loaded.');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._connected) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.emit(to, message, room);\r\n\t\t\t}, 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._io.emit(to, message, room);\r\n\t}\r\n}\r\n","import { DatePipe } from '@angular/common';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class TimeService {\r\n\tprivate weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\r\n\r\n\tprivate monthNames = [\r\n\t\t'January',\r\n\t\t'February',\r\n\t\t'March',\r\n\t\t'April',\r\n\t\t'May',\r\n\t\t'June',\r\n\t\t'July',\r\n\t\t'August',\r\n\t\t'September',\r\n\t\t'October',\r\n\t\t'November',\r\n\t\t'December',\r\n\t];\r\n\r\n\tconstructor(private datePipe: DatePipe) {}\r\n\r\n\t/**\r\n\t * Returns the name of the day of the week for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the day of the week.\r\n\t * @param format - The format in which to return the day name. Default is 'long'.\r\n\t * @returns The name of the day of the week.\r\n\t */\r\n\tgetDayName(date: Date, format: 'short' | 'long' = 'long'): string {\r\n\t\tconst dayIndex = date.getDay();\r\n\t\treturn format === 'short' ? this.weekDays[dayIndex].substring(0, 3) : this.weekDays[dayIndex];\r\n\t}\r\n\t/**\r\n\t * Returns the name of the month for a given index.\r\n\t *\r\n\t * @param monthIndex - The month index (0-11).\r\n\t * @param format - The format in which to return the month name. Default is 'long'.\r\n\t * @returns The name of the month.\r\n\t */\r\n\tgetMonthName(monthIndex: number, format: 'short' | 'long' = 'long'): string {\r\n\t\tif (!Number.isInteger(monthIndex) || monthIndex < 0 || monthIndex > 11) {\r\n\t\t\tthrow new RangeError('monthIndex must be an integer between 0 and 11');\r\n\t\t}\r\n\t\treturn format === 'short' ? this.monthNames[monthIndex].substring(0, 3) : this.monthNames[monthIndex];\r\n\t}\r\n\r\n\t/**\r\n\t * Formats a date according to the specified format and timezone.\r\n\t *\r\n\t * @param date - The date to format.\r\n\t * @param format - The format string (see Angular DatePipe documentation for format options).\r\n\t * @param timezone - The timezone to use for formatting.\r\n\t * @returns The formatted date string.\r\n\t */\r\n\tformatDate(date: Date, format: string = 'mediumDate', timezone: string = 'UTC'): string {\r\n\t\treturn this.datePipe.transform(date, format, timezone) || '';\r\n\t}\r\n\r\n\t/**\r\n\t * Converts a date to a different timezone.\r\n\t *\r\n\t * @param date - The date to convert.\r\n\t * @param timezone - The timezone to convert to.\r\n\t * @returns The date in the new timezone.\r\n\t */\r\n\tconvertToTimezone(date: Date, timezone: string): Date {\r\n\t\treturn new Date(date.toLocaleString('en-US', { timeZone: timezone }));\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the day for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the day.\r\n\t * @returns The start of the day (midnight) for the given date.\r\n\t */\r\n\tstartOfDay(date: Date): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(0, 0, 0, 0);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the day for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the day.\r\n\t * @returns The end of the day (one millisecond before midnight) for the given date.\r\n\t */\r\n\tendOfDay(date: Date): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(23, 59, 59, 999);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the week for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the week.\r\n\t * @param locale - A BCP 47 language tag to determine the first day of the week. Defaults to the runtime locale.\r\n\t * @returns The start of the week adjusted for the locale.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.startOfWeek(date); // => Monday May 13 2024 00:00:00 for en-GB\r\n\t */\r\n\tstartOfWeek(date: Date, locale?: string): Date {\r\n\t\tconst newDate = this.startOfDay(date);\r\n\t\tconst dtf = new Intl.DateTimeFormat(locale);\r\n\t\tconst resolved = dtf.resolvedOptions().locale;\r\n\t\tconst region = resolved.split('-')[1]?.toUpperCase();\r\n\t\tconst sundayFirst = ['US', 'CA', 'AU', 'NZ', 'PH', 'BR'];\r\n\t\tconst firstDay = sundayFirst.includes(region) ? 0 : 1;\r\n\t\tconst day = newDate.getDay();\r\n\t\tconst diff = (day - firstDay + 7) % 7;\r\n\t\tnewDate.setDate(newDate.getDate() - diff);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the week for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the week.\r\n\t * @param locale - A BCP 47 language tag to determine the first day of the week. Defaults to the runtime locale.\r\n\t * @returns The end of the week adjusted for the locale.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.endOfWeek(date); // => Sunday May 19 2024 23:59:59.999 for en-GB\r\n\t */\r\n\tendOfWeek(date: Date, locale?: string): Date {\r\n\t\tconst start = this.startOfWeek(date, locale);\r\n\t\tconst end = this.addDays(start, 6);\r\n\t\treturn this.endOfDay(end);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the month for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the month.\r\n\t * @returns The start of the month.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.startOfMonth(date); // => May 1 2024 00:00:00\r\n\t */\r\n\tstartOfMonth(date: Date): Date {\r\n\t\tconst newDate = this.startOfDay(date);\r\n\t\tnewDate.setDate(1);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the month for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the month.\r\n\t * @returns The end of the month.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.endOfMonth(date); // => May 31 2024 23:59:59.999\r\n\t */\r\n\tendOfMonth(date: Date): Date {\r\n\t\tconst start = this.startOfMonth(date);\r\n\t\tconst end = new Date(start);\r\n\t\tend.setMonth(end.getMonth() + 1);\r\n\t\tend.setDate(0);\r\n\t\treturn this.endOfDay(end);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the year for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the year.\r\n\t * @returns The start of the year.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.startOfYear(date); // => Jan 1 2024 00:00:00\r\n\t */\r\n\tstartOfYear(date: Date): Date {\r\n\t\tconst newDate = this.startOfDay(date);\r\n\t\tnewDate.setMonth(0, 1);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the year for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the year.\r\n\t * @returns The end of the year.\r\n\t *\r\n\t * @example\r\n\t * const date = new Date('2024-05-15');\r\n\t * service.endOfYear(date); // => Dec 31 2024 23:59:59.999\r\n\t */\r\n\tendOfYear(date: Date): Date {\r\n\t\tconst end = new Date(date.getFullYear(), 11, 31);\r\n\t\treturn this.endOfDay(end);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of days in a given month and year.\r\n\t *\r\n\t * @param month - The month (0-11).\r\n\t * @param year - The year.\r\n\t * @returns The number of days in the month.\r\n\t */\r\n\tgetDaysInMonth(month: number, year: number): number {\r\n\t\treturn new Date(year, month + 1, 0).getDate();\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a given year is a leap year.\r\n\t *\r\n\t * @param year - The year to check.\r\n\t * @returns True if the year is a leap year, false otherwise.\r\n\t */\r\n\tisLeapYear(year: number): boolean {\r\n\t\treturn (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of days to a date.\r\n\t *\r\n\t * @param date - The date to which to add days.\r\n\t * @param days - The number of days to add.\r\n\t * @returns The new date with the added days.\r\n\t */\r\n\taddDays(date: Date, days: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setDate(newDate.getDate() + days);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of months to a date.\r\n\t *\r\n\t * @param date - The date to which to add months.\r\n\t * @param months - The number of months to add.\r\n\t * @returns The new date with the added months.\r\n\t */\r\n\taddMonths(date: Date, months: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setMonth(newDate.getMonth() + months);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of years to a date.\r\n\t *\r\n\t * @param date - The date to which to add years.\r\n\t * @param years - The number of years to add.\r\n\t * @returns The new date with the added years.\r\n\t */\r\n\taddYears(date: Date, years: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setFullYear(newDate.getFullYear() + years);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of hours to a date.\r\n\t *\r\n\t * @param date - The date to which to add hours.\r\n\t * @param hours - The number of hours to add.\r\n\t * @returns The new date with the added hours.\r\n\t */\r\n\taddHours(date: Date, hours: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(newDate.getHours() + hours);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of minutes to a date.\r\n\t *\r\n\t * @param date - The date to which to add minutes.\r\n\t * @param minutes - The number of minutes to add.\r\n\t * @returns The new date with the added minutes.\r\n\t */\r\n\taddMinutes(date: Date, minutes: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setMinutes(newDate.getMinutes() + minutes);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of seconds to a date.\r\n\t *\r\n\t * @param date - The date to which to add seconds.\r\n\t * @param seconds - The number of seconds to add.\r\n\t * @returns The new date with the added seconds.\r\n\t */\r\n\taddSeconds(date: Date, seconds: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setSeconds(newDate.getSeconds() + seconds);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of days from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract days.\r\n\t * @param days - The number of days to subtract.\r\n\t * @returns The new date with the subtracted days.\r\n\t */\r\n\tsubtractDays(date: Date, days: number): Date {\r\n\t\treturn this.addDays(date, -days);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of months from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract months.\r\n\t * @param months - The number of months to subtract.\r\n\t * @returns The new date with the subtracted months.\r\n\t */\r\n\tsubtractMonths(date: Date, months: number): Date {\r\n\t\treturn this.addMonths(date, -months);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of years from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract years.\r\n\t * @param years - The number of years to subtract.\r\n\t * @returns The new date with the subtracted years.\r\n\t */\r\n\tsubtractYears(date: Date, years: number): Date {\r\n\t\treturn this.addYears(date, -years);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of hours from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract hours.\r\n\t * @param hours - The number of hours to subtract.\r\n\t * @returns The new date with the subtracted hours.\r\n\t */\r\n\tsubtractHours(date: Date, hours: number): Date {\r\n\t\treturn this.addHours(date, -hours);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of minutes from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract minutes.\r\n\t * @param minutes - The number of minutes to subtract.\r\n\t * @returns The new date with the subtracted minutes.\r\n\t */\r\n\tsubtractMinutes(date: Date, minutes: number): Date {\r\n\t\treturn this.addMinutes(date, -minutes);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of seconds from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract seconds.\r\n\t * @param seconds - The number of seconds to subtract.\r\n\t * @returns The new date with the subtracted seconds.\r\n\t */\r\n\tsubtractSeconds(date: Date, seconds: number): Date {\r\n\t\treturn this.addSeconds(date, -seconds);\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates the difference in days between two dates.\r\n\t *\r\n\t * @param date1 - The earlier date.\r\n\t * @param date2 - The later date.\r\n\t * @returns The number of days between the two dates.\r\n\t */\r\n\tdifferenceInDays(date1: Date, date2: Date): number {\r\n\t\tconst diff = date2.getTime() - date1.getTime();\r\n\t\treturn diff / (1000 * 60 * 60 * 24);\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates the difference in hours between two dates.\r\n\t *\r\n\t * @param date1 - The earlier date.\r\n\t * @param date2 - The later date.\r\n\t * @returns The number of hours between the two dates.\r\n\t */\r\n\tdifferenceInHours(date1: Date, date2: Date): number {\r\n\t\tconst diff = date2.getTime() - date1.getTime();\r\n\t\treturn diff / (1000 * 60 * 60);\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates the difference in minutes between two dates.\r\n\t *\r\n\t * @param date1 - The earlier date.\r\n\t * @param date2 - The later date.\r\n\t * @returns The number of minutes between the two dates.\r\n\t */\r\n\tdifferenceInMinutes(date1: Date, date2: Date): number {\r\n\t\tconst diff = date2.getTime() - date1.getTime();\r\n\t\treturn diff / (1000 * 60);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if two dates are on the same day.\r\n\t *\r\n\t * @param date1 - The first date.\r\n\t * @param date2 - The second date.\r\n\t * @returns True if the dates are on the same day, false otherwise.\r\n\t */\r\n\tisSameDay(date1: Date, date2: Date): boolean {\r\n\t\treturn date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the ISO week number for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the week number.\r\n\t * @returns The ISO week number (1-53).\r\n\t */\r\n\tgetWeekNumber(date: Date): number {\r\n\t\tconst tempDate = new Date(date.getTime());\r\n\t\ttempDate.setHours(0, 0, 0, 0);\r\n\t\t// Set to nearest Thursday: current date + 4 - current day number, making Thursday day 4\r\n\t\ttempDate.setDate(tempDate.getDate() + 4 - (tempDate.getDay() || 7));\r\n\t\tconst yearStart = new Date(tempDate.getFullYear(), 0, 1);\r\n\t\t// Calculate full weeks to nearest Thursday\r\n\t\treturn Math.ceil(((tempDate.getTime() - yearStart.getTime()) / 86400000 + 1) / 7);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of weeks in a month for a given month and year.\r\n\t *\r\n\t * @param month - The month (0-11).\r\n\t * @param year - The year.\r\n\t * @returns The number of weeks in the month.\r\n\t */\r\n\tgetWeeksInMonth(month: number, year: number): number {\r\n\t\tconst firstDayOfMonth = new Date(year, month, 1);\r\n\t\tconst lastDayOfMonth = new Date(year, month + 1, 0);\r\n\t\t// Get ISO week numbers for the first and last day of the month\r\n\t\tconst firstWeek = this.getWeekNumber(firstDayOfMonth);\r\n\t\tlet lastWeek = this.getWeekNumber(lastDayOfMonth);\r\n\t\t// Special case: when January 1st is in the last week of the previous year\r\n\t\tif (firstWeek > lastWeek) {\r\n\t\t\tlastWeek = this.getWeekNumber(new Date(year, 11, 31)); // Get week of the last day of the year\r\n\t\t}\r\n\t\treturn lastWeek - firstWeek + 1;\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class UtilService {\r\n\tprivate variables: { [key: string]: string } = {};\r\n\r\n\tprivate _forms: { [key: string]: any } = {};\r\n\r\n\t// global variable use for design purposes\r\n\tvar: Record<string, unknown> = {};\r\n\r\n\tconstructor() {\r\n\t\tconst storedVariables = localStorage.getItem('css_variables');\r\n\r\n\t\tthis.variables = storedVariables ? JSON.parse(storedVariables) : {};\r\n\r\n\t\tfor (const key in this.variables) {\r\n\t\t\tthis.setProperty(key, this.variables[key]);\r\n\t\t}\r\n\t}\r\n\r\n\t/* Forms Management */\r\n\t/**\r\n\t * Manages form states.\r\n\t *\r\n\t * @param id - The form identifier.\r\n\t * @returns The form state object.\r\n\t */\r\n\tpublic form(id: string): any {\r\n\t\tif (typeof id !== 'string') return {};\r\n\r\n\t\tif (!this._forms[id]) this._forms[id] = {};\r\n\r\n\t\treturn this._forms[id];\r\n\t}\r\n\r\n\t/**\r\n\t * Validates input values based on the specified type.\r\n\t *\r\n\t * @param value - The value to validate.\r\n\t * @param kind - The type of validation.\r\n\t * @param extra - Additional validation criteria.\r\n\t * @returns True if the value is valid, false otherwise.\r\n\t */\r\n\tpublic valid(value: any, kind = 'email', extra = 0): boolean {\r\n\t\tconst validators: { [key: string]: (value: any) => boolean } = {\r\n\t\t\temail: (value) => /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,10})+$/.test(value || ''),\r\n\t\t\ttext: (value) => typeof value === 'string',\r\n\t\t\tarray: (value) => Array.isArray(value),\r\n\t\t\tobject: (value) => typeof value === 'object' && !Array.isArray(value) && value !== null,\r\n\t\t\tnumber: (value) => typeof value === 'number',\r\n\t\t\tpassword: (value) => {\r\n\t\t\t\tif (!value) return false;\r\n\t\t\t\tswitch (extra) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))/.test(value || '');\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn /^(((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[@#$%&!-_]))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn !!value;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t};\r\n\r\n\t\treturn validators[kind] ? validators[kind](value) : false;\r\n\t}\r\n\r\n\t/**\r\n\t * Determines the strength of a password.\r\n\t *\r\n\t * @param value - The password to evaluate.\r\n\t * @returns The strength level of the password.\r\n\t */\r\n\tpublic level(value = ''): number {\r\n\t\tif (!value) return 0;\r\n\r\n\t\tlet level = 0;\r\n\r\n\t\tif (value.length > 8) level++;\r\n\r\n\t\tif (/[a-z]/.test(value)) level++;\r\n\r\n\t\tif (/[A-Z]/.test(value)) level++;\r\n\r\n\t\tif (/[1-9]/.test(value)) level++;\r\n\r\n\t\tif (/[`!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~]/.test(value)) level++;\r\n\r\n\t\treturn level;\r\n\t}\r\n\r\n\t/* CSS Management */\r\n\t/**\r\n\t * Saves the CSS variables to local storage.\r\n\t */\r\n\tprivate save(): void {\r\n\t\tlocalStorage.setItem('css_variables', JSON.stringify(this.variables));\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a CSS variable.\r\n\t *\r\n\t * @param key - The CSS variable name.\r\n\t * @param value - The CSS variable value.\r\n\t */\r\n\tprivate setProperty(key: string, value: string): void {\r\n\t\tdocument.documentElement.style.setProperty(key, value);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets multiple CSS variables.\r\n\t *\r\n\t * @param variables - The CSS variables to set.\r\n\t * @param opts - Options for setting the variables.\r\n\t */\r\n\tpublic set(variables: { [key: string]: string }, opts: any = {}): void {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = opts === 'local' ? { local: true } : { host: opts };\r\n\t\t}\r\n\t\tif (opts.host && window.location.host !== opts.host) return;\r\n\t\tfor (const key in variables) {\r\n\t\t\tif (opts.local) {\r\n\t\t\t\tthis.variables[key] = variables[key];\r\n\t\t\t} else if (this.variables[key]) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tthis.setProperty(key, variables[key]);\r\n\t\t}\r\n\t\tif (opts.local) this.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the stored CSS variables.\r\n\t *\r\n\t * @returns The stored CSS variables.\r\n\t */\r\n\tpublic get(): { [key: string]: string } {\r\n\t\treturn this.variables;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes specified CSS variables.\r\n\t *\r\n\t * @param keys - The keys of the CSS variables to remove.\r\n\t */\r\n\tpublic remove(keys: string | string[]): void {\r\n\t\tconst keyArray = Array.isArray(keys) ? keys : keys.split(' ');\r\n\r\n\t\tfor (const key of keyArray) {\r\n\t\t\tdelete this.variables[key];\r\n\t\t}\r\n\r\n\t\tthis.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Generates an array of sample data.\r\n\t *\r\n\t * @param arrLen - The length of the array.\r\n\t * @param type - The type of data to generate.\r\n\t * @returns An array of sample data.\r\n\t */\r\n\tpublic arr(arrLen = 10, type: string = 'number'): any[] {\r\n\t\tconst arr = [];\r\n\r\n\t\tfor (let i = 0; i < arrLen; i++) {\r\n\t\t\tswitch (type) {\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\tarr.push(i + 1);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\tarr.push(this.text());\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\tarr.push(new Date(new Date().getTime() + i * 86400000));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tarr.push(type);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a random text string.\r\n\t *\r\n\t * @param length - The length of the text string.\r\n\t * @returns A random text string.\r\n\t */\r\n\tpublic text(length = 10): string {\r\n\t\tconst characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n\r\n\t\tlet result = '';\r\n\r\n\t\tfor (let i = 0; i < length; i++) {\r\n\t\t\tresult += characters.charAt(Math.floor(Math.random() * characters.length));\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n}\r\n","import { DOCUMENT, inject, provideEnvironmentInitializer } from '@angular/core';\r\nimport { Config, CONFIG_TOKEN, DEFAULT_CONFIG } from '../public-api';\r\n\r\nexport const themeProvider = () => {\r\n\treturn provideEnvironmentInitializer(() => {\r\n\t\tconst doc = inject(DOCUMENT);\r\n\r\n\t\tconst config = inject<Config>(CONFIG_TOKEN);\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-primary', config.theme?.primary || DEFAULT_CONFIG.theme?.primary || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-secondary', config.theme?.secondary || DEFAULT_CONFIG.theme?.secondary || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-info', config.theme?.info || DEFAULT_CONFIG.theme?.info || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-error', config.theme?.error || DEFAULT_CONFIG.theme?.error || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-success', config.theme?.success || DEFAULT_CONFIG.theme?.success || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-warning', config.theme?.warning || DEFAULT_CONFIG.theme?.warning || '');\r\n\r\n\t\tdoc?.documentElement?.style.setProperty('--wacom-question', config.theme?.question || DEFAULT_CONFIG.theme?.question || '');\r\n\t});\r\n};\r\n","import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\r\nimport { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from './interfaces/config.interface';\r\nimport { themeProvider } from './theme';\r\n\r\nexport function provideWacom(config: Config = DEFAULT_CONFIG): EnvironmentProviders {\r\n\treturn makeEnvironmentProviders([\r\n\t\t{ provide: CONFIG_TOKEN, useValue: config },\r\n\t\tprovideHttpClient(withInterceptorsFromDi()),\r\n\t\tthemeProvider(),\r\n\t]);\r\n}\r\n","/* initialize */\r\nimport { CommonModule } from '@angular/common';\r\nimport { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { Config, CONFIG_TOKEN, DEFAULT_CONFIG } from './interfaces/config.interface';\r\n\r\n/* directives */\r\nimport { ClickOutsideDirective } from './directives/click-outside.directive';\r\nconst DIRECTIVES = [ClickOutsideDirective];\r\n\r\n/* pipes */\r\nimport { ArrPipe } from './pipes/arr.pipe';\r\nimport { MongodatePipe } from './pipes/mongodate.pipe';\r\nimport { PaginationPipe } from './pipes/pagination.pipe';\r\nimport { SafePipe } from './pipes/safe.pipe';\r\nimport { SearchPipe } from './pipes/search.pipe';\r\nimport { SplicePipe } from './pipes/splice.pipe';\r\nconst PIPES = [ArrPipe, SafePipe, SplicePipe, SearchPipe, MongodatePipe, PaginationPipe];\r\n\r\n/* components */\r\nimport { AlertComponent } from './components/alert/alert/alert.component';\r\nimport { WrapperComponent } from './components/alert/wrapper/wrapper.component';\r\nimport { FilesComponent } from './components/files/files.component';\r\nimport { LoaderComponent } from './components/loader/loader.component';\r\nimport { ModalComponent } from './components/modal/modal.component';\r\nimport { themeProvider } from './theme';\r\nconst LOCAL_COMPONENTS = [WrapperComponent, FilesComponent];\r\nconst COMPONENTS = [LoaderComponent, ModalComponent, AlertComponent];\r\n\r\n@NgModule({\r\n\timports: [CommonModule, FormsModule, ...LOCAL_COMPONENTS, ...PIPES, ...COMPONENTS, ...DIRECTIVES],\r\n\texports: [...PIPES, ...COMPONENTS, ...DIRECTIVES],\r\n\tproviders: [{ provide: CONFIG_TOKEN, useValue: DEFAULT_CONFIG }, provideHttpClient(withInterceptorsFromDi())],\r\n})\r\n/**\r\n * @deprecated Use provideWacom instead.\r\n */\r\nexport class WacomModule {\r\n\tstatic forRoot(config: Config = DEFAULT_CONFIG): ModuleWithProviders<WacomModule> {\r\n\t\treturn {\r\n\t\t\tngModule: WacomModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: CONFIG_TOKEN,\r\n\t\t\t\t\tuseValue: config,\r\n\t\t\t\t},\r\n\t\t\t\tthemeProvider(),\r\n\t\t\t],\r\n\t\t};\r\n\t}\r\n}\r\n","/*\r\n *\tInterfaces\r\n */\r\nexport * from './src/interfaces/alert.interface';\r\nexport * from './src/interfaces/config.interface';\r\nexport * from './src/interfaces/crud.interface';\r\nexport * from './src/interfaces/modal.interface';\r\n/*\r\n *\tGuard\r\n */\r\nexport * from './src/guard/meta.guard';\r\n/*\r\n *\tComponents\r\n */\r\nexport * from './src/components/alert/alert/alert.component';\r\nexport * from './src/components/base.component';\r\nexport * from './src/components/crud.component';\r\nexport * from './src/components/loader/loader.component';\r\nexport * from './src/components/modal/modal.component';\r\n/*\r\n *\tDirectives\r\n */\r\nexport * from './src/directives/click-outside.directive';\r\n/*\r\n *\tPipes\r\n */\r\nexport * from './src/pipes/arr.pipe';\r\nexport * from './src/pipes/mongodate.pipe';\r\nexport * from './src/pipes/number.pipe';\r\nexport * from './src/pipes/pagination.pipe';\r\nexport * from './src/pipes/safe.pipe';\r\nexport * from './src/pipes/search.pipe';\r\nexport * from './src/pipes/splice.pipe';\r\nexport * from './src/pipes/split.pipe';\r\n/*\r\n *\tServices\r\n */\r\nexport * from './src/services/alert.service';\r\nexport * from './src/services/base.service';\r\nexport * from './src/services/core.service';\r\nexport * from './src/services/crud.service';\r\nexport * from './src/services/dom.service';\r\nexport * from './src/services/file.service';\r\nexport * from './src/services/http.service';\r\nexport * from './src/services/loader.service';\r\nexport * from './src/services/meta.service';\r\nexport * from './src/services/modal.service';\r\nexport * from './src/services/rtc.service';\r\nexport * from './src/services/socket.service';\r\nexport * from './src/services/store.service';\r\nexport * from './src/services/time.service';\r\nexport * from './src/services/util.service';\r\n/*\r\n *\tInitial\r\n *\r\n *\tmake different kind of modules, one which import all, other for piece by piece\r\n */\r\nexport * from './src/provide-wacom';\r\nexport * from './src/wacom.module';\r\n/*\r\n *\tEnd of Support\r\n */\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i1.DomService","i1.StoreService","i2","i2.HttpService","i1.CoreService"],"mappings":";;;;;;;;;;;;;AAEA;;AAEG;AACI,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU;AAG7E;;AAEG;MACU,eAAe,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa;AAoD9H;;AAEG;AACI,MAAM,oBAAoB,GAAU;AAC1C,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,OAAO,EAAE,EAAE;;;MCjCC,YAAY,GAAG,IAAI,cAAc,CAAS,QAAQ;AAExD,MAAM,cAAc,GAAW;AACrC,IAAA,KAAK,EAAE;AACN,QAAA,MAAM,EAAE,SAAS;AACjB,KAAA;AACD,IAAA,IAAI,EAAE;AACL,QAAA,cAAc,EAAE,KAAK;AACrB,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;AACvB,KAAA;AACD,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,IAAI,EAAE;AACL,QAAA,GAAG,EAAE,EAAE;AACP,QAAA,OAAO,EAAE,EAAE;AACX,KAAA;AACD,IAAA,KAAK,EAAE;AACN,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,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