ng-hub-ui-portal
Version:
A flexible Angular portal library for dynamic content rendering with advanced positioning and interaction control
1 lines • 65.2 kB
Source Map (JSON)
{"version":3,"file":"ng-hub-ui-portal.mjs","sources":["../../../projects/portal/src/lib/portal-config.ts","../../../projects/portal/src/lib/portal-ref.ts","../../../projects/portal/src/lib/portal-window.ts","../../../projects/portal/src/lib/portal-stack.ts","../../../projects/portal/src/lib/portal.ts","../../../projects/portal/src/lib/portal-dismiss-reasons.ts","../../../projects/portal/src/lib/portal.module.ts","../../../projects/portal/src/public-api.ts","../../../projects/portal/src/ng-hub-ui-portal.ts"],"sourcesContent":["import { Injectable, Injector } from '@angular/core';\n// import { HubConfig } from '../hub-config';\n\n/**\n * Options available when opening new portal windows with `HubPortal.open()` method.\n */\nexport interface HubPortalOptions {\n\t/**\n\t * If `true`, portal opening and closing will be animated.\n\t *\n\t * @since 8.0.0\n\t */\n\tanimation?: boolean;\n\n\t/**\n\t * `aria-labelledby` attribute value to set on the portal window.\n\t *\n\t * @since 2.2.0\n\t */\n\tariaLabelledBy?: string;\n\n\t/**\n\t * `aria-describedby` attribute value to set on the portal window.\n\t *\n\t * @since 6.1.0\n\t */\n\tariaDescribedBy?: string;\n\n\t/**\n\t * Callback right before the portal will be dismissed.\n\t *\n\t * If this function returns:\n\t * * `false`\n\t * * a promise resolved with `false`\n\t * * a promise that is rejected\n\t *\n\t * then the portal won't be dismissed.\n\t */\n\tbeforeDismiss?: () => boolean | Promise<boolean>;\n\n\t/**\n\t * A selector specifying the element all new portal windows should be appended to.\n\t * Since v5.3.0 it is also possible to pass the reference to an `HTMLElement`.\n\t *\n\t * If not specified, will be `body`.\n\t */\n\tcontainer?: string | HTMLElement;\n\n\t/**\n\t * The `Injector` to use for portal content.\n\t */\n\tinjector?: Injector;\n\n\t/**\n\t * If `true`, the portal will be closed when `Escape` key is pressed\n\t *\n\t * Default value is `true`.\n\t */\n\tkeyboard?: boolean;\n\n\t/**\n\t * Scrollable portal content (false by default).\n\t *\n\t * @since 5.0.0\n\t */\n\tscrollable?: boolean;\n\n\t/**\n\t * A custom class to append to the portal window.\n\t */\n\twindowClass?: string;\n\n\t/**\n\t * A custom class to append to the portal dialog.\n\t *\n\t * @since 9.1.0\n\t */\n\tportalDialogClass?: string;\n\n\t/**\n\t * A custom class to append to the portal content.\n\t *\n\t * @since 9.1.0\n\t */\n\tportalContentClass?: string;\n\n\t/**\n\t * Allows to specify a custom selector for the header element of the portal window. This can be useful if you want to target\n\t * a specific element within the portal to act as the header, for example, to apply custom styling or functionality to it. By\n\t * providing a CSS selector string, you can target the desired\theader element within the portal content.\n\t */\n\theaderSelector?: string;\n\n\t/**\n\t * Allows to specify a custom selector for the footer element of the portal window. This can be useful if you want to target\n\t * a specific element within the portal to act as the footer, for example, to apply custom styling or functionality to it. By\n\t * providing a CSS selector string, you can target the desired footer element within the portal content.\n\t */\n\tfooterSelector?: string;\n\n\t/** Used to specify a custom selector for elements that can trigger the dismissal of the portal window. By providing a CSS selector\n\t * string for `dismissSelector`, you can target specific elements within the portal content that, when interacted with (e.g., clicked),\n\t * will close or dismiss the portal window.\n\t */\n\tdismissSelector?: string;\n\n\t/**\n\t * Used to specify a custom selector for elements that can trigger the closing of the portal window. By providing a CSS selector\n\t * string for `closeSelector`, you can target specific elements within the portal content that, when interacted with (e.g., clicked),\n\t * will close the portal window. This allows for customization of the elements that can act as close buttons for the portal.\n\t */\n\tcloseSelector?: string;\n}\n\n/**\n * Options that can be changed on an opened portal with `HubPortalRef.update()` and `HubActivePortal.update()` methods.\n *\n * @since 14.2.0\n */\nexport type HubPortalUpdatableOptions = Pick<\n\tHubPortalOptions,\n\t| 'ariaLabelledBy'\n\t| 'ariaDescribedBy'\n\t| 'windowClass'\n\t| 'portalDialogClass'\n\t| 'portalContentClass'\n>;\n\n/**\n * A configuration service for the [`HubPortal`](#/components/portal/api#HubPortal) service.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all portals used in the application.\n *\n * @since 3.1.0\n */\n@Injectable({ providedIn: 'root' })\nexport class HubPortalConfig implements Required<HubPortalOptions> {\n\t// private _hubConfig = inject(HubConfig);\n private _animation?: boolean;\n\n ariaLabelledBy!: string;\n ariaDescribedBy!: string;\n beforeDismiss!: () => boolean | Promise<boolean>;\n container!: string | HTMLElement;\n injector!: Injector;\n\tkeyboard = true;\n scrollable!: boolean;\n windowClass!: string;\n portalDialogClass!: string;\n portalContentClass!: string;\n headerSelector!: string;\n footerSelector!: string;\n\tdismissSelector: string = '[data-dismiss=\"portal\"]';\n\tcloseSelector: string = '[data-close=\"portal\"]';\n\n\tget animation(): boolean {\n\t\treturn this._animation ?? true /* this._hubConfig.animation */;\n\t}\n\tset animation(animation: boolean) {\n\t\tthis._animation = animation;\n\t}\n}\n","import { ComponentRef } from '@angular/core';\nimport { ContentRef, isDefined, isPromise } from 'ng-hub-ui-utils';\nimport { Observable, Subject, zip } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { HubPortalOptions, HubPortalUpdatableOptions } from './portal-config';\nimport { HubPortalWindow } from './portal-window';\n\n/**\n * A reference to the currently opened (active) portal.\n *\n * Instances of this class can be injected into your component passed as portal content.\n * So you can `.update()`, `.close()` or `.dismiss()` the portal window from your component.\n */\nexport class HubActivePortal {\n\t/**\n\t * Updates options of an opened portal.\n\t *\n\t * @since 14.2.0\n\t */\n\tupdate(options: HubPortalUpdatableOptions): void {}\n\t/**\n\t * Closes the portal with an optional `result` value.\n\t *\n\t * The `HubPortalRef.result` promise will be resolved with the provided value.\n\t */\n\tclose(result?: any): void {}\n\n\t/**\n\t * Dismisses the portal with an optional `reason` value.\n\t *\n\t * The `HubPortalRef.result` promise will be rejected with the provided value.\n\t */\n\tdismiss(reason?: any): void {}\n}\n\nconst WINDOW_ATTRIBUTES: string[] = [\n\t'animation',\n\t'ariaLabelledBy',\n\t'ariaDescribedBy',\n\t'scrollable',\n\t'windowClass',\n\t'portalDialogClass',\n\t'portalContentClass'\n];\nconst BACKDROP_ATTRIBUTES: string[] = ['animation', 'backdropClass'];\n\n/**\n * A reference to the newly opened portal returned by the `HubPortal.open()` method.\n */\nexport class HubPortalRef {\n\tprivate _closed = new Subject<any>();\n\tprivate _dismissed = new Subject<any>();\n\tprivate _hidden = new Subject<void>();\n\tprivate _resolve!: (result?: any) => void;\n\tprivate _reject!: (reason?: any) => void;\n\n\tprivate _applyWindowOptions(options: HubPortalOptions): void {\n\t\tconst opts: any = options as any;\n\t\tWINDOW_ATTRIBUTES.forEach((optionName: string) => {\n\t\t\tif (isDefined(opts[optionName])) {\n\t\t\t\t// `HubPortalWindow` exposes these as signal inputs (read-only\n\t\t\t\t// functions). They must be set through `setInput`; a direct\n\t\t\t\t// instance assignment would overwrite the signal itself and break\n\t\t\t\t// host bindings like `[class.fade]=\"animation()\"`.\n\t\t\t\tthis._windowCmptRef.setInput(optionName, opts[optionName]);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Updates options of an opened portal.\n\t *\n\t * @since 14.2.0\n\t */\n\tupdate(options: HubPortalUpdatableOptions): void {\n\t\tthis._applyWindowOptions(options);\n\t}\n\n\t/**\n\t * The instance of a component used for the portal content.\n\t *\n\t * When a `TemplateRef` is used as the content or when the portal is closed, will return `undefined`.\n\t */\n\tget componentInstance(): any {\n\t\tif (this._contentRef && this._contentRef.componentRef) {\n\t\t\treturn this._contentRef.componentRef.instance;\n\t\t}\n\t}\n\n\t/**\n\t * The promise that is resolved when the portal is closed and rejected when the portal is dismissed.\n\t */\n\tresult: Promise<any>;\n\n\t/**\n\t * The observable that emits when the portal is closed via the `.close()` method.\n\t *\n\t * It will emit the result passed to the `.close()` method.\n\t */\n\tget closed(): Observable<any> {\n\t\treturn this._closed.asObservable().pipe(takeUntil(this._hidden));\n\t}\n\n\t/**\n\t * The observable that emits when the portal is dismissed via the `.dismiss()` method.\n\t *\n\t * It will emit the reason passed to the `.dismissed()` method by the user.\n\t */\n\tget dismissed(): Observable<any> {\n\t\treturn this._dismissed.asObservable().pipe(takeUntil(this._hidden));\n\t}\n\n\t/**\n\t * The observable that emits when portal window is closed and animations were finished.\n\t * At this point portal element will be removed from the DOM tree.\n\t *\n\t * This observable will be completed after emitting.\n\t */\n\tget hidden(): Observable<void> {\n\t\treturn this._hidden.asObservable();\n\t}\n\n\t/**\n\t * The observable that emits when portal is fully visible and animation was finished.\n\t * Portal DOM element is always available synchronously after calling 'portal.open()' service.\n\t *\n\t * This observable will be completed after emitting.\n\t * It will not emit, if portal is closed before open animation is finished.\n\t */\n\tget shown(): Observable<void> {\n\t\treturn this._windowCmptRef.instance.shown.asObservable();\n\t}\n\n\tconstructor(\n\t\tprivate _windowCmptRef: ComponentRef<HubPortalWindow>,\n\t\tprivate _contentRef: ContentRef,\n\t\tprivate _beforeDismiss?: () => boolean | Promise<boolean>\n\t) {\n\t\t_windowCmptRef.instance.dismissEvent.subscribe((reason: any) => {\n\t\t\tthis.dismiss(reason);\n\t\t});\n\n\t\tthis.result = new Promise((resolve, reject) => {\n\t\t\tthis._resolve = resolve;\n\t\t\tthis._reject = reject;\n\t\t});\n\t\tthis.result.then(null, () => {});\n\t}\n\n\t/**\n\t * Closes the portal with an optional `result` value.\n\t *\n\t * The `HubMobalRef.result` promise will be resolved with the provided value.\n\t */\n\tclose(result?: any): void {\n\t\tif (this._windowCmptRef) {\n\t\t\tthis._closed.next(result);\n\t\t\tthis._resolve(result);\n\t\t\tthis._removePortalElements();\n\t\t}\n\t}\n\n\tprivate _dismiss(reason?: any) {\n\t\tthis._dismissed.next(reason);\n\t\tthis._reject(reason);\n\t\tthis._removePortalElements();\n\t}\n\n\t/**\n\t * Dismisses the portal with an optional `reason` value.\n\t *\n\t * The `HubPortalRef.result` promise will be rejected with the provided value.\n\t */\n\tdismiss(reason?: any): void {\n\t\tif (this._windowCmptRef) {\n\t\t\tif (!this._beforeDismiss) {\n\t\t\t\tthis._dismiss(reason);\n\t\t\t} else {\n\t\t\t\tconst dismiss = this._beforeDismiss();\n if (isPromise(dismiss as any)) {\n (dismiss as Promise<boolean>).then(\n (result) => {\n if (result !== false) {\n this._dismiss(reason);\n }\n },\n () => {}\n );\n\t\t\t\t} else if (dismiss !== false) {\n\t\t\t\t\tthis._dismiss(reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _removePortalElements() {\n\t\tconst windowTransition$ = this._windowCmptRef.instance.hide();\n\n\t\t// hiding window\n\t\twindowTransition$.subscribe(() => {\n\t\t\tconst { nativeElement } = this._windowCmptRef.location;\n\t\t\tnativeElement.parentNode?.removeChild(nativeElement);\n\t\t\tthis._windowCmptRef.destroy();\n\t\t\tthis._contentRef?.viewRef?.destroy();\n\n\t\t\tthis._windowCmptRef = <any>null;\n\t\t\tthis._contentRef = <any>null;\n\t\t});\n\n\t\t// all done\n\t\tzip(windowTransition$).subscribe(() => {\n\t\t\tthis._hidden.next();\n\t\t\tthis._hidden.complete();\n\t\t});\n\t}\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n Component,\n ElementRef,\n inject,\n NgZone,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n input,\n output,\n viewChild\n} from '@angular/core';\nimport {\n getFocusableBoundaryElements,\n hubRunTransition,\n reflow,\n TransitionOptions\n} from 'ng-hub-ui-utils';\nimport { Observable, Subject, zip } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'hub-portal-window',\n imports: [],\n host: {\n '[class]': '\"portal d-block\" + (windowClass() ? \" \" + windowClass() : \"\")',\n '[class.fade]': 'animation()',\n role: 'dialog',\n tabindex: '-1',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.aria-describedby]': 'ariaDescribedBy()'\n },\n template: `\n\t\t<div\n\t\t #dialog\n\t\t\t[class]=\"\n\t\t\t\t'portal-dialog' +\n\t\t\t\t(scrollable() ? ' portal-dialog-scrollable' : '') +\n\t\t\t\t(portalDialogClass() ? ' ' + portalDialogClass() : '')\n\t\t\t\"\n\t\t role=\"document\"\n\t\t >\n\t\t <div\n\t\t\t\t[class]=\"\n\t\t\t\t\t'portal-content' +\n\t\t\t\t\t(portalContentClass() ? ' ' + portalContentClass() : '')\n\t\t\t\t\"\n\t\t >\n\t\t @if (singleContent) {\n\t\t <ng-content></ng-content>\n\t\t } @else {\n\t\t <div class=\"portal-header\">\n\t\t <ng-content />\n\t\t <button\n\t\t type=\"button\"\n\t\t class=\"btn-close\"\n\t\t data-bs-dismiss=\"portal\"\n\t\t aria-label=\"Close\"\n\t\t (click)=\"dismiss(null)\"\n\t\t ></button>\n\t\t </div>\n\t\t <div class=\"portal-body\">\n\t\t <ng-content />\n\t\t </div>\n\t\t <div class=\"portal-footer\">\n\t\t <ng-content />\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t</div>\n\t\t`,\n encapsulation: ViewEncapsulation.None,\n styleUrl: './portal.scss'\n})\nexport class HubPortalWindow implements OnInit, OnDestroy {\n\tprivate _document = inject(DOCUMENT);\n\tprivate _elRef = inject(ElementRef<HTMLElement>);\n\tprivate _zone = inject(NgZone);\n\n\tprivate _closed$ = new Subject<void>();\n\tprivate _elWithFocus: Element | null = null; // element that is focused prior to portal opening\n\n private readonly _dialogEl = viewChild.required<ElementRef<HTMLElement>>('dialog');\n\n readonly animation = input<boolean>(true);\n readonly ariaLabelledBy = input<string>();\n readonly ariaDescribedBy = input<string>();\n readonly scrollable = input<string>();\n readonly windowClass = input<string>();\n readonly portalDialogClass = input<string>();\n readonly portalContentClass = input<string>();\n\n\tsingleContent!: boolean;\n\n\treadonly dismissEvent = output({ alias: 'dismiss' });\n\n\tshown = new Subject<void>();\n\thidden = new Subject<void>();\n\n dismiss(reason: any): void {\n this.dismissEvent.emit(reason);\n }\n\n\tngOnInit() {\n\t\tthis._elWithFocus = this._document.activeElement;\n\t\tthis._zone.onStable\n\t\t\t.asObservable()\n\t\t\t.pipe(take(1))\n\t\t\t.subscribe(() => {\n\t\t\t\tthis._show();\n\t\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis._disableEventHandling();\n\t}\n\n\thide(): Observable<any> {\n\t\tconst { nativeElement } = this._elRef;\n\t\tconst context: TransitionOptions<any> = {\n\t\t\tanimation: this.animation(),\n\t\t\trunningTransition: 'stop'\n\t\t};\n\n\t\tconst windowTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tnativeElement,\n\t\t\t() => nativeElement.classList.remove('show'),\n\t\t\tcontext\n\t\t);\n\t\tconst dialogTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tthis._dialogEl().nativeElement,\n\t\t\t() => {},\n\t\t\tcontext\n\t\t);\n\n\t\tconst transitions$ = zip(windowTransition$, dialogTransition$);\n\t\ttransitions$.subscribe(() => {\n\t\t\tthis.hidden.next();\n\t\t\tthis.hidden.complete();\n\t\t});\n\n\t\tthis._disableEventHandling();\n\t\tthis._restoreFocus();\n\n\t\treturn transitions$;\n\t}\n\n\tprivate _show() {\n\t\tconst context: TransitionOptions<any> = {\n\t\t\tanimation: this.animation(),\n\t\t\trunningTransition: 'continue'\n\t\t};\n\n\t\tconst windowTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tthis._elRef.nativeElement,\n\t\t\t(element: HTMLElement, animation: boolean) => {\n\t\t\t\tif (animation) {\n\t\t\t\t\treflow(element);\n\t\t\t\t}\n\t\t\t\telement.classList.add('show');\n\t\t\t},\n\t\t\tcontext\n\t\t);\n\t\tconst dialogTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tthis._dialogEl().nativeElement,\n\t\t\t() => {},\n\t\t\tcontext\n\t\t);\n\n\t\tzip(windowTransition$, dialogTransition$).subscribe(() => {\n\t\t\tthis.shown.next();\n\t\t\tthis.shown.complete();\n\t\t});\n\n\t\tthis._setFocus();\n\t}\n\n\tprivate _disableEventHandling() {\n\t\tthis._closed$.next();\n\t}\n\n\tprivate _setFocus() {\n\t\tconst { nativeElement } = this._elRef;\n\t\tif (!nativeElement.contains(document.activeElement)) {\n\t\t\tconst autoFocusable = nativeElement.querySelector(\n\t\t\t\t`[hubAutofocus]`\n\t\t\t) as HTMLElement;\n\t\t\tconst firstFocusable =\n\t\t\t\tgetFocusableBoundaryElements(nativeElement)[0];\n\n\t\t\tconst elementToFocus =\n\t\t\t\tautoFocusable || firstFocusable || nativeElement;\n\t\t\telementToFocus.focus();\n\t\t}\n\t}\n\n private _restoreFocus() {\n const body = this._document.body;\n const elWithFocus = this._elWithFocus;\n\n let elementToFocus: HTMLElement;\n if (elWithFocus instanceof HTMLElement && body.contains(elWithFocus)) {\n elementToFocus = elWithFocus;\n } else {\n elementToFocus = body as unknown as HTMLElement;\n }\n this._zone.runOutsideAngular(() => {\n setTimeout(() => elementToFocus.focus());\n this._elWithFocus = null;\n });\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n\tApplicationRef,\n\tComponentRef,\n\tcreateComponent,\n\tEnvironmentInjector,\n\tEventEmitter,\n\tinject,\n\tInjectable,\n\tInjector,\n\tNgZone,\n\tTemplateRef,\n\tType\n} from '@angular/core';\nimport {\n\tContentRef,\n\thubFocusTrap,\n\tisDefined,\n\tisString,\n\tScrollBar\n} from 'ng-hub-ui-utils';\nimport { Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { HubPortalOptions, HubPortalUpdatableOptions } from './portal-config';\nimport { HubActivePortal, HubPortalRef } from './portal-ref';\nimport { HubPortalWindow } from './portal-window';\n\n@Injectable({ providedIn: 'root' })\nexport class HubPortalStack {\n\tprivate _applicationRef = inject(ApplicationRef);\n\tprivate _injector = inject(Injector);\n\tprivate _environmentInjector = inject(EnvironmentInjector);\n\tprivate _document = inject(DOCUMENT);\n\tprivate _scrollBar = inject(ScrollBar);\n\n\tprivate _activeWindowCmptHasChanged = new Subject<void>();\n\tprivate _ariaHiddenValues: Map<Element, string | null> = new Map();\n\tprivate _scrollBarRestoreFn: null | (() => void) = null;\n\tprivate _portalRefs: HubPortalRef[] = [];\n\tprivate _windowCmpts: ComponentRef<HubPortalWindow>[] = [];\n\tprivate _activeInstances: EventEmitter<HubPortalRef[]> = new EventEmitter();\n\n\tconstructor() {\n\t\tconst ngZone = inject(NgZone);\n\n\t\t// Trap focus on active WindowCmpt\n\t\tthis._activeWindowCmptHasChanged.subscribe(() => {\n\t\t\tif (this._windowCmpts.length) {\n\t\t\t\tconst activeWindowCmpt =\n\t\t\t\t\tthis._windowCmpts[this._windowCmpts.length - 1];\n\t\t\t\thubFocusTrap(\n\t\t\t\t\tngZone,\n\t\t\t\t\tactiveWindowCmpt.location.nativeElement,\n\t\t\t\t\tthis._activeWindowCmptHasChanged\n\t\t\t\t);\n\t\t\t\tthis._revertAriaHidden();\n\t\t\t\tthis._setAriaHidden(activeWindowCmpt.location.nativeElement);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _restoreScrollBar() {\n\t\tconst scrollBarRestoreFn = this._scrollBarRestoreFn;\n\t\tif (scrollBarRestoreFn) {\n\t\t\tthis._scrollBarRestoreFn = null;\n\t\t\tscrollBarRestoreFn();\n\t\t}\n\t}\n\n\tprivate _hideScrollBar() {\n\t\tif (!this._scrollBarRestoreFn) {\n\t\t\tthis._scrollBarRestoreFn = this._scrollBar.hide();\n\t\t}\n\t}\n\n\topen(\n\t\tcontentInjector: Injector,\n\t\tcontent: any,\n\t\toptions: HubPortalOptions\n\t): HubPortalRef {\n\t\tconst containerEl =\n\t\t\toptions.container instanceof HTMLElement\n\t\t\t\t? options.container\n\t\t\t\t: isDefined(options.container)\n\t\t\t\t? this._document.querySelector(options.container!)\n\t\t\t\t: this._document.body;\n\n\t\tif (!containerEl) {\n\t\t\tthrow new Error(\n\t\t\t\t`The specified portal container \"${\n\t\t\t\t\toptions.container || 'body'\n\t\t\t\t}\" was not found in the DOM.`\n\t\t\t);\n\t\t}\n\n\t\tthis._hideScrollBar();\n\n\t\tconst activePortal = new HubActivePortal();\n\n\t\tcontentInjector = options.injector || contentInjector;\n\t\tconst environmentInjector =\n\t\t\tcontentInjector.get(EnvironmentInjector, null) ||\n\t\t\tthis._environmentInjector;\n\t\tconst contentRef = this._getContentRef(\n\t\t\tcontentInjector,\n\t\t\tenvironmentInjector,\n\t\t\tcontent,\n\t\t\tactivePortal,\n\t\t\toptions\n\t\t);\n\n\t\tconst windowCmptRef: ComponentRef<HubPortalWindow> =\n\t\t\tthis._createWindowComponent(contentRef.nodes, options);\n\t\tthis._attachWindowComponent(containerEl, windowCmptRef);\n\t\tconst hubPortalRef: HubPortalRef = new HubPortalRef(\n\t\t\twindowCmptRef,\n\t\t\tcontentRef,\n\t\t\toptions.beforeDismiss\n\t\t);\n\n\t\tthis._registerPortalRef(hubPortalRef);\n\t\tthis._registerWindowCmpt(windowCmptRef);\n\n\t\t// We have to cleanup DOM after the last portal when BOTH 'hidden' was emitted and 'result' promise was resolved:\n\t\t// - with animations OFF, 'hidden' emits synchronously, then 'result' is resolved asynchronously\n\t\t// - with animations ON, 'result' is resolved asynchronously, then 'hidden' emits asynchronously\n\t\thubPortalRef.hidden.pipe(take(1)).subscribe(() =>\n\t\t\tPromise.resolve(true).then(() => {\n\t\t\t\tif (!this._portalRefs.length) {\n\t\t\t\t\tthis._document.body.classList.remove('portal-open');\n\t\t\t\t\tthis._restoreScrollBar();\n\t\t\t\t\tthis._revertAriaHidden();\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\n\t\tactivePortal.close = (result: any) => {\n\t\t\thubPortalRef.close(result);\n\t\t};\n\t\tactivePortal.dismiss = (reason: any) => {\n\t\t\thubPortalRef.dismiss(reason);\n\t\t};\n\n\t\tactivePortal.update = (options: HubPortalUpdatableOptions) => {\n\t\t\thubPortalRef.update(options);\n\t\t};\n\n\t\thubPortalRef.update(options);\n\t\tif (this._portalRefs.length === 1) {\n\t\t\tthis._document.body.classList.add('portal-open');\n\t\t}\n\n\t\twindowCmptRef.changeDetectorRef.detectChanges();\n\t\treturn hubPortalRef;\n\t}\n\n\t/**\n\t * Toggles a portal by dismissing all existing portals and waiting for them to be hidden\n\t * before showing the new one.\n\t *\n\t * @param contentInjector - The injector to use for dependency injection\n\t * @param content - The content to display (component, template, or string)\n\t * @param options - Portal configuration options\n\t * @returns A reference to the newly created portal\n\t */\n\ttoggle(\n\t\tcontentInjector: Injector,\n\t\tcontent: any,\n\t\toptions: HubPortalOptions\n\t): HubPortalRef {\n\t\t// Get current portals before creating the new one\n\t\tconst existingPortals = [...this._portalRefs];\n\n\t\t// Create the new portal but suppress normal registration\n\t\tconst containerEl =\n\t\t\toptions.container instanceof HTMLElement\n\t\t\t\t? options.container\n\t\t\t\t: isDefined(options.container)\n\t\t\t\t? this._document.querySelector(options.container!)\n\t\t\t\t: this._document.body;\n\n\t\tif (!containerEl) {\n\t\t\tthrow new Error(\n\t\t\t\t`The specified portal container \"${\n\t\t\t\t\toptions.container || 'body'\n\t\t\t\t}\" was not found in the DOM.`\n\t\t\t);\n\t\t}\n\n\t\tthis._hideScrollBar();\n\n\t\tconst activePortal = new HubActivePortal();\n\t\tcontentInjector = options.injector || contentInjector;\n\t\tconst environmentInjector =\n\t\t\tcontentInjector.get(EnvironmentInjector, null) ||\n\t\t\tthis._environmentInjector;\n\n\t\tconst contentRef = this._getContentRef(\n\t\t\tcontentInjector,\n\t\t\tenvironmentInjector,\n\t\t\tcontent,\n\t\t\tactivePortal,\n\t\t\toptions\n\t\t);\n\n\t\tconst windowCmptRef = this._createWindowComponent(\n\t\t\tcontentRef.nodes,\n\t\t\toptions\n\t\t);\n\n\t\tconst newPortalRef = new HubPortalRef(\n\t\t\twindowCmptRef,\n\t\t\tcontentRef,\n\t\t\toptions.beforeDismiss\n\t\t);\n\n\t\t// Setup active portal methods\n\t\tactivePortal.close = (result: any) => {\n\t\t\tnewPortalRef.close(result);\n\t\t};\n\t\tactivePortal.dismiss = (reason: any) => {\n\t\t\tnewPortalRef.dismiss(reason);\n\t\t};\n\t\tactivePortal.update = (options: HubPortalUpdatableOptions) => {\n\t\t\tnewPortalRef.update(options);\n\t\t};\n\n\t\t// Dismiss all existing portals and wait for them to be hidden\n\t\tconst hidePromises = existingPortals.map(\n\t\t\t(portal) =>\n\t\t\t\tnew Promise<void>((resolve) => {\n\t\t\t\t\tportal.hidden.pipe(take(1)).subscribe(() => {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t});\n\t\t\t\t\tportal.dismiss('toggle');\n\t\t\t\t})\n\t\t);\n\n\t\t// After all portals are hidden, register and show the new one\n\t\tPromise.all(hidePromises).then(() => {\n\t\t\tthis._attachWindowComponent(containerEl, windowCmptRef);\n\n\t\t\tthis._registerPortalRef(newPortalRef);\n\t\t\tthis._registerWindowCmpt(windowCmptRef);\n\n\t\t\tif (this._portalRefs.length === 1) {\n\t\t\t\tthis._document.body.classList.add('portal-open');\n\t\t\t}\n\n\t\t\tnewPortalRef.update(options);\n\t\t\twindowCmptRef.changeDetectorRef.detectChanges();\n\t\t});\n\n\t\t// Setup hidden cleanup like in open()\n\t\tnewPortalRef.hidden.pipe(take(1)).subscribe(() =>\n\t\t\tPromise.resolve(true).then(() => {\n\t\t\t\tif (!this._portalRefs.length) {\n\t\t\t\t\tthis._document.body.classList.remove('portal-open');\n\t\t\t\t\tthis._restoreScrollBar();\n\t\t\t\t\tthis._revertAriaHidden();\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\n\t\treturn newPortalRef;\n\t}\n\n\tget activeInstances() {\n\t\treturn this._activeInstances;\n\t}\n\n\tdismissAll(reason?: any) {\n\t\tthis._portalRefs.forEach((hubPortalRef) =>\n\t\t\thubPortalRef.dismiss(reason)\n\t\t);\n\t}\n\n\thasOpenPortals(): boolean {\n\t\treturn this._portalRefs.length > 0;\n\t}\n\n\tprivate _createWindowComponent(\n\t\t[headerNodes, bodyNodes, footerNodes]: Node[][],\n\t\toptions: HubPortalOptions\n\t): ComponentRef<HubPortalWindow> {\n\t\tconst singleContent =\n\t\t\t!options.headerSelector && !options.footerSelector;\n\t\tlet windowCmptRef = createComponent(HubPortalWindow, {\n\t\t\tenvironmentInjector: this._applicationRef.injector,\n\t\t\telementInjector: this._injector,\n\t\t\tprojectableNodes: singleContent\n\t\t\t\t? [bodyNodes]\n\t\t\t\t: [[], headerNodes, bodyNodes, footerNodes]\n\t\t});\n\n\t\tObject.assign(windowCmptRef.instance, { singleContent });\n\n\t\treturn windowCmptRef;\n\t}\n\n\tprivate _attachWindowComponent(\n\t\tcontainerEl: Element,\n\t\twindowCmptRef: ComponentRef<HubPortalWindow>\n\t): ComponentRef<HubPortalWindow> {\n\t\tthis._applicationRef.attachView(windowCmptRef.hostView);\n\t\tcontainerEl.appendChild(windowCmptRef.location.nativeElement);\n\t\treturn windowCmptRef;\n\t}\n\n\tprivate _getContentRef(\n\t\tcontentInjector: Injector,\n\t\tenvironmentInjector: EnvironmentInjector,\n\t\tcontent: Type<any> | TemplateRef<any> | string,\n\t\tactivePortal: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t): ContentRef {\n\t\tif (!content) {\n\t\t\treturn new ContentRef([]);\n\t\t} else if (content instanceof TemplateRef) {\n\t\t\treturn this._createFromTemplateRef(content, activePortal, options);\n\t\t} else if (isString(content)) {\n\t\t\treturn this._createFromString(content);\n\t\t} else {\n\t\t\treturn this._createFromComponent(\n\t\t\t\tcontentInjector,\n\t\t\t\tenvironmentInjector,\n\t\t\t\tcontent,\n\t\t\t\tactivePortal,\n\t\t\t\toptions\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate _createFromTemplateRef(\n\t\ttemplateRef: TemplateRef<any>,\n\t\tactivePortal: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t): ContentRef {\n const context = {\n $implicit: activePortal,\n close(result: any) {\n activePortal.close(result);\n },\n dismiss(reason: any) {\n activePortal.dismiss(reason);\n }\n };\n\t\tconst viewRef = templateRef.createEmbeddedView(context);\n\t\tthis._applicationRef.attachView(viewRef);\n\n\t\tconst containerNode = document.createElement('ng-container');\n\t\tcontainerNode.append(...viewRef.rootNodes);\n\n\t\tthis._addDismissEventListener(containerNode, context as any, options);\n\t\tthis._addCloseEventListener(containerNode, context as any, options);\n\n\t\treturn new ContentRef(\n\t\t\t[\n\t\t\t\toptions.headerSelector\n\t\t\t\t\t? extractAndRemoveNodesBySelector(\n\t\t\t\t\t\t\tcontainerNode,\n\t\t\t\t\t\t\toptions.headerSelector\n\t\t\t\t\t )\n\t\t\t\t\t: [],\n\t\t\t\tcontainerNode.childNodes as any,\n\t\t\t\toptions.footerSelector\n\t\t\t\t\t? extractAndRemoveNodesBySelector(\n\t\t\t\t\t\t\tcontainerNode,\n\t\t\t\t\t\t\toptions.footerSelector\n\t\t\t\t\t )\n\t\t\t\t\t: []\n\t\t\t],\n\t\t\tviewRef\n\t\t);\n\t}\n\n\tprivate _createFromString(content: string): ContentRef {\n\t\tconst component = this._document.createTextNode(`${content}`);\n\t\treturn new ContentRef([[component]]);\n\t}\n\n\tprivate _createFromComponent(\n\t\tcontentInjector: Injector,\n\t\tenvironmentInjector: EnvironmentInjector,\n\t\tcomponentType: Type<any>,\n\t\tcontext: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t): ContentRef {\n\t\tconst elementInjector = Injector.create({\n\t\t\tproviders: [{ provide: HubActivePortal, useValue: context }],\n\t\t\tparent: contentInjector\n\t\t});\n\t\tconst componentRef = createComponent(componentType, {\n\t\t\tenvironmentInjector,\n\t\t\telementInjector\n\t\t});\n\n\t\tconst componentNativeEl: HTMLElement =\n\t\t\tcomponentRef.location.nativeElement;\n\t\tif (options.scrollable) {\n\t\t\tcomponentNativeEl.classList.add('component-host-scrollable');\n\t\t}\n\t\tthis._applicationRef.attachView(componentRef.hostView);\n\n\t\tthis._addDismissEventListener(componentNativeEl, context, options);\n\t\tthis._addCloseEventListener(componentNativeEl, context as any, options);\n\n\t\t// FIXME: we should here get rid of the component nativeElement\n\t\t// and use `[Array.from(componentNativeEl.childNodes)]` instead and remove the above CSS class.\n\t\treturn new ContentRef(\n\t\t\t[\n\t\t\t\toptions.headerSelector\n\t\t\t\t\t? extractAndRemoveNodesBySelector(\n\t\t\t\t\t\t\tcomponentNativeEl,\n\t\t\t\t\t\t\toptions.headerSelector\n\t\t\t\t\t )\n\t\t\t\t\t: [],\n\t\t\t\tcomponentNativeEl.childNodes as any,\n\t\t\t\toptions.footerSelector\n\t\t\t\t\t? extractAndRemoveNodesBySelector(\n\t\t\t\t\t\t\tcomponentNativeEl,\n\t\t\t\t\t\t\toptions.footerSelector\n\t\t\t\t\t )\n\t\t\t\t\t: []\n\t\t\t],\n\t\t\tcomponentRef.hostView,\n\t\t\tcomponentRef\n\t\t);\n\t}\n\n\tprivate _setAriaHidden(element: Element) {\n\t\tconst parent = element.parentElement;\n\t\tif (parent && element !== this._document.body) {\n\t\t\tArray.from(parent.children).forEach((sibling) => {\n\t\t\t\tif (sibling !== element && sibling.nodeName !== 'SCRIPT') {\n\t\t\t\t\tthis._ariaHiddenValues.set(\n\t\t\t\t\t\tsibling,\n\t\t\t\t\t\tsibling.getAttribute('aria-hidden')\n\t\t\t\t\t);\n\t\t\t\t\tsibling.setAttribute('aria-hidden', 'true');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._setAriaHidden(parent);\n\t\t}\n\t}\n\n\tprivate _revertAriaHidden() {\n\t\tthis._ariaHiddenValues.forEach((value, element) => {\n\t\t\tif (value) {\n\t\t\t\telement.setAttribute('aria-hidden', value);\n\t\t\t} else {\n\t\t\t\telement.removeAttribute('aria-hidden');\n\t\t\t}\n\t\t});\n\t\tthis._ariaHiddenValues.clear();\n\t}\n\n\tprivate _registerPortalRef(hubPortalRef: HubPortalRef) {\n\t\tconst unregisterPortalRef = () => {\n\t\t\tconst index = this._portalRefs.indexOf(hubPortalRef);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._portalRefs.splice(index, 1);\n\t\t\t\tthis._activeInstances.emit(this._portalRefs);\n\t\t\t}\n\t\t};\n\t\tthis._portalRefs.push(hubPortalRef);\n\t\tthis._activeInstances.emit(this._portalRefs);\n\t\thubPortalRef.result.then(unregisterPortalRef, unregisterPortalRef);\n\t}\n\n\tprivate _registerWindowCmpt(hubWindowCmpt: ComponentRef<HubPortalWindow>) {\n\t\tthis._windowCmpts.push(hubWindowCmpt);\n\t\tthis._activeWindowCmptHasChanged.next();\n\n\t\thubWindowCmpt.onDestroy(() => {\n\t\t\tconst index = this._windowCmpts.indexOf(hubWindowCmpt);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._windowCmpts.splice(index, 1);\n\t\t\t\tthis._activeWindowCmptHasChanged.next();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Attaches click event listeners to elements within a container based on a specified dismiss selector to dismiss a portal.\n\t *\n\t * @param {HTMLElement} container - The `container` parameter is an HTMLElement that represents the DOM element which contains the\n\t * portal content.\n\t * @param {HubActivePortal} context - The `context` parameter in the `_addDismissEventListener` function refers to the active portal\n\t * instance that is being displayed. It is used to call the `dismiss` method on the portal instance when a dismissible element is\n\t * clicked.\n\t * @param {HubPortalOptions} options - The `options` parameter is an object that contains configuration options for the portal. It\n\t * may include properties such as `dismissSelector`, which is used to specify a CSS selector for elements that, when clicked, will\n\t * dismiss the portal by calling the `dismiss` method on the `context` object.\n\t */\n\tprivate _addDismissEventListener(\n\t\tcontainer: HTMLElement,\n\t\tcontext: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t) {\n\t\tif (options.dismissSelector) {\n\t\t\tconst dismissaable: NodeListOf<Element> =\n\t\t\t\tcontainer.querySelectorAll(options.dismissSelector);\n\t\t\tfor (const item of Array.from(dismissaable)) {\n\t\t\t\titem.addEventListener('click', () => context.dismiss());\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Attaches click event listeners to elements matching a specified selector to close a portal window.\n\t *\n\t * @param {HTMLElement} container - The `container` parameter is an HTMLElement that represents the DOM element which contains the\n\t * portal content.\n\t * @param {HubActivePortal} context - The `context` parameter in the `_addCloseEventListener` function is of type `HubActivePortal`.\n\t * It is used to reference the active portal instance within the function and call the `close()` method on it when a close event is\n\t * triggered.\n\t * @param {HubPortalOptions} options - The `options` parameter is an object that contains configuration options for the portal. It\n\t * may include properties such as `closeSelector`, which is used to specify the selector for elements that can trigger the portal\n\t * to close when clicked.\n\t */\n\tprivate _addCloseEventListener(\n\t\tcontainer: HTMLElement,\n\t\tcontext: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t) {\n\t\tif (options.closeSelector) {\n\t\t\tconst dismissaable: NodeListOf<Element> =\n\t\t\t\tcontainer.querySelectorAll(options.closeSelector);\n\t\t\tfor (const item of Array.from(dismissaable)) {\n\t\t\t\titem.addEventListener('click', () => context.close());\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Extracts child nodes matching a selector from a container element, removes those nodes from the DOM, and returns them as an array.\n *\n * @param {HTMLElement} container - The `container` parameter in the `extractAndRemoveNodesBySelector` function is an HTMLElement\n * that represents the parent element within which we want to search for nodes matching a specific selector and remove them.\n * @param {string} selector - The `selector` parameter in the `extractAndRemoveNodesBySelector` function is a string that\n * represents a CSS selector. This selector is used to query and select specific elements within the `container` HTMLElement.\n *\n * @returns An array of nodes that were extracted from the container element based on the provided selector, and then removes those\n * nodes from the DOM.\n */\nfunction extractAndRemoveNodesBySelector(\n\tcontainer: HTMLElement,\n\tselector: string\n): Array<Node> {\n\tlet containerNodes = container.querySelectorAll(selector);\n\n\tconst nodes = Array.from(containerNodes).reduce((acc, c) => {\n\t\treturn [...acc, ...Array.from(c.childNodes)];\n\t}, [] as Array<Node>);\n\n\t// Selecciona los nodos dentro del contenedor que coincidan con el selector\n\tconst nodesToRemove = container.querySelectorAll<HTMLElement>(selector);\n\n\t// Convertir NodeList a array y eliminar cada nodo del DOM\n\tArray.from(nodesToRemove).forEach((node) => node.remove());\n\treturn nodes;\n}\n","import { inject, Injectable, Injector } from '@angular/core';\n\nimport { HubPortalConfig, HubPortalOptions } from './portal-config';\nimport { HubPortalRef } from './portal-ref';\nimport { HubPortalStack } from './portal-stack';\n\n/**\n * A service for opening portal windows.\n *\n * Creating a portal is straightforward: create a component or a template and pass it as an argument to\n * the `.open()` method.\n */\n@Injectable({ providedIn: 'root' })\nexport class HubPortal {\n\tprivate _injector = inject(Injector);\n\tprivate _portalStack = inject(HubPortalStack);\n\tprivate _config = inject(HubPortalConfig);\n\n\t/**\n\t * Opens a new portal window with the specified content and supplied options.\n\t *\n\t * Content can be provided as a `TemplateRef` or a component type. If you pass a component type as content,\n\t * then instances of those components can be injected with an instance of the `HubActivePortal` class. You can then\n\t * use `HubActivePortal` methods to close / dismiss portals from \"inside\" of your component.\n\t *\n\t * Also see the [`HubPortalOptions`](#/components/portal/api#HubPortalOptions) for the list of supported options.\n\t */\n\topen(content: any, options: HubPortalOptions = {}): HubPortalRef {\n\t\tconst combinedOptions = {\n\t\t\t...this._config,\n\t\t\tanimation: this._config.animation,\n\t\t\t...options\n\t\t};\n\t\treturn this._portalStack.open(this._injector, content, combinedOptions);\n\t}\n\n\t/**\n\t * The function `toggle` opens a portal with specified content and options while dismissing any existing portals.\n\t *\n\t * @param {any} content - The `content` parameter in the `toggle` function is the content that you want to display within the\n\t * portal. This can be any type of content such as a component, template, or any other HTML element that you want to show in the\n\t * portal.\n\t * @param {HubPortalOptions} options - The `options` parameter in the `toggle` function is an object that allows you to customize\n\t * the behavior of the portal.\n\t *\n\t * @returns The `toggle` function is returning a `HubPortalRef` object.\n\t */\n\ttoggle(content: any, options: HubPortalOptions = {}): HubPortalRef {\n\t\tconst combinedOptions = {\n\t\t\t...this._config,\n\t\t\tanimation: this._config.animation,\n\t\t\t...options\n\t\t};\n\t\t// this.dismissAll();\n\t\t// return this._portalStack.open(this._injector, content, combinedOptions);\n\t\treturn this._portalStack.toggle(\n\t\t\tthis._injector,\n\t\t\tcontent,\n\t\t\tcombinedOptions\n\t\t);\n\t}\n\n\t/**\n\t * Returns an observable that holds the active portal instances.\n\t */\n\tget activeInstances() {\n\t\treturn this._portalStack.activeInstances;\n\t}\n\n\t/**\n\t * Dismisses all currently displayed portal windows with the supplied reason.\n\t *\n\t * @since 3.1.0\n\t */\n\tdismissAll(reason?: any) {\n\t\tthis._portalStack.dismissAll(reason);\n\t}\n\n\t/**\n\t * Indicates if there are currently any open portal windows in the application.\n\t *\n\t * @since 3.3.0\n\t */\n\thasOpenPortals(): boolean {\n\t\treturn this._portalStack.hasOpenPortals();\n\t}\n}\n","export enum PortalDismissReasons {\n\tBACKDROP_CLICK,\n\tESC\n}\n","import { NgModule } from '@angular/core';\nimport { HubPortal } from './portal';\n\nexport { HubPortal } from './portal';\nexport {\n\tHubPortalConfig,\n\t// Types must be re-exported with `export type` under isolatedModules\n} from './portal-config';\nexport type {\n\tHubPortalOptions,\n\tHubPortalUpdatableOptions\n} from './portal-config';\nexport { HubPortalRef, HubActivePortal } from './portal-ref';\nexport { HubPortalStack } from './portal-stack';\nexport { PortalDismissReasons } from './portal-dismiss-reasons';\n\n@NgModule({ providers: [HubPortal] })\nexport class HubPortalModule {}\n","/*\n * Public API Surface of ng-hub-ui-portal\n */\nexport * from './lib/portal.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAgIA;;;;;;;AAOG;MAEU,eAAe,CAAA;;AAEhB,IAAA,UAAU;AAElB,IAAA,cAAc;AACd,IAAA,eAAe;AACf,IAAA,aAAa;AACb,IAAA,SAAS;AACT,IAAA,QAAQ;IACX,QAAQ,GAAG,IAAI;AACZ,IAAA,UAAU;AACV,IAAA,WAAW;AACX,IAAA,iBAAiB;AACjB,IAAA,kBAAkB;AAClB,IAAA,cAAc;AACd,IAAA,cAAc;IACjB,eAAe,GAAW,yBAAyB;IACnD,aAAa,GAAW,uBAAuB;AAE/C,IAAA,IAAI,SAAS,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI;IAC/B;IACA,IAAI,SAAS,CAAC,SAAkB,EAAA;AAC/B,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS;IAC5B;uGAxBY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,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