{"version":3,"sources":["node_modules/ng-lazyload-image/fesm2020/ng-lazyload-image.mjs","src/app/shared/image/image.component.ts","src/app/shared/image/image.component.html","src/app/_pipes/manga-format.pipe.ts","node_modules/@angular/cdk/fesm2022/portal.mjs"],"sourcesContent":["import { Subject, of, Observable, ReplaySubject, never, empty } from 'rxjs';\nimport { filter, tap, take, mergeMap, map, catchError, switchMap, startWith, sampleTime, share } from 'rxjs/operators';\nimport { isPlatformServer } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, EventEmitter, PLATFORM_ID, Directive, Inject, Input, Output, NgModule } from '@angular/core';\nfunction getNavigator() {\n return typeof window !== 'undefined' ? window.navigator : undefined;\n}\nfunction isChildOfPicture(element) {\n return Boolean(element.parentElement && element.parentElement.nodeName.toLowerCase() === 'picture');\n}\nfunction isImageElement(element) {\n return element.nodeName.toLowerCase() === 'img';\n}\nfunction setImage(element, imagePath, useSrcset) {\n if (isImageElement(element)) {\n if (useSrcset && 'srcset' in element) {\n element.srcset = imagePath;\n } else {\n element.src = imagePath;\n }\n } else {\n element.style.backgroundImage = `url('${imagePath}')`;\n }\n return element;\n}\nfunction setSources(attrName) {\n return image => {\n const sources = image.parentElement.getElementsByTagName('source');\n for (let i = 0; i < sources.length; i++) {\n const attrValue = sources[i].getAttribute(attrName);\n if (attrValue) {\n // Check if `srcset` is supported by the current browser\n if ('srcset' in sources[i]) {\n sources[i].srcset = attrValue;\n } else {\n sources[i].src = attrValue;\n }\n }\n }\n };\n}\nconst setSourcesToDefault = setSources('defaultImage');\nconst setSourcesToLazy = setSources('lazyLoad');\nconst setSourcesToError = setSources('errorImage');\nfunction setImageAndSources(setSourcesFn) {\n return (element, imagePath, useSrcset) => {\n if (isImageElement(element) && isChildOfPicture(element)) {\n setSourcesFn(element);\n }\n if (imagePath) {\n setImage(element, imagePath, useSrcset);\n }\n };\n}\nconst setImageAndSourcesToDefault = setImageAndSources(setSourcesToDefault);\nconst setImageAndSourcesToLazy = setImageAndSources(setSourcesToLazy);\nconst setImageAndSourcesToError = setImageAndSources(setSourcesToError);\nclass Hooks {\n constructor() {\n this.navigator = getNavigator();\n }\n setPlatformId(platformId) {\n this.platformId = platformId;\n }\n onDestroy(attributes) {}\n onAttributeChange(newAttributes) {}\n}\nconst cssClassNames = {\n loaded: 'ng-lazyloaded',\n loading: 'ng-lazyloading',\n failed: 'ng-failed-lazyloaded'\n};\nfunction removeCssClassName(element, cssClassName) {\n element.className = element.className.replace(cssClassName, '');\n}\nfunction addCssClassName(element, cssClassName) {\n if (!element.className.includes(cssClassName)) {\n element.className += ` ${cssClassName}`;\n }\n}\nfunction hasCssClassName(element, cssClassName) {\n return element.className && element.className.includes(cssClassName);\n}\nclass SharedHooks extends Hooks {\n setup(attributes) {\n setImageAndSourcesToDefault(attributes.element, attributes.defaultImagePath, attributes.useSrcset);\n if (attributes.imagePath) {\n addCssClassName(attributes.element, cssClassNames.loading);\n }\n if (hasCssClassName(attributes.element, cssClassNames.loaded)) {\n removeCssClassName(attributes.element, cssClassNames.loaded);\n }\n }\n finally(attributes) {\n addCssClassName(attributes.element, cssClassNames.loaded);\n removeCssClassName(attributes.element, cssClassNames.loading);\n }\n loadImage(attributes) {\n if (this.skipLazyLoading(attributes)) {\n // Set the image right away for bots for better SEO\n return [attributes.imagePath];\n }\n const {\n element,\n useSrcset,\n imagePath,\n decode\n } = attributes;\n let img;\n if (isImageElement(element) && isChildOfPicture(element)) {\n const parentClone = element.parentNode.cloneNode(true);\n img = parentClone.getElementsByTagName('img')[0];\n setSourcesToLazy(img);\n setImage(img, imagePath, useSrcset);\n } else {\n img = new Image();\n if (isImageElement(element) && element.referrerPolicy) {\n img.referrerPolicy = element.referrerPolicy;\n }\n if (isImageElement(element) && element.sizes) {\n img.sizes = element.sizes;\n }\n if (useSrcset && 'srcset' in img) {\n img.srcset = imagePath;\n } else {\n img.src = imagePath;\n }\n }\n if (decode && img.decode) {\n return img.decode().then(() => imagePath);\n }\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(imagePath);\n img.onerror = () => reject(null);\n });\n }\n setErrorImage(error, attributes) {\n const {\n element,\n useSrcset,\n errorImagePath\n } = attributes;\n setImageAndSourcesToError(element, errorImagePath, useSrcset);\n addCssClassName(element, cssClassNames.failed);\n }\n setLoadedImage(imagePath, attributes) {\n const {\n element,\n useSrcset\n } = attributes;\n setImageAndSourcesToLazy(element, imagePath, useSrcset);\n }\n isDisabled() {\n // Disable if SSR and the user isn't a bot\n return isPlatformServer(this.platformId) && !this.isBot();\n }\n skipLazyLoading(attributes) {\n return this.isBot(attributes);\n }\n isBot(attributes) {\n if (this.navigator?.userAgent) {\n return /googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\\ link\\ preview|showyoubot|outbrain|pinterest\\/0\\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|duckduckbot|prerender/i.test(this.navigator.userAgent);\n }\n return false;\n }\n}\nclass IntersectionObserverHooks extends SharedHooks {\n constructor() {\n super(...arguments);\n this.observers = new WeakMap();\n this.intersectionSubject = new Subject();\n this.uniqKey = {};\n }\n getObservable(attributes) {\n if (this.skipLazyLoading(attributes)) {\n return of({\n isIntersecting: true\n });\n }\n if (attributes.customObservable) {\n return attributes.customObservable;\n }\n const scrollContainerKey = attributes.scrollContainer || this.uniqKey;\n const options = {\n root: attributes.scrollContainer || null\n };\n if (attributes.offset) {\n options.rootMargin = `${attributes.offset}px`;\n }\n let observer = this.observers.get(scrollContainerKey);\n if (!observer) {\n observer = new IntersectionObserver(entrys => this.loadingCallback(entrys), options);\n this.observers.set(scrollContainerKey, observer);\n }\n observer.observe(attributes.element);\n return Observable.create(obs => {\n const subscription = this.intersectionSubject.pipe(filter(entry => entry.target === attributes.element)).subscribe(obs);\n return () => {\n subscription.unsubscribe();\n observer.unobserve(attributes.element);\n };\n });\n }\n isVisible(event) {\n return event.isIntersecting;\n }\n loadingCallback(entrys) {\n entrys.forEach(entry => this.intersectionSubject.next(entry));\n }\n}\nfunction lazyLoadImage(hooks, attributes) {\n return evntObservable => {\n return evntObservable.pipe(tap(data => attributes.onStateChange.emit({\n reason: 'observer-emit',\n data\n })), filter(event => hooks.isVisible(event, attributes)), take(1), tap(() => attributes.onStateChange.emit({\n reason: 'start-loading'\n })), mergeMap(() => hooks.loadImage(attributes)), tap(() => attributes.onStateChange.emit({\n reason: 'mount-image'\n })), tap(imagePath => hooks.setLoadedImage(imagePath, attributes)), tap(() => attributes.onStateChange.emit({\n reason: 'loading-succeeded'\n })), map(() => true), catchError(error => {\n attributes.onStateChange.emit({\n reason: 'loading-failed',\n data: error\n });\n hooks.setErrorImage(error, attributes);\n return of(false);\n }), tap(() => {\n attributes.onStateChange.emit({\n reason: 'finally'\n });\n hooks.finally(attributes);\n }));\n };\n}\nconst LAZYLOAD_IMAGE_HOOKS = new InjectionToken('LazyLoadImageHooks');\nlet LazyLoadImageDirective = /*#__PURE__*/(() => {\n class LazyLoadImageDirective {\n constructor(el, ngZone, platformId, hooks) {\n this.onStateChange = new EventEmitter(); // Emits an event on every state change\n this.elementRef = el;\n this.ngZone = ngZone;\n this.propertyChanges$ = new ReplaySubject();\n this.hooks = hooks;\n this.hooks.setPlatformId(platformId);\n this.uid = Math.random().toString(36).substr(2, 9);\n }\n ngOnChanges() {\n if (this.debug === true && !this.debugSubscription) {\n this.debugSubscription = this.onStateChange.subscribe(e => console.log(e));\n }\n this.propertyChanges$.next({\n element: this.elementRef.nativeElement,\n imagePath: this.lazyImage,\n defaultImagePath: this.defaultImage,\n errorImagePath: this.errorImage,\n useSrcset: this.useSrcset,\n offset: this.offset ? this.offset | 0 : 0,\n scrollContainer: this.scrollTarget,\n customObservable: this.customObservable,\n decode: this.decode,\n onStateChange: this.onStateChange,\n id: this.uid\n });\n }\n ngAfterContentInit() {\n if (this.hooks.isDisabled()) {\n return null;\n }\n this.ngZone.runOutsideAngular(() => {\n this.loadSubscription = this.propertyChanges$.pipe(tap(attributes => this.hooks.onAttributeChange(attributes)), tap(attributes => attributes.onStateChange.emit({\n reason: 'setup'\n })), tap(attributes => this.hooks.setup(attributes)), switchMap(attributes => {\n if (!attributes.imagePath) {\n return never();\n }\n return this.hooks.getObservable(attributes).pipe(lazyLoadImage(this.hooks, attributes));\n })).subscribe({\n next: () => null\n });\n });\n }\n ngOnDestroy() {\n this.propertyChanges$.pipe(take(1)).subscribe({\n next: attributes => this.hooks.onDestroy(attributes)\n }).unsubscribe();\n this.loadSubscription?.unsubscribe();\n this.debugSubscription?.unsubscribe();\n }\n }\n LazyLoadImageDirective.ɵfac = function LazyLoadImageDirective_Factory(t) {\n return new (t || LazyLoadImageDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(PLATFORM_ID), i0.ɵɵdirectiveInject(LAZYLOAD_IMAGE_HOOKS));\n };\n LazyLoadImageDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: LazyLoadImageDirective,\n selectors: [[\"\", \"lazyLoad\", \"\"]],\n inputs: {\n lazyImage: [\"lazyLoad\", \"lazyImage\"],\n defaultImage: \"defaultImage\",\n errorImage: \"errorImage\",\n scrollTarget: \"scrollTarget\",\n customObservable: \"customObservable\",\n offset: \"offset\",\n useSrcset: \"useSrcset\",\n decode: \"decode\",\n debug: \"debug\"\n },\n outputs: {\n onStateChange: \"onStateChange\"\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n return LazyLoadImageDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet LazyLoadImageModule = /*#__PURE__*/(() => {\n class LazyLoadImageModule {}\n LazyLoadImageModule.ɵfac = function LazyLoadImageModule_Factory(t) {\n return new (t || LazyLoadImageModule)();\n };\n LazyLoadImageModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: LazyLoadImageModule\n });\n LazyLoadImageModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: LAZYLOAD_IMAGE_HOOKS,\n useClass: IntersectionObserverHooks\n }]\n });\n return LazyLoadImageModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass Rect {\n constructor(left, top, right, bottom) {\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n }\n static fromElement(element) {\n const {\n left,\n top,\n right,\n bottom\n } = element.getBoundingClientRect();\n if (left === 0 && top === 0 && right === 0 && bottom === 0) {\n return Rect.empty;\n } else {\n return new Rect(left, top, right, bottom);\n }\n }\n static fromWindow(_window) {\n return new Rect(0, 0, _window.innerWidth, _window.innerHeight);\n }\n inflate(inflateBy) {\n this.left -= inflateBy;\n this.top -= inflateBy;\n this.right += inflateBy;\n this.bottom += inflateBy;\n }\n intersectsWith(rect) {\n return rect.left < this.right && this.left < rect.right && rect.top < this.bottom && this.top < rect.bottom;\n }\n getIntersectionWith(rect) {\n const left = Math.max(this.left, rect.left);\n const top = Math.max(this.top, rect.top);\n const right = Math.min(this.right, rect.right);\n const bottom = Math.min(this.bottom, rect.bottom);\n if (right >= left && bottom >= top) {\n return new Rect(left, top, right, bottom);\n } else {\n return Rect.empty;\n }\n }\n}\nRect.empty = new Rect(0, 0, 0, 0);\nclass ScrollHooks extends SharedHooks {\n constructor() {\n super(...arguments);\n this.getWindow = () => window;\n this.scrollListeners = new WeakMap();\n // Only create one scroll listener per target and share the observable.\n // Typical, there will only be one observable per application\n this.getScrollListener = scrollTarget => {\n if (!scrollTarget || typeof scrollTarget.addEventListener !== 'function') {\n console.warn('`addEventListener` on ' + scrollTarget + ' (scrollTarget) is not a function. Skipping this target');\n return empty();\n }\n const scrollListener = this.scrollListeners.get(scrollTarget);\n if (scrollListener) {\n return scrollListener;\n }\n const srollEvent = Observable.create(observer => {\n const eventName = 'scroll';\n const handler = event => observer.next(event);\n const options = {\n passive: true,\n capture: false\n };\n scrollTarget.addEventListener(eventName, handler, options);\n return () => scrollTarget.removeEventListener(eventName, handler, options);\n });\n const listener = this.sampleObservable(srollEvent);\n this.scrollListeners.set(scrollTarget, listener);\n return listener;\n };\n }\n getObservable(attributes) {\n if (this.skipLazyLoading(attributes)) {\n return of('load');\n } else if (attributes.customObservable) {\n return attributes.customObservable.pipe(startWith(''));\n } else if (attributes.scrollContainer) {\n return this.getScrollListener(attributes.scrollContainer);\n }\n return this.getScrollListener(this.getWindow());\n }\n isVisible(event, attributes) {\n const elementBounds = Rect.fromElement(attributes.element);\n if (elementBounds === Rect.empty) {\n return false;\n }\n const windowBounds = Rect.fromWindow(this.getWindow());\n elementBounds.inflate(attributes.offset);\n if (attributes.scrollContainer) {\n const scrollContainerBounds = Rect.fromElement(attributes.scrollContainer);\n const intersection = scrollContainerBounds.getIntersectionWith(windowBounds);\n return elementBounds.intersectsWith(intersection);\n } else {\n return elementBounds.intersectsWith(windowBounds);\n }\n }\n sampleObservable(obs, scheduler) {\n return obs.pipe(sampleTime(100, scheduler), share(), startWith(''));\n }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Hooks, IntersectionObserverHooks, LAZYLOAD_IMAGE_HOOKS, LazyLoadImageDirective, LazyLoadImageModule, ScrollHooks, SharedHooks };\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component, DestroyRef,\n ElementRef,\n inject,\n Input,\n OnChanges,\n Renderer2,\n ViewChild\n} from '@angular/core';\nimport { CoverUpdateEvent } from 'src/app/_models/events/cover-update-event';\nimport { ImageService } from 'src/app/_services/image.service';\nimport { EVENTS, MessageHubService } from 'src/app/_services/message-hub.service';\nimport {takeUntilDestroyed} from \"@angular/core/rxjs-interop\";\nimport {CommonModule, NgOptimizedImage} from \"@angular/common\";\nimport {LazyLoadImageModule, StateChange} from \"ng-lazyload-image\";\n\n/**\n * This is used for images with placeholder fallback.\n */\n@Component({\n selector: 'app-image',\n standalone: true,\n imports: [CommonModule, NgOptimizedImage, LazyLoadImageModule],\n templateUrl: './image.component.html',\n styleUrls: ['./image.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ImageComponent implements OnChanges {\n\n private readonly destroyRef = inject(DestroyRef);\n protected readonly imageService = inject(ImageService);\n private readonly renderer = inject(Renderer2);\n private readonly hubService = inject(MessageHubService);\n private readonly cdRef = inject(ChangeDetectorRef);\n\n /**\n * Source url to load image\n */\n @Input({required: true}) imageUrl!: string;\n /**\n * Width of the image. If not defined, will not be applied\n */\n @Input() width: string = '';\n /**\n * Height of the image. If not defined, will not be applied\n */\n @Input() height: string = '';\n /**\n * Max Width of the image. If not defined, will not be applied\n */\n @Input() maxWidth: string = '';\n /**\n * Max Height of the image. If not defined, will not be applied\n */\n @Input() maxHeight: string = '';\n /**\n * Border Radius of the image. If not defined, will not be applied\n */\n @Input() borderRadius: string = '';\n /**\n * Object fit of the image. If not defined, will not be applied\n */\n @Input() objectFit: string = '';\n /**\n * Background of the image. If not defined, will not be applied\n */\n @Input() background: string = '';\n /**\n * If the image component should respond to cover updates\n */\n @Input() processEvents: boolean = true;\n /**\n * Note: Parent component must use ViewEncapsulation.None\n */\n @Input() classes: string = '';\n /**\n * A collection of styles to apply. This is useful if the parent component doesn't want to use no view encapsulation\n */\n @Input() styles: string = '';\n @Input() errorImage: string = this.imageService.errorImage;\n\n @ViewChild('img', {static: true}) imgElem!: ElementRef;\n\n\n constructor() {\n this.hubService.messages$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(res => {\n if (!this.processEvents) return;\n if (res.event === EVENTS.CoverUpdate) {\n const updateEvent = res.payload as CoverUpdateEvent;\n if (this.imageUrl === undefined || this.imageUrl === null || this.imageUrl === '') return;\n const entityType = this.imageService.getEntityTypeFromUrl(this.imageUrl);\n if (entityType === updateEvent.entityType) {\n const tokens = this.imageUrl.split('?')[1].split('&');\n\n //...seriesId=123&random=\n let id = tokens[0].replace(entityType + 'Id=', '');\n if (id.includes('&')) {\n id = id.split('&')[0];\n }\n if (id === (updateEvent.id + '')) {\n this.imageUrl = this.imageService.randomize(this.imageUrl);\n this.cdRef.markForCheck();\n }\n }\n }\n });\n }\n\n ngOnChanges(): void {\n if (this.width != '') {\n this.renderer.setStyle(this.imgElem.nativeElement, 'width', this.width);\n }\n\n if (this.height != '') {\n this.renderer.setStyle(this.imgElem.nativeElement, 'height', this.height);\n }\n\n if (this.maxWidth != '') {\n this.renderer.setStyle(this.imgElem.nativeElement, 'max-width', this.maxWidth);\n }\n\n if (this.maxHeight != '') {\n this.renderer.setStyle(this.imgElem.nativeElement, 'max-height', this.maxHeight);\n }\n\n if (this.borderRadius != '') {\n this.renderer.setStyle(this.imgElem.nativeElement, 'border-radius', this.borderRadius);\n }\n\n if (this.objectFit != '') {\n this.renderer.setStyle(this.imgElem.nativeElement, 'object-fit', this.objectFit);\n }\n\n if (this.background != '') {\n this.renderer.setStyle(this.imgElem.nativeElement, 'background', this.background);\n }\n\n if (this.styles != '') {\n this.renderer.setStyle(this.imgElem.nativeElement, 'styles', this.styles);\n }\n\n if (this.classes != '') {\n this.renderer.addClass(this.imgElem.nativeElement, this.classes);\n }\n }\n\n\n myCallbackFunction(event: StateChange) {\n const image = this.imgElem.nativeElement;\n switch (event.reason) {\n case 'setup':\n // The lib has been instantiated but we have not done anything yet.\n break;\n case 'observer-emit':\n // The image observer (intersection/scroll/custom observer) has emit a value so we\n // should check if the image is in the viewport.\n // `event.data` is the event in this case.\n break;\n case 'start-loading':\n // The image is in the viewport so the image will start loading\n break;\n case 'mount-image':\n // The image has been loaded successfully so lets put it into the DOM\n break;\n case 'loading-succeeded':\n // The image has successfully been loaded and placed into the DOM\n this.renderer.addClass(image, 'loaded');\n break;\n case 'loading-failed':\n // The image could not be loaded for some reason.\n // `event.data` is the error in this case\n this.renderer.removeClass(image, 'fade-in');\n this.cdRef.markForCheck();\n break;\n case 'finally':\n // The last event before cleaning up\n break;\n }\n }\n\n}\n","\"\"\n\n","import {Pipe, PipeTransform} from '@angular/core';\nimport { MangaFormat } from '../_models/manga-format';\nimport {TranslocoService} from \"@ngneat/transloco\";\n\n/**\n * Returns the string name for the format\n */\n@Pipe({\n name: 'mangaFormat',\n standalone: true\n})\nexport class MangaFormatPipe implements PipeTransform {\n\n constructor(private translocoService: TranslocoService) {}\n\n transform(format: MangaFormat): string {\n switch (format) {\n case MangaFormat.EPUB:\n return this.translocoService.translate('manga-format-pipe.epub');\n case MangaFormat.ARCHIVE:\n return this.translocoService.translate('manga-format-pipe.archive');\n case MangaFormat.IMAGE:\n return this.translocoService.translate('manga-format-pipe.image');\n case MangaFormat.PDF:\n return this.translocoService.translate('manga-format-pipe.pdf');\n case MangaFormat.UNKNOWN:\n return this.translocoService.translate('manga-format-pipe.unknown');\n default:\n return '';\n }\n }\n\n}\n","import * as i0 from '@angular/core';\nimport { ElementRef, Injector, Directive, EventEmitter, Inject, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nfunction throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nfunction throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nfunction throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nfunction throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' + 'a ComponentPortal or a TemplatePortal.');\n}\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nfunction throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nfunction throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nclass Portal {\n /** Attach this portal to a host. */\n attach(host) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n this._attachedHost = host;\n return host.attach(this);\n }\n /** Detach this portal from its host */\n detach() {\n let host = this._attachedHost;\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n /** Whether this portal is attached to a host. */\n get isAttached() {\n return this._attachedHost != null;\n }\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host) {\n this._attachedHost = host;\n }\n}\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nclass ComponentPortal extends Portal {\n constructor(component, viewContainerRef, injector, componentFactoryResolver, projectableNodes) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n this.projectableNodes = projectableNodes;\n }\n}\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nclass TemplatePortal extends Portal {\n constructor( /** The embedded template that will be used to instantiate an embedded View in the host. */\n templateRef, /** Reference to the ViewContainer into which the template will be stamped out. */\n viewContainerRef, /** Contextual data to be passed in to the embedded view. */\n context, /** The injector to use for the embedded view. */\n injector) {\n super();\n this.templateRef = templateRef;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n this.injector = injector;\n }\n get origin() {\n return this.templateRef.elementRef;\n }\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host, context = this.context) {\n this.context = context;\n return super.attach(host);\n }\n detach() {\n this.context = undefined;\n return super.detach();\n }\n}\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nclass DomPortal extends Portal {\n constructor(element) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nclass BasePortalOutlet {\n constructor() {\n /** Whether this host has already been permanently disposed. */\n this._isDisposed = false;\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n this.attachDomPortal = null;\n }\n /** Whether this host has an attached portal. */\n hasAttached() {\n return !!this._attachedPortal;\n }\n /** Attaches a portal. */\n attach(portal) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n } else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n /** Detaches a previously attached portal. */\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n this._invokeDisposeFn();\n }\n /** Permanently dispose of this portal host. */\n dispose() {\n if (this.hasAttached()) {\n this.detach();\n }\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n /** @docs-private */\n setDisposeFn(fn) {\n this._disposeFn = fn;\n }\n _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n/**\n * @deprecated Use `BasePortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass BasePortalHost extends BasePortalOutlet {}\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nclass DomPortalOutlet extends BasePortalOutlet {\n /**\n * @param outletElement Element into which the content is projected.\n * @param _componentFactoryResolver Used to resolve the component factory.\n * Only required when attaching component portals.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n * @param _document Reference to the document. Used when attaching a DOM portal. Will eventually\n * become a required parameter.\n */\n constructor( /** Element into which the content is projected. */\n outletElement, _componentFactoryResolver, _appRef, _defaultInjector,\n /**\n * @deprecated `_document` Parameter to be made required.\n * @breaking-change 10.0.0\n */\n _document) {\n super();\n this.outletElement = outletElement;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._defaultInjector = _defaultInjector;\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = portal => {\n // @breaking-change 10.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n element.parentNode.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !resolver) {\n throw Error('Cannot attach component portal to outlet without a ComponentFactoryResolver.');\n }\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef;\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector, portal.projectableNodes || undefined);\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n componentRef = componentFactory.create(portal.injector || this._defaultInjector || Injector.NULL);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (this._appRef.viewCount > 0) {\n this._appRef.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n return componentRef;\n }\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector\n });\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n this._attachedPortal = portal;\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n /**\n * Clears out a portal from the DOM.\n */\n dispose() {\n super.dispose();\n this.outletElement.remove();\n }\n /** Gets the root HTMLElement for an instantiated component. */\n _getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }\n}\n/**\n * @deprecated Use `DomPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass DomPortalHost extends DomPortalOutlet {}\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\nlet CdkPortal = /*#__PURE__*/(() => {\n class CdkPortal extends TemplatePortal {\n constructor(templateRef, viewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n static {\n this.ɵfac = function CdkPortal_Factory(t) {\n return new (t || CdkPortal)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkPortal,\n selectors: [[\"\", \"cdkPortal\", \"\"]],\n exportAs: [\"cdkPortal\"],\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return CdkPortal;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\nlet TemplatePortalDirective = /*#__PURE__*/(() => {\n class TemplatePortalDirective extends CdkPortal {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵTemplatePortalDirective_BaseFactory;\n return function TemplatePortalDirective_Factory(t) {\n return (ɵTemplatePortalDirective_BaseFactory || (ɵTemplatePortalDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TemplatePortalDirective)))(t || TemplatePortalDirective);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TemplatePortalDirective,\n selectors: [[\"\", \"cdk-portal\", \"\"], [\"\", \"portal\", \"\"]],\n exportAs: [\"cdkPortal\"],\n features: [i0.ɵɵProvidersFeature([{\n provide: CdkPortal,\n useExisting: TemplatePortalDirective\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return TemplatePortalDirective;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * ``\n */\nlet CdkPortalOutlet = /*#__PURE__*/(() => {\n class CdkPortalOutlet extends BasePortalOutlet {\n constructor(_componentFactoryResolver, _viewContainerRef,\n /**\n * @deprecated `_document` parameter to be made required.\n * @breaking-change 9.0.0\n */\n _document) {\n super();\n this._componentFactoryResolver = _componentFactoryResolver;\n this._viewContainerRef = _viewContainerRef;\n /** Whether the portal component is initialized. */\n this._isInitialized = false;\n /** Emits when a portal is attached to the outlet. */\n this.attached = new EventEmitter();\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = portal => {\n // @breaking-change 9.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n portal.setAttachedHost(this);\n element.parentNode.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /** Portal associated with the Portal outlet. */\n get portal() {\n return this._attachedPortal;\n }\n set portal(portal) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `
`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n if (this.hasAttached()) {\n super.detach();\n }\n if (portal) {\n super.attach(portal);\n }\n this._attachedPortal = portal || null;\n }\n /** Component or view reference that is attached to the portal. */\n get attachedRef() {\n return this._attachedRef;\n }\n ngOnInit() {\n this._isInitialized = true;\n }\n ngOnDestroy() {\n super.dispose();\n this._attachedRef = this._attachedPortal = null;\n }\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n portal.setAttachedHost(this);\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector, portal.projectableNodes || undefined);\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild(ref.hostView.rootNodes[0]);\n }\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n return ref;\n }\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n return viewRef;\n }\n /** Gets the root node of the portal outlet. */\n _getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return nativeElement.nodeType === nativeElement.ELEMENT_NODE ? nativeElement : nativeElement.parentNode;\n }\n static {\n this.ɵfac = function CdkPortalOutlet_Factory(t) {\n return new (t || CdkPortalOutlet)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(DOCUMENT));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkPortalOutlet,\n selectors: [[\"\", \"cdkPortalOutlet\", \"\"]],\n inputs: {\n portal: [\"cdkPortalOutlet\", \"portal\"]\n },\n outputs: {\n attached: \"attached\"\n },\n exportAs: [\"cdkPortalOutlet\"],\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return CdkPortalOutlet;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nlet PortalHostDirective = /*#__PURE__*/(() => {\n class PortalHostDirective extends CdkPortalOutlet {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵPortalHostDirective_BaseFactory;\n return function PortalHostDirective_Factory(t) {\n return (ɵPortalHostDirective_BaseFactory || (ɵPortalHostDirective_BaseFactory = i0.ɵɵgetInheritedFactory(PortalHostDirective)))(t || PortalHostDirective);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: PortalHostDirective,\n selectors: [[\"\", \"cdkPortalHost\", \"\"], [\"\", \"portalHost\", \"\"]],\n inputs: {\n portal: [\"cdkPortalHost\", \"portal\"]\n },\n exportAs: [\"cdkPortalHost\"],\n features: [i0.ɵɵProvidersFeature([{\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return PortalHostDirective;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PortalModule = /*#__PURE__*/(() => {\n class PortalModule {\n static {\n this.ɵfac = function PortalModule_Factory(t) {\n return new (t || PortalModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: PortalModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return PortalModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n * @deprecated Use `Injector.create` instead.\n * @breaking-change 11.0.0\n */\nclass PortalInjector {\n constructor(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n get(token, notFoundValue) {\n const value = this._customTokens.get(token);\n if (typeof value !== 'undefined') {\n return value;\n }\n return this._parentInjector.get(token, notFoundValue);\n }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };\n"],"mappings":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CACjF,SAAUA,EAAO,QACnB,CAAC,EAKD,OAAAO,EAAQ,UAAU,QAAQC,GAAY,KAAK,cAAc,YAAYA,CAAQ,CAAC,EAI9ED,EAAQ,cAAc,EACtB,KAAK,aAAa,IAAM,CACtB,IAAIE,EAAQH,EAAc,QAAQC,CAAO,EACrCE,IAAU,IACZH,EAAc,OAAOG,CAAK,CAE9B,CAAC,EACD,KAAK,gBAAkBT,EAEhBO,CACT,CAIA,SAAU,CACR,MAAM,QAAQ,EACd,KAAK,cAAc,OAAO,CAC5B,CAEA,sBAAsBH,EAAc,CAClC,OAAOA,EAAa,SAAS,UAAU,CAAC,CAC1C,CACF,EAkQA,IAAIM,IAA6B,IAAM,CACrC,IAAMC,EAAN,MAAMA,CAAa,CAcnB,EAZIA,EAAK,UAAO,SAA8BC,EAAG,CAC3C,OAAO,IAAKA,GAAKD,EACnB,EAGAA,EAAK,UAAyBE,EAAiB,CAC7C,KAAMF,CACR,CAAC,EAGDA,EAAK,UAAyBG,EAAiB,CAAC,CAAC,EAZrD,IAAMJ,EAANC,EAeA,OAAOD,CACT,GAAG","names":["getNavigator","isChildOfPicture","element","isImageElement","setImage","imagePath","useSrcset","setSources","attrName","image","sources","i","attrValue","setSourcesToDefault","setSourcesToLazy","setSourcesToError","setImageAndSources","setSourcesFn","setImageAndSourcesToDefault","setImageAndSourcesToLazy","setImageAndSourcesToError","Hooks","platformId","attributes","newAttributes","cssClassNames","removeCssClassName","cssClassName","addCssClassName","hasCssClassName","SharedHooks","decode","img","resolve","reject","error","errorImagePath","isPlatformServer","IntersectionObserverHooks","Subject","of","scrollContainerKey","options","observer","entrys","Observable","obs","subscription","filter","entry","event","lazyLoadImage","hooks","evntObservable","tap","data","take","mergeMap","map","catchError","LAZYLOAD_IMAGE_HOOKS","InjectionToken","LazyLoadImageDirective","el","ngZone","EventEmitter","ReplaySubject","e","switchMap","never","ɵɵdirectiveInject","ElementRef","NgZone","PLATFORM_ID","ɵɵdefineDirective","ɵɵNgOnChangesFeature","LazyLoadImageModule","ɵɵdefineNgModule","ɵɵdefineInjector","Rect","_Rect","left","top","right","bottom","_window","inflateBy","rect","ImageComponent","constructor","destroyRef","inject","DestroyRef","imageService","ImageService","renderer","Renderer2","hubService","MessageHubService","cdRef","ChangeDetectorRef","width","height","maxWidth","maxHeight","borderRadius","objectFit","background","processEvents","classes","styles","errorImage","messages$","pipe","takeUntilDestroyed","subscribe","res","event","EVENTS","CoverUpdate","updateEvent","payload","imageUrl","undefined","entityType","getEntityTypeFromUrl","id","split","replace","includes","randomize","markForCheck","ngOnChanges","setStyle","imgElem","nativeElement","addClass","myCallbackFunction","image","reason","removeClass","selectors","viewQuery","rf","ctx","ɵɵelementStart","ɵɵlistener","$event","ɵɵelementEnd","ɵɵproperty","CommonModule","LazyLoadImageModule","LazyLoadImageDirective","changeDetection","_ImageComponent","MangaFormatPipe","constructor","translocoService","transform","format","MangaFormat","EPUB","translate","ARCHIVE","IMAGE","PDF","UNKNOWN","ɵɵdirectiveInject","TranslocoService","pure","standalone","_MangaFormatPipe","Portal","host","ComponentPortal","component","viewContainerRef","injector","componentFactoryResolver","projectableNodes","TemplatePortal","templateRef","context","DomPortal","element","ElementRef","BasePortalOutlet","portal","fn","DomPortalOutlet","BasePortalOutlet","outletElement","_componentFactoryResolver","_appRef","_defaultInjector","_document","portal","element","anchorNode","componentFactory","componentRef","Injector","viewContainer","viewRef","rootNode","index","PortalModule","_PortalModule","t","ɵɵdefineNgModule","ɵɵdefineInjector"],"x_google_ignoreList":[0,4]}