{"version":3,"file":"odx-angular.mjs","sources":["../../../../libs/angular/src/lib/controllers/controller.ts","../../../../libs/angular/src/lib/controllers/disabled.controller.ts","../../../../libs/angular/src/lib/controllers/readonly.controller.ts","../../../../libs/angular/src/lib/directives/click-outside.directive.ts","../../../../libs/angular/src/lib/directives/delegate-focus.directive.ts","../../../../libs/angular/src/lib/directives/with-disabled-state.directive.ts","../../../../libs/angular/src/lib/directives/with-tabindex.directive.ts","../../../../libs/angular/src/lib/core.module.ts","../../../../libs/angular/src/lib/models/environment.ts","../../../../libs/angular/src/lib/services/window-ref.ts","../../../../libs/angular/src/lib/tokens/identity-matcher.ts","../../../../libs/angular/src/lib/tokens/string-search-handler.ts","../../../../libs/angular/src/lib/tokens/stringify.ts","../../../../libs/angular/src/odx-angular.ts"],"sourcesContent":["import { ChangeDetectorRef, Directive, inject, OnChanges, OnDestroy } from '@angular/core';\nimport { isPresent, pluckFromArray } from '@odx/angular/utils';\nimport { EMPTY, merge, Observable, shareReplay, Subject, tap } from 'rxjs';\n\nfunction controllerChanges(controllers: Array<Controller | undefined | null>): Observable<void> {\n  const changes$ = pluckFromArray(controllers.filter(isPresent), 'change$');\n\n  return changes$.length > 0 ? merge(...changes$) : EMPTY;\n}\n\n/**\n * Sets up change detection for the provided controllers within the context of an Angular component or directive.\n * It listens for changes from the specified controllers and triggers Angular's change detection mechanism in response.\n *\n * @param {...Array<Controller | undefined | null>} controllers - The controllers to monitor for changes.\n * @returns {Observable<void>} An observable that emits whenever a change occurs in any of the provided controllers.\n */\nexport function detectControllerChanges(...controllers: Array<Controller | undefined | null>): Observable<void> {\n  const changeDetector = inject(ChangeDetectorRef);\n\n  return controllerChanges(controllers).pipe(tap(() => changeDetector.markForCheck()));\n}\n\n/**\n * An abstract base class representing a controller that can notify observers of changes in its state.\n * It provides lifecycle hooks for ngOnChanges and ngOnDestroy to manage its internal change observable.\n */\n@Directive()\nexport abstract class Controller implements OnChanges, OnDestroy {\n  private readonly change$$ = new Subject<void>();\n\n  /**\n   * Represents an observable stream of changes.\n   * @readonly\n   */\n  public readonly change$ = this.change$$.pipe(shareReplay({ bufferSize: 1, refCount: true }));\n\n  /**\n   * Sets up a controller instance to emit change events and trigger Angular change detection whenever\n   * the controller's state changes. It is a utility method that can be used to initialize controllers\n   * that are managed outside of Angular's DI system.\n   *\n   * @static\n   * @param {Controller | null} controller - The controller instance to set up.\n   * @param {ChangeDetectorRef} changeDetector - The Angular change detector reference to trigger change detection.\n   * @returns {Controller | null} The same controller instance for chaining or null if the controller is not provided.\n   */\n  public static setup(controller: Controller | null, changeDetector: ChangeDetectorRef): Controller | null {\n    controllerChanges([controller])\n      .pipe(tap(() => changeDetector.markForCheck()))\n      .subscribe();\n\n    return controller;\n  }\n\n  public ngOnChanges(): void {\n    this.triggerControllerChange();\n  }\n\n  public ngOnDestroy(): void {\n    this.change$$.complete();\n  }\n\n  protected triggerControllerChange() {\n    this.change$$.next();\n  }\n}\n","import { booleanAttribute, ChangeDetectorRef, Directive, forwardRef, Host, inject, InjectionToken, Input, Optional, Provider } from '@angular/core';\nimport { distinctUntilChanged, map, shareReplay } from 'rxjs';\nimport { Controller } from './controller';\n\nexport const DISABLED_CONTROLLER = new InjectionToken<DisabledController>('@odx/angular::DisabledWatchedController');\nexport const DISABLED_INTERNAL_CONTROLLER = new InjectionToken<DisabledController | null>('@odx/angular::DisabledController');\n\n/**\n * Directive that provides hierarchical disabled state management for Angular components or directives.\n * It allows for a disabled state to be inherited from parent components, facilitating the propagation\n * of disabled states down component trees. This is particularly useful in forms or complex component\n * structures where nested components need to respond to disabled states dynamically.\n *\n * The `DisabledController` works by injecting itself or a parent `DisabledController` instance to determine\n * the effective disabled state, taking into account both its own state and that of its parents.\n *\n * Usage:\n * Apply the `disabled` attribute, potentially bound to a component property, to use this directive.\n * The directive can be automatically provided to the component's children by calling the `connect`\n * static method in the component's providers array.\n *\n * @example\n * ```ts\n * @Component({\n *   selector: 'app-custom-input',\n *   templateUrl: './custom-input.component.html',\n *   providers: [DisabledController.connect()],\n *   standalone: true,\n * })\n * export class CustomInputComponent {\n *   constructor(private disabledCtrl: DisabledController) {}\n * }\n * ```\n * ```html\n * <input [disabled]=\"disabledCtrl.disabled\" />\n * ```\n */\n@Directive({\n  standalone: true,\n  selector: '[disabled]',\n  providers: [\n    {\n      provide: DISABLED_INTERNAL_CONTROLLER,\n      useExisting: forwardRef(() => DisabledController),\n    },\n  ],\n})\nexport class DisabledController extends Controller {\n  private readonly parentController = inject(DISABLED_CONTROLLER, { optional: true, skipSelf: true });\n  private isDisabled = false;\n\n  /**\n   * A reactive representation of the current effective disabled state, considering both\n   * the controller's own state and that of its parent controllers.\n   *\n   * @emits {boolean} - The current disabled state.\n   */\n  public readonly isDisabled$ = this.change$.pipe(\n    map(() => this.disabled),\n    distinctUntilChanged(),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  /**\n   * Sets the disabled state of the current controller. If the state changes, updates the internal\n   * flag.\n   *\n   * @param {boolean} value - The new disabled state to be applied.\n   */\n  @Input({ transform: booleanAttribute })\n  public set disabled(value: boolean) {\n    this.isDisabled = value;\n  }\n\n  /**\n   * Gets a value indicating whether the controller is disabled.\n   *\n   * @returns {boolean} - `true` if the controller is disabled, `false` otherwise.\n   */\n  public get disabled(): boolean {\n    return this.isDisabled || !!this.parentController?.disabled;\n  }\n\n  /**\n   * Retrieves an instance of the `DisabledController` class from the dependency injection container.\n   * If the `DisabledController` is not registered in the container, it returns `null`.\n   *\n   * @static\n   * @returns {DisabledController | null} An instance of the `DisabledController` class or `null` if not found.\n   */\n  public static inject(): DisabledController | null {\n    return inject(DISABLED_CONTROLLER, { optional: true });\n  }\n\n  /**\n   * Static method to facilitate the injection of the `DisabledController` within Angular's DI system.\n   * This method provides a way to connect a component with its closest `DisabledController` parent,\n   * allowing for disabled state inheritance.\n   *\n   * @static\n   * @returns {Provider[]} An array of providers to enable disabled state management within a component.\n   */\n  public static connect(): Provider[] {\n    return [\n      {\n        provide: DISABLED_INTERNAL_CONTROLLER,\n        useFactory: (hostController: DisabledController | null) => hostController ?? new DisabledController(),\n        deps: [[new Optional(), new Host(), DisabledController]],\n      },\n      {\n        provide: DISABLED_CONTROLLER,\n        useFactory: Controller.setup,\n        deps: [[new Optional(), new Host(), DISABLED_INTERNAL_CONTROLLER], ChangeDetectorRef],\n      },\n    ];\n  }\n\n  /**\n   * Sets the disabled state of the current controller and triggers change detection if the state changes.\n   *\n   * @param {boolean} state - The new disabled state to be applied.\n   */\n  public setDisabledState(state: boolean): void {\n    if (this.disabled !== state) {\n      this.disabled = state;\n      this.ngOnChanges();\n    }\n  }\n}\n","import { booleanAttribute, ChangeDetectorRef, Directive, ElementRef, forwardRef, Host, inject, InjectionToken, Input, Optional, Provider } from '@angular/core';\nimport { distinctUntilChanged, map, shareReplay } from 'rxjs';\nimport { Controller } from './controller';\n\nconst ELEMENTS_WITH_READONLY_ATTRIBUTE = {\n  input: true,\n  textarea: true,\n  select: true,\n} as Record<string, boolean>;\n\nexport const READONLY_CONTROLLER = new InjectionToken<ReadonlyController>('@odx/angular::ReadonlyWatchedController');\nexport const READONLY_INTERNAL_CONTROLLER = new InjectionToken<ReadonlyController | null>('@odx/angular::ReadonlyController');\n\n/**\n * Directive to manage and propagate the readonly state within Angular components or directives,\n * particularly useful for form elements like input, textarea, and select. It supports hierarchical\n * readonly state management, allowing a parent component's readonly state to be inherited by its children.\n *\n * The directive leverages Angular's dependency injection system to access parent readonly controllers,\n * enabling a cascading readonly state. This is beneficial in scenarios where a form or a part of it\n * should become readonly based on certain conditions.\n *\n * Usage:\n * Apply the `readonly` attribute, potentially bound to a component property, to use this directive.\n * The directive can automatically provide itself to the component's children by calling the `connect`\n * static method in the component's providers array.\n *\n * @example\n * ```ts\n * @Component({\n *   selector: 'app-custom-input',\n *   templateUrl: './custom-input.component.html',\n *   providers: [ReadonlyController.connect()],\n *   standalone: true,\n * })\n * export class CustomInputComponent {\n *   constructor(private readonlyCtrl: ReadonlyController) {}\n * }\n * ```\n *\n * Template for CustomInputComponent with conditional readonly state:\n * ```html\n * <input [readonly]=\"readonlyCtrl.readonly\" />\n * ```\n */\n@Directive({\n  standalone: true,\n  selector: '[readonly]',\n  providers: [\n    {\n      provide: READONLY_INTERNAL_CONTROLLER,\n      useExisting: forwardRef(() => ReadonlyController),\n    },\n  ],\n  host: {\n    '[attr.readonly]': 'hasReadonlyAttribute || null',\n  },\n})\nexport class ReadonlyController extends Controller {\n  private readonly parentController = inject(READONLY_CONTROLLER, { optional: true, skipSelf: true });\n  private readonly nodeName: string;\n  private isReadonly = false;\n\n  protected hasReadonlyAttribute = false;\n\n  /**\n   * An observable that emits the current value of the `isReadonly` property whenever it changes.\n   * The emitted values are distinct and replayed to new subscribers.\n   *\n   * @emits {boolean} The current readonly state of the controller.\n   */\n  public readonly isReadonly$ = this.change$.pipe(\n    map(() => this.isReadonly),\n    distinctUntilChanged(),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  /**\n   * Sets the readonly state of the current controller. If the state changes, updates the internal\n   * flag that controls the rendering of the `readonly` attribute in the host element.\n   *\n   * @param {boolean} value - The new readonly state to be applied.\n   */\n  @Input({ transform: booleanAttribute })\n  public set readonly(value: boolean) {\n    if (this.isReadonly === value) return;\n    this.isReadonly = value;\n    this.hasReadonlyAttribute = this.isReadonly && ELEMENTS_WITH_READONLY_ATTRIBUTE[this.nodeName];\n  }\n  public get readonly(): boolean {\n    return this.isReadonly || !!this.parentController?.readonly;\n  }\n\n  constructor(element: ElementRef<HTMLElement> | null = null) {\n    super();\n    this.nodeName = element?.nativeElement.nodeName.toLowerCase() ?? '';\n  }\n\n  /**\n   * Returns an instance of the ReadonlyController or null if it cannot be found.\n   *\n   * @static\n   * @returns {ReadonlyController | null} An instance of the ReadonlyController or null.\n   */\n  public static inject(): ReadonlyController | null {\n    return inject(READONLY_CONTROLLER, { optional: true });\n  }\n\n  /**\n   * Static method to facilitate the injection of the `ReadonlyController` within Angular's DI system.\n   * This method provides a way to connect a component with its closest `ReadonlyController` parent,\n   * allowing for readonly state inheritance.\n   *\n   * @static\n   * @returns {Provider} An array of providers to enable readonly state management within a component.\n   */\n  public static connect(): Provider {\n    return [\n      {\n        provide: READONLY_INTERNAL_CONTROLLER,\n        useFactory: (hostController: ReadonlyController | null, elementRef: ElementRef | null) => hostController ?? new ReadonlyController(elementRef),\n        deps: [\n          [new Optional(), new Host(), ReadonlyController],\n          [new Optional(), ElementRef],\n        ],\n      },\n      {\n        provide: READONLY_CONTROLLER,\n        useFactory: Controller.setup,\n        deps: [[new Optional(), new Host(), READONLY_INTERNAL_CONTROLLER], ChangeDetectorRef],\n      },\n    ];\n  }\n}\n","import { booleanAttribute, Directive, EventEmitter, inject, Input, OnChanges, OnDestroy, OnInit, Output, Renderer2 } from '@angular/core';\nimport { deferFn, hasChanged, injectElement, NgChanges } from '@odx/angular/utils';\nimport { debounceTime, NEVER, Observable, Subscription, switchMap, tap } from 'rxjs';\n\n/**\n * Directive to detect clicks outside of an element. When active, it listens for clicks outside\n * the host element and emits an event through the `odxClickOutside` EventEmitter. This is useful\n * for handling UI logic that depends on outside clicks, such as closing a dropdown or modal\n * when the user clicks elsewhere on the page.\n *\n * Apply `odxClickOutside` to an element and bind an event handler to react to outside clicks.\n * Optionally, use `[odxClickOutsideActive]=\"condition\"` to enable or disable the detection dynamically.\n *\n * @example\n * ```html\n * <div\n *   odxClickOutside\n *   (odxClickOutside)=\"handleClickOutside()\"\n *   [odxClickOutsideActive]=\"isDropdownOpen\">\n *   <!-- Dropdown content -->\n * </div>\n * ```\n */\n@Directive({\n  standalone: true,\n  selector: '[odxClickOutside]',\n})\nexport class ClickOutsideDirective implements OnChanges, OnInit, OnDestroy {\n  private listener?: Subscription;\n  private readonly element = injectElement();\n  private readonly renderer = inject(Renderer2);\n  private readonly onOutsideClick$ = this.registerEventHandler('mousedown').pipe(\n    switchMap((event) => {\n      if (!this.odxClickOutsideActive) return NEVER;\n      const hostElement = this.element.nativeElement;\n      const targetElement = event.target as Element;\n      const clickedOutside = hostElement.isConnected && targetElement.isConnected && !hostElement.contains(targetElement);\n      return this.registerEventHandler('mouseup').pipe(\n        debounceTime(0),\n        tap(() => clickedOutside && this.odxClickOutside.emit(event)),\n      );\n    }),\n  );\n\n  /**\n   * Controls whether the outside click detection is active. When `true`, the directive listens for outside clicks.\n   *\n   * @type {boolean}\n   * @default true\n   */\n  @Input({ transform: booleanAttribute })\n  public odxClickOutsideActive = true;\n\n  /**\n   * EventEmitter that emits the native Event object when an outside click is detected.\n   *\n   * @emits {Event}\n   */\n  @Output()\n  public readonly odxClickOutside = new EventEmitter<Event>();\n\n  public ngOnInit(): void {\n    if (this.odxClickOutsideActive) {\n      this.registerHandler();\n    }\n  }\n\n  public ngOnChanges(changes: NgChanges<ClickOutsideDirective>): void {\n    if (hasChanged(changes, 'odxClickOutsideActive', true)) {\n      if (changes.odxClickOutsideActive?.currentValue) {\n        this.registerHandler();\n      } else {\n        this.destroy();\n      }\n    }\n  }\n\n  public ngOnDestroy(): void {\n    this.destroy();\n  }\n\n  private destroy() {\n    if (this.listener) {\n      this.listener.unsubscribe();\n      this.listener = undefined;\n    }\n  }\n\n  private registerHandler() {\n    deferFn(() => {\n      this.listener = this.onOutsideClick$.subscribe();\n    });\n  }\n\n  private registerEventHandler<T extends Event>(eventName: string): Observable<T> {\n    return new Observable<T>((subscriber) => {\n      const listener = this.renderer.listen('document', eventName, (event: T) => {\n        subscriber.next(event);\n      });\n      subscriber.add(listener);\n    });\n  }\n}\n","import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\n\n/**\n * A directive to manage focus within components. It emits events when the host component is focused,\n * and dynamically updates the `tabindex` attribute to control focusability. This directive is particularly\n * useful for custom components that require explicit focus management, such as custom input components\n * or complex interactive components.\n *\n * The directive ensures that the component can be focused by setting `tabindex=\"0\"`, making it reachable\n * via keyboard navigation. When the component gains focus (`focusin`), it becomes non-focusable (`tabindex=\"-1\"`)\n * to manage focus delegation internally. It restores its focusability (`tabindex=\"0\"`) when losing focus (`focusout`),\n * allowing it to be focused again in the future.\n */\n@Directive({\n  standalone: true,\n  host: {\n    '[attr.tabindex]': 'tabindex',\n  },\n})\nexport class DelegateFocusDirective {\n  protected tabindex = 0;\n\n  /**\n   * Emits an event when the element is focused.\n   */\n  @Output()\n  public focused = new EventEmitter<void>();\n\n  @HostListener('focus')\n  protected handleFocus(): void {\n    this.focused.next();\n  }\n\n  @HostListener('focusin')\n  protected handleFocusIn(): void {\n    this.tabindex = -1;\n  }\n\n  @HostListener('focusout')\n  protected handleFocusOut(): void {\n    this.tabindex = 0;\n  }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\nimport { booleanToOptionalAttributeString } from '@odx/angular/utils';\nimport { DisabledController } from '../controllers';\n\nconst ELEMENTS_WITH_DISABLED_ATTRIBUTE = {\n  button: true,\n  fieldset: true,\n  input: true,\n  optgroup: true,\n  option: true,\n  select: true,\n  textarea: true,\n} as Record<string, boolean>;\n\n@Directive({\n  standalone: true,\n  providers: [DisabledController.connect()],\n  host: {\n    '[class.is-disabled]': 'isDisabled',\n    '[attr.aria-disabled]': 'ariaDisabled',\n    '[attr.disabled]': 'hasDisabledAttribute && isDisabled || null',\n  },\n})\nexport class WithDisabledState {\n  protected readonly hasAriaRole: boolean;\n  protected readonly hasDisabledAttribute: boolean;\n  protected readonly disabledController = DisabledController.inject();\n\n  protected get isDisabled(): boolean {\n    return !!this.disabledController?.disabled;\n  }\n\n  public get ariaDisabled(): string | null {\n    return booleanToOptionalAttributeString(this.hasAriaRole && this.isDisabled);\n  }\n\n  constructor() {\n    const element = inject(ElementRef<HTMLElement>);\n    this.hasDisabledAttribute = !!ELEMENTS_WITH_DISABLED_ATTRIBUTE[element.nativeElement.nodeName.toLowerCase() ?? ''];\n    this.hasAriaRole = element.nativeElement.hasAttribute('role');\n  }\n}\n","import { Directive, signal } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { reactiveAttributeBinding } from '@odx/angular/utils';\nimport { combineLatest, distinctUntilChanged, map, of, shareReplay, startWith } from 'rxjs';\nimport { DisabledController } from '../controllers';\n\n@Directive({ standalone: true })\nexport class WithTabIndex {\n  private readonly isDisabled$ = DisabledController.inject()?.isDisabled$.pipe(startWith(false)) ?? of(false);\n  private readonly tabindex = signal(0);\n  private readonly tabindex$ = combineLatest([toObservable(this.tabindex), this.isDisabled$]).pipe(\n    map(([tabindex, isDisabled]) => (isDisabled ? -1 : tabindex)),\n    distinctUntilChanged(),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  constructor() {\n    reactiveAttributeBinding(this.tabindex$, 'tabindex');\n  }\n\n  public setTabindex(value: number | null) {\n    this.tabindex.set(value ?? 0);\n  }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DisabledController, ReadonlyController } from './controllers';\nimport { ClickOutsideDirective } from './directives';\n\nconst controllers = [DisabledController, ReadonlyController];\n\n@NgModule({\n  imports: [...controllers, ClickOutsideDirective],\n  exports: [CommonModule, ...controllers, ClickOutsideDirective],\n})\nexport class CoreModule {}\n","export type Environment = typeof Environment[keyof typeof Environment];\n\nexport const Environment = {\n  DEV: 'dev',\n  STAGE: 'stage',\n  PROD: 'prod'\n} as const;\n","\nimport { inject, Injectable, reflectComponentType, Type, DOCUMENT } from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { fromEvents } from '@odx/angular/rxjs';\nimport { getLanguageCode } from '@odx/angular/utils';\nimport { debounceTime, distinctUntilChanged, EMPTY, filter, map, shareReplay, startWith } from 'rxjs';\n\n/**\n * A service that wraps window and document functionalities, providing Angular-friendly ways to interact with the browser's window object,\n * manage the document and its title, listen to online/offline events, and perform other browser-related operations.\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class WindowRef {\n  private readonly title = inject(Title);\n\n  /**\n   * Accesses the document object, ensuring Angular compatibility and potential SSR friendliness.\n   *\n   * @type {Document}\n   */\n  public readonly document = inject(DOCUMENT);\n\n  /**\n   * Retrieves the native window object, with a fallback to the global window if necessary.\n   * This approach helps ensure compatibility with Angular's SSR features.\n   *\n   * @type {Window}\n   */\n  public readonly nativeWindow = this.document.defaultView ?? window;\n\n  /**\n   * An observable that emits the online status of the browser, updating when the browser transitions\n   * between online and offline states.\n   *\n   * @emits {boolean} True if the browser is online; otherwise, false.\n   */\n  public readonly isOnline$ = fromEvents(this.nativeWindow, 'offline', 'online').pipe(\n    startWith(null),\n    map(() => this.isOnline()),\n    distinctUntilChanged(),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  /**\n   * An observable that emits the current page title upon navigation ends,\n   * useful for updating document titles in SPA applications.\n   *\n   * @emits {string} The current page title.\n   */\n  public readonly pageTitle$ = (inject(Router, { optional: true })?.events ?? EMPTY).pipe(\n    filter((event) => event instanceof NavigationEnd),\n    startWith(null),\n    debounceTime(0),\n    map(() => this.title.getTitle()),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  /**\n   * Gets the location object of the window.\n   *\n   * @returns {Location} The location object of the window.\n   */\n  public get location(): Location {\n    return this.nativeWindow.location;\n  }\n\n  /**\n   * Determines if the browser is currently online.\n   *\n   * @returns {boolean} True if the browser is online; otherwise, false.\n   */\n  public isOnline(): boolean {\n    return this.nativeWindow.navigator.onLine;\n  }\n\n  /**\n   * Retrieves the browser's current language setting, falling back through several browser-specific properties.\n   *\n   * @returns {string} The current language setting of the browser.\n   */\n  public getLanguage(): string {\n    const { language, languages, userLanguage } = this.nativeWindow.navigator as Navigator & { userLanguage?: string };\n\n    return languages?.[0] ?? userLanguage ?? language;\n  }\n\n  /**\n   * Extracts the language code from the browser's current language setting.\n   *\n   * @returns {string} The language code part of the browser's language setting.\n   */\n  public getLanguageCode(): string {\n    return getLanguageCode(this.getLanguage());\n  }\n\n  /**\n   * Returns the origin of the current window location.\n   *\n   * @returns The origin of the current window location.\n   */\n  public getOrigin(): string {\n    return this.location.origin;\n  }\n\n  /**\n   * Opens a new browser tab or window and navigates to the specified URL.\n   *\n   * @param {string | URL} [url] - The URL to open.\n   * @param {string} [target] - The target window or tab.\n   * @param {string} [features] - String that specifies the window features.\n   * @returns {WindowProxy | null} A reference to the newly opened window or null if the call failed.\n   */\n  public openPage(url?: string | URL, target?: string, features?: string): WindowProxy | null {\n    return this.nativeWindow.open(url, target, features);\n  }\n\n  /**\n   * Reloads the current page.\n   */\n  public reloadPage(): void {\n    return this.location.reload();\n  }\n\n  /**\n   * Queries the DOM for an element associated with a specific Angular component type.\n   *\n   * @template T The component type to query for.\n   * @param {Type<T>} type - The Angular component type.\n   * @returns {HTMLElement | null} The HTML element associated with the component, or null if not found.\n   */\n  public queryByComponent<T>(type: Type<T>): HTMLElement | null {\n    const componentType = reflectComponentType(type);\n\n    return componentType ? this.nativeWindow.document.querySelector(componentType.selector) : null;\n  }\n\n  /**\n   * Retrieves the value of a CSS variable on a specified element.\n   *\n   * @param {string} name - The name of the CSS variable.\n   * @param {HTMLElement} [element=this.document.body] - The element from which to retrieve the CSS variable.\n   * @returns {string} The value of the CSS variable.\n   */\n  public getCSSVariable(name: string, element: HTMLElement = this.document.body): string {\n    return this.nativeWindow.getComputedStyle(element).getPropertyValue(`--${name}`).trim();\n  }\n\n  /**\n   * Extracts CSS color styles that match a specific filter from the document's stylesheets.\n   *\n   * @param {string} filter - The filter to apply to CSS variable names.\n   * @param {string} [selector=':root'] - The CSS selector to filter by.\n   * @returns {Record<string, string>} A record containing the filtered CSS color styles.\n   */\n  public getCSSColorStyles(filter: string, selector = ':root'): Record<string, string> {\n    const styles: Record<string, string> = {};\n    const sheets = Array.from(this.document.styleSheets).filter(({ href }) => !href || href.startsWith(this.nativeWindow.location.origin));\n\n    for (const sheet of sheets) {\n      const rules = sheet.cssRules || sheet.rules;\n\n      for (const rule of Array.from(rules)) {\n        if (rule instanceof CSSStyleRule && rule.selectorText === selector) {\n          for (const style of Array.from(rule.style)) {\n            if (style.startsWith('--') && style.includes(filter)) {\n              const key = style.replace('--', '');\n              styles[key] = this.getCSSVariable(key);\n            }\n          }\n        }\n      }\n    }\n    return styles;\n  }\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * A function type that defines the logic to compare two items for identity.\n * It should return `true` if the items are considered identical, otherwise `false`.\n *\n * @template T The type of the items to be compared.\n * @param {T} item1 The first item to compare.\n * @param {T} item2 The second item to compare.\n * @returns {boolean} `true` if the items are identical, otherwise `false`.\n *\n * @example\n * ```ts\n * // A simple identity matcher for number types\n * const numberMatcher: IdentityMatcher<number> = (n1, n2) => n1 === n2;\n * console.log(numberMatcher(1, 1)); // Outputs: true\n * console.log(numberMatcher(1, 2)); // Outputs: false\n * ```\n */\nexport type IdentityMatcher<T> = (item1: T, item2: T) => boolean;\n\nconst ODX_DEFAULT_IDENTITY_MATCHER: IdentityMatcher<unknown> = (item1, item2) => item1 === item2;\n\n/**\n * An Angular `InjectionToken` for the `IdentityMatcher` function, allowing for the provision\n * and injection of custom identity matching logic throughout the application. The token is\n * provided with a default factory function that returns the `ODX_DEFAULT_IDENTITY_MATCHER`,\n * which can be overridden with custom logic as needed.\n *\n * @type {InjectionToken<IdentityMatcher<unknown>>}\n *\n * @example\n * ```ts\n * // Providing a custom identity matcher in an Angular module\n * @NgModule({\n *   providers: [\n *     { provide: ODX_IDENTITY_MATCHER, useValue: (item1, item2) => item1.id === item2.id }\n *   ]\n * })\n * class AppModule {}\n *\n * // Injecting and using the custom provided identity matcher\n * constructor(@Inject(ODX_IDENTITY_MATCHER) private identityMatcher: IdentityMatcher<MyType>) {\n *   console.log(this.identityMatcher({ id: 1 }, { id: 1 })); // Depends on the custom logic provided\n * }\n * ```\n */\nexport const ODX_IDENTITY_MATCHER = new InjectionToken<IdentityMatcher<unknown>>('@odx/angular::StringHandler', {\n  providedIn: 'root',\n  factory: () => ODX_DEFAULT_IDENTITY_MATCHER,\n});\n","import { InjectionToken } from '@angular/core';\n\n/**\n * A function type that defines the logic to search within a string item using a query string.\n * It should return `true` if the item matches the query according to the implemented logic, otherwise `false`.\n *\n * @param {string} item - The string item to search within.\n * @param {string} query - The query string to search for.\n * @returns {boolean} `true` if the query matches the item, otherwise `false`.\n *\n * @example\n * ```ts\n * // A simple case-insensitive search\n * const searchHandler: StringSearchHandler = (item, query) => item.toLowerCase().includes(query.toLowerCase());\n * console.log(searchHandler('Hello World', 'world')); // Outputs: true\n * ```\n */\nexport type StringSearchHandler = (item: string, query: string) => boolean;\n\nconst ODX_DEFAULT_STRING_SEARCH_HANDLER: StringSearchHandler = (item, query) => {\n  return item.toLocaleLowerCase().includes(query.toLocaleLowerCase());\n};\n\n/**\n * An Angular `InjectionToken` for the `StringSearchHandler` function, allowing for the provision\n * and injection of custom string search logic throughout the application. This token is provided with\n * a default factory function that returns the `ODX_DEFAULT_STRING_SEARCH_HANDLER`, which can be overridden\n * with custom logic as needed.\n *\n * @type {InjectionToken<StringSearchHandler>}\n *\n * @example\n * ```ts\n * // Providing a custom string search handler in an Angular module\n * @NgModule({\n *   providers: [\n *     { provide: ODX_STRING_SEARCH_HANDLER, useValue: (item, query) => item.startsWith(query) }\n *   ]\n * })\n * class AppModule {}\n *\n * // Injecting and using the custom provided string search handler\n * constructor(@Inject(ODX_STRING_SEARCH_HANDLER) private searchHandler: StringSearchHandler) {\n *   console.log(this.searchHandler('Angular', 'A')); // Depends on the custom logic provided\n * }\n * ```\n */\nexport const ODX_STRING_SEARCH_HANDLER = new InjectionToken<StringSearchHandler>('@odx/angular::StringHandler', {\n  providedIn: 'root',\n  factory: () => ODX_DEFAULT_STRING_SEARCH_HANDLER,\n});\n","import { InjectionToken } from '@angular/core';\nimport { isPresent } from '@odx/angular/utils';\n\n/**\n * A function type that defines the logic to convert an item of any type into a string.\n * The function should handle various types gracefully, returning a meaningful string representation\n * for each. If the item is not present (null or undefined), an empty string should be returned.\n *\n * @template T The type of the item to be stringified.\n * @param {T} item - The item to stringify.\n * @returns {string} The string representation of the item.\n *\n * @example\n * ```ts\n * // A simple stringify function that handles null and undefined\n * const stringify: StringifyFn<unknown> = (item) => (isPresent(item) ? String(item) : '');\n * console.log(stringify(123)); // Outputs: \"123\"\n * console.log(stringify(null)); // Outputs: \"\"\n * ```\n */\nexport type StringifyFn<T> = (item: T) => string;\n\nconst ODX_DEFAULT_STRINGIFY: StringifyFn<unknown> = (item) => (isPresent(item) ? String(item) : '');\n\n/**\n * An Angular `InjectionToken` for the `StringifyFn` function, allowing the injection of custom\n * stringification logic throughout an application. By default, it is provided with a factory\n * function that returns `ODX_DEFAULT_STRINGIFY`. This setup permits easy customization of\n * how items are converted to strings, facilitating different stringification strategies\n * for various application needs.\n *\n * @type {InjectionToken<StringifyFn<unknown>>}\n *\n * @example\n * ```ts\n * // Providing a custom stringify function in an Angular module\n * @NgModule({\n *   providers: [\n *     { provide: ODX_STRINGIFY, useValue: (item) => JSON.stringify(item) }\n *   ]\n * })\n * class AppModule {}\n *\n * // Injecting and using the custom provided stringify function\n * constructor(@Inject(ODX_STRINGIFY) private stringify: StringifyFn<unknown>) {\n *   console.log(this.stringify({ key: 'value' })); // Outputs: '{\"key\":\"value\"}'\n * }\n * ```\n */\nexport const ODX_STRINGIFY = new InjectionToken<StringifyFn<unknown>>('@odx/angular::Stringify', {\n  providedIn: 'root',\n  factory: () => ODX_DEFAULT_STRINGIFY,\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAIA,SAAS,iBAAiB,CAAC,WAAiD,EAAA;AAC1E,IAAA,MAAM,QAAQ,GAAG,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;AAEzE,IAAA,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,GAAG,KAAK;AACzD;AAEA;;;;;;AAMG;AACG,SAAU,uBAAuB,CAAC,GAAG,WAAiD,EAAA;AAC1F,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAEhD,IAAA,OAAO,iBAA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