PageSourceSearch

https://demo.kavitareader.com/main-7A7AJKIF.js

js kavitareader.com collected 2026-10-03 22:07:45 UTC 838,330 bytes, 61 lines download raw bytes

1import{a as w$4,c as z$4,i as D$5,o as x$3,r as C$5}from"./chunk-D_xF_Z72.js";import{$ as K_$1,$i as yy,$n as eM,Ai as va$2,An as a_$1,Ar as ke$2,At as RB,Bi as wy,Br as le$4,C as Dm$1,Cn as __$1,Cr as jB,Ct as Ou,D as Ed$1,Di as u_$1,Dn as aE,Dr as jm$1,Dt as Py,Fi as wB,Fn as bT,Ft as Sd$1,Gi as xd$1,Gr as mo$2,Gt as Te$5,Hn as cM,Hr as lt$3,Ht as TC,Ii as wC,In as bd$1,Ir as lI,J as Im$1,Ji as yI,Jn as d_$1,Jr as nI,Jt as U$8,Ki as xo$2,Kr as my,Kt as Tr$2,Li as wo$2,Ln as be$3,Lr as lM,Lt as Su,M as Fd$1,Mn as at$3,Mt as Re$4,Nr as kv,Oi as ua$2,Or as jy,Pi as vy,Pn as bC,Pt as SB,R as Gs$1,Rr as la$2,S as Dd$1,Sr as j$3,St as OB,T as E$2,Tn as _u,Tr as j_$1,Tt as PD,U as Hm$1,Un as c_$1,Ur as mI,Ut as TT,V as H_$1,Vi as x$4,Vr as ls$1,Vt as TB,Wi as xb,Wn as ce$5,Wt as Td$1,X as JB,Xt as Ua$2,Y as J$6,Yi as yT,Yt as U_$1,Z as J_$1,Zi as yo$2,Zn as e$,Zt as Um$1,_ as Cd$1,_i as sM,_r as ht$3,_t as N_$1,a as AC,ai as qE,an as We$5,ar as fh,at as M$3,b as DI,bn as _B,br as i_$1,c as Au,cn as Wv,d as Bm$1,di as qs$1,dn as X_$1,dt as Mn,ea as zm$1,en as Vm$1,er as eo$1,et as LB,f as By,fi as qv,fr as gy,h as CE,hi as r_$1,hn as Y_$1,hr as hf,ht as NB,ii as py,in as W_$1,ir as fe$6,it as Ly,j as FD,jn as ag,kn as aM,kt as Qv,l as Aw,li as qh,ln as XB,lr as ga$2,lt as Mf,m as CC,mi as rM,mt as Mu,n as $e$5,na as zv,ni as p_$1,nn as Vy,oi as q_$1,or as fl$2,ot as MB,p as CB,pi as rI,pn as Xr$2,pt as Mt$3,q as Ii,qi as xu,qt as Ty,r as $h,rn as W$2,rr as f_$1,rt as Lu,s as An,si as qe$2,sr as fy,t as $_$1,ta as zt$2,u as B_$1,ui as qm$1,ur as gm$1,v as Ci,vr as iI,vt as Nd$1,wn as _f,wt as PB,x as DT,xi as te$5,xn as _C,xr as it$3,xt as Nu,y as DC,yn as Zv,yr as iM,zn as bs$1,zr as lb,zt as Sw}from"./chunk-D2dQBsPc.js";import{D as xo$3,E as ws$1,O as ys$1,S as js$1,T as sr$2,_ as bs$2,a as Es$1,b as io$1,c as Ns$1,d as Os$1,g as Ws$1,h as Ts$1,i as Ds$1,l as Nt$2,m as Ss$1,n as Bs$1,o as Ls$1,p as Rs$1,r as Cs$1,s as Ms$1,u as Oo$2,v as fo$2,w as so$2,x as ir$2,y as ho$2}from"./chunk-BhWomaP4.js";import{C as tt$3,b as sn,c as an,d as fn,f as gn,i as En,l as cn,m as it$4,n as Cn,v as nr$2,w as un,x as te$6,y as rr$2}from"./chunk-CkeJ1Ivl.js";import{t as i$1}from"./chunk-O_PvKdjY.js";import{n as c$2,t as Ao$2}from"./chunk-BbOFHrn_.js";import{a as mt$2,i as _r$2,o as ue$6,r as Tt$1,t as A$2}from"./chunk-DveUHPkH.js";import{t as S$5}from"./chunk-CBw-w59W.js";import{t as e$1}from"./chunk-Dm-DevTI.js";import{a as tn$1,i as te$7,n as Zt$1,r as nt$2,t as Ze$2}from"./chunk-B7NQq5d0.js";import{a as Le$3,c as Te$6,i as Dt$2,l as nt$3,n as Ct$3,o as Mt$4,r as De$3,s as Rt$1,t as C$6,u as p$7}from"./chunk-DGq5CYST.js";import{D as z$5,E as yi,T as yc$1,_ as ke$3,b as ro$2,c as Vt$2,d as ao$2,i as Js$1,l as Ys$1,m as eo$2,n as Dr$2,o as Pr$2,p as co$2,r as J$7,s as S$6,u as ae$4,w as vi$1,x as te$8,y as oo$1}from"./chunk-DYU_UxYA.js";import{C as bt$4,D as li$1,E as ii$2,F as un$1,I as vn,L as wn,O as oi$1,P as ti$1,R as xn,S as ai$1,T as fn$1,a as D$6,b as Zt$2,c as Et$1,d as It$1,g as Qe$5,j as ri$1,k as pn$1,l as G$6,n as An$1,r as Ce$3,t as Ae$2,w as ei$1,x as _$1,y as Z$2,z as y$4}from"./chunk-BaRxXWI8.js";import{i as w$5}from"./chunk-dARmPh_a.js";import{n as i$2,t as F$5}from"./chunk-D5N6YwVx.js";import{t as c$3}from"./chunk-DGqpGcPk.js";import{t as Y$4}from"./chunk-CX8nDcGs.js";import"./chunk-Bhg3ccrk.js";import"./chunk-CIULcIA9.js";import{t as w$6}from"./chunk-DNw0oWKY.js";import{a as S$7,c as bi,d as st$4,f as ue$7,i as Nt$3,l as jt$2,n as F$6,o as Vt$3,p as x$5,r as Ht$2,s as Wt$2,t as At$2,u as lt$4}from"./chunk-BZILipCP.js";import{n as Xt$2,t as Bt$3}from"./chunk-BO4l9UCr.js";import{t as X$6}from"./chunk-DAFSNhM7.js";import{t as e$2}from"./chunk-BqUHJB8Z.js";import{t as f$6}from"./chunk-CIBIqFsS.js";import{t as S$8}from"./chunk-NeqgtuJe.js";import{c as t$3,i as c$4,l as v$3,n as L$4,s as n$2,t as I$3}from"./chunk-aismZ9cW.js";import{t as N$2}from"./chunk-CAyRiavN.js";import{t as f$7}from"./chunk-D5ApwfBc.js";import{_ as u$4,a as Pe$4,c as be$4,d as fe$7,h as m$3,i as P$7,l as de$6,m as ie$5,n as I$4,p as he$6,r as O$6,t as Fe$3,u as f$8,v as y$5,y as z$6}from"./chunk-kHtojkC_.js";import{n as l,t as S$9}from"./chunk-D3klyAqW.js";import{_ as se$4,a as N$3,c as he$7,d as kt$2,f as me$5,g as re$3,h as qn$1,i as Mt$5,l as ht$4,m as pi$1,n as Ft$2,o as Ni,p as mt$3,s as fi$1,t as Et$2,u as jn$1,v as us$1,y as ut$2}from"./chunk-DVVHsOoo.js";import{t as e$3}from"./chunk-Dl-IIBVC.js";import{a as W$3,s as r$2}from"./chunk-SwA5jBoo.js";import{t as k$2}from"./chunk-Dl4zA8eU.js";import{n as G$7}from"./chunk-CXiEN3LY.js";import{n as u$5,t as h$3}from"./chunk-DXNcEhqb2.js";import{t as Wt$3}from"./chunk-D-CIoH1_2.js";import{r as t$4,t as d$1}from"./chunk-DMrxXtG52.js";import{t as j$4}from"./chunk-DBsn0vhA2.js";import{t as f$9}from"./chunk-Dk4tUhSt2.js";import{t as Z$3}from"./chunk-Difs8F302.js";import{t as x$6}from"./chunk-DqrVIs8J2.js";import"./chunk-soIqS40k2.js";import"./chunk-BMH9oQ9x2.js";import{t as h$4}from"./chunk-BXh2ybUK2.js";import{a as l$1,i as Tt$2,n as J$8,r as Ne$5,t as Ee$4}from"./chunk-7UDsfE_52.js";import{n as s$3,t as r$3}from"./chunk-CzyK2NmI2.js";import{t as s$4}from"./chunk-DnEjNGTz2.js";import"./chunk-Qqe3JRhX2.js";import{t as w$7}from"./chunk-BLmSSbAA2.js";import{t as lt$5}from"./chunk-DBqq8_FZ2.js";import{n as y$6,t as h$5}from"./chunk-Be7VdCvW2.js";import{t as t$5}from"./chunk-Bi10BH3v2.js";import{t as u$6}from"./chunk-CGjHE1vQ2.js";import{t as _e$4}from"./chunk-Dp4havsO2.js";var J$5=[`*`];function K$4(e,g){if(e&1&&j_$1(0),e&2)Ly(i_$1(2).title)}function Q$4(e,g){}function X$5(e,g){if(e&1&&(bs$1(0,`h3`,2),Dm$1(1,K$4,1,1,`ng-template`,null,0,lM)(3,Q$4,0,0,`ng-template`,4),Mu()),e&2){let t=p_$1(2),i=i_$1();xb(3),Vm$1(`ngTemplateOutlet`,i.isTitleTemplate()?i.title:t)(`ngTemplateOutletContext`,i.context)}}var Y$3=(()=>{class e{constructor(){this._ngbConfig=E$2(Oo$2),this.autoClose=!0,this.placement=`auto`,this.popperOptions=t=>t,this.triggers=`click`,this.disablePopover=!1,this.openDelay=0,this.closeDelay=0}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵprov=Mn({token:e,factory:e.ɵfac})}}return e})();var ee$5=0;var te$4=(()=>{class e{isTitleTemplate(){return this.title instanceof mo$2}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`ngb-popover-window`]],hostAttrs:[`role`,`tooltip`],hostVars:7,hostBindings:function(i,o){i&1&&fy(`mouseenter`,function(){return o.onMouseEnter()})(`mouseleave`,function(){return o.onMouseLeave()}),i&2&&(zm$1(`id`,o.id),N_$1(`popover`+(o.popoverClass?` `+o.popoverClass:``)),wy(`position`,`absolute`),Ty(`fade`,o.animation))},inputs:{animation:`animation`,title:`title`,id:`id`,popoverClass:`popoverClass`,context:`context`,onMouseEnter:`onMouseEnter`,onMouseLeave:`onMouseLeave`},ngContentSelectors:J$5,decls:4,vars:1,consts:[[`simpleTitle`,``],[`data-popper-arrow`,``,1,`popover-arrow`],[1,`popover-header`],[1,`popover-body`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`]],template:function(i,o){i&1&&(a_$1(),Hm$1(0,`div`,1),DC(1,
1X$5,4,2,`h3`,2),bs$1(2,`div`,3),c_$1(3),Mu()),i&2&&(xb(),bC(o.title?1:-1))},dependencies:[cn],encapsulation:2})}}return e})();var me$4=(()=>{class e{constructor(){this._config=E$2(Y$3),this.animation=this._config.animation,this.autoClose=this._config.autoClose,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.triggers=this._config.triggers,this.container=this._config.container,this.disablePopover=this._config.disablePopover,this.popoverClass=this._config.popoverClass,this.openDelay=this._config.openDelay,this.closeDelay=this._config.closeDelay,this.shown=new ht$3,this.hidden=new ht$3,this._nativeElement=E$2(wo$2).nativeElement,this._ngZone=E$2(U$8),this._document=E$2(Xr$2),this._changeDetector=E$2(OB),this._injector=E$2(fe$6),this._ngbPopoverWindowId=`ngb-popover-${ee$5++}`,this._popupService=new sr$2(te$4),this._windowRef=null,this._positioning=ws$1(),this._mouseEnterPopover=new le$4,this._mouseLeavePopover=new le$4,this._opening=!0,this._transitioning=!1}open(t){if(!this._opening&&this._transitioning&&(this._transitioning=!1,Cs$1(this._windowRef.location.nativeElement)),!this._windowRef&&!this._isDisabled()){let{windowRef:i,transition$:o}=this._popupService.open(this.ngbPopover,t??this.popoverContext,this.animation);this._opening=!0,this._transitioning=!0,this._windowRef=i,this._windowRef.setInput(`animation`,this.animation),this._windowRef.setInput(`title`,this.popoverTitle),this._windowRef.setInput(`context`,t??this.popoverContext),this._windowRef.setInput(`popoverClass`,this.popoverClass),this._windowRef.setInput(`id`,this._ngbPopoverWindowId),this._windowRef.setInput(`onMouseEnter`,()=>this._mouseEnterPopover.next()),this._windowRef.setInput(`onMouseLeave`,()=>this._mouseLeavePopover.next()),this._getPositionTargetElement().setAttribute(`aria-describedby`,this._ngbPopoverWindowId),this.container===`body`&&this._document.body.appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,baseClass:`bs-popover`,updatePopperOptions:s=>this.popperOptions(Bs$1([0,8])(s))}),Promise.resolve().then(()=>{this._positioning.update()}),this._afterRenderRef=lb({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector})}),Ms$1(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),o.subscribe(()=>{this._transitioning&&(this._transitioning=!1,this.shown.emit())})}}close(t=this.animation){this._opening&&this._transitioning&&(this._transitioning=!1,Cs$1(this._windowRef.location.nativeElement)),this._windowRef&&(this._getPositionTargetElement().removeAttribute(`aria-describedby`),this._opening=!1,this._transitioning=!0,this._popupService.close(t).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._afterRenderRef?.destroy(),this._transitioning&&(this._transitioning=!1,this.hidden.emit()),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return this._windowRef!=null}ngOnInit(){this._unregisterListenersFn=Ns$1(this._nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay,this._mouseEnterPopover,this._mouseLeavePopover)}ngOnChanges({ngbPopover:t,popoverTitle:i,disablePopover:o,popoverClass:s}){s&&this.isOpen()&&this._windowRef.setInput(`popoverClass`,s.currentValue),(t||i||o)&&this._isDisabled()&&this.close()}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_isDisabled(){return this.disablePopover?!0:!this.ngbPopover&&!this.popoverTitle}_getPositionTargetElement(){return(Os$1(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._nativeElement}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=DT({type:e,selectors:[[``,`ngbPopover`,``]],inputs:{animation:`animation`,autoClose:`autoClose`,ngbPopover:`ngbPopover`,popoverTitle:`popoverTitle`,placement:`placement`,popperOptions:`popperOptions`,triggers:`triggers`,positionTarget:`positionTarget`,container:`container`,disablePopover:`disablePopover`,popoverClass:`popoverClass`,popoverContext:`popoverContext`,openDelay:`openDelay`,closeDelay:`closeDelay`},outputs:{shown:`shown`,hidden:`hidden`},exportAs:[`ngbPopover`],features:[CE]})}}return e})();var y$3=(t,s)=>{let m=E$2(S$5),a=E$2(J$7),r=t.parent?.paramMap.get(`libraryId`)||t.paramMap.get(`libraryId`);return!r||r===`0`?(console.error(`Library ID not found in route params or 0`),la$2(a.parseUrl(`/home`))):m.getLibrary(parseInt(r,10)).pipe(ua$2(()=>la$2(a.parseUrl(`/home`))))};var N$1={toolbar:[[`bold`,`italic`,`underline`,`strike`],[`blockquote`,`code-block`],[{header:1},{header:2}],[{list:`ordered`},{list:`bullet`}],[{script:`sub`},{script:`super`}],[{indent:`-1`},{indent:`+1`}],[{direction:`rtl`}],[{size:[`small`,!1,`large`,`huge`]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],[`clean`],[`link`,`image`,`video`],[`table`]]};var ne$2=new x$4(`config`,{providedIn:`root`,factory:()=>({modules:N$1})});var ae$3=[[[``,`above-quill-editor-toolbar`,``]],[[``,`quill-editor-toolbar`,``]],[[``,`below-quill-editor-toolbar`,``]]];var de$5=[`[above-quill-editor-toolbar]`,`[quill-editor-toolbar]`,`[below-quill-editor-toolbar]`];function he$5(r,D){r&1&&Bm$1(0,`div`,0)}function ue$5(r,D){r&1&&Bm$1(0,`div`,0)}var re$2=(()=>
1{class r{constructor(){this.config=E$2(ne$2)||{modules:N$1},this.quill$=qv(()=>D$5(this,null,function*(){if(!this.Quill){let{Quill:e}=yield import(`./chunk-8CbSaiNR2.js`);this.Quill=e}return this.config.customOptions?.forEach(e=>{let t=this.Quill.import(e.import);t.whitelist=e.whitelist,this.Quill.register(t,!0,this.config.suppressGlobalRegisterWarning)}),new Promise(e=>{this.registerCustomModules(this.Quill,this.config.customModules,this.config.suppressGlobalRegisterWarning).subscribe(e)})})).pipe(Td$1({bufferSize:1,refCount:!1})),this.registeredModules=new Set}getQuill(){return this.quill$}beforeRender(e,t,i=this.config.beforeRender){let s=[this.registerCustomModules(e,t)];return i&&s.push(i()),Wv(s).pipe(qe$2(()=>e))}registerCustomModules(e,t,i){if(!Array.isArray(t))return la$2(e);let s=[];for(let o of t){let{path:l,implementation:a}=o;this.registeredModules.has(l)||(this.registeredModules.add(l),Zv(a)?s.push(a.pipe(xd$1(d=>{e.register(l,d,i)}))):e.register(l,a,i))}return s.length>0?Wv(s).pipe(qe$2(()=>e)):la$2(e)}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵprov=J$6({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();var v$2=(r,D)=>r||D||`html`;var ce$4=(()=>{class r{constructor(){this.format=TB(),this.theme=TB(),this.modules=TB(),this.debug=TB(!1),this.readOnly=TB(!1,{transform:LB}),this.placeholder=TB(),this.maxLength=TB(),this.minLength=TB(),this.required=TB(!1,{transform:LB}),this.formats=TB(),this.customToolbarPosition=TB(`top`),this.sanitize=TB(),this.beforeRender=TB(),this.styles=TB(null),this.registry=TB(),this.bounds=TB(),this.customOptions=TB([]),this.customModules=TB([]),this.trackChanges=TB(),this.classes=TB(),this.trimOnValidation=TB(!1,{transform:LB}),this.linkPlaceholder=TB(),this.compareValues=TB(!1,{transform:LB}),this.filterNull=TB(!1,{transform:LB}),this.debounceTime=TB(),this.onlyFormatEventData=TB(!1),this.defaultEmptyValue=TB(null),this.onEditorCreated=new ht$3,this.onEditorChanged=new ht$3,this.onContentChanged=new ht$3,this.onSelectionChanged=new ht$3,this.onFocus=new ht$3,this.onBlur=new ht$3,this.onNativeFocus=new ht$3,this.onNativeBlur=new ht$3,this.disabled=!1,this.toolbarPosition=be$3(`top`),this.eventsSubscription=null,this.quillSubscription=null,this.elementRef=E$2(wo$2),this.domSanitizer=E$2(te$7),this.platformId=E$2(aE),this.renderer=E$2(fl$2),this.service=E$2(re$2),this.destroyRef=E$2(te$5),this.init=!1,this.valueGetter=TB(this.getter.bind(this)),this.valueSetter=TB((e,t)=>{let i=v$2(this.format(),this.service.config.format);if(i===`html`)return(typeof this.sanitize()==`boolean`?this.sanitize():this.service.config.sanitize)&&(t=this.domSanitizer.sanitize(j$3.HTML,t)),e.clipboard.convert({html:t});if(i===`json`)try{return JSON.parse(t)}catch(s){return[{insert:t}]}return t}),this.selectionChangeHandler=(e,t,i)=>{let s=this.trackChanges()||this.service.config.trackChanges,o=!e&&!!this.onModelTouched&&(i===`user`||s&&s===`all`);!this.onBlur.observed&&!this.onFocus.observed&&!this.onSelectionChanged.observed&&!o||(e===null?this.onBlur.emit({editor:this.quillEditor,source:i}):t===null&&this.onFocus.emit({editor:this.quillEditor,source:i}),this.onSelectionChanged.emit({editor:this.quillEditor,oldRange:t,range:e,source:i}),o&&this.onModelTouched())},this.textChangeHandler=(e,t,i)=>{let s=this.trackChanges()||this.service.config.trackChanges,o=(i===`user`||s&&s===`all`)&&!!this.onModelChange;if(!this.onContentChanged.observed&&!o)return;let l=this.eventCallbackFormats();o&&this.onModelChange(l.noFormat?this.valueGetter()(this.quillEditor):l[l.format]),this.onContentChanged.emit({content:l.object,delta:e,editor:this.quillEditor,html:l.html,oldDelta:t,source:i,text:l.text})},this.editorChangeHandler=(e,t,i,s)=>{if(this.onEditorChanged.observed)if(e===`text-change`){let o=this.eventCallbackFormats();this.onEditorChanged.emit({content:o.object,delta:t,editor:this.quillEditor,event:e,html:o.html,oldDelta:i,source:s,text:o.text})}else this.onEditorChanged.emit({editor:this.quillEditor,event:e,oldRange:i,range:t,source:s})},ag(()=>{nr$2(this.platformId)||(this.quillSubscription=this.service.getQuill().pipe(Re$4(e=>this.service.beforeRender(e,this.customModules(),this.beforeRender()))).subscribe(e=>{this.editorElem=this.elementRef.nativeElement.querySelector(`[quill-editor-element]`);let t=this.elementRef.nativeElement.querySelector(`[quill-editor-toolbar]`),i=Object.assign({},this.modules()||this.service.config.modules);t?i.toolbar=t:i.toolbar===void 0&&(i.toolbar=N$1.toolbar);let s=this.placeholder()!==void 0?this.placeholder():this.service.config.placeholder;s===void 0&&(s=`Insert text here ...`);let o=this.styles();
1o&&(this.previousStyles=o,Object.keys(o).forEach(u=>{this.renderer.setStyle(this.editorElem,u,o[u])}));let l=this.classes();l&&(this.previousClasses=l,this.addClasses(l)),this.customOptions().forEach(u=>{let m=e.import(u.import);m.whitelist=u.whitelist,e.register(m,!0)});let a=this.bounds()&&this.bounds()===`self`?this.editorElem:this.bounds();a||(a=this.service.config.bounds?this.service.config.bounds:document.body);let d=this.debug();!d&&d!==!1&&this.service.config.debug&&(d=this.service.config.debug);let q=this.readOnly();!q&&this.readOnly()!==!1&&(q=this.service.config.readOnly!==void 0?this.service.config.readOnly:!1);let p=this.formats();if(!p&&p===void 0&&(p=this.service.config.formats?[...this.service.config.formats]:this.service.config.formats===null?null:void 0),this.quillEditor=new e(this.editorElem,{bounds:a,debug:d,formats:p,modules:i,placeholder:s,readOnly:q,registry:this.registry(),theme:this.theme()||(this.service.config.theme?this.service.config.theme:`snow`)}),this.onNativeBlur.observed){ga$2(this.quillEditor.scroll.domNode,`blur`).pipe(JB(this.destroyRef)).subscribe(()=>this.onNativeBlur.next({editor:this.quillEditor,source:`dom`}));let u=this.quillEditor.getModule(`toolbar`);u.container&&ga$2(u.container,`mousedown`).pipe(JB(this.destroyRef)).subscribe(m=>m.preventDefault())}if(this.onNativeFocus.observed&&ga$2(this.quillEditor.scroll.domNode,`focus`).pipe(JB(this.destroyRef)).subscribe(()=>this.onNativeFocus.next({editor:this.quillEditor,source:`dom`})),this.linkPlaceholder()){let m=this.quillEditor?.theme?.tooltip?.root?.querySelector(`input[data-link]`);m?.dataset&&(m.dataset.link=this.linkPlaceholder())}if(this.content){if(v$2(this.format(),this.service.config.format)===`text`)this.quillEditor.setText(this.content,`silent`);else{let le=this.valueSetter()(this.quillEditor,this.content);this.quillEditor.setContents(le,`silent`)}this.quillEditor.getModule(`history`).clear()}if(this.setDisabledState(),this.addQuillEventListeners(),!this.onEditorCreated.observed&&!this.onValidatorChanged){this.init=!0;return}this.onValidatorChanged&&this.onValidatorChanged(),this.onEditorCreated.emit(this.quillEditor),this.init=!0}))}),eo$1(()=>{let e=this.customToolbarPosition();this.toolbarPosition()!==e&&this.toolbarPosition.set(e)}),eo$1(()=>{let e=this.readOnly();this.init&&(e?this.quillEditor?.disable():this.quillEditor?.enable(!0))}),eo$1(()=>{let e=this.placeholder();this.init&&this.quillEditor&&(this.quillEditor.root.dataset.placeholder=e)}),eo$1(()=>{let e=this.styles();if(!this.init||!this.editorElem)return;let t=e,i=this.previousStyles;
1i&&Object.keys(i).forEach(s=>{this.renderer.removeStyle(this.editorElem,s)}),t&&Object.keys(t).forEach(s=>{this.renderer.setStyle(this.editorElem,s,t[s])})}),eo$1(()=>{let e=this.classes();if(!this.init||!this.quillEditor)return;let t=e,i=this.previousClasses;i&&this.removeClasses(i),t&&this.addClasses(t)}),eo$1(()=>{let e=this.debounceTime();!this.init||!this.quillEditor||e&&this.addQuillEventListeners()}),this.destroyRef.onDestroy(()=>{this.dispose(),this.quillSubscription?.unsubscribe(),this.quillSubscription=null})}static normalizeClassNames(e){return e.trim().split(` `).reduce((i,s)=>{let o=s.trim();return o&&i.push(o),i},[])}addClasses(e){r.normalizeClassNames(e).forEach(t=>{this.renderer.addClass(this.editorElem,t)})}removeClasses(e){r.normalizeClassNames(e).forEach(t=>{this.renderer.removeClass(this.editorElem,t)})}writeValue(e){if(this.filterNull()&&e===null||(this.content=e,!this.quillEditor))return;let t=v$2(this.format(),this.service.config.format),s=this.valueSetter()(this.quillEditor,e);if(this.compareValues()){let o=this.quillEditor.getContents();if(JSON.stringify(o)===JSON.stringify(s))return}if(e){t===`text`?this.quillEditor.setText(e):this.quillEditor.setContents(s);return}this.quillEditor.setText(``)}setDisabledState(e=this.disabled){this.disabled=e,this.quillEditor&&(e?(this.quillEditor.disable(),this.renderer.setAttribute(this.elementRef.nativeElement,`disabled`,`disabled`)):(this.readOnly()||this.quillEditor.enable(),this.renderer.removeAttribute(this.elementRef.nativeElement,`disabled`)))}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}registerOnValidatorChange(e){this.onValidatorChanged=e}validate(){if(!this.quillEditor)return null;let e={},t=!0,i=this.quillEditor.getText(),s=this.trimOnValidation()?i.trim().length:i.length===1&&i.trim().length===0?0:i.length-1,o=this.quillEditor.getContents().ops,l=!!o&&o.length===1&&[`
2`,``].includes(o[0].insert?.toString()||``),a=this.minLength();a&&s&&s<a&&(e.minLengthError={given:s,minLength:a},t=!1);let d=this.maxLength();return d&&s>d&&(e.maxLengthError={given:s,maxLength:d},t=!1),this.required()&&!s&&l&&(e.requiredError={empty:!0},t=!1),t?null:e}addQuillEventListeners(){this.dispose(),this.eventsSubscription=new W$2,this.eventsSubscription.add(ga$2(this.quillEditor,`selection-change`).subscribe(([s,o,l])=>{this.selectionChangeHandler(s,o,l)}));let e=ga$2(this.quillEditor,`text-change`),t=ga$2(this.quillEditor,`editor-change`),i=this.debounceTime();typeof i==`number`&&(e=e.pipe(Ed$1(i)),t=t.pipe(Ed$1(i))),this.eventsSubscription.add(e.subscribe(([s,o,l])=>{this.textChangeHandler(s,o,l)})),this.eventsSubscription.add(t.subscribe(([s,o,l,a])=>{this.editorChangeHandler(s,o,l,a)}))}dispose(){this.eventsSubscription?.unsubscribe(),this.eventsSubscription=null}isEmptyValue(e){return e===`<p></p>`||e===`<div></div>`||e===`<p><br></p>`||e===`<div><br></div>`}getter(e,t){let i=null,s=t??v$2(this.format(),this.service.config.format);if(s===`html`){let o=e.getSemanticHTML();this.isEmptyValue(o)&&(o=this.defaultEmptyValue()),i=o}else if(s===`text`)i=e.getText();else if(s===`object`)i=e.getContents();else if(s===`json`)try{i=JSON.stringify(e.getContents())}catch(o){i=e.getText()}return i}eventCallbackFormats(){let e=v$2(this.format(),this.service.config.format),t=this.onlyFormatEventData()===!0,i=this.onlyFormatEventData()===`none`,s=null,o=null,l=null,a=null;if(i)return{format:e,onlyFormat:t,noFormat:i,text:s,object:l,json:a,html:o};let d=this.valueGetter()(this.quillEditor);return e===`text`?s=d:e===`html`?o=d:e===`object`?(l=d,a=JSON.stringify(d)):e===`json`&&(a=d,l=JSON.parse(d)),t?{format:e,onlyFormat:t,noFormat:i,text:s,json:a,html:o,object:l}:{format:e,onlyFormat:t,noFormat:i,text:e===`text`?s:this.getter(this.quillEditor,`text`),json:e===`json`?a:this.getter(this.quillEditor,`json`),html:e===`html`?o:this.getter(this.quillEditor,`html`),object:e===`object`?l:this.getter(this.quillEditor,`object`)}}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵdir=DT({type:r,inputs:{format:[1,`format`],theme:[1,`theme`],modules:[1,`modules`],debug:[1,`debug`],readOnly:[1,`readOnly`],placeholder:[1,`placeholder`],maxLength:[1,`maxLength`],minLength:[1,`minLength`],required:[1,`required`],formats:[1,`formats`],customToolbarPosition:[1,`customToolbarPosition`],sanitize:[1,`sanitize`],beforeRender:[1,`beforeRender`],styles:[1,`styles`],registry:[1,`registry`],bounds:[1,`bounds`],customOptions:[1,`customOptions`],customModules:[1,`customModules`],trackChanges:[1,`trackChanges`],classes:[1,`classes`],trimOnValidation:[1,`trimOnValidation`],linkPlaceholder:[1,`linkPlaceholder`],compareValues:[1,`compareValues`],filterNull:[1,`filterNull`],debounceTime:[1,`debounceTime`],onlyFormatEventData:[1,`onlyFormatEventData`],defaultEmptyValue:[1,`defaultEmptyValue`],valueGetter:[1,`valueGetter`],valueSetter:[1,`valueSetter`]},outputs:{onEditorCreated:`onEditorCreated`,onEditorChanged:`onEditorChanged`,onContentChanged:`onContentChanged`,onSelectionChanged:`onSelectionChanged`,onFocus:`onF
2ocus`,onBlur:`onBlur`,onNativeFocus:`onNativeFocus`,onNativeBlur:`onNativeBlur`}})}}return r})();var Ge$3=(()=>{class r extends ce$4{static{this.ɵfac=(()=>{let e;return function(i){return(e||(e=qE(r)))(i||r)}})()}static{this.ɵcmp=yT({type:r,selectors:[[`quill-editor`]],features:[Y_$1([{multi:!0,provide:D$6,useExisting:Ii(()=>r)},{multi:!0,provide:y$4,useExisting:Ii(()=>r)}]),Im$1],ngContentSelectors:de$5,decls:5,vars:2,consts:[[`quill-editor-element`,``]],template:function(t,i){t&1&&(a_$1(ae$3),DC(0,he$5,1,0,`div`,0),c_$1(1),c_$1(2,1),c_$1(3,2),DC(4,ue$5,1,0,`div`,0)),t&2&&(bC(i.toolbarPosition()!==`top`?0:-1),xb(4),bC(i.toolbarPosition()===`top`?4:-1))},styles:[`[_nghost-%COMP%]{display:inline-block}`]})}}return r})();var Qe$4=(()=>{class r{constructor(){this.format=TB(),this.theme=TB(),this.modules=TB(),this.debug=TB(!1),this.formats=TB(),this.sanitize=TB(),this.beforeRender=TB(),this.strict=TB(!0),this.content=TB(),this.customModules=TB([]),this.customOptions=TB([]),this.onEditorCreated=new ht$3,this.init=!1,this.elementRef=E$2(wo$2),this.renderer=E$2(fl$2),this.service=E$2(re$2),this.sanitizer=E$2(te$7),this.platformId=E$2(aE),this.destroyRef=E$2(te$5),this.valueSetter=(e,t)=>{let i=v$2(this.format(),this.service.config.format),s=t;if(i===`text`)e.setText(s);else{if(i===`html`)(typeof this.sanitize()==`boolean`?this.sanitize():this.service.config.sanitize)&&(t=this.sanitizer.sanitize(j$3.HTML,t)),s=e.clipboard.convert({html:t});else if(i===`json`)try{s=JSON.parse(t)}catch(o){s=[{insert:t}]}e.setContents(s)}},ag(()=>{if(nr$2(this.platformId))return;let e=this.service.getQuill().pipe(Re$4(t=>this.service.beforeRender(t,this.customModules(),this.beforeRender()))).subscribe(t=>{let i=Object.assign({},this.modules()||this.service.config.modules);i.toolbar=!1,this.customOptions().forEach(a=>{let d=t.import(a.import);d.whitelist=a.whitelist,t.register(d,!0)});let s=this.debug();!s&&s!==!1&&this.service.config.debug&&(s=this.service.config.debug);let o=this.formats();o===void 0&&(o=this.service.config.formats?[...this.service.config.formats]:this.service.config.formats===null?null:void 0);let l=this.theme()||(this.service.config.theme?this.service.config.theme:`snow`);if(this.editorElem=this.elementRef.nativeElement.querySelector(`[quill-view-element]`),this.quillEditor=new t(this.editorElem,{debug:s,formats:o,modules:i,readOnly:!0,strict:this.strict(),theme:l}),this.renderer.addClass(this.editorElem,`ngx-quill-view`),this.content()&&this.valueSetter(this.quillEditor,this.content()),!this.onEditorCreated.observed){this.init=!0;return}this.onEditorCreated.emit(this.quillEditor),this.init=!0});this.destroyRef.onDestroy(()=>e.unsubscribe())}),eo$1(()=>{let e=this.content();!this.quillEditor||!this.init||e&&this.valueSetter(this.quillEditor,e)})}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵcmp=yT({type:r,selectors:[[`quill-view`]],inputs:{format:[1,`format`],theme:[1,`theme`],modules:[1,`modules`],debug:[1,`debug`],formats:[1,`formats`],sanitize:[1,`sanitize`],beforeRender:[1,`beforeRender`],strict:[1,`strict`],content:[1,`content`],customModules:[1,`customModules`],customOptions:[1,`customOptions`]},outputs:{onEditorCreated:`onEditorCreated`},decls:1,vars:0,consts:[[`quill-view-element`,``]],template:function(t,i){t&1&&Bm$1(0,`div`,0)},styles:[`.ql-container.ngx-quill-view{border:0}
3`],encapsulation:2})}}return r})();var I$2=(()=>{class r extends Pr$2{constructor(){super(...arguments),this.title=E$2(Zt$1),this.translocoService=E$2(De$3)}updateTitle(t){let i=this.buildTitle(t);if(i){this.setFormattedTitle(i);return}let e=this.getDeepestRoute(t.root),o=e.data.titleField;if(o){let a=e.data.titleProp||`name`,u=e.data.titleSuffix||``,l=this.findInRouteTree(e,o);if(l?.[a]){this.title.setTitle(`${l[a]}${u}`);return}}this.title.setTitle(`Kavita`)}setFormattedTitle(t){t.startsWith(`title.`)&&(t=this.translocoService.translate(t)),this.title.setTitle(`${t} (Kavita)`)}setTranslatedTitle(t,i){this.title.setTitle(`${this.translocoService.translate(t,i)} (Kavita)`)}getDeepestRoute(t){for(;t.firstChild;)t=t.firstChild;return t}findInRouteTree(t,i){let e=t;for(;e;){if(e.data[i])return e.data[i];e=e.parent}return null}static{this.ɵfac=(()=>{let t;return function(e){return(t||(t=qE(r)))(e||r)}})()}static{this.ɵprov=J$6({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();var P$6=(()=>{class e{transform(a){switch(a){case i$2.AniList:return`AniList`;case i$2.Mal:return`MAL`;case i$2.Kavita:return`Kavita`;case i$2.Cbr:return`Comicbook Roundup`;case i$2.Hardcover:return`Hardcover`;case i$2.MangaBaka:return`MangaBaka`}}static{this.ɵfac=function(r){return new(r||e)}}static{this.ɵpipe=bT({name:`scrobbleProviderName`,type:e,pure:!0})}}return e})();var B$3=(()=>{class e{constructor(){this.provider=TB.required(),this.classes=TB(``),this.size=TB(32),this.tooltip=TB(!1)}static{this.ɵfac=function(r){return new(r||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`app-scrobble-provider-image`]],inputs:{provider:[1,`provider`],classes:[1,`classes`],size:[1,`size`],tooltip:[1,`tooltip`]},decls:5,vars:11,consts:[[3,`ngSrc`,`alt`,`width`,`height`,`ngbTooltip`]],template:function(r,o){if(r&1&&(By(0),rM(1,`scrobbleProviderName`),By(2),rM(3,`providerImage`),Hm$1(4,`img`,0)),r&2){let c=iM(1,7,o.provider()),M=iM(3,9,o.provider());xb(4),N_$1(`flex-shrink-0 `+o.classes()),Vm$1(`ngSrc`,M)(`alt`,c)(`width`,o.size())(`height`,o.size())(`ngbTooltip`,o.tooltip()?c:``)}},dependencies:[rr$2,Y$4,P$6,c$3],encapsulation:2})}}return e})();function Oe$2(){return typeof window<`u`?window.navigator:void 0}function Ie$4(s){return!!(s.parentElement&&s.parentElement.nodeName.toLowerCase()===`picture`)}function b$5(s){return s.nodeName.toLowerCase()===`img`}function Se$4(s,t,e){return b$5(s)?e&&`srcset`in s?s.srcset=t:s.src=t:s.style.backgroundImage=`url('${t}')`,s}function U$7(s){return t=>{let e=t.parentElement.getElementsByTagName(`source`);for(let r=0;r<e.length;r++){let i=e[r].getAttribute(s);i&&(`srcset`in e[r]?e[r].srcset=i:e[r].src=i)}}}var Ue$3=U$7(`defaultImage`);var Ce$2=U$7(`lazyLoad`);var Ke$4=U$7(`errorImage`);function K$3(s){return(t,e,r)=>{b$5(t)&&Ie$4(t)&&s(t),e&&Se$4(t,e,r)}}var Ne$4=K$3(Ue$3);var Ee$3=K$3(Ce$2);var ze$2=K$3(Ke$4);var M$2=class{constructor(){this.navigator=Oe$2()}setPlatformId(t){this.platformId=t}onDestroy(t){}onAttributeChange(t){}};var p$6={loaded:`ng-lazyloaded`,loading:`ng-lazyloading`,failed:`ng-failed-lazyloaded`};function ye$3(s,t){s.className=s.className.replace(t,``)}function w$3(s,t){s.className.includes(t)||(s.className+=` ${t}`)}function je$3(s,t){return s.className&&s.className.includes(t)}var D$4=class extends M$2{setup(t){Ne$4(t.element,t.defaultImagePath,t.useSrcset),t.imagePath&&w$3(t.element,p$6.loading),je$3
3(t.element,p$6.loaded)&&ye$3(t.element,p$6.loaded)}finally(t){w$3(t.element,p$6.loaded),ye$3(t.element,p$6.loading)}loadImage(t){if(this.skipLazyLoading(t))return[t.imagePath];let{element:e,useSrcset:r,imagePath:i,decode:n}=t,o;return b$5(e)&&Ie$4(e)?(o=e.parentNode.cloneNode(!0).getElementsByTagName(`img`)[0],Ce$2(o),Se$4(o,i,r)):(o=new Image,b$5(e)&&e.referrerPolicy&&(o.referrerPolicy=e.referrerPolicy),b$5(e)&&e.sizes&&(o.sizes=e.sizes),r&&`srcset`in o?o.srcset=i:o.src=i),n&&o.decode?o.decode().then(()=>i):new Promise((a,h)=>{o.onload=()=>a(i),o.onerror=()=>h(null)})}setErrorImage(t,e){let{element:r,useSrcset:i,errorImagePath:n}=e;ze$2(r,n,i),w$3(r,p$6.failed)}setLoadedImage(t,e){let{element:r,useSrcset:i}=e;Ee$3(r,t,i)}isDisabled(){return nr$2(this.platformId)&&!this.isBot()}skipLazyLoading(t){return this.isBot(t)}isBot(t){return this.navigator?.userAgent?/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):!1}};var O$5=class extends D$4{constructor(){super(...arguments),this.observers=new WeakMap,this.intersectionSubject=ne
3w le$4,this.uniqKey={}}getObservable(t){if(this.skipLazyLoading(t))return la$2({isIntersecting:!0});if(t.customObservable)return t.customObservable;let e=t.scrollContainer||this.uniqKey,r={root:t.scrollContainer||null};t.offset&&(r.rootMargin=`${t.offset}px`);let i=this.observers.get(e);return i||(i=new IntersectionObserver(n=>this.loadingCallback(n),r),this.observers.set(e,i)),i.observe(t.element),M$3.create(n=>{let o=this.intersectionSubject.pipe(We$5(a=>a.target===t.element)).subscribe(n);return()=>{o.unsubscribe(),i.unobserve(t.element)}})}isVisible(t){return t.isIntersecting}loadingCallback(t){t.forEach(e=>this.intersectionSubject.next(e))}};function Pe$3(s,t){return e=>e.pipe(xd$1(r=>t.onStateChange.emit({reason:`observer-emit`,data:r})),We$5(r=>s.isVisible(r,t)),lt$3(1),xd$1(()=>t.onStateChange.emit({reason:`start-loading`})),Re$4(()=>s.loadImage(t)),xd$1(()=>t.onStateChange.emit({reason:`mount-image`})),xd$1(r=>s.setLoadedImage(r,t)),xd$1(()=>t.onStateChange.emit({reason:`loading-succeeded`})),qe$2(()=>!0),ua$2(r=>(t.onStateChange.emit({reason:`loading-failed`,data:r}),s.setErrorImage(r,t),la$2(!1))),xd$1(()=>{t.onStateChange.emit({reason:`finally`}),s.finally(t)}))}var ke$1=new x$4(`LazyLoadImageHooks`);var Le$2=(()=>{class s{constructor(e,r,i,n){this.onStateChange=new ht$3,this.elementRef=e,this.ngZone=r,this.propertyChanges$=new zt$2,this.hooks=n,this.hooks.setPlatformId(i),this.uid=Math.random().toString(36).substr(2,9)}ngOnChanges(){this.debug===!0&&!this.debugSubscription&&(this.debugSubscription=this.onStateChange.subscribe(e=>console.log(e))),this.propertyChanges$.next({element:this.elementRef.nativeElement,imagePath:this.lazyImage,defaultImagePath:this.defaultImage,errorImagePath:this.errorImage,useSrcset:this.useSrcset,offset:this.offset?this.offset|0:0,scrollContainer:this.scrollTarget,customObservable:this.customObservable,decode:this.decode,onStateChange:this.onStateChange,id:this.uid})}ngAfterContentInit(){if(this.hooks.isDisabled())return null;this.ngZone.runOutsideAngular(()=>{this.loadSubscription=this.propertyChanges$.pipe(xd$1(e=>this.hooks.onAttributeChange(e)),xd$1(e=>e.onStateChange.emit({reason:`setup`})),xd$1(e=>this.hooks.setup(e)),Sd$1(e=>e.imagePath?this.hooks.getObservable(e).pipe(Pe$3(this.hooks,e)):iI())).subscribe({next:()=>null})})}ngOnDestroy(){this.propertyChanges$.pipe(lt$3(1)).subscribe({next:e=>this.hooks.onDestroy(e)}).unsubscribe(),this.loadSubscription?.unsubscribe(),this.debugSubscription?.unsubscribe()}}return s.ɵfac=function(e){return new(e||s)(xo$2(wo$2),xo$2(U$8),xo$2(aE),xo$2(ke$1))},s.ɵdir=DT({type:s,selectors:[[``,`lazyLoad`,``]],inputs:{lazyImage:[0,`lazyLoad`,`lazyImage`],defaultImage:`defaultImage`,errorImage:`errorImage`,scrollTarget:`scrollTarget`,customObservable:`customObservable`,offset:`offset`,useSrcset:`useSrcset`,decode:`decode`,debug:`debug`},outputs:{onStateChange:`onStateChange`},standalone:!1,features:[CE]}),s})();var $e$4=(()=>{class s{}return s.ɵfac=function(e){return new(e||s)},s.ɵmod=gm$1({type:s}),s.ɵinj=Ua$2({providers:[{provide:ke$1,useClass:O$5}]}),s})();var C$4=class s{constructor(t,e,r,i){this.left=t,this.top=e,this.right=r,this.bottom=i}static fromElement(t){let{left:e,top:r,right:i,bottom:n}=t.getBoundingClientRect();return e===0&&r===0&&i===0&&n===0?s.empty:new s(e,r,i,n)}static fromWindow(t){return new s(0,0,t.innerWidth,t.innerHeight)}inflate(t){this.left-=t,this.top-=t,this.right+=t,this.bottom+=t}intersectsWith(t){return t.left<this.right&&this.left<t.right&&t.top<this.bottom&&this.top<t.bottom}getIntersectionWith(t){let e=Math.max(this.left,t.left),r=Math.max(this.top,t.top),i=Math.min(this.right,t.right),n=Math.min(this.bottom,t.bottom);return i>=e&&n>=r?new s(e,r,i,n):s.empty}};C$4.empty=new C$4(0,0,0,0);var c$1=(function(s){return s[s.Series=0]=`Series`,s[s.Volume=1]=`Volume`,s[s.VolumeBack=2]=`VolumeBack`,s[s.Chapter=3]=`Chapter`,s[s.Issue=4]=`Issue`,s[s.Banner=5]=`Banner`,s[s.Season=6]=`Season`,s[s.Audiobook=7]=`Audiobook`,s[s.Other=8]=`Other`,s})(c$1||{});var we$3=(()=>{class s{constructor(){this.accountService=E$2(yc$1),this.themeService=E$2(X$6),this.destroyRef=E$2(te$5),this.httpClient=E$2(ue$6),this.baseUrl=i$1.apiUrl,this.apiKey=this.accountService.currentUserImageAuthKey,this.encodedKey=it$3(()=>encodeURIComponent(this.apiKey())),this.placeholderImage=`assets/images/image-placeholder.dark-min.png`,this.errorImage=`assets/images/error-placeholder2.dark-min.png`,this.errorWebLinkImage=`assets/images/broken-white-32x32.png`,this.noPersonImage=`assets/images/error-person-missing.dark.min.png`,this.themeService.currentTheme$.pipe(JB(this.destroyRef)).subscribe(e=>{this.themeService.isDarkTheme()?(this.placeholderImage=`assets/images/image-placeholder.dark-min.png`,this.errorImage=`assets/images/error-placeholder2.dark-min.png`,this.errorWebLinkImage=`assets/images/broken-white-32x32.png`,this.noPersonImage=`assets/images/error-person-missing.dark.min.png`):(this.placeholderImage=`assets/images/image-placeholder-min.png`,this.errorImage=`assets/images/error-placeholder2-min.png`,this.errorWebLinkImage=`assets/images/broken-black-32x32.png`,this.noPersonImage=`assets/images/error-person-missing.min.png`)})}getEntityTypeFromUrl(e){if(e.indexOf(`?`)<0)return;let r=e.split(`?`)[1],i=r.indexOf(`=`);return r.substring(0,i).replace(`Id`,``)}getPersonImage(e){return`${this.baseUrl}
3image/person-cover?personId=${e}&apiKey=${this.encodedKey()}`}getUserCoverImage(e){return`${this.baseUrl}image/user-cover?userId=${e}&apiKey=${this.encodedKey()}`}getLibraryCoverImage(e){return`${this.baseUrl}image/library-cover?libraryId=${e}&apiKey=${this.encodedKey()}`}getVolumeCoverImage(e){return`${this.baseUrl}image/volume-cover?volumeId=${e}&apiKey=${this.encodedKey()}`}getSeriesCoverImage(e){return`${this.baseUrl}image/series-cover?seriesId=${e}&apiKey=${this.encodedKey()}`}getCollectionCoverImage(e){return`${this.baseUrl}image/collection-cover?collectionTagId=${e}&apiKey=${this.encodedKey()}`}getReadingListCoverImage(e){return`${this.baseUrl}image/readinglist-cover?readingListId=${e}&apiKey=${this.encodedKey()}`}getChapterCoverImage(e){return`${this.baseUrl}image/chapter-cover?chapterId=${e}&apiKey=${this.encodedKey()}`}getBookmarkedImage(e,r,i=0){return`${this.baseUrl}image/bookmark?chapterId=${e}&apiKey=${this.encodedKey()}&pageNum=${r}&imageOffset=${i}`}getWebLinkImage(e){return`${this.baseUrl}image/web-link?url=${encodeURIComponent(e)}&apiKey=${this.encodedKey()}`}getPublisherImage(e){return`${this.baseUrl}image/publisher?publisherName=${encodeURIComponent(e)}&apiKey=${this.encodedKey()}`}getCoverUploadImage(e){return`${this.baseUrl}image/cover-upload?filename=${encodeURIComponent(e)}&apiKey=${this.encodedKey()}`}getKavitaPlusSeriesCoverImages(e,r=null,i=null){let n=i===null?r==null?`series`:`volume`:`chapter`,o=r==null?``:`&volumeId=${r}`,a=i==null?``:`&chapterId=${i}`;return this.httpClient.get(`${this.baseUrl}image/external/${n}?seriesId=${e}${o}${a}`).pipe(qe$2(h=>h.filter(l=>[c$1.Volume,c$1.Chapter,c$1.Series,c$1.Issue].includes(l.type)).map(l=>{let Me=l.language?` (${l.language})`:``,u;switch(l.type){case c$1.Series:u=l.language??``;break;case c$1.Volume:u=Mt$4(`common.volume-num-shorthand`,{num:l.number});break;case c$1.Chapter:u=Mt$4(`common.chapter-num-shorthand`,{num:l.number});break;case c$1.Issue:u=Mt$4(`common.issue-hash-num`,{num:l.number});break;default:u=``}let De=l.type===c$1.Series?u:u+Me;return{url:l.url,title:De}})))}randomize(e){let r=Math.round(Math.random()*100+1);return e.indexOf(`&random`)>=0?e+1:e+`&random=`+r}static{this.ɵfac=function(r){return new(r||s)}}static{this.ɵprov=J$6({token:s,factory:s.ɵfac,providedIn:`root`})}}return s})();var Re$3=[`img`];var We$4=s=>({"object-fit":s});var yt$2=(()=>{class s{constructor(){this.destroyRef=E$2(te$5),this.imageService=E$2(we$3),this.renderer=E$2(fl$2),this.hubService=E$2(Ao$2),this.imageUrl=CB.required(),this.width=TB(``),this.height=TB(``),this.processEvents=TB(!0),this.classes=TB(``),this.styles=TB({}),this.errorImage=TB(this.imageService.errorImage),this.hideOnError=TB(!1),this.objectFit=TB(`fill`),this.imgElem=_B.required(`img`),this.errorLoad=wB(),this.hubService.messages$.pipe(JB(this.destroyRef)).subscribe(e=>{if(this.processEvents()&&e.event===c$2.CoverUpdate){let r=e.payload,i=this.imageUrl();if(i==null||i===``)return;let n=this.imageService.getEntityTypeFromUrl(i);if(n===r.entityType){let a=i.split(`?`)[1].split(`&`)[0].replace(n+`Id=`,``);a.includes(`&`)&&(a=a.split(`&`)[0]),a===r.id+``&&this.imageUrl.set(this.imageService.randomize(i))}}}),eo$1(()=>{let e=this.imgElem().nativeElement,r=this.width(),i=this.height(),n=this.styles(),o=this.classes();r!==``&&this.renderer.setStyle(e,`width`,r),i!==``&&this.renderer.setStyle(e,`height`,i);let a=Object.keys(n);a.length!==0&&a.forEach(h=>{this.renderer.setStyle(e,h,n[h],ls$1.Important)}),o!==``&&o.split(` `).forEach(l=>this.renderer.addClass(e,l))})}myCallbackFunction(e){let r=this.imgElem().nativeElement;switch(e.reason){case`setup`:break;case`observer-emit`:break;case`start-loading`:break;case`mount-image`:break;case`loading-succeeded`:this.renderer.addClass(r,`loaded`);break;case`loading-failed`:this.renderer.removeClass(r,`fade-in`),this.hideOnError()&&this.renderer.addClass(r,`d-none`),this.errorLoad.emit(this.imageUrl());break;case`finally`:break}}static{this.ɵfac=function(r){return new(r||s)}}static{this.ɵcmp=yT({type:s,selectors:[[`app-image`]],viewQuery:function(r,i){r&1&&vy(i.imgElem,Re$3,5),r&2&&f_$1()},inputs:{imageUrl:[1,`imageUrl`],width:[1,`width`],height:[1,`height`],processEvents:[1,`processEvents`],classes:[1,`classes`],styles:[1,`styles`],errorImage:[1,`errorImage`],hideOnError:[1,`hideOnError`],objectFit:[1,`objectFit`]},outputs:{imageUrl:`imageUrlChange`,errorLoad:`errorLoad`},decls:2,vars:6,consts:[[`img`,``],[`alt`,``,`aria-hidden`,`true`,1,`img-placeholder`,`fade-in`,3,`onStateChange`,`lazyLoad`,`errorImage`]],template:function(r,i){r&1&&(bs$1(0,`img`,1,0),fy(`onStateChange`,function(o){return i.myCallbackFunction(o)}),Mu()),r&2&&(__$1(J_$1(4,We$4,i.objectFit())),Vm$1(`lazyLoad`,i.imageUrl())(`errorImage`,i.errorImage()))},dependencies:[$e$4,Le$2],styles:[`img[_ngcontent-%COMP%]{width:100%;transition:opacity 1s}.fade-in[_ngcontent-%COMP%]{opacity:0;transition:opacity .3s ease-in-out}.fade-in.loaded[_ngcontent-%COMP%]{opacity:1}
4/*# sourceMappingURL=image.component-DTUQVIGI.css.map */`]})}}return s})();var E$1=e=>({owner:e});function F$4(e,C){if(e&1&&(j_$1(0),Hm$1(1,`app-image`,2),rM(2,`providerImage`),rM(3,`scrobbleProviderName`),rM(4,`scrobbleProviderName`)),e&2){let o=i_$1(2).$implicit,t=$_$1(1);Ou(` `,o(`collection-via-label`),` `),xb(),Vm$1(`imageUrl`,iM(2,4,t.source))(`
4ngbTooltip`,iM(3,6,t.source)),jm$1(`aria-label`,iM(4,8,t.source))}}function $$3(e,C){if(e&1&&(bs$1(0,`div`,1),j_$1(1),DC(2,F$4,5,10),Mu()),e&2){let o=i_$1().$implicit,t=$_$1(1),x=i_$1();xb(),Ou(` `,o(`collection-created-label`,J_$1(2,E$1,t.owner)),` `),xb(),bC(t.source!==x.ScrobbleProvider.Kavita?2:-1)}}function j$2(e,C){if(e&1&&(xu(0),By(1),DC(2,$$3,3,4,`div`,1),Gs$1()),e&2){let o=i_$1();xb(),B_$1(o.collection()),xb(),bC(o.accountService.currentUser()?2:-1)}}var V$4=(()=>{class e{constructor(){this.accountService=E$2(yc$1),this.ScrobbleProvider=i$2,this.collection=TB.required()}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`app-collection-owner`]],inputs:{collection:[1,`collection`]},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`fw-light`,`text-accent`],[`width`,`16px`,`height`,`16px`,3,`imageUrl`,`ngbTooltip`]],template:function(t,x){t&1&&Dm$1(0,j$2,3,2,`ng-container`,0),t&2&&Vm$1(`translocoPrefix`,`collection-owner`)},dependencies:[Ct$3,yt$2,Y$4,c$3,P$6],styles:[`.text-accent[_ngcontent-%COMP%]{font-size:small;color:var(--%NS%accent-text-color)}
5/*# sourceMappingURL=collection-owner.component-M35OW44S.css.map */`]})}}return e})();var g$2=class{constructor(){this.sortDisabled=!1,this.statementLimit=0,this.saveDisabled=!1,this.type=`series`,this.supportsSmartFilter=!1}};var P$5=class extends g$2{constructor(){super(...arguments),this.type=`series`,this.supportsSmartFilter=!0}};var C$3=class extends g$2{constructor(){super(...arguments),this.type=`person`}};var T$6=class extends g$2{constructor(){super(...arguments),this.type=`annotation`}};var v$1=class extends g$2{constructor(){super(...arguments),this.type=`readinglist`,this.supportsSmartFilter=!0}};var $$2=(()=>{class a{constructor(){this.translocoService=E$2(De$3)}transform(r,i){switch(i){case`annotation`:return this.getAnnotationSortFields(r);case`series`:return this.seriesSortFields(r);case`person`:return this.personSortFields(r);case`readinglist`:return this.readingListSortFields(r)}}getAnnotationSortFields(r){switch(r){case y$5.Color:return this.translocoService.translate(`sort-field-pipe.annotation-color`);case y$5.LastModified:return this.translocoService.translate(`sort-field-pipe.last-modified`);case y$5.Owner:return this.translocoService.translate(`sort-field-pipe.annotation-owner`);case y$5.Created:return this.translocoService.translate(`sort-field-pipe.created`)}}personSortFields(r){switch(r){case I$4.Name:return this.translocoService.translate(`sort-field-pipe.person-name`);case I$4.SeriesCount:return this.translocoService.translate(`sort-field-pipe.person-series-count`);case I$4.ChapterCount:return this.translocoService.translate(`sort-field-pipe.person-chapter-count`)}}readingListSortFields(r){switch(r){case O$6.ReleaseYearStart:return this.translocoService.translate(`sort-field-pipe.readinglist-releaseyear-start`);case O$6.ReleaseYearEnd:return this.translocoService.translate(`sort-field-pipe.readinglist-releaseyear-end`);case O$6.ItemCount:return this.translocoService.translate(`sort-field-pipe.readinglist-item-count`);case O$6.Title:return this.translocoService.translate(`sort-field-pipe.readinglist-title`)}}seriesSortFields(r){switch(r){case P$7.SortName:return this.translocoService.translate(`sort-field-pipe.sort-name`);case P$7.Created:return this.translocoService.translate(`sort-field-pipe.created`);case P$7.LastModified:return this.translocoService.translate(`sort-field-pipe.last-modified`);case P$7.LastChapterAdded:return this.translocoService.translate(`sort-field-pipe.last-chapter-added`);case P$7.TimeToRead:return this.translocoService.translate(`sort-field-pipe.time-to-read`);case P$7.ReleaseYear:return this.translocoService.translate(`sort-field-pipe.release-year`);case P$7.ReadProgress:return this.translocoService.translate(`sort-field-pipe.read-progress`);case P$7.AverageRating:return this.translocoService.translate(`sort-field-pipe.average-rating`);case P$7.Random:return this.translocoService.translate(`sort-field-pipe.random`);case P$7.UserRating:return this.translocoService.translate(`sort-field-pipe.user-rating`);case P$7.UnreadChapterCount:return this.translocoService.translate(`sort-field-pipe.unread-chapter-count`)}}static{this.ɵfac=function(i){return new(i||a)}}static{this.ɵpipe=bT({name:`sortField`,type:a,pure:!0})}}return a})();var V$3=(()=>
5{class a{transform(r,i){switch(i){case`annotation`:return this.annotationsFilterField(r);case`series`:return this.translateFilterField(r);case`person`:return this.translatePersonFilterField(r);case`readinglist`:return this.translateReadingListFilterField(r)}}annotationsFilterField(r){switch(r){case u$4.Likes:return Mt$4(`generic-filter-field-pipe.annotation-likes`);case u$4.LikedBy:return Mt$4(`generic-filter-field-pipe.annotation-liked-by`);case u$4.Selection:return Mt$4(`generic-filter-field-pipe.annotation-selection`);case u$4.Comment:return Mt$4(`generic-filter-field-pipe.annotation-comment`);case u$4.HighlightSlots:return Mt$4(`generic-filter-field-pipe.annotation-highlights`);case u$4.Owner:return Mt$4(`generic-filter-field-pipe.annotation-owner`);case u$4.Library:return Mt$4(`filter-field-pipe.libraries`);case u$4.Spoiler:return Mt$4(`generic-filter-field-pipe.annotation-spoiler`);case u$4.Series:return Mt$4(`generic-filter-field-pipe.series`)}}translatePersonFilterField(r){switch(r){case f$8.Role:return Mt$4(`generic-filter-field-pipe.person-role`);case f$8.Name:return Mt$4(`generic-filter-field-pipe.person-name`);case f$8.SeriesCount:return Mt$4(`generic-filter-field-pipe.person-series-count`);case f$8.ChapterCount:return Mt$4(`generic-filter-field-pipe.person-chapter-count`);case f$8.Library:return Mt$4(`generic-filter-field-pipe.person-library`)}}translateReadingListFilterField(r){switch(r){case m$3.Provider:return Mt$4(`generic-filter-field-pipe.readinglist-provider`);case m$3.Title:return Mt$4(`generic-filter-field-pipe.readinglist-title`);case m$3.ReleaseYear:return Mt$4(`generic-filter-field-pipe.readinglist-release-year`);case m$3.ItemCount:return Mt$4(`generic-filter-field-pipe.readinglist-item-count`);case m$3.Tags:return Mt$4(`generic-filter-field-pipe.readinglist-tags`);case m$3.Writer:return Mt$4(`generic-filter-field-pipe.readinglist-writer`);case m$3.Artist:return Mt$4(`generic-filter-field-pipe.readinglist-artist`);case m$3.MissingItemCount:return Mt$4(`generic-filter-field-pipe.readinglist-missing-item-count`)}}translateFilterField(r){switch(r){case n$2.AgeRating:return Mt$4(`filter-field-pipe.age-rating`);case n$2.Characters:return Mt$4(`filter-field-pipe.characters`);case n$2.CollectionTags:return Mt$4(`filter-field-pipe.collection-tags`);case n$2.Colorist:return Mt$4(`filter-field-pipe.colorist`);case n$2.CoverArtist:return Mt$4(`filter-field-pipe.cover-artist`);case n$2.Editor:return Mt$4(`filter-field-pipe.editor`);case n$2.Formats:return Mt$4(`filter-field-pipe.formats`);case n$2.Genres:return Mt$4(`filter-field-pipe.genres`);case n$2.Inker:return Mt$4(`filter-field-pipe.inker`);case n$2.Imprint:return Mt$4(`filter-field-pipe.imprint`);case n$2.Team:return Mt$4(`filter-field-pipe.team`);case n$2.Location:return Mt$4(`filter-field-pipe.location`);case n$2.Languages:return Mt$4(`filter-field-pipe.languages`);case n$2.Libraries:return Mt$4(`filter-field-pipe.libraries`);case n$2.Letterer:return Mt$4(`filter-field-pipe.letterer`);case n$2.PublicationStatus:return Mt$4(`filter-field-pipe.publication-status`);case n$2.Penciller:return Mt$4(`filter-field-pipe.penciller`);case n$2.Publisher:return Mt$4(`filter-field-pipe.publisher`);case n$2.ReadProgress:return Mt$4(`filter-field-pipe.read-progress`);case n$2.ReadTime:return Mt$4(`filter-field-pipe.read-time`);case n$2.ReleaseYear:return Mt$4(`filter-field-pipe.release-year`);case n$2.SeriesName:return Mt$4(`filter-field-pipe.series-name`);case n$2.Summary:return Mt$4(`filter-field-pipe.summary`);case n$2.Tags:return Mt$4(`filter-field-pipe.tags`);case n$2.Translators:return Mt$4(`filter-field-pipe.translators`);case n$2.UserRating:return Mt$4(`filter-field-pipe.user-rating`);case n$2.Writers:return Mt$4(`filter-field-pipe.writers`);case n$2.Path:return Mt$4(`filter-field-pipe.path`);case n$2.FilePath:return Mt$4(`filter-field-pipe.file-path`);case n$2.WantToRead:return Mt$4(`filter-field-pipe.want-to-read`);case n$2.ReadingDate:return Mt$4(`filter-field-pipe.read-date`);case n$2.ReadLast:return Mt$4(`filter-field-pipe.read-last`);case n$2.AverageRating:return Mt$4(`filter-field-pipe.average-rating`);case n$2.FileSize:return Mt$4(`filter-field-pipe.file-size`);case n$2.CollapseSeriesRelationships:return Mt$4(`filter-field-pipe.collapse-series-relationships`);default:throw new Error(`Invalid FilterField value: ${r}`)}}static{this.ɵfac=function(i){return new(i||a)}}static{this.ɵpipe=bT({name:`genericFilterField`,type:a,pure:!0})}}return a})();var De$2=(()=>{class a{constructor(){this.router=E$2(J$7),this.metadataService=E$2(Fe$3),this.http=E$2(ue$6),this.sortFieldPipe=new $$2,this.genericFilterFieldPipe=new V$3,this.apiUrl=i$1.apiUrl}encodeFilter(r){if(r===void 0)return la$2(``);
5let i=a.getApiRoutePrefixForEntityType(`filter/encode/`,r.entityType);return this.http.post(this.apiUrl+i,r,e$1)}decodeFilter(r){return this.http.post(this.apiUrl+`filter/decode`,{encodedFilter:r}).pipe(qe$2(i=>(i??(i=this.metadataService.createDefaultFilterDto(`series`),i.statements.push(this.metadataService.createDefaultFilterStatement(`series`))),i)))}updateUrlFromFilter(r){return this.encodeFilter(r).pipe(xd$1(i=>{window.history.replaceState(window.location.href,``,window.location.href.split(`?`)[0]+`?`+i)}))}applyFilter(r,i,u,p){let f=this.metadataService.createDefaultFilterDto(`series`);return f.statements.push(this.metadataService.createFilterStatement(i,u,p+``)),this.encodeFilter(f).pipe(Sd$1(S=>this.router.navigateByUrl(r.join(`/`)+`?`+S)))}applyFilterWithParams(r,i,u){return this.encodeFilter(i).pipe(Sd$1(p=>{let f=r.join(`/`)+`?`+p;return f+=Object.keys(u).map(S=>`&${S}=${u[S]}`).join(``),this.router.navigateByUrl(f,u)}))}static getApiRoutePrefixForEntityType(r,i){switch(i){case c$4.Series:r+=`series`;break;case c$4.ReadingList:r+=`reading-list`;break;case c$4.Person:r+=`person`;break;case c$4.Annotation:r+=`annotation`;break}return r}static getFilterLink(r,i){switch(i&&(i=`?`+i),r){case c$4.Series:return`all-series`+i;case c$4.ReadingList:return`lists`+i;case c$4.Person:return`browse/people`+i;case c$4.Annotation:return`browse/annotations`+i}}createPersonV2Filter(){return{entityType:c$4.Person,combination:L$4.And,statements:[],limitTo:0,sortOptions:{isAscending:!0,sortField:P$7.SortName}}}createReadingListV2Filter(){return{entityType:c$4.ReadingList,combination:L$4.And,statements:[],limitTo:0,sortOptions:{isAscending:!0,sortField:O$6.Title}}}getSortFields(r){switch(r){case`annotation`:return this.translateAndSort(r,this.sortFieldPipe,de$6);case`series`:return this.translateAndSort(r,this.sortFieldPipe,z$6);case`person`:return this.translateAndSort(r,this.sortFieldPipe,fe$7);case`readinglist`:return this.translateAndSort(r,this.sortFieldPipe,Pe$4)}}getFilterFields(r){switch(r){case`annotation`:return this.translateAndSort(r,this.genericFilterFieldPipe,be$4);case`series`:return this.translateAndSort(r,this.genericFilterFieldPipe,v$3);case`person`:return this.translateAndSort(r,this.genericFilterFieldPipe,he$6);case`readinglist`:return this.translateAndSort(r,this.genericFilterFieldPipe,ie$5)}}translateAndSort(r,i,u){return u.map(p=>({title:i.transform(p,r),value:p})).sort((p,f)=>p.title.localeCompare(f.title))}getDefaultFilterField(r){switch(r){case`annotation`:return u$4.Owner;case`series`:return n$2.SeriesName;case`person`:return f$8.Role;case`readinglist`:return m$3.Title}}getDropdownFields(r){switch(r){case`annotation`:return[u$4.Owner,u$4.Library,u$4.HighlightSlots,u$4.Series,u$4.LikedBy];case`series`:return[n$2.PublicationStatus,n$2.Languages,n$2.AgeRating,n$2.Translators,n$2.Characters,n$2.Publisher,n$2.Editor,n$2.CoverArtist,n$2.Letterer,n$2.Colorist,n$2.Inker,n$2.Penciller,n$2.Writers,n$2.Genres,n$2.Libraries,n$2.Formats,n$2.CollectionTags,n$2.Tags,n$2.Imprint,n$2.Team,n$2.Location];case`person`:return[f$8.Role,f$8.Library];case`readinglist`:return[m$3.Writer,m$3.Artist,m$3.Tags,m$3.Provider]}}getStringFields(r){switch(r){case`annotation`:return[u$4.Comment,u$4.Selection];case`series`:return[n$2.SeriesName,n$2.Summary,n$2.Path,n$2.FilePath,n$2.FileSize];case`person`:return[f$8.Name];case`readinglist`:return[m$3.Title]}}getNumberFields(r){switch(r){case`annotation`:return[u$4.Likes];case`series`:return[n$2.ReadTime,n$2.ReleaseYear,n$2.ReadProgress,n$2.UserRating,n$2.AverageRating,n$2.ReadLast];case`person`:return[f$8.ChapterCount,f$8.SeriesCount];case`readinglist`:return[m$3.ItemCount,m$3.MissingItemCount]}}getBooleanFields(r){switch(r){case`annotation`:return[u$4.Spoiler];case`series`:return[n$2.WantToRead,n$2.CollapseSeriesRelationships];case`person`:return[];case`readinglist`:return[]}}getDateFields(r){switch(r){case`annotation`:return[];case`series`:return[n$2.ReadingDate];case`person`:return[];case`readinglist`:return[]}}getNumberFieldsThatIncludeDateComparisons(r){switch(r){case`annotation`:return[];case`series`:return[n$2.ReleaseYear];case`person`:return[];case`readinglist`:return[m$3.ReleaseYear]}}getDropdownFieldsThatIncludeDateComparisons(r){switch(r){case`annotation`:return[];case`series`:return[n$2.AgeRating];case`person`:return[];case`readinglist`:return[]}}getDropdownFieldsWithoutMustContains(r){switch(r){case`annotation`:return[];case`series`:return[n$2.Libraries,n$2.Formats,n$2.AgeRating,n$2.PublicationStatus];case`person`:return[];case`readinglist`:return[m$3.Provider]}}getDropdownFieldsThatIncludeNumberComparisons(r){switch(r){case`annotation`:return[];case`series`:return[n$2.AgeRating];case`person`:return[];case`readinglist`:return[]}}getFieldsThatShouldIncludeIsEmpty(r){switch(r){case`annotation`:return[];case`series`:return[n$2.Summary,n$2.UserRating,n$2.Genres,n$2.CollectionTags,n$2.Tags,n$2.ReleaseYear,n$2.Translators,n$2.Characters,n$2.Publisher,n$2.Editor,n$2.CoverArtist,n$2.Letterer,n$2.Colorist,n$2.Inker,n$2.Penciller,n$2.Writers,n$2.Imprint,n$2.Team,n$2.Location];case`person`:return[];case`readinglist`:return[m$3.Tags]}}getFieldsThatShouldIncludeIsNotEmpty(r){return this.getFieldsThatShouldIncludeIsEmpty(r)}getDefaultSettings(r){switch(r){case`series`:return new P$5;case`person`:return new C$3;case`annotation`:return new T$6;case`readinglist`:return new v$1}}getCustomComparisons(r,i){switch(r){case`series`:if(i===n$2.FileSize)return[I$3.Equal,I$3.GreaterThan,I$3.GreaterThanEqual,I$3.LessThan,I$3.LessThanEqual];break;case`readinglist`:if(i===m$3.Provider)return[I$3.Equal,I$3.NotEqual];break}return null}static{this.ɵfac=function(i){return new(i||a)}}static{this.ɵprov=J$6({token:a,factory:a.ɵfac,providedIn:`root`})}}return a})();
5var m$2=(()=>{class t{constructor(){this.filterUtilitiesService=E$2(De$2)}resolve(l,i){return i.url.includes(`?`)?this.filterUtilitiesService.decodeFilter(i.url.split(`?`)[1]):la$2(null)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var s$2=(function(o){return o[o.Collections=1]=`Collections`,o[o.ReadingLists=2]=`ReadingLists`,o[o.Bookmarks=3]=`Bookmarks`,o[o.Library=4]=`Library`,o[o.SmartFilter=5]=`SmartFilter`,o[o.ExternalSource=6]=`ExternalSource`,o[o.AllSeries=7]=`AllSeries`,o[o.WantToRead=8]=`WantToRead`,o[o.BrowseAuthors=9]=`BrowseAuthors`,o})(s$2||{});var o$2=[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document;var t$2=()=>{let r=navigator.userAgent.toLowerCase();return(r.includes(`chrome`)||r.includes(`crios`)||r.includes(`chromium`)||r.includes(`edg/`)||r.includes(`opr/`)||r.includes(`samsungbrowser`))&&!r.includes(`firefox`)&&!r.includes(`safari`)||r.includes(`safari`)&&r.includes(`chrome`)};var e=()=>{let r=`ontouchstart`in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia(`(pointer: coarse)`).matches,i=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),n=window.innerWidth<=1024;return r&&(i||n)};var s$1=()=>t$2()&&e();var X$4=[`*`];var Y$2=(()=>{class n{constructor(){this._ngbConfig=E$2(Oo$2),this.backdrop=!0,this.keyboard=!0,this.position=`start`,this.scroll=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.ɵfac=function(e){return new(e||n)}}static{this.ɵprov=Mn({token:n,factory:n.ɵfac})}}return n})();var w$2=class{close(a){}dismiss(a){}};var S$4=class{get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(va$2(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(va$2(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._panelCmptRef.instance.shown.asObservable()}constructor(a,t,e,i){this._panelCmptRef=a,this._contentRef=t,this._backdropCmptRef=e,this._beforeDismiss=i,this._closed=new le$4,this._dismissed=new le$4,this._hidden=new le$4,a.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),e&&e.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,r)=>{this._resolve=s,this._reject=r}),this.result.then(null,()=>{})}close(a){this._panelCmptRef&&(this._closed.next(a),this._resolve(a),this._removeOffcanvasElements())}_dismiss(a){this._dismissed.next(a),this._reject(a),this._removeOffcanvasElements()}dismiss(a){if(this._panelCmptRef)if(!this._beforeDismiss)this._dismiss(a);else{let t=this._beforeDismiss();Rs$1(t)?t.then(e=>{e!==!1&&this._dismiss(a)},()=>{}):t!==!1&&this._dismiss(a)}}_removeOffcanvasElements(){let a=this._panelCmptRef.instance.hide(),t=this._backdropCmptRef?this._backdropCmptRef.instance.hide():la$2(void 0);a.subscribe(()=>{let{nativeElement:e}=this._panelCmptRef.location;e.parentNode.removeChild(e),this._panelCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._panelCmptRef=null,this._contentRef=null}),t.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:e}=this._backdropCmptRef.location;e.parentNode.removeChild(e),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),lI(a,t).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}};var T$5=(function(n){return n[n.BACKDROP_CLICK=0]=`BACKDROP_CLICK`,n[n.ESC=1]=`ESC`,n})(T$5||{});var ee$4=(()=>{class n{constructor(){this._nativeElement=E$2(wo$2).nativeElement,this._zone=E$2(U$8),this._injector=E$2(fe$6),this.dismissEvent=new ht$3}ngOnInit(){ag({mixedReadWrite:()=>ir$2(this._zone,this._nativeElement,(t,e)=>{e&&so$2(t),t.classList.add(`show`)},{animation:this.animation,runningTransition:`continue`})},{injector:this._injector})}hide(){return ir$2(this._zone,this._nativeElement,({classList:t})=>t.remove(`show`),{animation:this.animation,runningTransition:`stop`})}dismiss(){this.static||this.dismissEvent.emit(T$5.BACKDROP_CLICK)}static{this.ɵfac=function(e){return new(e||n)}}static{this.ɵcmp=yT({type:n,selectors:[[`ngb-offcanvas-backdrop`]],hostVars:6,hostBindings:function(e,i){e&1&&fy(`mousedown`,function(){return i.dismiss()}),e&2&&(N_$1(`offcanvas-backdrop`+(i.backdropClass?` `+i.backdropClass:``)),Ty(`show`,!i.animation)(`fade`,i.animation))},inputs:{animation:`animation`,backdropClass:`backdropClass`,static:`static`},outputs:{dismissEvent:`dismiss`},decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:1})}}return n})();var te$3=(()=>{class n{constructor(){this._document=E$2(Xr$2),this._elRef=E$2(wo$2),this._zone=E$2(U$8),this._injector=E$2(fe$6),this._closed$=new le$4,this._elWithFocus=null,this.keyboard=!0,this.position=`start`,this.dismissEvent=new ht$3,this.shown=new le$4,this.hidden=new le$4}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,ag({mixedReadWrite:()=>this._show()},{injector:this._injector})}ngOnDestroy(){this._disableEventHandling()}hide(){let t={animation:this.animation,runningTransition:`stop`},e=ir$2(this._zone,this._elRef.nativeElement,i=>(i.classList.remove(`showing`),i.classList.add(`hiding`),()=>i.classList.remove(`show`,`hiding`)),t);return e.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),e}_show(){let t={animation:this.animation,runningTransition:`continue`};ir$2(this._zone,this._elRef.nativeElement,(i,s)=>(s&&so$2(i),i.classList.add(`show`,`showing`),()=>i.classList.remove(`showing`)),t).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{ga$2(t,`keydown`).pipe(va$2(this._closed$),We$5(e=>e.key===`Escape`)).subscribe(e=>{this.keyboard&&requestAnimationFrame(()=>{e.defaultPrevented||this._zone.run(()=>this.dismiss(T$5.ESC))})})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){let e=t.querySelector(`[ngbAutofocus]`),i=xo$3(t)[0];(e||i||t).focus()}}_restoreFocus(){let t=this._document.body,e=this._elWithFocus,i;e&&e.focus&&t.contains(e)?i=e:i=t,this._zone.runOutsideAngular(()=>{setTimeout(()=>i.focus()),this._elWithFocus=null})}static{this.ɵfac=function(e){return new(e||n)}}static{this.ɵcmp=yT({type:n,selectors:[[`ngb-offcanvas-panel`]],hostAttrs:[`role`,`dialog`,`tabindex`,`-1`],hostVars:5,hostBindings:function(e,i){e&2&&(jm$1(`aria-modal`,!0)(`aria-labelledby`,i.ariaLabelledBy)(`aria-describedby`,i.ariaDescribedBy),N_$1(`offcanvas offcanvas-`+i.position+(i.panelClass?` `+i.panelClass:``)))},inputs:{animation:`animation`,ariaLabelledBy:`ariaLabelledBy`,ariaDescribedBy:`ariaDescribedBy`,keyboard:`keyboard`,panelClass:`panelClass`,position:`position`},outputs:{dismissEvent:`dismiss`},ngContentSelectors:X$4,decls:1,vars:0,template:function(e,i){e&1&&(a_$1(),c_$1(0))},encapsulation:2,changeDetection:1})}}return n})();var ie$4=(()=>{class n{constructor(){this._applicationRef=E$2(An),this._injector=E$2(fe$6),this._document=E$2(Xr$2),this._scrollBar=E$2(js$1),this._activePanelCmptHasChanged=new le$4,this._scrollBarRestoreFn=null,this._backdropAttributes=[`animation`,`backdropClass`],this._panelAttributes=[`animation`,`ariaDescribedBy`,`ariaLabelledBy`,`keyboard`,`panelClass`,`position`],this._activeInstance=new ht$3;let t=E$2(U$8);this._activePanelCmptHasChanged.subscribe(()=>{this._panelCmpt&&Ls$1(t,this._panelCmpt.location.nativeElement,this._activePanelCmptHasChanged)})}_restoreScrollBar(){let t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}
5_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,e,i){let s=i.container instanceof HTMLElement?i.container:Es$1(i.container)?this._document.querySelector(i.container):this._document.body;if(!s)throw new Error(`The specified offcanvas container "${i.container||`body`}" was not found in the DOM.`);i.scroll||this._hideScrollBar();let r=new w$2,p=this._getContentRef(i.injector||t,e,r),l=i.backdrop!==!1?this._attachBackdrop(s):void 0,_=this._attachWindowComponent(s,p.nodes),d=new S$4(_,p,l,i.beforeDismiss);return this._registerOffcanvasRef(d),this._registerPanelCmpt(_),d.hidden.pipe(bd$1(()=>this._restoreScrollBar())).subscribe(),r.close=y=>{d.close(y)},r.dismiss=y=>{d.dismiss(y)},this._applyPanelOptions(_.instance,i),l&&l.instance&&(this._applyBackdropOptions(l.instance,i),l.changeDetectorRef.detectChanges()),_.changeDetectorRef.detectChanges(),d}get activeInstance(){return this._activeInstance}dismiss(t){this._offcanvasRef?.dismiss(t)}hasOpenOffcanvas(){return!!this._offcanvasRef}_attachBackdrop(t){let e=jB(ee$4,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(e.hostView),t.appendChild(e.location.nativeElement),e}_attachWindowComponent(t,e){let i=jB(te$3,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:e});return this._applicationRef.attachView(i.hostView),t.appendChild(i.location.nativeElement),i}_applyPanelOptions(t,e){this._panelAttributes.forEach(i=>{Es$1(e[i])&&(t[i]=e[i])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(i=>{Es$1(e[i])&&(t[i]=e[i])}),t.static=e.backdrop===`static`}_getContentRef(t,e,i){return e?e instanceof mo$2?this._createFromTemplateRef(e,i):Os$1(e)?this._createFromString(e):this._createFromComponent(t,e,i):new Nt$2([])}_createFromTemplateRef(t,e){let i={$implicit:e,close(r){e.close(r)},dismiss(r){e.dismiss(r)}},s=t.createEmbeddedView(i);return this._applicationRef.attachView(s),new Nt$2([s.rootNodes],s)}_createFromString(t){return new Nt$2([[this._document.createTextNode(`${t}`)]])}_createFromComponent(t,e,i){let s=fe$6.create({providers:[{provide:w$2,useValue:i}],parent:t}),r=jB(e,{environmentInjector:this._applicationRef.injector,elementInjector:s}),p=r.location.nativeElement;return this._applicationRef.attachView(r.hostView),new Nt$2([[p]],r.hostView,r)}_registerOffcanvasRef(t){let e=()=>{this._offcanvasRef=void 0,this._activeInstance.emit(this._offcanvasRef)};this._offcanvasRef=t,this._activeInstance.emit(this._offcanvasRef),t.result.then(e,e)}_registerPanelCmpt(t){this._panelCmpt=t,this._activePanelCmptHasChanged.next(),t.onDestroy(()=>{this._panelCmpt=void 0,this._activePanelCmptHasChanged.next()})}static{this.ɵfac=function(e){return new(e||n)}}static{this.ɵprov=Mn({token:n,factory:n.ɵfac})}}return n})();var be$2=(()=>{class n{constructor(){this._injector=E$2(fe$6),this._offcanvasStack=E$2(ie$4),this._config=E$2(Y$2)}open(t,e={}){let i=w$4(x$3(w$4({},this._config),{animation:this._config.animation}),e);return this._offcanvasStack.open(this._injector,t,i)}get activeInstance(){return this._offcanvasStack.activeInstance}dismiss(t){this._offcanvasStack.dismiss(t)}hasOpenOffcanvas(){return this._offcanvasStack.hasOpenOffcanvas()}static{this.ɵfac=function(e){return new(e||n)}}static{this.ɵprov=Mn({token:n,factory:n.ɵfac})}}return n})();var h$2=(function(e){return e.Width=`width`,e.Height=`height`,e})(h$2||{});var L$3=(()=>{class e{constructor(){this.document=E$2(Xr$2),this.destroyRef=E$2(te$5),this.el=E$2(wo$2),this.minHeight=TB(20),this.maxHeight=TB(90),this.minWidth=TB(20),this.maxWidth=TB(90),this.interruptSelection=TB(!0),this.cancelEvents=TB(!0),this.resizeMode=TB.required(),this.canvasPosition=TB.required(),this.signMul=it$3(()=>this.canvasPosition()===`top`||this.canvasPosition()===`start`?-1:1),this.dragIndicatorClass=it$3(()=>this.resizeMode()===h$2.Height?`drag-indicator-horizontal`:`drag-indicator-vertical`),this.isDragging=!1,this.startDimensionsElement={height:0,width:0},this.startDimensionsClient={height:0,width:0},this.ResizeMode=h$2}startDrag(t){this.cancelEvents()&&t.preventDefault(),this.isDragging=!0,this.startDimensionsClient=this.getClientDimensions(t),this.startDimensionsElement=this.getElementDimensions(),this.interruptSelection()&&(document.body.style.userSelect=`none`)}ngOnInit(){this.canvasElement=this.document.querySelector(`.offcanvas-`+this.canvasPosition());rI(ga$2(this.document,`mousemove`),ga$2(this.document,`touchmove`)).pipe(JB(this.destroyRef),We$5(()=>this.isDragging),xd$1(r=>{this.cancelEvents()&&r.preventDefault()}),xd$1(r=>{let b=this.getClientDimensions(r),N=this.startDimensionsClient.height-b.height,R=this.startDimensionsClient.width-b.width,k=this.clampHeight(this.startDimensionsElement.height+this.signMul()*N),I=this.clampWidth(this.startDimensionsElement.width+this.signMul()*R);switch(this.resizeMode()){case h$2.Height:this.canvasElement.style.setProperty(`height`,`${k}px`,`important`);break;case h$2.Width:this.canvasElement.style.setProperty(`width`,`${I}px`,`important`);break}}
5)).subscribe();rI(ga$2(this.document,`mouseup`),ga$2(this.document,`touchend`),...s$1()?[ga$2(this.document,`touchcancel`),ga$2(this.document,`pointerup`)]:[]).pipe(JB(this.destroyRef),We$5(()=>this.isDragging),xd$1(()=>{this.isDragging=!1,this.interruptSelection()&&(document.body.style.userSelect=``)})).subscribe();rI(ga$2(this.el.nativeElement,`mousedown`),ga$2(this.el.nativeElement,`touchstart`)).pipe(JB(this.destroyRef),xd$1(r=>this.startDrag(r))).subscribe()}clampHeight(t){return Math.min(Math.max(t,this.minHeight()),this.maxHeight())}clampWidth(t){return Math.min(Math.max(t,this.minWidth()),this.maxWidth())}getClientDimensions(t){return{height:t instanceof MouseEvent?t.clientY:t.touches[0].clientY,width:t instanceof MouseEvent?t.clientX:t.touches[0].clientX}}getElementDimensions(){return{height:this.canvasElement.clientHeight,width:this.canvasElement.clientWidth}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`app-off-canvas-resize`]],inputs:{minHeight:[1,`minHeight`],maxHeight:[1,`maxHeight`],minWidth:[1,`minWidth`],maxWidth:[1,`maxWidth`],interruptSelection:[1,`interruptSelection`],cancelEvents:[1,`cancelEvents`],resizeMode:[1,`resizeMode`],canvasPosition:[1,`canvasPosition`]},decls:3,vars:4,template:function(n,s){n&1&&(Au(0),Nu(1,`div`),Bm$1(2,`div`),Su(),qm$1()),n&2&&(xb(),N_$1(`drag-handle-`+s.canvasPosition()),xb(),N_$1(s.dragIndicatorClass()))},styles:[`.drag-handle-bottom[_ngcontent-%COMP%], .drag-handle-top[_ngcontent-%COMP%]{position:sticky;width:100%;height:.75rem;cursor:row-resize;display:flex;justify-content:center;align-items:center;z-index:10;background:transparent;border:none}.drag-handle-bottom[_ngcontent-%COMP%]{top:0;margin-top:.125rem}.drag-handle-top[_ngcontent-%COMP%]{bottom:0;margin-bottom:.125rem}.drag-handle-start[_ngcontent-%COMP%], .drag-handle-end[_ngcontent-%COMP%]{top:50%;transform:translateY(-50%);width:.75rem;height:3.75rem;cursor:col-resize;display:flex;justify-content:center;align-items:center;z-index:10;background:transparent;border:none}.drag-handle-start[_ngcontent-%COMP%]{position:absolute;right:0}.drag-handle-end[_ngcontent-%COMP%]{position:absolute;left:0}.drag-indicator-horizontal[_ngcontent-%COMP%]{width:3.75rem;height:.5rem;background:var(--%NS%accent-bg-color);border-radius:.25rem;transition:background-color .2s}.drag-indicator-vertical[_ngcontent-%COMP%]{width:.5rem;height:2.5rem;background:var(--%NS%accent-bg-color);border-radius:.25rem;transition:background-color .2s}.drag-handle-bottom[_ngcontent-%COMP%]:hover   .drag-indicator-horizontal[_ngcontent-%COMP%], .drag-handle-top[_ngcontent-%COMP%]:hover   .drag-indicator-horizontal[_ngcontent-%COMP%], .drag-handle-start[_ngcontent-%COMP%]:hover   .drag-indicator-vertical[_ngcontent-%COMP%], .drag-handle-end[_ngcontent-%COMP%]:hover   .drag-indicator-vertical[_ngcontent-%COMP%]{background:#6c757d}
6/*# sourceMappingURL=off-canvas-resize.component-QVRPIIW2.css.map */`]})}}return e})();var G$5=(()=>{class e{constructor(){this.offcanvas=E$2(be$2)}open(t,n){let s=this.offcanvas.open(t,n);return s.setInput=(g,l)=>{s._contentRef.componentRef.setInput(g,l)},s}hasOpenOffcanvas(){return this.offcanvas.hasOpenOffcanvas()}dismiss(){this.offcanvas.dismiss()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵprov=J$6({token:e,factory:e.ɵfac,providedIn:`root`})}}return e})();function y$2(e,h){if(e&1&&(bs$1(0,`span`),Hm$1(1,`i`,1),bs$1(2,`span`,2),j_$1(3),Mu()()),e&2){let t=i_$1().$implicit;xb(),jm$1(`title`,t(`promoted`)),xb(2),Ly(t(`promoted`))}}function P$4(e,h){if(e&1&&(xu(0),DC(1,y$2,4,2,`span`),Gs$1()),e&2){let t=i_$1();xb(),bC(t.promoted()?1:-1)}}var E=(()=>{class e{constructor(){this.promoted=TB.required()}static{this.ɵfac=function(o){return new(o||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`app-promoted-icon`]],inputs:{promoted:[1,`promoted`]},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[`aria-hidden`,`true`,1,`fa`,`fa-angle-double-up`,`ms-1`],[1,`visually-hidden`]],template:function(o,D){o&1&&Dm$1(0,P$4,2,1,`ng-container`,0),o&2&&Vm$1(`translocoPrefix`,`promoted-icon`)},dependencies:[Ct$3],encapsulation:2})}}return e})();function Ot$1(r){return r.buttons===0||r.detail===0}function Lt$1(r){let e=r.touches&&r.touches[0]||r.changedTouches&&r.changedTouches[0];
vendor: 5,547 bytes, lines 6-20
6return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}function et$2(r){let e=r.cloneNode(!0),t=e.querySelectorAll(`[id]`),i=r.nodeName.toLowerCase();e.removeAttribute(`id`);for(let s=0;s<t.length;s++)t[s].removeAttribute(`id`);return i===`canvas`?At$1(r,e):(i===`input`||i===`select`||i===`textarea`)&&Mt$2(r,e),Nt$1(`canvas`,r,e,At$1),Nt$1(`input, textarea, select`,r,e,Mt$2),e}function Nt$1(r,e,t,i){let s=e.querySelectorAll(r);if(s.length){let n=t.querySelectorAll(r);for(let o=0;o<s.length;o++)i(s[o],n[o])}}var oe$1=0;function Mt$2(r,e){e.type!==`file`&&(e.value=r.value),e.type===`radio`&&e.name&&(e.name=`mat-clone-${e.name}-${oe$1++}`)}function At$1(r,e){let t=e.getContext(`2d`);if(t)try{t.drawImage(r,0,0)}catch(i){}}function lt$2(r){let e=r.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function it$2(r,e,t){let{top:i,bottom:s,left:n,right:o}=r;return t>=i&&t<=s&&e>=n&&e<=o}function ae$2(r,e){let t=e.left<r.left,i=e.left+e.width>r.right,s=e.top<r.top,n=e.top+e.height>r.bottom;return t||i||s||n}function C$2(r,e,t){r.top+=e,r.bottom=r.top+r.height,r.left+=t,r.right=r.left+r.width}function Ft$1(r,e,t,i){let{top:s,right:n,bottom:o,left:a,width:l,height:h}=r,c=l*e,g=h*e;return i>s-g&&i<o+g&&t>a-c&&t<n+c}var F$3=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:lt$2(t)})})}handleScroll(e){let t=Et$2(e),i=this.positions.get(t);if(!i)return null;let s=i.scrollPosition,n,o;if(t===this._document){let h=this.getViewportScrollPosition();n=h.top,o=h.left}else n=t.scrollTop,o=t.scrollLeft;let a=s.top-n,l=s.left-o;return this.positions.forEach((h,c)=>{h.clientRect&&t!==c&&t.contains(c)&&C$2(h.clientRect,a,l)}),s.top=n,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Yt$1(r,e){let t=r.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let i=e.createElement(`div`);return t.forEach(s=>i.appendChild(s)),i}function ht$2(r,e,t){for(let i in e)if(e.hasOwnProperty(i)){let s=e[i];s?r.setProperty(i,s,t?.has(i)?`important`:``):r.removeProperty(i)}return r}function S$3(r,e){let t=e?``:`none`;ht$2(r.style,{"touch-action":e?``:`none`,"-webkit-user-drag":e?``:`none`,"-webkit-tap-highlight-color":e?``:`transparent`,"user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function Ht$1(r,e,t){ht$2(r.style,{position:e?``:`fixed`,top:e?``:`0`,opacity:e?``:`0`,left:e?``:`-999em`},t)}function H$2(r,e){return e&&e!=`none`?r+` `+e:r}function zt$1(r,e){r.style.width=`${e.width}px`,r.style.height=`${e.height}px`,r.style.transform=T$4(e.left,e.top)}function T$4(r,e){return`translate3d(${Math.round(r)}px, ${Math.round(e)}px, 0)`}var I$1={capture:!0};var Q$3={passive:!1,capture:!0};var le$3=(()=>{class r{static ɵfac=function(i){return new(i||r)};static ɵcmp=yT({type:r,selectors:[[`ng-component`]],hostAttrs:[`cdk-drag-resets-container`,``],decls:0,vars:0,template:function(i,s){},styles:[`@layer cdk-resets {
7  .cdk-drag-preview {
8    background: none;
9    border: none;
10    padding: 0;
11    color: inherit;
12    overflow: visible;
13    inset: auto;
14  }
15}
16.cdk-drag-placeholder *,
17.cdk-drag-preview * {
18  pointer-events: none !important;
19}
20`],encapsulation:2})}return r})();var V$2=(()=>{class r{_ngZone=E$2(U$8);_document=E$2(Xr$2);_styleLoader=E$2(re$3);_renderer=E$2(yo$2).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new le$4;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=be$3([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new le$4;pointerUp=new le$4;registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,`touchmove`,this._persistentTouchmoveListener,Q$3)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(le$3),this._activeDragInstances.update(s=>[...s,t]),this._activeDragInstances().length===1)){let s=i.type.startsWith(`touch`),n=a=>this.pointerUp.next(a),o=[[`scroll`,a=>this._scroll.next(a),I$1],[`selectstart`,this._preventDefaultWhileDragging,Q$3]];s?o.push([`touchend`,n,I$1],[`touchcancel`,n,I$1]):o.push([`mouseup`,n,I$1]),s||o.push([`mousemove`,a=>this.pointerMove.next(a),Q$3]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,h])=>this._renderer.listen(this._document,a,l,h))})}}stopDragging(t){this._activeDragInstances.update(i=>{let s=i.indexOf(t);return s>-1?(i.splice(s,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){let i=[this._scroll];return t&&t!==this._document&&i.push(new M$3(s=>this._ngZone.runOutsideAngular(()=>{let n=this._renderer.listen(t,`scroll`,o=>{this._activeDragInstances().length&&s.next(o)},I$1);return()=>{n()}}))),rI(...i)}
20registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i)}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t)}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault()};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0}static ɵfac=function(i){return new(i||r)};static ɵprov=Mn({token:r,factory:r.ɵfac})}return r})();function Vt$1(r){let e=r.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(r)*e}function he$4(r){let e=getComputedStyle(r),t=tt$2(e,`transition-property`),i=t.find(a=>a===`transform`||a===`all`);if(!i)return 0;let s=t.indexOf(i),n=tt$2(e,`transition-duration`),o=tt$2(e,`transition-delay`);return Vt$1(n[s])+Vt$1(o[s])}function tt$2(r,e){return r.getPropertyValue(e).split(`,`).map(i=>i.trim())}var ce$3=new Set([`position`]);var st$3=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(e,t,i,s,n,o,a,l,h,c){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=s,this._previewTemplate=n,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=h,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Bt$2(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return he$4(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,i=e?e.template:null,s;if(i&&e){let n=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),s=Yt$1(o,this._document),this._previewEmbeddedView=o,e.matchSize?zt$1(s,n):s.style.transform=T$4(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=et$2(this._rootElement),zt$1(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return ht$2(s.style,{"pointer-events":`none`,margin:Bt$2(s)?`0 auto 0 0`:`0`,position:`fixed`,top:`0`,left:`0`,"z-index":this._zIndex+``},ce$3),S$3(s,!1),s.classList.add(`cdk-drag-preview`),s.setAttribute(`popover`,`manual`),s.setAttribute(`dir`,this._direction),t&&(Array.isArray(t)?t.forEach(n=>s.classList.add(n)):s.classList.add(t)),s}};function Bt$2(r){return`showPopover`in r}var de$4={passive:!0};var Gt$1={passive:!1};var _e$3={passive:!1,capture:!0};var pe$2=800;var Wt$1=`cdk-drag-placeholder`;var Ut$2=new Set([`position`]);function ge$3(r,e,t={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let i=r.get(fl$2,null,{optional:!0})||r.get(yo$2).createRenderer(null,null);return new nt$1(e,t,r.get(Xr$2),r.get(U$8),r.get(ut$2),r.get(V$2),i)}var nt$1=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=be$3(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new le$4;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=W$2.EMPTY;_pointerUpSubscription=W$2.EMPTY;_scrollSubscription=W$2.EMPTY;_resizeSubscription=W$2.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction=`ltr`;_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEac
vendor: 14,083 bytes, line 20
20h(t=>S$3(t,e)))}_disabled=!1;beforeStarted=new le$4;started=new le$4;released=new le$4;ended=new le$4;entered=new le$4;exited=new le$4;dropped=new le$4;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,s,n,o,a){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=n,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new F$3(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>fi$1(i)),this._handles.forEach(i=>S$3(i,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=fi$1(e);if(t!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,`mousedown`,this._pointerDown,Gt$1),i.listen(t,`touchstart`,this._pointerDown,de$4),i.listen(t,`dragstart`,this._nativeDragStart,Gt$1)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<`u`&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?fi$1(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||``,this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&ae$2(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect(),i=0,s=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?s=e.top-t.top:t.bottom>e.bottom&&(s=e.bottom-t.bottom);let n=this._activeTransform.x,o=this._activeTransform.y,a=n+i,l=o+s;this._rootElement.style.transform=T$4(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),S$3(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),S$3(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){if(Math.abs(t.x-this._pickupPositionOnPage.x)+Math.abs(t.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),l=this._dropContainer;if(!a){this._endDragSequence(e);return}(!l||!l.isDragging()&&!l.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{let s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,n=this._activeTransform;n.x=i.x-s.x+this._passiveTransform.x,n.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(n.x,n.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){x$2(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,`selectstart`,ue$4,_e$3)}),i){let s=this._rootElement,n=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment(``);n.insertBefore(a,s),this._initialTransform=s.style.transform||``,this._preview=new st$3(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(n,t)),Ht$1(s,!1,Ut$2),this._document.body.appendChild(n.replaceChild(o,s)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let i=this.isDragging(),s=x$2(t),n=!s&&t.button!==0,o=this._rootElement,a=Et$2(t),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+pe$2>Date.now(),h=s?Lt$1(t):Ot$1(t);if(a&&a.draggable&&t.type===`mousedown`&&t.preventDefault(),i||n||l||h)return;if(this._handles.length){let v=o.style;this._rootElementTapHighlight=v.webkitTapHighlightColor||``,v.webkitTapHighlightColor=`transparent`}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(v=>this._updateOnScroll(v)),this._boundaryElement&&(this._boundaryRect=lt$2(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let g=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:g.x,y:g.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Ht$1(this._rootElement,!0,Ut$2),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(e),n=this._getDragDistance(s),o=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:n,dropPoint:s,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:n,dropPoint:s,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,o,n,s,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:s}){let n=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!n&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(n=this._initialContainer),n&&n!==this._dropContainer&&this._ngZone.run(()=>{let o=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(o+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(n,this._dropContainer,a),this._dropContainer=n,this._dropContainer.enter(this,e,t,n===this._initialContainer&&n.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:n,currentIndex:n.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass(`cdk-drag-animating`),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let s=a=>{(!a||this._preview&&Et$2(a)===this._preview.element&&a.propertyName===`transform`)&&(o(),i(),clearTimeout(n))},n=setTimeout(s,t*1.5),o=this._preview.addEventListener(`transitionend`,s)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=Yt$1(this._placeholderRef,this._document)):i=et$2(this._rootElement),i.style.pointerEvents=`none`,i.classList.add(Wt$1),i}_getPointerPositionInElement(e,t,i){let s=t===this._rootElement?null:t,n=s?s.getBoundingClientRect():e,o=x$2(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-n.left-a.left,h=o.pageY-n.top-a.top;return{x:n.left-e.left+l,y:n.top-e.top+h}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),i=x$2(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,s=i.pageX-t.left,n=i.pageY-t.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=n,a.matrixTransform(o.inverse())}}return{x:s,y:n}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:s}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis===`x`||t===`x`?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis===`y`||t===`y`)&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:n,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:h}=this._getPreviewRect(),c=a.top+o,g=a.bottom-(h-o),v=a.left+n,B=a.right-(l-n);i=Zt(i,v,B),s=Zt(s,c,g)}return{x:i,y:s}}_updatePointerDirectionDelta(e){let{x:t,y:i}=e,s=this._pointerDirectionDelta,n=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-n.x),a=Math.abs(i-n.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=t>n.x?1:-1,n.x=t),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>n.y?1:-1,n.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,S$3(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e
vendor: 3,945 bytes, line 20
20=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let i=1/this.scale,s=T$4(e*i,t*i),n=this._rootElement.style;this._initialTransform??=n.transform&&n.transform!=`none`?n.transform:``,n.transform=H$2(s,this._initialTransform)}_applyPreviewTransform(e,t){let i=this._previewTemplate?.template?void 0:this._initialTransform,s=T$4(e,t);this._preview.setTransform(H$2(s,i))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(s.width===0&&s.height===0||i.width===0&&i.height===0)return;let n=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(n>0&&(e+=n),o>0&&(e-=o)):e=0,s.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t==`number`?t:x$2(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let i=Et$2(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&C$2(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=qn$1(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let i=this._previewContainer||`global`;if(i===`parent`)return e;if(i===`global`){let s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return fi$1(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}_conditionallyInsertAnchor(e,t,i){if(e===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){let s=this._anchor??=et$2(this._placeholder);s.classList.remove(Wt$1),s.classList.add(`cdk-drag-anchor`),s.style.transform=``,i?i.before(s):fi$1(t.element).appendChild(s)}}};function Zt(r,e,t){return Math.max(e,Math.min(t,r))}function x$2(r){return r.type[0]===`t`}function ue$4(r){r.preventDefault()}function jt$1(r,e,t){let i=qt$1(e,r.length-1),s=qt$1(t,r.length-1);if(i===s)return;let n=r[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)r[a]=r[a+o];r[s]=n}function qt$1(r,e){return Math.max(0,Math.min(e,r))}var z$3=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation=`vertical`;direction=`ltr`;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,i,s){let n=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,t,i,s);if(o===-1&&n.length>0)return null;let a=this.orientation===`horizontal`,l=n.findIndex(u=>u.drag===e),h=n[o],c=n[l].clientRect,g=h.clientRect,v=l>o?1:-1,B=this._getItemOffsetPx(c,g,v),se=this._getSiblingOffsetPx(l,n,v),ne=n.slice();
vendor: 15,455 bytes, line 20
20return jt$1(n,l,o),n.forEach((u,re)=>{if(ne[re]===u)return;let ct=u.drag===e,G=ct?B:se,dt=ct?e.getPlaceholderElement():u.drag.getRootElement();u.offset+=G;let _t=Math.round(u.offset*(1/u.drag.scale));a?(dt.style.transform=H$2(`translate3d(${_t}px, 0, 0)`,u.initialTransform),C$2(u.clientRect,0,G)):(dt.style.transform=H$2(`translate3d(0, ${_t}px, 0)`,u.initialTransform),C$2(u.clientRect,G,0))}),this._previousSwap.overlaps=it$2(g,t,i),this._previousSwap.drag=h.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(e,t,i,s){let n=this._activeDraggables,o=n.indexOf(e),a=e.getPlaceholderElement();o>-1&&n.splice(o,1);let l=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s,h=n[l];if(h===e&&(h=n[l+1]),!h&&(l==null||l===-1||l<n.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(h=n[0]),h&&!this._dragDropRegistry.isDragging(h)){let c=h.getRootElement();c.parentElement.insertBefore(a,c),n.splice(l,0,e)}else this._element.appendChild(a),n.push(e);a.style.transform=``,this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let i=this._itemPositions.find(s=>s.drag===e)?.initialTransform;t.style.transform=i||``}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return this._getVisualItemPositions().findIndex(t=>t.drag===e)}getItemAtIndex(e){return this._getVisualItemPositions()[e]?.drag||null}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{C$2(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation===`horizontal`;this._itemPositions=this._activeDraggables.map(t=>{let i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||``,clientRect:lt$2(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return this.orientation===`horizontal`&&this.direction===`rtl`?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(e,t,i){let s=this.orientation===`horizontal`,n=s?t.left-e.left:t.top-e.top;return i===-1&&(n+=s?t.width-e.width:t.height-e.height),n}_getSiblingOffsetPx(e,t,i){let s=this.orientation===`horizontal`,n=t[e].clientRect,o=t[e+i*-1],a=n[s?`width`:`height`]*i;if(o){let l=s?`left`:`top`,h=s?`right`:`bottom`;i===-1?a-=o.clientRect[l]-n[h]:a+=n[l]-o.clientRect[h]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,s=this.orientation===`horizontal`;if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return s?e>=o.right:t>=o.bottom}else{let o=i[0].clientRect;return s?e<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(e,t,i,s){let n=this.orientation===`horizontal`,o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(s){let h=n?s.x:s.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&h===this._previousSwap.delta)return!1}return n?t>=Math.floor(l.left)&&t<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,e)?-1:o}};var rt$2=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){let s=t[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(e)}sort(e,t,i,s){let n=this._getItemIndexFromPointerPosition(e,t,i),o=this._previousSwap;if(n===-1||this._activeItems[n]===e)return null;let a=this._activeItems[n];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;let l=this.getItemIndex(e),h=e.getPlaceholderElement(),c=a.getRootElement();n>l?c.after(h):c.before(h),jt$1(this._activeItems,l,n);let g=this._getRootNode().elementFromPoint(t,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=c===g||c.contains(g),{previousIndex:l,currentIndex:n}}enter(e,t,i,s){let n=this._activeItems.indexOf(e);n>-1&&this._activeItems.splice(n,1);let o=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s;o===-1&&(o=this._getClosestItemIndexToPointer(e,t,i));let a=this._activeItems[o];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,e),a.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[s,n]=this._relatedNodes[i];s.parentNode===e&&s.nextSibling!==n&&(n===null?e.appendChild(s):n.parentNode===e&&e.insertBefore(s,n))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}getItemAtIndex(e){return this._activeItems[e]||null}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,i){let s=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),n=s?this._activeItems.findIndex(o=>{let a=o.getRootElement();return s===a||a.contains(s)}):-1;return n===-1||!this._sortPredicate(n,e)?-1:n}_getRootNode(){return this._rootNode||(this._rootNode=qn$1(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let s=Infinity,n=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==e){let{x:l,y:h}=a.getRootElement().getBoundingClientRect(),c=Math.hypot(t-l,i-h);c<s&&(s=c,n=o)}}return n}};var $t$1=.05;var Xt$1=.05;var f$5=(function(r){return r[r.NONE=0]=`NONE`,r[r.UP=1]=`UP`,r[r.DOWN=2]=`DOWN`,r})(f$5||{});var p$5=(function(r){return r[r.NONE=0]=`NONE`,r[r.LEFT=1]=`LEFT`,r[r.RIGHT=2]=`RIGHT`,r})(p$5||{});function fe$5(r,e){return new ot$2(e,r.get(V$2),r.get(Xr$2),r.get(U$8),r.get(ut$2))}var ot$2=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new le$4;entered=new le$4;exited=new le$4;dropped=new le$4;sorted=new le$4;receivingStarted=new le$4;receivingStopped=new le$4;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=W$2.EMPTY;_verticalScrollDirection=f$5.NONE;_horizontalScrollDirection=p$5.NONE;_scrollNode;_stopScrollTimers=new le$4;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction=`ltr`;constructor(e,t,i,s,n){this._dragDropRegistry=t,this._ngZone=s,this._viewportRuler=n;let o=this.element=fi$1(e);this._document=i,this.withOrientation(`vertical`).withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new F$3(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,i,s){this._draggingStarted(),s==null&&this.sortingDisabled&&(s=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,s,n,o,a,l){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:n,distance:o,dropPoint:a,event:l})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(s=>s.isDragging()).every(s=>e.indexOf(s)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof z$3&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e===`mixed`)this._sortStrategy=new rt$2(this._document,this._dragDropRegistry);else{let t=new z$3(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;fi$1(this.element);let i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}getItemAtIndex(e){return this._isDragging?this._sortStrategy.getItemAtIndex(e):this._draggables[e]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,s){if(this.sortingDisabled||!this._domRect||!Ft$1(this._domRect,$t$1,t,i))return;let n=this._sortStrategy.sort(e,t,i,s);n&&this.sorted.next({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,s=f$5.NONE,n=p$5.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||Ft$1(o.clientRect,$t$1,e,t)&&([s,n]=me$3(a,o.clientRect,this._direction,e,t),(s||n)&&(i=a))}),!s&&!n){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=Jt(l,t),n=Qt$2(l,e),i=window}i&&(s!==this._verticalScrollDirection||n!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=n,this._scrollNode=i,(s||n)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||``,e.scrollSnapType=e.msScrollSnapType=`none`,this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),nI(0,zv).pipe(va$2(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===f$5.UP?e.scrollBy(0,-t):this._verticalScrollDirection===f$5.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===p$5.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===p$5.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&it$2(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(s=>s._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!it$2(this._domRect,t,i)||!this.enterPredicate(e,this))return!1;let s=this._getShadowRoot().elementFromPoint(t,i);return s?s===this._container||this._container.contains(s):!1}_startReceiving(e,t){let i=this._activeSiblings;!i.has(e)&&t.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=qn$1(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Jt(r,e){let{top:t,bottom:i,height:s}=r,n=s*Xt$1;return e>=t-n&&e<=t+n?f$5.UP:e>=i-n&&e<=i+n?f$5.DOWN:f$5.NONE}function Qt$2(r,e){let{left:t,right:i,width:s}=r,n=s*Xt$1;return e>=t-n&&e<=t+n?p$5.LEFT:e>=i-n&&e<=i+n?p$5.RIGHT:p$5.NONE}function me$3(r,e,t,i,s){let n=Jt(e,s),o=Qt$2(e,i),a=f$5.NONE,l=p$5.NONE;if(n){let h=r.scrollTop;n===f$5.UP?h>0&&(a=f$5.UP):r.scrollHeight-h>r.clientHeight&&(a=f$5.DOWN)}if(o){let h=r.scrollLeft;t===`rtl`?o===p$5.RIGHT?h<0&&(l=p$5.RIGHT):r.scrollWidth+h>r.clientWidth&&(l=p$5.LEFT):o===p$5.LEFT?h>0&&(l=p$5.LEFT):r.scrollWidth-h>r.clientWidth&&(l=p$5.RIGHT)}return[a,l]}var at$2=new x$4(`CDK_DRAG_PARENT`);var te$2=new x$4(`CdkDragHandle`);var Ge$2=(()=>{class r{element=E$2(wo$2);_parentDrag=E$2(at$2,{optional:!0,skipSelf:!0});_dragDropRegistry=E$2(V$2);_stateChanges=new le$4;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._stateChanges.next(this)}_disabled=!1;constructor(){this._parentDrag?._addHandle(this)}ngAfterViewInit(){if(!this._parentDrag){let t=this.element.nativeElement.parentElement;for(;t;){let i=this._dragDropRegistry.getDragDirectiveForNode(t);if(i){this._parentDrag=i,i._addHandle(this);break}t=t.parentElement}}}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static ɵfac=function(i){return new(i||r)};static ɵdir=DT({type:r,selectors:[[``,`cdkDragHandle`,``]],hostAttrs:[1,`cdk-drag-handle`],inputs:{disabled:[2,`cdkDragHandleDisabled`,`disabled`,LB]},features:[Y_$1([{provide:te$2,useExisting:r}])]})}return r})();var ee$3=new x$4(`CDK_DRAG_CONFIG`);var ie$3=new x$4(`CdkDropList`);var We$3=(()=>{class r{element=E$2(wo$2);dropContainer=E$2(ie$3,{optional:!0,skipSelf:!0});_ngZone=E$2(U$8);
vendor: 4,722 bytes, line 20
20_viewContainerRef=E$2(qs$1);_dir=E$2(ht$4,{optional:!0});_changeDetectorRef=E$2(OB);_selfHandle=E$2(te$2,{optional:!0,self:!0});_parentDrag=E$2(at$2,{optional:!0,skipSelf:!0});_dragDropRegistry=E$2(V$2);_destroyed=new le$4;_handles=new Tr$2([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}_disabled=!1;constrainPosition;previewClass;previewContainer;scale=1;started=new ht$3;released=new ht$3;ended=new ht$3;entered=new ht$3;exited=new ht$3;dropped=new ht$3;moved=new M$3(t=>{let i=this._dragRef.moved.pipe(qe$2(s=>({source:this,pointerPosition:s.pointerPosition,event:s.event,delta:s.delta,distance:s.distance}))).subscribe(t);return()=>{i.unsubscribe()}});_injector=E$2(fe$6);constructor(){let t=this.dropContainer,i=E$2(ee$3,{optional:!0});this._dragRef=ge$3(this._injector,this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe(va$2(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){ag(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){let i=t.rootElementSelector,s=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){let i=this._handles.getValue();i.push(t),this._handles.next(i)}_removeHandle(t){let i=this._handles.getValue(),s=i.indexOf(t);s>-1&&(i.splice(s,1),this._handles.next(i))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let t=this.element.nativeElement,i=t;this.rootElementSelector&&(i=t.closest!==void 0?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){let t=this.boundaryElement;return t?typeof t==`string`?this.element.nativeElement.closest(t):fi$1(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){let i=this._dir,s=this.dragStartDelay,n=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay=typeof s==`object`&&s?s:Ni(s),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||`global`),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe(lt$3(1)).subscribe(()=>{if(this._parentDrag){t.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let s=this._dragDropRegistry.getDragDirectiveForNode(i);if(s){t.withParent(s._dragRef);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>
vendor: 1,062 bytes, line 20
20{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(t){let{lockAxis:i,dragStartDelay:s,constrainPosition:n,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:h,previewContainer:c}=t;this.disabled=l??!1,this.dragStartDelay=s||0,this.lockAxis=i||null,n&&(this.constrainPosition=n),o&&(this.previewClass=o),a&&(this.boundaryElement=a),h&&(this.rootElementSelector=h),c&&(this.previewContainer=c)}
vendor: 7,267 bytes, line 20
20_setupHandlesListener(){this._handles.pipe(xd$1(t=>{let i=t.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Sd$1(t=>rI(...t.map(i=>i._stateChanges.pipe(Nd$1(i))))),va$2(this._destroyed)).subscribe(t=>{let i=this._dragRef,s=t.element.nativeElement;t.disabled?i.disableHandle(s):i.enableHandle(s)})}static ɵfac=function(i){return new(i||r)};static ɵdir=DT({type:r,selectors:[[``,`cdkDrag`,``]],hostAttrs:[1,`cdk-drag`],hostVars:4,hostBindings:function(i,s){i&2&&Ty(`cdk-drag-disabled`,s.disabled)(`cdk-drag-dragging`,s._dragRef.isDragging())},inputs:{data:[0,`cdkDragData`,`data`],lockAxis:[0,`cdkDragLockAxis`,`lockAxis`],rootElementSelector:[0,`cdkDragRootElement`,`rootElementSelector`],boundaryElement:[0,`cdkDragBoundary`,`boundaryElement`],dragStartDelay:[0,`cdkDragStartDelay`,`dragStartDelay`],freeDragPosition:[0,`cdkDragFreeDragPosition`,`freeDragPosition`],disabled:[2,`cdkDragDisabled`,`disabled`,LB],constrainPosition:[0,`cdkDragConstrainPosition`,`constrainPosition`],previewClass:[0,`cdkDragPreviewClass`,`previewClass`],previewContainer:[0,`cdkDragPreviewContainer`,`previewContainer`],scale:[2,`cdkDragScale`,`scale`,PB]},outputs:{started:`cdkDragStarted`,released:`cdkDragReleased`,ended:`cdkDragEnded`,entered:`cdkDragEntered`,exited:`cdkDragExited`,dropped:`cdkDragDropped`,moved:`cdkDragMoved`},exportAs:[`cdkDrag`],features:[Y_$1([{provide:at$2,useExisting:r}]),CE]})}return r})();var Kt$1=new x$4(`CdkDropListGroup`);var Ue$2=(()=>{class r{element=E$2(wo$2);_changeDetectorRef=E$2(OB);_scrollDispatcher=E$2(Mt$5);_dir=E$2(ht$4,{optional:!0});_group=E$2(Kt$1,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new le$4;_scrollableParentsResolved=!1;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation=`vertical`;id=E$2(Ft$2).getId(`cdk-drop-list-`);lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}_disabled=!1;sortingDisabled=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled=!1;autoScrollStep;elementContainerSelector=null;hasAnchor=!1;dropped=new ht$3;entered=new ht$3;exited=new ht$3;sorted=new ht$3;_unsortedItems=new Set;constructor(){let t=E$2(ee$3,{optional:!0}),i=E$2(fe$6);this._dropListRef=fe$5(i,this.element),this._dropListRef.data=this,t&&this._assignDefaults(t),this._dropListRef.enterPredicate=(s,n)=>this.enterPredicate(s.data,n.data),this._dropListRef.sortPredicate=(s,n,o)=>this.sortPredicate(s,n.data,o.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),r._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(t){this._unsortedItems.add(t),t._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(t){if(this._unsortedItems.delete(t),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(t._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let t=r._dropLists.indexOf(this);t>-1&&r._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe(Nd$1(this._dir.value),va$2(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{let i=se$4(this.connectedTo).map(s=>{if(typeof s==`string`)return r._dropLists.find(o=>o.id===s);return s});if(this._group&&this._group._items.forEach(s=>{i.indexOf(s)===-1&&i.push(s)}),!this._scrollableParentsResolved){let s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(n=>n.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let s=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(s)}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=Ni(this.autoScrollStep,2),t.hasAnchor=this.hasAnchor,t.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),rI(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){let{lockAxis:i,draggingDisabled:s,sortingDisabled:n,listAutoScrollDisabled:o,listOrientation:a}=t;this.disabled=s??!1,this.sortingDisabled=n??!1,this.autoScrollDisabled=o??!1,this.orientation=a||`vertical`,this.lockAxis=i||null}_syncItemsWithRef(t){this._latestSortedRefs=t,this._dropListRef.withItems(t)}static ɵfac=function(i){return new(i||r)};static ɵdir=DT({type:r,selectors:[[``,`cdkDropList`,``],[`cdk-drop-list`]],hostAttrs:[1,`cdk-drop-list`],hostVars:7,hostBindings:function(i,s){i&2&&(jm$1(`id`,s.id),Ty(`cdk-drop-list-disabled`,s.disabled)(`cdk-drop-list-dragging`,s._dropListRef.isDragging())(`cdk-drop-list-receiving`,s._dropListRef.isReceiving()))},inputs:{connectedTo:[0,`cdkDropListConnectedTo`,`connectedTo`],data:[0,`cdkDropListData`,`data`],orientation:[0,`cdkDropListOrientation`,`orientation`],id:`id`,lockAxis:[0,`cdkDropListLockAxis`,`lockAxis`],disabled:[2,`cdkDropListDisabled`,`disabled`,LB],sortingDisabled:[2,`cdkDropListSortingDisabled`,`sortingDisabled`,LB],enterPredicate:[0,`cdkDropListEnterPredicate`,`enterPredicate`],sortPredicate:[0,`cdkDropListSortPredicate`,`sortPredicate`],autoScrollDisabled:[2,`cdkDropListAutoScrollDisabled`,`autoScrollDisabled`,LB],autoScrollStep:[0,`cdkDropListAutoScrollStep`,`autoScrollStep`],elementContainerSelector:[0,`cdkDropListElementContainer`,`elementContainerSelector`],hasAnchor:[2,`cdkDropListHasAnchor`,`hasAnchor`,LB]},outputs:{dropped:`cdkDropListDropped`,entered:`cdkDropListEntered`,exited:`cdkDropListExited`,sorted:`cdkDropListSorted`},exportAs:[`cdkDropList`],features:[Y_$1([{provide:Kt$1,useValue:void 0},{provide:ie$3,useExisting:r}])]})}return r})();var je$2=[`selection`];var Ge$1=[`results`];var Ue$1=[`result`];var qe$1=[`searchInput`];
20var Ye$2=[`dropdown`];var We$2=[[[`select2-label`],[`ng-select2-label`]],[[`select2-hint`],[`ng-select2-hint`]]];var Qe$3=[`select2-label, ng-select2-label`,`select2-hint, ng-select2-hint`];var Xe$1=()=>[];var de$3=(i,l)=>l.id;function Ze$1(i,l){i&1&&Hm$1(0,`span`,8)}function Je$2(i,l){i&1&&Um$1(0)}function et$1(i,l){if(i&1&&Dm$1(0,Je$2,1,0,`ng-container`,15),i&2){i_$1(2);Vm$1(`ngTemplateOutlet`,p_$1(18))}}function tt$1(i,l){if(i&1&&(Hm$1(0,`span`,14),DC(1,et$1,1,1,`ng-container`)),i&2){let e=i_$1();Vm$1(`innerHTML`,e._selectionOverrideLabel(),$h),xb(),bC(e.resettable()&&!(e.disabled()||e.readonly())&&e.resetSelectedValue()!==e._value&&(!e.multiple()&&e.select2Option||e.multiple()&&e.select2Options.length>0)?1:-1)}}function nt(i,l){i&1&&(bs$1(0,`span`),j_$1(1,`\xA0`),Mu())}function it$1(i,l){if(i&1&&Hm$1(0,`span`,19),i&2)Vm$1(`innerHTML`,i_$1(3).select2Option.label,$h)}function ot$1(i,l){i&1&&Um$1(0)}function lt$1(i,l){if(i&1&&Dm$1(0,ot$1,1,0,`ng-container`,20),i&2){let e=i_$1(3);Vm$1(`ngTemplateOutlet`,e.getTemplate(e.select2Option,`option`,!0))(`ngTemplateOutletContext`,e.select2Option)}}function st$2(i,l){if(i&1&&DC(0,it$1,1,1,`span`,19)(1,lt$1,1,2,`ng-container`),i&2){let e=i_$1(2);bC(!e.hasTemplate(e.select2Option,`option`,!0)||e.noLabelTemplate()?0:1)}}function rt$1(i,l){i&1&&Um$1(0)}function ct$1(i,l){if(i&1&&Dm$1(0,rt$1,1,0,`ng-container`,15),i&2){i_$1(2);Vm$1(`ngTemplateOutlet`,p_$1(18))}}function at$1(i,l){if(i&1&&(bs$1(0,`span`,16),DC(1,nt,2,0,`span`),DC(2,st$2,2,1),bs$1(3,`span`,17),j_$1(4),Mu()(),DC(5,ct$1,1,1,`ng-container`),Hm$1(6,`span`,18)),i&2){let e=i_$1();Vm$1(`title`,e.select2Option?.label||``)(`dir`,e.select2Option?.dir),jm$1(`aria-live`,e.nativeKeyboard()&&!e.isOpen?`polite`:null),xb(),bC(e.select2Option?-1:1),xb(),bC(e.select2Option?2:-1),xb(),Ty(`select2-selection__placeholder__option`,e.selectedOption),xb(),Ly(e.placeholder()),xb(),bC(e.resettable()&&e.resetSelectedValue()!==e._value&&e.select2Option&&!(e.disabled()||e.readonly())?5:-1)}}function dt$1(i,l){if(i&1&&(bs$1(0,`span`,17),j_$1(1),Mu()),i&2){let e=i_$1(2);Ty(`select2-selection__placeholder__option`,e.select2Options.length>0),xb(),Ly(e.placeholder())}}function _t$1(i,l){if(i&1){let e=AC();bs$1(0,`span`,27),fy(`click`,function(n){_f(e);let o=i_$1().$implicit;return Mf(i_$1(2).removeSelection(n,o))}),j_$1(1,`×`),Mu()}}function pt$2(i,l){if(i&1&&Hm$1(0,`span`,19),i&2){let e=i_$1().$implicit;Vm$1(`innerHTML`,e.label,$h)}}function ut$1(i,l){i&1&&Um$1(0)}function gt$1(i,l){if(i&1&&Dm$1(0,ut$1,1,0,`ng-container`,20),i&2){let e=i_$1().$implicit;Vm$1(`ngTemplateOutlet`,i_$1(2).getTemplate(e,`option`,!0))(`ngTemplateOutletContext`,e)}}function ht$1(i,l){if(i&1){let e=AC();bs$1(0,`li`,25),fy(`focus`,function(){_f(e);return Mf(i_$1(2)._updateFocusState(!0))})(`keydown.enter`,function(n){let o=_f(e).$implicit;return Mf(i_$1(2).removeSelection(n,o))}),DC(1,_t$1,2,0,`span`,26),DC(2,pt$2,1,1,`span`,19)(3,gt$1,1,2,`ng-container`),Mu()}if(i&2){let e=l.$implicit,t=i_$1(2);Vm$1(`title`,e.label),xb(),bC(t.disabled()||t.readonly()?-1:1),xb(),bC(!t.hasTemplate(e,`option`,!0)||t.noLabelTemplate()?2:3)}}function ft$2(i,l){if(i&1){let e=AC();bs$1(0,`li`,28),fy(`focus`,function(n){_f(e);return Mf(i_$1(2).stopEvent(n))})(`blur`,function(n){_f(e);return Mf(i_$1(2).stopEvent(n))}),bs$1(1,`input`,29),fy(`click`,function(n){_f(e);let o=i_$1(2);return o.toggleOpenAndClose(!1,!0),Mf(o.stopEvent(n))})(`keydown`,function(n){_f(e);return Mf(i_$1(2).keyDown(n,!0))})(`keyup`,function(n){_f(e);return Mf(i_$1(2).searchUpdate(n))})(`change`,function(n){_f(e);return Mf(i_$1(2).prevChange(n))}),Mu()()}if(i&2){let e=i_$1(2);xb(),Vm$1(`id`,e.id()+`-create-field`)(`placeholder`,e.selectedOption?.length>0?``:e.placeholder()??``)}}function mt$1(i,l){i&1&&Um$1(0)}function Ct$2(i,l){if(i&1&&Dm$1(0,mt$1,1,0,`ng-container`,15),i&2){i_$1(2);Vm$1(`ngTemplateOutlet`,p_$1(18))}}function Ot(i,l){if(i&1){let e=AC();bs$1(0,`ul`,21),fy(`cdkDropListDropped`,function(n){_f(e);return Mf(i_$1().drop(n))}),DC(1,dt$1,2,3,`span`,22),CC(2,ht$1,4,3,`li`,23,de$3),DC(4,ft$2,2,2,`li`,24),Mu(),DC(5,Ct$2,1,1,`ng-container`)}if(i&2){let e=i_$1();Vm$1(`cdkDropListDisabled`,!e.multipleDrag()),xb(),bC(e.autoCreate()?-1:1),xb(),_C(e.selectedOption||K_$1(4,Xe$1)),xb(2),bC(e.autoCreate()?4:-1),xb(),bC(e.resettable()&&e.selectedOption?.length>0&&!(e.disabled()||e.readonly())?5:-1)}}function bt$3(i,l){i&1&&Um$1(0)}function Mt$1(i,l){if(i&1&&Dm$1(0,bt$3,1,0,`ng-container`,15),i&2){i_$1();Vm$1(`ngTemplateOutlet`,p_$1(16))}}function Pt(i,l){i&1&&Um$1(0)}function vt$1(i,l){if(i&1&&Dm$1(0,Pt,1,0,`ng-container`,15),i&2){i_$1();Vm$1(`ngTemplateOutlet`,p_$1(16))}}function xt$2(i,l){if(i&1){let e=AC();bs$1(0,`li`,39),fy(`click`,function(){_f(e);return Mf(i_$1(2).selectAll())}),bs$1(1,`div`,40),j_$1(2),Mu()()}if(i&2){let e=i_$1(2);
20xb(2),Ou(` `,e.selectAllTest()?e.removeAllText():e.selectAllText(),` `)}}function St(i,l){if(i&1&&Hm$1(0,`strong`,19),i&2){i_$1(2);let e=$_$1(0);Vm$1(`innerHTML`,e.label,$h),jm$1(`class`,`select2-results__group`+(e.classes?` `+e.classes:``))}}function yt$1(i,l){i&1&&Um$1(0)}function wt$1(i,l){if(i&1&&Dm$1(0,yt$1,1,0,`ng-container`,20),i&2){i_$1(2);let e=$_$1(0);Vm$1(`ngTemplateOutlet`,i_$1(2).getTemplate(e,`group`))(`ngTemplateOutletContext`,e)}}function Nt(i,l){if(i&1&&Hm$1(0,`input`,46),i&2){let e=i_$1().$implicit,t=i_$1(4);Vm$1(`checked`,t.isSelected(e)===`true`)(`disabled`,t.isDisabled(e)===`true`)}}function kt$1(i,l){if(i&1&&(Hm$1(0,`div`,47),rM(1,`highlightText`)),i&2){let e=i_$1().$implicit,t=i_$1(4);Vm$1(`innerHTML`,aM(1,1,e.label,t.searchText,!t.highlightText()),$h)}}function Dt$1(i,l){i&1&&Um$1(0)}function Tt(i,l){if(i&1&&Dm$1(0,Dt$1,1,0,`ng-container`,20),i&2){let e=i_$1().$implicit,t=i_$1(4);Vm$1(`ngTemplateOutlet`,t.getTemplate(e,`option`))(`ngTemplateOutletContext`,t.getContext(e))}}function Et(i,l){if(i&1){let e=AC();bs$1(0,`li`,45,6),fy(`mouseenter`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).mouseenter(n))})(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).click(n))}),DC(2,Nt,1,2,`input`,46),DC(3,kt$1,2,5,`div`,47)(4,Tt,1,2,`ng-container`),Mu()}if(i&2){let e=l.$implicit,t=i_$1(4);N_$1(t.getOptionStyle(e)),Vm$1(`id`,t.getElementId(e))(`dir`,e.dir),jm$1(`aria-selected`,t.isSelected(e))(`aria-disabled`,t.isDisabled(e)),xb(2),bC(t.showOptionCheckbox()?2:-1),xb(),bC(t.hasTemplate(e,`option`)?4:3)}}function At(i,l){if(i&1&&(bs$1(0,`li`,41)(1,`span`,43),DC(2,St,1,2,`strong`,19)(3,wt$1,1,2,`ng-container`),Mu(),bs$1(4,`ul`,44),CC(5,Et,5,8,`li`,42,de$3),Mu()()),i&2){let e=i_$1().$implicit,t=$_$1(0),n=i_$1(2);Vm$1(`dir`,t.dir),xb(),Vm$1(`id`,n.getElementId(e)),xb(),bC(n.hasTemplate(t,`group`)?3:2),xb(2),jm$1(`aria-labelledby`,n.getElementId(e)),xb(),_C(t.options)}}function Ft(i,l){if(i&1&&Hm$1(0,`input`,46),i&2){i_$1();let e=$_$1(0),t=i_$1(3);Vm$1(`checked`,t.isSelected(e)===`true`)(`disabled`,t.isDisabled(e)===`true`)}}function Vt(i,l){if(i&1&&(Hm$1(0,`div`,47),rM(1,`highlightText`)),i&2){i_$1();let e=$_$1(0),t=i_$1(3);Vm$1(`innerHTML`,aM(1,1,e.label,t.searchText,!t.highlightText()),$h)}}function It(i,l){i&1&&Um$1(0)}function Rt(i,l){if(i&1&&Dm$1(0,It,1,0,`ng-container`,20),i&2){i_$1();let e=$_$1(0),t=i_$1(3);Vm$1(`ngTemplateOutlet`,t.getTemplate(e,`option`))(`ngTemplateOutletContext`,t.getContext(e))}}function Lt(i,l){if(i&1){let e=AC();By(0),bs$1(1,`li`,45,6),fy(`mouseenter`,function(){_f(e);let n=$_$1(0);return Mf(i_$1(3).mouseenter(n))})(`click`,function(){_f(e);let n=$_$1(0);return Mf(i_$1(3).click(n))}),DC(3,Ft,1,2,`input`,46),DC(4,Vt,2,5,`div`,47)(5,Rt,1,2,`ng-container`),Mu()}if(i&2){let e=i_$1().$implicit,t=i_$1(2),n=B_$1(t._toOption(e));xb(),N_$1(t.getOptionStyle(n)),Vm$1(`id`,t.getElementId(e))(`dir`,n.dir),jm$1(`aria-selected`,t.isSelected(n))(`aria-disabled`,t.isDisabled(n)),xb(2),bC(t.showOptionCheckbox()?3:-1),xb(),bC(t.hasTemplate(n,`option`)?5:4)}}function Ht(i,l){if(i&1&&(By(0),DC(1,At,7,4,`li`,41)(2,Lt,6,9,`li`,42)),i&2){let e=l.$implicit,t=B_$1(i_$1(2)._toGroup(e));xb(),bC(t.options!==void 0?1:2)}}function Bt$1(i,l){if(i&1&&Hm$1(0,`li`,37),i&2)Vm$1(`innerHTML`,i_$1(2).noResultMessage(),$h)}function Kt(i,l){if(i&1&&Hm$1(0,`li`,38),i&2)Vm$1(`innerHTML`,i_$1(2).maxResultsMessage(),$h)}function zt(i,l){if(i&1){let e=AC();bs$1(0,`div`,30)(1,`div`,31,3)(3,`div`,32)(4,`input`,33,4),fy(`keydown`,function(n){_f(e);let o=i_$1();return Mf(o.keyDown(n,o.autoCreate()))})(`keyup`,function(n){_f(e);return Mf(i_$1().searchUpdate(n))})(`change`,function(n){_f(e);return Mf(i_$1().prevChange(n))}),Mu()(),bs$1(6,`div`,34)(7,`ul`,35,5),fy(`keydown`,function(n){_f(e);return Mf(i_$1().keyDown(n))}),DC(9,xt$2,3,1,`li`,36),CC(10,Ht,3,2,null,null,de$3),DC(12,Bt$1,1,1,`li`,37),DC(13,Kt,1,1,`li`,38),Mu()()()()}if(i&2){let e=i_$1();Ty(`select2-container--open`,e.isOpen)(`select2-overlay`,e.overlay())(`select2-position-auto`,e.listPosition()===`auto`)(`select2-style-borderless`,e.styleMode()===`borderless`),Vm$1(`id`,e.idOverlay()),xb(),Ty(`select2-dropdown--below`,!e.select2above())(`select2-dropdown--above`,e.select2above()),xb(2),Ty(`select2-search--hide`,e.isSearchboxHidden),xb(),Vm$1(`id`,e.id()+`-search-field`)(`value`,e.searchText),jm$1(`tabindex`,e.isOpen?e._tabIndex:`-1`)(`aria-labelledby`,e.ariaLabelledby()??e.idLabel())(`aria-controls`,e.idOptions())(`aria-activedescendant`,e.hoveringOptionId()),xb(3),wy(`max-height`,e.resultMaxHeight())(`--%NS%grid-size`,e.grid()||null),Ty(`
20select2-grid`,e.grid()&&e.isNumber(e.grid()))(`select2-grid-auto`,e.grid()&&!e.isNumber(e.grid())),Vm$1(`id`,e.idOptions()),jm$1(`aria-labelledby`,e.ariaLabelledby()??e.idLabel())(`aria-multiselectable`,e.multiple())(`aria-activedescendant`,e.hoveringOptionId()),xb(2),bC(e.showSelectAll()&&e.multiple()?9:-1),xb(),_C(e.filteredData()),xb(2),bC(!e.filteredData()?.length&&e.noResultMessage()?12:-1),xb(),bC(e.maxResultsExceeded?13:-1)}}function $t(i,l){if(i&1){let e=AC();bs$1(0,`button`,48),fy(`focus`,function(){_f(e);return Mf(i_$1()._updateFocusState(!0))})(`click`,function(n){_f(e);return Mf(i_$1().reset(n))})(`keydown`,function(n){return n.stopPropagation()}),bs$1(1,`span`,49),j_$1(2,`×`),Mu()()}if(i&2){let e=i_$1();jm$1(`aria-description`,e.ariaResetButtonDescription())(`aria-controls`,e.idCombo())}}var a$3={tmp:``,pattern:`[\\u0300-\\u036F]*`};var p$4={tmp:``,pattern:`[\\u064B-\\u0652\\u0670]*`};var f$4={tmp:``,pattern:`[\\u05B0-\\u05BC\\u05C1\\u05C2]*`};var Be$2=[{l:`a`,s:/[ⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ]/gi,e:`a(?![aeouvy])`,d:a$3},{l:`aa`,s:/ꜳ/gi,d:a$3},{l:`ae`,s:/[æǽǣ]/gi,d:a$3},{l:`ao`,s:/ꜵ/gi,d:a$3},{l:`au`,s:/ꜷ/gi,d:a$3},{l:`av`,s:/[ꜹꜻ]/gi,d:a$3},{l:`ay`,s:/ꜽ/gi,d:a$3},{l:`b`,s:/[ⓑbḃḅḇƀƃɓ]/gi,d:a$3},{l:`c`,s:/[ⓒcćĉċčçḉƈȼꜿↄ]/gi,d:a$3},{l:`d`,s:/[ⓓdḋďḍḑḓḏđƌɖɗꝺ]/gi,e:`d(?!z)`,d:a$3},{l:`dz`,s:/[dzdž]/gi,d:a$3},{l:`e`,s:/(?<!o)[eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ]/gi,e:`(?<!o)e`,d:a$3},{l:`f`,s:/[ⓕfḟƒꝼ]/gi,d:a$3},{l:`g`,s:/[ⓖgǵĝḡğġǧģǥɠꞡᵹꝿ]/gi,d:a$3},{l:`h`,s:/[ⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ]/gi,e:`h(?!v)`,d:a$3},{l:`hv`,s:/ƕ/gi,d:a$3},{l:`i`,s:/[ⓘiìíîĩīĭİïḯỉǐȉȋịįḭɨı]/gi,d:a$3},{l:`j`,s:/[ⓙjĵǰɉ]/gi,e:`(?<![ln])j`,d:a$3},{l:`k`,s:/[ⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ]/gi,d:a$3},{l:`l`,s:/[ⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇꝆ]/gi,e:`l(?!j)`,d:a$3},{l:`lj`,s:/lj/gi,d:a$3},{l:`m`,s:/[ⓜmḿṁṃɱɯ]/gi,d:a$3},{l:`n`,s:/[ⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ]/gi,e:`n(?!j)`,d:a$3},{l:`nj`,s:/nj/gi,d:a$3},{l:`o`,s:/[ⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔƟꝋꝍɵ]/gi,e:`o(?![ieou])`,d:a$3},{l:`oi`,s:/ƣ/gi,d:a$3},{l:`oe`,s:/œ/gi,d:a$3},{l:`oo`,s:/ꝏ/gi,d:a$3},{l:`ou`,s:/ȣ/gi,d:a$3},{l:`p`,s:/[ⓟpṕṗƥᵽꝑꝓꝕ]/gi,d:a$3},{l:`q`,s:/[ⓠqɋꝗꝙ]/gi,d:a$3},{l:`r`,s:/[ⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ]/gi,d:a$3},{l:`s`,s:/[ⓢsßẞśṥŝṡšṧṣṩșşȿꞩꞅẛ]/gi,d:a$3},{l:`t`,s:/[ⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ]/gi,e:`t(?!z)`,d:a$3},{l:`tz`,s:/ꜩ/gi,d:a$3},{l:`u`,s:/[ⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ]/gi,d:a$3},{l:`v`,s:/[ⓥvṽṿʋꝟʌ]/gi,e:`v(?!y)`,d:a$3},{l:`vy`,s:/ꝡ/gi,d:a$3},{l:`w`,s:/[ⓦwẁẃŵẇẅẘẉⱳ]/gi,d:a$3},{l:`x`,s:/[ⓧxẋẍ]/gi,d:a$3},{l:`y`,s:/[ⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ]/gi,d:a$3},{l:`z`,s:/[ⓩzźẑżžẓẕƶȥɀⱬꝣ]/gi,d:a$3},{l:`あ`,s:/[あアぁァ]゙?/gi},{l:`い`,s:/[いイぃィ]゙?/gi},{l:`う`,s:/[うウぅゥゔヴ]゙?/gi},{l:`え`,s:/[えエぇェ]゙?/gi},{l:`お`,s:/[おオぉォ]゙?/gi},{l:`か`,s:/[かカがガゕヵ]゙?/gi},{l:`き`,s:/[きキぎギ]゙?/gi},{l:`く`,s:/[くクぐグ]゙?/gi},{l:`け`,s:/[けケげゲゖヶ]゙?/gi},{l:`こ`,s:/[こコごゴ]゙?/gi},{l:`さ`,s:/[さサざザ]゙?/gi},{l:`し`,s:/[しシじジ]゙?/gi},{l:`す`,s:/[すスずズ]゙?/gi},{l:`せ`,s:/[せセぜゼ]゙?/gi},{l:`そ`,s:/[そソぞゾ]゙?/gi},{l:`た`,s:/[たタだダ]゙?/gi},{l:`ち`,s:/[ちチぢヂ]゙?/gi},{l:`つ`,s:/[つツっッづヅ]゙?/gi},{l:`て`,s:/[てテでデ]゙?/gi},{l:`と`,s:/[とトどド]゙?/gi},{l:`な`,s:/ナ/gi},{l:`に`,s:/ニ/gi},{l:`ぬ`,s:/ヌ/gi},{l:`ね`,s:/ネ/gi},{l:`の`,s:/ノ/gi},{l:`は`,s:/[はハばバぱパ][゙゚]?/gi},{l:`ひ`,s:/[ひヒびビぴピ][゙゚]?/gi},{l:`ふ`,s:/[ふフぶブぷプ][゙゚]?/gi},{l:`へ`,s:/[へヘべベぺペ][゙゚]?/gi},{l:`ほ`,s:/[ほホぼボぽポ][゙゚]?/gi},{l:`ま`,s:/マ/gi},{l:`み`,s:/ミ/gi},{l:`む`,s:/ム/gi},{l:`め`,s:/メ/gi},{l:`も`,s:/モ/gi},{l:`や`,s:/[ヤゃャ]/gi},{l:`ゆ`,s:/[ユゅュ]/gi},{l:`よ`,s:/[ヨょョ]/gi},{l:`ら`,s:/ラ/gi},{l:`り`,s:/リ/gi},{l:`る`,s:/ル/gi},{l:`れ`,s:/レ/gi},{l:`ろ`,s:/ロ/gi},{l:`わ`,s:/[わワゎヮヷ]゙?/gi},{l:`ゐ`,s:/[ゐヰヸ]゙?/gi},{l:`ゑ`,s:/[ゑヱヹ]゙?/gi},{l:`を`,s:/[をヲヺ]゙?/gi},{l:`ん`,s:/[ン]/gi},{l:`а`,s:/[аӐӑӒӓӔӕ]/gi},{l:`г`,s:/[гѓґҐғҒҕҔ]/gi},{l:`д`,s:/[дђѐ]/gi},{l:`е`,s:/[еѐёЁӖӗ]/gi},{l:`ж`,s:/[жӁӂӜӝ]/gi},{l:`з`,s:/[зӞӟ]/gi},{l:`и`,s:/[иѝӢӣӤӥ]/gi},{l:`й`,s:/[йЙ]/gi}
20,{l:`к`,s:/[кќҚқҜҝҞҟҠҡ]/gi},{l:`л`,s:/[лљЉ]/gi},{l:`н`,s:/[нњЊҢңӉӊ]/gi},{l:`о`,s:/[оӦӧӨӫ]/gi},{l:`с`,s:/[сҪҫ]/gi},{l:`т`,s:/[тћЋ]/gi},{l:`у`,s:/[уўЎӮӯӰӱӲӳ]/gi},{l:`х`,s:/[хҲҳӇӈ]/gi},{l:`ч`,s:/[чҴҵӴӵ]/gi},{l:`ы`,s:/[ыӸӹ]/gi},{l:`α`,s:/[αάἀἁἂἃἄἅἆἇὰάᾀᾁᾂᾃᾄᾅᾆᾇᾰᾱᾲᾳᾴᾶᾷ]/gi},{l:`β`,s:/[βϐ]/gi},{l:`η`,s:/[ηήἠἡἢἣἤἥἦἧὴήᾐᾑᾒᾓᾔᾕᾖᾗῂῃῄῆῇ]/gi},{l:`θ`,s:/[θϑ]/gi},{l:`ι`,s:/[ιίϊΐἰἱἲἳἴἵἶἷὶίῐῑῒΐῖῗ]/gi},{l:`κ`,s:/[κϰ]/gi},{l:`ο`,s:/[οόὀὁὂὃὄὅὸό]/gi},{l:`π`,s:/[πϖ]/gi},{l:`ρ`,s:/[ρϱῤῥ]/gi},{l:`σ`,s:/[σςϲ]/gi},{l:`υ`,s:/[υύϋΰὐὑὒὓὔὕὖὗὺύῠῡῢΰῦῧ]/gi},{l:`φ`,s:/[φϕ]/gi},{l:`ω`,s:/[ωώὠὡὢὣὤὥὦὧὼώᾠᾡᾢᾣᾤᾥᾦᾧῲῳῴῶῷ]/gi},{l:`ا`,s:/[اأإآٱ]/gi,d:p$4},{l:`ب`,s:/ب/gi,d:p$4},{l:`ت`,s:/[تة]/gi,d:p$4},{l:`ث`,s:/ث/gi,d:p$4},{l:`ج`,s:/ج/gi,d:p$4},{l:`ح`,s:/ح/gi,d:p$4},{l:`خ`,s:/خ/gi,d:p$4},{l:`د`,s:/د/gi,d:p$4},{l:`ذ`,s:/ذ/gi,d:p$4},{l:`ر`,s:/ر/gi,d:p$4},{l:`ز`,s:/ز/gi,d:p$4},{l:`س`,s:/س/gi,d:p$4},{l:`ش`,s:/ش/gi,d:p$4},{l:`ص`,s:/ص/gi,d:p$4},{l:`ض`,s:/ض/gi,d:p$4},{l:`ط`,s:/ط/gi,d:p$4},{l:`ظ`,s:/ظ/gi,d:p$4},{l:`ع`,s:/ع/gi,d:p$4},{l:`غ`,s:/غ/gi,d:p$4},{l:`ف`,s:/ف/gi,d:p$4},{l:`ق`,s:/ق/gi,d:p$4},{l:`ك`,s:/[كک]/gi,d:p$4},{l:`ل`,s:/ل/gi,d:p$4},{l:`م`,s:/م/gi,d:p$4},{l:`ن`,s:/ن/gi,d:p$4},{l:`ه`,s:/[هە]/gi,d:p$4},{l:`و`,s:/[وؤ]/gi,d:p$4},{l:`ي`,s:/[يىئ]/gi,d:p$4},{l:`א`,s:/א/gi,d:f$4},{l:`ב`,s:/ב/gi,d:f$4},{l:`ג`,s:/ג/gi,d:f$4},{l:`ד`,s:/ד/gi,d:f$4},{l:`ה`,s:/ה/gi,d:f$4},{l:`ו`,s:/ו/gi,d:f$4},{l:`ז`,s:/ז/gi,d:f$4},{l:`ח`,s:/ח/gi,d:f$4},{l:`ט`,s:/ט/gi,d:f$4},{l:`י`,s:/י/gi,d:f$4},{l:`כ`,s:/[כך]/gi,d:f$4},{l:`ל`,s:/ל/gi,d:f$4},{l:`מ`,s:/[םמ]/gi,d:f$4},{l:`נ`,s:/[ןנ]/gi,d:f$4},{l:`ס`,s:/ס/gi,d:f$4},{l:`ע`,s:/ע/gi,d:f$4},{l:`פ`,s:/[פף]/gi,d:f$4},{l:`צ`,s:/[ץצ]/gi,d:f$4},{l:`ק`,s:/ק/gi,d:f$4},{l:`ר`,s:/ר/gi,d:f$4},{l:`ש`,s:/ש/gi,d:f$4},{l:`ת`,s:/ת/gi,d:f$4}];var jt=6;var Gt=new RegExp(`[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]`,`g`);var $e$3=(()=>{class i{constructor(){this._elementRef=E$2(wo$2),this.classes=TB(void 0),this.templateId=TB(void 0),this.data=TB(void 0),this.dir=TB(void 0),this._projectedContent=be$3(void 0)}_readContent(){let e=this._elementRef.nativeElement;return e.innerHTML?.trim()||e.textContent?.trim()||``}_refreshProjectedContent(){let e=this._readContent();return e!==this._projectedContent()?(this._projectedContent.set(e),!0):!1}_resolveLabel(e){return e??this._projectedContent()??this._readContent()}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵdir=DT({type:i,inputs:{classes:[1,`classes`],templateId:[1,`templateId`],data:[1,`data`],dir:[1,`dir`]}})}}return i})();var Z$1=(()=>{class i extends $e$3{constructor(){super(...arguments),this.value=TB.required(),this.label=TB(void 0),this.disabled=TB(!1,{transform:LB}),this.templateSelectionId=TB(void 0),this.hide=TB(!1,{transform:LB})}toOption(){return{value:this.value(),label:this._resolveLabel(this.label()),disabled:this.disabled()||void 0,classes:this.classes(),templateId:this.templateId(),templateSelectionId:this.templateSelectionId(),data:this.data(),hide:this.hide()||void 0,dir:this.dir()}}static{this.ɵfac=(()=>{let e;return function(n){return(e||(e=qE(i)))(n||i)}})()}static{this.ɵdir=DT({type:i,selectors:[[`ng-option`]],inputs:{value:[1,`value`],label:[1,`label`],disabled:[1,`disabled`],templateSelectionId:[1,`templateSelectionId`],hide:[1,`hide`]},features:[Im$1]})}}return i})();var Ke$3=(()=>{class i extends $e$3{constructor(){super(...arguments),this.label=TB.required(),this._ngOptions=SB(Z$1)}toGroup(){return{label:this._resolveLabel(this.label()),options:this._ngOptions().map(e=>e.toOption()),classes:this.classes(),templateId:this.templateId(),data:this.data(),dir:this.dir()}}static{this.ɵfac=(()=>{let e;return function(n){return(e||(e=qE(i)))(n||i)}})()}static{this.ɵdir=DT({type:i,selectors:[[`ng-group`]],contentQueries:function(t,n,o){t&1&&yy(o,n._ngOptions,Z$1,4),t&2&&f_$1()},inputs:{label:[1,`label`]},features:[Im$1]})}}return i})();var u$3=class i{static getOptionByValue(l,e){for(let t of l){let n=t.options;if(n){for(let o of n)if(o.value===e)return o}else if(t.value===e)return t}return null}static getOptionsByValue(l,e,t){if(t){let n=Array.isArray(e)?e:[],o=[];for(let s of n){let g=i.getOptionByValue(l,s);g&&o.push(g)}return o}return i.getOptionByValue(l,e)}static getFirstAvailableOption(l){for(let e of l){let t=e.options;if(t){for(let n of t)if(!n.disabled)return n}else{let n=e;if(!n.disabled)return n}}return null}static optionIsNotInFilteredData(l,e){if(i.isNullOrUndefined(e))return!0;for(let t of l){let n=t.options;if(n&&n.includes(e))return!1;if(t===e)return!1}return!0}static getPreviousOption(l,e){let t=i.isNullOrUndefined(e);for(let n=l.length-1;n>=0;n--){let o=l[n],s=o.options;if(s)for(let g=s.length-1;g>=0;g--){let y=s[g];if(t&&!y.disabled&&!y.hide)return y;t||(t=y===e)}else{let g=o;if(t&&!g.disabled&&!g.hide)return g;t||(t=g===e)}}return null}static getNextOption(l,e){let t=i.isNullOrUndefined(e);if(l)for(let n of l){let o=n.options;if(o)for(let s of o)if(t){if(!s.disabled&&!s.hide)return s}else t=s===e;else{let s=n;if(t){if(!s.disabled&&!s.hide)return s}else t=s===e}}return null}static getFirstOption(l){let e=l[0];return this.isOption(e)?e:e.options[0]??null}static getLastOption(l){let e=l.at(-1);return e?this.isOption(e)?e:e.options.at(-1)??null:null}static isGroup(l){return!!l.options}static isOption(l){return!this.isGroup(l)}static getReduceData(l,e=0){if(e>0){let t=0,n=[];for(let o of l){let s=o.options;if(s){let g=x$3(w$4({},o),{options:[]});n.push(g);for(let y of s)if(g.options.push(y),t++,t===e)return{result:n,reduce:!0}}else n.push(o),t++;if(t===e)return{result:n,reduce:!0}}return{result:n,reduce:!1}}else return{result:l,reduce:!1}}static getFilteredData(l,e,t){if(e){let n=[];for(let o of l){let s=o.options;if(s){if(s.some(g=>i.containSearchText(g.label,e,t))){let g=s.filter(y=>i.containSearchText(y.label,e,t));n.push(x$3(w$4({},o),{options:g}))}}else i.containSearchText(o.label,e,t)&&n.push(o)}return n}else return l}static getFilteredSelectedData(l,e){let t=[];for(let n of l){let o=n.options;if(o){let s=o.filter(g=>i.isSelected(e,g,!0)===`false`);s.length&&t.push(x$3(w$4({},n),{options:s}))}else i.isSelected(e,n,!0)===`false`&&t.push(n)}return t}static isSearchboxHidden(l,e){return(e==null||isNaN(+e))&&(e=jt),i.getOptionsCount(l)<+e}static isSelected(l,e,t){return t?l&&l.some(n=>n.value===e.value)?`true`:`false`:l&&e.value===l.value?`true`:`false`}static removeSelection(l,e){for(let t=0;t<l.length;t++)if(l[t].value===e.value){l.splice(t,1);return}}static getOptionsCount(l){let e=0;if(Array.isArray(l))for(let t of l){let n=t.options;e+=n?n.length:1}return e}static isNullOrUndefined(l){return l==null}static containSearchText(l,e,t){return i.formatSansUnicode(l).match(new RegExp(i.formatPattern(e,t),`i`))!==null}static protectPattern(l){return l.replace(Gt,`\\$&`)}static formatSansUnicode(l){for(let e of Be$2)l=l.replace(e.s,e.l);return l}static patternUnicode(l){for(let e of Be$2){let t=e.s.toString().replace(`/gi`,``).substring(1);l=l.replace(new RegExp(`((${e.e??e.l}|${t})${e.d?.pattern??``})`,`gi`),`((${e.l}|${t})${e.d?.tmp??``})`)}return l=l.replaceAll(a$3.tmp,a$3.pattern).replaceAll(p$4.tmp,p$4.pattern).replaceAll(f$4.tmp,f$4.pattern),l}static formatPattern(l,e){return l=i.formatSansUnicode(i.protectPattern(l)),e&&typeof e==`function`&&(l=e(l)),l}};var Ut$1=(()=>{class i{constructor(){this.sanitizer=E$2(te$7)}transform(e,t,n=!1){if(!e||!t||n)return e??``;let o=u$3.patternUnicode(u$3.protectPattern(t)),s=e.replace(new RegExp(`(${o})`,`gi`),`<span class="select2-highlight-text">$1</span>`);return this.sanitizer.bypassSecurityTrustHtml(s)}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵpipe=bT({name:`highlightText`,type:i,pure:!0})}}return i})();var qt=0;var Yt=[`Enter`,` `];var Wt=[`ArrowDown`,`ArrowUp`,`Home`,`End`,`PageUp`,`PageDown`];var Qt$1=[`ArrowDown`,`ArrowUp`,`Enter`,` `,`Home`,`End`,`PageUp`,`PageDown`];var Xt=[`Home`,`End`,`PageUp`,`PageDown`];var ze$1=[`Escape`,`Tab`,{key:`ArrowUp`,altKey:!0}];var pn=(()=>{class i{get select2Options(){return this.multiple()?this.selectedOption??[]:[]}get select2Option(){return this.multiple()?null:this.selectedOption}get searchText(){return this.innerSearchText}set searchText(e){this.innerSearchText=e}get disabledState(){return this._control?.disabled??this._disabled}get resultsElement(){let e=this.resultContainer();return e?e.nativeElement:void 0}get _tabIndex(){return this.disabledState?-1:this.tabIndex()}
20constructor(){this._viewportRuler=E$2(ut$2),this._changeDetectorRef=E$2(OB),this._parentForm=E$2(un$1,{optional:!0}),this._parentFormGroup=E$2(fn$1,{optional:!0}),this._control=E$2(_$1,{optional:!0,self:!0}),this._uid=`select2-${qt++}`,this.data=TB([]),this.minCharForSearch=TB(0,{transform:PB}),this.displaySearchStatus=TB(void 0),this.placeholder=TB(void 0),this.limitSelection=TB(0,{transform:PB}),this.listPosition=TB(`below`),this.overlay=TB(!1,{transform:LB}),this.multiple=TB(!1,{transform:LB}),this.multipleDrag=TB(!1,{transform:LB}),this.styleMode=TB(`default`),this.noResultMessage=TB(),this.maxResults=TB(0,{transform:PB}),this.maxResultsMessage=TB(`Too many results…`),this.infiniteScrollDistance=TB(1.5,{transform:PB}),this.infiniteScrollThrottle=TB(150,{transform:PB}),this.infiniteScroll=TB(!1,{transform:LB}),this.autoCreate=TB(!1,{transform:LB}),this.noLabelTemplate=TB(!1,{transform:LB}),this.editPattern=TB(void 0),this.templates=TB(void 0),this.templateSelection=TB(void 0),this.resultMaxHeight=TB(`200px`),this.customSearchEnabled=TB(!1,{transform:LB}),this.minCountForSearch=TB(void 0,{transform:PB}),this.id=TB(this._uid),this.idLabel=it$3(()=>`${this.id()}-label`),this.idCombo=it$3(()=>`${this.id()}-combo`),this.idOptions=it$3(()=>`${this.id()}-options`),this.idOverlay=it$3(()=>`${this.id()}-overlay`),this.required=TB(!1,{transform:LB}),this.disabled=TB(!1,{transform:LB}),this.hideSelectedItems=TB(!1,{transform:LB}),this.readonly=TB(!1,{transform:LB}),this.value=TB(),this.tabIndex=TB(0,{transform:PB}),this.resettable=TB(!1,{transform:LB}),this.resetSelectedValue=TB(void 0),this.nativeKeyboard=TB(!1,{transform:LB}),this.highlightText=TB(!1,{transform:LB}),this.grid=TB(``),this.selectionOverride=TB(void 0),this.selectionNoWrap=TB(!1,{transform:LB}),this.showSelectAll=TB(!1,{transform:LB}),this.showOptionCheckbox=TB(!1,{transform:LB}),this.removeAllText=TB(`Remove all`),this.selectAllText=TB(`Select all`),this.title=TB(),this.ariaLabelledby=TB(),this.ariaDescribedby=TB(),this.ariaInvalid=TB(!1,{transform:LB}),this.ariaResetButtonDescription=TB(`Reset`),this.update=wB(),this.autoCreateItem=wB(),this.open=wB(),this.close=wB(),this.focus=wB(),this.blur=wB(),this.search=wB(),this.scroll=wB(),this.removeOption=wB(),this.cdkConnectedOverlay=_B.required(me$5),this.selection=_B.required(`selection`),this.resultContainer=_B(`results`),this.results=MB(`result`),this.searchInput=_B(`searchInput`),this.dropdown=_B(`dropdown`),this._ngOptions=SB(Z$1),this._ngGroups=SB(Ke$3),this.classMaterial=it$3(()=>this.styleMode()===`material`),this.classNostyle=it$3(()=>this.styleMode()===`noStyle`),this.classBorderless=it$3(()=>this.styleMode()===`borderless`),this.select2above=it$3(()=>this.overlay()?this._isAbobeOverlay():this.listPosition()===`above`),this.selectedOption=null,this.isOpen=!1,this.focused=!1,this.filteredData=be$3(void 0),this.overlayWidth=``,this.overlayHeight=``,this._positions=it$3(()=>{switch(this.listPosition()){case`above`:return[new he$7({originX:`start`,originY:`top`},{overlayX:`start`,overlayY:`bottom`})];case`auto`:return[new he$7({originX:`start`,originY:`bottom`},{overlayX:`start`,overlayY:`top`}),new he$7({originX:`start`,originY:`top`},{overlayX:`start`,overlayY:`bottom`})];default:return[new he$7({originX:`start`,originY:`bottom`},{overlayX:`start`,overlayY:`top`})]}}),this.hoveringOption=be$3(null),this.hoveringOptionId=it$3(()=>this.getElementId(this.hoveringOption())),this.innerSearchText=``,this._stateChanges=new le$4,this._data=[],this._disabled=!1,this._destroyed=!1,this._value=null,this._overlayPosition=be$3(void 0),this.toObservable=new W$2,this._onTouched=()=>{},this._onChange=()=>{},this._control&&(this._control.valueAccessor=this),this.toObservable.add(XB(this.multiple).subscribe(e=>{this.ngOnInit()})),this.toObservable.add(XB(this.minCountForSearch).subscribe(()=>{this.updateSearchBox()})),this.toObservable.add(XB(this.disabled).subscribe(e=>{this._disabled=e})),eo$1(()=>{let e=this._ngGroups(),t=this._ngOptions();if(e.length===0&&t.length===0)return;let n;try{n=[...e.map(o=>o.toGroup()),...t.filter(o=>!e.some(s=>s._ngOptions().includes(o))).map(o=>o.toOption())]}catch(o){return}ce$5(()=>
20{if(this._data=n,this.updateFilteredData(),this.selectedOption===null){let o=this._control?this._control.value:this.value(),s=u$3.getOptionsByValue(this._data,o,this.multiple());s!==null&&(this.selectedOption=s),this.hoveringOption.set(u$3.getOptionByValue(this._data,this.value))}Promise.resolve().then(()=>{this._destroyed||this._changeDetectorRef.markForCheck()})})})}ngOnChanges(e){let t;if(e.data&&(this._ngOptions().length===0&&this._ngGroups().length===0&&(this._data=e.data.currentValue),t=!0),e.value){let n=e.value.currentValue;this.testValueChange(this._value,n)&&(this._value===null&&(this._value=n),this.writeValue(n),t=!0)}t&&this.updateFilteredData()}clickDetection(e){if(this.isOpen){let t=e.target;this.ifParentContainsClass(t,`selection`)?this.ifParentContainsId(t,this.id())||(this.toggleOpenAndClose(),this.clickExit()):((!this.ifParentContainsClass(t,`select2-dropdown`)&&!this.multiple()&&!this.hideSelectedItems()||!(this.ifParentContainsClass(t,`select2-results__option`)||this.ifParentContainsClass(t,`select2-dropdown`)))&&this.toggleOpenAndClose(),!this.overlay()&&!this.ifParentContainsId(t,this.id())&&this.clickExit())}else if(this.focused){let t=e.target;this._focus(this.clickOnSelect2Element(t))}}_onViewportChange(){this.isOpen&&this.triggerRect()}ngOnInit(){this._viewportRuler.change(100).subscribe(()=>this._onViewportChange());let e=this._control?this._control.value:this.value(),t=u$3.getOptionsByValue(this._data,e,this.multiple());t!==null&&(this.selectedOption=t),Array.isArray(t)||this.hoveringOption.set(u$3.getOptionByValue(this._data,this.value)),this.updateSearchBox()}ngAfterViewInit(){this.cdkConnectedOverlay().positionChange.subscribe(e=>{this.listPosition()===`auto`&&e.connectionPair?.originY&&this._overlayPosition()!==e.connectionPair.originY&&(this.triggerRect(),this._overlayPosition.set(e.connectionPair.originY),this._changeDetectorRef.markForCheck())}),this.selectionElement=this.selection().nativeElement,this.triggerRect(),this._setupScrollListener()}ngDoCheck(){this.updateSearchBox(),this._dirtyCheckNativeValue(),this._refreshProjectedContent(),this._triggerRect&&(this.overlayWidth!==this._triggerRect.width&&(this.overlayWidth=this._triggerRect.width,this._changeDetectorRef.markForCheck()),this._dropdownRect&&this._dropdownRect.height>0&&this.overlayHeight!==this._dropdownRect.height&&(this.overlayHeight=this.listPosition()===`auto`?this._dropdownRect.height:0,this.fixValue()))}ngOnDestroy(){this._destroyed=!0,this.toObservable.unsubscribe()}_refreshProjectedContent(){let e=this._ngGroups(),t=this._ngOptions();if(!(e.length===0&&t.length===0)){for(let n of t)n._refreshProjectedContent();for(let n of e){n._refreshProjectedContent();for(let o of n._ngOptions())o._refreshProjectedContent()}}}fixValue(){if(!Array.isArray(this.selectedOption)&&this.multiple()){let e=this.selectedOption;this.selectedOption=[],setTimeout(()=>{this._destroyed||(this.select(e),this._changeDetectorRef.markForCheck())})}else if(Array.isArray(this.selectedOption)&&!this.multiple()){let e=this.selectedOption[0];this.selectedOption=null,setTimeout(()=>{this._destroyed||(this.select(e),this._changeDetectorRef.markForCheck())})}else this._changeDetectorRef.markForCheck()}updateSearchBox(){if(this.autoCreate()&&!this.multiple())this.isSearchboxHidden=!1;else{let e=this.displaySearchStatus()===`hidden`||this.displaySearchStatus()!==`always`&&!this.customSearchEnabled()&&u$3.isSearchboxHidden(this._data,this.minCountForSearch());this.isSearchboxHidden!==e&&(this.isSearchboxHidden=e)}}getOptionStyle(e){return`select2-results__option `+(e.hide?`select2-results__option--hide `:``)+(e===this.hoveringOption()?`select2-results__option--highlighted `:``)+(e.classes||``)}mouseenter(e){e.disabled||this.hoveringOption.set(e)}click(e){this.testSelection(e)&&this.select(e)}reset(e){let t=this.resetSelectedValue();this.select(t!==void 0?u$3.getOptionByValue(this._data,t)??null:null),e&&this.stopEvent(e),this._focus(!0)}prevChange(e){e.stopPropagation()}stopEvent(e){e.preventDefault(),e.stopPropagation()}toggleOpenAndClose(e=!0,t,n){if(this.disabledState||this.readonly())return;this._focus(e);let o=n&&this._testKey(n,Xt),s=this.isOpen!==(t??!this.isOpen);this.isOpen=t??!this.isOpen,this.isOpen?(this.isSearchboxHidden||(this.innerSearchText=``,this.updateFilteredData(),this._focusSearchbox(e)),this._shouldKeyDownOnOpen(s,n)?this.keyDown(n):(this._scrollToInitialOption(),this._handleOnOpenAction(o,n),this._changeDetectorRef.markForCheck(),this.triggerRect(),this.cdkConnectedOverlay().overlayRef?.updatePosition()),s&&this.open.emit(this)):s&&this.close.emit(this),this._changeDetectorRef.markForCheck()}hasTemplate(e,t,n=!1){let o=this.templates(),s=this.templates();return(n?o?.[e.templateSelectionId??``]instanceof mo$2||o?.[`${t}Selection`]instanceof mo$2||o?.templateSelection instanceof mo$2||this.templateSelection()instanceof mo$2:!1)||s?.[e.templateId??``]instanceof mo$2||s?.[t]instanceof mo$2||s?.template instanceof mo$2||s instanceof mo$2||!1}getTemplate(e,t,n=!1){let o=this.templates(),s=this.templates();return this.hasTemplate(e,t,n)?(n?o?.[e.templateSelectionId??``]||o?.[`${t}Selection`]||o?.templateSelection||this.templateSelection():void 0)||s?.[e.templateId??``]||s?.[t]||s?.template||s:void 0}getContext(e){return x$3(w$4({},e),{searchText:this.searchText,highlightText:this.highlightText()})}triggerRect(){this._triggerRect=this.selectionElement?.getBoundingClientRect();let e=this.dropdown();this._dropdownRect=e?.nativeElement?e.nativeElement.getBoundingClientRect():void 0}isNumber(e){return!isNaN(e-0)&&e!==null&&e!==``&&e!==!1}
20selectAll(){if(this.multiple()){if(this.selectAllTest())this.selectedOption=[],this.writeValue([]);else{let e=[];this._data.forEach(t=>{u$3.isGroup(t)?t.options.forEach(n=>{!n.disabled&&!n.hide&&e.push(n)}):!t.disabled&&!t.hide&&e.push(t)}),this.selectedOption=e,this.writeValue(e.map(t=>t.value))}this.isOpen=!1,this.close.emit(this)}}selectAllTest(){if(this.multiple()&&Array.isArray(this.selectedOption)&&this.selectedOption.length){let e=0;return this._data.forEach(t=>{u$3.isGroup(t)?t.options.forEach(n=>{!n.disabled&&!n.hide&&e++}):!t.disabled&&!t.hide&&e++}),this.selectedOption.length===e}return!1}testSelection(e){if(e.disabled)return!1;let t=this.limitSelection();return!this.multiple()||!t||this.optionsSize()<t}testValueChange(e,t){if(e==null&&t==null||e===t)return!1;if(this.multiple()&&e?.length&&t?.length&&e.length===t.length){for(let n of e)if(!(t.indexOf(n)>-1))return!0;return!1}return!0}updateFilteredData(){let e=this._data;if(this.multiple()&&this.hideSelectedItems()&&(e=u$3.getFilteredSelectedData(e,this.selectedOption)),!this.customSearchEnabled()&&this.searchText&&this.searchText.length>=+this.minCharForSearch()&&(e=u$3.getFilteredData(e,this.searchText,this.editPattern())),this.maxResults()>0){let t=u$3.getReduceData(e,+this.maxResults());e=t.result,this.maxResultsExceeded=t.reduce}else this.maxResultsExceeded=!1;if(u$3.optionIsNotInFilteredData(e,this.hoveringOption())&&this.hoveringOption.set(u$3.getFirstAvailableOption(e)),this.filteredData.set(e),this.multiple()&&Array.isArray(this.selectedOption)&&this.selectedOption.length){let t=[],n=this.selectedOption.map(o=>o.value);this._data.forEach(o=>{u$3.isGroup(o)?o.options.forEach(s=>{n.includes(s.value)&&t.push(s)}):n.includes(o.value)&&t.push(o)}),this.selectedOption=this.selectedOption.map(o=>t.find(s=>s.value===o.value))}else if(!Array.isArray(this.selectedOption)&&this.selectedOption){let t=null;this._data.forEach(n=>{u$3.isGroup(n)?n.options.forEach(o=>{this.selectedOption.value===o.value&&(t=o)}):this.selectedOption.value===n.value&&(t=n)}),this.selectedOption=t}this._changeDetectorRef.markForCheck()}clickExit(){this._focus(!1)}isInSelect(e){return this.ifParentContainsId(e,this.id())||this.ifParentContainsId(e,this.idOverlay())}ifParentContainsClass(e,t){return this.getParentElementByClass(e,t)!==null}ifParentContainsId(e,t){return this.getParentElementById(e,t)!==null}getParentElementByClass(e,t){return this.containClasses(e,t.trim().split(/\s+/))?e:e.parentElement?this.getParentElementByClass(e.parentElement,t):null}getParentElementById(e,t){return e.id===t?e:e.parentElement?this.getParentElementById(e.parentElement,t):null}containClasses(e,t){if(!e.classList)return!1;for(let n of t)if(!e.classList.contains(n))return!1;return!0}containAlmostOneClasses(e,t){let n=!1;for(let o of t)e.classList.contains(o)&&(n=!0);return n}clickOnSelect2Element(e){return this.containAlmostOneClasses(e,[`select2-overlay-backdrop`,`select2-label-content`,`select2-selection__rendered`,`select2-results__option`])}focusin(e){this.disabledState||this._focus(!0,e)}focusout(e){(!e.relatedTarget||!this.isInSelect(e.relatedTarget))&&(this._focus(!1),this._onTouched())}select(e,t=!0,n=!0){let o;if(e!=null)if(this.multiple()){this.selectedOption??=[];let s=this.selectedOption,g=s.findIndex(y=>y.value===e.value);g===-1?s.push(e):s.splice(g,1),o=this.selectedOption.map(y=>y.value)}else this.selectedOption=e,n&&this.isOpen&&(this.isOpen=!1,this.close.emit(this),this.selectionElement?.focus()),o=this.selectedOption.value;else(Array.isArray(this.selectedOption)?this.selectedOption.length>0:this.selectedOption)&&(o=``),this.selectedOption=null;this.multiple()&&this.hideSelectedItems()&&this.updateFilteredData(),t&&=o!==void 0&&this.testDiffValue(this._value,o),this._control&&this._onChange(o),t&&(this.writeValue(o),setTimeout(()=>{this._destroyed||this.updateEvent(o)}))}testDiffValue(e,t){return Array.isArray(e)?e.length!==t.length:e!==t}keyDown(e,t=!1){t&&this._testKey(e,[`Enter`])&&e.target.value?.trim()?this.createAndAdd(e):this._testKey(e,[{key:`ArrowDown`,altKey:!1}])?(this.moveDown(),this.actionAfterKeyDownMoveAction(e)):this._testKey(e,[{key:`ArrowUp`,altKey:!1}])?(this.moveUp(),this.actionAfterKeyDownMoveAction(e)):this._testKey(e,[`Home`])?(this.moveStart(),this.actionAfterKeyDownMoveAction(e)):this._testKey(e,[`End`])?(this.moveEnd(),this.actionAfterKeyDownMoveAction(e)):this._testKey(e,[`PageUp`])?(this.moveUp(10),this.actionAfterKeyDownMoveAction(e)):this._testKey(e,[`PageDown`])?(this.moveDown(10),this.actionAfterKeyDownMoveAction(e)):this._testKey(e,[`Enter`])?(this.selectByEnter(!0),e.preventDefault()):this.isSearchboxHidden&&this._testKey(e,[` `])?this.prevChange(e):this._testKey(e,ze$1)&&this.isOpen&&(this.toggleOpenAndClose(),this._focus(!0))}actionAfterKeyDownMoveAction(e){e.preventDefault(),this.nativeKeyboard()&&!this.multiple()&&this.selectByEnter(!1)}openKey(e,t=!1){if(t&&this._testKey(e,[`Enter`])){this.createAndAdd(e);return}if(this._testKey(e,this.nativeKeyboard()&&!this.multiple()?Yt:Qt$1)){this.toggleOpenAndClose(!0,!0,e),e.preventDefault();return}if(this.nativeKeyboard()&&!this.multiple()&&this._testKey(e,Wt)){this.updateScrollFromOption(this.select2Option),this.keyDown(e,t);return}this._closeOnKey(e)}_closeOnKey(e){this._testKey(e,ze$1)&&this.isOpen&&(this.toggleOpenAndClose(),this._onTouched())}_shouldKeyDownOnOpen(e,t){return!!(this.isSearchboxHidden&&!e&&t)}_handleOnOpenAction(e,t){e&&this.keyDown(t)}_scrollToInitialOption(){if(this.selectedOption){let e=Array.isArray(this.selectedOption)?this.selectedOption[0]:this.selectedOption;this.updateScrollFromOption(e);return}this.resultsElement&&(this.resultsElement.scrollTop=0)}searchUpdate(e){this.searchText=e.target.value,this.customSearchEnabled()?this.search.emit({component:this,value:this._value,search:this.searchText,data:this._data,filteredData:t=>{this.filteredData.set(t)}}):this.updateFilteredData()}isSelected(e){return u$3.isSelected(this.selectedOption,e,this.multiple())}isDisabled(e){return e.disabled?`true`:`false`}removeSelection(e,t){if(this.readonly()||this.disabledState)return;u$3.removeSelection(this.selectedOption,t),this.multiple()&&this.hideSelectedItems()&&this.updateFilteredData();let n=this.selectedOption.map(o=>o.value);this._control?this._onChange(n):this._value=n,this.updateEvent(n),this.removeOption.emit({component:this,value:n,removedOption:t}),e.preventDefault(),e.stopPropagation(),this.isOpen?this._focusSearchbox():this._focus(!0)}writeValue(e){this.selectedOption=null,this._setSelectionByValue(this.multiple()?e??[]:e),this.testValueChange(this._value,e)&&(this._value=e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e}onScroll(e){this.scroll.emit({component:this,way:e,search:this.innerSearchText,data:this._data})}_setupScrollListener(){let e=this.resultsElement;!e||!this.infiniteScroll()||this.toObservable.add(ga$2(e,`scroll`).pipe(Ed$1(this.infiniteScrollThrottle())).subscribe(()=>this._onScrollEvent(e.scrollTop,e.clientHeight,e.scrollHeight)))}_onScrollEvent(e,t,n){let o=n*this.infiniteScrollDistance()/10;e+t>=n-o?this.onScroll(`down`):e<=o&&this.onScroll(`up`)}drop(e){if(Array.isArray(this.selectedOption)){jt$1(this.selectedOption,e.previousIndex,e.currentIndex);let t=this.selectedOption.map(n=>n.value);this.writeValue(t),this._value=t,this.updateEvent(t)}}
20_isErrorState(){let e=this._control?.invalid,t=this._control?.touched,n=this._isFormSubmitted();return!!(e&&(t||n))}_isFormSubmitted(){return this._parentFormGroup?this._parentFormGroup.submitted:this._parentForm?this._parentForm.submitted:!1}_selectionOverrideLabel(){let e=this.selectionOverride();if(typeof e==`function`)return e({size:this.optionsSize(),options:Array.isArray(this.selectedOption)?this.selectedOption:this.selectedOption?[this.selectedOption]:null});if(typeof e==`string`)return e.replaceAll(`%size%`,`${this.optionsSize()}`)}getElementId(e){if(e){if(e.id)return e.id}else return e;let[t,n]=this._getElementPath(e);return e.id=`${this.id()}-option${this._toSuffix(t)}${this._toSuffix(n)}`,e.id}_toSuffix(e){return e!==void 0?`-${e}`:``}_getElementPath(e){for(let t=0;t<this._data.length;t++){let n=this._data[t];if(n===e)return[t];if(u$3.isGroup(n)){let o=n.options.findIndex(s=>s===e);if(o>=0)return[t,o]}}return[]}_toGroup(e){return e}_toOption(e){return e}updateEvent(e){this.update.emit({component:this,value:e,options:Array.isArray(this.selectedOption)?this.selectedOption:this.selectedOption?[this.selectedOption]:null})}optionsSize(){return Array.isArray(this.selectedOption)?this.selectedOption.length:this.selectedOption?1:0}addItem(e){let t=u$3.getOptionByValue(this._data,e);return t||(t={value:e,label:e},this._data.push(t)),t}createAndAdd(e){let t=e.target.value;if(t.trim()){e.target.value=``,this.searchText=``;let n=this.addItem(t.trim());this.click(n),this.updateFilteredData();let o=Array.isArray(this.selectedOption)?this.selectedOption:[this.selectedOption];this.autoCreateItem.emit({value:n,component:this,options:o})}this.stopEvent(e)}moveUp(e=1){for(let t=0;t<e;t++)this.updateScrollFromOption(u$3.getPreviousOption(this.filteredData(),this.hoveringOption()))}moveDown(e=1){for(let t=0;t<e;t++)this.updateScrollFromOption(u$3.getNextOption(this.filteredData(),this.hoveringOption()))}moveStart(){this.updateScrollFromOption(u$3.getFirstOption(this.filteredData()))}moveEnd(){this.updateScrollFromOption(u$3.getLastOption(this.filteredData()))}updateScrollFromOption(e){if(e){this.hoveringOption.set(e);let t=this.results().find(n=>n.nativeElement.innerText.trim()===e.label);if(t&&this.resultsElement){let n=this.resultsElement.getBoundingClientRect(),o=t.nativeElement.getBoundingClientRect();o.bottom>n.bottom?this.resultsElement.scrollTop+=o.bottom-n.bottom:n.top>o.top&&(this.resultsElement.scrollTop+=o.top-n.top)}}}selectByEnter(e=!1){let t=this.hoveringOption();t&&this.select(t,!0,e)}_testKey(e,t=[]){let{key:n,altKey:o}=e;return t.some(s=>typeof s==`string`?s===n:n===s.key&&o===s.altKey)}_setSelectionByValue(e){if(this.selectedOption||e!=null){let t=Array.isArray(e);if(this.multiple()&&e&&!t)throw new Error(`Non array value.`);this._data?this.multiple()?(Array.isArray(this.selectedOption)||(this.selectedOption=[]),t?this._preselectArrayValue(e):e===null&&(this._value=[],this.reset(),this.select(null,!1),this.updateEvent(this._value))):(this._value=e,this.select(u$3.getOptionByValue(this._data,this._value),this.isOpen,!1)):this._control&&this._control.viewToModelUpdate(e),this._changeDetectorRef.markForCheck()}}_preselectArrayValue(e){u$3.getOptionsByValue(this._data,e,this.multiple()).forEach(t=>this.select(t,!1)),this._value??=e,this.testDiffValue(this._value,e)&&this.updateEvent(e)}_dirtyCheckNativeValue(){let e=this.value();this._previousNativeValue!==e&&(this._previousNativeValue=e,this._stateChanges.next())}_focusSearchbox(e=!0){this.isSearchboxHidden||setTimeout(()=>{let t=this.searchInput();t&&t.nativeElement&&e&&t.nativeElement.focus()})}_focus(e,t){if(e){let n=!this.isSearchboxHidden&&this.isOpen?this.searchInput().nativeElement:this.selection().nativeElement;document.activeElement!==n&&n.focus(t)}else{let n=this.selection(),o=this.searchInput(),s=n?n.nativeElement:null,g=o?o.nativeElement:null;(document.activeElement===s||document.activeElement===g)&&document.activeElement.blur()}this._updateFocusState(e)}_isAbobeOverlay(){let e=this.listPosition(),t=this._overlayPosition();return this.overlay()&&t&&e===`auto`?t===`top`:e===`above`}_updateFocusState(e){!e&&this.focused?(this.focused=e,this.blur.emit(this)):e&&!this.focused&&(this.focused=e,this.focus.emit(this))}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=yT({type:i,selectors:[[`select2`],[`ng-select2`]],contentQueries:function(t,n,o){t&1&&yy(o,n._ngOptions,Z$1,4)(o,n._ngGroups,Ke$3,4),t&2&&f_$1(2)},viewQuery:function(t,n){t&1&&vy(n.cdkConnectedOverlay,me$5,5)(n.selection,je$2,5)(n.resultContainer,Ge$1,5)(n.results,Ue$1,5)(n.searchInput,qe$1,5)(n.dropdown,Ye$2,5),t&2&&f_$1(6)},hostVars:11,hostBindings:function(t,n){t&1&&fy(`click`,function(s){return n.clickDetection(s)},FD),t&2&&(zm$1(`id`,n.id()),Ty(`select2-selection-nowrap`,n.selectionNoWrap())(`material`,n.classMaterial())(`nostyle`,n.classNostyle())(`borderless`,n.classBorderless())(`select2-above`,n.select2above()))},inputs:{data:[1,`data`],minCharForSearch:[1,`minCharForSearch`],displaySearchStatus:[1,`displaySearchStatus`],placeholder:[1,`placeholder`],limitSelection:[1,`limitSelection`],listPosition:[1,`listPosition`],overlay:[1,`overlay`],multiple:[1,`multiple`],multipleDrag:[1,`multipleDrag`],styleMode:[1,`styleMode`],noResultMessage:[1,`noResultMessage`],maxResults:[1,`maxResults`],maxResultsMessage:[1,`maxResultsMessage`],infiniteScrollDistance:[1,`infiniteScrollDistance`],infiniteScrollThrottle:[1,`infiniteScrollThrottle`],infiniteScroll:[1,`infiniteScroll`],autoCreate:[1,`autoCreate`],noLabelTemplate:[1,`noLabelTemplate`],editPattern:[1,`editPattern`],templates:[1,`templates`],templateSelection:[1,`templateSelection`],resultMaxHeight:[1,`resultMaxHeight`],customSearchEnabled:[1,`customSearchEnabled`],minCountForSearch:[1,`minCountForSearch`],id:[1,`id`],required:[1,`required`],disabled:[1,`disabled`],hideSelectedItems:[1,`hideSelectedItems`],readonly:[1,`readonly`],value:[1,`value`],tabIndex:[1,`tabIndex`],resettable:[1,`resettable`],resetSelectedValue:[1,`resetSelectedValue`],nativeKeyboard:[1,`nativeKeyboard`],highlightText:[1,`highlightText`],grid:[1,`grid`],selectionOverride:[1,`selectionOverride`],selectionNoWrap:[1,`selectionNoWrap`],showSelectAll:[1,`showSelectAll`],showOptionCheckbox:[1,`showOptionCheckbox`],removeAllText:[1,`removeAllText`],selectAllText:[1,`selectAllText`],title:[1,`title`],ariaLabelledby:[1,`ariaLabelledby`],ariaDescribedby:[1,`ariaDescribedby`],ariaInvalid:[1,`ariaInvalid`],ariaResetButtonDescription:[1,`ariaResetButtonDescription`]},outputs:{update:`update`,autoCreateItem:`autoCreateItem`,open:`open`,close:`close`,focus:`focus`,blur:`blur`,search:`search`,scroll:`scroll`,removeOption:`removeOption`},features:[CE],ngContentSelectors:Qe$3,decls:19,vars:39,consts:[[`selection`,``,`trigger`,`cdkOverlayOrigin`],[`containerTemplate`,``],[`resetButton`,``],[`dropdown`,``],[`searchInput`,``],[`results`,``],[`result`,``],[1,`select2-label`,3,`click`,`id`],[`aria-hidden`,`true`,1,`select2-required`],[1,`select2`,`select2-container`,`select2-container--default`],[`role`,`combobox`,`aria-haspopup`,`listbox`,`cdkOverlayOrigin`,``,1,`selection`,3,`click`,`focus`,`focusout`,`keydown`,`id`,`tabindex`],[1,`select2-selection`],[1,`select2-sub
20script-wrapper`],[`cdkConnectedOverlay`,``,`cdkConnectedOverlayHasBackdrop`,``,`cdkConnectedOverlayBackdropClass`,`select2-overlay-backdrop`,3,`backdropClick`,`cdkConnectedOverlayOrigin`,`cdkConnectedOverlayOpen`,`cdkConnectedOverlayMinWidth`,`cdkConnectedOverlayHeight`,`cdkConnectedOverlayPositions`],[1,`select2-selection__override`,3,`innerHTML`],[4,`ngTemplateOutlet`],[1,`select2-selection__rendered`,3,`title`,`dir`],[1,`select2-selection__placeholder`],[`role`,`presentation`,1,`select2-selection__arrow`],[3,`innerHTML`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`cdkDropList`,``,`cdkDropListOrientation`,`mixed`,1,`select2-selection__rendered`,3,`cdkDropListDropped`,`cdkDropListDisabled`],[1,`select2-selection__placeholder`,3,`select2-selection__placeholder__option`],[`tabindex`,`0`,`cdkDrag`,``,1,`select2-selection__choice`,3,`title`],[1,`select2-selection__auto-create`],[`tabindex`,`0`,`cdkDrag`,``,1,`select2-selection__choice`,3,`focus`,`keydown.enter`,`title`],[`role`,`presentation`,`aria-hidden`,`true`,1,`select2-selection__choice__remove`],[`role`,`presentation`,`aria-hidden`,`true`,1,`select2-selection__choice__remove`,3,`click`],[1,`select2-selection__auto-create`,3,`focus`,`blur`],[`type`,`search`,`role`,`textbox`,`autocomplete`,`off`,`autocorrect`,`off`,`autocapitalize`,`off`,`spellcheck`,`false`,1,`select2-create__field`,3,`click`,`keydown`,`keyup`,`change`,`id`,`placeholder`],[1,`select2-container`,`select2-container--default`,`select2-container-dropdown`,3,`id`],[1,`select2-dropdown`],[1,`select2-search`,`select2-search--dropdown`],[`type`,`search`,`role`,`combobox`,`autocomplete`,`off`,`autocorrect`,`off`,`autocapitalize`,`off`,`spellcheck`,`false`,`aria-autocomplete`,`list`,`aria-expanded`,`true`,1,`select2-search__field`,3,`keydown`,`keyup`,`change`,`id`,`value`],[1,`select2-results`],[`role`,`listbox`,`tabindex`,`-1`,1,`select2-results__options`,3,`keydown`,`id`],[`tabindex`,`1`,`aria-selected`,``,1,`select2-results__option`,`select2-selectall`],[1,`select2-no-result`,`select2-results__option`,3,`innerHTML`],[1,`select2-too-much-result`,`select2-results__option`,3,`innerHTML`],[`tabindex`,`1`,`aria-selected`,``,1,`select2-results__option`,`select2-selectall`,3,`click`],[1,`select2-label-content`],[1,`select2-results__option`,`select2-results__group`,3,`dir`],[`role`,`option`,3,`id`,`class`,`dir`],[3,`id`],[`role`,`group`,1,`select2-results__options`,`select2-results__options--nested`],[`role`,`option`,3,`mouseenter`,`click`,`id`,`dir`],[`type`,`checkbox`,`aria-hidden`,`true`,`tabindex`,`-1`,1,`select2-option-checkbox`,3,`checked`,`disabled`],[1,`select2-label-content`,3,`innerHTML`],[`type`,`button`,1,`select2-selection__reset`,3,`focus`,`click`,`keydown`],[`aria-hidden`,`true`]],template:function(t,n){if(t&1&&(a_$1(We$2),bs$1(0,`label`,7),fy(`click`,function(){return n.toggleOpenAndClose()}),c_$1(1),DC(2,Ze$1,1,0,`span`,8),Mu(),bs$1(3,`div`,9)(4,`div`,10,0),fy(`click`,function(){return n.toggleOpenAndClose()})(`focus`,function(){return n.focusin()})(`focusout`,function(s){return n.focusout(s)})(`keydown`,function(s){return n.openKey(s)}),bs$1(7,`div`,11),DC(8,tt$1,2,2)(9,at$1,7,9)(10,Ot,6,5),Mu()(),DC(11,Mt$1,1,1,`ng-container`),bs$1(12,`div`,12),c_$1(13,1),Mu()(),Dm$1(14,vt$1,1,1,`ng-template`,13),fy(`backdropClick`,function(){return n.toggleOpenAndClose()}),Dm$1(15,zt,14,36,`ng-template`,null,1,lM)(17,$t,3,2,`ng-template`,null,2,lM)),t&2){let o=p_$1(6);Vm$1(`id`,n.idLabel()),xb(2),bC(n.required()?2:-1),xb(),Ty(`select2-container--focus`,n.focused)(`select2-container--below`,!n.select2above())(`select2-container--above`,n.select2above())(`select2-container--open`,n.isOpen)(`select2-container--disabled`,n.disabled())(`select2-container--readonly`,n.readonly()),xb(),Ty(`select2-focused`,n.focused),Vm$1(`id`,n.idCombo())(`tabindex`,n.isOpen?`-1`:n._tabIndex),jm$1(`aria-labelledby`,n.ariaLabelledby()??n.idLabel())(`aria-expanded`,n.isOpen)(`aria-controls`,n.idOptions())(`aria-activedescendant`,n.isOpen?n.hoveringOptionId():null)(`aria-describedby`,n.ariaDescribedby())(`title`,n.title())(`aria-invalid`,n._isErrorState()||n.ariaInvalid()?`true`:null)(`aria-required`,n.required()?`true`:null)(`aria-readonly`,n.readonly()?`true`:null)(`aria-disabled`,n.disabled()?`true`:null),xb(3),Ty(`select2-selection--multiple`,n.multiple())(`select2-selection--single`,!n.multiple()),xb(),bC(n.selectionOverride()?8:n.multiple()?10:9),xb(3),bC(n.overlay()?-1:11),xb(3),Vm$1(`cdkConnectedOverlayOrigin`,o)(`cdkConnectedOverlayOpen`,n.isOpen&&n.overlay())(`cdkConnectedOverlayMinWidth`,n.overlayWidth)(`cdkConnectedOverlayHeight`,n.overlayHeight)(`cdkConnectedOverlayPositions`,n._positions())}},dependencies:[mt$3,cn,me$5,Ue$2,We$3,Ut$1],styles:[`.select2-label[_ngcontent-%COMP%]{color:var(--%NS%select2-label-text-color, #000)}.select2-container[_ngcontent-%COMP%]{display:inline-block;position:relative;vertical-align:middle;box-sizing:border-box;margin:0;width:100%}.select2-container[_ngcontent-%COMP%]   .select2-container-dropdown[_ngcontent-%COMP%]{position:absolute;opacity:0;width:0px}.select2-container[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]{display:block;cursor:pointer;box-sizing:border-box;height:var(--%NS%select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]{display:block;flex:1 1 auto;
20padding:var(--%NS%select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__clear[_ngcontent-%COMP%]{position:relative}.select2-container[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{display:block;cursor:pointer;box-sizing:border-box;min-height:var(--%NS%select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;gap:var(--%NS%select2-selection-multiple-gap, 2px 5px);padding-bottom:2px;padding-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]   .select2-selection__auto-create[_ngcontent-%COMP%]{display:flex;flex:1 1 150px;min-width:150px}.select2-container[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]   .select2-create__field[_ngcontent-%COMP%]{border:0;width:100%}.select2-container[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]   .select2-create__field[_ngcontent-%COMP%]:focus{outline:0;border:0}.select2-container[_ngcontent-%COMP%]   .select2-search--inline[_ngcontent-%COMP%]{float:left}.select2-container[_ngcontent-%COMP%]   .select2-search--inline[_ngcontent-%COMP%]   .select2-search__field[_ngcontent-%COMP%]{box-sizing:border-box;margin-top:5px;border:none;padding:0;font-size:100%}.select2-container[_ngcontent-%COMP%]   .select2-search--inline[_ngcontent-%COMP%]   .select2-search__field[_ngcontent-%COMP%]::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown[_ngcontent-%COMP%]{display:block;position:absolute;z-index:1051;box-sizing:border-box;border:1px solid var(--%NS%select2-dropdown-border-color, #aaa);border-radius:var(--%NS%select2-selection-border-radius, 4px);background:var(--%NS%select2-dropdown-background, white);width:100%;height:0;overflow:hidden}.select2-dropdown[_ngcontent-%COMP%]   .select2-label-content[_ngcontent-%COMP%]{display:contents}.select2-results[_ngcontent-%COMP%]{display:block}.select2-results__options[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}.select2-results__options[_ngcontent-%COMP%]     .select2-highlight-text{background:var(--%NS%select2-highlight-text-background, transparent);color:var(--%NS%select2-highlight-text-color, inherit);font-weight:var(--%NS%select2-highlight-text-font-weight, 800)}.select2-results__option[_ngcontent-%COMP%]{padding:var(--%NS%select2-option-padding, 6px);color:var(--%NS%select2-option-text-color, #000);-webkit-user-select:none;user-select:none;text-align:initial}.select2-results__option[aria-selected][_ngcontent-%COMP%]{cursor:pointer}.select2-results__option[_ngcontent-%COMP%]   .select2-option-checkbox[_ngcontent-%COMP%]{vertical-align:middle;margin-inline-end:var(--%NS%select2-option-checkbox-margin, 6px);pointer-events:none;accent-color:var(--%NS%select2-option-checkbox-color, currentColor)}.select2-results__option[_ngcontent-%COMP%]:has(>.select2-option-checkbox){display:flex}.select2-container.select2-container-dropdown.select2-container--open[_ngcontent-%COMP%]{opacity:1;width:100%}.select2-container--open[_ngcontent-%COMP%]   .select2-dropdown[_ngcontent-%COMP%]{height:auto;overflow:auto}.select2-container--open[_ngcontent-%COMP%]   .select2-dropdown--above[_ngcontent-%COMP%]{display:flex;bottom:27px;flex-direction:column-reverse;border-bottom:var(--%NS%select2-dropdown-above-border-bottom, none);border-bottom-right-radius:var(--%NS%select2-dropdown-above-border-bottom-right-radius, 0);border-bottom-left-radius:var(--%NS%select2-dropdown-above-border-bottom-left-radius, 0)}.select2-container--open[_ngcontent-%COMP%]   .select2-dropdown--below[_ngcontent-%COMP%]{border-top:var(--%NS%select2-dropdown-below-border-top, none);border-top-right-radius:var(--%NS%select2-dropdown-below-border-top-right-radius, 0);border-top-left-radius:var(--%NS%select2-dropdown-below-border-top-left-radius, 0)}.select2-search--dropdown[_ngcontent-%COMP%]{display:block;padding:4px}.select2-search--dropdown[_ngcontent-%COMP%]   .select2-search__field[_ngcontent-%COMP%]{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown[_ngcontent-%COMP%]   .select2-search__field[_ngcontent-%COMP%]::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide[_ngcontent-%COMP%]{display:none}.select2-close-mask[_ngcontent-%COMP%]{display:block;position:fixed;top:0;left:0;opacity:0;z-index:99;margin:0;border:0;padding:0;width:auto;min-width:100%;height:auto;min-height:100%}.select2-required[_ngcontent-%COMP%]:before{content:"*";color:var(--%NS%select2-required-color, red)}.select2-hidden-accessible[_ngcontent-%COMP%]{border:0!important;clip:rect(0 0 0 0)!important;position:absolute!important;margin:-1px!important;padding:0!important;width:1px!important;height:1px!important;overflow:hidden!important}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]{display:flex;border:1px solid var(--%NS%select2-selection-border-color, #aaa);border-radius:var(--%NS%select2-selection-border-radius, 4px);background:var(--%NS%select2-selection-background, #fff)}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]{color:var(--%NS%select2-selection-text-color, #111);line-height:var(--%NS%select2-selection-line-height, 28px)}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__clear[_ngcontent-%COMP%]{float:right;cursor:pointer;font-weight:700}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__placeholder[_ngcontent-%COMP%]{color:var(--%NS%select2-placeholder-color, #999)}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__placeholder[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:var(--%NS%select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__placeholder__option[_ngcontent-%COMP%]{display:none}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__override[_ngcontent-%COMP%]{flex:1;margin:0 5px}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__reset[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__arrow[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:20px}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__arrow[_ngcontent-%COMP%]:before{border-width:5px 4px 0;border-style:solid;border-color:var(--%NS%select2-arrow-color, #888) transparent;width:0;height:0;content:" "}.select2-container--default[_ngcontent-%COMP%]   .select2-selection__reset[_ngcontent-%COMP%]{align-self:center;border:var(--%NS%select2-reset-border, none);border-radius:var(--%NS%select2-reset-border-radius, 4px);background:var(--%NS%select2-reset-background, transparent);height:fit-content;color:var(--%NS%select2-reset-color, #999)}.select2-container--default.select2-container--disabled[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__clear[_ngcontent-%COMP%], .select2-container--default.select2-container--disabled[_ngcontent-%COMP%]   .select2-selection__choice__remove[_ngcontent-%COMP%], .select2-container--default.select2-container--readonly[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__clear[_ngcontent-%COMP%], .select2-container--default.select2-container--readonly[_ngcontent-%COMP%]   .select2-selection__choice__remove[_ngcontent-%COMP%]{display:none}.select2-container--default.select2-container--disabled[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .select2-container--default.select2-container--disabled[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{cursor:default;background:var(--%NS%select2-selection-disabled-background, #eee)}.select2-container--default.select2-container--readonly[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .select2-container--default.select2-container--readonly[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{background:var(--%NS%select2-selection-readonly-background, #eee)}.select2-container--default.select2-container--open[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__arrow[_ngcontent-%COMP%]:before{border-width:0 4px 5px;border-color:transparent transparent var(--%NS%select2-arrow-color, #888)}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{display:flex;cursor:text;border:1px solid var(--%NS%select2-selection-border-color, #aaa);border-radius:var(--%NS%select2-selection-border-radius, 4px);background:var(--%NS%select2-selection-background, #fff)}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]{flex:1 1 auto;align-items:center;box-sizing:border-box;margin:0;padding:var(--%NS%select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;list-style:none}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{line-height:var(--%NS%select2-selection-choice-line-height, 20px);list-style:none}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__placeholder[_ngcontent-%COMP%]{display:block;float:left;margin:-3px 0;width:100%;overflow:hidden;color:var(--%NS%select2-placeholder-color, #999);text-overflow:var(--%NS%select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__placeholder__option[_ngcontent-%COMP%]{display:none}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__override[_ngcontent-%COMP%]{flex:1;margin:0 5px}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__clear[_ngcontent-%COMP%]{float:right;cursor:pointer;margin-top:5px;margin-right:10px;font-weight:700}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__choice[_ngcontent-%COMP%]{cursor:default;border:1px solid var(--%NS%select2-selection-choice-border-color, #aaa);border-radius:var(--%NS%select2-selection-border-radius, 4px);background:var(--%NS%select2-selection-choice-background, #e4e4e4);padding:0 5px;color:var(--%NS%select2-selection-choice-text-color, #000)}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__choice.cdk-drag[_ngcontent-%COMP%]:not(.cdk-drag-disabled){cursor:move}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__choice__remove[_ngcontent-%COMP%]{display:inline-block;cursor:pointer;margin-right:2px;color:var(--%NS%select2-selection-choice-close-color, #999);font-weight:700}.select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__choice__remove[_ngcontent-%COMP%]:hover{color:var(--%NS%select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{outline:none;border:solid var(--%NS%select2-selection-focus-border-color, #000) 1px}.select2-container--%NS%default[_ngcontent-%COMP%]:not(.select2-container--open)   .select2-focused[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .select2-container--%NS%default[_ngcontent-%COMP%]:not(.select2-container--open)   .select2-focused[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{outline:none;border:solid var(--%NS%select2-selection-focus-border-color, #000) 1px}.select2-container--default.select2-container--open.select2-container--above[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .select2-container--default.select2-container--open.select2-container--above[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{border-top-right-radius:0;border-top-left-radius:0}.select2-container--default.select2-container--open.select2-container--below[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .select2-container--default.select2-container--open.select2-container--below[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{border-bottom-right-radius:0;border-bottom-left-radius:0}.select2-container--default[_ngcontent-%COMP%]   .select2-search--dropdown[_ngcontent-%COMP%]   .select2-search__field[_ngcontent-%COMP%]{border:1px solid var(--%NS%select2-search-border-color, #aaa);border-radius:var(--%NS%select2-search-border-radius, 0px);background:1px solid var(--%NS%select2-search-background, #fff)}.select2-container--default[_ngcontent-%COMP%]   .select2-search--inline[_ngcontent-%COMP%]   .select2-search__field[_ngcontent-%COMP%]{-webkit-appearance:textfield;outline:none;box-shadow:none;border:none;background:transparent}.select2-container--default[_ngcontent-%COMP%]   .select2-results[_ngcontent-%COMP%] > .select2-results__options[_ngcontent-%COMP%]{overflow-y:auto}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option.select2-results__group[_ngcontent-%COMP%]{grid-column:col-start/col-end;padding:0}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option[aria-disabled=true][_ngcontent-%COMP%]{background:var(--%NS%select2-option-disabled-background, transparent);color:var(--%NS%select2-option-disabled-text-color, #999)}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option[aria-selected=true][_ngcontent-%COMP%]{background:var(--%NS%select2-option-selected-background, #ddd);color:var(--%NS%select2-option-selected-text-color, #000)}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]{padding-left:1em}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__group[_ngcontent-%COMP%]{padding-left:0}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]{margin-left:-1em;padding-left:2em}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]{margin-left:-2em;padding-left:3em}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]{margin-left:-3em;padding-left:4em}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]{margin-left:-4em;padding-left:5em}.select2-container--d
20efault[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]{margin-left:-5em;padding-left:6em}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option--highlighted[aria-selected][_ngcontent-%COMP%]{background:var(--%NS%select2-option-highlighted-background, #5897fb);color:var(--%NS%select2-option-highlighted-text-color, #fff)}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option--highlighted[aria-selected][_ngcontent-%COMP%]     .select2-highlight-text{background:var(--%NS%select2-highlighted-highlight-text-background, transparent);color:var(--%NS%select2-highlighted-highlight-text-color, inherit);font-weight:var(--%NS%select2-highlighted-highlight-text-font-weight, 800)}.select2-container--default[_ngcontent-%COMP%]   .select2-results__option--hide[_ngcontent-%COMP%]{display:none}.select2-container--default[_ngcontent-%COMP%]   .select2-results__group[_ngcontent-%COMP%]{display:block;cursor:default;background:var(--%NS%select2-option-group-background, transparent);padding:6px;color:var(--%NS%select2-option-group-text-color, gray)}.select2-no-result[_ngcontent-%COMP%]{color:var(--%NS%select2-no-result-color, #888);font-style:var(--%NS%select2-no-result-font-style, italic)}.select2-too-much-result[_ngcontent-%COMP%]{color:var(--%NS%select2-too-much-result-color, #888);font-style:var(--%NS%select2-too-much-font-style, italic)}.select2-grid[_ngcontent-%COMP%], .select2-grid[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:grid;grid-template-columns:[col-start] repeat(var(--%NS%grid-size),1fr) [col-end]}.select2-grid-auto[_ngcontent-%COMP%], .select2-grid-auto[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--%NS%grid-size, 100px),1fr)) [col-end]}.select2-container--default[_ngcontent-%COMP%]   .select2-grid[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid-auto[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{padding-left:var(--%NS%select2-option-padding, 6px)}.select2-container--default[_ngcontent-%COMP%]   .select2-grid[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__group[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid-auto[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__group[_ngcontent-%COMP%]{padding-left:0}.select2-container--default[_ngcontent-%COMP%]   .select2-grid[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid-auto[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid-auto[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid-auto[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid-auto[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%], .select2-container--default[_ngcontent-%COMP%]   .select2-grid-auto[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]   .select2-results__option[_ngcontent-%COMP%]{padding-left:var(--%NS%select2-option-padding, 6px)}.nostyle[_nghost-%COMP%]   .select2-dropdown[_ngcontent-%COMP%]{border-color:transparent}.nostyle[_nghost-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .nostyle[_nghost-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{border-color:transparent;background:transparent}.nostyle[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-focused[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .nostyle[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-focused[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%], .nostyle[_nghost-%COMP%]   .select2-container--%NS%default[_ngcontent-%COMP%]:not(.select2-container--open)   .select2-focused[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .nostyle[_nghost-%COMP%]   .select2-container--%NS%default[_ngcontent-%COMP%]:not(.select2-container--open)   .select2-focused[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{border-color:transparent;background:transparent}.borderless[_nghost-%COMP%]{--%NS%select2-dropdown-above-border-bottom: 1px solid var(--%NS%select2-dropdown-border-color, #aaa);--%NS%select2-dropdown-above-border-bottom-left-radius: var(--%NS%select2-selection-border-radius, 4px);--%NS%select2-dropdown-above-border-bottom-right-radius: var(--%NS%select2-selection-border-radius, 4px);--%NS%select2-dropdown-below-border-top: 1px solid var(--%NS%select2-dropdown-border-color, #aaa);--%NS%select2-dropdown-below-border-top-left-radius: var(--%NS%select2-selection-border-radius, 4px);--%NS%select2-dropdown-below-border-top-right-radius: var(--%NS%select2-selection-border-radius, 4px)}.borderless[_nghost-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .borderless[_nghost-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{border-color:transparent;background:transparent}.borderless[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-focused[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .borderless[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-focused[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%], .borderless[_nghost-%COMP%]   .select2-container--%NS%default[_ngcontent-%COMP%]:not(.select2-container--open)   .select2-focused[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .borderless[_nghost-%COMP%]   .select2-container--%NS%default[_ngcontent-%COMP%]:not(.select2-container--open)   .select2-focused[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{border-color:transparent;background:transparent}.select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--single.select2-selection[_ngcontent-%COMP%], .select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--single.select2-selection[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--single.select2-selection[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%], .select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--multiple.select2-selection[_ngcontent-%COMP%], .select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--multiple.select2-selection[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--multiple.select2-selection[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--single.select2-selection[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%], .select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--multiple.select2-selection[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap}.select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--single.select2-selection[_ngcontent-%COMP%]   li[_ngcontent-%COMP%], .select2-selection-nowrap[_nghost-%COMP%]   .select2-selection--multiple.select2-selection[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:flex}.material[_nghost-%COMP%]{display:inline-block;width:300px}.material[_nghost-%COMP%] > .select2-container[_ngcontent-%COMP%]{vertical-align:inherit;padding-bottom:1.29688em}.material[_nghost-%COMP%] > .select2-container[_ngcontent-%COMP%]   .selection[_ngcontent-%COMP%]{display:inline-flex;align-items:baseline;border-top:.84375em solid transparent;padding:.4375em 0;width:100%;height:auto}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{box-sizing:border-box;border:0;border-radius:0;width:100%;height:24px}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--%NS%single[_ngcontent-%COMP%]:before, .material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--%NS%multiple[_ngcontent-%COMP%]:before{display:block;position:absolute;bottom:1.65em;background:var(--%NS%select2-material-underline, #ddd);width:100%;height:1px;content:" "}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--%NS%single[_ngcontent-%COMP%]:after, .material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--%NS%multiple[_ngcontent-%COMP%]:after{display:block;position:absolute;bottom:1.63em;left:50%;transition:none;background:var(--%NS%select2-material-underline-active, #5a419e);width:0%;height:2px;content:" "}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%], .material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__rendered[_ngcontent-%COMP%]{padding-left:1px;line-height:inherit}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%]   .select2-selection__placeholder[_ngcontent-%COMP%], .material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]   .select2-selection__placeholder[_ngcontent-%COMP%]{display:block;position:absolute;top:20px;left:0;
20transform-origin:0 21px;transition:transform .3s;color:var(--%NS%select2-material-placeholder-color, rgba(0, 0, 0, .38))}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-container--open[_ngcontent-%COMP%]{bottom:1.6em;left:0}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection__placeholder__option[_ngcontent-%COMP%]{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection__arrow[_ngcontent-%COMP%]{top:20px}.material[_nghost-%COMP%]   .select2-container--default.select2-container--open[_ngcontent-%COMP%]   .select2-selection--%NS%single[_ngcontent-%COMP%]:after, .material[_nghost-%COMP%]   .select2-container--default.select2-container--open[_ngcontent-%COMP%]   .select2-selection--%NS%multiple[_ngcontent-%COMP%]:after, .material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-focused[_ngcontent-%COMP%]   .select2-selection--%NS%single[_ngcontent-%COMP%]:after, .material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-focused[_ngcontent-%COMP%]   .select2-selection--%NS%multiple[_ngcontent-%COMP%]:after{left:0%;transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-dropdown[_ngcontent-%COMP%]{box-shadow:0 5px 5px #00000080;border:0;border-radius:0}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-results__option[aria-selected=true][_ngcontent-%COMP%], .material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-results__option--highlighted[aria-selected][_ngcontent-%COMP%]{background:var(--%NS%select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--%NS%select2-material-option-highlighted-text-color, #000)}.material[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-results__option[aria-selected=true][_ngcontent-%COMP%]{color:var(--%NS%select2-material-option-selected-text-color, #ff5722)}.material[_nghost-%COMP%]   .select2-container--default.select2-container--disabled[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .material[_nghost-%COMP%]   .select2-container--default.select2-container--disabled[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%], .material[_nghost-%COMP%]   .select2-container--default.select2-container--readonly[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .material[_nghost-%COMP%]   .select2-container--default.select2-container--readonly[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{background:transparent}.material[_nghost-%COMP%]   .select2-container--default.select2-container--disabled[_ngcontent-%COMP%]   .select2-selection--%NS%single[_ngcontent-%COMP%]:before, .material[_nghost-%COMP%]   .select2-container--default.select2-container--disabled[_ngcontent-%COMP%]   .select2-selection--%NS%multiple[_ngcontent-%COMP%]:before{background:var(--%NS%select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}.material[_nghost-%COMP%]   .select2-container--default.select2-container--readonly[_ngcontent-%COMP%]   .select2-selection--%NS%single[_ngcontent-%COMP%]:before, .material[_nghost-%COMP%]   .select2-container--default.select2-container--readonly[_ngcontent-%COMP%]   .select2-selection--%NS%multiple[_ngcontent-%COMP%]:before{background:var(--%NS%select2-material-underline-readonly, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}.material.ng-invalid.ng-touched[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--%NS%single[_ngcontent-%COMP%]:before, .material.ng-invalid.ng-touched[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--%NS%single[_ngcontent-%COMP%]:after, .material.ng-invalid.ng-touched[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--%NS%multiple[_ngcontent-%COMP%]:before, .material.ng-invalid.ng-touched[_nghost-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--%NS%multiple[_ngcontent-%COMP%]:after{background:var(--%NS%select2-material-underline-invalid, red)}.material[_nghost-%COMP%]:not(.select2-container--open)   .select2-focused[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], .material[_nghost-%COMP%]:not(.select2-container--open)   .select2-focused[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{border:0}
20.material[_nghost-%COMP%]   .select2-subscript-wrapper[_ngcontent-%COMP%]{position:absolute;top:calc(100% - 1.72917em);color:var(--%NS%select2-hint-text-color, #888);font-size:75%}  .select2-overlay-backdrop{background:var(--%NS%select2-overlay-backdrop, transparent)}  .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:0}  .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}  .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-top:28px;margin-bottom:0}  .cdk-overlay-container .select2-style-borderless{--%NS%select2-dropdown-above-border-bottom: 1px solid var(--%NS%select2-dropdown-border-color, #aaa);--%NS%select2-dropdown-above-border-bottom-left-radius: var(--%NS%select2-selection-border-radius, 4px);--%NS%select2-dropdown-above-border-bottom-right-radius: var(--%NS%select2-selection-border-radius, 4px);--%NS%select2-dropdown-below-border-top: 1px solid var(--%NS%select2-dropdown-border-color, #aaa);--%NS%select2-dropdown-below-border-top-left-radius: var(--%NS%select2-selection-border-radius, 4px);--%NS%select2-dropdown-below-border-top-right-radius: var(--%NS%select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material[_ngcontent-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--single[_ngcontent-%COMP%], select2.material[_ngcontent-%COMP%]   .select2-container--default[_ngcontent-%COMP%]   .select2-selection--multiple[_ngcontent-%COMP%]{height:26px}}`]})}}return i})();var O$4=()=>({"object-position":`top`,"border-radius":`50%`});function R(o,V){if(o&1){let i=AC();bs$1(0,`app-image`,2),fy(`errorLoad`,function(){_f(i);return Mf(i_$1().handleErrorLoad())}),Mu()}if(o&2){let i=i_$1(),e=$_$1(0),t=$_$1(1);Vm$1(`height`,q_$1(``,t,`px`))(`width`,q_$1(``,t,`px`))(`styles`,K_$1(8,O$4))(`imageUrl`,e)(`errorImage`,i.imageService.noPersonImage)(`hideOnError`,!0)}}function j$1(o,V){if(o&1&&Hm$1(0,`i`,3),o&2){i_$1();wy(`font-size`,$_$1(1),`px`)}}var K$2=(()=>{class o{constructor(){this.imageService=E$2(we$3),this.hubService=E$2(Ao$2),this.destroyRef=E$2(te$5),this.userId=TB.required(),this.size=TB(32),this.processEvents=TB(!0),this.randomSeed=be$3(0),this.noImage=be$3(!1)}ngOnInit(){this.currentImageUrl=it$3(()=>{let i=this.userId(),e=this.randomSeed(),t=this.imageService.getUserCoverImage(i);return e>0?`${t}&random=${e}`:t}),this.hubService.messages$.pipe(JB(this.destroyRef)).subscribe(i=>{if(!this.processEvents())return;let e=this.currentImageUrl();if(i.event===c$2.CoverUpdate){let t=i.payload;if(!e)return;let r=this.imageService.getEntityTypeFromUrl(e);if(r===t.entityType){let n=e.split(`?`)[1].split(`&`)[0].replace(r+`Id=`,``);n.includes(`&`)&&(n=n.split(`&`)[0]),n===t.id+``&&(this.noImage.set(!1),this.randomSeed.update(F=>F+1))}}})}handleErrorLoad(){this.noImage.set(!0)}static{this.ɵfac=function(e){return new(e||o)}}static{this.ɵcmp=yT({type:o,selectors:[[`app-profile-icon`]],inputs:{userId:[1,`userId`],size:[1,`size`],processEvents:[1,`processEvents`]},decls:4,vars:3,consts:[[`objectFit`,`cover`,3,`styles`,`height`,`width`,`imageUrl`,`errorImage`,`hideOnError`],[`aria-hidden`,`true`,1,`profile-icon`,`fa-solid`,`fa-user-circle`,`align-self-center`,3,`font-size`],[`objectFit`,`cover`,3,`errorLoad`,`styles`,`height`,`width`,`imageUrl`,`errorImage`,`hideOnError`],[`aria-hidden`,`true`,1,`profile-icon`,`fa-solid`,`fa-user-circle`,`align-self-center`]],template:function(e,t){if(e&1&&(By(0)(1),DC(2,R,1,9,`app-image`,0)(3,j$1,1,2,`i`,1)),e&2){let r=B_$1(t.currentImageUrl());xb(),B_$1(t.size()),xb(),bC(r&&!t.noImage()?2:3)}},dependencies:[yt$2],styles:[`.profile-icon[_ngcontent-%COMP%]{color:var(--%NS%body-text-color)}
21/*# sourceMappingURL=profile-icon.component-R4ZG2NVH.css.map */`]})}}return o})();function D$3(e,n,r){let t=nt$3(e);return t!==null?new Intl.NumberFormat(n,r).format(t):``}function f$3(e,n,r){return u$2(e)?new Intl.DateTimeFormat(n,r).format(e):``}function u$2(e){return e instanceof Date&&!isNaN(e)}var C$1={localeConfig:{global:{},localeBased:{}},defaultLocale:`en-US`,defaultCurrency:`USD`,localeToCurrencyMapping:{"aa-DJ":`DJF`,"aa-ER":`ERN`,"aa-ET":`ETB`,"ab-GE":`ETB`,"ab-TR":`ETB`,"af-BW":`ETB`,"af-NA":`ETB`,"af-ZA":`ZAR`,"ak-GH":`ZAR`,"am-ET":`ETB`,"am-IL":`ETB`,"ar-AE":`AED`,"ar-AR":`AED`,"ar-BH":`BHD`,"ar-CM":`BHD`,"ar-CY":`BHD`,"ar-DJ":`BHD`,"ar-DZ":`DZD`,"ar-EG":`EGP`,"ar-EH":`EGP`,"ar-ER":`EGP`,"ar-IL":`EGP`,"ar-IQ":`IQD`,"ar-IR":`IQD`,"ar-JO":`JOD`,"ar-KE":`JOD`,"ar-KM":`JOD`,"ar-KW":`KWD`,"ar-LB":`LBP`,"ar-LY":`LYD`,"ar-MA":`MAD`,"ar-ML":`MAD`,"ar-MR":`MAD`,"ar-NE":`MAD`,"ar-NG":`MAD`,"ar-OM":`OMR`,"ar-PS":`OMR`,"ar-QA":`QAR`,"ar-SA":`SAR`,"ar-SD":`
21SDD`,"ar-SS":`SDD`,"ar-SY":`SYP`,"ar-TD":`SYP`,"ar-TJ":`SYP`,"ar-TN":`TND`,"ar-TR":`TND`,"ar-YE":`YER`,"as-IN":`INR`,"av-RU":`INR`,"ay-BO":`INR`,"ay-PE":`INR`,"az-AZ":`AZM`,"ba-RU":`AZM`,"be-BY":`BYR`,"be-PL":`BYR`,"be-UA":`BYR`,"bg-BG":`BGN`,"bg-GR":`BGN`,"bg-MD":`BGN`,"bg-RO":`BGN`,"bg-TR":`BGN`,"bg-UA":`BGN`,"bi-VU":`BGN`,"bm-ML":`BGN`,"bn-BD":`BDT`,"bn-GB":`BDT`,"bn-IN":`INR`,"bn-NP":`INR`,"bo-CN":`CNY`,"bo-IN":`INR`,"bo-NP":`INR`,"br-FR":`EUR`,"bs-BA":`BAM`,"ca-AD":`EUR`,"ca-ES":`EUR`,"ca-FR":`EUR`,"ca-IT":`EUR`,"ce-RU":`EUR`,"ch-GU":`EUR`,"ch-MP":`EUR`,"co-FR":`EUR`,"cs-CZ":`CZK`,"cv-RU":`RUB`,"cy-AR":`RUB`,"cy-GB":`GBP`,"da-DE":`GBP`,"da-DK":`DKK`,"da-GL":`DKK`,"da-IS":`DKK`,"de-AT":`EUR`,"de-BE":`EUR`,"de-BR":`EUR`,"de-CA":`EUR`,"de-CH":`CHF`,"de-CZ":`CHF`,"de-DE":`EUR`,"de-DK":`EUR`,"de-HU":`EUR`,"de-IT":`EUR`,"de-KZ":`EUR`,"de-LI":`EUR`,"de-LU":`EUR`,"de-NA":`EUR`,"de-PL":`EUR`,"de-PY":`EUR`,"de-RO":`EUR`,"de-SK":`EUR`,"de-US":`EUR`,"dv-IN":`EUR`,"dv-MV":`MVR`,"dz-BT":`BTN`,"dz-IN":`BTN`,"ee-GH":`BTN`,"ee-TG":`BTN`,"el-AL":`BTN`,"el-CY":`EUR`,"el-DE":`EUR`,"el-EG":`EUR`,"el-GB":`EUR`,"el-GR":`EUR`,"el-IT":`EUR`,"el-RO":`EUR`,"el-TR":`EUR`,"el-UA":`EUR`,"en-AC":`EUR`,"en-AG":`XCD`,"en-AI":`XCD`,"en-AS":`XCD`,"en-AU":`AUD`,"en-AW":`AUD`,"en-BB":`AUD`,"en-BE":`AUD`,"en-BM":`AUD`,"en-BN":`AUD`,"en-BS":`AUD`,"en-BW":`BWP`,"en-BZ":`BWP`,"en-CA":`CAD`,"en-CC":`CAD`,"en-CK":`CAD`,"en-CM":`CAD`,"en-CN":`CAD`,"en-CX":`CAD`,"en-DE":`CAD`,"en-DG":`CAD`,"en-DM":`CAD`,"en-DO":`CAD`,"en-ES":`CAD`,"en-ET":`CAD`,"en-FI":`CAD`,"en-
21FJ":`CAD`,"en-FK":`CAD`,"en-FM":`CAD`,"en-FR":`CAD`,"en-GB":`GBP`,"en-GD":`GBP`,"en-GG":`GBP`,"en-GH":`GBP`,"en-GI":`GBP`,"en-GM":`GBP`,"en-GU":`GBP`,"en-GY":`GBP`,"en-HK":`HKD`,"en-HN":`HKD`,"en-IE":`EUR`,"en-IL":`EUR`,"en-IM":`EUR`,"en-IN":`INR`,"en-IO":`INR`,"en-IT":`INR`,"en-JE":`INR`,"en-JM":`INR`,"en-KE":`INR`,"en-KI":`INR`,"en-KN":`INR`,"en-KY":`INR`,"en-LB":`INR`,"en-LC":`INR`,"en-LK":`INR`,"en-LR":`INR`,"en-LS":`INR`,"en-MG":`INR`,"en-MH":`INR`,"en-MP":`INR`,"en-MS":`INR`,"en-MT":`INR`,"en-MU":`INR`,"en-MW":`INR`,"en-MY":`INR`,"en-NA":`INR`,"en-NF":`INR`,"en-NG":`NGN`,"en-NL":`NGN`,"en-NR":`NGN`,"en-NU":`NGN`,"en-NZ":`NZD`,"en-PA":`NZD`,"en-PG":`NZD`,"en-PH":`PHP`,"en-PI":`PHP`,"en-PK":`PHP`,"en-PM":`PHP`,"en-PN":`PHP`,"en-PR":`PHP`,"en-PW":`PHP`,"en-RW":`PHP`,"en-SB":`PHP`,"en-SC":`PHP`,"en-SG":`SGD`,"en-SH":`SGD`,"en-SL":`SGD`,"en-SS":`SGD`,"en-SZ":`SGD`,"en-TA":`SGD`,"en-TC":`SGD`,"en-TK":`SGD`,"en-TO":`SGD`,"en-TT":`SGD`,"en-TV":`SGD`,"en-TZ":`SGD`,"en-UD":`SGD`,"en-UG":`SGD`,"en-UM":`SGD`,"en-US":`USD`,"en-VC":`USD`,"en-VG":`
21USD`,"en-VI":`USD`,"en-VU":`USD`,"en-WS":`USD`,"en-ZA":`ZAR`,"en-ZM":`ZAR`,"en-ZW":`ZWD`,"eo-EO":`ZWD`,"eo-SM":`ZWD`,"es-AD":`ZWD`,"es-AR":`ARS`,"es-BO":`BOB`,"es-BZ":`BOB`,"es-CL":`CLP`,"es-CO":`COP`,"es-CR":`CRC`,"es-CU":`CRC`,"es-DE":`CRC`,"es-DO":`DOP`,"es-EA":`DOP`,"es-EC":`USD`,"es-ES":`EUR`,"es-GQ":`EUR`,"es-GT":`GTQ`,"es-HN":`HNL`,"es-IC":`HNL`,"es-LA":`HNL`,"es-MA":`HNL`,"es-MX":`MXN`,"es-NI":`NIO`,"es-PA":`PAB`,"es-PE":`PEN`,"es-PH":`PEN`,"es-PR":`USD`,"es-PY":`PYG`,"es-SV":`SVC`,"es-TT":`SVC`,"es-US":`USD`,"es-UY":`UYU`,"es-VE":`VEB`,"et-EE":`EEK`,"et-FI":`EEK`,"eu-ES":`EUR`,"eu-FR":`EUR`,"fa-AE":`EUR`,"fa-AF":`EUR`,"fa-IQ":`EUR`,"fa-IR":`IRR`,"fa-OM":`IRR`,"fa-PK":`IRR`,"fa-QA":`IRR`,"fa-TJ":`IRR`,"fb-LT":`IRR`,"ff-GN":`IRR`,"ff-MR":`IRR`,"ff-SN":`IRR`,"fi-FI":`EUR`,"fi-RU":`EUR`,"fi-SE":`EUR`,"fj-FJ":`EUR`,"fo-FO":`DKK`,"fr-AD":`DKK`,"fr-BE":`EUR`,"fr-BF":`EUR`,"fr-BI":`EUR`,"fr-BJ":`EUR`,"fr-BL":`EUR`,"fr-CA":`CAD`,"fr-CD":`CAD`,"fr-CF":`CAD`,"fr-CG":`CAD`,"fr-CH":`CHF`,"fr-CI":`CHF`,"fr-CM":`CHF`,"fr-CP":`CHF`,"fr-DJ":`CHF`,"fr-DZ":`CHF`,"fr-FR":`EUR`,"fr-GA":`EUR`,"fr-GB":`EUR`,"fr-GF":`EUR`,"fr-GN":`EUR`,"fr-GP":`EUR`,"fr-GQ":`EUR`,"fr-HT":`EUR`,"fr-IT":`EUR`,"fr-KM":`EUR`,"fr-LB":`EUR`,"fr-LU":`EUR`,"fr-MA":`EUR`,"fr-MC":`EUR`,"fr-MF":`EUR`,"fr-MG":`EUR`,"fr-ML":`EUR`,"fr-MQ":`EUR`,"fr-MR":`EUR`,"fr-MU":`EUR`,"fr-NC":`EUR`,"fr-NE":`EUR`,"fr-PF":`EUR`,"fr-PM":`EUR`,"fr-RE":`EUR`,"fr-RW":`EUR`,"fr-SC":`EUR`,"fr-SN":`EUR`,"fr-SY":`EUR`,"fr-TD":`EUR`,"fr-TF":`EUR`,"fr-TG":`EUR`,"fr-TN":`EUR`,"fr-US":`EUR`,"fr-VU":`EUR`,"fr-WF":`EUR`,"fr-YT":`EUR`,"fy-NL":`EUR`,"ga-GB":`EUR`,"ga-IE":`EUR`,"gd-GB":`GBP`,"gl-ES":`EUR`,"gl-PT":`EUR`,"gn-AR":`EUR`,"gn-BO":`EUR`,"gn-PY":`EUR`,"gu-IN":`INR`,"gu-KE":`INR`,"gv-IM":`INR`,"he-IL":`ILS`,"hi-FJ":`ILS`,"hi-IN":`INR`,"hi-NP":`INR`,"hi-UG":`INR`,"hi-ZA":`INR`,"ho-PG":`INR`,"hr-AT":`INR`,"hr-BA":`INR`,"hr-DE":`INR`,"hr-HR":`HRK`,"hr-HU":`HRK`,"hr-IT":`HRK`,"ht-HT":`HTG`,"hu-AT":`HTG`,"hu-HU":`HUF`,"hu-IL":`HUF`,"hu-RO":`HUF`,"hu-RS":`HUF`,"hu-SI":`HUF`,"hu-SK":`HUF`,"hu-UA":`HUF`,"hy-AM":`AMD`,"hy-CY":`AMD`,"hy-GE":`AMD`,"hy-IR":`AMD`,"hy-LB":`AMD`,"hy-SY":`AMD`,"hy-TR":`AMD`,"ia-SE":`AMD`,"id-ID":`IDR`,"id-NL":`IDR`,"ig-NG":`NGN`,"ii-CN":`NGN`,"ik-US":`NGN`,"is-IS":`ISK`,"it-AU":`ISK`,"it-BR":`ISK`,"it-CA":`ISK`,"it-CH":`CHF`,"it-DE":`CHF`,"it-FR":`CHF`,"it-GB":`CHF`,"it-HR":`CHF`,"it-IT":`EUR`,"it-SI":`EUR`,"it-SM":`EUR`,"it-US":`EUR`,"it-VA":`EUR`,"iu-GL":`EUR`,"ja-BR":`EUR`,"ja-JP":`JPY`,"jv-ID":`JPY`,"jv-MY":`JPY`,"ka-GE":`GEL`,"ka-IR":`GEL`,"ka-TR":`GEL`,"kg-CD":`GEL`,"ki-KE":`GEL`,"kj-NA":`GEL`,"kl-DK":`GEL`,"kl-GL":`DKK`,"km-KH":`KHR`,"kn-IN":`INR`,"ko-BR":`INR`,"ko-CN":`INR`,"ko-JP":`INR`,"ko-KP":`INR`,"ko-KR":`KRW`,"ko-US":`KRW`,"ks-GB":`KRW`,"ks-IN":`INR`,"ks-PK":`INR`,"ku-TR":`TRY`,"kw-GB":`GBP`,"la-VA":`GBP`,"lb-LU":`GBP`,"lg-UG":`UGX`,"li-NL":`EUR`,"ln-CD":`EUR`,"ln-CG":`EUR`,"lo-LA":`LAK`,"lt-LT":`LTL`,"lu-CD":`LTL`,"lv-LV":`LVL`,"mg-MG":`MGA`,"mh-MH":`MGA`,"mi-NZ":`NZD`,"mk-AL":`NZD`,"mk-GR":`NZD`,"mk-MK":`MKD`,"ml-AE":`MKD`,"ml-BH":`MKD`,"ml-GB":`MKD`,"ml-IL":`MKD`,"ml-IN":`INR`,"ml-MY":`INR`,"ml-QA":`INR`,"ml-SG":`INR`,"mr-IN":`INR`,"ms-BN":`INR`,"ms-CC":`INR`,"ms-ID":`INR`,"ms-MY":`MYR`,"ms-SG":`MYR`,"mt-MT":`EUR`,"my-BD":`EUR`,"my-MM":`MMK`,"na-NR":`MMK`,"nb-NO":`NOK`,"nb-SJ":`NOK`,"nd-ZW":`NOK`,"ne-BT":`NOK`,"ne-IN":`NOK`,"ne-NP":`INR`,"ng-NA":`INR`,"nl-AW":`AWG`,"nl-BE":`EUR`,"nl-DE":`EUR`,"nl-FR":`EUR`,"nl-NL":`EUR`,"nl-SR":`EUR`,"nn-NO":`NOK`,"nr-ZA":`ZAR`,"nv-US":`ZAR`,"ny-MW":`ZAR`,"ny-MZ":`ZAR`,"ny-ZM":`ZAR`,"ny-ZW":`ZAR`,"oc-FR":`EUR`,"om-ET":`ETB`,"om-KE":`KES`,"om-SO":`KES`,"or-IN":`INR`,"os-GE":`INR`,"pa-IN":`INR`,"pl-CZ":`INR`,"pl-DE":`INR`,"pl-IL":`INR`,"pl-PL":`PLN`,"pl-RO":`PLN`,"pl-SK":`PLN`,"pl-UA":`PLN`,"ps-AE":`PLN`,"ps-AF":`AFN`,"ps-IR":`AFN`,"ps-PK":`AFN`,"pt-AG":`AFN`,"pt-AO":`AFN`,"pt-BR":`BRL`,"pt-CV":`BRL`,"pt-FR":`BRL`,"pt-GW":`BRL`,"pt-MO":`BRL`,"pt-MZ":`BRL`,"pt-PT":`EUR`,"pt-ST":`EUR`,"pt-TL":`EUR`,"qu-BO":`EUR`,"qu-PE":`EUR`,"rm-CH":`EUR`,"rn-BI":`EUR`,"ro-HU":`EUR`,"ro-IL":`EUR`,"ro-MD":`EUR`,"ro-RO":`RON`,"ro-RS":`RON`,"ro-UA":`RON`,"ru-BY":`RON`,"ru-CN":`RON`,"ru-DE":`RON`,"ru-EE":`RON`,"ru-FI":`RON`,"ru-GE":`RON`,"ru-IL":`RON`,"ru-KG":`RON`,"ru-KZ":`RON`,"ru-LT":`RON`,"ru-LV":`RON`,"ru-MD":`RON`,"ru-MN":`RON`,"ru-RU":`RUB`,"ru-SJ":`RUB`,"ru-TM":`RUB`,"ru-UA":`UAH`,"ru-US":`UAH`,"ru-UZ":`UAH`,"rw-CD":`UAH`,"rw-RW":`RWF`,"rw-UG":`RWF`,"sa-IN":`INR`,"se-FI":`INR`,"se-NO":`NOK`,"se-SE":`NOK`,"sg-CF":`NOK`,"si-LK":`LKR`,"sk-
21HU":`LKR`,"sk-RS":`LKR`,"sk-SK":`EUR`,"sl-AT":`EUR`,"sl-HU":`EUR`,"sl-IT":`EUR`,"sl-SI":`EUR`,"sm-AS":`EUR`,"sm-WS":`EUR`,"sn-ZW":`EUR`,"so-DJ":`DJF`,"so-ET":`ETB`,"so-KE":`ETB`,"so-SO":`SOS`,"sq-AL":`ALL`,"sq-GR":`ALL`,"sq-ME":`ALL`,"sq-MK":`MKD`,"sq-RS":`MKD`,"sq-TR":`MKD`,"sr-RS":`RSD`,"ss-LS":`RSD`,"ss-SZ":`RSD`,"ss-ZA":`ZAR`,"st-LS":`ZAR`,"st-ZA":`ZAR`,"su-ID":`ZAR`,"sv-AX":`ZAR`,"sv-FI":`EUR`,"sv-SE":`SEK`,"sw-BI":`SEK`,"sw-CD":`SEK`,"sw-KE":`SEK`,"sw-MZ":`SEK`,"sw-SO":`SEK`,"sw-TZ":`SEK`,"sw-UG":`SEK`,"sw-YT":`SEK`,"sw-ZA":`SEK`,"ta-IN":`INR`,"ta-LK":`INR`,"ta-MU":`INR`,"ta-MY":`INR`,"ta-RE":`INR`,"ta-SG":`INR`,"te-IN":`INR`,"th-TH":`THB`,"ti-ER":`ERN`,"ti-ET":`ETB`,"ti-IL":`ETB`,"tk-AF":`ETB`,"tk-IR":`ETB`,"tk-TM":`TMM`,"tl-PH":`PHP`,"tl-US":`PHP`,"tn-BW":`PHP`,"tn-NA":`PHP`,"tn-ZA":`ZAR`,"tn-ZW":`ZAR`,"to-TO":`ZAR`,"tr-BG":`ZAR`,"tr-CY":`TRY`,"tr-DE":`TRY`,"tr-GR":`TRY`,"tr-MK":`TRY`,"tr-NL":`TRY`,"tr-RO":`TRY`,"tr-TR":`TRY`,"tr-UA":`TRY`,"tr-UZ":`TRY`,"ts-MZ":`TRY`,"ts-SZ":`TRY`,"ts-ZA":`ZAR`,"tt-RU":`RUB`,"ty-PF":`RUB`,"uk-PL":`RUB`,"uk-SK":`RUB`,"uk-UA":`UAH`,"ur-IN":`UAH`,"ur-MU":`UAH`,"ur-PK":`PKR`,"ve-ZA":`ZAR`,"ve-ZW":`ZAR`,"vi-CN":`ZAR`,"vi-US":`ZAR`,"vi-VN":`VND`,"wa-BE":`EUR`,"xh-LS":`EUR`,"xh-ZA":`ZAR`,"yi-UA":`ZAR`,"yo-BJ":`ZAR`,"yo-NG":`NGN`,"za-CN":`NGN`,"zh-CN":`CNY`,"zh-HK":`HKD`,"zh-TW":`TWD`,"zu-LS":`TWD`,"zu-MW":`TWD`,"zu-MZ":`TWD`,"zu-SZ":`TWD`,"zu-ZA":`ZAR`},langToLocaleMapping:{}};var L$2=new x$4(``);var I=new x$4(``);var d=new x$4(``);var S$2=new x$4(``);var M$1=new x$4(``);var T$3=new x$4(``);var G$4=new x$4(``);var i=class{transform(n,r,t){return f$3(n,r,t)}};var s=class{transform(n,r,t,U){return D$3(n,t,x$3(w$4({},U),{style:r}))}};var J$4=(()=>{class e{static ɵfac=function(t){return new(t||e)};static ɵmod=gm$1({type:e});static ɵinj=Ua$2({})}return e})();function z$2(e){let n=w$4(w$4({},C$1),e);return[B$2(n.localeConfig),g$1(n.defaultLocale),O$3(n.defaultCurrency),p$3(n.langToLocaleMapping),P$3(n.localeToCurrencyMapping),K$1(i),m$1(s)]}function B$2(e){return Ci([{provide:S$2,useValue:e}])}function p$3(e){return Ci([{provide:d,useValue:e}])}function P$3(e){return Ci([{provide:M$1,useValue:e}])}function g$1(e){return Ci([{provide:L$2,useValue:e}])}function O$3(e){return Ci([{provide:I,useValue:e}])}function K$1(e){return Ci([{provide:T$3,useClass:e}])}function m$1(e){return Ci([{provide:G$4,useClass:e}])}var S$1=(()=>{class e{constructor(){this.httpClient=E$2(ue$6),this.utilityService=E$2(w$5),this.baseUrl=i$1.apiUrl+`kavita-plus-audit/`}getSeriesInfo(t){return this.httpClient.get(`${this.baseUrl}entries/series/${t}`)}getEntries(t,i,s){let r=this.utilityService.addPaginationIfExists(new A$2,i,s);return this.httpClient.post(`${this.baseUrl}entries`,t,{observe:`response`,params:r}).pipe(qe$2(a=>this.utilityService.createPaginatedResult(a)))}getStats(){return this.httpClient.get(`${this.baseUrl}stats`)}getMyStats(){return this.httpClient.get(`${this.baseUrl}my-stats`)}getMyActivity(t,i,s){let r=this.utilityService.addPaginationIfExists(new A$2,i,s);return this.httpClient.post(`${this.baseUrl}my-activity`,t,{observe:`response`,params:r}).pipe(qe$2(a=>this.utilityService.createPaginatedResult(a)))}getFailedScrobbleEvents(){return this.httpClient.get(this.baseUrl+`failed-scrobble-events`)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵprov=J$6({token:e,factory:e.ɵfac,providedIn:`root`})}}return e})();var C=(()=>{class t{constructor(){this.baseUrl=i$1.apiUrl,this.httpClient=E$2(ue$6),this.utilityService=E$2(w$5)}getAllKavitaPlusSeries(s,e,h){let u=this.utilityService.addPaginationIfExists(new A$2,e,h);return this.httpClient.post(this.baseUrl+`manage/series-metadata`,s,{observe:`response`,params:u}).pipe(qe$2(d=>this.utilityService.createPaginatedResult(d)))}getMatchedExternalSeriesCount(){return this.httpClient.get(this.baseUrl+`manage/matched-series-counts`)}static{this.ɵfac=function(e){return new(e||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var r$1=(function(t){return t[t.All=0]=`All`,t[t.Matched=1]=`Matched`,t[t.NotMatched=2]=`NotMatched`,t[t.Error=3]=`Error`,t[t.DontMatch=4]=`DontMatch`,t})(r$1||{});var U$6=[r$1.Matched,r$1.NotMatched,r$1.Error,r$1.DontMatch];var n$1=`kavita--auth-intersection-url`;var A$1=()=>{let s=E$2(yc$1),k=E$2(J$7),e=E$2(Bt$3),i=E$2(De$3),a=E$2(tt$3);if(s.isLoggedIn())return!0;let r=window.location.pathname;return r!==`/login`&&!r.startsWith(a+`registration`)&&r!==``&&localStorage.setItem(`kavita--auth-intersection-url`,r),e.error(i.translate(`toasts.unauthorized-1`)),
21k.createUrlTree([`/login`])};var X$3=(()=>{class s{constructor(){this.document=E$2(Xr$2),this.httpClient=E$2(ue$6),this.accountService=E$2(yc$1),this.router=E$2(J$7),this.destroyRef=E$2(te$5),this.baseUrl=i$1.apiUrl,this.localStorageSideNavKey=`kavita--sidenav--expanded`,this.navItems=[{transLocoKey:`all-filters`,routerLink:`/all-filters/`},{transLocoKey:`browse-genres`,routerLink:`/browse/genres`},{transLocoKey:`browse-tags`,routerLink:`/browse/tags`},{transLocoKey:`all-annotations`,routerLink:`/browse/annotations`},{transLocoKey:`announcements`,routerLink:`/announcements/`},{transLocoKey:`help`,href:e$3.Guides},{transLocoKey:`logout`,click:()=>this.logout()}],this.navBarVisible=be$3(!1),this.navbarVisibleSignal=this.navBarVisible.asReadonly(),this.navbarVisible$=XB(this.navBarVisible),this.sideNavCollapsed=be$3(!1),this.sideNavCollapsedSignal=this.sideNavCollapsed.asReadonly(),this.sideNavCollapsed$=XB(this.sideNavCollapsed),this.sideNavVisibility=be$3(!1),this.sideNavVisibilitySignal=this.sideNavVisibility.asReadonly(),this.sideNavVisibility$=XB(this.sideNavVisibility),this.usePreferenceSideNav$=this.router.events.pipe(We$5(a=>a instanceof z$5),qe$2(a=>{let r=a,o=r.urlAfterRedirects||r.url;return/\/admin\/dashboard(#.*)?/.test(o)||/\/preferences(\/[^\/]+|#.*)?/.test(o)||/\/settings(\/[^\/]+|#.*)?/.test(o)}),JB(this.destroyRef));let e=E$2(yo$2);this.renderer=e.createRenderer(null,null),eo$1(()=>{this.accountService.isLoggedIn()&&this.showNavBar()});let i=localStorage.getItem(this.localStorageSideNavKey)===`true`||!1;this.sideNavCollapsed.set(i),this.showSideNav()}getSideNavStreams(e=!0){return this.httpClient.get(this.baseUrl+`stream/sidenav?visibleOnly=`+e)}updateSideNavStreamPosition(e,i,a,r,o=!0){return this.httpClient.post(this.baseUrl+`stream/update-sidenav-position`,{streamName:e,id:i,fromPosition:a,toPosition:r,positionIncludesInvisible:o},e$1)}updateSideNavStream(e){return this.httpClient.post(this.baseUrl+`stream/update-sidenav-stream`,e,e$1)}createSideNavStream(e){return this.httpClient.post(this.baseUrl+`stream/add-sidenav-stream?smartFilterId=`+e,{})}createSideNavStreamFromExternalSource(e){return this.httpClient.post(this.baseUrl+`stream/add-sidenav-stream-from-external-source?externalSourceId=`+e,{})}bulkToggleSideNavStreamVisibility(e,i){return this.httpClient.post(this.baseUrl+`stream/bulk-sidenav-stream-visibility`,{ids:e,visibility:i})}deleteSideNavSmartFilter(e){return this.httpClient.delete(this.baseUrl+`stream/smart-filter-side-nav-stream?sideNavStreamId=`+e,{})}showNavBar(){setTimeout(()=>{let e=this.document.querySelector(`body`);this.renderer.setStyle(e,`margin-top`,`var(--nav-offset)`),this.renderer.removeStyle(e,`scrollbar-gutter`),this.renderer.setStyle(e,`height`,`calc(var(--vh)*100 - var(--nav-offset))`),this.renderer.setStyle(e,`overflow`,`hidden`),this.renderer.setStyle(this.document.querySelector(`html`),`height`,`calc(var(--vh)*100 - var(--nav-offset))`),this.navBarVisible.set(!0)},10)}hideNavBar(){setTimeout(()=>{let e=this.document.querySelector(`body`);this.renderer.removeStyle(e,`height`),this.renderer.setStyle(e,`margin-top`,`0px`,ls$1.Important),this.renderer.setStyle(e,`scrollbar-gutter`,`initial`,ls$1.Important),this.renderer.removeStyle(this.document.querySelector(`html`),`height`),this.renderer.setStyle(e,`overflow`,`auto`),this.navBarVisible.set(!1)},10)}logout(){this.hideNavBar(),this.hideSideNav(),this.accountService.logout()}handleLogin(){this.showNavBar(),this.showSideNav();let e=localStorage.getItem(n$1);e&&e!==`/login`?(localStorage.setItem(n$1,``),this.router.navigateByUrl(e)):(localStorage.setItem(n$1,``),this.router.navigateByUrl(`/home`))}showSideNav(){this.sideNavVisibility.set(!0)}hideSideNav(){this.sideNavVisibility.set(!1)}toggleSideNav(){let e=!this.sideNavCollapsed();this.sideNavCollapsed.set(e),localStorage.setItem(this.localStorageSideNavKey,e+``)}collapseSideNav(e){this.sideNavCollapsed.set(e),localStorage.setItem(this.localStorageSideNavKey,e+``)}static{this.ɵfac=function(i){return new(i||s)}}static{this.ɵprov=J$6({token:s,factory:s.ɵfac,providedIn:`root`})}}return s})();var a$2=[4,7,10,13];var f$2=(()=>{class e{constructor(){}transform(r){let t=localStorage.getItem(yc$1.localeKey)?.replace(`_`,`-`);return t?.endsWith(`Hans`)?this.transformValue(t?.split(`-`)[0]||`en`,r):this.transformValue(t||`en`,r)}transformValue(r,t){let o=new Intl.NumberFormat(r,{notation:`compact`,maximumSignificantDigits:3}),m=new Intl.NumberFormat(r,{notation:`compact`,maximumSignificantDigits:2});return t<1e3?t+``:a$2.includes((t+``).length)?m.format(t):o.format(t)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=bT({name:`compactNumber`,type:e,pure:!0})}}return e})();var t$1=(function(i){return i[i.Mobile=768]=`Mobile`,i[i.Tablet=1280]=`Tablet`,i[i.Desktop=1440]=`Desktop`,i})(t$1||{});var r={mobile:t$1.Mobile,tablet:t$1.Tablet};var w$1=`--setting-mobile-breakpoint`;var D$2=`--setting-tablet-breakpoint`;var W$1=(()=>{class i{constructor(){this.document=E$2(Xr$2),this.destroyRef=E$2(te$5),this.DEBOUNCE_MS=60,this.windowWidth=be$3(this.getWindowWidth()),this.thresholds=it$3(()=>(this.windowWidth(),this.resolveThresholds())),this.activeBreakpoint=it$3(()=>{let e=this.windowWidth(),s=this.thresholds();return e<=s.mobile?t$1.Mobile:e<=s.tablet?t$1.Tablet:t$1.Desktop}),this.isMobile=it$3(()=>this.activeBreakpoint()===t$1.Mobile),this.isTablet=it$3(()=>this.activeBreakpoint()===t$1.Tablet),this.isDesktop=it$3(()=>this.activeBreakpoint()===t$1.Desktop),this.isMobileOrBelow=it$3(()=>this.activeBreakpoint()<=t$1.Mobile),this.isMobileOrAbove=it$3(()=>this.activeBreakpoint()>=t$1.Mobile),this.isAboveMobile=it$3(()=>this.activeBreakpoint()>t$1.Mobile),this.isTabletOrBelow=it$3(()=>this.activeBreakpoint()<=t$1.Tablet),this.isTabletOrAbove=it$3(()=>this.activeBreakpoint()>=t$1.Tablet),this.isDesktopOrBelow=it$3(()=>this.activeBreakpoint()<=t$1.Desktop),this.isDesktopOrAbove=it$3(()=>this.activeBreakpoint()>=t$1.Desktop),this.currentWidth=this.windowWidth.asReadonly(),this.initResizeListener()}initResizeListener(){let e=this.document.defaultView;e&&rI(ga$2(e,`resize`),ga$2(e,`orientationchange`)).pipe(Ed$1(this.DEBOUNCE_MS),Nd$1(null),JB(this.destroyRef)).subscribe(()=>{this.windowWidth.set(this.getWindowWidth())})}getWindowWidth(){let e=this.document.defaultView;return e&&(e.innerWidth||this.document.documentElement?.clientWidth||this.document.body?.clientWidth)||r.tablet+1}resolveThresholds(){let e=this.getComputedBodyStyle();return e?{mobile:this.parseCssVar(e,w$1,r.mobile),tablet:this.parseCssVar(e,D$2,r.tablet)}:r}getComputedBodyStyle(){let e=this.document.defaultView;return!e||!this.document.body?null:e.getComputedStyle(this.document.body)}parseCssVar(e,s,a){let h=e.getPropertyValue(s)?.trim();if(!h)return a;let l=parseInt(h,10);return isNaN(l)?a:l}static{this.ɵfac=function(s){return new(s||i)}}static{this.ɵprov=J$6({token:i,factory:i.ɵfac,providedIn:`root`})}}return i})();var Ke$2=[[[``,`actions`,``]]];var ze=[`[actions]`];var U$5=(e,r)=>({closed:e,active:r});function $e$2(e,r){if(e&1&&(bs$1(0,`div`,1),Um$1(1,2),Mu()),e&2){let i=i_$1(),t=p_$1(4);Vm$1(`ngClass`,X_$1(2,U$5,$_$1(0),i.highlighted())),xb(),Vm$1(`ngTemplateOutlet`,t)}}function je$1(e,r){if(e&1&&(bs$1(0,`a`,3),Um$1(1,2),Mu()),e&2){let i=i_$1(2),t=p_$1(4),a=$_$1(0);
21Vm$1(`id`,i.id())(`href`,i.link(),qh)(`ngClass`,X_$1(4,U$5,a,i.highlighted())),xb(),Vm$1(`ngTemplateOutlet`,t)}}function He$1(e,r){if(e&1){let i=AC();bs$1(0,`a`,7),fy(`click`,function(){_f(i);return Mf(i_$1(3).openLink())}),Um$1(1,2),Mu()}if(e&2){let i=i_$1(3),t=p_$1(4),a=$_$1(0);Vm$1(`id`,i.id())(`ngClass`,X_$1(3,U$5,a,i.highlighted())),xb(),Vm$1(`ngTemplateOutlet`,t)}}function We$1(e,r){if(e&1&&(bs$1(0,`a`,5),Um$1(1,2),Mu()),e&2){let i=i_$1(3),t=p_$1(4),a=$_$1(0);Vm$1(`id`,i.id())(`ngClass`,X_$1(5,U$5,a,i.highlighted()))(`routerLink`,i.link())(`fragment`,i.fragment()),xb(),Vm$1(`ngTemplateOutlet`,t)}}function Ge(e,r){if(e&1&&(bs$1(0,`a`,6),Um$1(1,2),Mu()),e&2){let i=i_$1(3),t=p_$1(4),a=$_$1(0);Vm$1(`id`,i.id())(`ngClass`,X_$1(5,U$5,a,i.highlighted()))(`routerLink`,i.link())(`queryParams`,i.queryParams()),xb(),Vm$1(`ngTemplateOutlet`,t)}}function Je$1(e,r){if(e&1&&DC(0,He$1,2,6,`a`,4)(1,We$1,2,8,`a`,5)(2,Ge,2,8,`a`,6),e&2){let i=i_$1(2);bC(i.queryParams()?0:i.fragment()?1:2)}}function Qe$2(e,r){if(e&1&&DC(0,je$1,2,7,`a`,3)(1,Je$1,3,1),e&2)bC(i_$1().external()?0:1)}function Xe(e,r){if(e&1&&(bs$1(0,`span`,9)(1,`div`),Hm$1(2,`i`,13),Mu()()),e&2)Vm$1(`title`,U_$1(i_$1(2).title()))}function Ye$1(e,r){if(e&1&&Hm$1(0,`app-image`,14),e&2){i_$1();Vm$1(`imageUrl`,$_$1(2))}}function Ze(e,r){if(e&1&&Hm$1(0,`i`,16),e&2)N_$1(q_$1(`fa `,i_$1(3).icon()))}function ei(e,r){if(e&1&&(bs$1(0,`span`,9)(1,`div`),By(2),DC(3,Ye$1,1,1,`app-image`,14)(4,Ze,1,3,`i`,15),Mu()()),e&2){let i=i_$1(2);Vm$1(`title`,U_$1(i.title())),xb(2);let t=B_$1(i.imageUrl());xb(),bC(t?3:4)}}function ii$1(e,r){if(e&1&&(bs$1(0,`span`,11),j_$1(1),rM(2,`compactNumber`),Mu()),e&2){let i=i_$1(2);xb(),Ly(iM(2,1,i.badgeCount()))}}function ti(e,r){if(e&1&&(Hm$1(0,`div`,8),DC(1,Xe,3,2,`span`,9)(2,ei,5,4,`span`,9),bs$1(3,`span`,10)(4,`div`),j_$1(5),DC(6,ii$1,3,3,`span`,11),Mu()(),bs$1(7,`span`,12),c_$1(8),Mu()),e&2){let i=i_$1();xb(),bC(i.editMode()?1:i.noIcon()?-1:2),xb(4),Ou(` `,i.title(),` `),xb(),bC(i.badgeCount()>0?6:-1)}}var Ie$3=(()=>{class e{constructor(){this.destroyRef=E$2(te$5),this.router=E$2(J$7),this.navService=E$2(X$3),this.utilityService=E$2(w$5),this.breakpointService=E$2(W$1),this.id=TB(null),this.icon=TB(``),this.imageUrl=TB(null),this.noIcon=TB(!1),this.title=TB(``),this.link=TB(void 0),this.external=TB(!1),this.queryParams=TB(void 0),this.fragment=TB(void 0),this.badgeCount=TB(-1),this.editMode=TB(!1),this.comparisonMethod=TB(`equals`),this.currentUrl=be$3(this.router.url),this.highlighted=it$3(()=>{let i=this.currentUrl();if(!this.link())return!1;let[a,g]=i.split(`?`),[C,ee=``]=a.split(`#`),qe=a.includes(`#`)?ee:void 0;return this.isHighlighted(C,g,qe)}),this.router.events.pipe(We$5(i=>i instanceof z$5),JB(this.destroyRef)).subscribe(i=>{this.currentUrl.set(i.url),this.collapseNavIfApplicable()})}isHighlighted(i,t,a){let g=this.link();if(!g)return!1;!i.endsWith(`/`)&&!t&&this.fragment()===void 0&&t===void 0&&(i=i+`/`);let C=!1;a===this.fragment()&&(C=!0),this.fragment()===``&&a===void 0&&(C=!0);let ee=this.queryParams()===t;return this.comparisonMethod()===`equals`&&i===g&&C&&ee?!0:this.comparisonMethod()===`startsWith`&&i.startsWith(g)?(t&&this.queryParams(),!0):!1}openLink(){this.collapseNavIfApplicable();let i=this.queryParams(),t=this.fragment();if(i&&Object.keys(i).length!==0){this.router.navigateByUrl(this.link()+`?`+i);return}else if(t){this.router.navigateByUrl(this.link()+`#`+t);return}this.router.navigateByUrl(this.link())}collapseNavIfApplicable(){this.breakpointService.isMobile()&&this.navService.collapseSideNav(!0)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`app-side-nav-item`]],inputs:{id:[1,`id`],icon:[1,`icon`],imageUrl:[1,`imageUrl`],noIcon:[1,`noIcon`],title:[1,`title`],link:[1,`link`],external:[1,`external`],queryParams:[1,`queryParams`],fragment:[1,`fragment`],badgeCount:[1,`badgeCount`],editMode:[1,`editMode`],comparisonMethod:[1,`comparisonMethod`]},ngContentSelectors:ze,decls:5,vars:2,consts:[[`inner`,``],[1,`side-nav-item`,3,`ngClass`],[3,`ngTemplateOutlet`],[`rel`,`noopener noreferrer`,`target`,`_blank`,1,`side-nav-item`,3,`id`,`href`,`ngClass`],[`href`,`javascript:void(0);`,1,`side-nav-item`,3,`id`,`ngClass`],[`href`,`javascript:void(0);`,1,`side-nav-item`,3,`id`,`ngClass`,`routerLink`,`fragment`],[`href`,`javascript:void(0);`,1,`side-nav-item`,3,`id`,`ngClass`,`routerLink`,`queryParams`],[`href`,`javascript:void(0);`,1,`side-nav-item`,3,`click`,`id`,`ngClass`],[1,`active-highlight`],[1,`phone-hidden`,3,`title`],[1,`side-nav-text`],[1,`badge`,`bg-danger`,`rounded-pill`,`ms-2`],[1,`card-actions`],[`aria-hidden`,`true`,1,`fa`,`fa-grip-vertical`,`drag-handle`],[`width`,`20px`,`height`,`20px`,3,`imageUrl`],[`aria-hidden`,`true`,3,`class`],[`aria-hidden`,`true`]],template:function(t,a){t&1&&(a_$1(Ke$2),By(0),DC(1,$e$2,2,5,`div`,1)(2,Qe$2,2,1),Dm$1(3,ti,9,3,`ng-template`,null,0,lM)),t&2&&(B_$1(a.navService.sideNavCollapsedSignal()),xb(),bC(a.link()?2:1))},dependencies:[Vt$2,yt$2,cn,sn,f$2],styles:[`.side-nav app-side-nav-item:first-child .active-highlight{border-top-left-radius:.1875rem}  .side-nav app-side-nav-item:first-child .side-nav-item{border-top-left-radius:.1875rem}@media(max-width:992px){  .side-nav app-side-nav-item:first-child .side-nav-item{border-top-left-radius:0}  .side-nav app-side-nav-item:last-child .side-nav-item{border-bottom-left-radius:0}}@media(max-width:992px){.side-nav-item[_ngcontent-%COMP%]   .side-nav-text[_ngcontent-%COMP%]{width:100%}.side-nav-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child{flex-grow:0}}.drag-handle[_ngcontent-%COMP%]{cursor:grab}.side-nav-item.closed[_ngcontent-%COMP%]   .side-nav-text[_ngcontent-%COMP%]{display:none}
22/*# sourceMappingURL=side-nav-item.component-6BTJARV6.css.map */`]})}}return e})();var Te$4=(()=>{class e{transform(i){return Mt$4(`settings.`+i)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=bT({name:`settingFragment`,type:e,pure:!0})}}return e})();var ni=(e,r,i)=>({closed:e,hidden:r,"no-donate":i});var oi=e=>({"mt-4":e});var ri=e=>({closed:e});var ai=(e,r)=>r.title+r.children.length;var si=(e,r)=>r.fragment;function ci(e,r){if(e&1&&(Hm$1(0,`app-side-nav-item`,5),rM(1,`settingFragment`)),e&2){let i=r.$implicit;Vm$1(`id`,`nav-item-`+i.fragment)(`noIcon`,!0)(`fragment`,i.fragment)(`title`,iM(1,5,i.fragment))(`badgeCount`,i.badgeCount?.()??0)}}function li(e,r){if(e&1&&(bs$1(0,`h5`,4),j_$1(1),Mu(),CC(2,ci,2,7,`app-side-nav-item`,5,si)),e&2){let i=i_$1(),t=i.$implicit,a=i.$index,g=$_$1(0),C=i_$1(3).$implicit;Vm$1(`ngClass`,J_$1(2,oi,a>0)),xb(),Ly(C(t.title)),xb(),_C(g)}}function di(e,r){if(e&1&&(By(0),DC(1,li,4,4)),e&2){let i=r.$implicit,t=i_$1(2),a=B_$1(i_$1(2).getVisibleChildren(t,i));xb(),bC(a.length>0?1:-1)}}function mi$1(e,r){if(e&1){let i=AC();bs$1(0,`div`,6),fy(`click`,function(){_f(i);return Mf(i_$1(4).collapse())}),Mu()}
22if(e&2)Vm$1(`ngClass`,J_$1(1,ri,i_$1(4).navService.sideNavCollapsedSignal()))}function pi(e,r){if(e&1&&(bs$1(0,`div`,1)(1,`div`,2),CC(2,di,2,2,null,null,ai),Mu()(),DC(4,mi$1,1,3,`div`,3)),e&2){let i=i_$1(3);Vm$1(`ngClass`,eM(2,ni,i.navService.sideNavCollapsedSignal(),!i.navService.sideNavVisibilitySignal(),i.licenseService.hasActiveLicense())),xb(2),_C(i.sections),xb(2),bC(i.breakpointService.isTabletOrBelow()?4:-1)}}function vi(e,r){if(e&1&&DC(0,pi,5,6),e&2)bC(i_$1(2).navService.sideNavCollapsedSignal()?-1:0)}function ui$1(e,r){if(e&1&&(xu(0),DC(1,vi,1,1),Gs$1()),e&2){let i,t=i_$1();xb(),bC((i=t.accountService.currentUser())?1:-1,i)}}var n=(function(e){return e.Activity=`admin-activity`,e.General=`admin-general`,e.OpenIDConnect=`admin-oidc`,e.Email=`admin-email`,e.Media=`admin-media`,e.Users=`admin-users`,e.Libraries=`admin-libraries`,e.System=`admin-system`,e.Tasks=`admin-tasks`,e.Statistics=`admin-statistics`,e.MediaIssues=`admin-media-issues`,e.EmailHistory=`admin-email-history`,e.ManageMetadata=`admin-public-metadata`,e.AdminDevices=`admin-device`,e.Scrobbling=`scrobbling`,e.KavitaPlusLicense=`admin-kavitaplus`,e.MALStackImport=`mal-stack-import`,e.MappingsImport=`admin-mappings-import`,e.MatchedMetadata=`admin-matched-metadata`,e.ManageUserTokens=`admin-manage-tokens`,e.ManageKavitaPlusActivity=`admin-manage-kavitaplus-activity`,e.Metadata=`admin-metadata`,e.Account=`account`,e.Preferences=`preferences`,e.Connections=`scrobble-settings`,e.CustomKeyBinds=`custom-key-binds`,e.ReadingProfiles=`reading-profiles`,e.Font=`font`,e.Clients=`clients`,e.Theme=`theme`,e.Devices=`devices`,e.ScrobblingHolds=`scrobble-holds`,e.MyActivity=`my-activity`,e.Customize=`customize`,e.CBLImport=`cbl-import`,e.RemapRules=`remap-rules`,e})(n||{});var b$4=(function(e){return e.AccountSection=`account-section-title`,e.ServerSection=`server-section-title`,e.InsightsSection=`insights-section-title`,e.ImportSection=`import-section-title`,e.InfoSection=`info-section-title`,e.KavitaPlusSection=`kavitaplus-section-title`,e})(b$4||{});var o$1=class e{constructor(r,i=[],t=void 0,a=[],g=!1){this.roles=[],this.restrictRoles=[],this.fragment=r,this.roles=i,this.restrictRoles=a,this.badgeCount=t,this.kPlusOnly=g}static kPlusOnly(r,i=[],t=void 0,a=[]){return new e(r,i,t,a,!0)}};var Zi=(()=>{class e{constructor(){this.destroyRef=E$2(te$5),this.navService=E$2(X$3),this.accountService=E$2(yc$1),this.licenseService=E$2(vi$1),this.cdRef=E$2(OB),this.route=E$2(te$8),this.serverService=E$2(k$2),this.scrobbleService=E$2(F$5),this.router=E$2(J$7),this.utilityService=E$2(w$5),this.manageService=E$2(C),this.document=E$2(Xr$2),this.keyBindService=E$2(W$3),this.breakpointService=E$2(W$1),this.kavitaplusAuditService=E$2(S$1),this.hasValidLicense$=XB(this.licenseService.hasActiveLicense),this.navEnd=e$(this.router.events.pipe(We$5(i=>i instanceof z$5))),this.sections=[],this.matchedMetadataBadgeCount=e$(XB(this.accountService.hasAdminRole).pipe(lt$3(1),We$5(i=>this.licenseService.hasActiveLicense()),Sd$1(i=>i?this.manageService.getAllKavitaPlusSeries({matchStateOption:r$1.Error,libraryType:-1,searchTerm:``}).pipe(JB(this.destroyRef),qe$2(t=>t.pagination.totalItems),Td$1({bufferSize:1,refCount:!0})):la$2(-1))),{initialValue:-1}),this.scrobblingFailuresBadgeCount=e$(la$2(this.licenseService.hasActiveLicense()).pipe(Sd$1(i=>i?this.kavitaplusAuditService.getFailedScrobbleEvents():la$2(-1)),JB(this.destroyRef),Td$1({bufferSize:1,refCount:!0})),{initialValue:-1}),this.scrobblingErrorBadgeCount=e$(XB(this.accountService.hasAdminRole).pipe(lt$3(1),Sd$1(i=>i?this.scrobbleService.getScrobbleErrors().pipe(JB(this.destroyRef),qe$2(t=>t.length),Td$1({bufferSize:1,refCount:!0})):la$2(-1))),{initialValue:-1}),this.mediaIssuesBadgeCount=e$(XB(this.accountService.hasAdminRole).pipe(lt$3(1),Sd$1(i=>i?this.serverService.getMediaErrors().pipe(JB(this.destroyRef),qe$2(t=>t.length),Td$1({bufferSize:1,refCount:!0})):la$2(-1))),{initialValue:-1}),eo$1(()=>{!this.navEnd()||this.breakpointService.isAboveMobile()||ce$5(()=>this.navService.sideNavCollapsedSignal())||this.navService.collapseSideNav(!0)}),this.breakpointService.isMobileOrBelow()&&this.navService.collapseSideNav(!0),this.sections=[{title:b$4.AccountSection,children:[new o$1(n.Account),new o$1(n.Preferences),new o$1(n.CustomKeyBinds),new o$1(n.ReadingProfiles),new o$1(n.Customize,[],void 0,[S$6.ReadOnly]),new o$1(n.Clients),new o$1(n.Theme),new o$1(n.Font),new o$1(n.Devices),new o$1(n.RemapRules,[],void 0,[S$6.ReadOnly])]},{title:b$4.InsightsSection,children:[new o$1(n.Activity,[S$6.Admin]),new o$1(n.AdminDevices,[S$6.Admin]),new o$1(n.Statistics,[
22S$6.Admin])]},{title:b$4.ServerSection,children:[new o$1(n.General,[S$6.Admin]),new o$1(n.ManageMetadata,[S$6.Admin]),new o$1(n.OpenIDConnect,[S$6.Admin]),new o$1(n.Media,[S$6.Admin]),new o$1(n.Email,[S$6.Admin]),new o$1(n.Users,[S$6.Admin]),new o$1(n.Libraries,[S$6.Admin]),new o$1(n.Tasks,[S$6.Admin])]},{title:b$4.ImportSection,children:[new o$1(n.MappingsImport,[S$6.Admin]),new o$1(n.CBLImport,[],void 0,[S$6.ReadOnly]),o$1.kPlusOnly(n.MALStackImport)]},{title:b$4.InfoSection,children:[new o$1(n.System,[S$6.Admin]),new o$1(n.MediaIssues,[S$6.Admin],this.mediaIssuesBadgeCount),new o$1(n.EmailHistory,[S$6.Admin])]},{title:b$4.KavitaPlusSection,children:[new o$1(n.KavitaPlusLicense,[S$6.Admin]),o$1.kPlusOnly(n.Connections),o$1.kPlusOnly(n.ManageUserTokens,[S$6.Admin]),o$1.kPlusOnly(n.Metadata,[S$6.Admin]),o$1.kPlusOnly(n.MatchedMetadata,[S$6.Admin],this.matchedMetadataBadgeCount),o$1.kPlusOnly(n.ManageKavitaPlusActivity),o$1.kPlusOnly(n.MyActivity,[],this.scrobblingFailuresBadgeCount),o$1.kPlusOnly(n.ScrobblingHolds),o$1.kPlusOnly(n.Scrobbling,[S$6.Admin],this.scrobblingErrorBadgeCount)]}],this.scrollToActiveItem(),this.cdRef.markForCheck(),eo$1(()=>{this.licenseService.hasActiveLicense(),this.cdRef.markForCheck()}),this.keyBindService.registerListener(this.destroyRef,()=>this.router.navigate([`/settings`],{fragment:n.MyActivity}).then(()=>this.scrollToActiveItem()),[r$2.NavigateToScrobbling],{condition$:this.hasValidLicense$})}ngAfterViewInit(){this.scrollToActiveItem()}scrollToActiveItem(){let i=this.route.snapshot.fragment;if(i){let t=this.document.getElementById(`nav-item-`+i);t&&t.scrollIntoView({behavior:`smooth`,block:`center`})}}getVisibleChildren(i,t){return t.children.filter(a=>this.isItemVisible(i,a))}isItemVisible(i,t){return this.accountService.hasAnyRole(i,t.roles,t.restrictRoles)&&(!t.kPlusOnly||this.licenseService.hasActiveLicense())}collapse(){this.navService.toggleSideNav()}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`app-preference-nav`]],decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`preference`,`side-nav-container`,3,`ngClass`],[1,`side-nav`],[1,`side-nav-overlay`,3,`ngClass`],[1,`side-nav-header`,`mb-2`,3,`ngClass`],[`link`,`/settings`,3,`id`,`noIcon`,`fragment`,`title`,`badgeCount`],[1,`side-nav-overlay`,3,`click`,`ngClass`]],template:function(t,a){t&1&&Dm$1(0,ui$1,2,1,`ng-container`,0),t&2&&Vm$1(`translocoPrefix`,`settings`)},dependencies:[Ct$3,sn,Ie$3,Te$4],styles:[`@supports (-moz-appearance: none){.side-nav[_ngcontent-%COMP%]{scrollbar-color:transparent transparent;scrollbar-width:thin}}.side-nav[_ngcontent-%COMP%]::-webkit-scrollbar{background-color:transparent;width:inherit;display:none;visibility:hidden;background:transparent}.side-nav[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:transparent}.side-nav[_ngcontent-%COMP%]:hover{scrollbar-width:thin;overflow-y:auto}@supports (-moz-appearance: none){.side-nav[_ngcontent-%COMP%]:hover{scrollbar-color:rgba(255,255,255,.3) rgba(0,0,0,0)}}.side-nav[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{visibility:visible;background-color:#ffffff4d}@media(max-width:992px){.side-nav[_ngcontent-%COMP%]{padding:.625rem 0;width:55vw;background-color:var(--%NS%side-nav-mobile-bg-color);height:100dvh;position:fixed;margin:0;left:0;top:0;transition:width var(--%NS%side-nav-openclose-transition);z-index:999;overflow:auto;border:var(--%NS%side-nav-mobile-border)}.side-nav.closed[_ngcontent-%COMP%]{width:0;overflow:hidden;box-shadow:none}.side-nav[_ngcontent-%COMP%]   .side-nav-item[_ngcontent-%COMP%]:first-child{border-top-left-radius:var(--%NS%side-nav-border-radius);border-top-right-radius:var(--%NS%side-nav-border-radius)}.side-nav.no-donate[_ngcontent-%COMP%]{height:calc(var(--%NS%vh) * 100 - var(--%NS%nav-mobile-offset))}}.side-nav-header[_ngcontent-%COMP%]{color:var(--%NS%pref-side-nav-header-text-color);font-weight:700;margin-left:.3125rem}
23/*# sourceMappingURL=preference-nav.component-6635ARRE.css.map */`]})}}return e})();var x$1=[[[``,`accLead`,``]],[[``,`accTitle`,``]],[[``,`accSubtitle`,``]],[[``,`accBadges`,``]],[[``,`accCta`,``]],[[``,`accMeta`,``]],`*`];var S=[`[accLead]`,`[accTitle]`,`[accSubtitle]`,`[accBadges]`,`[accCta]`,`[accMeta]`,`*`];function T$2(r,k){r&1&&(Nu(0,`span`,10),Bm$1(1,`i`,15),Su())}
23function L$1(r,k){if(r&1){let e=AC();Nu(0,`button`,16),py(`click`,function(n){_f(e);return Mf(i_$1().onChevronClick(n))}),Bm$1(1,`i`,17),Su()}if(r&2){let e=i_$1();jm$1(`aria-expanded`,e.open())(`aria-controls`,e.bodyId)(`aria-label`,e.toggleLabel()||null)}}var N=0;var B$1=(()=>{class r{constructor(){this.open=CB(!1),this.toggleTrigger=TB(`header`),this.toggleLabel=TB(``),this.headingLevel=TB(null),this.bodyId=`app-accordion-body-${N++}`,this.fullyOpen=be$3(!1),eo$1(e=>{if(this.open()){let a=setTimeout(()=>this.fullyOpen.set(!0),300);e(()=>clearTimeout(a))}else this.fullyOpen.set(!1)})}toggle(){this.open.update(e=>!e)}onHeaderClick(){this.toggleTrigger()===`header`&&this.toggle()}onHeaderKey(e){this.toggleTrigger()===`header`&&e.target===e.currentTarget&&(e.preventDefault(),this.toggle())}onChevronClick(e){e.stopPropagation(),this.toggle()}static{this.ɵfac=function(a){return new(a||r)}}static{this.ɵcmp=yT({type:r,selectors:[[`app-accordion`]],hostVars:6,hostBindings:function(a,n){a&2&&Ty(`is-open`,n.open())(`is-fully-open`,n.fullyOpen())(`toggle-chevron`,n.toggleTrigger()===`chevron`)},inputs:{open:[1,`open`],toggleTrigger:[1,`toggleTrigger`],toggleLabel:[1,`toggleLabel`],headingLevel:[1,`headingLevel`]},outputs:{open:`openChange`},ngContentSelectors:S,decls:22,vars:9,consts:[[1,`header`,3,`click`,`keydown.enter`,`keydown.space`],[1,`lead`],[1,`titles`],[1,`title`],[1,`subtitle`],[1,`badges`],[1,`spacer`],[1,`actions`],[1,`cta`,3,`click`],[1,`meta`],[`aria-hidden`,`true`,1,`chevron`],[`type`,`button`,1,`chevron`],[1,`body`,3,`id`],[1,`body-inner`],[1,`content`],[1,`fas`,`fa-chevron-down`],[`type`,`button`,1,`chevron`,3,`click`],[`aria-hidden`,`true`,1,`fas`,`fa-chevron-down`]],template:function(a,n){if(a&1&&(a_$1(x$1),Nu(0,`div`,0),py(`click`,function(){return n.onHeaderClick()})(`keydown.enter`,function(d){return n.onHeaderKey(d)})(`keydown.space`,function(d){return n.onHeaderKey(d)}),Nu(1,`div`,1),c_$1(2),Su(),Nu(3,`div`,2)(4,`span`,3),c_$1(5,1),Su(),Nu(6,`span`,4),c_$1(7,2),Su()(),Nu(8,`div`,5),c_$1(9,3),Su(),Bm$1(10,`div`,6),Nu(11,`div`,7)(12,`div`,8),py(`click`,function(d){return d.stopPropagation()}),c_$1(13,4),Su(),Nu(14,`div`,9),c_$1(15,5),Su()(),DC(16,T$2,2,0,`span`,10)(17,L$1,2,3,`button`,11),Su(),Nu(18,`div`,12)(19,`div`,13)(20,`div`,14),c_$1(21,6),Su()()()),a&2){let o=n.toggleTrigger()===`header`;jm$1(`role`,o?`button`:null)(`tabindex`,o?0:null)(`aria-expanded`,o?n.open():null)(`aria-controls`,o?n.bodyId:null),xb(4),jm$1(`role`,n.headingLevel()?`heading`:null)(`aria-level`,n.headingLevel()),xb(12),bC(o?16:17),xb(2),zm$1(`id`,n.bodyId),xb(),jm$1(`inert`,n.open()?null:``)}},styles:[`[_nghost-%COMP%]{display:block;background-color:var(--%NS%accordion-surface-bg-color);border:1px solid var(--%NS%accordion-body-border-color);border-radius:var(--%NS%accordion-radius);overflow:hidden;transition:border-color .15s ease-in-out}[_nghost-%COMP%]:hover{border-color:var(--%NS%accordion-border-hover-color)}.is-fully-open[_nghost-%COMP%]{overflow:visible}.is-fully-open[_nghost-%COMP%]   .body-inner[_ngcontent-%COMP%]{overflow:visible}.header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.875rem;padding:1rem 1.125rem;cursor:pointer;-webkit-user-select:none;user-select:none}.toggle-chevron[_nghost-%COMP%]   .header[_ngcontent-%COMP%]{cursor:default;-webkit-user-select:auto;user-select:auto}.header[_ngcontent-%COMP%]:focus-visible, button.chevron[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--%NS%accordion-border-hover-color);outline-offset:-2px}.lead[_ngcontent-%COMP%]{position:relative;flex-shrink:0;width:2.625rem;height:2.625rem;border-radius:.5625rem;display:grid;place-items:center;overflow:hidden}.lead[_ngcontent-%COMP%]:empty{display:none}.lead[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.titles[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;min-width:0}.title[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:var(--%NS%accordion-header-text-color);line-height:1.25}.subtitle[_ngcontent-%COMP%]{font-size:.8rem;color:var(--%NS%accordion-subtitle-text-color);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.subtitle[_ngcontent-%COMP%]:empty{display:none}.badges[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.badges[_ngcontent-%COMP%]:empty{display:none}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-shrink:0}.cta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.cta[_ngcontent-%COMP%]:empty{display:none}.meta[_ngcontent-%COMP%]{font-size:.78rem;color:var(--%NS%accordion-meta-text-color);white-space:nowrap}.meta[_ngcontent-%COMP%]:empty{display:none}.chevron[_ngcontent-%COMP%]{width:1.875rem;height:1.875rem;display:grid;place-items:center;flex-shrink:0;color:var(--%NS%accordion-chevron-color);font-size:.85rem;transition:transform .15s ease-in-out,color .15s ease-in-out}button.chevron[_ngcontent-%COMP%]{padding:0;border:0;background:transparent;cursor:pointer}.header[_ngcontent-%COMP%]:hover   .chevron[_ngcontent-%COMP%]{color:var(--%NS%accordion-chevron-hover-color)}.is-open[_nghost-%COMP%]   .chevron[_ngcontent-%COMP%]{transform:rotate(180deg)}.body[_ngcontent-%COMP%]{display:grid;grid-template-rows:0fr;transition:grid-template-rows .28s ease}.is-open[_nghost-%COMP%]   .body[_ngcontent-%COMP%]{grid-template-rows:1fr}.body-inner[_ngcontent-%COMP%]{overflow:hidden;min-height:0}.content[_ngcontent-%COMP%]{border-top:1px solid var(--%NS%accordion-hairline-color);padding:1.25rem 1.375rem 1.5rem}@media(max-width:768px){.header[_ngcontent-%COMP%]{flex-wrap:wrap;column-gap:.625rem;row-gap:.625rem;padding:.875rem 1rem}.lead[_ngcontent-%COMP%]{order:1}.titles[_ngcontent-%COMP%]{order:2;flex:1 1 auto}.subtitle[_ngcontent-%COMP%]{display:none}.chevron[_ngcontent-%COMP%]{order:3}.spacer[_ngcontent-%COMP%]{order:4;flex:0 0 100%;height:0}.badges[_ngcontent-%COMP%]{order:5}.actions[_ngcontent-%COMP%]{order:6;flex:1 1 auto;justify-content:flex-end}}@media(prefers-reduced-motion:reduce){[_nghost-%COMP%], .body[_ngcontent-%COMP%], .chevron[_ngcontent-%COMP%]{transition:none}}
24/*# sourceMappingURL=accordion.component-GPWFB3ET.css.map */`]})}}return r})();var Q$2=(()=>{class i{constructor(){this.autoClose=!0,this.placement=[`bottom-start`,`bottom-end`,`top-start`,`top-end`],this.popperOptions=e=>e,this.container=null}static{this.ɵfac=function(n){return new(n||i)}}static{this.ɵprov=Mn({token:i,factory:i.ɵfac})}}return i})();var U$4=(()=>{class i{constructor(){this._disabled=!1,this.nativeElement=E$2(wo$2).nativeElement,this.tabindex=0}set disabled(e){this._disabled=e===``||e===!0}get disabled(){return this._disabled}static{this.ɵfac=function(n){return new(n||i)}}static{this.ɵdir=DT({type:i,selectors:[[``,`ngbDropdownItem`,``]],hostAttrs:[1,`dropdown-item`],hostVars:3,hostBindings:function(n,t){n&2&&(zm$1(`tabIndex`,t.disabled?-1:t.tabindex),Ty(`disabled`,t.disabled))},inputs:{tabindex:`tabindex`,disabled:`disabled`}})}}return i})();var q$1=(()=>{class i{constructor(){this.dropdown=E$2(L),this.nativeElement=E$2(wo$2).nativeElement}static{this.ɵfac=function(n){return new(n||i)}}static{this.ɵdir=DT({type:i,selectors:[[``,`ngbDropdownMenu`,``]],contentQueries:function(n,t,s){if(n&1&&gy(s,U$4,4),n&2){let o;u_$1(o=d_$1())&&(t.menuItems=o)}},hostAttrs:[1,`dropdown-menu`],hostVars:2,hostBindings:function(n,t){n&1&&fy(`keydown.ArrowUp`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.ArrowDown`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.Home`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.End`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.Enter`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.Space`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.Tab`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.Shift.Tab`,function(o){return t.dropdown.onKeyDown(o)}),n&2&&Ty(`show`,t.dropdown.isOpen())}})}}return i})();var w=(()=>{class i{constructor(){this.dropdown=E$2(L),this.nativeElement=E$2(wo$2).nativeElement}static{this.ɵfac=function(n){return new(n||i)}}static{this.ɵdir=DT({type:i,selectors:[[``,`ngbDropdownAnchor`,``]],hostAttrs:[1,`dropdown-toggle`],hostVars:3,hostBindings:function(n,t){n&2&&(jm$1(`aria-expanded`,t.dropdown.isOpen()),Ty(`show`,t.dropdown.isOpen()))}})}}return i})();var se$3=(()=>{class i extends w{static{this.ɵfac=(()=>{let e;return function(t){return(e||(e=qE(i)))(t||i)}})()}static{this.ɵdir=DT({type:i,selectors:[[``,`ngbDropdownToggle`,``]],hostAttrs:[1,`dropdown-toggle`],hostVars:3,hostBindings:function(n,t){n&1&&fy(`click`,function(){return t.dropdown.toggle()})(`keydown.ArrowUp`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.ArrowDown`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.Home`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.End`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.Tab`,function(o){return t.dropdown.onKeyDown(o)})(`keydown.Shift.Tab`,function(o){return t.dropdown.onKeyDown(o)}),n&2&&(jm$1(`aria-expanded`,t.dropdown.isOpen()),Ty(`show`,t.dropdown.isOpen()))},features:[Y_$1([{provide:w,useExisting:Ii(()=>i)}]),Im$1]})}}return i})();var L=(()=>{class i{constructor(){this._changeDetector=E$2(OB),this._config=E$2(Q$2),this._document=E$2(Xr$2),this._injector=E$2(fe$6),this._ngZone=E$2(U$8),this._nativeElement=E$2(wo$2).nativeElement,this._destroyCloseHandlers$=new le$4,this._bodyContainer=null,this._positioning=ws$1(),this.autoClose=this._config.autoClose,this._open=!1,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.openChange=new ht$3}ngOnInit(){this.display||(this.display=this._nativeElement.closest(`.navbar`)?`static`:`dynamic`)}ngAfterContentInit(){ag({write:()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()}},{injector:this._injector})}ngOnChanges(e){if(e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement}),this._applyPlacementClasses()),e.dropdownClass){let{currentValue:n,previousValue:t}=e.dropdownClass;this._applyCustomDropdownClass(n,t)}e.autoClose&&this._open&&(this.autoClose=e.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display===`dynamic`&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,updatePopperOptions:e=>this.popperOptions(Bs$1([0,2])(e))}),this._applyPlacementClasses(),this._afterRenderRef=lb({write:()=>{this._positionMenu()}},{injector:this._injector})})),this._changeDetector.markForCheck())}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Ms$1(this._ngZone,this._document,this.autoClose,e=>{this.close(),e===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],`.dropdown-item,.dropdown-divider`)}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._afterRenderRef?.destroy(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(e){let{key:n}=e,t=this._getMenuElements(),s=-1,o=null,y=this._isEventFromToggle(e);if(!y&&t.length&&t.forEach((d,V)=>{d.contains(e.target)&&(o=d),d===fo$2(this._document)&&(s=V)}),n===` `||n===`Enter`){o&&(this.autoClose===!0||this.autoClose===`inside`)&&ga$2(o,`click`).pipe(lt$3(1)).subscribe(()=>this.close());return}if(n===`Tab`){if(e.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===e.target){this.container===`body`&&!e.shiftKey?(this._menu.nativeElement.setAttribute(`tabindex`,`0`),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute(`tabindex`)):e.shiftKey&&this.close();return}else if(this.container===`body`){let d=this._menu.nativeElement.querySelectorAll(ho$2);e.shiftKey&&e.target===d[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===d[d.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else ga$2(e.target,`focusout`).pipe(lt$3(1)).subscribe(({relatedTarget:d})=>{this._nativeElement.contains(d)||this.close()});return}if(y||o){if(this.open(),t.length){switch(n){case`ArrowDown`:s=Math.min(s+1,t.length-1);break;case`ArrowUp`:if(this._isDropup()&&s===-1){s=t.length-1;break}s=Math.max(s-1,0);break;case`Home`:s=0;break;case`End`:s=t.length-1;break}t[s].focus()}e.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains(`dropup`)}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:e})=>!e).map(({nativeElement:e})=>e):[]}_positionMenu(){let e=this._menu;this.isOpen()&&e&&(this.display===`dynamic`?(this._positioning.update(
24),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(` `)[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),e===`body`){let n=this._menu.nativeElement,t=this._bodyContainer=this._bodyContainer||this._document.createElement(`div`);t.style.position=`absolute`,n.style.position=`static`,t.style.zIndex=`1055`,t.appendChild(n),this._document.body.appendChild(t)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(e,n){let t=this.container===`body`?this._bodyContainer:this._nativeElement;t&&(n&&t.classList.remove(n),e&&t.classList.add(e))}_applyPlacementClasses(e){if(this._menu){e||(e=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove(`dropup`,`dropdown`),this.display===`static`?this._menu.nativeElement.setAttribute(`data-bs-popper`,`static`):this._menu.nativeElement.removeAttribute(`data-bs-popper`);let n=e.search(`^top`)!==-1?`dropup`:`dropdown`;this._nativeElement.classList.add(n),this._bodyContainer&&(this._bodyContainer.classList.remove(`dropup`,`dropdown`),this._bodyContainer.classList.add(n))}}static{this.ɵfac=function(n){return new(n||i)}}static{this.ɵdir=DT({type:i,selectors:[[``,`ngbDropdown`,``]],contentQueries:function(n,t,s){if(n&1&&gy(s,q$1,5)(s,w,5),n&2){let o;u_$1(o=d_$1())&&(t._menu=o.first),u_$1(o=d_$1())&&(t._anchor=o.first)}},hostVars:2,hostBindings:function(n,t){n&2&&Ty(`show`,t.isOpen())},inputs:{autoClose:`autoClose`,dropdownClass:`dropdownClass`,_open:[0,`open`,`_open`],placement:`placement`,popperOptions:`popperOptions`,container:`container`,display:`display`},outputs:{openChange:`openChange`},exportAs:[`ngbDropdown`],features:[CE]})}}return i})();var Ce$1=(()=>{class n{transform(e){return e??[]}static{this.ɵfac=function(t){return new(t||n)}}static{this.ɵpipe=bT({name:`dynamicList`,type:n,pure:!0})}}return n})();var xe$3=n=>({action:n});var ve$3=(n,l)=>l.title;function ye$2(n,l){if(n&1){let e=AC();bs$1(0,`button`,8),fy(`click`,function(){_f(e);return Mf(i_$1(2).handleBack())}),j_$1(1),Mu()}if(n&2){let e=i_$1().$implicit,t=i_$1();xb(),Ou(` ← `,e(`back-to`,J_$1(1,xe$3,t.currentLevel()[t.currentLevel().length-1])),` `)}}function we$2(n,l){n&1&&(bs$1(0,`span`,10),j_$1(1,`→`),Mu())}function Ae$1(n,l){if(n&1){let e=AC();bs$1(0,`button`,9),fy(`click`,function(){let i=_f(e).$implicit;return Mf(i_$1(2).handleItemClick(i))}),j_$1(1),DC(2,we$2,2,0,`span`,10),Mu()}if(n&2){let e=l.$implicit;xb(),Ou(` `,e.title,` `),xb(),bC(e.children.length>0||e.dynamicList?2:-1)}}function Se$3(n,l){if(n&1){let e=AC();xu(0),bs$1(1,`div`,1)(2,`h4`,2),j_$1(3),Mu(),bs$1(4,`button`,3),fy(`click`,function(){_f(e);return Mf(i_$1().modal.close())}),Mu()(),bs$1(5,`div`,4),DC(6,ye$2,2,3,`button`,5),bs$1(7,`div`,6),CC(8,Ae$1,3,2,`button`,7,ve$3),Mu()(),Gs$1()}if(n&2){let e=l.$implicit,t=i_$1();xb(3),Ou(` `,e(`title`),` `),xb(3),bC(t.currentLevel().length>0?6:-1),xb(2),_C(t.currentItems())}}var be$1=(()=>{class n{constructor(){this.utilityService=E$2(w$5),this.modal=E$2(F$6),this.accountService=E$2(yc$1),this.cdRef=E$2(OB),this.destroyRef=E$2(te$5),this.entity=TB(null),this.filteredActions=TB([]),this.actionPerformed=wB(),this.currentItems=be$3([]),this.currentLevel=be$3([])}ngOnInit(){let e=this.surfaceDownloadAction(this.filteredActions().map(t=>this.utilityService.copyActionItem(t)));this.currentItems.set(this.translateOptions(e))}handleItemClick(e){if(e.children?.length>0){this.currentLevel.update(i=>[...i,e.title]),e.children.length===1&&e.children[0].dynamicList?e.children[0].dynamicList.subscribe(i=>{this.currentItems.set(i.map(o=>x$3(w$4({},e),{children:[],title:o.title,_extra:o,action:e.children[0].action})))}):this.currentItems.set(this.translateOptions(e.children));return}let t=e.callback(e,this.entity());if(t&&typeof t.subscribe==`function`){t.subscribe(i=>{this.actionPerformed.emit(i),this.modal.close(i)});return}this.modal.close(e)}handleBack(){this.currentLevel.update(e=>{let t=e.slice(0,-1),i=this.filteredActions().map(o=>this.utilityService.copyActionItem(o));i=this.surfaceDownloadAction(i);for(let o of t)i=i.find(s=>s.title===o)?.children||[];return this.currentItems.set(this.translateOptions(i)),t})}translateOptions(e){return e.map(t=>x$3(w$4({},t),{title:Mt$4(`actionable.`+t.title)}))}surfaceDownloadAction(e){let t=e.findIndex(s=>s.action===ke$3.Submenu&&s.title===`others`);
24if(t<0)return e;let i=e[t].children.findIndex(s=>s.action===ke$3.Download);if(i<0)return e;let o=e[t].children.splice(i,1)[0];return e.push(o),e[t].children.length===0&&e.splice(t,1),e}static{this.ɵfac=function(t){return new(t||n)}}static{this.ɵcmp=yT({type:n,selectors:[[`app-actionable-modal`]],inputs:{entity:[1,`entity`],filteredActions:[1,`filteredActions`]},outputs:{actionPerformed:`actionPerformed`},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[1,`modal-title`],[`type`,`button`,`aria-label`,`close`,1,`btn-close`,3,`click`],[1,`modal-body`,`scrollable-modal`],[1,`btn`,`btn-secondary`,`w-100`,`mb-3`,`text-start`],[1,`d-grid`,`gap-2`],[1,`btn`,`btn-outline-primary`,`text-start`,`d-flex`,`justify-content-between`,`align-items-center`,`w-100`],[1,`btn`,`btn-secondary`,`w-100`,`mb-3`,`text-start`,3,`click`],[1,`btn`,`btn-outline-primary`,`text-start`,`d-flex`,`justify-content-between`,`align-items-center`,`w-100`,3,`click`],[1,`ms-1`]],template:function(t,i){t&1&&Dm$1(0,Se$3,10,2,`ng-container`,0),t&2&&Vm$1(`translocoPrefix`,`actionable`)},dependencies:[Ct$3],encapsulation:2})}}return n})();function Me$2(n,l,e,t){return(!n.requiredRoles?.length||t.hasAnyRole(e,n.requiredRoles))&&n.shouldRender(n,l,e)}function G$3(n,l,e,t){return n.reduce((i,o)=>
24{if(o.children?.length>0&&!o.dynamicList){let s=G$3(o.children,l,e,t);return s.length>0&&i.push(x$3(w$4({},o),{children:s})),i}return Me$2(o,l,e,t)&&i.push(o),i},[])}var ge$2=n=>({"phone-hidden":n});var Te$3=n=>({list:n,topLevel:!0});var De$1=n=>({list:n,topLevel:!1});var fe$4=(n,l)=>l.title;function ke(n,l){if(n&1){let e=AC();bs$1(0,`button`,4),fy(`click`,function(i){_f(e);return Mf(i_$1(3).openMobileActionableMenu(i))}),bs$1(1,`span`,5),j_$1(2),Mu(),Hm$1(3,`i`,6),Mu()}if(n&2){i_$1(2);let e=$_$1(1),t=i_$1();N_$1(q_$1(`btn `,t.btnClass())),Vm$1(`id`,U_$1(e))(`disabled`,t.disabled()),xb(),Vm$1(`ngClass`,J_$1(11,ge$2,t.hideLabelOnMobile())),xb(),Ly(t.label()),xb(),N_$1(q_$1(`fa `,t.iconClass()))}}function Le$1(n,l){n&1&&Um$1(0)}function Ie$2(n,l){if(n&1){let e=AC();bs$1(0,`button`,12),fy(`mouseenter`,function(){_f(e);let i=i_$1(4).topLevel;return Mf(i_$1(4).closeAllSubmenus(i))})(`click`,function(i){let o=_f(e).$implicit,s=i_$1(3).$implicit;return Mf(i_$1(5).performDynamicClick(i,s,o))}),j_$1(1),Mu()}if(n&2){let e=l.$implicit;xb(),Ly(e.title)}}function Ve$1(n,l){n&1&&CC(0,Ie$2,2,1,`button`,11,fe$4),n&2&&_C(l)}function Fe$2(n,l){if(n&1){let e=AC();bs$1(0,`button`,12),fy(`mouseenter`,function(){_f(e);let i=i_$1(3).topLevel;return Mf(i_$1(4).closeAllSubmenus(i))})(`click`,function(i){_f(e);let o=i_$1(2).$implicit;return Mf(i_$1(5).performAction(i,o))}),j_$1(1),Mu()}if(n&2){let e=i_$1(2).$implicit,t=i_$1(4).$implicit;xb(),Ly(t(e.title))}}function Oe$1(n,l){if(n&1&&(DC(0,Ve$1,2,0),rM(1,`async`),rM(2,`dynamicList`),_u(3,Fe$2,2,1,`button`,11)),n&2){let e,t=i_$1().$implicit;bC((e=t.dynamicList!==void 0&&iM(2,3,iM(1,1,t.dynamicList)))?0:3,e)}}function Ne$3(n,l){if(n&1&&(bs$1(0,`button`,15),j_$1(1),Hm$1(2,`i`,16),Mu()),n&2){let e=i_$1(3).$implicit,t=i_$1(4).$implicit;Vm$1(`id`,q_$1(`actions-`,e.title)),xb(),Ou(` `,t(e.title),` `)}}function Ee$2(n,l){n&1&&Um$1(0)}function Pe$2(n,l){if(n&1){let e=AC();bs$1(0,`div`,14,1),fy(`click`,function(){_f(e);let i=p_$1(1),o=i_$1(2).$implicit;return Mf(i_$1(5).openSubmenu(o.title,i))})(`mouseenter`,function(){_f(e);let i=p_$1(1),o=i_$1(2).$implicit,s=i_$1(5);return s.cancelCloseSubmenus(),Mf(s.openSubmenu(o.title,i))})(`mouseover`,function(i){_f(e);return Mf(i_$1(7).preventEvent(i))}),DC(2,Ne$3,3,3,`button`,15),bs$1(3,`div`,9),Dm$1(4,Ee$2,1,0,`ng-container`,10),Mu()()}if(n&2){let e=i_$1(2).$implicit;i_$1(2);let t=p_$1(8),i=i_$1(3);xb(2),bC(i.willRenderAction(e,i.currentUser())?2:-1),xb(),jm$1(`aria-labelledby`,q_$1(`actions-`,e.title)),xb(),Vm$1(`ngTemplateOutlet`,t)(`ngTemplateOutletContext`,J_$1(5,De$1,e.children))}}function Re$2(n,l){if(n&1&&(DC(0,Pe$2,5,7,`div`,13),rM(1,`async`)),n&2){let e=i_$1().$implicit;bC(i_$1(5).shouldRenderSubMenu(e,iM(1,1,e.children?.[0].dynamicList))?0:-1)}}function $e$1(n,l){if(n&1&&DC(0,Oe$1,4,5)(1,Re$2,2,3),n&2){let e=l.$implicit;bC(e.children===void 0||e?.children?.length===0||e.dynamicList!==void 0?0:1)}}function Be$1(n,l){if(n&1&&CC(0,$e$1,2,1,null,null,fe$4),n&2){let e=l.list;_C(e)}}function He(n,l){if(n&1){let e=AC();bs$1(0,`div`,7)(1,`button`,8),fy(`click`,function(i){_f(e);return Mf(i_$1(3).preventEvent(i))}),bs$1(2,`span`,5),j_$1(3),Mu(),Hm$1(4,`i`,6),Mu(),bs$1(5,`div`,9),Dm$1(6,Le$1,1,0,`ng-container`,10),Mu()(),Dm$1(7,Be$1,2,0,`ng-template`,null,0,lM)}if(n&2){let e=p_$1(8);i_$1(2);let t=$_$1(1),i=i_$1();xb(),N_$1(q_$1(`btn `,i.btnClass())),Vm$1(`id`,U_$1(t))(`disabled`,i.disabled()),xb(),Vm$1(`ngClass`,J_$1(14,ge$2,i.hideLabelOnMobile())),xb(),Ly(i.label()),xb(),N_$1(q_$1(`fa `,i.iconClass())),xb(),jm$1(`aria-labelledby`,t),xb(),Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,J_$1(16,Te$3,i.filteredActions()))}}function je(n,l){if(n&1&&DC(0,ke,4,13,`button`,3)(1,He,9,18),n&2)bC(i_$1(2).breakpointService.isTabletOrBelow()?0:1)}function Ue(n,l){if(n&1&&(xu(0),By(1),DC(2,je,2,1),Gs$1()),n&2){let e=i_$1();xb(),B_$1(`actions-`+e.labelBy()),xb(),bC(e.filteredActions().length>0?2:-1)}}var Ct$1=(()=>{class n{constructor(){this.accountService=E$2(yc$1),this.modalService=E$2(st$4),this.breakpointService=E$2(W$1),this.iconClass=TB(`fa-ellipsis-v`),this.btnClass=TB(``),this.actions=TB([]),this.labelBy=TB(`card`),this.label=TB(``),this.disabled=TB(!1),this.hideLabelOnMobile=TB(!1),this.entity=TB(null),this.actionHandler=wB(),this.filteredActions=it$3(()=>{let e=this.entity(),t=this.accountService.currentUser(),i=this.actions();return!t||!i.length?[]:G$3(i,e,t,this.accountService)}),this.currentUser=this.accountService.currentUser,this.submenu={},this.closeTimeout=null}ngOnDestroy(){this.cancelCloseSubmenus()}preventEvent(e){e.stopPropagation(),e.preventDefault()}performAction(e,t){this.preventEvent(e),t.callback(t,this.entity()).subscribe(i=>{this.actionHandler.emit(i)})}willRenderAction(e,t){let i=!e.requiredRoles?.length||this.accountService.hasAnyRole(t,e.requiredRoles),o=e.shouldRender(e,this.entity(),t);return i&&o}shouldRenderSubMenu(e,t){return e.children[0].dynamicList===void 0||e.children[0].dynamicList===null||t&&t.length>0}openSubmenu(e,t){Object.keys(this.submenu).length>0&&Object.keys(this.submenu).filter(o=>o!==e).forEach(o=>{this.submenu[o].close(),delete this.submenu[o]}),this.submenu[e]=t,t.open()}closeAllSubmenus(e=!1){e&&(this.closeTimeout&&clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(()=>{Object.keys(this.submenu).forEach(t=>{this.submenu[t].close(),delete this.submenu[t]})},100))}cancelCloseSubmenus(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}performDynamicClick(e,t,i){t._extra=i,this.performAction(e,t)}openMobileActionableMenu(e){this.preventEvent(e);let t=this.modalService.open(be$1);t.setInput(`entity`,this.entity()),t.setInput(`filteredActions`,this.filteredActions()),t.componentInstance.actionPerformed.subscribe(i=>{this.actionHandler.emit(i)})}static{this.ɵfac=function(t){return new(t||n)}}static{this.ɵcmp=yT({type:n,selectors:[[`app-card-actionables`]],inputs:{iconClass:[1,`iconClass`],btnClass:[1,`btnClass`],actions:[1,`actions`],labelBy:[1,`labelBy`],label:[1,`label`],disabled:[1,`disabled`],hideLabelOnMobile:[1,`hideLabelOnMobile`],entity:[1,`entity`]},outputs:{actionHandler:`actionHandler`},decls:1,vars:1,consts:[[`submenu`,``],[`subMenuHover`,`ngbDropdown`],[4,`transloco`,`translocoPrefix`],[3,`disabled`,`class`,`id`],[3,`click`,`disabled`,`id`],[3,`ngClass`],[`aria-hidden`,`true`],[`ngbDropdown`,``,`container`,`body`,1,`d-inline-block`],[`ngbDropdownToggle`,``,3,`click`,`disabled`,`id`],[`ngbDropdownMenu`,``],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`ngbDropdownItem`,``],[`ngbDropdownItem`,``,3,`mouseenter`,`click`],[`ngbDropdown`,``,`placement`,`right left`,1,`submenu-wrapper`],[`ngbDropdown`,``,`placement`,`right left`,1,`submenu-wrapper`,3,`click`,`mouseenter`,`mouseover`],[`ngbDropdownToggle`,``,1,`submenu-toggle`,3,`id`],[1,`fa-solid`,`fa-angle-right`,`submenu-icon`]],template:function(t,i){t&1&&Dm$1(0,Ue,3,2,`ng-container`,2),t&2&&Vm$1(`translocoPrefix`,`actionable`)},dependencies:[L,se$3,q$1,U$4,Ct$3,cn,sn,Ce$1,fn],styles:[`.dropdown-toggle[_ngcontent-%COMP%]:after{content:none!important}.submenu-wrapper[_ngcontent-%COMP%]{position:relative}.submenu-wrapper[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;right:-.625rem;width:.625rem;height:100%;background:transparent;cursor:pointer;pointer-events:auto}.submenu-toggle[_ngcontent-%COMP%]{display:block;width:100%;padding:var(--%NS%bs-dropdown-item-padding-y) var(--%NS%bs-dropdown-item-padding-x);font-weight:400;text-align:inherit;border:0;color:var(--%NS%dropdown-item-text-color);
24background-color:var(--%NS%dropdown-item-bg-color)}.submenu-toggle[_ngcontent-%COMP%]:hover{color:var(--%NS%dropdown-item-hover-text-color);background-color:var(--%NS%dropdown-item-hover-bg-color);cursor:pointer}.submenu-toggle[_ngcontent-%COMP%]:focus-visible{color:var(--%NS%dropdown-item-hover-text-color);background-color:var(--%NS%dropdown-item-hover-bg-color)}.submenu-icon[_ngcontent-%COMP%]{float:right;padding:var(--%NS%bs-dropdown-item-padding-y) 0}[_nghost-%COMP%]   .dropdown-toggle.btn[_ngcontent-%COMP%]:disabled{border:none}
25/*# sourceMappingURL=card-actionables.component-S35ADZNF.css.map */`]})}}return n})();var et=(()=>{class t{constructor(){this.translocoService=E$2(De$3)}transform(e){return e.maxHoursToRead===0||e.minHoursToRead===0?this.translocoService.translate(`read-time-pipe.less-than-hour`):`${e.minHoursToRead}${e.maxHoursToRead!==e.minHoursToRead?`-`+e.maxHoursToRead:``} ${e.minHoursToRead>1?this.translocoService.translate(`read-time-pipe.hours`):this.translocoService.translate(`read-time-pipe.hour`)}`}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵpipe=bT({name:`readTime`,type:t,pure:!0})}}return t})();function U$3(t,n){if(t&1&&(Hm$1(0,`input`,7),Sw()),t&2){let e=i_$1(2),o=i_$1().$implicit;Vm$1(`formControlName`,o)(`appFormField`,e),Aw()}}function z$1(t,n){if(t&1&&(Hm$1(0,`input`,8),Sw()),t&2){let e=i_$1(2),o=i_$1().$implicit;Vm$1(`formControlName`,o)(`appFormField`,e),Aw()}}function J$3(t,n){if(t&1&&(bs$1(0,`div`,6),DC(1,U$3,1,2,`input`,7)(2,z$1,1,2,`input`,8),Mu()),t&2){let e=i_$1(2).$implicit,o=i_$1(2);xb(),bC(o.getKeyInputType(e)===`number`?1:2)}}function Q$1(t,n){if(t&1&&(bs$1(0,`div`,4)(1,`app-setting-item`,5),Dm$1(2,J$3,3,1,`ng-template`,null,0,lM),Mu()()),t&2){let e=i_$1().$implicit,o=i_$1().$implicit;xb(),Vm$1(`title`,o(e+`-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`control`,n)}}function W(t,n){if(t&1&&DC(0,Q$1,4,4,`div`,4),t&2){let e,o=n.$implicit;i_$1();bC((e=$_$1(1).get(o))?0:-1,e)}}function X$2(t,n){if(t&1&&(xu(0),By(1),bs$1(2,`form`,2)(3,`div`,3),CC(4,W,1,1,null,null,TC),Mu()(),Gs$1()),t&2){let e=i_$1();xb();let o=B_$1(e.form());xb(),Vm$1(`formGroup`,o),xb(2),_C(e.metadataIds)}}var q={aniListId:0,malId:0,mangaBakaId:0,hardcoverId:0,comicVineId:null,metronId:0,cbrId:0};function pt$1(t,n){t.addControl(`aniListId`,new Z$2(n.aniListId,[])),t.addControl(`malId`,new Z$2(n.malId,[])),t.addControl(`hardcoverId`,new Z$2(n.hardcoverId,[])),t.addControl(`metronId`,new Z$2(n.metronId,[])),t.addControl(`comicVineId`,new Z$2(n.comicVineId,[])),t.addControl(`mangaBakaId`,new Z$2(n.mangaBakaId,[])),t.addControl(`cbrId`,new Z$2(n.cbrId,[]))}var st$1=(()=>{class t{constructor(){this.form=TB.required(),this.entity=TB.required(),this.metadataIds=Object.keys(q)}ngOnInit(){let e=this.form(),o=this.entity();Object.keys(q).forEach(r=>{if(e.contains(r))e.get(r)?.setValue(o[r]??null);else{let g=new Z$2(o[r]??null);this.getIsDisabled(r)&&g.disable(),e.addControl(r,g)}})}getKeyInputType(e){return e===`comicVineId`?`text`:`number`}getIsDisabled(e){return e===`cbrId`}static{this.ɵfac=function(o){return new(o||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-external-metadata-form`]],inputs:{form:[1,`form`],entity:[1,`entity`]},decls:1,vars:1,consts:[[`view`,``],[4,`transloco`,`translocoPrefix`],[3,`formGroup`],[1,`row`],[1,`col-md-6`,`col-sm-12`,`mb-3`],[3,`title`,`toggleOnViewClick`,`showEdit`,`control`],[1,`input-group`],[`type`,`number`,`inputmode`,`numeric`,1,`form-control`,3,`formControlName`,`appFormField`],[`type`,`text`,1,`form-control`,3,`formControlName`,`appFormField`]],template:function(o,r){o&1&&Dm$1(0,X$2,6,2,`ng-container`,1),o&2&&Vm$1(`translocoPrefix`,`edit-external-metadata-form`)},dependencies:[Ct$3,Wt$3,ai$1,ii$2,Qe$5,vn,ei$1,ti$1,li$1,fn$1,wn,w$6],encapsulation:2})}}return t})();var o=(()=>{class t{transform(r,e){if(!r||!e)return r;let i=r.filter(f=>e(f));return i.length===r.length?r:i}static{this.ɵfac=function(e){return new(e||t)}}static{this.ɵpipe=bT({name:`filter`,type:t,pure:!1})}}return t})();var X$1=(e,_,t)=>({$implicit:e,pages:_,disabled:t});var Y$1=e=>({disabled:!0,currentPage:e});var Z=(e,_,t)=>({disabled:e,$implicit:_,currentPage:t});var V$1=(e,_)=>({disabled:e,currentPage:_});var ee$2=e=>({disabled:e});
25function te$1(e,_){e&1&&(bs$1(0,`span`,13),r_$1(1,7),Mu())}function ie$2(e,_){e&1&&(bs$1(0,`span`,13),r_$1(1,8),Mu())}function ne$1(e,_){e&1&&(bs$1(0,`span`,13),r_$1(1,9),Mu())}function ae$1(e,_){e&1&&(bs$1(0,`span`,13),r_$1(1,10),Mu())}function _e$2(e,_){e&1&&j_$1(0,`...`)}function se$2(e,_){if(e&1&&j_$1(0),e&2){let t=_.$implicit;Ly(t)}}function le$2(e,_){}function oe(e,_){if(e&1&&(bs$1(0,`a`,16),Dm$1(1,le$2,0,0,`ng-template`,12),Mu()),e&2){let t=i_$1(2).$implicit,i=i_$1(),n=p_$1(9);xb(),Vm$1(`ngTemplateOutlet`,i.tplEllipsis?.templateRef||n)(`ngTemplateOutletContext`,J_$1(2,Y$1,t))}}function re$1(e,_){}function ge$1(e,_){if(e&1){let t=AC();bs$1(0,`a`,18),fy(`click`,function(n){_f(t);let a=i_$1().$implicit;return i_$1(2).selectPage(a),Mf(n.preventDefault())}),Dm$1(1,re$1,0,0,`ng-template`,12),Mu()}if(e&2){let t=i_$1().$implicit,i=i_$1(),n=i.$implicit,a=i.disabled,s=i_$1(),C=p_$1(11);jm$1(`tabindex`,a?`-1`:null)(`aria-disabled`,a?`true`:null)(`aria-current`,t===n?`page`:null),xb(),Vm$1(`ngTemplateOutlet`,s.tplNumber?.templateRef||C)(`ngTemplateOutletContext`,eM(5,Z,a,t,n))}}function pe$1(e,_){if(e&1&&(bs$1(0,`li`,15),DC(1,oe,2,4,`a`,16)(2,ge$1,2,9,`a`,17),Mu()),e&2){let t=_.$implicit,i=i_$1(),n=i.$implicit,a=i.disabled,s=i_$1();Ty(`active`,t===n)(`disabled`,s.isEllipsis(t)||a),xb(),bC(s.isEllipsis(t)?1:2)}}function ce$2(e,_){if(e&1&&CC(0,pe$1,3,5,`li`,14,wC),e&2){let t=_.pages;_C(t)}}function ue$3(e,_){}function de$2(e,_){if(e&1){let t=AC();bs$1(0,`li`,15)(1,`a`,19),fy(`click`,function(n){return _f(t),i_$1().selectPage(1),Mf(n.preventDefault())}),Dm$1(2,ue$3,0,0,`ng-template`,12),Mu()()}if(e&2){let t=i_$1(),i=p_$1(1);Ty(`disabled`,t.previousDisabled()),xb(),jm$1(`tabindex`,t.previousDisabled()?`-1`:null)(`aria-disabled`,t.previousDisabled()?`true`:null),xb(),Vm$1(`ngTemplateOutlet`,t.tplFirst?.templateRef||i)(`ngTemplateOutletContext`,X_$1(6,V$1,t.previousDisabled(),t.page))}}function Oe(e,_){}function fe$3(e,_){if(e&1){let t=AC();bs$1(0,`li`,15)(1,`a`,20),fy(`click`,function(n){_f(t);let a=i_$1();return a.selectPage(a.page-1),Mf(n.preventDefault())}),Dm$1(2,Oe,0,0,`ng-template`,12),Mu()()}if(e&2){let t=i_$1(),i=p_$1(3);Ty(`disabled`,t.previousDisabled()),xb(),jm$1(`tabindex`,t.previousDisabled()?`-1`:null)(`aria-disabled`,t.previousDisabled()?`true`:null),xb(),Vm$1(`ngTemplateOutlet`,t.tplPrevious?.templateRef||i)(`ngTemplateOutletContext`,J_$1(6,ee$2,t.previousDisabled()))}}function Te$2(e,_){}function Ne$2(e,_){}function me$2(e,_){if(e&1){let t=AC();bs$1(0,`li`,15)(1,`a`,21),fy(`click`,function(n){_f(t);let a=i_$1();return a.selectPage(a.page+1),Mf(n.preventDefault())}),Dm$1(2,Ne$2,0,0,`ng-template`,12),Mu()()}if(e&2){let t=i_$1(),i=p_$1(5);Ty(`disabled`,t.nextDisabled()),xb(),jm$1(`tabindex`,t.nextDisabled()?`-1`:null)(`aria-disabled`,t.nextDisabled()?`true`:null),xb(),Vm$1(`ngTemplateOutlet`,t.tplNext?.templateRef||i)(`ngTemplateOutletContext`,X_$1(6,V$1,t.nextDisabled(),t.page))}}function Se$2(e,_){}function Ae(e,_){if(e&1){let t=AC();bs$1(0,`li`,15)(1,`a`,22),fy(`click`,function(n){_f(t);let a=i_$1();return a.selectPage(a.pageCount),Mf(n.preventDefault())}),Dm$1(2,Se$2,0,0,`ng-template`,12),Mu()()}if(e&2){let t=i_$1(),i=p_$1(7);Ty(`disabled`,t.nextDisabled()),xb(),jm$1(`tabindex`,t.nextDisabled()?`-1`:null)(`aria-disabled`,t.nextDisabled()?`true`:null),xb(),Vm$1(`ngTemplateOutlet`,t.tplLast?.templateRef||i)(`ngTemplateOutletContext`,X_$1(6,V$1,t.nextDisabled(),t.page))}}var Pe$1=(()=>{class e{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵprov=Mn({token:e,factory:e.ɵfac})}}return e})();var he$3=(()=>{class e{constructor(){this.templateRef=E$2(mo$2)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=DT({type:e,selectors:[[`ng-template`,`ngbPaginationEllipsis`,``]]})}}return e})();var Re$1=(()=>{class e{constructor(){this.templateRef=E$2(mo$2)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=DT({type:e,selectors:[[`ng-template`,`ngbPaginationFirst`,``]]})}}return e})();var be=(()=>{class e{constructor(){this.templateRef=E$2(mo$2)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=DT({type:e,selectors:[[`ng-template`,`ngbPaginationLast`,``]]})}}return e})();var Me$1=(()=>{class e{constructor(){this.templateRef=E$2(mo$2)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=DT({type:e,selectors:[[`ng-template`,`ngbPaginationNext`,``]]})}}return e})();var Ee$1=(()=>{class e{constructor(){this.templateRef=E$2(mo$2)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=DT({type:e,selectors:[[`ng-template`,`ngbPaginationNumber`,``]]})}}return e})();var xe$2=(()=>{class e{constructor(){this.templateRef=E$2(mo$2)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=DT({type:e,selectors:[[`ng-template`,`ngbPaginationPrevious`,``]]})}}return e})();var Ie$1=(()=>{class e{constructor(){this.templateRef=E$2(mo$2)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=DT({type:e,selectors:[[`ng-template`,`ngbPaginationPages`,``]]})}}return e})();var We=(()=>{class e{constructor(){this._config=E$2(Pe$1),this.pageCount=0,this.pages=[],this.disabled=this._config.disabled,this.boundaryLinks=this._config.boun
25daryLinks,this.directionLinks=this._config.directionLinks,this.ellipses=this._config.ellipses,this.rotate=this._config.rotate,this.maxSize=this._config.maxSize,this.page=1,this.pageSize=this._config.pageSize,this.pageChange=new ht$3(!0),this.size=this._config.size}hasPrevious(){return this.page>1}hasNext(){return this.page<this.pageCount}nextDisabled(){return!this.hasNext()||this.disabled}previousDisabled(){return!this.hasPrevious()||this.disabled}selectPage(t){this._updatePages(t)}ngOnChanges(t){this._updatePages(this.page)}isEllipsis(t){return t===-1}_applyEllipses(t,i){this.ellipses&&(t>0&&(t>2?this.pages.unshift(-1):t===2&&this.pages.unshift(2),this.pages.unshift(1)),i<this.pageCount&&(i<this.pageCount-2?this.pages.push(-1):i===this.pageCount-2&&this.pages.push(this.pageCount-1),this.pages.push(this.pageCount)))}_applyRotation(){let t=0,i=this.pageCount,n=Math.floor(this.maxSize/2),a=this.maxSize%2===0?n-1:n;return this.page<=n?i=this.maxSize:this.pageCount-this.page<n?t=this.pageCount-this.maxSize:(t=this.page-n-1,i=this.page+a),[t,i]}_applyPagination(){let i=(Math.ceil(this.page/this.maxSize)-1)*this.maxSize;return[i,i+this.maxSize]}_setPageInRange(t){let i=this.page;this.page=bs$2(t,this.pageCount,1),this.page!==i&&io$1(this.collectionSize)&&this.pageChange.emit(this.page)}_updatePages(t){this.pageCount=Math.ceil(this.collectionSize/this.pageSize),io$1(this.pageCount)||(this.pageCount=0),this.pages.length=0;for(let i=1;i<=this.pageCount;i++)this.pages.push(i);if(this._setPageInRange(t),this.maxSize>0&&this.pageCount>this.maxSize){let i=0,n=this.pageCount;this.rotate?[i,n]=this._applyRotation():[i,n]=this._applyPagination(),this.pages=this.pages.slice(i,n),this._applyEllipses(i,n)}}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`ngb-pagination`]],contentQueries:function(i,n,a){if(i&1&&gy(a,he$3,5)(a,Re$1,5)(a,be,5)(a,Me$1,5)(a,Ee$1,5)(a,xe$2,5)(a,Ie$1,5),i&2){let s;u_$1(s=d_$1())&&(n.tplEllipsis=s.first),u_$1(s=d_$1())&&(n.tplFirst=s.first),u_$1(s=d_$1())&&(n.tplLast=s.first),u_$1(s=d_$1())&&(n.tplNext=s.first),u_$1(s=d_$1())&&(n.tplNumber=s.first),u_$1(s=d_$1())&&(n.tplPrevious=s.first),u_$1(s=d_$1())&&(n.tplPages=s.first)}},hostAttrs:[`role`,`navigation`],inputs:{disabled:`disabled`,boundaryLinks:`boundaryLinks`,directionLinks:`directionLinks`,ellipses:`ellipses`,rotate:`rotate`,collectionSize:`collectionSize`,maxSize:`maxSize`,page:`page`,pageSize:`pageSize`,size:`size`},outputs:{pageChange:`pageChange`},features:[CE],decls:20,vars:12,consts:()=>{let t;t=$localize`:@@ngb.pagination.first:««`;let i;i=$localize`:@@ngb.pagination.previous:«`;let n;n=$localize`:@@ngb.pagination.next:»`;let a;a=$localize`:@@ngb.pagination.last:»»`;let s;s=$localize`:@@ngb.pagination.first-aria:First`;let C;C=$localize`:@@ngb.pagination.previous-aria:Previous`;let K;K=$localize`:@@ngb.pagination.next-aria:Next`;let U;return U=$localize`:@@ngb.pagination.last-aria:Last`,[[`first`,``],[`previous`,``],[`next`,``],[`last`,``],[`ellipsis`,``],[`defaultNumber`,``],[`defaultPages`,``],t,i,n,a,[1,`page-item`,3,`disabled`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`aria-hidden`,`true`],[1,`page-item`,3,`active`,`disabled`],[1,`page-item`],[`tabindex`,`-1`,`aria-disabled`,`true`,1,`page-link`],[`href`,``,1,`page-link`],[`href`,``,1,`page-link`,3,`click`],[`aria-label`,s,`href`,``,1,`page-link`,3,`click`],[`aria-label`,C,`href`,``,1,`page-link`,3,`click`],[`aria-label`,K,`href`,``,1,`page-link`,3,`click`],[`aria-label`,U,`href`,``,1,`page-link`,3,`click`]]},template:function(i,n){if(i&1&&(Dm$1(0,te$1,2,0,`ng-template`,null,0,lM)(2,ie$2,2,0,`ng-template`,null,1,lM)(4,ne$1,2,0,`ng-template`,null,2,lM)(6,ae$1,2,0,`ng-template`,null,3,lM)(8,_e$2,1,0,`ng-template`,null,4,lM)(10,se$2,1,1,`ng-template`,null,5,lM)(12,ce$2,2,0,`ng-template`,null,6,lM),bs$1(14,`ul`),DC(15,de$2,3,9,`li`,11),DC(16,fe$3,3,8,`li`,11),Dm$1(17,Te$2,0,0,`ng-template`,12),DC(18,me$2,3,9,`li`,11),DC(19,Ae,3,9,`li`,11),Mu()),i&2){let a=p_$1(13);xb(14),N_$1(`pagination`+(n.size?` pagination-`+n.size:``)),xb(),bC(n.boundaryLinks?15:-1),xb(),bC(n.directionLinks?16:-1),xb(),Vm$1(`ngTemplateOutlet`,n.tplPages?.templateRef||a)(`ngTemplateOutletContext`,eM(8,X$1,n.page,
25n.pages,n.disabled)),xb(),bC(n.directionLinks?18:-1),xb(),bC(n.boundaryLinks?19:-1)}},dependencies:[cn],encapsulation:2})}}return e})();var y$1=(()=>{class p{constructor(){this.httpClient=E$2(ue$6),this.toastr=E$2(Bt$3),this.baseUrl=i$1.apiUrl}uploadByUrl(t){return this.httpClient.post(this.baseUrl+`upload/upload-by-url`,{url:t},e$1)}uploadChapterCover(t){return this.httpClient.post(this.baseUrl+`upload/upload-chapter-cover?chapterId=`+t,{},e$1)}uploadVolumeCover(t){return this.httpClient.post(this.baseUrl+`upload/upload-volume-cover?volumeId=`+t,{},e$1)}uploadSeriesCover(t){return this.httpClient.post(this.baseUrl+`upload/upload-series-cover?seriesId=`+t,{},e$1)}uploadByFile(t){let e=new FormData;return e.append(`file`,t,t.name),this.httpClient.post(this.baseUrl+`upload/upload-by-file`,e,e$1)}updateSeriesCoverImage(t,e,r=!0){return this.httpClient.post(this.baseUrl+`upload/series`,{id:t,fileName:e,lockCover:r}).pipe(xd$1(o=>{this.toastr.info(Mt$4(`series-detail.cover-change`))}))}updateCollectionCoverImage(t,e,r=!0){return this.httpClient.post(this.baseUrl+`upload/collection`,{id:t,fileName:e,lockCover:r}).pipe(xd$1(o=>{this.toastr.info(Mt$4(`series-detail.cover-change`))}))}updateReadingListCoverImage(t,e,r=!0){return this.httpClient.post(this.baseUrl+`upload/reading-list`,{id:t,fileName:e,lockCover:r}).pipe(xd$1(o=>{this.toastr.info(Mt$4(`series-detail.cover-change`))}))}updateChapterCoverImage(t,e,r=!0){return this.httpClient.post(this.baseUrl+`upload/chapter`,{id:t,fileName:e,lockCover:r}).pipe(xd$1(o=>{this.toastr.info(Mt$4(`series-detail.cover-change`))}))}updateVolumeCoverImage(t,e,r=!0){return this.httpClient.post(this.baseUrl+`upload/volume`,{id:t,fileName:e,lockCover:r}).pipe(xd$1(o=>{this.toastr.info(Mt$4(`series-detail.cover-change`))}))}updateLibraryCoverImage(t,e,r=!0){return this.httpClient.post(this.baseUrl+`upload/library`,{id:t,fileName:e,lockCover:r}).pipe(xd$1(o=>{this.toastr.info(Mt$4(`series-detail.cover-change`))}))}updatePersonCoverImage(t,e,r=!0){return this.httpClient.post(this.baseUrl+`upload/person`,{id:t,fileName:e,lockCover:r}).pipe(xd$1(o=>{this.toastr.info(Mt$4(`series-detail.cover-change`))}))}updateUserCoverImage(t,e){return this.httpClient.post(this.baseUrl+`upload/user`,{id:t,url:this._cleanBase64Url(e),lockCover:!1}).pipe(xd$1(r=>{this.toastr.info(Mt$4(`series-detail.cover-change`))}))}_cleanBase64Url(t){return t.startsWith(`data`)&&(t=t.split(`,`)[1]),t}static{this.ɵfac=function(e){return new(e||p)}}static{this.ɵprov=J$6({token:p,factory:p.ɵfac,providedIn:`root`})}}return p})();var _=(()=>{class i{constructor(){this.httpClient=E$2(ue$6),this.accountService=E$2(yc$1),this.destroyRef=E$2(te$5),this.baseUrl=i$1.apiUrl,this._devices=be$3([]),this.devices=this._devices.asReadonly(),this.devices$=XB(this.devices),XB(this.accountService.currentUser).pipe(Sd$1(e=>e?this.httpClient.get(this.baseUrl+`device`):(this._devices.set([]),at$3)),JB(this.destroyRef)).subscribe(e=>{e&&this._devices.set([...e])})}createEmailDevice(e,t,c){return this.httpClient.post(this.baseUrl+`device/create`,{name:e,platform:t,emailAddress:c})}updateEmailDevice(e,t,c,C){return this.httpClient.post(this.baseUrl+`device/update`,{id:e,name:t,platform:c,emailAddress:C})}deleteEmailDevice(e){return this.httpClient.delete(this.baseUrl+`device?deviceId=`+e)}getEmailDevices(){return this.httpClient.get(this.baseUrl+`device`,{}).pipe(xd$1(e=>{this._devices.set([...e])}))}sendToEmailDevice(e,t){return this.httpClient.post(this.baseUrl+`device/send-to`,{deviceId:t,chapterIds:e},e$1)}sendSeriesToEmailDevice(e,t){return this.httpClient.post(this.baseUrl+`device/send-series-to`,{deviceId:t,seriesId:e},e$1)}getMyClientDevices(){return this.httpClient.get(this.baseUrl+`device/client/devices`)}getAllDevices(){return this.httpClient.get(this.baseUrl+`device/client/all-devices`)}deleteClientDevice(e){return this.httpClient.delete(this.baseUrl+`device/client/device?clientDeviceId=`+e,e$1).pipe(qe$2(t=>t+``==`true`))}updateClientDeviceName(e,t){return this.httpClient.post(this.baseUrl+`device/client/update-name`,{name:t,deviceId:e})}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵprov=J$6({token:i,factory:i.ɵfac,providedIn:`root`})}}return i})();var b$3=(()=>{class i{constructor(){this.httpClient=E$2(ue$6),this.baseUrl=i$1.apiUrl}getForSeries(e,t,r=!1){return this.httpClient.get(this.baseUrl+`reading-profile/${e}/${t}?skipImplicit=${r}`)}getAllForSeries(e){return this.httpClient.get(this.baseUrl+`reading-profile/series?seriesId=${e}`)}getForLibrary(e){return this.httpClient.get(this.baseUrl+`reading-profile/library?libraryId=${e}`)}updateProfile(e){return this.httpClient.post(this.baseUrl+`reading-profile`,e)}updateParentProfile(e,t,r){return this.httpClient.post(this.baseUrl+`reading-profile/update-parent?seriesId=${t}&libraryId=${e}`,r)}createProfile(e){return this.httpClient.post(this.baseUrl+`reading-profile/create`,e)}promoteProfile(e){return this.httpClient.post(this.baseUrl+`reading-profile/promote?profileId=`+e,{})}updateImplicit(e,t,r){return this.httpClient.post(this.baseUrl+`reading-profile/series?seriesId=${t}&libraryId=${e}`,r)}getAllProfiles(){return this.httpClient.get(this.baseUrl+`reading-profile/all`)}delete(e){return this.httpClient.delete(this.baseUrl+`reading-profile?profileId=${e}`)}addToSeries(e,t){return this.httpClient.post(this.baseUrl+`reading-profile/series/${t}`,e)}clearSeriesProfiles(e){return this.httpClient.delete(this.baseUrl+`reading-profile/series/${e}`,{})}addToLibrary(e,t){return this.httpClient.post(this.baseUrl+`reading-profile/library/${t}`,e)}clearLibraryProfiles(e){return this.httpClient.delete(this.baseUrl+`reading-profile/library/${e}`,{})}bulkAddToSeries(e,t){let r={profileIds:e,seriesIds:t};return this.httpClient.post(this.baseUrl+`reading-profile/bulk`,r)}setDevices(e,t){return this.httpClient.post(this.baseUrl+`reading-profile/set-devices?profileId=${e}`,t)}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵprov=J$6({token:i,factory:i.ɵfac,providedIn:`root`})}}return i})();function V(t,x){if(t&1&&(xu(0),j_$1(1),rM(2,`defaultValue`),Gs$1()),t&2){let r=i_$1();xb(),Ou(` `,iM(2,1,r.renderText()),`
26`)}}var F$2=(()=>{class t{constructor(){this.utilityService=E$2(w$5),this.entityTitleService=E$2(j$4),this.LooseLeafOrSpecial=`-100000`,this.LibraryType=d$1,this.libraryType=TB.required(),this.entity=TB.required(),this.includeVolume=TB(!1),this.includeChapter=TB(!1),this.prioritizeTitleName=TB(!0),this.fallbackToVolume=TB(!0),this.isChapter
26=it$3(()=>this.utilityService.isChapter(this.entity())),this.titleName=it$3(()=>{if(this.isChapter())return this.entity().titleName||``;let e=this.entity(),o=e.name||``;return e.chapters.length>0&&e.chapters[0].titleName&&(o+=` - `+e.chapters[0].titleName),o}),this.volumeTitle=it$3(()=>this.isChapter()?this.entity().volumeTitle||``:this.entity().name||``),this.number=it$3(()=>this.isChapter()?this.entity().range||``:this.entity().name||``),this.renderText=it$3(()=>this.entityTitleService.computeTitle(this.entity(),this.libraryType(),{prioritizeTitleName:this.prioritizeTitleName(),fallbackToVolume:this.fallbackToVolume(),includeChapter:this.includeChapter(),includeVolume:this.includeVolume()}))}static{this.ɵfac=function(e){return new(e||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-entity-title`]],inputs:{libraryType:[1,`libraryType`],entity:[1,`entity`],includeVolume:[1,`includeVolume`],includeChapter:[1,`includeChapter`],prioritizeTitleName:[1,`prioritizeTitleName`],fallbackToVolume:[1,`fallbackToVolume`]},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`]],template:function(e,o){e&1&&Dm$1(0,V,3,3,`ng-container`,0),e&2&&Vm$1(`translocoPrefix`,`entity-title`)},dependencies:[Dt$2,Ct$3,f$9],encapsulation:2})}}return t})();var fe$2=[`fileSelector`];var he$2=i=>({openFileSelector:i});function ve$2(i,c){if(i&1&&(bs$1(0,`div`,8),j_$1(1),Mu()),i&2){let e=i_$1(2);xb(),Ly(e.dropZoneLabel)}}function xe$1(i,c){if(i&1){let e=AC();bs$1(0,`div`)(1,`input`,9),fy(`click`,function(n){_f(e);return Mf(i_$1(2).openFileSelector(n))}),Mu()()}if(i&2){let e=i_$1(2);xb(),Vm$1(`value`,U_$1(e.browseBtnLabel))(`className`,e.browseBtnClassName)}}function De(i,c){if(i&1&&Dm$1(0,ve$2,2,1,`div`,6)(1,xe$1,2,3,`div`,7),i&2){let e=i_$1();Vm$1(`ngIf`,e.dropZoneLabel),xb(),Vm$1(`ngIf`,e.showBrowseBtn)}}function Ce(i,c){}var b$2=class{constructor(c,e){this.relativePath=c,this.fileEntry=e}};var A=(()=>{class i{constructor(e){this.template=e}static{this.ɵfac=function(t){return new(t||i)(xo$2(mo$2))}}static{this.ɵdir=DT({type:i,selectors:[[``,`ngx-file-drop-content-tmp`,``]],standalone:!1})}}return i})();var P$2=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=e!=null&&`${e}`!=`false`}constructor(e,t){this.zone=e,this.renderer=t,this.accept=`*`,this.directory=!1,this.multiple=!0,this.dropZoneLabel=``,this.dropZoneClassName=`ngx-file-drop__drop-zone`,this.useDragEnter=!1,this.contentClassName=`ngx-file-drop__content`,this.showBrowseBtn=!1,this.browseBtnClassName=`btn btn-primary btn-xs ngx-file-drop__browse-btn`,this.browseBtnLabel=`Browse files`,this.onFileDrop=new ht$3,this.onFileOver=new ht$3,this.onFileLeave=new ht$3,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=n=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen(`document`,`dragstart`,n=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen(`document`,`dragend`,n=>{this.globalDraggingInProgress=!1})}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`)):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect=`copy`)}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let t;e.dataTransfer.items?t=e.dataTransfer.items:t=e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(t)}}uploadFiles(e){if(!this.isDropzoneDisabled()&&e.target){let t=e.target.files||[];this.checkFiles(t),this.resetFileInput()}}getFakeDropEntry(e){let t={name:e.name,isDirectory:!1,isFile:!0,file:n=>n(e)};
26return new b$2(t.name,t)}checkFile(e){if(e){if(`webkitGetAsEntry`in e){let t=e.webkitGetAsEntry();if(t){if(t.isFile){let n=new b$2(t.name,t);this.addToQueue(n)}else t.isDirectory&&this.traverseFileTree(t,t.name);return}}this.addToQueue(this.getFakeDropEntry(e))}}checkFiles(e){for(let t=0;t<e.length;t++)this.checkFile(e[t]);this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=ke$2(200,200).subscribe(()=>{if(this.files.length>0&&this.numOfActiveReadEntries===0){let t=this.files;this.files=[],this.onFileDrop.emit(t)}})}traverseFileTree(e,t){if(e.isFile){let n=new b$2(t,e);this.files.push(n)}else{t=t+`/`;let n=e.createReader(),r=[],p=()=>{this.numOfActiveReadEntries++,n.readEntries(V=>{if(V.length)r=r.concat(V),p();else if(r.length===0){let v=new b$2(t,e);this.zone.run(()=>{this.addToQueue(v)})}else for(let v=0;v<r.length;v++)this.zone.run(()=>{this.traverseFileTree(r[v],t+r[v].name)});this.numOfActiveReadEntries--})};p()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){let e=this.fileSelector.nativeElement,t=e.parentElement,n=this.getHelperFormElement(),r=this.getFileInputPlaceholderElement();t!==n&&(this.renderer.insertBefore(t,r,e),this.renderer.appendChild(n,e),n.reset(),this.renderer.insertBefore(t,e,r),this.renderer.removeChild(t,r))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement(`form`)),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement(`div`)),this.fileInputPlaceholderEl}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}static{this.ɵfac=function(t){return new(t||i)(xo$2(U$8),xo$2(fl$2))}}static{this.ɵcmp=yT({type:i,selectors:[[`ngx-file-drop`]],contentQueries:function(t,n,r){if(t&1&&gy(r,A,5,mo$2),t&2){let p;u_$1(p=d_$1())&&(n.contentTemplate=p.first)}},viewQuery:function(t,n){if(t&1&&my(fe$2,7),t&2){let r;u_$1(r=d_$1())&&(n.fileSelector=r.first)}},inputs:{accept:`accept`,directory:`directory`,multiple:`multiple`,dropZoneLabel:`dropZoneLabel`,dropZoneClassName:`dropZoneClassName`,useDragEnter:`useDragEnter`,contentClassName:`contentClassName`,showBrowseBtn:`showBrowseBtn`,browseBtnClassName:`browseBtnClassName`,browseBtnLabel:`browseBtnLabel`,disabled:`disabled`},outputs:{onFileDrop:`onFileDrop`,onFileOver:`onFileOver`,onFileLeave:`onFileLeave`},standalone:!1,decls:7,vars:15,consts:[[`fileSelector`,``],[`defaultContentTemplate`,``],[3,`drop`,`dragover`,`dragenter`,`dragleave`,`className`],[3,`className`],[`type`,`file`,1,`ngx-file-drop__file-input`,3,`change`,`accept`,`multiple`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`class`,`ngx-file-drop__drop-zone-label`,4,`ngIf`],[4,`ngIf`],[1,`ngx-file-drop__drop-zone-label`],[`type`,`button`,3,`click`,`className`,`value`]],template:function(t,n){if(t&1&&(bs$1(0,`div`,2),fy(`drop`,function(p){return n.dropFiles(p)})(`dragover`,function(p){return n.onDragOver(p)})(`dragenter`,function(p){return n.onDragEnter(p)})(`dragleave`,function(p){return n.onDragLeave(p)}),bs$1(1,`div`,3)(2,`input`,4,0),fy(`change`,function(p){return n.uploadFiles(p)}),Mu(),Dm$1(4,De,2,2,`ng-template`,null,1,lM)(6,Ce,0,0,`ng-template`,5),Mu()()),t&2){let r=p_$1(5);Ty(`ngx-file-drop__drop-zone--over`,n.isDraggingOverDropZone),Vm$1(`className`,n.dropZoneClassName),xb(),Vm$1(`className`,n.contentClassName),xb(),Vm$1(`accept`,n.accept)(`multiple`,n.multiple),jm$1(`directory`,n.directory||void 0)(`webkitdirectory`,n.directory||void 0)(`mozdirectory`,n.directory||void 0)(`msdirectory`,n.directory||void 0)(`odirectory`,n.directory||void 0),xb(4),Vm$1(`ngTemplateOutlet`,n.contentTemplate||r)(`ngTemplateOutletContext`,J_$1(13,he$2,n.openFileSelector))}},dependencies:[an,cn],styles:[`.ngx-file-drop__drop-zone[_ngcontent-%COMP%]{height:100px;margin:auto;border:2px dotted #0782d0;border-radius:30px}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:#93939380}.ngx-file-drop__content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100px;color:#0782d0}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}`],changeDetection:1})}}return i})();var _e$1=(()=>
26{class i{static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵmod=gm$1({type:i,bootstrap:[P$2]})}static{this.ɵinj=Ua$2({imports:[En]})}}return i})();var Fe$1=i=>({url:i});function ye$1(i,c){if(i&1){let e=AC();bs$1(0,`div`,4)(1,`div`,5)(2,`label`,6),j_$1(3),Mu(),bs$1(4,`input`,7),fy(`keyup.enter`,function(){_f(e);return Mf(i_$1(3).handleUrlUpload())}),Mu(),Sw(),bs$1(5,`button`,8),fy(`click`,function(){_f(e);return Mf(i_$1(3).handleUrlUpload())}),j_$1(6),Mu()(),bs$1(7,`div`,9)(8,`button`,10),fy(`click`,function(){_f(e);let n=i_$1(3);return Mf(n.setMode(n.showUrlUpload()?n.UploadMode.All:n.UploadMode.Files))}),Hm$1(9,`i`,11),bs$1(10,`span`,12),j_$1(11),Mu()()()(),bs$1(12,`div`,13),Hm$1(13,`app-validation-errors`,14),Mu()}if(i&2){let e=i_$1(2).$implicit,t=i_$1().urlControl;xb(3),Ly(e(`url-label`)),xb(),Vm$1(`formControl`,t)(`appFormField`,t),Aw(),xb(),Vm$1(`disabled`,t.invalid),xb(),Ou(` `,e(`load`),` `),xb(5),Ly(e(`back`)),xb(2),Vm$1(`control`,t)}}function Ee(i,c){if(i&1){let e=AC();bs$1(0,`a`,20),fy(`click`,function(){_f(e);let n=i_$1(4);return Mf(n.setMode(n.UploadMode.Url))}),bs$1(1,`span`,21),j_$1(2),Mu()(),Hm$1(3,`span`,19)}if(i&2){let e=i_$1(3).$implicit,t=i_$1();xb(2),Ly(e(`enter-an-url-pre-title`,J_$1(1,Fe$1,t.urlText()??e(`url`))))}}function Te$1(i,c){i&1&&j_$1(0),i&2&&Ou(` `,c,` `)}function we$1(i,c){if(i&1){let e=AC();bs$1(0,`div`,3)(1,`div`,15)(2,`div`,16),Hm$1(3,`i`,17),Mu(),bs$1(4,`div`,18),DC(5,Ee,4,3),bs$1(6,`span`),j_$1(7),Mu(),Hm$1(8,`span`,19),bs$1(9,`a`,20),fy(`click`,function(){_f(e);let n=i_$1().openFileSelector;return Mf(n())}),j_$1(10),bs$1(11,`span`,21),DC(12,Te$1,1,1),Mu()()()()()}if(i&2){let e,t=i_$1(2).$implicit,n=i_$1();xb(5),bC(n.showUrlUpload()?5:-1),xb(2),Ly(t(`drag-n-drop`)),xb(3),Ou(` `,t(`upload`),` `),xb(2),bC((e=n.uploadText())?12:-1,e)}}function Se$1(i,c){if(i&1&&DC(0,ye$1,14,7)(1,we$1,13,4,`div`,3),i&2){let t=i_$1(2);bC(t.uploadMode()===t.UploadMode.Url?0:1)}}function Ne$1(i,c){if(i&1){let e=AC();xu(0),bs$1(1,`ngx-file-drop`,1),fy(`onFileDrop`,function(n){_f(e);return Mf(i_$1().dropped.emit(n))}),Dm$1(2,Se$1,2,1,`ng-template`,2),Mu(),Gs$1()}if(i&2){let e=i_$1();xb(),Vm$1(`accept`,e.acceptableExtensions())(`directory`,e.directory())}}var F$1=(function(i){return i[i.All=0]=`All`,i[i.Files=1]=`Files`,i[i.Url=2]=`Url`,i})(F$1||{});var Je=(()=>{class i{constructor(){this.acceptableExtensions=TB.required(),this.directory=TB(!1),this.showUrlUpload=TB(!1),this.uploadText=TB(),this.urlText=TB(),this.dropped=wB(),this.urlSubmitted=wB(),this.uploadMode=be$3(F$1.Files),this.urlControl=new Z$2(``,{nonNullable:!0,validators:[Ce$3.required]}),this.UploadMode=F$1}setMode(e){this.uploadMode.set(e)}handleUrlUpload(){let e=this.urlControl.value.trim();e&&(this.urlSubmitted.emit(e),this.urlControl.reset(),this.setMode(this.showUrlUpload()?F$1.All:F$1.Files))}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=yT({type:i,selectors:[[`app-file-drag-and-drop-upload`]],inputs:{acceptableExtensions:[1,`acceptableExtensions`],directory:[1,`directory`],showUrlUpload:[1,`showUrlUpload`],uploadText:[1,`uploadText`],urlText:[1,`urlText`]},outputs:{dropped:`dropped`,urlSubmitted:`urlSubmitted`},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[`dropZoneClassName`,`file-upload`,`contentClassName`,`file-upload-zone`,3,`onFileDrop`,`accept`,`directory`],[`ngx-file-drop-content-tmp`,``],[1,`row`,`g-0`,`mt-3`,`pb-3`],[1,`row`,`g-0`,`mt-3`,`pb-3`,`px-3`,`w-100`,`align-items-center`],[1,`input-group`,`col`],[`for`,`load-url`,1,`input-group-text`],[`type`,`text`,`autofocus`,``,`autocomplete`,`off`,`placeholder`,`https://`,`id`,`load-url`,`aria-describedby`,`load-url-validations`,1,`form-control`,3,`keyup.enter`,`formControl`,`appFormField`],[`type`,`button`,1,`btn`,`btn-outline-secondary`,3,`click`,`disabled`],[1,`col-auto`,`ms-2`],[1,`btn`,`btn-secondary`,3,`click`],[`aria-hidden`,`true`,1,`fas`,`fa-share`,2,`transform`,`rotateY(180deg)`],[1,`phone-hidden`,`ms-1`],[1,`px-3`],[`inputId`,`load-url`,3,`control`],[1,`mx-auto`,`text-center`],[1,`mb-3`],[`aria-hidden`,`true`,1,`fa`,`fa-file-upload`,2,`font-size`,`1.5rem`],[1,`d-flex`,`justify-content-center`,`align-items-center`,`gap-1`],[1,`text-muted`,`dot-separator`],[`href`,`javascript:void(0)`,3,`click`],[1,`phone-hidden`]],template:function(t,n){t&1&&Dm$1(0,Ne$1,3,2,`ng-container`,0),t&2&&Vm$1(`translocoPrefix`,`file-drag-and-drop-upload`)},dependencies:[_e$1,P$2,A,Ct$3,li$1,Qe$5,ei$1,An$1,w$6,G$7],styles:[`ngx-file-drop[_ngcontent-%COMP%]    >div{width:100%;border:.125rem solid var(--%NS%primary-color);border-radius:.3125rem;height:6.25rem;margin:auto}ngx-file-drop[_ngcontent-%COMP%]    >div>div{width:100%;display:inline-block}
27/*# sourceMappingURL=file-drag-and-drop-upload.component-IARILV2M.css.map */`]})}}return i})();var O$2=(()=>{class s{constructor(){this.httpClient=E$2(ue$6),this.accountService=E$2(yc$1),this.utilityService=E$2(w$5),this.messageHub=E$2(Ao$2),this.router=E$2(J$7),this.baseUrl=i$1.apiUrl,this.save=E$2(Ee$4),this._annotations=be$3([]),this.annotations=this._annotations.asReadonly(),this._events=be$3(null),this.events=this._events.asReadonly(),this.slots=it$3(()=>this.accountService.currentUser()?.preferences?.bookReaderHighlightSlots??[])}updateSlotColor(t,e){let n=this.accountService.currentUser();if(!n)return la$2([]);let i=n.preferences;return i.bookReaderHighlightSlots[t].color=e,this.accountService.updatePreferences(i).pipe(qe$2(r=>r.bookReaderHighlightSlots))}getAllAnnotations(t){return this.httpClient.get(this.baseUrl+`annotation/all?chapterId=`+t).pipe(qe$2(e=>(this._annotations.set(e),e)))}getAllAnnotationsFiltered(t,e,n){let i=this.utilityService.addPaginationIfExists(new A$2,e,n);return this.httpClient.post(this.baseUrl+`annotation/all-filtered`,t,{observe:`response`,params:i}).pipe(qe$2(r=>this.utilityService.createPaginatedResult(r)))}getAnnotationsForSeries(t){return this.httpClient.get(this.baseUrl+`annotation/all-for-series?seriesId=`+t)}createAnnotation(t){return this.httpClient.post(this.baseUrl+`annotation/create`,t).pipe(xd$
271(e=>{this._events.set({pageNumber:e.pageNumber,type:`create`,annotation:e})}),Sd$1(e=>this.getAllAnnotations(e.chapterId)))}updateAnnotation(t){return this.httpClient.post(this.baseUrl+`annotation/update`,t).pipe(Sd$1(e=>this.getAllAnnotations(t.chapterId)),xd$1(e=>{this._events.set({pageNumber:t.pageNumber,type:`edit`,annotation:t})}))}getAnnotation(t){return this.httpClient.get(this.baseUrl+`annotation/${t}`)}deleteAnnotation(t){let e=t.id;return this.httpClient.delete(this.baseUrl+`annotation?annotationId=${e}`,e$1).pipe(xd$1(n=>{let i=this._annotations();this._annotations.set(i.filter(r=>r.id!==e)),this._events.set({pageNumber:t.pageNumber,type:`delete`,annotation:t})}))}delete(t){let e=this.annotations().filter(i=>i.id===t);if(e.length===0)return la$2();let n=e[0];return this.deleteAnnotation(n)}bulkDelete(t){return this.httpClient.post(this.baseUrl+`annotation/bulk-delete`,t).pipe(xd$1(()=>{this._annotations.update(e=>e.filter(n=>!t.includes(n.id)))}))}navigateToAnnotation(t){this.router.navigate([`/library`,t.libraryId,`series`,t.seriesId,`book`,t.chapterId],{queryParams:{annotation:t.id}})}
27exportFilter(t,e,n){let i=this.utilityService.addPaginationIfExists(new A$2,e,n);return this.httpClient.post(this.baseUrl+`annotation/export-filter`,t,{observe:`events`,responseType:`blob`,reportProgress:!0,params:i}).pipe(DI(100,Te$5,{leading:!0,trailing:!0}),J$8((r,R)=>{this.save(r,decodeURIComponent(R))}))}exportAnnotations(t){return this.httpClient.post(this.baseUrl+`annotation/export`,t,{observe:`events`,responseType:`blob`,reportProgress:!0}).pipe(DI(100,Te$5,{leading:!0,trailing:!0}),J$8((e,n)=>{this.save(e,decodeURIComponent(n))}))}likeAnnotations(t){return this.accountService.currentUser()?.id?this.httpClient.post(this.baseUrl+`annotation/like`,t):la$2()}unLikeAnnotations(t){return this.accountService.currentUser()?.id?this.httpClient.post(this.baseUrl+`annotation/unlike`,t):la$2()}static{this.ɵfac=function(e){return new(e||s)}}static{this.ɵprov=J$6({token:s,factory:s.ɵfac,providedIn:`root`})}}return s})();var u$1=(()=>{class t{constructor(){this.dom=E$2(te$7)}transform(r){return r==null?null:this.dom.sanitize(j$3.URL,r)}static{this.ɵfac=function(m){return new(m||t)}}static{this.ɵpipe=bT({name:`safeUrl`,type:t,pure:!0})}}return t})();var ye=[[`requestFullscreen`,`exitFullscreen`,`fullscreenElement`,`fullscreenEnabled`,`fullscreenchange`,`fullscreenerror`],[`webkitRequestFullscreen`,`webkitExitFullscreen`,`webkitFullscreenElement`,`webkitFullscreenEnabled`,`webkitfullscreenchange`,`webkitfullscreenerror`],[`webkitRequestFullScreen`,`webkitCancelFullScreen`,`webkitCurrentFullScreenElement`,`webkitCancelFullScreen`,`webkitfullscreenchange`,`webkitfullscreenerror`],[`mozRequestFullScreen`,`mozCancelFullScreen`,`mozFullScreenElement`,`mozFullScreenEnabled`,`mozfullscreenchange`,`mozfullscreenerror`],[`msRequestFullscreen`,`msExitFullscreen`,`msFullscreenElement`,`msFullscreenEnabled`,`MSFullscreenChange`,`MSFullscreenError`]];var b$1=(()=>{if(typeof document>`u`)return!1;let o=ye[0],a={};for(let e of ye)if(e?.[1]in document){for(let[r,n]of e.entries())a[o[r]]=n;return a}return!1})();var Ie={change:b$1.fullscreenchange,error:b$1.fullscreenerror};var h$1={request(o=document.documentElement,a){return new Promise((e,t)=>{let r=()=>{h$1.off(`change`,r),e()};h$1.on(`change`,r);let n=o[b$1.requestFullscreen](a);n instanceof Promise&&n.then(r).catch(t)})},exit(){return new Promise((o,a)=>{if(!h$1.isFullscreen){o();return}let e=()=>{h$1.off(`change`,e),o()};h$1.on(`change`,e);let t=document[b$1.exitFullscreen]();t instanceof Promise&&t.then(e).catch(a)})},toggle(o,a){return h$1.isFullscreen?h$1.exit():h$1.request(o,a)},onchange(o){h$1.on(`change`,o)},onerror(o){h$1.on(`error`,o)},on(o,a){let e=Ie[o];e&&document.addEventListener(e,a,!1)},off(o,a){let e=Ie[o];e&&document.removeEventListener(e,a,!1)},raw:b$1};Object.defineProperties(h$1,{isFullscreen:{get:()=>!!document[b$1.fullscreenElement]},element:{enumerable:!0,get:()=>document[b$1.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[b$1.fullscreenEnabled]}});b$1||(h$1={isEnabled:!1});var v=h$1;var Pe=C$5(Z$3());var Fe=(o,a)=>a.keyBindTarget??a.key??o;function Me(o,a){if(o&1&&j_$1(0),o&2){let e=i_$1(3).$implicit,t=i_$1().$implicit;Ou(` `,t(e.description),` `)}}function Re(o,a){if(o&1&&(By(0),rM(1,`keybindSettingDescription`),bs$1(2,`span`),j_$1(3),Mu()),o&2){let e=i_$1(3).$implicit,t=iM(1,1,e.keyBindTarget);xb(3),Ou(` `,t.tooltip,` `)}}function Be(o,a){if(o&1&&(bs$1(0,`div`,8)(1,`span`)(2,`code`),j_$1(3),rM(4,`keyBind`),Mu(),DC(5,Me,1,1)(6,Re,4,3,`span`),Mu()()),o&2){let e=a.$implicit,t=i_$1(2).$implicit;xb(3),Ly(iM(4,2,e)),xb(2),bC(t.description?5:6)}}function Te(o,a){if(o&1&&CC(0,Be,7,4,`div`,8,wC),o&2){let e=i_$1().$implicit;_C(i_$1(2).keyBindService.allKeyBinds()[e.keyBindTarget].slice(0,2))}}function we(o,a){if(o&1&&j_$1(0),o&2){let e=i_$1(2).$implicit,t=i_$1().$implicit;Ou(` `,t(e.description),` `)}}function $e(o,a){if(o&1&&(bs$1(0,`div`,8)(1,`span`)(2,`code`),j_$1(3),Mu(),DC(4,we,1,1),Mu()()),o&2){let e=i_$1().$implicit;xb(3),Ly(e.key),xb(),bC(e.description?4:-1)}}function Ne(o,a){if(o&1&&DC(0,Te,2,0)(1,$e,5,2,`div`,8),o&2){let e=a.$implicit;bC(e.keyBindTarget?0:1)}}function Le(o,a){if(o&1){let e=AC();xu(0),bs$1(1,`div`,1)(2,`h4`,2),j_$1(3),Mu(),bs$1(4,`button`,3),fy(`click`,function(){_f(e);return Mf(i_$1().modal.close())}),Mu()(),bs$1(5,`div`,4)(6,`div`,5),CC(7,Ne,2,1,null,null,Fe),Mu()(),bs$1(9,`div`,6)(10,`button`,7),fy(`click`,function(){_f(e);return Mf(i_$1().modal.close())}),j_$1(11),Mu()(),Gs$1()}if(o&2){let e=a.$implicit,t=i_$1();xb(),Ty(`book-reader`,t.inBookReader()),xb(2),Ly(e(`title`)),xb(),jm$1(`aria-label`,e(`close`)),xb(),Ty(`book-reader`,t.inBookReader()),xb(2),_C(t.shortcuts()),xb(2),Ty(`book-reader`,t.inBookReader()),xb(2),Ly(e(`close`))}}var xe=(()=>{class o{constructor(){this.keyBindService=E$2(W$3),this.modal=E$2(F$6),this.shortcuts=TB([]),this.inBookReader=TB(!1)}static{this.ɵfac=function(t){return new(t||o)}}static{this.ɵcmp=yT({type:o,selectors:[[`app-shortcuts-modal`]],inputs:{shortcuts:[1,`shortcuts`],inBookReader:[1,`inBookReader`]},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[`id`,`modal-basic-title`,1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[1,`modal-body`],[1,`row`,`g-0`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-primary`,3,`click`],[1,`col-md-6`,`mb-2`]],template:function(t,r){t&1&&Dm$1(0,Le,12,9,`ng-container`,0),t&2&&Vm$1(`translocoPrefix`,`shortcuts-modal`)},dependencies:[jt$2,Ct$3,y$6,h$5],styles:[`.book-reader[_ngcontent-%COMP%]{color:var(--%NS%drawer-text-color);background-color:var(--%NS%drawer-bg-color)}
28/*# sourceMappingURL=shortcuts-modal.component-VL44NIB5.css.map */`]})}}return o}
28)();var m=(function(o){return o[o.Cancel=0]=`Cancel`,o[o.Reread=1]=`Reread`,o[o.ReadIncognito=3]=`ReadIncognito`,o[o.Continue=4]=`Continue`,o})(m||{});var ft$1=(()=>{class o{constructor(){this.router=E$2(J$7),this.location=E$2(it$4),this.accountService=E$2(yc$1),this.toastr=E$2(Bt$3),this.httpClient=E$2(ue$6),this.document=E$2(Xr$2),this.modalService=E$2(st$4),this.seriesService=E$2(N$2),this.baseUrl=i$1.apiUrl,this.encodedKey=``,this.noSleep=new Pe.default,this.shortCutModalOpen=be$3(!1),eo$1(()=>{let e=this.accountService.currentUserGenericApiKey();e&&(this.encodedKey=encodeURIComponent(e))})}openShortcutModal(e,t=!1){this.shortCutModalOpen()||(this.shortCutModalOpen.set(!0),this.shortCutModalRef=this.modalService.open(xe,Ht$2()),this.shortCutModalRef.setInput(`shortcuts`,e),this.shortCutModalRef.setInput(`inBookReader`,t),rI(this.shortCutModalRef.closed,this.shortCutModalRef.dismissed).subscribe(()=>this.shortCutModalOpen.set(!1)))}closeShortCutModal(){this.shortCutModalRef&&(this.shortCutModalRef.dismiss(),this.shortCutModalRef=void 0),this.shortCutModalOpen.set(!1)}enableWakeLock(e){e||(e=this.document);let t=()=>D$5(this,null,function*(){e.removeEventListener(`click`,t,!1),e.removeEventListener(`touchmove`,t,!1),e.removeEventListener(`mousemove`,t,!1),yield this.noSleep.enable()});e.addEventListener(`click`,t,!1),e.addEventListener(`touchmove`,t,!1),e.addEventListener(`mousemove`,t,!1)}disableWakeLock(){this.noSleep.disable()}getNavigationArray(e,t,r,n){return n===void 0&&(n=e$2.ARCHIVE),n===e$2.EPUB?[`library`,e,`series`,t,`book`,r]:n===e$2.PDF?[`library`,e,`series`,t,`pdf`,r]:[`library`,e,`series`,t,`manga`,r]}downloadPdf(e){return`${this.baseUrl}reader/pdf?chapterId=${e}&apiKey=${this.encodedKey}`}bookmark(e,t,r,n,i=0,s=null){return this.httpClient.post(this.baseUrl+`reader/bookmark`,{seriesId:e,volumeId:t,chapterId:r,page:n,imageNumber:i,xpath:s})}unbookmark(e,t,r,n,i=0){return this.httpClient.post(this.baseUrl+`reader/unbookmark`,{seriesId:e,volumeId:t,chapterId:r,page:n,imageNumber:i})}getAllBookmarks(e){return this.httpClient.post(this.baseUrl+`reader/all-bookmarks`,e)}getBookmarks(e){return this.httpClient.get(this.baseUrl+`reader/chapter-bookmarks?chapterId=`+e)}getBookmarksForVolume(e){return this.httpClient.get(this.baseUrl+`reader/volume-bookmarks?volumeId=`+e)}getBookmarksForSeries(e){return this.httpClient.get(this.baseUrl+`reader/series-bookmarks?seriesId=`+e)}clearBookmarks(e){return this.httpClient.post(this.baseUrl+`reader/remove-bookmarks`,{seriesId:e},e$1)}clearMultipleBookmarks(e){return this.httpClient.post(this.baseUrl+`reader/bulk-remove-bookmarks`,{seriesIds:e},e$1)}getBookmarkInfo(e){return this.httpClient.get(this.baseUrl+`reader/bookmark-info?seriesId=`+e)}getProgress(e){return this.httpClient.get(this.baseUrl+`reader/get-progress?chapterId=`+e)}getPageUrl(e,t){return`${this.baseUrl}reader/image?chapterId=${e}&apiKey=${this.encodedKey}&page=${t}`}getThumbnailUrl(e,t){return`${this.baseUrl}reader/thumbnail?chapterId=${e}&apiKey=${this.encodedKey}&page=${t}`}getBookmarkPageUrl(e,t,r){return this.baseUrl+`reader/bookmark-image?seriesId=`+e+`&page=`+r+`&apiKey=`+encodeURIComponent(t)}getChapterInfo(e,t=!1){return this.httpClient.get(this.baseUrl+`reader/chapter-info?chapterId=`+e+`&includeDimensions=`+t)}getFileDimensions(e){return this.httpClient.get(this.baseUrl+`reader/file-dimensions?chapterId=`+e)}saveProgress(e,t,r,n,i,s=null){return this.httpClient.post(this.baseUrl+`reader/progress`,{libraryId:e,seriesId:t,volumeId:r,chapterId:n,pageNum:i,bookScrollId:s})}markChapterRead(e,t,r=!1){return this.httpClient.post(this.baseUrl+`reader/mark-chapter-read`,{seriesId:e,chapterId:t,generateReadingSession:r})}markVolumeRead(e,t,r=!1){return this.httpClient.post(this.baseUrl+`reader/mark-volume-read`,{seriesId:e,volumeId:t,generateReadingSession:r})}markMultipleRead(e,t,r,n=!1){return this.httpClient.post(this.baseUrl+`reader/mark-multiple-read`,{seriesId:e,volumeIds:t,chapterIds:r,generateReadingSession:n})}markMultipleUnread(e,t,r){return this.httpClient.post(this.baseUrl+`reader/mark-multiple-unread`,{seriesId:e,volumeIds:t,chapterIds:r})}markMultipleSeriesRead(e,t=!1){return this.httpClient.post(this.baseUrl+`reader/mark-multiple-series-read`,{seriesIds:e,generateReadingSession:t})}markMultipleSeriesUnread(e){return this.httpClient.post(this.baseUrl+`reader/mark-multiple-series-unread`,{seriesIds:e})}markVolumeUnread(e,t){return this.httpClient.post(this.baseUrl+`reader/mark-volume-unread`,{seriesId:e,volumeId:t})}getNextChapter(e,t,r,n=-1){return n>0?this.httpClient.get(this.baseUrl+`readinglist/next-chapter?seriesId=`+e+`&currentChapterId=`+r
28+`&readingListId=`+n):this.httpClient.get(this.baseUrl+`reader/next-chapter?seriesId=`+e+`&volumeId=`+t+`&currentChapterId=`+r)}getPrevChapter(e,t,r,n=-1){return n>0?this.httpClient.get(this.baseUrl+`readinglist/prev-chapter?seriesId=`+e+`&currentChapterId=`+r+`&readingListId=`+n):this.httpClient.get(this.baseUrl+`reader/prev-chapter?seriesId=`+e+`&volumeId=`+t+`&currentChapterId=`+r)}hasSeriesProgress(e){return this.httpClient.get(this.baseUrl+`reader/has-progress?seriesId=`+e)}getCurrentChapter(e){return this.httpClient.get(this.baseUrl+`reader/continue-point?seriesId=`+e)}getTimeLeft(e){return this.httpClient.get(this.baseUrl+`reader/time-left?seriesId=`+e)}getTimeLeftForChapter(e,t){return this.httpClient.get(this.baseUrl+`reader/time-left-for-chapter?seriesId=${e}&chapterId=${t}`)}getFirstProgressDateForUser(e){return this.httpClient.get(this.baseUrl+`reader/first-progress-date?userId=`+e)}setOverrideStyles(e=`black`){let t=document.querySelector(`body`);t!=null&&(this.originalBodyColor=t.style.background,t.setAttribute(`style`,`background-color: `+e+` !important`))}resetOverrideStyles(){let e=document.querySelector(`body`);e!=null&&this.originalBodyColor!==void 0&&(e.style.background=this.originalBodyColor)}imageUrlToPageNum(e){if(e===void 0||e===``)return-1;let t=new URLSearchParams(new URL(e).search);return parseInt(t.get(`page`)||`-1`,10)}imageUrlToChapterId(e){if(e===void 0||e===``)return-1;let t=new URLSearchParams(new URL(e).search);return parseInt(t.get(`chapterId`)||`-1`,10)}getNextChapterUrl(e,t,r=!1,n=!1,i=-1){let s=e.lastIndexOf(`/`),d=e.substring(0,s+1)+t+``;return d+=this.getQueryParams(r,n,i),d}getQueryParamsObject(e=!1,t=!1,r=-1){let n={};return n.incognitoMode=e,t&&(n.readingListId=r),n}getQueryParams(e=!1,t=!1,r=-1){let n=``;return e&&(n+=`?incognitoMode=true`),t&&(n.indexOf(`?`)>0?n+=`&readingListId=`+r:n+=`?readingListId=`+r),n}toggleFullscreen(){let e=v.isFullscreen;return v.isEnabled?(v.toggle(),!e):!1}exitFullscreen(){v.isEnabled&&v.exit()}closeReader(e,t,r,n=!1,i=0){if(n){this.router.navigateByUrl(`lists/`+i);return}if(window.history.length>1){this.location.back();return}this.router.navigateByUrl(`/library/${e}/series/${t}/chapter/${r}`)}removePersonalToc(e,t,r){return this.httpClient.delete(this.baseUrl+`reader/ptoc?chapterId=${e}&pageNum=${t}&title=${encodeURIComponent(r)}`)}getPersonalToC(e){return this.httpClient.get(this.baseUrl+`reader/ptoc?chapterId=`+e)}createPersonalToC(e,t,r,n,i,s,d,l){return this.httpClient.post(this.baseUrl+`reader/create-ptoc`,{libraryId:e,seriesId:t,volumeId:r,chapterId:n,pageNumber:i,title:s,bookScrollId:d,selectedText:l})}getElementFromXPath(e){try{let t=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;return t?.nodeType===Node.ELEMENT_NODE?t:null}catch(t){return console.debug(`Failed to evaluate XPath:`,e,` exception:`,t),null}}descopeBookReaderXpath(e){if(e.startsWith(`id(`))return e;let t=this.document.querySelector(`.book-content`);if(!t?.children[0])return console.warn(`Book content element not found, returning original xpath`),e;let r=this.getXPathTo(t.children[0],!0),n=this.normalizeXPath(e),i=this.normalizeXPath(r);return this.extractContentPath(n,i)}scopeBookReaderXpath(e){if(e.startsWith(`id(`))return e;let t=this.document.querySelector(`.book-content`);if(!t?.children[0])return console.warn(`Book content element not found, returning original xpath`),e;let r=this.getXPathTo(t.children[0],!0),n=this.normalizeXPath(e),i=this.normalizeXPath(r);if(n.includes(i))return e;if(n.startsWith(`//body`))return r+n.substring(6);if(n.startsWith(`/body`))return r+n.substring(5);return r+(n.startsWith(`/`)?n:`/`+n)}extractContentPath(e,t){if(e.startsWith(t)){let l=e.substring(t.length);return`//body`+(l.startsWith(`/`)?l:`/`+l)}let n=e.match(/\/app-book-reader\[\d+\]\/div\[\d+\]\/div\[\d+\]\/div\[\d+\]\/div\[\d+\]\/div\[\d+\]/);if(n){let l=e.indexOf(n[0])+n[0].length,_=e.substring(l);return`//body`+(_.startsWith(`/`)?_:`/`+_)}let i=e.split(`/`).filter(l=>l.length>0),s=t.split(`/`).filter(l=>l.length>0),d=i.findIndex(l=>
28l.startsWith(`app-book-reader`));if(d!==-1){let l=d+6,_=s.findIndex(I=>I.startsWith(`app-book-reader`));if(_!==-1){let I=s.length-_-1;l=d+1+I}if(l<i.length)return`//body/`+i.slice(l).join(`/`)}return this.cleanCommonUIPrefixes(e)}normalizeXPath(e){let t=e.toLowerCase();for(let n of[`//html[1]//body`,`//html[1]//app-root[1]`,`//html//body`,`//html//app-root[1]`])if(t.startsWith(n)){t=`//body`+t.substring(n.length);break}return t}cleanCommonUIPrefixes(e){let t=e;if(t=t.replace(/\/app-root\[\d+\]/g,``),!t.startsWith(`//body`)&&!t.startsWith(`/body`)){let r=t.indexOf(`/body`);r!==-1?t=`//`+t.substring(r+1):t=`//body`+(t.startsWith(`/`)?t:`/`+t)}return t}getXPathTo(e,t=!1){if(!e)return console.error(`getXPathTo: element is null or undefined`),``;let r=this.getXPath(e,t);return r&&!r.startsWith(`//`)&&!r.startsWith(`id(`)&&(r=`//`+r),r}getXPath(e,t=!1){if(!e)return console.error(`getXPath: element is null or undefined`),``;if(!t&&e.id)return`id("${e.id}")`;if(e===document.body)return`body`;if(!e.parentNode)return e.tagName.toLowerCase();let r=1,n=Array.from(e.parentNode?.children??[]),i=e.tagName;for(let l of n){if(l===e)break;l.tagName===i&&r++}let s=`${e.tagName.toLowerCase()}[${r}]`,d=this.getXPath(e.parentElement,t);return d?`${d}/${s}`:s}shouldPromptForSeriesReread(e,t){return this.httpClient.get(this.baseUrl+`reader/prompt-reread/series?seriesId=${e}&libraryId=${t}`)}shouldPromptForVolumeReread(e,t,r){return this.httpClient.get(this.baseUrl+`reader/prompt-reread/volume?libraryId=${e}&seriesId=${t}&volumeId=${r}`)}shouldPromptForChapterReread(e,t,r){return this.httpClient.get(this.baseUrl+`reader/prompt-reread/chapter?libraryId=${e}&seriesId=${t}&chapterId=${r}`)}readSeries(e,t=!1){let r=this.seriesService.markUnread(e.id);this.shouldPromptForSeriesReread(e.id,e.libraryId).pipe(Sd$1(n=>this.handlePrompt(n,t)),xd$1(n=>this.handlePromptResult(n,r))).subscribe()}readVolume(e,t,r,n=!1){let i=this.markVolumeUnread(t,r.id);this.shouldPromptForVolumeReread(e,t,r.id).pipe(Sd$1(s=>this.handlePrompt(s,n)),xd$1(s=>this.handlePromptResult(s,i))).subscribe()}readChapter(e,t,r,n=!1){if(r.pages===0){this.toastr.error(Mt$4(`series-detail.no-pages`));return}this.shouldPromptForChapterReread(e,t,r.id).pipe(Sd$1(i=>this.handlePrompt(i,n)),xd$1(i=>this.handlePromptResult(i))).subscribe()}handlePromptResult({prompt:e,result:t},r){if(t==m.Cancel)return;if(t===m.Continue||t===m.ReadIncognito){let s=e.chapterOnContinue,d=t===m.ReadIncognito;this.router.navigate(this.getNavigationArray(s.libraryId,s.seriesId,s.chapterId,s.format),{queryParams:{incognitoMode:d}}).catch(l=>console.error(l));return}let n=e.chapterOnReread;(e.fullReread&&r?r:this.saveProgress(n.libraryId,n.seriesId,n.volumeId,n.chapterId,0)).subscribe(()=>this.router.navigate(this.getNavigationArray(n.libraryId,n.seriesId,n.chapterId,n.format)).catch(s=>console.error(s)))}handlePrompt(e,t){if(t)return la$2({prompt:e,result:m.ReadIncognito});if(!e.shouldPrompt)return la$2({prompt:e,result:m.Continue});let r=this.modalService.open(lt$5,Ht$2());r.setInput(`showFooter`,!1),r.setInput(`title`,Mt$4(`reread-modal.title`)),e.timePrompt?r.setInput(`description`,Mt$4(`reread-modal.description-time-passed`,{days:e.daysSinceLastRead,name:e.chapterOnReread.label})):r.setInput(`description`,Mt$4(`reread-modal.description-full-read`,{name:e.chapterOnReread.label}));let n=[{label:Mt$4(`reread-modal.reread`),value:m.Reread},{label:Mt$4(`reread-modal.continue`),value:m.Continue}];return e.timePrompt||n.push({label:Mt$4(`reread-modal.read-incognito`),value:m.ReadIncognito}),n.push({label:Mt$4(`reread-modal.cancel`),value:m.Cancel}),r.setInput(`inputItems`,n),r.closed.pipe(va$2(r.dismissed),lt$3(1),qe$2(i=>({prompt:e,result:i})),ua$2(()=>la$2({prompt:e,result:m.Cancel})))}static{this.ɵfac=function(t){return new(t||o)}}static{this.ɵprov=J$6({token:o,factory:o.ɵfac,providedIn:`root`})}}return o})();var se$1=e=>({$implicit:e});function de$1(e,l){}function le$1(e,l){if(e&1&&(bs$1(0,`div`,0),Dm$1(1,de$1,0,0,`ng-template`,1),Mu()),e&2){let t=i_$1().$implicit,n=i_$1();Vm$1(`item`,t)(`nav`,n.nav)(`role`,n.paneRole),xb(),Vm$1(`ngTemplateOutlet`,t.contentTpl?.templateRef||null)(`ngTemplateOutletContext`,J_$1(5,se$1,t.active||n.isPanelTransitioning(t)))}}function ce$1(e,l){if(e&1&&DC(0,le$1,2,7,`div`,0),e&2){let t=l.$implicit,n=i_$1();bC(t.isPanelInDom()||n.isPanelTransitioning(t)?0:-1)}}var ve$1=(()=>{class e{constructor(){this._ngbConfig=E$2(Oo$2),this.destroyOnHide=!0,this.orientation=`horizontal`,this.roles=`tablist`,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵprov=Mn({token:e,factory:e.ɵfac})}}return e})();var ie$1=e=>Es$1(e)&&e!==``;var he$1=0;var ue$2=(()=>{class e{constructor(){this.templateRef=E$2(mo$2)}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=DT({type:e,selectors:[[`ng-template`,`ngbNavContent`,``]]})}}return e})();var Qe$1=(()=>{class e{constructor(t){this.role=t,this.nav=E$2(D$1)}static{this.ɵfac=function(n){return new(n||e)(fh(`role`))}}static{this.ɵdir=DT({type:e,selectors:[[``,`ngbNavItem`,``,5,`ng-container`]],hostVars:1,hostBindings:function(n,i){n&2&&jm$1(`role`,i.role?i.role:i.nav.roles?`presentation`:void 0)}})}}return e})();var ne=(()=>{class e{constructor(){this._nav=E$2(D$1),this._nativeElement=E$2(wo$2).nativeElement,this.disabled=!1,this.shown=new ht$3,this.hidden=new ht$3}ngOnInit(){Es$1(this.domId)||(this.domId=`ngb-nav-${he$1++}`)}get active(){return this._nav.activeId===this.id}get id(){return ie$1(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Es$1(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}isNgContainer(){return this._nativeElement.nodeType===Node.COMMENT_NODE}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=DT({type:e,selectors:[[``,`ngbNavItem`,``]],contentQueries:function(n,i,o){if(n&1&&gy(o,ue$2,4),n&2){let a;u_$1(a=d_$1())&&(i.contentTpl=a.first)}},hostAttrs:[1,`nav-item`],inputs:{destroyOnHide:`destroyOnHide`,disabled:`disabled`,domId:`domId`,_id:[0,`ngbNavItem`,`_id`]},outputs:{shown:`shown`,hidden:`hidden`},exportAs:[`ngbNavItem`]})}}return e})();var D$1=(()=>{class e{constructor(t){this.role=t,this._config=E$2(ve$1),this._cd=E$2(OB),this._document=E$2(Xr$2),this._nativeElement=E$2(wo$2).nativeElement,this.destroyRef=E$2(te$5),this._navigatingWithKeyboard=!1,this.activeIdChange=new ht$3,this.animation=this._config.animation,this.destroyOnHide=this._config.destroyOnHide,this.orientation=this._config.orientation,this.roles=this._config.roles,this.keyboard=this._config.keyboard,this.shown=new ht$3,this.hidden=new ht$3,this.navItemChange$=new le$4,this.navChange=new ht$3}click(t){t.disabled||this._updateActiveId(t.id)}onFocusout({relatedTarget:t}){this._nativeElement.contains(t)||(this._navigatingWithKeyboard=!1)}onKeyDown(t){if(this.roles!==`tablist`||!this.keyboard)return;let n=this.links.filter(a=>!a.navItem.disabled),{length:i}=n,o=-1;if(n.forEach((a,oe)=>{a.nativeElement===this._document.activeElement&&(o=oe)}),i){switch(t.key){case`ArrowUp`:case`ArrowLeft`:o=(o-1+i)%i;break;case`ArrowRight`:case`ArrowDown`:o=(o+1)%i;break;case`Home`:o=0;break;case`End`:o=i-1;break}this.keyboard===`changeWithArrows`&&this.select(n[o].navItem.id),n[o].nativeElement.focus(),this._navigatingWithKeyboard=!0,t.preventDefault()}}select(t){this._updateActiveId(t,!1)}ngAfterContentInit(){if(!Es$1(this.activeId)){let t=this.items.first?this.items.first.id:null;ie$1(t)&&(this._updateActiveId(t,!1),this._cd.detectChanges())}this.items.changes.pipe(JB(this.destroyRef)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:t}){t&&!t.firstChange&&this._notifyItemChanged(t.currentValue)}_updateActiveId(t,n=!0){if(this.activeId!==t){let i=!1;n&&this.navChange.emit({activeId:this.activeId,nextId:t,preventDefault:()=>{i=!0}}),i||(this.activeId=t,this.activeIdChange.emit(t),this._notifyItemChanged(t))}}_notifyItemChanged(t){this.navItemChange$.next(this._getItemById(t))}_getItemById(t){return this.items&&this.items.find(n=>n.id===t)||null}static{this.ɵfac=function(n){return new(n||e)(fh(`role`))}}static{this.ɵdir=DT({type:e,selectors:[[``,`ngbNav`,``]],contentQueries:function(n,i,o){if(n&1&&gy(o,ne,4)(o,ae,5),n&2){let a;u_$1(a=d_$1())&&(i.items=a),u_$1(a=d_$1())&&(i.links=a)}},hostAttrs:[1,`nav`],hostVars:4,hostBindings:function(n,i){n&1&&fy(`keydown.arrowLeft`,function(a){return i.onKeyDown(a)})(`keydown.arrowRight`,function(a){return i.onKeyDown(a)})(`keydown.arrowDown`,function(a){return i.onKeyDown(a)})(`keydown.arrowUp`,function(a){return i.onKeyDown(a)})(`keydown.Home`,function(a){return i.onKeyDown(a)})(`keydown.End`,function(a){return i.onKeyDown(a)})(`focusout`,function(a){return i.onFocusout(a)}),n&2&&(jm$1(`aria-orientation`,i.orientation===`vertical`&&i.roles===`tablist`?`vertical`:void 0)(`role`,i.role?i.role:i.roles?`tablist`:void 0),Ty(`flex-column`,i.orientation===`vertical`))},inputs:{activeId:`activeId`,animation:`animation`,destroyOnHide:`destroyOnHide`,orientation:`orientation`,roles:`roles`,keyboard:`keyboard`},outputs:{activeIdChange:`activeIdChange`,shown:`shown`,hidden:`hidden`,navChange:`navChange`},exportAs:[`ngbNav`],features:[CE]})}}return e})();var ae=(()=>{class e{constructor(t){this.role=t,this.navItem=E$2(ne),this.nav=E$2(D$1),this.nativeElement=E$2(wo$2).nativeElement}get tabindex(){return this.nav.keyboard===!1?this.navItem.disabled?-1:void 0:this.nav._navigatingWithKeyboard||this.navItem.disabled||!this.navItem.active?-1:void 0}static{this.ɵfac=function(n){return new(n||e)(fh(`role`))}}static{this.ɵdir=DT({type:e,selectors:[[``,`ngbNavLink`,``]],hostAttrs:[1,`nav-link`],hostVars:12,hostBindings:function(n,i){n&2&&(zm$1(`id`,i.navItem.domId),jm$1(`role`,i.role?i.role:i.nav.roles?`tab`:void 0)(`tabindex`,i.tabindex)(`aria-controls`,i.navItem.isPanelInDom()?i.navItem.panelDomId:null)(`aria-selected`,i.navItem.active)(`aria-disabled`,i.navItem.disabled),Ty(`nav-item`,i.navItem.isNgContainer())(`active`,i.navItem.active)(`disabled`,i.navItem.disabled))}})}}return e})();var Ve=(()=>{class e extends ae{static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=qE(e)))(i||e)}})()}static{this.ɵdir=DT({type:e,selectors:[[`a`,`ngbNavLink`,``]],hostAttrs:[`href`,``],hostBindings:function(n,i){n&1&&fy(`click`,function(a){return i.nav.click(i.navItem),a.preventDefault()})},features:[Im$1]})}}return e})();var fe$1=({classList:e})=>(e.remove(`show`),()=>e.remove(`active`));var ge=(e,l)=>{l&&so$2(e),e.classList.add(`show`)};var te=(()=>{class e{constructor(){this.nativeElement=E$2(wo$2).nativeElement}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=DT({type:e,selectors:[[``,`ngbNavPane`,``]],hostAttrs:[1,`tab-pane`],hostVars:5,hostBindings:function(n,i){n&2&&(zm$1(`id`,i.item.panelDomId),jm$1(`role`,i.role?i.role:i.nav.roles?`tabpanel`:void 0)(`aria-labelledby`,i.item.domId),Ty(`fade`,i.nav.animation))},inputs:{item:`item`,nav:`nav`,role:`role`}})}}return e})();var Ke$1=(()=>{class e{constructor(){this._cd=E$2(OB),this._ngZone=E$2(U$8),this._activePane=null}isPanelTransitioning(t){return this._activePane?.item===t}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(JB(this.nav.destroyRef),Nd$1(this._activePane?.item||null),Dd$1(),Cd$1(1)).subscribe(t=>{let n={animation:this.nav.animation,runningTransition:`stop`};this._cd.detectChanges(),this._activePane?ir$2(this._ngZone,this._activePane.nativeElement,fe$1,n).subscribe(()=>{let i=this._activePane?.item;this._activePane=this._getPaneForItem(t),this._cd.markForCheck(),this._activePane&&(this._activePane.nativeElement.classList.add(`active`),ir$2(this._ngZone,this._activePane.nativeElement,ge,n).subscribe(()=>{t&&(t.shown.emit(),this.nav.shown.emit(t.id))}
28)),i&&(i.hidden.emit(),this.nav.hidden.emit(i.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.nativeElement.classList.add(`show`,`active`)}_getPaneForItem(t){return this._panes&&this._panes.find(n=>n.item===t)||null}_getActivePane(){return this._panes&&this._panes.find(t=>t.item.active)||null}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵcmp=yT({type:e,selectors:[[``,`ngbNavOutlet`,``]],viewQuery:function(n,i){if(n&1&&my(te,5),n&2){let o;u_$1(o=d_$1())&&(i._panes=o)}},hostAttrs:[1,`tab-content`],inputs:{paneRole:`paneRole`,nav:[0,`ngbNavOutlet`,`nav`]},decls:2,vars:0,consts:[[`ngbNavPane`,``,3,`item`,`nav`,`role`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`]],template:function(n,i){n&1&&CC(0,ce$1,1,1,null,null,TC),n&2&&_C(i.nav.items)},dependencies:[te,cn],encapsulation:2})}}return e})();var qe=(()=>{class e{constructor(){this.translocoService=E$2(De$3)}transform(t){return this.translocoService.translate(`tabs.`+t)}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵpipe=bT({name:`tabTitle`,type:e,pure:!0})}}return e})();var me$1=(function(e){return e.Details=`details-tab`,e.Reviews=`reviews-tab`,e.Storyline=`storyline-tab`,e.Books=`books-tab`,e.Volumes=`volumes-tab`,e.Specials=`specials-tab`,e.Related=`related-tab`,e.General=`general-tab`,e.Folder=`folder-tab`,e.CoverImage=`cover-tab`,e.Advanced=`advanced-tab`,e.Tasks=`tasks-tab`,e.Recommendations=`recommendations-tab`,e.Info=`info-tab`,e.Tags=`tags-tab`,e.WebLinks=`weblink-tab`,e.People=`people-tab`,e.Metadata=`metadata-tab`,e.Series=`series-tab`,e.Account=`account-tab`,e.Preferences=`preferences-tab`,e.Theme=`theme-tab`,e.Devices=`devices-tab`,e.Stats=`stats-tab`,e.Scrobbling=`scrobbling-tab`,e.SmartFilters=`smart-filters-tab`,e.Annotations=`annotations-tab`,e.Overview=`overview-tab`,e.Management=`management-tab`,e.Activity=`activity-tab`,e.ExternalMetadataIds=`external-ids-tab`,e.Aliases=`aliases-tab`,e.Chapters=`chapters-tab`,e.Dashboard=`dashboard-tab`,e.SideNav=`sidenav-tab`,e.ExternalSources=`external-sources-tab`,e.ImageReader=`image-reader-tab`,e.BookReader=`book-reader-tab`,e.PdfReader=`pdf-reader-tab`,e.BookmarkImageTab=`bookmark-image-tab`,e.BookmarkTextTab=`bookmark-text-tab`,e.KavitaPlus=`kavita-plus-tab`,e.Current=`current-tab`,e.Uploaded=`uploaded-tab`,e.Other=`other-tab`,e.All=`all-tab`,e.Scrobbles=`scrobbles-tab`,e.Failed=`failed-tab`,e.MyChanges=`my-changes-tab`,e.ScrobbleHolds=`scrobble-holds-tab`,e})(me$1||{});var t=(function(e){return e[e.OnGoing=0]=`OnGoing`,e[e.Hiatus=1]=`Hiatus`,e[e.Completed=2]=`Completed`,e[e.Cancelled=3]=`Cancelled`,e[e.Ended=4]=`Ended`,e})(t||{});var a$1=[t.OnGoing,t.Hiatus,t.Completed,t.Cancelled,t.Ended];var f$1=(()=>{class e{constructor(){this.translocoService=E$2(De$3)}transform(r){switch(r){case t.OnGoing:return this.translocoService.translate(`publication-status-pipe.ongoing`);case t.Hiatus:return this.translocoService.translate(`publication-status-pipe.hiatus`);case t.Completed:return this.translocoService.translate(`publication-status-pipe.completed`);case t.Cancelled:return this.translocoService.translate(`publication-status-pipe.cancelled`);case t.Ended:return this.translocoService.translate(`publication-status-pipe.ended`);default:return``}}static{this.ɵfac=function(o){return new(o||e)}}static{this.ɵpipe=bT({name:`publicationStatus`,type:e,pure:!0})}}return e})();var y=[`*`];function H$1(t,M){if(t&1&&(Hm$1(0,`div`,1),rM(1,`safeHtml`)),t&2)Vm$1(`innerHTML`,iM(1,1,i_$1(2).subtitle()),$h)}function T$1(t,M){if(t&1&&(xu(0),bs$1(1,`div`),c_$1(2),DC(3,H$1,2,3,`div`,1),Mu(),Gs$1()),t&2){let e=i_$1();xb(3),bC(e.subtitle()?3:-1)}}var O$1=(()=>{class t{constructor(){this.subtitle=TB.required()}static{this.ɵfac=function(n){return new(n||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-setting-button`]],inputs:{subtitle:[1,`subtitle`]},ngContentSelectors:y,decls:1,vars:0,consts:[[4,`transloco`],[1,`description`,`text-muted`,`mt-1`,3,`innerHTML`]],template:function(n,B){n&1&&(a_$1(),Dm$1(0,T$1,4,1,`ng-container`,0))},dependencies:[Ct$3,tn$1],styles:[`.description[_ngcontent-%COMP%]{font-size:.9rem}
29/*# sourceMappingURL=setting-button.component-FH7ODKSR.css.map */`]})}}return t})();var f=`0001-01-01T00:00:00`;var g=(()=>{class r{transform(n,t=null,p=!0){let i=navigator.language,o=e=>!!e&&e!==`0001-01-01T00:00:00`&&!isNaN(new Date(e).getTime()),a=e=>{let u=new Date(e);return p?u.toLocaleDateString(i,{month:`short`,year:`numeric`}):u.toLocaleDateString(i,{year:`numeric`})},c=o(n),s=o(t);return c&&s?`${a(n)} \u2013 ${a(t)}`:c?a(n):s?a(t):``}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵpipe=bT({name:`dateYearRange`,type:r,pure:!0})}}return r})();
29function ot(i,s){if(i&1&&(Nu(0,`span`),j_$1(1),Su()),i&2){let e=i_$1().$implicit;N_$1(i_$1().highlightClass),xb(),Ly(e)}}function st(i,s){if(i&1&&(Au(0),j_$1(1),qm$1()),i&2){let e=i_$1().$implicit;xb(),Ly(e)}}function rt(i,s){if(i&1&&DC(0,ot,2,3,`span`,0)(1,st,2,1,`ng-container`),i&2){let e=s.$index;bC(e%2!==0?0:1)}}var at=(i,s,e)=>({result:i,term:s,formatter:e});function lt(i,s){if(i&1&&Hm$1(0,`ngb-highlight`,2),i&2){let e=s.result,t=s.term,n=s.formatter;Vm$1(`result`,n(e))(`term`,t)}}function ct(i,s){}function pt(i,s){if(i&1){let e=AC();bs$1(0,`button`,3),fy(`mouseenter`,function(){let n=_f(e).$index;return Mf(i_$1().markActive(n))})(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1().select(n))}),Dm$1(1,ct,0,0,`ng-template`,4),Mu()}if(i&2){let e=s.$implicit,t=s.$index,n=i_$1(),o=p_$1(1);Ty(`active`,t===n.activeIdx),Vm$1(`id`,n.id+`-`+t),xb(),Vm$1(`ngTemplateOutlet`,n.resultTemplate||o)(`ngTemplateOutletContext`,eM(5,at,e,n.term,n.formatter))}}var Y=(()=>{class i{constructor(){this.highlightClass=`ngb-highlight`,this.accentSensitive=!0}ngOnChanges(e){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let t=ys$1(this.result),n=Array.isArray(this.term)?this.term:[this.term],o=g=>this.accentSensitive?g:Ts$1(g),v=n.map(g=>Ss$1(o(ys$1(g)))).filter(g=>g),F=this.accentSensitive?t:Ts$1(t),M=v.length?F.split(new RegExp(`(${v.join(`|`)})`,`gmi`)):[t];if(this.accentSensitive)this.parts=M;else{let g=0;this.parts=M.map(it=>t.substring(g,g+=it.length))}}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=yT({type:i,selectors:[[`ngb-highlight`]],inputs:{highlightClass:`highlightClass`,result:`result`,term:`term`,accentSensitive:`accentSensitive`},features:[CE],decls:2,vars:0,consts:[[3,`class`]],template:function(t,n){t&1&&CC(0,rt,2,1,null,null,wC),t&2&&_C(n.parts)},styles:[`.ngb-highlight{font-weight:700}
30`],encapsulation:2})}}return i})();var ht=(()=>{class i{constructor(){this.editable=!0,this.focusFirst=!0,this.selectOnExact=!1,this.showHint=!1,this.placement=[`bottom-start`,`bottom-end`,`top-start`,`top-end`],this.popperOptions=e=>e}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵprov=Mn({token:i,factory:i.ɵfac})}}return i})();var ut=(()=>{class i{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=ys$1,this.selectEvent=new ht$3,this.activeChangeEvent=ne
30w ht$3}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(e){this.activeIdx=e,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:this.activeIdx===0?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(e){this.selectEvent.emit(e)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+`-`+this.activeIdx:void 0)}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=yT({type:i,selectors:[[`ngb-typeahead-window`]],hostAttrs:[`role`,`listbox`],hostVars:3,hostBindings:function(t,n){t&1&&fy(`mousedown`,function(v){return v.preventDefault()}),t&2&&(zm$1(`id`,n.id),N_$1(`dropdown-menu show`+(n.popupClass?` `+n.popupClass:``)))},inputs:{id:`id`,focusFirst:`focusFirst`,results:`results`,term:`term`,formatter:`formatter`,resultTemplate:`resultTemplate`,popupClass:`popupClass`},outputs:{selectEvent:`select`,activeChangeEvent:`activeChange`},exportAs:[`ngbTypeaheadWindow`],decls:4,vars:0,consts:[[`rt`,``],[`type`,`button`,`role`,`option`,1,`dropdown-item`,3,`id`,`active`],[3,`result`,`term`],[`type`,`button`,`role`,`option`,1,`dropdown-item`,3,`mouseenter`,`click`,`id`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`]],template:function(t,n){t&1&&(Dm$1(0,lt,1,2,`ng-template`,null,0,lM),CC(2,pt,2,9,`button`,1,wC)),t&2&&(xb(2),_C(n.results))},dependencies:[Y,cn],encapsulation:2,changeDetection:1})}}return i})();var dt=0;var tt=(()=>{class i{constructor(){this._nativeElement=E$2(wo$2).nativeElement,this._config=E$2(ht),this._live=E$2(Ws$1),this._document=E$2(Xr$2),this._ngZone=E$2(U$8),this._changeDetector=E$2(OB),this._injector=E$2(fe$6),this._popupService=new sr$2(ut),this._positioning=ws$1(),this._subscription=null,this._closed$=new le$4,this._inputValueBackup=null,this._inputValueForSelectOnExact=null,this._valueChanges$=ga$2(this._nativeElement,`input`).pipe(qe$2(e=>e.target.value)),this._resubscribeTypeahead$=new Tr$2(null),this._windowRef=null,this.autocomplete=`off`,this.container=this._config.container,this.editable=this._config.editable,this.focusFirst=this._config.focusFirst,this.selectOnExact=this._config.selectOnExact,this.showHint=this._config.showHint,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.selectItem=new ht$3,this.activeDescendant=null,this.popupId=`ngb-typeahead-${dt++}`,this._onTouched=()=>{},this._onChange=e=>{}}ngOnInit(){this._subscribeToUserInput()}ngOnChanges({ngbTypeahead:e}){e&&!e.firstChange&&(this._unsubscribeFromUserInput(),this._subscribeToUserInput())}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}writeValue(e){this._writeInputValue(this._formatItemForInput(e)),this.showHint&&(this._inputValueBackup=e)}setDisabledState(e){this._nativeElement.disabled=e}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead$.next(null),this._closePopup(),this.showHint&&this._inputValueBackup!==null&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return this._windowRef!=null}handleBlur(){this._resubscribeTypeahead$.next(null),this._onTouched()}handleKeyDown(e){if(this.isPopupOpen())switch(e.key){case`ArrowDown`:e.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case`ArrowUp`:e.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case`Enter`:case`Tab`:{let t=this._windowRef.instance.getActive();Es$1(t)&&(e.preventDefault(),e.stopPropagation(),this._selectResult(t)),this._closePopup();break}}}_openPopup(){if(!this.isPopupOpen()){this._inputValueBackup=this._nativeElement.value;let{windowRef:e}=this._popupService.open();this._windowRef=e,this._windowRef.setInput(`id`,this.popupId),this._windowRef.setInput(`popupClass`,this.popupClass),this._windowRef.instance.selectEvent.subscribe(t=>this._selectResultClosePopup(t)),this._windowRef.instance.activeChangeEvent.subscribe(t=>this.activeDescendant=t),this.container===`body`&&(this._windowRef.location.nativeElement.style.zIndex=`1055`,this._document.body.appendChild(this._windowRef.location.nativeElement)),this._changeDetector.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._windowRef&&(this._positioning.createPopper({hostElement:this._nativeElement,targetElement:this._windowRef.location.nativeElement,placement:this.placement,updatePopperOptions:t=>this.popperOptions(Bs$1([0,2])(t))}),this._afterRenderRef=lb({mixedReadWrite:()=>
30{this._positioning.update()}},{injector:this._injector}))}),Ms$1(this._ngZone,this._document,`outside`,()=>this.dismissPopup(),this._closed$,[this._nativeElement,this._windowRef.location.nativeElement])}}_closePopup(){this._popupService.close().subscribe(()=>{this._positioning.destroy(),this._afterRenderRef?.destroy(),this._closed$.next(),this._windowRef=null,this.activeDescendant=null})}_selectResult(e){let t=!1;this.selectItem.emit({item:e,preventDefault:()=>{t=!0}}),this._resubscribeTypeahead$.next(null),t||(this.writeValue(e),this._onChange(e))}_selectResultClosePopup(e){this._selectResult(e),this._closePopup()}_showHint(){if(this.showHint&&this._windowRef?.instance.hasActive()&&this._inputValueBackup!=null){let e=this._inputValueBackup.toLowerCase(),t=this._formatItemForInput(this._windowRef.instance.getActive());e===t.substring(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+t.substring(this._inputValueBackup.length)),this._nativeElement.setSelectionRange.apply(this._nativeElement,[this._inputValueBackup.length,t.length])):this._writeInputValue(t)}}_formatItemForInput(e){return e!=null&&this.inputFormatter?this.inputFormatter(e):ys$1(e)}_writeInputValue(e){this._nativeElement.value=ys$1(e)}_subscribeToUserInput(){let e=this._valueChanges$.pipe(xd$1(t=>{this._inputValueBackup=this.showHint?t:null,this._inputValueForSelectOnExact=this.selectOnExact?t:null,this._onChange(this.editable?t:null)}),this.ngbTypeahead?this.ngbTypeahead:()=>la$2([]));this._subscription=this._resubscribeTypeahead$.pipe(Sd$1(()=>e)).subscribe(t=>{!t||t.length===0?this._closePopup():this.selectOnExact&&t.length===1&&this._formatItemForInput(t[0])===this._inputValueForSelectOnExact?(this._selectResult(t[0]),this._closePopup()):(this._openPopup(),this._windowRef.setInput(`focusFirst`,this.focusFirst),this._windowRef.setInput(`results`,t),this._windowRef.setInput(`term`,this._nativeElement.value),this.resultFormatter&&this._windowRef.setInput(`formatter`,this.resultFormatter),this.resultTemplate&&this._windowRef.setInput(`resultTemplate`,this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint());let n=t?t.length:0;this._live.say(n===0?`No results available`:`${n} result${n===1?``:`s`} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵdir=DT({type:i,selectors:[[`input`,`ngbTypeahead`,``]],hostAttrs:[`autocapitalize`,`off`,`autocorrect`,`off`,`role`,`combobox`],hostVars:7,hostBindings:function(t,n){t&1&&fy(`blur`,function(){return n.handleBlur()})(`keydown`,function(v){return n.handleKeyDown(v)}),t&2&&(zm$1(`autocomplete`,n.autocomplete),jm$1(`aria-autocomplete`,n.showHint?`both`:`list`)(`aria-activedescendant`,n.activeDescendant)(`aria-controls`,n.isPopupOpen()?n.popupId:null)(`aria-expanded`,n.isPopupOpen()),Ty(`open`,n.isPopupOpen()))},inputs:{autocomplete:`autocomplete`,container:`container`,editable:`editable`,focusFirst:`focusFirst`,inputFormatter:`inputFormatter`,ngbTypeahead:`ngbTypeahead`,resultFormatter:`resultFormatter`,resultTemplate:`resultTemplate`,selectOnExact:`selectOnExact`,showHint:`showHint`,placement:`placement`,popperOptions:`popperOptions`,popupClass:`popupClass`},outputs:{selectItem:`selectItem`},exportAs:[`ngbTypeahead`],features:[Y_$1([{provide:D$6,useExisting:Ii(()=>i),multi:!0}]),CE]})}}return i})();var mt=[`instance`];var _t=i=>({disabled:i});function ft(i,s){if(i&1&&Hm$1(0,`ngb-highlight`,23),i&2){let e=s.result,t=s.term;Vm$1(`result`,e)(`term`,t)}}function gt(i,s){if(i&1&&j_$1(0),i&2){let e=i_$1().$implicit;Ou(` `,e,` `)}}function vt(i,s){if(i&1){let e=AC();bs$1(0,`a`,26),fy(`click`,function(){_f(e);let n=i_$1().$index;return Mf(i_$1(3).navigateTo(n))}),j_$1(1),Mu()}if(i&2){let e=i_$1().$implicit;xb(),Ly(e)}}function bt$2(i,s){if(i&1&&(bs$1(0,`li`),DC(1,gt,1,1)(2,vt,2,1,`a`,25),Mu()),i&2){let e=s.$implicit,t=s.$index,n=s.$count;N_$1(q_$1(`breadcrumb-item `,e===i_$1(3).routeStackPeek()?`active`:``)),xb(),bC(t===n-1?1:2)}}
30function Ct(i,s){if(i&1&&(bs$1(0,`ol`,12),CC(1,bt$2,3,4,`li`,24,TC),Mu()),i&2){let e=i_$1(2);xb(),_C(e.routeItems())}}function wt(i,s){if(i&1&&(bs$1(0,`div`,12),j_$1(1),Mu()),i&2){let e=i_$1().$implicit;xb(),Ou(``,e(`instructions`),` `)}}function xt$1(i,s){if(i&1){let e=AC();bs$1(0,`tr`,27),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(2).selectNode(n))}),bs$1(1,`td`),Hm$1(2,`i`,28),Mu(),bs$1(3,`td`,29),j_$1(4),Mu()()}if(i&2){let e=s.$implicit,t=s.$index;Vm$1(`ngClass`,J_$1(4,_t,e.disabled)),xb(3),Vm$1(`id`,q_$1(`folder--`,t)),xb(),Ou(` `,e.name,` `)}}function yt(i,s){if(i&1&&(bs$1(0,`a`,20),j_$1(1),Mu()),i&2){let e=i_$1().$implicit;Vm$1(`href`,U_$1(i_$1().helpUrl()),qh),xb(),Ly(e(`help`))}}function kt(i,s){if(i&1){let e=AC();xu(0),bs$1(1,`div`,3)(2,`h4`,4),j_$1(3),Mu(),bs$1(4,`button`,5),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Mu()(),bs$1(5,`div`,6)(6,`div`,7)(7,`label`,8),j_$1(8),Mu(),bs$1(9,`div`,9)(10,`input`,10,0),fy(`focus`,function(n){_f(e);return Mf(i_$1().focus$.next(n.target.value))})(`click`,function(n){_f(e);return Mf(i_$1().click$.next(n.target.value))}),Mu(),Sw(),Mu(),Dm$1(12,ft,1,2,`ng-template`,null,1,lM),Mu(),bs$1(14,`nav`,11),DC(15,Ct,3,0,`ol`,12)(16,wt,2,1,`div`,12),Mu(),bs$1(17,`table`,13)(18,`thead`)(19,`tr`)(20,`th`,14),j_$1(21),Mu(),bs$1(22,`th`,15),j_$1(23),Mu()()(),bs$1(24,`tbody`)(25,`tr`,16),fy(`click`,function(){_f(e);return Mf(i_$1().goBack())}),bs$1(26,`td`),Hm$1(27,`i`,17),Mu(),bs$1(28,`td`),j_$1(29,`...`),Mu()(),CC(30,xt$1,5,6,`tr`,18,TC),Mu()()(),bs$1(32,`div`,19),DC(33,yt,2,3,`a`,20),bs$1(34,`button`,21),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),j_$1(35),Mu(),bs$1(36,`button`,22),fy(`click`,function(){_f(e);return Mf(i_$1().share())}),j_$1(37),Mu()(),Gs$1()}if(i&2){let e=s.$implicit,t=p_$1(13),n=i_$1();xb(3),Ly(e(`title`)),xb(),jm$1(`aria-label`,e(`close`));let o=n.pathControl;xb(4),Ly(e(`path-label`)),xb(2),Vm$1(`formControl`,o)(`ngbTypeahead`,n.search)(`placeholder`,e(`path-placeholder`))(`resultTemplate`,t)(`appFormField`,o),Aw(),xb(5),bC(n.routeStackPeek()!==void 0?15:16),xb(6),Ly(e(`type-header`)),xb(2),Ly(e(`name-header`)),xb(7),_C(n.folders()),xb(3),bC(n.helpUrl().length>0?33:-1),xb(2),Ly(e(`cancel`)),xb(2),Ly(e(`share`))}}var ii=(()=>{class i{constructor(){this.modal=E$2(F$6),this.libraryService=E$2(S$5),this.destroyRef=E$2(te$5),this.startingFolder=TB(``),this.helpUrl=TB(e$3.Library),this.instance=_B(`instance`),this.currentRoot=be$3(``),this.folders=be$3([]),this.searching=be$3(!1),this.searchFailed=be$3(!1),this.routeItems=be$3([]),this.routeStackPeek=it$3(()=>{let e=this.routeItems();return e.length>0?e[e.length-1]:void 0}),this.routeStack=new t$5,this.pathControl=new Z$2(``,{nonNullable:!0}),this.focus$=new le$4,this.click$=new le$4,this.search=e=>{let t=e.pipe(Ed$1(200),Dd$1()),n=this.click$.pipe(We$5(()=>!this.instance().isPopupOpen())),o=this.focus$;return rI(t,o,n,e).pipe(Ed$1(300),Dd$1(),xd$1(()=>this.searching.set(!0)),Sd$1(v=>this.libraryService.listDirectories(this.pathControl.value).pipe(xd$1(()=>this.searchFailed.set(!1)),xd$1(F=>this.folders.set(F)),qe$2(F=>F.map(M=>M.fullPath)),ua$2(()=>(this.searchFailed.set(!0),la$2([]))))),xd$1(()=>this.searching.set(!1)))}}ngOnInit(){if(this.pathControl.valueChanges.pipe(JB(this.destroyRef)).subscribe(()=>this.updateTable()),this.startingFolder()&&this.startingFolder().length>0){let e=this.startingFolder().split(`/`),t=this.startingFolder().split(`\\`);e.length===1&&t.length>1&&(e=t),e[0].endsWith(`/`)||(e[0]=e[0]+`/`),e.forEach(o=>this.routeStack.push(o)),this.syncRouteItems();let n=this.routeStack.items.join(`/`);this.loadChildren(n)}else this.loadChildren(this.currentRoot())}updateTable(){this.loadChildren(this.pathControl.value)}selectNode(e){e.disabled||(this.currentRoot.set(e.name),this.routeStack.push(e.name),this.syncRouteItems(),this.pathControl.setValue(e.fullPath,{emitEvent:!1}),this.loadChildren(this.pathControl.value))}goBack(){this.routeStack.pop(),this.syncRouteItems();let e=this.routeStack.peek();if(e!==void 0){this.currentRoot.set(e);let t=this.routeStack.items.join(`/`);this.loadChildren(t)}else this.currentRoot.set(``),this.loadChildren(this.currentRoot())}loadChildren(e){this.libraryService.listDirectories(e).subscribe({next:t=>{this.folders.set(t)},error:t=>{this.routeStack.pop(),this.syncRouteItems(),this.folders.update(n=>n.map(o=>o.fullPath===e?x$3(w$4({},o),{disabled:!0}):o))}})}share(){this.modal.close({success:!0,folderPath:this.pathControl.value})}close(){this.modal.close({success:!1,folderPath:void 0})}navigateTo(e){for(;this.routeStack.items.length-1>e;)this.routeStack.pop();this.syncRouteItems();let t=this.routeStack.items.join(`/`);this.pathControl.setValue(t,{emitEvent:!1}),this.loadChildren(t)}syncRouteItems(){this.routeItems.set([...this.routeStack.items])}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=yT({type:i,selectors:[[`app-directory-picker-modal`]],viewQuery:function(t,n){t&1&&vy(n.instance,mt,5),t&2&&f_$1()},inputs:{startingFolder:[1,`startingFolder`],helpUrl:[1,`helpUrl`]},decls:1,vars:1,consts:[[`instance`,`ngbTypeahead`],[`rt`,``],[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[`id`,`modal-basic-title`,1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[1,`modal-body`],[1,`mb-3`],[`for`,`typeahead-focus`,1,`form-label`],[1,`input-group`],[`id`,`typeahead-focus`,`type`,`text`,1,`form-control`,2,`width`,`100%`,3,`focus`,`click`,`formControl`,`ngbTypeahead`,`placeholder`,`resultTemplate`,`appFormField`],[`aria-label`,`directory breadcrumb`],[1,`breadcrumb`],[1,`table`,`table-striped`,`scrollable`],[`scope`,`col`,2,`width`,`2.5rem`],[`scope`,`col`],[3,`click`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-arrow-tur
30n-up`],[1,`clickable`,3,`ngClass`],[1,`modal-footer`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`btn`,`btn-icon`,3,`href`],[`type`,`button`,1,`btn`,`btn-secondary`,3,`click`],[`type`,`button`,1,`btn`,`btn-primary`,3,`click`],[3,`result`,`term`],[3,`class`],[`href`,`javascript:void(0);`],[`href`,`javascript:void(0);`,3,`click`],[1,`clickable`,3,`click`,`ngClass`],[`aria-hidden`,`true`,1,`fa-regular`,`fa-folder`],[3,`id`]],template:function(t,n){t&1&&Dm$1(0,kt,38,14,`ng-container`,2),t&2&&Vm$1(`translocoPrefix`,`directory-picker`)},dependencies:[li$1,Qe$5,ei$1,An$1,tt,Y,sn,Ct$3,w$6],styles:[`.breadcrumb-item[_ngcontent-%COMP%] + .breadcrumb-item[_ngcontent-%COMP%]:before{content:">"}.scrollable[_ngcontent-%COMP%]{overflow-y:auto;max-height:25rem}.btn-outline-secondary[_ngcontent-%COMP%]{border:1px solid #ced4da}.disabled[_ngcontent-%COMP%]{color:#d3d3d3!important;cursor:not-allowed!important;background-color:var(--%NS%error-color)}
31/*# sourceMappingURL=directory-picker-modal.component-WZRXL4T7.css.map */`]})}}return i})();var P$1=[[[``,`icon`,``]]];var h=[`[icon]`];function b(t,d){if(t&1&&(bs$1(0,`div`,4),j_$1(1),Mu()),t&2){let n=i_$1().$implicit,e=i_$1();xb(),Ly(n(e.descriptionKey(),e.descriptionParams()))}}function M(t,d){if(t&1&&(bs$1(0,`div`,1)(1,`div`,2),c_$1(2),Mu(),bs$1(3,`div`,3),j_$1(4),Mu(),DC(5,b,2,1,`div`,4),Mu()),t&2){let n=d.$implicit,e=i_$1();xb(),Ty(`is-error`,e.isError()),xb(3),Ly(n(e.titleKey())),xb(),bC(e.descriptionKey()?5:-1)}}var O=(()=>{class t{constructor(){this.isError=TB(!1),this.titleKey=TB.required(),this.descriptionKey=TB(``),this.i18nPrefix=TB(``),this.descriptionParams=TB({})}static{this.ɵfac=function(e){return new(e||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-empty-state`]],inputs:{isError:[1,`isError`],titleKey:[1,`titleKey`],descriptionKey:[1,`descriptionKey`],i18nPrefix:[1,`i18nPrefix`],descriptionParams:[1,`descriptionParams`]},ngContentSelectors:h,decls:1,vars:1,consts:[[`class`,`empty-state-container d-flex flex-column align-items-center text-center py-5 px-4 gap-1`,4,`transloco`,`translocoPrefix`],[1,`empty-state-container`,`d-flex`,`flex-column`,`align-items-center`,`text-center`,`py-5`,`px-4`,`gap-1`],[1,`empty-state-icon`,`d-flex`,`align-items-center`,`justify-content-center`,`rounded-circle`,`mb-2`],[1,`empty-state-title`,`fw-medium`],[1,`empty-state-desc`]],template:function(e,C){e&1&&(a_$1(P$1),Dm$1(0,M,6,4,`div`,0)),e&2&&Vm$1(`translocoPrefix`,C.i18nPrefix())},dependencies:[Ct$3],styles:[`.empty-state-container[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--%NS%text-muted-color);line-height:1.6}.empty-state-icon[_ngcontent-%COMP%]{width:3.5rem;height:3.5rem;background:#ffffff0a;border:1px solid var(--%NS%hr-color);font-size:1.125rem;opacity:.6}.empty-state-icon.is-error[_ngcontent-%COMP%]{background:#bd362f1a;border-color:#bd362f59;color:var(--%NS%match-confidence-chip-doubt-color);opacity:1}.empty-state-title[_ngcontent-%COMP%]{font-size:.875rem;color:var(--%NS%body-text-color)}.empty-state-desc[_ngcontent-%COMP%]{color:var(--%NS%text-muted-color)}
32/*# sourceMappingURL=empty-state.component-ON75NQ3M.css.map */`]})}}return t})();var p$2=(()=>{class t{constructor(){this._ngbConfig=E$2(Oo$2),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}static{this.ɵfac=function(n){return new(n||t)}}static{this.ɵprov=Mn({token:t,factory:t.ɵfac})}}return t})();var T=(()=>{class t{constructor(){this._config=E$2(p$2),this._element=E$2(wo$2),this._zone=E$2(U$8),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new ht$3,this.horizontal=this._config.horizontal,this.shown=new ht$3,this.hidden=new ht$3}set collapsed(i){this._isCollapsed!==i&&(this._isCollapsed=i,this._afterInit&&this._runTransitionWithEvents(i,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(i=this._isCollapsed){this.collapsed=!i,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(i,n){return ir$2(this._zone,this._element.nativeElement,Ds$1,{animation:n,runningTransition:`stop`,context:{direction:i?`hide`:`show`,dimension:this.horizontal?`width`:`height`}})}_runTransitionWithEvents(i,n){this._runTransition(i,n).subscribe(()=>{i?this.hidden.emit():this.shown.emit()})}static{this.ɵfac=function(n){return new(n||t)}}static{this.ɵdir=DT({type:t,selectors:[[``,`ngbCollapse`,``]],hostVars:2,hostBindings:function(n,f){n&2&&Ty(`collapse-horizontal`,f.horizontal)},inputs:{animation:`animation`,collapsed:[0,`ngbCollapse`,`collapsed`],horizontal:`horizontal`},outputs:{ngbCollapseChange:`ngbCollapseChange`,shown:`shown`,hidden:`hidden`},exportAs:[`ngbCollapse`]})}}return t})();var p$1=(()=>{class e{constructor(){this.translocoService=E$2(De$3)}transform(t,r=`default-date-pipe.never`){return t==null||t===``||t===Infinity||Number.isNaN(t)||t===`1/1/01`?this.translocoService.translate(r):t}static{this.ɵfac=function(r){return new(r||e)}}static{this.ɵpipe=bT({name:`defaultDate`,type:e,pure:!0})}}return e})();var $$1=(()=>{class n{constructor(){this.changeDetectorRef=E$2(OB),this.ngZone=E$2(U$8),this.translocoService=E$2(De$3),this.timer=null}transform(e){if(e===``||e===null||e===void 0||typeof e==`string`&&e.split(`T`)[0]===`0001-01-01`)return this.translocoService.translate(`time-difference-pipe.never`);this.removeTimer();let s=new Date(e),h=new Date,f=s.getTime()-h.getTime(),i=Math.round(Math.abs(f/1e3)),d=f>
320,v=Number.isNaN(i)?1e3:this.getSecondsUntilUpdate(i)*1e3;this.timer=this.ngZone.runOutsideAngular(()=>typeof window<`u`?window.setTimeout(()=>{this.ngZone.run(()=>this.changeDetectorRef.markForCheck())},v):null);let o=Math.round(Math.abs(i/60)),a=Math.round(Math.abs(o/60)),r=Math.round(Math.abs(a/24)),S=Math.round(Math.abs(r/30.416)),g=Math.round(Math.abs(r/365));if(Number.isNaN(i))return``;let t=d?`in`:`ago`;return i<=45?this.translocoService.translate(`time-difference-pipe.just-now`):i<=90?this.translocoService.translate(`time-difference-pipe.min.${t}`):o<=45?this.translocoService.translate(`time-difference-pipe.mins.${t}`,{value:o}):o<=90?this.translocoService.translate(`time-difference-pipe.hour.${t}`):a<=22?this.translocoService.translate(`time-difference-pipe.hours.${t}`,{value:a}):a<=36?this.translocoService.translate(`time-difference-pipe.day.${t}`):r<=25?this.translocoService.translate(`time-difference-pipe.days.${t}`,{value:r}):r<=45?this.translocoService.translate(`time-difference-pipe.month.${t}`):r<=345?this.translocoService.translate(`time-difference-pipe.months.${t}`,{value:S}):r<=545?this.translocoService.translate(`time-difference-pipe.year.${t}`):this.translocoService.translate(`time-difference-pipe.years.${t}`,{value:g})}ngOnDestroy(){this.removeTimer()}removeTimer(){this.timer&&(window.clearTimeout(this.timer),this.timer=null)}getSecondsUntilUpdate(e){return e<60?2:e<3600?30:e<86400?300:3600}static{this.ɵfac=function(s){return new(s||n)}}static{this.ɵpipe=bT({name:`timeDifference`,type:n,pure:!1})}}return n})();var p=(function(e){return e[e.Success=0]=`Success`,e[e.InvalidAuthority=1]=`InvalidAuthority`,e[e.Failure=2]=`Failure`,e[e.NotApplicable=3]=`NotApplicable`,e[e.MissingHttps=4]=`MissingHttps`,e})(p||{});var x=(()=>{class e{constructor(){this.http=E$2(ue$6),this.baseUrl=i$1.apiUrl}getServerSettings(){return this.http.get(this.baseUrl+`settings`)}getPublicOidcConfig(){return this.http.get(this.baseUrl+`settings/oidc`)}getMetadataSettings(){return this.http.get(this.baseUrl+`settings/metadata-settings`)}updateMetadataSettings(t){return this.http.post(this.baseUrl+`settings/metadata-settings`,t)}runMetadataMappings(t){return this.http.post(this.baseUrl+`settings/run-metadata-mappings`,t)}importFieldMappings(t,s){let u={data:t,settings:s};return this.http.post(this.baseUrl+`settings/import-field-mappings`,u)}updateServerSettings(t){return this.http.post(this.baseUrl+`settings`,t)}resetServerSettings(){return this.http.post(this.baseUrl+`settings/reset`,{})}resetIPAddressesSettings(){return this.http.post(this.baseUrl+`settings/reset-ip-addresses`,{})}resetBaseUrl(){return this.http.post(this.baseUrl+`settings/reset-base-url`,{})}testEmailServerSettings(){return this.http.post(this.baseUrl+`settings/test-email-url`,{})}isEmailSetup(t=!1){return this.http.get(this.baseUrl+`settings/is-email-setup?forDevice=`+t,e$1).pipe(qe$2(s=>s==`true`))}getTaskFrequencies(){return this.http.get(this.baseUrl+`settings/task-frequencies`)}getLoggingLevels(){return this.http.get(this.baseUrl+`settings/log-levels`)}getLibraryTypes(){return this.http.get(this.baseUrl+`settings/library-types`)}getOpdsEnabledResource(){return _r$2(()=>this.baseUrl+`settings/opds-enabled`).asReadonly()}clearExternalIds(){return this.http.post(this.baseUrl+`settings/reset-external-ids`,{})}isValidCronExpression(t){return t===``||t===void 0||t===null?la$2(!1):this.http.get(this.baseUrl+`settings/is-valid-cron?cronExpression=`+t,e$1).pipe(qe$2(s=>s===`true`))}ifValidAuthority(t){return t===``||t===void 0||t===null?la$2(p.NotApplicable):this.http.post(this.baseUrl+`settings/is-valid-authority`,{authority:t},e$1).pipe(qe$2(s=>parseInt(s)))}static{this.ɵfac=function(s){return new(s||e)}}static{this.ɵprov=J$6({token:e,factory:e.ɵfac,providedIn:`root`})}}return e})();var F=[`switchWrapper`];var P=[`*`];function U$2(e,r){if(e&1&&Um$1(0,4),e&2)Vm$1(`ngTemplateOutlet`,i_$1(2).switchRef())}function B(e,r){if(e&1&&(bs$1(0,`label`,6),j_$1(1),Mu()),e&2){let t=i_$1(2);Vm$1(`for`,t.elementId()),xb(),Ly(t.title())}}function k$1(e,r){if(e&1&&j_$1(0),e&2)Ou(` `,i_$1(2).title(),` `)}function G$2(e,r){if(e&1&&(Hm$1(0,`div`,7),rM(1,`safeHtml`)),e&2)Vm$1(`innerHTML`,iM(1,1,i_$1(2).subtitle()),$h)}function J$2(e,r){if(e&1&&(xu(0),bs$1(1,`div`)(2,`div`,2)(3,`div`,3,0),c_$1(5),DC(6,U$2,1,1,`ng-container`,4),Mu(),bs$1(7,`div`,3)(8,`h6`,5),DC(9,B,2,2,`label`,6)(10,k$1,1,1),Mu()()(),DC(11,G$2,2,3,`div`,7),Mu(),Gs$1()),e&2){let t=i_$1();xb(6),bC(t.switchRef()?6:-1),xb(3),bC(t.hasControl()?9:10),xb(2),bC(t.subtitle()?11:-1)}}var ie=(()=>{class e{constructor(){this.title=TB.required(),this.subtitle=TB(),this.switchRef=NB(mo$2),this.switchWrapper=_B(`switchWrapper`),this.wrapperScope=it$3(()=>this.switchWrapper()?.nativeElement??null),this.generatedId=be$3(u$5()),this.elementId=it$3(()=>
32this.generatedId()),this.hasControl=h$3({scope:this.wrapperScope,elementId:this.elementId,label:this.title}).hasControl}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵcmp=yT({type:e,selectors:[[`app-setting-switch`]],contentQueries:function(n,a,A){n&1&&yy(A,a.switchRef,mo$2,5),n&2&&f_$1()},viewQuery:function(n,a){n&1&&vy(a.switchWrapper,F,5),n&2&&f_$1()},inputs:{title:[1,`title`],subtitle:[1,`subtitle`]},ngContentSelectors:P,decls:1,vars:0,consts:[[`switchWrapper`,``],[4,`transloco`],[1,`row`,`g-0`,`mb-2`],[1,`col-auto`],[3,`ngTemplateOutlet`],[1,`section-title`],[1,`reset-label`,3,`for`],[1,`text-muted`,`mt-2`,3,`innerHTML`]],template:function(n,a){n&1&&(a_$1(),Dm$1(0,J$2,12,3,`ng-container`,1))},dependencies:[Ct$3,cn,tn$1],styles:[`.text-muted[_ngcontent-%COMP%]{font-size:.875rem}
33/*# sourceMappingURL=setting-switch.component-FN6Q54TE.css.map */`]})}}return e})();var $i=(()=>{class t{constructor(){this.httpClient=E$2(ue$6),this.baseUrl=i$1.apiUrl}getVolumeMetadata(e){return this.httpClient.get(this.baseUrl+`volume?volumeId=`+e)}deleteVolume(e){return this.httpClient.delete(this.baseUrl+`volume?volumeId=`+e)}deleteMultipleVolumes(e){return this.httpClient.post(this.baseUrl+`volume/multiple`,e)}updateVolume(e){return this.httpClient.post(this.baseUrl+`volume/update`,e,e$1)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var Ui=(()=>{class t{constructor(){this.httpClient=E$2(ue$6),this.baseUrl=i$1.apiUrl}getChapterMetadata(e){return this.httpClient.get(this.baseUrl+`chapter?chapterId=`+e)}deleteChapter(e){return this.httpClient.delete(this.baseUrl+`chapter?chapterId=`+e)}deleteMultipleChapters(e,i){return this.httpClient.post(this.baseUrl+`chapter/delete-multiple?seriesId=${e}`,{chapterIds:i})}updateChapter(e){return this.httpClient.post(this.baseUrl+`chapter/update`,e,e$1)}chapterDetailPlus(e,i){return this.httpClient.get(this.baseUrl+`chapter/chapter-detail-plus?chapterId=${i}&seriesId=${e}`)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var Bi=(()=>{class t{constructor(){this.httpClient=E$2(ue$6),this.utilityService=E$2(w$5),this.baseUrl=i$1.apiUrl}updatePerson(e){return this.httpClient.post(this.baseUrl+`person/update`,e)}get(e){return this.httpClient.get(this.baseUrl+`person?name=${e}`)}searchPerson(e){return this.httpClient.get(this.baseUrl+`person/search?queryString=${encodeURIComponent(e)}`)}getRolesForPerson(e){return this.httpClient.get(this.baseUrl+`person/roles?personId=${e}`)}getSeriesMostKnownFor(e){return this.httpClient.get(this.baseUrl+`person/series-known-for?personId=${e}`)}getChaptersByRole(e,i){return this.httpClient.get(this.baseUrl+`person/chapters-by-role?personId=${e}&role=${i}`)}getAuthorsToBrowse(e,i,n){let r=new A$2;return r=this.utilityService.addPaginationIfExists(r,i,n),this.httpClient.post(this.baseUrl+`person/all`,e,{observe:`response`,params:r}).pipe(qe$2(k=>this.utilityService.createPaginatedResult(k)))}downloadCover(e){return this.httpClient.post(this.baseUrl+`person/fetch-cover?personId=`+e,{},e$1)}isValidAlias(e,i,n){let r={personId:e,name:n,alias:i};return this.httpClient.post(this.baseUrl+`person/valid-alias`,r,e$1).pipe(qe$2(k=>k+``==`true`))}mergePerson(e,i){return this.httpClient.post(this.baseUrl+`person/merge`,{destId:e,srcId:i})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var Wi=(()=>{class t{constructor(){this.translocoService=E$2(De$3)}transform(e){switch(e){case d$1.Book:return this.translocoService.translate(`library-type-pipe.book`);case d$1.Comic:return this.translocoService.translate(`library-type-pipe.comic`);case d$1.ComicVine:return this.translocoService.translate(`library-type-pipe.comicVine`);case d$1.Images:return this.translocoService.translate(`library-type-pipe.image`);case d$1.Manga:return this.translocoService.translate(`library-type-pipe.manga`);case d$1.LightNovel:return this.translocoService.translate(`library-type-pipe.lightNovel`);default:return``}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`libraryType`,type:t,pure:!0})}}return t})();var Ke=(function(t){return t[t.Hardcover=2]=`Hardcover`,t[t.Mangabaka=3]=`Mangabaka`,t[t.ComicBookRoundup=4]=`ComicBookRoundup`,t})(Ke||{});var qi=[Ke.Hardcover,Ke.Mangabaka,Ke.ComicBookRoundup];var Gi=(t,a)=>({images:t,tabId:a});var Po$1=(t,a,e)=>({images:t,tabId:a,loading:e});var Ao$1=(t,a)=>a.url;function No$1(t,a){if(t&1){let e=AC();bs$1(0,`span`,13),Hm$1(1,`i`,14),j_$1(2),Mu(),bs$1(3,`button`,15),fy(`click`,function(){_f(e);return Mf(i_$1(3).reset())}),j_$1(4),Mu()}if(t&2){let e=i_$1(2).$implicit;xb(2),Ou(` `,e(`cover-locked`)),xb(2),Ly(e(`reset`))}}function Do$1(t,a){if(t&1&&(bs$1(0,`span`,12),Hm$1(1,`i`,16),j_$1(2),Mu()),t&2){let e=i_$1(2).$implicit;xb(2),Ou(` `,e(`cover-not-locked`))}}function Oo$1(t,a){if(t&1&&(bs$1(0,`div`,6),DC(1,No$1,5,2)(2,Do$1,3,1,`span`,12),Mu()),t&2){let e=i_$1(2);xb(),bC(e.config().isLocked?1:2)}}function $o$1(t,a){t&1&&Um$1(0)}function Uo$1(t,a){if(t&1&&Dm$1(0,$o$1,1,0,`ng-container`,17),t&2){i_$1();let e=p_$1(19),i=i_$1();Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,X_$1(2,Gi,i.uploadedImages(),i.Tabs.Uploaded))}}function Bo$1(t,a){if(t&1&&(bs$1(0,`p`,21),j_$1(1),Mu()),t&2){let e=i_$1(4);xb(),Ly(e.config().selected.title)}}function Wo(t,a){if(t&1){let e=AC();bs$1(0,`div`,18)(1,`div`,19),fy(`click`,function(){_f(e);let n=i_$1(3);return Mf(n.selectOption(n.config().selected,n.Tabs.Current))}),Hm$1(2,`app-image`,20),DC(3,Bo$1,2,1,`p`,21),Mu()()}if(t&2){let e=i_$1(3);xb(),Ty(`selected`,e.selectedOptionKey()===e.config().selected.url),xb(),Vm$1(`imageUrl`,e.config().selected.url),xb(),bC(e.config().selected.title?3:-1)}}function qo$1(t,a){if(t&1&&(bs$1(0,`li`,8)(1,`a`,9),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,Wo,4,4,`ng-template`,10),Mu()
33),t&2){let e=i_$1(2);Vm$1(`ngbNavItem`,e.Tabs.Current),xb(2),Ly(iM(3,2,e.Tabs.Current))}}function Go$1(t,a){t&1&&Um$1(0)}function zo$1(t,a){if(t&1&&Dm$1(0,Go$1,1,0,`ng-container`,17),t&2){i_$1(2);let e=p_$1(19),i=i_$1();Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,X_$1(2,Gi,i.volumeImages(),i.Tabs.Volumes))}}function jo$1(t,a){if(t&1&&(bs$1(0,`li`,8)(1,`a`,9),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,zo$1,1,5,`ng-template`,10),Mu()),t&2){let e=i_$1(2);Vm$1(`ngbNavItem`,e.Tabs.Volumes),xb(2),Ly(iM(3,2,e.Tabs.Volumes))}}function Ho(t,a){t&1&&Um$1(0)}function Yo$1(t,a){if(t&1&&Dm$1(0,Ho,1,0,`ng-container`,17),t&2){i_$1(2);let e=p_$1(19),i=i_$1();Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,X_$1(2,Gi,i.chapterImages(),i.Tabs.Chapters))}}function Ko$1(t,a){if(t&1&&(bs$1(0,`li`,8)(1,`a`,9),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,Yo$1,1,5,`ng-template`,10),Mu()),t&2){let e=i_$1(2);Vm$1(`ngbNavItem`,e.Tabs.Chapters),xb(2),Ly(iM(3,2,e.Tabs.Chapters))}}function Qo$1(t,a){t&1&&Um$1(0)}function Jo$1(t,a){if(t&1&&Dm$1(0,Qo$1,1,0,`ng-container`,17),t&2){i_$1(2);let e=p_$1(19),i=i_$1();Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,X_$1(2,Gi,i.otherImages(),i.Tabs.Other))}}function Zo$1(t,a){if(t&1&&(bs$1(0,`li`,8)(1,`a`,9),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,Jo$1,1,5,`ng-template`,10),Mu()),t&2){let e=i_$1(2);Vm$1(`ngbNavItem`,e.Tabs.Other),xb(2),Ly(iM(3,2,e.Tabs.Other))}}function Xo$1(t,a){t&1&&Um$1(0)}function ea$1(t,a){if(t&1&&Dm$1(0,Xo$1,1,0,`ng-container`,17),t&2){i_$1(2);let e=p_$1(19),i=i_$1();Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,eM(2,Po$1,i.kavitaplusImages(),i.Tabs.KavitaPlus,!i.kavitaplusImagesLoaded()))}}function ta$1(t,a){if(t&1&&(bs$1(0,`li`,8)(1,`a`,9),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,ea$1,1,6,`ng-template`,10),Mu()),t&2){let e=i_$1(2);Vm$1(`ngbNavItem`,e.Tabs.KavitaPlus),xb(2),Ly(iM(3,2,e.Tabs.KavitaPlus))}}function ia$1(t,a){if(t&1&&(bs$1(0,`div`,22)(1,`div`,24)(2,`span`,25),j_$1(3),Mu()()()),t&2){let e=i_$1(2).$implicit;xb(3),Ly(e(`loading`))}}function na$1(t,a){if(t&1&&(bs$1(0,`p`,23),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;xb(),Ly(e(`no-images`))}}function oa$1(t,a){if(t&1&&(bs$1(0,`p`,21),j_$1(1),Mu()),t&2){let e=i_$1().$implicit;xb(),Ly(e.title)}}function aa$1(t,a){if(t&1){let e=AC();bs$1(0,`div`,27),fy(`click`,function(){let n=_f(e).$implicit,r=i_$1(2).tabId;return Mf(i_$1(2).selectOption(n,r))})(`keydown.enter`,function(n){let r=_f(e).$implicit,k=i_$1(2).tabId;return i_$1(2).selectOption(r,k),Mf(n.stopPropagation())})(`keydown.space`,function(n){let r=_f(e).$implicit,k=i_$1(2).tabId;return i_$1(2).selectOption(r,k),Mf(n.stopPropagation())}),Hm$1(1,`app-image`,20),DC(2,oa$1,2,1,`p`,21),Mu()}if(t&2){let e=a.$implicit,i=i_$1(3).$implicit,n=i_$1();Ty(`selected`,n.selectedOptionKey()===e.url),jm$1(`aria-label`,e.title||i(`select-image-alt`))(`aria-pressed`,n.selectedOptionKey()===e.url),xb(),Vm$1(`imageUrl`,e.url),xb(),bC(e.title?2:-1)}}function ra$1(t,a){if(t&1&&(bs$1(0,`div`,18),CC(1,aa$1,3,6,`div`,26,Ao$1),Mu()),t&2){let e=i_$1().images;xb(),_C(e)}}function la$1(t,a){if(t&1&&DC(0,ia$1,4,1,`div`,22)(1,na$1,2,1,`p`,23)(2,ra$1,3,0,`div`,18),t&2){let e=a.images,i=a.loading;bC(e===null||i?0:e.length===0?1:2)}}function sa$1(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,3)(2,`div`,4)(3,`app-file-drag-and-drop-upload`,5),fy(`dropped`,function(n){_f(e);return Mf(i_$1().dropped(n))})(`urlSubmitted`,function(n){_f(e);return Mf(i_$1().loadImage(n))}),Mu()(),DC(4,Oo$1,3,1,`div`,6),bs$1(5,`ul`,7,0),fy(`navChange`,function(n){_f(e);return Mf(i_$1().onTabActivate(n.nextId))}),Vy(`activeIdChange`,function(n){_f(e);let r=i_$1();return H_$1(r.activeTabId,n)||(r.activeTabId=n),Mf(n)}),bs$1(7,`li`,8)(8,`a`,9),j_$1(9),rM(10,`tabTitle`),Mu(),Dm$1(11,Uo$1,1,5,`ng-template`,10),Mu(),DC(12,qo$1,5,4,`li`,8),DC(13,jo$1,5,4,`li`,8),DC(14,Ko$1,5,4,`li`,8),DC(15,Zo$1,5,4,`li`,8),DC(16,ta$1,5,4,`li`,8),Mu(),Hm$1(17,`div`,11),Mu(),Dm$1(18,la$1,3,1,`ng-template`,null,1,lM),Gs$1()}if(t&2){let e=a.$implicit,i=p_$1(6),n=i_$1();xb(3),Vm$1(`showUrlUpload`,!0)(`acceptableExtensions`,n.acceptableExtensions)(`uploadText`,e(`upload-continued`)),xb(),bC(n.config().isLocked!=null?4:-1),xb(),jy(`activeId`,n.activeTabId),xb(2),Vm$1(`ngbNavItem`,n.Tabs.Uploaded),xb(2),Ly(iM(10,13,n.Tabs.Uploaded)),xb(3),bC(n.config().selected?12:-1),xb(),bC(n.config().volumeFunc?13:-1),xb(),bC(n.config().chapterFunc?14:-1),xb(),bC(n.config().otherFunc?15:-1),xb(),bC(n.config().kavitaplusFunc?16:-1),xb(),Vm$1(`ngbNavOutlet`,i)}}var Qe=(()=>{class t{constructor(){this.imageService=E$2(we$3),this.toastr=E$2(Bt$3),this.uploadService=E$2(y$1),this.cdRef=E$2(OB),this.config=TB({}),this.coverChanged=wB(),this.resetClicked=wB(),this.acceptableExtensions=[`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.avif`].join(`,`),this.volumeImages=be$3(null),this.chapterImages=be$3(null),this.uploadedImages=be$3([]),this.kavitaplusImages=be$3([]),this.kavitaplusImagesLoaded=be$3(!1),this.otherImages=be$3([]),this.selectedOptionKey=be$3(null),this.volumeLoaded=!1,this.chapter
33Loaded=!1,this.kavitaPlusLoaded=!1,this.otherLoaded=!1,this.hasInit=!1,this.activeTabId=me$1.Current,this.Tabs=me$1,eo$1(()=>{let e=this.uploadedImages().length>0,i=this.config().selected,n=(this.volumeImages()??[]).length>0,r=(this.chapterImages()??[]).length>0;Object.keys(this.config()).length!==0&&(this.hasInit||(i?this.activeTabId=me$1.Current:e?this.activeTabId=me$1.Uploaded:n?this.activeTabId=me$1.Volumes:r?this.activeTabId=me$1.Chapters:this.activeTabId=me$1.Uploaded,this.hasInit=!0,this.cdRef.detectChanges()))})}selectOption(e,i){this.selectedOptionKey.set(e.url);let n=i!==me$1.Current;if(this.activeTabId=i,this.cdRef.markForCheck(),!n){this.coverChanged.emit({isDirty:n,fileName:``});return}if(e.fileName){this.coverChanged.emit({isDirty:n,fileName:e.fileName});return}let r;e.chapterId?r=this.uploadService.uploadChapterCover(e.chapterId):e.volumeId?r=this.uploadService.uploadVolumeCover(e.volumeId):e.seriesId?r=this.uploadService.uploadSeriesCover(e.seriesId):r=this.uploadService.uploadByUrl(e.url),r.subscribe({next:k=>{e.fileName=k,this.coverChanged.emit({isDirty:n,fileName:k})},error:()=>this.toastr.error(Mt$4(`errors.rejected-cover-upload`))})}onTabActivate(e){e===me$1.Volumes&&!this.volumeLoaded&&this.config().volumeFunc?(this.volumeLoaded=!0,this.config().volumeFunc.subscribe(i=>{this.volumeImages.set(i)})):e===me$1.Chapters&&!this.chapterLoaded&&this.config().chapterFunc?(this.chapterLoaded=!0,this.config().chapterFunc.subscribe(i=>{this.chapterImages.set(i)})):e===me$1.KavitaPlus&&!this.kavitaPlusLoaded&&this.config().kavitaplusFunc?(this.kavitaPlusLoaded=!0,this.config().kavitaplusFunc.subscribe(i=>{this.kavitaplusImages.set(i),this.kavitaplusImagesLoaded.set(!0)})):e===me$1.Other&&!this.otherLoaded&&this.config().otherFunc&&(this.otherLoaded=!0,this.config().otherFunc.subscribe(i=>{this.otherImages.set(i)}))}reset(){let e=this.config().resetFunc;e?e().subscribe(()=>{this.resetClicked.emit(),this.selectedOptionKey.set(null)}):(this.resetClicked.emit(),this.selectedOptionKey.set(null))}dropped(e){for(let i of e)i.fileEntry.isFile&&i.fileEntry.file(r=>{this.uploadService.uploadByFile(r).subscribe({next:k=>this.addStagedImage(k),error:()=>this.toastr.error(Mt$4(`errors.rejected-cover-upload`))})})}loadImage(e){!e||e===``||this.uploadService.uploadByUrl(e).subscribe({next:i=>this.addStagedImage(i),error:()=>this.toastr.error(Mt$4(`errors.rejected-cover-upload`))})}addStagedImage(e){let i={url:this.imageService.getCoverUploadImage(e),title:``,fileName:e};this.uploadedImages.update(n=>[...n,i]),this.selectOption(i,me$1.Uploaded)}addImage(e){this.uploadedImages.update(i=>[...i,e]),this.selectOption(e,me$1.Uploaded)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-cover-image-chooser`]],inputs:{config:[1,`config`]},outputs:{coverChanged:`coverChanged`,resetClicked:`resetClicked`},decls:1,vars:1,consts:[[`nav`,`ngbNav`],[`imageChooserTab`,``],[4,`transloco`,`translocoPrefix`],[1,`container-fluid`,2,`padding-left`,`0`,`padding-right`,`0`],[1,`mt-2`],[3,`dropped`,`urlSubmitted`,`showUrlUpload`,`acceptableExtensions`,`uploadText`],[1,`d-flex`,`align-items-center`,`gap-2`,`mt-2`,`mb-1`],[`ngbNav`,``,1,`nav-tabs`,3,`navChange`,`activeIdChange`,`activeId`],[3,`ngbNavItem`],[`ngbNavLink`,``],[`ngbNavContent`,``],[3,`ngbNavOutlet`],[1,`text-muted`,`small`],[1,`text-warning`],[`aria-hidden`,`true`,1,`fa`,`fa-lock`],[1,`btn`,`btn-sm`,`btn-outline-warning`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-lock-open`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`row`,`g-0`,`chooser`,`mt-2`],[`tabindex`,`0`,1,`clickable`,`col-auto`,3,`click`],[`height`,`232.91px`,`width`,`160px`,3,`imageUrl`],[1,`cover-title`],[1,`d-flex`,`justify-content-center`,`mt-3`],[1,`mt-3`],[`role`,`status`,1,`spinner-border`],[1,`visually-hidden`],[`tabindex`,`0`,`role`,`button`,1,`clickable`,`col-auto`,3,`selected`],[`tabindex`,`0`,`role`,`button`,1,`clickable`,`col-auto`,3,`click`,`keydown.enter`,`keydown.space`]],template:function(i,n){i&1&&Dm$1(0,sa$1,20,15,`ng-container`,2),i&2&&Vm$1(`translocoPrefix`,`cover-image-chooser`)},dependencies:[yt$2,Dt$2,Ct$3,Je,D$1,ne,Ve,ue$2,Ke$1,cn,qe],styles:[`.card-img-top[_ngcontent-%COMP%]{width:10rem;height:14.5569rem;max-height:14.5569rem}.selected[_ngcontent-%COMP%]{outline:.3125rem solid var(--%NS%primary-color);outline-width:medium;outline-offset:-.0625rem}
33.chooser[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,10rem);grid-gap:.5rem;justify-content:space-around}.cover-title[_ngcontent-%COMP%]{font-size:.75rem;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px;margin:.25rem 0 0}ngx-file-drop[_ngcontent-%COMP%]    >div{width:100%;border:.125rem solid var(--%NS%primary-color);border-radius:.3125rem;height:6.25rem;margin:auto}ngx-file-drop[_ngcontent-%COMP%]    >div>div{width:100%;display:inline-block}
34/*# sourceMappingURL=cover-image-chooser.component-QAYEA2PP.css.map */`]})}}return t})();var it=(()=>{class t{constructor(){this.uploadService=E$2(y$1),this.imageService=E$2(we$3),this.entityTitleService=E$2(j$4),this.licenseService=E$2(vi$1),this.readinglistService=E$2(x$6)}forSeries(e,i,n){let r=i.filter(E=>E.minNumber===-1e5||E.minNumber===1e5),k;if(r.length>0)k=la$2(r.flatMap($=>$.chapters.map(F=>({url:this.imageService.getChapterCoverImage(F.id),chapterId:F.id,title:this.entityTitleService.computeTitle(F,n,{prioritizeTitleName:!1,includeVolume:!1})}))));let T=i.filter(E=>E.minNumber!==-1e5&&E.minNumber!==1e5);return{isLocked:e.coverImageLocked,resetFunc:()=>this.uploadService.updateSeriesCoverImage(e.id,``,!1),selected:{url:this.imageService.getSeriesCoverImage(e.id),title:e.name},volumeFunc:T.length>0?la$2(T.map(E=>({url:this.imageService.getVolumeCoverImage(E.id),volumeId:E.id,title:this.entityTitleService.computeTitle(E,n,{prioritizeTitleName:!1,includeVolume:!0})}))):void 0,chapterFunc:k,kavitaplusFunc:this.licenseService.hasActiveLicense()?this.imageService.getKavitaPlusSeriesCoverImages(e.id):void 0}}forVolume(e,i){return{isLocked:e.coverImageLocked,resetFunc:()=>this.uploadService.updateVolumeCoverImage(e.id,``,!1),selected:{url:this.imageService.getVolumeCoverImage(e.id),title:this.entityTitleService.computeTitle(e,i,{prioritizeTitleName:!1,includeVolume:!0,fallbackToVolume:!0})},kavitaplusFunc:this.licenseService.hasActiveLicense()?this.imageService.getKavitaPlusSeriesCoverImages(e.seriesId,e.id):void 0}}forChapter(e,i,n){return{isLocked:e.coverImageLocked,resetFunc:()=>this.uploadService.updateChapterCoverImage(e.id,``,!1),selected:{url:this.imageService.getChapterCoverImage(e.id),title:this.entityTitleService.computeTitle(e,i)},kavitaplusFunc:this.licenseService.hasActiveLicense()?this.imageService.getKavitaPlusSeriesCoverImages(n,null,e.i
34d):void 0}}forCollection(e,i){return{isLocked:e.coverImageLocked,resetFunc:()=>this.uploadService.updateCollectionCoverImage(e.id,``,!1),selected:{url:this.imageService.getCollectionCoverImage(e.id),title:e.title},otherFunc:la$2(i.map(n=>({url:this.imageService.getSeriesCoverImage(n.id),seriesId:n.id,title:n.name})))}}forReadingList(e){return{isLocked:e.coverImageLocked||e.coverImage!=null,resetFunc:()=>this.uploadService.updateReadingListCoverImage(e.id,``,!1),selected:{url:this.imageService.getReadingListCoverImage(e.id),title:e.title},chapterFunc:this.readinglistService.getListItems(e.id).pipe(qe$2(i=>i.map(n=>({url:this.imageService.getChapterCoverImage(n.chapterId),title:n.title}))))}}forPerson(e){return{isLocked:e.coverImageLocked,resetFunc:()=>this.uploadService.updatePersonCoverImage(e.id,``,!1),selected:{url:this.imageService.getPersonImage(e.id),title:e.name}}}forLibrary(e){return{isLocked:e?.coverImage!=null,resetFunc:e?()=>this.uploadService.updateLibraryCoverImage(e.id,``,!1):void 0,selected:e?.coverImage!=null&&e?.coverImage!==``?{url:this.imageService.getLibraryCoverImage(e.id),title:e.name}:void 0}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var ue$1=(function(t){return t[t.Archive=1]=`Archive`,t[t.Epub=2]=`Epub`,t[t.Pdf=3]=`Pdf`,t[t.Images=4]=`Images`,t})(ue$1||{});var mi=Object.keys(ue$1).filter(t=>!isNaN(Number(t))&&parseInt(t,10)>=0).map(t=>parseInt(t,10));var ao$1=(()=>{class t{transform(e){switch(e){case ue$1.Archive:return Mt$4(`file-type-group-pipe.archive`);case ue$1.Epub:return Mt$4(`file-type-group-pipe.epub`);case ue$1.Pdf:return Mt$4(`file-type-group-pipe.pdf`);case ue$1.Images:return Mt$4(`file-type-group-pipe.image`)}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`fileTypeGroup`,type:t,pure:!0})}}return t})();function ca$1(t,a){if(t&1&&(bs$1(0,`div`,13),j_$1(1),Mu()),t&2){let e=i_$1(2).$index,i=i_$1(2);Vm$1(`id`,q_$1(`item--`,e,`-error`)),xb(),Ou(` `,i.errorMessage,` `)}}function da$1(t,a){if(t&1&&DC(0,ca$1,2,3,`div`,13),t&2){let e=i_$1().$implicit;bC(e.status===`INVALID`?0:-1)}}function pa$1(t,a){if(t&1){let e=AC();bs$1(0,`button`,14),fy(`click`,function(){_f(e);return Mf(i_$1(3).add())}),Hm$1(1,`i`,15),bs$1(2,`span`,11),j_$1(3),Mu()()}if(t&2){let e=i_$1(2).$implicit;xb(3),Ly(e(`common.add`))}}function ma$1(t,a){if(t&1){let e=AC();bs$1(0,`div`,3)(1,`div`,4)(2,`div`,5)(3,`label`,6),j_$1(4),Mu(),Hm$1(5,`input`,7),Sw(),DC(6,da$1,1,1),Mu()(),bs$1(7,`div`,8)(8,`button`,9),fy(`click`,function(){let n=_f(e).$index;return Mf(i_$1(2).remove(n))}),Hm$1(9,`i`,10),bs$1(10,`span`,11),j_$1(11),Mu()(),DC(12,pa$1,4,1,`button`,12),Mu()()}if(t&2){let e=a.$implicit,i=a.$index,n=a.$count,r=i_$1().$implicit,k=i_$1();xb(3),Vm$1(`for`,q_$1(`item--`,i)),xb(),Ly(k.label),xb(),Vm$1(`id`,q_$1(`item--`,i))(`formControlName`,i),Aw(),xb(),bC(e.dirty&&e.touched&&k.errorMessage?6:-1),xb(2),Vm$1(`disabled`,k.ItemsArray.length===1),xb(3),Ly(r(`common.remove`)),xb(),bC(i===n-1?12:-1)}}function _a$1(t,a){if(t&1&&(bs$1(0,`form`,1)(1,`div`,2),CC(2,ma$1,13,10,`div`,3,TC),Mu()()),t&2){let e=i_$1();Vm$1(`formGroup`,e.form),xb(2),_C(e.ItemsArray.controls)}}var _i=(()=>{class t{constructor(){this.cdRef=E$2(OB),this.destroyRef=E$2(te$5),this.items=[],this.label=``,this.validators=[],this.asyncValidators=[],this.errorMessage=null,this.updateItems=wB(),this.form=new G$6({items:new Ae$2([])})}get ItemsArray(){return this.form.get(`items`)}ngOnInit(){this.items.forEach(e=>this.addItem(e)),this.items.length===0&&this.addItem(``),this.form.valueChanges.pipe(Ed$1(100),Dd$1(),xd$1(e=>this.emit()),JB(this.destroyRef)).subscribe(),this.cdRef.markForCheck()}createItemControl(e=``){return new Z$2(e,this.validators,this.asyncValidators)}add(){this.ItemsArray.push(this.createItemControl()),this.emit(),this.cdRef.markForCheck()}addItem(e){this.ItemsArray.push(this.createItemControl(e))}remove(e){if(this.ItemsArray.length===1){this.ItemsArray.at(0).setValue(``),this.emit(),this.cdRef.markForCheck();return}
34this.ItemsArray.removeAt(e),this.emit(),this.cdRef.markForCheck()}emit(){let e=this.ItemsArray.controls.map(i=>i.value).filter(i=>i!==null&&i.trim()!==``);this.updateItems.emit(e)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-list`]],inputs:{items:`items`,label:`label`,validators:`validators`,asyncValidators:`asyncValidators`,errorMessage:`errorMessage`},outputs:{updateItems:`updateItems`},decls:1,vars:0,consts:[[3,`formGroup`,4,`transloco`],[3,`formGroup`],[`formArrayName`,`items`],[1,`row`,`g-0`,`mb-3`],[1,`col-lg-10`,`col-md-12`,`pe-2`],[1,`mb-3`],[1,`visually-hidden`,3,`for`],[`type`,`text`,1,`form-control`,3,`formControlName`,`id`],[1,`col-lg-2`],[1,`btn`,`btn-danger`,`me-2`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-trash`],[1,`visually-hidden`],[1,`btn`,`btn-secondary`],[1,`invalid-feedback`,2,`display`,`inline-block`,3,`id`],[1,`btn`,`btn-secondary`,3,`click`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-plus`]],template:function(i,n){i&1&&Dm$1(0,_a$1,4,1,`form`,0)},dependencies:[li$1,ii$2,Qe$5,ei$1,ti$1,fn$1,wn,bt$4,Ct$3],encapsulation:2})}}return t})();var ro$1=(()=>{class t{transform(e){if(e==null)return``;switch(e){case d$1.Manga:return Mt$4(`library-type-subtitle-pipe.manga`);case d$1.Comic:return Mt$4(`library-type-subtitle-pipe.comic`);case d$1.Book:return Mt$4(`library-type-subtitle-pipe.book`);case d$1.Images:return Mt$4(`library-type-subtitle-pipe.image`);case d$1.LightNovel:return Mt$4(`library-type-subtitle-pipe.lightNovel`);case d$1.ComicVine:return Mt$4(`library-type-subtitle-pipe.comicVine`)}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`libraryTypeSubtitle`,type:t,pure:!0})}}return t})();var ua$1=t=>({name:t});var ga$1=t=>({duplicateName:t});var ji=(t,a)=>({min:t,max:a});function ha$1(t,a){if(t&1&&(bs$1(0,`div`,19)(1,`label`,27),j_$1(2),Mu(),Hm$1(3,`input`,28),Sw(),Hm$1(4,`app-vali
34dation-errors`,29),Mu()),t&2){let e=a,i=i_$1(2).$implicit;xb(2),Ly(i(`name-label`)),xb(),Vm$1(`appFormField`,e),Aw(),xb(),Vm$1(`control`,e)(`messages`,J_$1(4,ga$1,i(`name-unique-validation`)))}}function fa$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1(3).$implicit;Ly(e(`promote-tooltip`))}}function Ca$1(t,a){if(t&1&&(bs$1(0,`div`,20)(1,`div`,30),Hm$1(2,`input`,31),Sw(),bs$1(3,`label`,32),j_$1(4),Mu(),Hm$1(5,`i`,33),Dm$1(6,fa$1,1,1,`ng-template`,null,1,lM),bs$1(8,`span`,34),Um$1(9,35),Mu()()()),t&2){let e=p_$1(7),i=i_$1(2).$implicit;xb(2),Aw(),xb(2),Ly(i(`promote-label`)),xb(),Vm$1(`ngbTooltip`,e),xb(4),Vm$1(`ngTemplateOutlet`,e)}}function xa$1(t,a){if(t&1&&(bs$1(0,`div`,23)(1,`label`,36),j_$1(2),Mu(),Hm$1(3,`input`,37),Sw(),Hm$1(4,`app-validation-errors`,38),Mu()),t&2){let e=a,i=i_$1(2).$implicit;xb(2),Ly(i(`month-label`)),xb(),Vm$1(`appFormField`,e),Aw(),xb(),Vm$1(`control`,e)(`messages`,X_$1(4,ji,i(`month-validation`),i(`month-validation`)))}}function va$1(t,a){if(t&1&&(bs$1(0,`div`,23)(1,`label`,39),j_$1(2),Mu(),Hm$1(3,`input`,40),Sw(),Hm$1(4,`app-vali
34dation-errors`,41),Mu()),t&2){let e=a,i=i_$1(2).$implicit;xb(2),Ly(i(`year-label`)),xb(),Vm$1(`appFormField`,e),Aw(),xb(),Vm$1(`control`,e)(`messages`,X_$1(4,ji,i(`year-validation`),i(`year-validation`)))}}function ba$1(t,a){if(t&1&&(bs$1(0,`div`,23)(1,`label`,42),j_$1(2),Mu(),Hm$1(3,`input`,43),Sw(),Hm$1(4,`app-validation-errors`,41),Mu()),t&2){let e=a,i=i_$1(2).$implicit;xb(2),Ly(i(`month-label`)),xb(),Vm$1(`appFormField`,e),Aw(),xb(),Vm$1(`control`,e)(`messages`,X_$1(4,ji,i(`month-validation`),i(`month-validation`)))}}function Sa$1(t,a){if(t&1&&(bs$1(0,`div`,23)(1,`label`,44),j_$1(2),Mu(),Hm$1(3,`input`,45),Sw(),Hm$1(4,`app-validation-errors`,46),Mu()),t&2){let e=a,i=i_$1(2).$implicit;xb(2),Ly(i(`year-label`)),xb(),Vm$1(`appFormField`,e),Aw(),xb(),Vm$1(`control`,e)(`messages`,X_$1(4,ji,i(`year-validation`),i(`year-validation`)))}}function ya$1(t,a){if(t&1&&(bs$1(0,`form`,17)(1,`div`,18),DC(2,ha$1,5,6,`div`,19),DC(3,Ca$1,10,3,`div`,20),Mu(),bs$1(4,`div`,18)(5,`div`,21)(6,`h6`,22),j_$1(7),Mu(),DC(8,xa$1,5,7,`div`,23),DC(9,va$1,5,7,`div`,23),Mu(),bs$1(10,`div`,21)(11,`h6`,24),j_$1(12),Mu(),DC(13,ba$1,5,7,`div`,23),DC(14,Sa$1,5,7,`div`,23),Mu()(),bs$1(15,`div`,18)(16,`label`,25),j_$1(17),Mu(),Hm$1(18,`textarea`,26),Sw(),Mu()()),t&2){let e,i,n,r,k,T=i_$1().$implicit,E=i_$1();Vm$1(`formGroup`,E.reviewGroup),xb(2),bC((e=E.reviewGroup.get(`title`))?2:-1,e),xb(),bC(E.accountService.hasAdminRole()?3:-1),xb(4),Ly(T(`starting-title`)),xb(),bC((i=E.reviewGroup.get(`startingMonth`))?8:-1,i),xb(),bC((n=E.reviewGroup.get(`startingYear`))?9:-1,n),xb(3),Ly(T(`ending-title`)),xb(),bC((r=E.reviewGroup.get(`endingMonth`))?13:-1,r),xb(),bC((k=E.reviewGroup.get(`endingYear`))?14:-1,k),xb(3),Ly(T(`summary-label`)),xb(),Aw()}}function ka$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Ea$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function wa$1(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,51),fy(`selectedData`,function(n){_f(e);return Mf(i_$1(4).updateTags(n))}),Dm$1(1,ka$1,1,1,`ng-template`,null,3,lM)(3,Ea$1,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){i_$1(2);Vm$1(`settings`,$_$1(3))}}function Ta$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,50),Dm$1(1,wa$1,5,1,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(2).$implicit;Vm$1(`title`,e(`tags-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Ma$1(t,a){if(t&1&&(bs$1(0,`div`,47)(1,`div`,48)(2,`div`,49),By(3),DC(4,Ta$1,3,3,`app-setting-item`,50),Mu()()()),t&2){xb(3);let e=B_$1(i_$1(2).tagsSettings());xb(),bC(e?4:-1)}}function Ia$1(t,a){if(t&1){let e=AC();bs$1(0,`app-cover-image-chooser`,52),fy(`coverChanged`,function(n){_f(e);return Mf(i_$1(2).handleCoverChanged(n))})(`resetClicked`,function(){_f(e);return Mf(i_$1(2).handleReset())}),Mu()}if(t&2)Vm$1(`config`,i_$1(2).chooserConfig())}function Ra$1(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,6)(2,`h4`,7),j_$1(3),Mu(),bs$1(4,`button`,8),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Mu()(),bs$1(5,`div`)(6,`ul`,9,0),Vy(`activeIdChange`,function(n){_f(e);let r=i_$1();return H_$1(r.active,n)||(r.active=n),Mf(n)}),bs$1(8,`li`,10)(9,`a`,11),j_$1(10),rM(11,`tabTitle`),Mu(),Dm$1(12,ya$1,19,10,`ng-template`,12),Mu(),bs$1(13,`li`,10)(14,`a`,11),j_$1(15),rM(16,`tabTitle`),Mu(),Dm$1(17,Ma$1,5,2,`ng-template`,12),Mu(),bs$1(18,`li`,10)(19,`a`,11),j_$1(20),rM(21,`tabTitle`),Mu(),Dm$1(22,Ia$1,1,1,`ng-template`,12),Mu()(),Hm$1(23,`div`,13),Mu(),bs$1(24,`div`,14)(25,`button`,15),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),j_$1(26),Mu(),bs$1(27,`button`,16),fy(`click`,function(){_f(e);return Mf(i_$1().save())}),j_$1(28),Mu()(),Gs$1()}if(t&2){let e=a.$implicit,i=p_$1(7),n=i_$1();xb(3),Ly(e(`title`,J_$1(26,ua$1,n.readingList.title))),xb(),jm$1(`aria-label`,e(`close`)),xb(),N_$1(q_$1(`modal-body scrollable-modal `,n.breakpointService.isMobile()?``:`d-flex`)),xb(),Vm$1(`orientation`,U_$1(n.breakpointService.isMobile()?`horizontal`:`vertical`)),jy(`activeId`,n.active),xb(2),Vm$1(`ngbNavItem`,n.Tabs.General),xb(2),Ly(iM(11,20,n.Tabs.General)),xb(3),Vm$1(`ngbNavItem`,n.Tabs.Tags),xb(2),Ly(iM(16,22,n.Tabs.Tags)),xb(3),Vm$1(`ngbNavItem`,n.Tabs.CoverImage),xb(2),Ly(iM(21,24,n.Tabs.CoverImage)),xb(3),N_$1(q_$1(`tab-content `,n.breakpointService.isMobile()?`mt-3`:`ms-4 flex-fill`)),Vm$1(`ngbNavOutlet`,i),xb(3),Ly(e(`close`)),xb(2),Ly(e(`save`))}}var Xi=(()=>{class t{constructor(){this.ngModal=E$2(F$6),this.readingListService=E$2(x$6),this.breakpointService=E$2(W$1),this.uploadService=E$2(y$1),this.toastr=E$2(Bt$3),this.cdRef=E$2(OB),this.accountService=E$2(yc$1),this.destroyRef=E$2(te$5),this.typeaheadSettingsFactory=E$2(jn$1),this.coverChooserConfigFactory=E$2(it),this.selectedCover=``,this.coverImageDirty=!1,this.coverImageLocked=!1,this.coverImageReset=!1,this.chooserConfig=be$3({}),this.active=me$1.General,this.tags=[],this.tagsSettings=be$3(null),this.Tabs=me$1}ngOnInit(){this.reviewGroup=new G$6({title:new Z$2(this.readingList.title,{nonNullable:!0,validators:[Ce$3.required]}),summary:new Z$2(this.readingList.summary,{nonNullable:!0,validators:[]}),promoted:new Z$2(this.readingList.promoted,{nonNullable:!0,validators:[]}),startingMonth:new Z$2(this.readingList.startingMonth,{nonNullable:!0,validators:[Ce$3.min(1),Ce$3.max(12)]}),startingYear:new Z$2(this.readingList.startingYear,{nonNullable:!0,validators:[Ce$3.min(1e3)]}),endingMonth:new Z$2(this.readingList.endingMonth,{nonNullable:!0,validators:[Ce$3.min(1),Ce$3.max(12)]}),endingYear:new Z$2(this.readingList.endingYear,{nonNullable:!0,validators:[Ce$3.min(1e3)]}),tags:new Z$2(this.readingList.tags,{nonNullable:!0,validators:[]})}),this.coverImageLocked=this.readingList.coverImageLocked,this.tags=this.readingList.tags,this.chooserConfig.set(this.coverChooserConfigFactory.forReadingList(this.readingList)),this.reviewGroup.get(`title`)?.valueChanges.pipe(Ed$1(100),Dd$1(),Sd$1(e=>this.readingListService.nameExists(e)),xd$1(e=>{let i=this.reviewGroup.get(`title`)?.value===this.readingList.title;!e||i?this.reviewGroup.get(`title`)?.setErrors(null):this.reviewGroup.get(`title`)?.setErrors({duplicateName:!0}),this.cdRef.markForCheck()}),JB(this.destroyRef)).subscribe(),this.tagsSettings.set(this.typeaheadSettingsFactory.forTag({id:`tags`,source:`readingList`,savedData:this.readingList.tags??[]}))}close(){this.coverImageReset?this.ngModal.close(s$3(this.readingList,!0)):this.ngModal.dismiss()}save(){if(this.reviewGroup.value.title.trim()===``)return;let e=null,i=x$3(w$4({},this.reviewGroup.value),{readingListId:this.readingList.id,coverImageLocked:this.coverImageLocked});
34i.startingMonth=i.startingMonth||0,i.startingYear=i.startingYear||0,i.endingMonth=i.endingMonth||0,i.endingYear=i.endingYear||0,i.tags=this.tags.map(r=>r.title);let n=[this.readingListService.update(i).pipe(xd$1(r=>e=r))];this.coverImageDirty&&n.push(this.uploadService.updateReadingListCoverImage(this.readingList.id,this.selectedCover)),Mt$3(...n).pipe(Fd$1(10),mI()).subscribe(()=>{this.ngModal.close(s$3(e,this.coverImageDirty)),this.toastr.success(Mt$4(`toasts.reading-list-updated`))})}handleCoverChanged(e){this.coverImageDirty=e.isDirty,this.selectedCover=e.fileName,this.cdRef.markForCheck()}handleReset(){this.coverImageReset=!0,this.coverImageLocked=!1,this.chooserConfig.set(x$3(w$4({},this.chooserConfig()),{isLocked:!1}))}updateTags(e){this.tags=e,this.readingList.tags=e}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-reading-list-modal`]],inputs:{readingList:`readingList`},decls:1,vars:1,consts:[[`nav`,`ngbNav`],[`promotedTooltip`,``],[`view`,``],[`badgeItem`,``],[`optionItem`,``],[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[`id`,`modal-basic-title`,1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[`ngbNav`,``,1,`nav-pills`,2,`min-width`,`8.4375rem`,3,`activeIdChange`,`activeId`,`orientation`],[3,`ngbNavItem`],[`ngbNavLink`,``],[`ngbNavContent`,``],[3,`ngbNavOutlet`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-secondary`,3,`click`],[`type`,`submit`,1,`btn`,`btn-primary`,3,`click`],[3,`formGroup`],[1,`row`,`g-0`,`mb-3`],[1,`col-md-8`,`col-sm-12`,`mt-2`],[1,`col-md-3`,`col-sm-12`,`ms-2`],[1,`col-md-6`,`col-sm-12`],[`id`,`starting-year-header`],[1,`col-md-6`,`col-sm-12`,2,`width`,`90%`],[`id`,`ending-year-heading`],[`for`,`summary`,1,`form-label`],[`id`,`summary`,`formControlName`,`summary`,`rows`,`3`,1,`form-control`],[`for`,`library-name`,1,`form-label`],[`id`,`library-name`,`formControlName`,`title`,`type`,`text`,`aria-describedby`,`library-name-validations`,1,`form-control`,3,`appFormField`],[`inputId`,`library-name`,3,`control`,`messages`],[1,`form-check`,`form-switch`],[`type`,`checkbox`,`id`,`tag-promoted`,`role`,`switch`,`formControlName`,`promoted`,`switch`,``,`aria-labelledby`,`auto-close-label`,`aria-describedby`,`tag-promoted-help`,1,`form-check-input`],[`for`,`tag-promoted`,1,`form-check-label`,`me-1`],[`aria-hidden`,`true`,`placement`,`left`,`role`,`button`,`tabindex`,`0`,1,`fa`,`fa-info-circle`,3,`ngbTooltip`],[`id`,`tag-promoted-help`,1,`visually-hidden`],[3,`ngTemplateOutlet`],[`for`,`start-month`,1,`form-label`],[`id`,`start-month`,`formControlName`,`startingMonth`,`type`,`number`,`inputmode`,`numeric`,1,`form-control`,3,`appFormField`],[`inputId`,`start-month`,3,`control`,`messages`],[`for`,`start-year`,1,`form-label`],[`id`,`start-year`,`formControlName`,`startingYear`,`type`,`number`,`inputmode`,`numeric`,`aria-describedby`,`starting-year-header`,1,`form-control`,3,`appFormField`],[`inputId`,`start-year`,3,`control`,`messages`],[`for`,`ending-month`,1,`form-label`],[`id`,`ending-month`,`formControlName`,`endingMonth`,`type`,`number`,`inputmode`,`numeric`,1,`form-control`,3,`appFormField`],[`for`,`ending-year`,1,`form-label`],[`id`,`ending-year`,`formControlName`,`endingYear`,`type`,`number`,`inputmode`,`numeric`,1,`form-control`,3,`appFormField`],[`inputId`,`ending-year`,3,`control`,`messages`],[1,`row`],[1,`col-12`,`pe-2`],[1,`mb-3`],[3,`title`,`toggleOnViewClick`,`showEdit`],[3,`selectedData`,`settings`],[3,`coverChanged`,`resetClicked`,`config`]],template:function(i,n){i&1&&Dm$1(0,Ra$1,29,28,`ng-container`,5),i&2&&Vm$1(`translocoPrefix`,`edit-reading-list-modal`)},dependencies:[D$1,ne,Qe$1,Ve,ue$2,li$1,ii$2,Qe$5,vn,It$1,ei$1,ti$1,fn$1,wn,Y$4,cn,Qe,Ke$1,Ct$3,Wt$3,us$1,w$6,G$7,qe],styles:[`.form-switch[_ngcontent-%COMP%]{margin-top:2.4rem}
35/*# sourceMappingURL=edit-reading-list-modal.component-HTAZ3RET.css.map */`]})}}return t})();var bt$1=(function(t){return t[t.Manga=1]=`Manga`,t[t.Comic=2]=`Comic`,t[t.LightNovel=3]=`LightNovel`,t[t.Book=4]=`Book`,t})(bt$1||{});var lo$1=(()=>{class t{transform(e){switch(e){case bt$1.Manga:return Mt$4(`library-type-pipe.manga`);case bt$1.Comic:return Mt$4(`library-type-pipe.comicVine`);case bt$1.LightNovel:return Mt$4(`library-type-pipe.lightNovel`);case bt$1.Book:return Mt$4(`library-type-pipe.book`)}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`plusMediaFormat`,type:t,pure:!0})}}return t})();
35var Va$1={[bt$1.Manga]:{cssVar:`--media-format-pill-manga-color`,icon:`fa-book-open`},[bt$1.LightNovel]:{cssVar:`--media-format-pill-light-novel-color`,icon:`fa-book`},[bt$1.Comic]:{cssVar:`--media-format-pill-comic-color`,icon:`fa-border-all`},[bt$1.Book]:{cssVar:`--media-format-pill-book-color`,icon:`fa-bookmark`}};var so$1=(()=>{class t{constructor(){this.format=TB.required(),this.meta=it$3(()=>Va$1[this.format()])}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-media-format-pill`]],inputs:{format:[1,`format`]},decls:4,vars:8,consts:[[1,`format-pill`,`d-inline-flex`,`align-items-center`,`rounded-pill`,`gap-1`],[`aria-hidden`,`true`]],template:function(i,n){i&1&&(Nu(0,`span`,0),Bm$1(1,`i`,1),j_$1(2),rM(3,`plusMediaFormat`),Su()),i&2&&(wy(`--%NS%pill-color`,`var(`+n.meta().cssVar+`)`),xb(),N_$1(q_$1(`fa-solid `,n.meta().icon)),xb(),Ou(` `,iM(3,6,n.format()),`
36`))},dependencies:[lo$1],styles:[`.format-pill[_ngcontent-%COMP%]{padding:.125rem .5rem;background:color-mix(in srgb,var(--%NS%pill-color) 12%,transparent);color:var(--%NS%pill-color);border:1px solid color-mix(in srgb,var(--%NS%pill-color) 27%,transparent);font-size:.6875rem;font-weight:500;line-height:1.4;white-space:nowrap}
37/*# sourceMappingURL=media-format-pill.component-KCHZXSF7.css.map */`]})}}return t})();function co$1(t,a,e=!1){switch(t){case i$2.AniList:return`https://anilist.co/manga/${a}/`;case i$2.Mal:return`https://myanimelist.net/manga/${a}/`;case i$2.MangaBaka:return`https://mangabaka.org/${a}`;case i$2.Cbr:return`https://comicbookroundup.com/comic-books/reviews/${a}`;case i$2.Hardcover:return e?`https://hardcover.app/id/book/${a}`:`https://hardcover.app/id/series/${a}`;default:return null}}var La$1=t=>({provider:t});function Fa$1(t,a){if(t&1&&(bs$1(0,`a`,3),rM(1,`scrobbleProviderName`),fy(`click`,function(i){return i.stopPropagation()}),Hm$1(2,`app-scrobble-provider-image`,4),bs$1(3,`span`),j_$1(4),Mu()()),t&2){let e=i_$1().$implicit,i=i_$1();wy(`--%NS%badge-color`,i.brandColor()),Vm$1(`href`,i.url(),qh),jm$1(`aria-label`,e(`view-on`,J_$1(9,La$1,iM(1,7,i.provider())))),xb(2),Vm$1(`provider`,i.provider())(`size`,12),xb(2),Ly(i.id())}}function Pa$1(t,a){if(t&1&&(bs$1(0,`span`,5),Hm$1(1,`app-scrobble-provider-image`,4),bs$1(2,`span`),j_$1(3),rM(4,`scrobbleProviderName`),Mu()()),t&2){let e=i_$1(2);wy(`--%NS%badge-color`,e.brandColor()),xb(),Vm$1(`provider`,e.provider())(`size`,14),xb(2),Ly(iM(4,5,e.provider()))}}function Aa$1(t,a){if(t&1&&(xu(0),DC(1,Fa$1,5,11,`a`,1)(2,Pa$1,5,7,`span`,2),Gs$1()),t&2){let e=i_$1();xb(),bC(e.showId()?1:2)}}var Na$1={[i$2.MangaBaka]:`#7c5cff`,[i$2.AniList]:`#02a9ff`,[i$2.Mal]:`#2e51a2`,[i$2.Cbr]:`#fc8452`,[i$2.Hardcover]:`#c97aff`};var Hi=(()=>{class t{constructor(){this.provider=TB.required(),this.id=TB(void 0),this.isStandAlone=TB(!1),this.showId=it$3(()=>{let e=this.id();return e!=null&&e!==0}),this.brandColor=it$3(()=>Na$1[this.provider()]??`#888`),this.url=it$3(()=>this.showId()?co$1(this.provider(),this.id(),this.isStandAlone()):null)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-scrobble-provider-tag-badge`]],inputs:{provider:[1,`provider`],id:[1,`id`],isStandAlone:[1,`isStandAlone`]},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`id-pill`,`d-inline-flex`,`align-items-center`,`rounded-pill`,`text-decoration-none`,`gap-1`,3,`href`,`--%NS%badge-color`],[1,`source-badge`,`d-inline-flex`,`align-items-center`,`rounded-pill`,`lh-1`,`gap-1`,3,`--%NS%badge-color`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`id-pill`,`d-inline-flex`,`align-items-center`,`rounded-pill`,`text-decoration-none`,`gap-1`,3,`click`,`href`],[`aria-hidden`,`true`,3,`provider`,`size`],[1,`source-badge`,`d-inline-flex`,`align-items-center`,`rounded-pill`,`lh-1`,`gap-1`]],template:function(i,n){i&1&&Dm$1(0,Aa$1,3,1,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`scrobble-provider-tag-badge`)},dependencies:[B$3,Ct$3,P$6],styles:[`.source-badge[_ngcontent-%COMP%]{height:1.375rem;padding:0 .5625rem 0 .3125rem;background:color-mix(in srgb,var(--%NS%badge-color) 12%,transparent);border:1px solid color-mix(in srgb,var(--%NS%badge-color) 33%,transparent);color:var(--%NS%badge-color);font-size:.6875rem;font-weight:600;white-space:nowrap}.id-pill[_ngcontent-%COMP%]{height:1.25rem;padding:0 .4375rem 0 .25rem;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);color:var(--%NS%text-muted-color);font-size:.65625rem;white-space:nowrap}
38/*# sourceMappingURL=scrobble-provider-tag-badge.component-6ZVWZ4W2.css.map */`]})}}return t})();function Da$1(t,a){if(t&1&&(bs$1(0,`span`,1),Hm$1(1,`span`,2),j_$1(2),Mu()),t&2){let e=a.$implicit,i=i_$1();xb(),Ty(`ongoing`,i.isOngoing()),xb(),Ou(` `,i.isOngoing()?e(`ongoing`):e(`completed`),`
39`)}}var po$1=(()=>{class t{constructor(){this.endDate=TB(void 0),this.isOngoing=it$3(()=>!this.endDate())}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-match-status-dot`]],inputs:{endDate:[1,`endDate`]},decls:1,vars:1,consts:[[`class`,`status-dot-wrapper d-inline-flex align-items-center gap-1`,4,`transloco`,`translocoPrefix`],[1,`status-dot-wrapper`,`d-inline-flex`,`align-items-center`,`gap-1`],[`aria-hidden`,`true`,1,`status-dot`]],template:function(i,n){i&1&&Dm$1(0,Da$1,3,3,`span`,0),i&2&&Vm$1(`translocoPrefix`,`match-status-dot`)},dependencies:[Ct$3],styles:[`.status-dot-wrapper[_ngcontent-%COMP%]{font-size:.71875rem;color:var(--%NS%text-muted-color)}.status-dot[_ngcontent-%COMP%]{width:.4375rem;height:.4375rem;border-radius:50%;flex-shrink:0;background:var(--%NS%primary-color)}.status-dot.ongoing[_ngcontent-%COMP%]{background:#73c0de;box-shadow:0 0 .375rem #73c0de80}
40/*# sourceMappingURL=match-status-dot.component-HA32WI4S.css.map */`]})}}return t})();function Oa$1(t,a){if(t&1&&(bs$1(0,`div`,1)(1,`span`,2),j_$1(2),bs$1(3,`span`,3),j_$1(4,`%`),Mu()(),bs$1(5,`span`,4),j_$1(6),Mu()()),t&2){let e=a.$implicit,i=i_$1();wy(`--%NS%chip-color`,i.colorVar()),xb(2),Ly(i.pct()),xb(4),Ly(e(i.labelKey()))}}var mo$1=(()=>{class t{constructor(){this.pct=TB.required(),this.colorVar=it$3(()=>{let e=this.pct();return e>=90?`var(--match-confidence-chip-strong-color)`:e>=70?`var(--match-confidence-chip-likely-color)`:e>=55?`var(--match-confidence-chip-weak-color)`:`var(--match-confidence-chip-doubt-color)`}),this.labelKey=it$3(()=>{let e=this.pct();return e>=90?`strong`:e>=70?`likely`:e>=55?`weak`:`doubt`})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-confidence-chip`]],inputs:{pct:[1,`pct`]},decls:1,vars:1,consts:[[`class`,`confidence-chip d-flex flex-column align-items-center justify-content-center gap-0`,3,`--%NS%chip-color`,4,`transloco`,`translocoPrefix`],[1,`confidence-chip`,`d-flex`,`flex-column`,`align-items-center`,`justify-content-center`,`gap-0`],[1,`chip-pct`,`fw-bold`,`lh-1`],[1,`chip-unit`],[1,`chip-label`,`text-uppercase`,`fw-semibold`]],template:function(i,n){i&1&&Dm$1(0,Oa$1,7,4,`div`,0),i&2&&Vm$1(`translocoPrefix`,`confidence-chip`)},dependencies:[Ct$3],styles:[`.confidence-chip[_ngcontent-%COMP%]{padding:.375rem .625rem;min-width:4rem;border-radius:.375rem;background:color-mix(in srgb,var(--%NS%chip-color) 8%,transparent);border:1px solid color-mix(in srgb,var(--%NS%chip-color) 20%,transparent)}.chip-pct[_ngcontent-%COMP%]{font-size:1.125rem;color:var(--%NS%chip-color)}.chip-unit[_ngcontent-%COMP%]{font-size:.6875rem;opacity:.6;font-weight:500}.chip-label[_ngcontent-%COMP%]{font-size:.59375rem;color:var(--%NS%chip-color);opacity:.85;letter-spacing:.06em}
41/*# sourceMappingURL=confidence-chip.component-LBEG7WSX.css.map */`]})}}return t})();var Yi=t=>({num:t});var $a$1=t=>({count:t});var Ua$1=(t,a)=>a.id;function Ba$1(t,a){if(t&1&&(bs$1(0,`div`,19),Hm$1(1,`i`,20),Mu(),bs$1(2,`span`,21),j_$1(3),Mu()),t&2){let e=i_$1().$implicit;xb(3),Ly(e(`selected-alt`))}}function Wa$1(t,a){if(t&1&&(Hm$1(0,`span`,22),bs$1(1,`span`),j_$1(2),Mu()),t&2){let e=i_$1(2);xb(2),Py(``,e.startYear(),``,e.endYear()&&e.endYear()!==e.startYear()?`–`+e.endYear():``)}}function qa$1(t,a){if(t&1&&(Hm$1(0,`span`,22),bs$1(1,`span`),j_$1(2),Mu()),t&2){let e=i_$1(2);xb(2),Ly(e.firstAuthor())}}function Ga$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1(2).$implicit;Ou(` `,e(`volume-count`,J_$1(1,Yi,i_$1().item().series.volumes)),` `)}}function za$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1(2).$implicit;Ou(` `,e(`chapter-count`,J_$1(1,Yi,i_$1().item().series.chapters)),` `)}}function ja$1(t,a){if(t&1&&(Hm$1(0,`span`,22),bs$1(1,`span`),DC(2,Ga$1,1,3),DC(3,za$1,1,3),Mu()),t&2){let e=i_$1(2);xb(2),bC((e.item().series.volumes??0)>0?2:-1),xb(),bC((e.item().series.chapters??0)>0?3:-1)}}function Ha$1(t,a){if(t&1&&Hm$1(0,`app-scrobble-provider-tag-badge`,12),t&2){let e=i_$1(2);Vm$1(`provider`,e.ScrobbleProvider.MangaBaka)(`id`,e.item().series.mangabakaId)}}function Ya$1(t,a){if(t&1&&Hm$1(0,`app-scrobble-provider-tag-badge`,12),t&2){let e=i_$1(2);Vm$1(`provider`,e.ScrobbleProvider.AniList)(`id`,e.item().series.aniListId)}}function Ka$1(t,a){if(t&1&&Hm$1(0,`app-scrobble-provider-tag-badge`,12),t&2){let e=i_$1(2);Vm$1(`provider`,e.ScrobbleProvider.Mal)(`id`,e.item().series.malId)}}function Qa$1(t,a){if(t&1&&Hm$1(0,`app-scrobble-provider-tag-badge`,13),t&2){let e=i_$1(2);Vm$1(`provider`,e.ScrobbleProvider.Hardcover)(`id`,e.item().series.hardcoverId)(`isStandAlone`,e.item().series.isStandAlone)}}function Ja$1(t,a){if(t&1&&(bs$1(0,`li`),j_$1(1),Mu()),t&2){let e=a.$implicit;xb(),Ou(`"`,e,`"`)}}function Za$1(t,a){if(t&1&&(bs$1(0,`ul`,26),CC(1,Ja$1,2,1,`li`,null,TC),Mu()),t&2){let e=i_$1(4);xb(),_C(e.displaySynonyms())}}function Xa$1(t,a){if(t&1&&(bs$1(0,`span`,25),fy(`click`,function(i){return i.stopPropagation()}),j_$1(1),Mu(),Dm$1(2,Za$1,3,0,`ng-template`,null,0,lM)),t&2){let e=p_$1(3),i=i_$1(2).$implicit,n=i_$1();Vm$1(`ngbTooltip`,e),xb(),Ou(` `,i(`more-titles`,J_$1(2,$a$1,n.displaySynonyms().length-1)),` `)}}function er$1(t,a){if(t&1&&(bs$1(0,`div`,14),Hm$1(1,`i`,23),bs$1(2,`span`),j_$1(3),Mu(),bs$1(4,`span`,24),j_$1(5),Mu(),DC(6,Xa$1,4,4),Mu()),t&2){let e=i_$1().$implicit,i=i_$1();xb(3),Ly(e(`alt-titles`)),xb(2),Ou(`"`,i.displaySynonyms()[0],`"`),xb(),bC(i.displaySynonyms().length>1?6:-1)}}function tr$1(t,a){t&1&&Hm$1(0,`i`,30)}function ir$1(t,a){if(t&1&&(bs$1(0,`span`,31),j_$1(1),Mu()),t&2){let e=i_$1().$implicit;xb(),Ly(e.format)}}function nr$1(t,a){if(t&1&&(bs$1(0,`span`,32),j_$1(1),Mu()),t&2){let e=i_$1().$implicit,i=i_$1(2).$implicit;xb(),Ly(i(`edition-main-count`,J_$1(1,Yi,e.mainCount)))}}function or$1(t,a){if(t&1&&(bs$1(0,`span`,33),j_$1(1),Mu()),t&2){let e=i_$1().$implicit,i=i_$1(2).$implicit;xb(),Ly(i(`edition-extra-count`,J_$1(1,Yi,e.totalCount-e.mainCount)))}}function ar$1(t,a){if(t&1){let e=AC();bs$1(0,`button`,28),fy(`click`,function(n){let r=_f(e).$implicit;return Mf(i_$1(3).chooseEdition(r,n))}),bs$1(1,`div`,29),DC(2,tr$1,1,0,`i`,30),bs$1(3,`span`),j_$1(4),Mu()(),bs$1(5,`div`,29),DC(6,ir$1,2,1,`span`,31),DC(7,nr$1,2,3,`span`,32),DC(8,or$1,2,3,`span`,33),Mu()()}if(t&2){let e=a.$implicit,i=i_$1(3);Ty(`selected`,i.isEditionSelected(e)),jm$1(`aria-pressed`,i.isEditionSelected(e)),xb(2),bC(i.isEditionSelected(e)?2:-1),xb(2),Ly(e.title),xb(2),bC(e.format?6:-1),xb(),bC(e.mainCount>0?7:-1),xb(),bC(e.totalCount-e.mainCount>0?8:-1)}}function rr$1(t,a){if(t&1&&(bs$1(0,`div`,16),CC(1,ar$1,9,8,`button`,27,Ua$1),Mu()),t&2){let e=i_$1(2);xb(),_C(e.item().series.editions)}}function lr$1(t,a){if(t&1){let e=AC();bs$1(0,`div`,2),fy(`click`,function(){_f(e);return Mf(i_$1().selectItem())}),DC(1,Ba$1,4,1),Hm$1(2,`app-image`,3),bs$1(3,`div`,4)(4,`div`,5)(5,`h3`,6)(6,`a`,7),rM(7,`safeUrl`),j_$1(8),Mu()(),Hm$1(9,`app-media-format-pill`,8),Mu(),bs$1(10,`div`,9),Hm$1(11,`app-match-status-dot`,10),DC(12,Wa$1,3,2),DC(13,qa$1,3,1),DC(14,ja$1,4,2),Mu(),bs$1(15,`div`,11),DC(16,Ha$1,1,2,`app-scrobble-provider-tag-badge`,12),DC(17,Ya$1,1,2,`app-scrobble-provider-tag-badge`,12),DC(18,Ka$1,1,2,`app-scrobble-provider-tag-badge`,12),DC(19,Qa$1,1,3,`app-scrobble-provider-tag-badge`,13),Mu(),DC(20,er$1,7,3,`div`,14),bs$1(21,`div`,15),j_$1(22),Mu(),DC(23,rr$1,3,0,`div`,16),Mu(),bs$1(24,`div`,17),Hm$1(25,`app-confidence-chip`,18),Mu()()}if(t&2){let e=i_$1();Ty(`selected`,e.isSelected()),xb(),bC(e.isSelected()?1:-1),xb(),Vm$1(`imageUrl`,e.item().series.coverUrl??``),xb(4),Vm$1(`href`,iM(7,19,e.item().series.siteUrl),qh),xb(2),Ly(e.item().series.name),xb(),Vm$1(`format`,e.item().series.plusMediaFormat),xb(2),Vm$1(`endD
41ate`,e.item().series.endDate),xb(),bC(e.startYear()?12:-1),xb(),bC(e.firstAuthor()?13:-1),xb(),bC((e.item().series.volumes??0)>0||(e.item().series.chapters??0)>0?14:-1),xb(2),bC(e.item().series.mangabakaId?16:-1),xb(),bC(e.item().series.aniListId?17:-1),xb(),bC(e.item().series.malId?18:-1),xb(),bC(e.item().series.hardcoverId?19:-1),xb(),bC(e.showSynonyms()&&e.displaySynonyms().length>0?20:-1),xb(2),Ly(e.item().series.summary),xb(),bC(e.item().series.editions.length>0?23:-1),xb(2),Vm$1(`pct`,e.pct())}}var _o$1=(()=>{class t{constructor(){this.item=TB.required(),this.isSelected=TB(!1),this.showSynonyms=TB(!0),this.query=TB(``),this.selectedEditionId=TB(null),this.selected=wB(),this.editionSelected=wB(),this.ScrobbleProvider=i$2,this.matchedSynonyms=it$3(()=>{let e=this.query().trim().toLowerCase();return!e||e.length<2||/^(anilist|mal|mangabaka|cbr|hardcover):/.test(e)?[]:(this.item().series.synonyms??[]).filter(i=>i.toLowerCase().includes(e))}),this.displaySynonyms=it$3(()=>this.matchedSynonyms().length>0?this.matchedSynonyms():this.item().series.synonyms??[]),this.startYear=it$3(()=>this.item().series.startDate?new Date(this.item().series.startDate).getFullYear():null),this.endYear=it$3(()=>this.item().series.endDate?new Date(this.item().series.endDate).getFullYear():null),this.firstAuthor=it$3(()=>this.item().series.staff?.find(e=>e.role===`Author`)?.name??null),this.pct=it$3(()=>Math.round(this.item().matchRating*100))}isEditionSelected(e){return this.selectedEditionId()===e.id}chooseEdition(e,i){i.stopPropagation(),this.editionSelected.emit({item:this.item(),edition:e})}selectItem(){this.selected.emit(this.item())}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-match-series-result-item`]],inputs:{item:[1,`item`],isSelected:[1,`isSelected`],showSynonyms:[1,`showSynonyms`],query:[1,`query`],selectedEditionId:[1,`selectedEditionId`]},outputs:{selected:`selected`,editionSelected:`editionSelected`},decls:1,vars:1,consts:[[`synonymTooltip`,``],[`class`,`match-result-row position-relative d-flex align-items-start gap-3`,3,`selected`,`click`,4,`transloco`,`translocoPrefix`],[1,`match-result-row`,`position-relative`,`d-flex`,`align-items-start`,`gap-3`,3,`click`],[`width`,`72px`,`height`,`102px`,3,`imageUrl`],[1,`match-result-content`,`d-flex`,`flex-column`,`flex-fill`,`gap-1`],[1,`match-result-title-row`,`d-flex`,`align-items-center`,`flex-wrap`,`gap-2`],[1,`match-result-name`,`fw-bold`],[`target`,`_blank`,`rel`,`noreferrer noopener`,3,`href`],[3,`format`],[1,`match-result-meta`,`d-flex`,`align-items-center`,`flex-wrap`],[3,`endDate`],[1,`match-result-providers`,`d-flex`,`align-items-center`,`flex-wrap`,`gap-1`],[3,`provider`,`id`],[3,`provider`,`id`,`isStandAlone`],[1,`match-result-synonyms`,`d-flex`,`align-items-center`,`flex-wrap`,`gap-1`],[1,`match-result-synopsis`],[1,`match-result-editions`,`d-flex`,`flex-row`,`flex-wrap`,`gap-1`],[1,`match-result-rail`,`d-flex`,`flex-column`,`flex-shrink-0`,`align-items-end`],[3,`pct`],[`aria-hidden`,`true`,1,`selected-check`,`position-absolute`,`d-flex`,`align-items-center`,`justify-content-center`,`rounded-circle`],[1,`fa-solid`,`fa-check`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`dot-separator`,`mx-1`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-language`],[1,`synonym-first`],[`tooltipClass`,`series-synonym-tooltip`,`placement`,`top`,`autoClose`,`false`,1,`synonym-more`,`d-inline-flex`,`align-items-center`,`rounded-pill`,`fw-semibold`,3,`click`,`ngbTooltip`],[1,`list-unstyled`,`mb-0`],[`type`,`button`,1,`edition-chip`,`d-flex`,`flex-column`,`flex-md-row`,`align-items-center`,`justify-content-md-between`,`gap-1`,`gap-md-2`,3,`selected`],[`type`,`button`,1,`edition-chip`,`d-flex`,`flex-column`,`flex-md-row`,`align-items-center`,`justify-content-md-between`,`gap-1`,`gap-md-2`,3,`click`],[1,`d-flex`,`align-items-center`,`gap-1`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-check`,`edition-chip-icon`],[1,`edition-chip-format`],[1,`edition-chip-count`],[1,`edition-chip-count`,`edition-chip-extra`]],template:function(i,n){i&1&&Dm$1(0,lr$1,26,21,`div`,1),i&2&&Vm$1(`translocoPrefix`,`match-series-result-item`)},dependencies:[Ct$3,Y$4,yt$2,so$1,Hi,po$1,mo$1,u$1],styles:[`.match-result-row[_ngcontent-%COMP%]{margin:.375rem 0;padding:.75rem;background:#ffffff05;border:1px solid var(--%NS%hr-color);border-radius:.375rem;cursor:pointer;transition:background .15s ease,border-color .15s ease}.match-result-row[_ngcontent-%COMP%]:hover{background:#ffffff0a}.match-result-row.selected[_ngcontent-%COMP%]{background:#4ac6941a;border-color:#4ac6948c}.selected-check[_ngcontent-%COMP%]{top:.625rem;right:.625rem;width:1.25rem;height:1.25rem;background:var(--%NS%primary-color);font-size:.625rem;color:#fff}.match-result-content[_ngcontent-%COMP%]{min-width:0}
41.match-result-name[_ngcontent-%COMP%]{margin:0;font-size:1.0625rem;line-height:1.2;color:var(--%NS%body-text-color)}.match-result-meta[_ngcontent-%COMP%], .match-result-synonyms[_ngcontent-%COMP%]{font-size:.71875rem;color:var(--%NS%text-muted-color)}.synonym-first[_ngcontent-%COMP%]{color:var(--%NS%text-muted-color)}.synonym-more[_ngcontent-%COMP%]{padding:.0625rem .4375rem;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);color:var(--%NS%text-muted-color);font-size:.65625rem;line-height:1.4;cursor:help;-webkit-user-select:none;user-select:none}.match-result-synopsis[_ngcontent-%COMP%]{font-size:.78125rem;line-height:1.55;color:var(--%NS%body-text-color);opacity:.78;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.match-result-rail[_ngcontent-%COMP%]{padding-top:.25rem;min-width:4.75rem}.match-result-editions[_ngcontent-%COMP%]{margin-top:.125rem}.edition-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3125rem;padding:.1875rem .5625rem;background:#ffffff0a;border:1px solid var(--%NS%hr-color);border-radius:999px;color:var(--%NS%text-muted-color);font-size:.71875rem;line-height:1.4;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease}.edition-chip[_ngcontent-%COMP%]:hover{background:#ffffff14;color:var(--%NS%body-text-color)}.edition-chip.selected[_ngcontent-%COMP%]{background:#4ac69424;border-color:#4ac69499;color:var(--%NS%body-text-color);font-weight:600}@media(max-width:768px){.edition-chip[_ngcontent-%COMP%]{width:100%}}.edition-chip-format[_ngcontent-%COMP%]{margin-left:.25rem;opacity:.75;font-weight:400}.edition-chip-count[_ngcontent-%COMP%]{opacity:.85;font-weight:400}.edition-chip-extra[_ngcontent-%COMP%]{opacity:.65}.edition-chip-icon[_ngcontent-%COMP%]{font-size:.625rem;color:#4ac694e6}@media(max-width:576px){.match-result-row[_ngcontent-%COMP%]{flex-wrap:wrap;gap:.75rem!important}.match-result-rail[_ngcontent-%COMP%]{min-width:auto;position:absolute;top:.75rem;right:.75rem}app-image[_ngcontent-%COMP%]{flex-shrink:0}.match-result-editions[_ngcontent-%COMP%]{gap:.25rem!important}.edition-chip[_ngcontent-%COMP%]{padding:.25rem .5rem;font-size:.65625rem;gap:.2rem;max-width:100%;word-break:break-word}.edition-chip-format[_ngcontent-%COMP%]{margin-left:.125rem}}
42/*# sourceMappingURL=match-series-result-item.component-UXOEZ37V.css.map */`]})}}return t})();var ui=(()=>{class t{transform(e){switch(e){case Ke.Hardcover:return Mt$4(`metadata-provider-title-pipe.hardcover`);case Ke.Mangabaka:return Mt$4(`metadata-provider-title-pipe.mangabaka`);case Ke.ComicBookRoundup:return Mt$4(`metadata-provider-title-pipe.cbr`);default:return``}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`metadataProviderTitle`,type:t,pure:!0})}}return t})();var uo$1=(()=>{class t{transform(e){switch(e){case e$2.EPUB:return`fa fa-book`;case e$2.ARCHIVE:return`fa-solid fa-file-zipper`;case e$2.IMAGE:return`fa-solid fa-file-image`;case e$2.PDF:return`fa-solid fa-file-pdf`;case e$2.UNKNOWN:return`fa-solid fa-file-circle-question`}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`mangaFormatIcon`,type:t,pure:!0})}}return t})();var sr$1=[`*`];function cr$1(t,a){if(t&1&&(Hm$1(0,`i`,2),rM(1,`mangaFormatIcon`),rM(2,`mangaFormat`)),t&2){i_$1(2);let e=$_$1(0);N_$1(iM(1,4,e)),Vm$1(`title`,U_$1(iM(2,6,e)))}}function dr$1(t,a){if(t&1&&(Hm$1(0,`i`,3),rM(1,`mangaFormatIcon`),rM(2,`mangaFormat`)),t&2){i_$1(2);let e=$_$1(0);N_$1(iM(1,4,e)),Vm$1(`ngbTooltip`,U_$1(iM(2,6,e)))}}function pr$1(t,a){if(t&1&&(DC(0,cr$1,3,8,`i`,0)(1,dr$1,3,8,`i`,1),c_$1(2)),t&2)bC(i_$1().useTitle()?0:1)}var go$1=(()=>{class t{constructor(){this.MangaFormat=e$2,this.format=TB(e$2.UNKNOWN),this.useTitle=TB(!0)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-series-format`]],inputs:{format:[1,`format`],useTitle:[1,`useTitle`]},ngContentSelectors:sr$1,decls:2,vars:2,consts:[[`aria-hidden`,`true`,3,`class`,`title`],[`aria-hidden`,`true`,3,`class`,`ngbTooltip`],[`aria-hidden`,`true`,3,`title`],[`aria-hidden`,`true`,3,`ngbTooltip`]],template:function(i,n){if(i&1&&(a_$1(),By(0),DC(1,pr$1,3,1)),i&2){let r=B_$1(n.format());xb(),bC(r!==n.MangaFormat.UNKNOWN?1:-1)}},dependencies:[Y$4,uo$1,f$6],styles:[`i[_ngcontent-%COMP%]{padding:0 .3125rem}
43/*# sourceMappingURL=series-format.component-5KC2J67U.css.map */`]})}}return t})();var en=t=>({num:t});var ho$1=t=>({provider:t});var mr$1=t=>({count:t});var _r$1=t=>({query:t});function ur$1(t,a){return this.matchKey(a)}function gr$1(t,a){t&1&&(bs$1(0,`div`,16),j_$1(1),Mu()),t&2&&(xb(),Ou(` `,a,` `))}function hr$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1().$implicit;Ou(` `,e(`volume-count`,J_$1(1,en,i_$1().kavitaVolumeCount())),` `)}}function fr$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1().$implicit;Ou(` `,e(`chapter-count`,J_$1(1,en,i_$1().kavitaChapterCount())),` `)}}function Cr$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1().$implicit;Ou(` `,e(`special-count`,J_$1(1,en,i_$1().kavitaSpecialCount())),` `)}}function xr$1(t,a){if(t&1&&(j_$1(0),rM(1,`libraryType`)),t&2){i_$1();Ou(` `,iM(1,1,$_$1(8).libraryType),` `)}}function vr$1(t,a){if(t&1&&Hm$1(0,`app-scrobble-provider-tag-badge`,50),t&2){i_$1(2);let e=$_$1(8);Vm$1(`provider`,i_$1().ScrobbleProvider.AniList)(`id`,e.aniListId)}}function br$1(t,a){if(t&1&&Hm$1(0,`app-scrobble-provider-tag-badge`,50),t&2){i_$1(3);let e=$_$1(8);Vm$1(`provider`,i_$1().ScrobbleProvider.MangaBaka)(`id`,e.mangaBakaId)}}function Sr$1(t,a){if(t&1&&Hm$1(0,`app-scrobble-provider-tag-badge`,50),t&2){i_$1(3);let e=$_$1(8);Vm$1(`provider`,i_$1().ScrobbleProvider.Cbr)(`id`,e.cbrId)}}function yr$1(t,a){if(t&1&&Hm$1(0,`app-scrobble-provider-tag-badge`,51),t&2){i_$1(3);let e=$_$1(8);Vm$1(`provider`,i_$1().ScrobbleProvider.Hardcover)(`id`,e.hardcoverId)(`isStandAlone`,e.isStandAlone)}}function kr$1(t,a){if(t&1&&DC(0,br$1,1,2,`app-scrobble-provider-tag-badge`,50)(1,Sr$1,1,2,`app-scrobble-provider-tag-badge`,50)(2,yr$1,1,3,`app-scrobble-provider-tag-badge`,51),t&2){let e;i_$1(2);let i=$_$1(8),n=i_$1();bC((e=i.metadataProvider)===n.MetadataProvider.Mangabaka?0:e===n.MetadataProvider.ComicBookRoundup?1:e===n.MetadataProvider.Hardcover?2:-1)}}function Er$1(t,a){if(t&1&&(Hm$1(0,`div`,48),bs$1(1,`div`,49)(2,`span`),j_$1(3),Mu(),DC(4,vr$1,1,2,`app-scrobble-provider-tag-badge`,50)(5,kr$1,3,1),Mu()),t&2){let e=i_$1().$implicit,i=$_$1(8);xb(3),Ly(e(`matched-to`)),xb(),bC(i.isLegacy?4:5)}}function wr$1(t,a){if(t&1&&(j_$1(0),rM(1,`metadataProviderTitle`)),t&2){let e=i_$1(2).$implicit;Ou(` `,e(`provider-switch-help`,J_$1(3,ho$1,iM(1,1,i_$1().activeProvider()))),` `)}}function Tr$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1(2).$implicit;Ou(` `,e(`change-provider-help`),` `)}}function Mr$1(t,a){if(t&1&&(bs$1(0,`option`,59),j_$1(1),rM(2,`metadataProviderTitle`),Mu()),t&2){let e=a.$implicit;Vm$1(`ngValue`,e),xb(),Ly(iM(2,2,e))}}function Ir$1(t,a){if(t&1&&(bs$1(0,`form`,60)(1,`div`,32),Hm$1(2,`input`,61),Sw(),bs$1(3,`label`,62),j_$1(4),Hm$1(5,`i`,63),Mu()()()),t&2){let e=i_$1(2).$implicit;Vm$1(`formGroup`,i_$1().formGroup),xb(2),Aw(),xb(2),Ou(` `,e(`is-standalone-label`),` `),xb(),Vm$1(`ngbTooltip`,e(`is-standalone-tooltip`))}}function Rr$1(t,a){if(t&1&&(bs$1(0,`div`,18)(1,`div`,52),Hm$1(2,`i`,53),Mu(),bs$1(3,`div`,54)(4,`div`,55)(5,`span`,56),j_$1(6),rM(7,`metadataProviderTitle`),Mu()(),bs$1(8,`div`,57),DC(9,wr$1,2,5)(10,Tr$1,1,1),Mu(),bs$1(11,`select`,58),CC(12,Mr$1,3,4,`option`,59,TC),Mu(),Sw(),Mu(),DC(14,Ir$1,6,3,`form`,60),Mu()),t&2){let e=i_$1().$implicit,i=i_$1();xb(3),Vm$1(`formGroup`,i.formGroup),xb(3),Ou(` `,e(`searching-against`,J_$1(7,ho$1,iM(7,5,i.activeProvider()))),` `),xb(3),bC(i.isProviderSwitched()?9:10),xb(2),jm$1(`aria-label`,e(`change-provider-help`)),Aw(),xb(),_C(i.allMetadataProviders),xb(2),bC(i.activeProvider()===i.MetadataProvider.Hardcover?14:-1)}}function Vr$1(t,a){if(t&1){let e=AC();bs$1(0,`button`,64),fy(`click`,function(){_f(e);return Mf(i_$1(2).clearQuery())}),Mu()}if(t&2){let e=i_$1().$implicit;jm$1(`aria-label`,e(`clear`))}}function Lr$1(t,a){if(t&1&&(bs$1(0,`span`,27)(1,`span`,65),j_$1(2),Mu()()),t&2){let e=i_$1().$implicit;xb(2),Ly(e(`searching-alt`))}}function Fr$1(t,a){if(t&1&&(Hm$1(0,`i`,66),bs$1(1,`span`,67),j_$1(2),Mu()),t&2){let e=i_$1().$implicit;xb(2),Ly(e(`search`))}}function Pr$1(t,a){if(t&1&&(bs$1(0,`div`,35),j_$1(1),Mu()),t&2){let e=i_$1().$implicit,i=i_$1();xb(),Ou(` `,e(`match-count`,J_$1(1,mr$1,i.matches().length)),` `)}}function Ar$1(t,a){if(t&1&&(bs$1(0,`div`,37)(1,`div`,68)(2,`span`,65),j_$1(3),Mu()()()),t&2){let e=i_$1().$implicit;xb(3),Ly(e(`loading-alt`))}}function Nr$1(t,a){t&1&&(bs$1(0,`app-empty-state`,38),Hm$1(1,`i`,69),Mu()),t&2&&Vm$1(`titleKey`,`empty-title`)(`descriptionKey`,`empty-description`)(`i18nPrefix`,`match-series-modal`)}function Dr$1(t,a){t&1&&(bs$1(0,`app-empty-state`,38),Hm$1(1,`i`,70),Mu()),t&2&&Vm$1(`titleKey`,`dont-match-active-title`)(`descriptionKey`,`dont-match-active-description`)(`i18nPrefix`,`match-series-modal`)}function Or$1(t,a){if(t&1&&(bs$1(0,`app-empty-state`,39),Hm$1(1,`i`,71),Mu()),t&2){let e=i_$1(2);Vm$1(`isError`,!0)(`titleKey`,`no-results-title`)(`descriptionKey`,`no-results-description`)(`descriptionParams`,J_$1(5,_r$1,e.lastQuery()??e.series().name))(`i18nPrefix`,`match-series-modal`)}}function $r$1(t,a){if(t&1){let e=AC();bs$1(0,`app-match-series-result-item`,73),fy(`selected`,function(n){_f(e);return Mf(i_$1(3).selectRow(n))})(`editionSelected`,function(n){_f(e);return Mf(i_$1(3).selectEdition(n.item,n.edition))}),Mu()}if(t&2){let e=a.$implicit,i=i_$1(3);Vm$1(`item`,e)(`selectedEditionId`,i.selectedEditionId())(`isSelected`,!!i.selectedItem()&&i.matchKey(e)===i.matchKey(i.selectedItem()))(`showSynonyms`,!0)(`query`,i.lastQuery())}}function Ur$1(t,a){if(t&1&&CC(0,$r$1,1,5,`app-match-series-result-item`,72,ur$1,!0),t&2)_C(i_$1(2).matches())}function Br$1(t,a){if(t&1){let e=AC();bs$1(0,`button`,26),fy(`click`,function(){_f(e);return Mf(i_$1(2).saveDontMatch())}),j_$1(1),Mu()}if(t&2){let e=i_$1().$implicit;Vm$1(`disabled`,!i_$1().canSaveDontMatch()),xb(),Ou(` `,e(`save`),` `)}}function Wr$1(t,a){if(t&1){let e=AC();bs$1(0,`button`,26),fy(`click`,function(){_f(e);return Mf(i_$1(2).applyMatch())}),j_$1(1),Mu()}if(t&2){let e=i_$1().$implicit;Vm$1(`disabled`,!i_$1().selectedItem()),xb(),Ou(` `,e(`apply-match`),` `)}}function qr$1(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,1)(2,`h4`,2)(3,`span`,3),j_$1(4),Mu(),j_$1(5),Mu(),bs$1(6,`button`,4),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Mu()(),bs$1(7,`div`,5),By(8),bs$1(9,`div`,6)(10,`div`,7)(11,`p`,8),j_$1(12),Mu(),bs$1(13,`p`,9),j_$1(14),Mu()(),bs$1(15,`div`,10)(16,`div`,11),Hm$1(17,`app-image`,12),bs$1(18,`div`,13)(19,`div`,14),j_$1(20),Mu(),bs$1(21,`div`,15),j_$1(22),Mu(),DC(23,gr$1,2,1,`div`,16),bs$1(24,`div`,16),DC(25,hr$1,1,3),DC(26,fr$1,1,3),DC(27,Cr$1,1,3),Hm$1(28,`app-series-format`,17),DC(29,xr$1,2,3),Mu()()(),DC(30,Er$1,6,2),Mu()(),DC(31,Rr$1,15,9,`div`,18),bs$1(32,`div`,19)(33,`div`,20)(34,`div`,21),Hm$1(35,`i`,22),bs$1(36,`label`,23),j_$1(37),Mu(),bs$1(38,`input`,24),fy(`keydown.enter`,function(){_f(e);return Mf(i_$1().search())}),Mu(),Sw(),DC(39,Vr$1,1,1,`button`,25),Mu(),bs$1(40,`button`,26),fy(`click`,function(){_f(e);return Mf(i_$1().search())}),DC(41,Lr$1,3,1,`span`,27)(42,Fr$1,3,1),Mu()(),bs$1(43,`div`,28)(44,`div`,29)(45,`span`,30),j_$1(46),Mu(),bs$1(47,`code`,31),j_$1(48,`anilist:159441`),Mu(),bs$1(49,`code`,31),j_$1(50,`mal:20593`),Mu(),bs$1(51,`code`,31),j_$1(52,`mangabaka:1331`),Mu(),bs$1(53,`code`,31),j_$1(54,`hardcover:flatland`),Mu()(),bs$1(55,`div`,32),Hm$1(56,`input`,33),Sw(),bs$1(57,`label`,34),j_$1(58),Mu()()()(),DC(59,Pr$1,2,3,`div`,35),bs$1(60,`div`,36),DC(61,Ar$1,4,1,`div`,37)(62,Nr$1,2,3,`app-empty-state`,38)(63,Dr$1,2,3,`app-empty-state`,38)(64,Or$1,2,7,`app-empty-state`,39)(65,Ur$1,2,0),Mu()(),bs$1(66,`div`,40)(67,`div`,41)(68,`a`,42),j_$1(69,` MangaBaka `),Hm$1(70,`i`,43),Mu(),bs$1(71,`a`,44),j_$1(72,` AniList `),Hm$1(73,`i`,43),Mu(),bs$1(74,`a`,42),j_$1(75,` Hardcover `),Hm$1(76,`i`,43),Mu(),bs$1(77,`a`,42),j_$1(78,` Comic Book Roundup `),Hm$1(79,`i`,43),Mu(),bs$1(80,`div`,45)(81,`button`,46),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),j_$1(82),Mu(),DC(83,Br$1,2,2,`button`,47)(84,Wr$1,2,2,`button`,47),Mu()()(),Gs$1()}if(t&2){let e,i,n=a.$implicit,r=i_$1();xb(4),Ly(n(`title-prefix`)),xb(),Ou(` `,r.series().name,` `),xb(),jm$1(`aria-label`,n(`close`)),xb(2);let k=B_$1(r.matchInfo());xb(4),Ly(n(`description`)),xb(2),Ly(n(`dont-match-hint`)),xb(3),Vm$1(`imageUrl`,r.coverImageUrl()),xb(3),Ly(n(`in-kavita`)),xb(2),Ly(r.series().name),xb(),bC((e=r.peopleHint())?23:-1,e),xb(2),bC(r.kavitaVolumeCount()>0?25:-1),xb(),bC(r.kavitaChapterCount()>0?26:-1),xb(),bC(r.kavitaSpecialCount()>0?27:-1),xb(),Vm$1(`format`,r.series().format)(`useTitle`,!1),xb(),bC(k?29:-1),xb(),bC(k&&k.hasMatch?30:-1),xb(),bC(k?31:-1),xb(),Vm$1(`formGroup`,r.formGroup),xb(5),Ly(n(`search`)),xb(),Aw(),xb(),bC(r.formGroup.get(`query`)?.value?39:-1),xb(),Vm$1(`disabled`,r.isLoading()||r.formGroup.get(`dontMatch`)?.value),xb(),bC(r.isLoading()?41:42),xb(5),Ly(n(`try`)),xb(10),Aw(),xb(),Vm$1(`ngbTooltip`,n(`dont-match-tooltip`)),xb(),Ou(` `,n(`dont-match-label`),` `),xb(),bC(r.bodyState()===`results`?59:-1),xb(2),bC((i=r.bodyState())===`loading`?61:i===`empty`?62:i===`dont-match`?63:i===`no-results`?64:i===`results`?65:-1),xb(7),Vm$1(`href`,r.mangaBakaSearchUrl(),qh),xb(6),Vm$1(`href`,r.hardcoverSearchUrl(),qh),xb(3),Vm$1(`href`,r.cbrSearchUrl(),qh),xb(5),Ly(n(`close`)),xb(),bC(r.isDontMatch()?83:84)}}var tn=(()=>{class t{constructor(){this.seriesService=E$2(N$2),this.modalService=E$2(F$6),this.imageService=E$2(we$3),this.series=TB.required(),this.formGroup=new G$6({query:new Z$2(``,[]),isStandAlone:new Z$2(!1),dontMatch:new Z$2(!1,[]),provider:new Z$2(null)}),this.isDontMatch=e$(this.formGroup.controls.dontMatch.valueChanges.pipe(Nd$1(this.formGroup.controls.dontMatch.value)),{initialValue:!1}),this.matches=be$3([]),this.isLoading=be$3(!1),this.hasSearched=be$3(!1),this.selectedItem=be$3(null),this.selectedEdition=be$3(null),this.selectedEditionId=Lu(()=>this.selectedEdition()?.id??null),this.lastQuery=be$3(``),this.resultProvider=be$3(null),this.bodyState=it$3(()=>this.isDontMatch()?`dont-match`:this.isLoading()?`loading`:this.hasSearched()?this.matches().length>0?`results`:`no-results`:`empty`),this.seriesDetail=be$3(null),this.seriesMetadata=be$3(null),this.matchInfo=be$3(null),this.peopleHint=it$3(()=>{let e=this.seriesMetadata();return e?e.writers.concat(e.colorists).concat(e.coverArtists).slice(0,3).map(i=>i.name).join(`, `):null}),this.mangaBakaSearchUrl=it$3(()=>`https://mangabaka.org/search?q=${encodeURIComponent(this.series().name)}`),this.hardcoverSearchUrl=it$3(()=>{let i=this.series().isStandAlone?`&type=Series`:``;return`https://hardcover.app/search?q=${encodeURIComponent(this.series().name)}${i}`}),this.cbrSearchUrl=it$3(()=>`https://comicbookroundup.com/search-results?keyword=${encodeURIComponent(this.series().name)}`),this.activeProvider=it$3(()=>this.resultProvider()??this.matchInfo()?.metadataProvider??null),this.isProviderSwitched=it$3(()=>{let e=this.resultProvider();return e!==null&&e!==this.matchInfo()?.metadataProvider}),this.MetadataProvider=Ke,this.ScrobbleProvider=i$2,this.allMetadataProviders=qi,this.canSaveDontMatch=it$3(()=>this.isDontMatch()===!0&&!this.series().dontMatch),this.coverImageUrl=it$3(()=>this.imageService.getSeriesCoverImage(this.series().id)),this.kavitaVolumeCount=it$3(()=>(this.seriesDetail()?.volumes??[]).length),this.kavitaChapterCount=it$3(()=>(this.seriesDetail()?.chapters??[]).length),this.kavitaSpecialCount=it$3(()=>(this.seriesDetail()?.specials??[]).length),eo$1(()=>{this.isDontMatch()?this.formGroup.controls.query.disable({emitEvent:!1}):this.formGroup.controls.query.enable({emitEvent:!1})}),this.formGroup.controls.dontMatch.valueChanges.pipe(Cd$1(1),We$5(e=>e===!1),JB()).subscribe(()=>this.search()),this.formGroup.valueChanges.pipe(JB(),yI(),We$5(([e,i])=>e.provider!==i.provider)).subscribe(()=>{this.selectedItem.set(null),this.selectedEdition.set(null),this.search()})}ngOnInit(){this.series().mangaBakaEditionId&&this.selectedEditionId.set(this.series().mangaBakaEditionId),this.seriesService.getMatchInfo(this.series().id).subscribe(e=>{this.matchInfo.set(e),this.formGroup.controls.provider.setValue(e.metadataProvider,{emitEvent:!1}),this.autoSelectExistingMatch(this.matches())}),this.formGroup.patchValue({dontMatch:this.series().dontMatch||!1}
43),this.seriesService.getSeriesDetail(this.series().id).pipe(xd$1(e=>{this.seriesDetail.set(e);let i=e.chapters.length+e.specials.length==1;this.formGroup.get(`isStandAlone`)?.setValue(i)})).subscribe(),this.seriesService.getMetadata(this.series().id).pipe(xd$1(e=>this.seriesMetadata.set(e))).subscribe()}search(){if(this.isDontMatch())return;let e=this.formGroup.value.query??``;this.isLoading.set(!0),this.lastQuery.set(e);let i=x$3(w$4({},this.formGroup.value),{seriesId:this.series().id});this.seriesService.matchSeries(i).pipe(xd$1(n=>{this.isLoading.set(!1),this.hasSearched.set(!0),this.matches.set(n.matches),this.resultProvider.set(n.provider),this.formGroup.controls.provider.setValue(n.provider,{emitEvent:!1}),this.autoSelectExistingMatch(n.matches)}),ua$2(()=>(this.isLoading.set(!1),this.hasSearched.set(!0),la$2(null)))).subscribe()}autoSelectExistingMatch(e){if(this.selectedItem())return;let i=this.matchInfo();if(!i||!i.hasMatch)return;let n=e.find(k=>this.isExistingMatch(k,i));if(!n)return;this.selectedItem.set(n);let r=i.mangaBakaEditionId||this.series().mangaBakaEditionId;if(r){let k=n.series.editions.find(T=>T.id===r)??null;this.selectedEdition.set(k)}}isExistingMatch(e,i){let n=e.series;if(i.isLegacy)return!!i.aniListId&&n.aniListId===i.aniListId;switch(i.metadataProvider){case Ke.Mangabaka:return!!i.mangaBakaId&&n.mangabakaId===i.mangaBakaId;case Ke.ComicBookRoundup:return!!i.cbrId&&n.cbrId===i.cbrId;case Ke.Hardcover:return!!i.hardcoverId&&n.hardcoverId===i.hardcoverId;default:return!1}}clearQuery(){this.formGroup.get(`query`)?.setValue(``)}matchKey(e){return`${e.series.provider}_${e.series.mangabakaId}_${e.series.hardcoverId}_${e.series.cbrId}_${e.series.aniListId}_${e.series.malId}`}findDefaultEdition(e){return e.series.editions?.find(i=>i.title?.trim().toLowerCase().endsWith(`standard edition`)&&i.format?.trim().toLowerCase()===`digital`)??null}selectRow(e){let i=this.selectedItem();i&&this.matchKey(i)===this.matchKey(e)||(this.selectedItem.set(e),this.selectedEdition.set(this.findDefaultEdition(e)))}selectEdition(e,i){let n=this.selectedItem();if(!!n&&this.matchKey(n)===this.matchKey(e)&&this.selectedEdition()?.id===i.id){this.selectedEdition.set(null);return}this.selectedItem.set(e),this.selectedEdition.set(i)}close(){this.modalService.dismiss()}applyMatch(){let e=this.selectedItem();if(!e)return;let i=e.series;i.tags=i.tags||[],i.genres=i.genres||[],this.seriesService.updateMatch(this.series().id,i,this.selectedEdition(),this.resultProvider()).subscribe(()=>{this.modalService.close(!0)})}saveDontMatch(){this.seriesService.updateDontMatch(this.series().id,!0).subscribe(()=>{this.modalService.close(!0)})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-match-series-modal`]],inputs:{series:[1,`series`]},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[`id`,`modal-basic-title`,1,`modal-title`],[1,`match-title-prefix`],[`type`,`button`,1,`btn-close`,3,`click`],[1,`modal-body`,`scrollable-modal`,`d-flex`,`flex-column`,`gap-0`],[1,`match-subheader`,`d-flex`,`align-items-center`,`flex-wrap`,`gap-3`,`pt-1`],[1,`match-description`,`flex-fill`],[1,`mb-1`],[1,`mb-0`,`text-muted`,`small`],[1,`in-kavita-chip`,`d-flex`,`flex-column`,`flex-shrink-0`,`gap-2`],[1,`d-flex`,`align-items-center`,`gap-2`],[`width`,`32px`,`height`,`46px`,3,`imageUrl`],[1,`d-flex`,`flex-column`,`gap-0`],[1,`in-kavita-label`,`text-uppercase`],[1,`in-kavita-name`,`fw-bold`],[1,`in-kavita-meta`,`text-muted`,`small`],[3,`format`,`useTitle`],[1,`provider-card`,`d-flex`,`align-items-center`,`gap-3`,`p-3`,`rounded-2`,`border`],[1,`py-3`,3,`formGroup`],[1,`d-flex`,`align-items-stretch`,`gap-2`],[1,`d-flex`,`align-items-center`,`position-relative`,`flex-fill`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-magnifying-glass`,`query-icon`],[`for`,`search-query`,1,`visually-hidden`],[`id`,`search-query`,`formControlName`,`query`,1,`form-control`,`query-input`,3,`keydown.enter`],[`type`,`button`,1,`query-clear`,`btn-close`,`btn-close-white`,`btn-sm`],[`type`,`button`,1,`btn`,`btn-primary`,3,`click`,`disabled`],[`role`,`status`,1,`spinner-border`,`spinner-border-sm`],[1,`d-flex`,`align-items-center`,`justify-content-between`,`flex-wrap`,`gap-2`,`mt-2`],[1,`provider-hints`,`d-flex`,`align-items-center`,`flex-wrap`,`gap-1`],[1,`text-muted`],[1,`provider-hint`],[1,`form-check`,`form-switch`,`mb-0`],[`type`,`checkbox`,`formControlName`,`dontMatch`,`id`,`dont-match`,`role`,`switch`,1,`form-check-input`],[`for`,`dont-match`,1,`form-check-label`,3,`ngbTooltip`],[1,`match-count-bar`],[1,`match-body`],[1,`d-flex`,`justify-content-center`,`align-items-center`,`py-5`],[3,`titleKey`,`descriptionKey`,`i18nPrefix`],[3,`isError`,`titleKey`,`descriptionKey`,`descriptionParams`,`i18nPrefix`],[1,`modal-footer`],[1,`d-flex`,`w-100`,`align-items-center`,`gap-2`],[`rel`,`noreferrer noopener`,`target`,`_blank`,1,`btn`,`btn-link`,`phone-hidden`,3,`href`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-arrow-up-right-from-square`],[`rel`,`noreferrer noopener`,`target`,`_blank`,`href`,`https://anilist.co/`,1,`btn`,`btn-link`,`phone-hidden`],[1,`ms-auto`,`d-flex`,`gap-2`],[`type`,`button`,1,`btn`,`btn-secondary`,3,`click`],[`type`,`button`,1,`btn`,`btn-primary`,3,`disabled`],[1,`setting-section-break`,`m-0`],[1,`matched-to`,`text-muted`,`d-flex`,`align-items-center`,`gap-2`],[3,`provider`,`id`],[3,`provider`,`id`,`isStandAlone`],[1,`provider-logo`,`flex-shrink-0`,`rounded-2`,`d-flex`,`align-items-center`,`justify-content-center`,`phone-hidden`],[`aria-hidden`,`true`,1,`fas`,`fa-database`],[1,`flex-grow-1`,`min-w-0`,3,`formGroup`],[1,`d-flex`,`align-items-center`,`gap-2`,`flex-wrap`],[1,`fw-semibold`,`small`,`text-truncate`],[1,`small`,`text-muted`,`mb-1`],[`formControlName`,`provider`,1,`form-select`,`form-select-sm`,`w-auto`],[3,`ngValue`],[3,`formGroup`],[`type`,`checkbox`,`formControlName`,`isStandAlone`,`id`,`is-standalone`,`role`,`switch`,1,`form-check-input`],[`for`,`is-standalone`,1,`form-check-label`],[1,`fa`,`fa-info-circle`,3,`ngbTooltip`],[`type`,`button`,1,`query-clear`,`btn-close`,`btn-close-white`,`btn-sm`,3,`click`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-magnifying-glass`],[1,`phone-hidden`],[`role`,`status`,1,`spinner-border`,`text-primary`],[`icon`,``,`aria-hidden`,`true`,1,`fa-solid`,`fa-magnifying-glass`],[`icon`,``,`aria-hidden`,`true`,1,`fa-solid`,`fa-ban`],[`icon`,``,`aria-hidden`,`true`,1,`fa-solid`,`fa-magnifying-glass-minus`],[3,`item`,`selectedEditionId`,`isSelected`,`showSynonyms`,`query`],[3,`selected`,`editionSelected`,`item`,`selectedEditionId`,`isSelected`,`showSynonyms`,`query`]],template:function(i,n){i&1&&Dm$1(0,qr$1,85,33,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`match-series-modal`)},dependencies:[li$1,ii$2,ri$1,oi$1,Qe$5,It$1,Et$1,ei$1,ti$1,fn$1,wn,Ct$3,Y$4,O,_o$1,yt$2,Hi,go$1,ui,Wi],styles:[`.match-title-prefix[_ngcontent-%COMP%]{opacity:.55;font-weight:500}.match-subheader[_ngcontent-%COMP%]{padding:.875rem 0 .75rem;border-bottom:1px solid var(--%NS%hr-color)}.match-description[_ngcontent-%COMP%]{color:var(--%NS%text-muted-color);line-height:1.5}.in-kavita-chip[_ngcontent-%COMP%]{padding:.375rem .625rem .375rem .375rem;background:#ffffff0a;border:1px solid var(--%NS%hr-color);border-radius:.375rem}@media(max-width:768px){.match-subheader[_ngcontent-%COMP%]{justify-content:center}.in-kavita-chip[_ngcontent-%COMP%]{align-items:center}}.in-kavita-label[_ngcontent-%COMP%]{font-size:.65625rem;color:var(--%NS%text-muted-color);letter-spacing:.06em;line-height:1.2}
43.in-kavita-name[_ngcontent-%COMP%]{font-size:.875rem;color:var(--%NS%body-text-color);line-height:1.2}.query-icon[_ngcontent-%COMP%]{position:absolute;left:.75rem;color:var(--%NS%text-muted-color);font-size:.8125rem;pointer-events:none}.query-input[_ngcontent-%COMP%]{padding-left:2.25rem;padding-right:2.25rem}.query-clear[_ngcontent-%COMP%]{position:absolute;right:.5rem;bottom:.6rem;opacity:.5}.query-clear[_ngcontent-%COMP%]:hover{opacity:1}.provider-hints[_ngcontent-%COMP%]{font-size:.75rem;color:var(--%NS%text-muted-color)}.provider-hint[_ngcontent-%COMP%]{padding:.125rem .4375rem;border-radius:.25rem;background:#ffffff0f;border:1px solid rgba(255,255,255,.08);color:var(--%NS%text-muted-color);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.6875rem}.match-count-bar[_ngcontent-%COMP%]{font-size:.71875rem;color:var(--%NS%text-muted-color);text-transform:uppercase;letter-spacing:.07em;font-weight:600;padding:.5rem 0 .25rem}.match-body[_ngcontent-%COMP%]{flex:1;padding-bottom:.5rem}.provider-banner[_ngcontent-%COMP%]{width:100%;height:4.0625rem;background:var(--%NS%elevation-layer2);border-left-width:.1875rem!important;border-color:var(--%NS%provider-card-border-color)!important}.provider-logo[_ngcontent-%COMP%]{width:2.75rem;height:2.75rem}
44/*# sourceMappingURL=match-series-modal.component-5KBAAD3Y.css.map */`]})}}return t})();var Gr$1=[`listItemTemplate`];var fo$1=(t,a)=>a.id;function zr$1(t,a){if(t&1&&(xu(0),Hm$1(1,`app-list-select-modal`,2),Gs$1()),t&2){let e=a.$implicit,i=i_$1();xb(),Vm$1(`title`,e(`title`))(`inputItems`,i.listItems())(`preSelectedItems`,i.preSelectedListItems())(`loading`,i.loading())(`selectedText`,e(`bound`))(`multiSelect`,!0)(`hideItemsWhenInvalid`,!0)(`interceptConfirm`,i.addToProfile.bind(i))(`isSelectionValidFunc`,i.validSelection.bind(i))(`isValidItemFunc`,i.validItem.bind(i))(`invalidSelectionWarning`,e(`warning-duplicate`))(`itemTemplate`,i.itemTemplate())}}function jr$1(t,a){if(t&1&&(bs$1(0,`span`,8),j_$1(1),Mu()),t&2){let e=i_$1().$implicit;xb(),Ly(e(`bound`))}}function Hr$1(t,a){if(t&1&&(bs$1(0,`div`,6)(1,`div`,7),j_$1(2),rM(3,`sentenceCase`),Mu(),DC(4,jr$1,2,1,`span`,8),Mu()),t&2){let e=i_$1(),i=e.$implicit,n=e.selectedItems;xb(2),Ly(iM(3,2,i.label)),xb(2),bC(n&&n.includes(i)?4:-1)}}function Yr$1(t,a){t&1&&(bs$1(0,`span`),j_$1(1,`, `),Mu())}function Kr$1(t,a){if(t&1&&(bs$1(0,`span`),j_$1(1),Mu(),DC(2,Yr$1,2,0,`span`)),t&2){let e=a.$implicit,i=a.$index,n=a.$count;xb(),Ly(e.friendlyName),xb(),bC(i!==n-1?2:-1)}}function Qr$1(t,a){if(t&1&&CC(0,Kr$1,3,2,null,null,fo$1),t&2){i_$1();_C($_$1(2))}}function Jr$1(t,a){t&1&&(bs$1(0,`span`),j_$1(1,`, `),Mu())}function Zr$1(t,a){if(t&1&&(bs$1(0,`span`),j_$1(1),Mu(),DC(2,Jr$1,2,0,`span`)),t&2){let e=a.$implicit,i=a.$index,n=a.$count;xb(),Ly(e.friendlyName),xb(),bC(i!==n-1?2:-1)}}function Xr$1(t,a){if(t&1&&(CC(0,Zr$1,3,2,null,null,fo$1),bs$1(2,`span`),j_$1(3,`, …`),Mu()),t&2){i_$1();_C($_$1(2).slice(0,3))}}function el$1(t,a){if(t&1&&(bs$1(0,`div`,3),Dm$1(1,Hr$1,5,4,`div`,4),By(2),bs$1(3,`div`,5),DC(4,Qr$1,2,0)(5,Xr$1,4,0),Mu()()),t&2){let e=a.$implicit;xb(),Vm$1(`translocoPrefix`,`bulk-set-reading-profile-modal`),xb();let i=B_$1(i_$1().profileDevice(e.value));xb(2),bC(i.length<=3?4:5)}}var Ki=(()=>{class t{constructor(){this.modal=E$2(F$6),this.readingProfileService=E$2(b$3),this.toastr=E$2(Bt$3),this.deviceService=E$2(_),this.itemTemplate=_B.required(`listItemTemplate`),this.seriesIds=TB([]),this.libraryId=TB(),this.profiles=be$3([]),this.currentlyBoundProfiles=be$3([]),this.devices=be$3([]),this.loading=be$3(!0),this.profileMap=it$3(()=>new Map(this.profiles().map(e=>[e.id,e]))),this.listItems=it$3(()=>this.profiles().map(e=>({label:e.name,value:e.id}))),this.preSelectedListItems=it$3(()=>this.currentlyBoundProfiles().map(e=>e.id))}ngOnInit(){let e=this.seriesIds(),i=this.libraryId();i!==void 0?this.readingProfileService.getForLibrary(i).subscribe(n=>{this.currentlyBoundProfiles.set(n)}):e.length===1&&this.readingProfileService.getAllForSeries(e[0]).subscribe(n=>{this.currentlyBoundProfiles.set(n)}),Wv([this.readingProfileService.getAllProfiles(),this.deviceService.getMyClientDevices()]).subscribe(([n,r])=>{this.loading.set(!1),this.profiles.set(n),this.devices.set(r)})}profileDevice(e){let i=this.profileMap().get(e);return this.devices().filter(n=>
44i.deviceIds.includes(n.id))}validItem(e,i){let n=this.profileMap().get(e),r=i.map(T=>this.profileMap().get(T)),k=new Set(r.flatMap(T=>T.deviceIds));return!n.deviceIds.some(T=>k.has(T))}validSelection(e){let i=(Array.isArray(e)?e:[e]).map(r=>this.profileMap().get(r)),n=new Set;for(let r of i)for(let k of r.deviceIds){if(n.has(k))return!1;n.add(k)}return!0}addToProfile(e){e=Array.isArray(e)?e:[e];let i=this.seriesIds(),n=this.libraryId();if(i.length==1){this.readingProfileService.addToSeries(e,i[0]).subscribe(()=>{this.toastr.success(Mt$4(`toasts.series-bound-to-reading-profile`,{amount:e.length})),this.modal.close()});return}if(i.length>1){this.readingProfileService.bulkAddToSeries(e,i).subscribe(()=>{this.toastr.success(Mt$4(`toasts.series-bound-to-reading-profile`,{amount:e.length})),this.modal.close()});return}n&&this.readingProfileService.addToLibrary(e,n).subscribe(()=>{this.toastr.success(Mt$4(`toasts.library-bound-to-reading-profile`,{amount:e.length})),this.modal.close()})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-bulk-set-reading-profile-modal`]],viewQuery:function(i,n){i&1&&vy(n.itemTemplate,Gr$1,5),i&2&&f_$1()},inputs:{seriesIds:[1,`seriesIds`],libraryId:[1,`libraryId`]},decls:3,vars:1,consts:[[`listItemTemplate`,``],[4,`transloco`,`translocoPrefix`],[`hiddenTranslationKey`,`bulk-set-reading-profile-modal.hidden`,3,`title`,`inputItems`,`preSelectedItems`,`loading`,`selectedText`,`multiSelect`,`hideItemsWhenInvalid`,`interceptConfirm`,`isSelectionValidFunc`,`isValidItemFunc`,`invalidSelectionWarning`,`itemTemplate`],[1,`d-flex`,`flex-column`,`flex-grow-1`],[`class`,`d-flex flex-row justify-content-between`,4,`transloco`,`translocoPrefix`],[1,`mt-1`,`text-muted`,`small`],[1,`d-flex`,`flex-row`,`justify-content-between`],[1,`fw-bold`],[1,`pill`,`p-1`,`ms-1`]],template:function(i,n){i&1&&Dm$1(0,zr$1,2,12,`ng-container`,1)(1,el$1,6,3,`ng-template`,null,0,lM),i&2&&Vm$1(`translocoPrefix`,`bulk-set-reading-profile-modal`)},dependencies:[li$1,Ct$3,lt$5,s$4],styles:[`.clickable[_ngcontent-%COMP%]:hover, .clickable[_ngcontent-%COMP%]:focus{background-color:var(--%NS%list-group-hover-bg-color, var(--%NS%primary-color))}.pill[_ngcontent-%COMP%]{font-size:.8rem;background-color:var(--%NS%card-bg-color);border-radius:.375rem;color:var(--%NS%badge-text-color)}.pill.active[_ngcontent-%COMP%]{background-color:var(--%NS%primary-color)}
45/*# sourceMappingURL=bulk-set-reading-profile-modal.component-NDOFPXVN.css.map */`],changeDetection:1})}}return t})();var D=(function(t){return t[t.Prequel=1]=`Prequel`,t[t.Sequel=2]=`Sequel`,t[t.SpinOff=3]=`SpinOff`,t[t.Adaptation=4]=`Adaptation`,t[t.SideStory=5]=`SideStory`,t[t.Character=6]=`Character`,t[t.Contains=7]=`Contains`,t[t.Other=8]=`Other`,t[t.AlternativeSetting=9]=`AlternativeSetting`,t[t.AlternativeVersion=10]=`AlternativeVersion`,t[t.Doujinshi=11]=`Doujinshi`,t[t.Parent=12]=`Parent`,t[t.Edition=13]=`Edition`,t[t.Annual=14]=`Annual`,t[t.Cameo=16]=`Cameo`,t})(D||{});var Co$1=[{text:`Prequel`,value:D.Prequel},{text:`Sequel`,value:D.Sequel},{text:`Spin Off`,value:D.SpinOff},{text:`Adaptation`,value:D.Adaptation},{text:`Annual`,value:D.Annual},{text:`Alternative Setting`,value:D.AlternativeSetting},{text:`Alternative Version`,value:D.AlternativeVersion},{text:`Side Story`,value:D.SideStory},{text:`Character`,value:D.Character},{text:`Contains`,value:D.Contains},{text:`Edition`,value:D.Edition},{text:`Doujinshi`,value:D.Doujinshi},{text:`Other`,value:D.Other},{text:`Cameo`,value:D.Cameo}].slice().sort((t,a)=>t.text.localeCompare(a.text));var xo$1=(()=>{class t{constructor(){this.translocoService=E$2(De$3)}transform(e){if(e===void 0)return``;switch(e){case D.Adaptation:return this.translocoService.translate(`relationship-pipe.adaptation`);case D.AlternativeSetting:return this.translocoService.translate(`relationship-pipe.alternative-setting`);case D.AlternativeVersion:return this.translocoService.translate(`relationship-pipe.alternative-version`);case D.Character:return this.translocoService.translate(`relationship-pipe.character`);case D.Contains:return this.translocoService.translate(`relationship-pipe.contains`);case D.Doujinshi:return this.translocoService.translate(`relationship-pipe.doujinshi`);case D.Other:return this.translocoService.translate(`relationship-pipe.other`);case D.Prequel:return this.translocoService.translate(`relationship-pipe.prequel`);case D.Sequel:return this.translocoService.translate(`relationship-pipe.sequel`);case D.SideStory:return this.translocoService.translate(`relationship-pipe.side-story`);case D.SpinOff:return this.translocoService.translate(`relationship-pipe.spin-off`);case D.Parent:return this.translocoService.translate(`relationship-pipe.parent`);case D.Edition:return this.translocoService.translate(`relationship-pipe.edition`);case D.Annual:return this.translocoService.translate(`relationship-pipe.annual`);case D.Cameo:return this.translocoService.translate(`relationship-pipe.cameo`);default:return``}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`relationship`,type:t,pure:!0})}}return t})();var il$1=(t,a)=>a.id;function nl$1(t,a){if(t&1&&(bs$1(0,`div`,5)(1,`label`,8),j_$1(2),Mu(),bs$1(3,`label`,9),j_$1(4),Mu()()),t&2){let e=i_$1().$implicit;xb(2),Ly(e(`target-series`)),xb(2),Ly(e(`relationship`))}}function ol$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit,i=i_$1(3);Py(` `,e.name,` (`,i.libraryNames()[e.libraryId],`) `)}}function al$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1().$implicit;Ou(` `,e.name,` `)}}function rl$1(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1().$implicit;Ou(` `,e.localizedName,` `)}}function ll$1(t,a){if(t&1&&(DC(0,al$1,1,1)(1,rl$1,1,1),j_$1(2)),t&2){let e=a.$implicit,i=a.value,n=i_$1(3);bC(e.name.toLowerCase().trim().indexOf(i.toLowerCase().trim())>=0?0:1),xb(2),Ou(` (`,n.libraryNames()[e.libraryId],`) `)}}function sl$1(t,a){if(t&1&&(bs$1(0,`option`,15),j_$1(1),rM(2,`relationship`),Mu()),t&2){let e=a.$implicit;Vm$1(`value`,e.value),xb(),Ly(iM(2,2,e.value))}}function cl$1(t,a){if(t&1){let e=AC();
45bs$1(0,`div`,5)(1,`div`,10)(2,`app-typeahead`,11),fy(`selectedData`,function(n){let r=_f(e).$implicit;return Mf(i_$1(2).updateSeries(n,r))}),Dm$1(3,ol$1,1,2,`ng-template`,null,0,lM)(5,ll$1,3,2,`ng-template`,null,1,lM),Mu()(),bs$1(7,`div`,12)(8,`select`,13)(9,`option`,14),j_$1(10),Mu(),CC(11,sl$1,3,4,`option`,15,TC),Mu(),Sw(),Mu(),bs$1(13,`button`,16),fy(`click`,function(){let n=_f(e).$index;return Mf(i_$1(2).removeRelation(n))}),Hm$1(14,`i`,17),bs$1(15,`span`,18),j_$1(16),Mu()()()}if(t&2){let e=a.$implicit,i=a.$index,n=i_$1().$implicit,r=i_$1();xb(2),Vm$1(`id`,q_$1(`relation--`,i))(`settings`,e.typeaheadSettings)(`focus`,r.focusTypeahead),xb(6),Vm$1(`formControl`,e.formControl),Aw(),xb(),Vm$1(`value`,r.RelationKind.Parent),xb(),Ly(n(`parent`)),xb(),_C(r.relationOptions),xb(5),Ly(n(`remove`))}}function dl$1(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,3)(2,`p`),j_$1(3),bs$1(4,`a`,4),j_$1(5),Mu()(),DC(6,nl$1,5,2,`div`,5),bs$1(7,`form`),CC(8,cl$1,17,8,`div`,5,il$1),Mu(),bs$1(10,`div`,6)(11,`button`,7),fy(`click`,function(){_f(e);return Mf(i_$1().addNewRelation())}),j_$1(12),Mu()()(),Gs$1()}if(t&2){let e=a.$implicit,i=i_$1();xb(3),Ou(` `,e(`description-part-1`),` `),xb(),Vm$1(`href`,i.WikiLink.SeriesRelationships,qh),xb(),Ly(e(`description-part-2`)),xb(),bC(i.relations().length>0?6:-1),xb(2),_C(i.relations()),xb(4),Ly(e(`add-relationship`))}}var vo$1=(()=>{class t{constructor(){this.destroyRef=E$2(te$5),this.seriesService=E$2(N$2),this.libraryService=E$2(S$5),this.typeaheadSettingsFactory=E$2(jn$1),this.imageService=E$2(we$3),this.series=TB.required(),this.save=TB(new ht$3),this.saveApi=wB(),this.relationOptions=Co$1,this.relations=be$3([]),this.libraryNames=be$3({}),this.focusTypeahead=new ht$3,this.idCount=0,this.RelationKind=D,this.WikiLink=e$3}ngOnInit(){this.seriesService.getRelatedForSeries(this.series().id).subscribe(e=>{this.setupRelationRows(e.prequels,D.Prequel),this.setupRelationRows(e.sequels,D.Sequel),this.setupRelationRows(e.sideStories,D.SideStory),this.setupRelationRows(e.spinOffs,D.SpinOff),this.setupRelationRows(e.adaptations,D.Adaptation),this.setupRelationRows(e.others,D.Other),this.setupRelationRows(e.characters,D.Character),this.setupRelationRows(e.alternativeSettings,D.AlternativeSetting),this.setupRelationRows(e.alternativeVersions,D.AlternativeVersion),this.setupRelationRows(e.doujinshis,D.Doujinshi),this.setupRelationRows(e.contains,D.Contains),this.setupRelationRows(e.parent,D.Parent),this.setupRelationRows(e.editions,D.Edition),this.setupRelationRows(e.annuals,D.Annual),this.setupRelationRows(e.cameos,D.Cameo)}),this.libraryService.getLibraryNames().subscribe(e=>{this.libraryNames.set(e)}),this.save().pipe(JB(this.destroyRef)).subscribe(()=>this.saveState())}setupRelationRows(e,i){for(let n=0;n<e.length;n++){let r=e[n],k=this.createSeriesTypeahead(r,n),T=new Z$2(i,[]);i===D.Parent&&T.disable();let E={series:r,typeaheadSettings:k,formControl:T,id:this.idCount++};this.relations.set([...this.relations(),E])}}addNewRelation(){return D$5(this,null,function*(){this.relations.set([...this.relations(),{series:void 0,formControl:new Z$2(D.Adaptation,[]),typeaheadSettings:this.createSeriesTypeahead(void 0,this.relations().length),id:this.idCount++}]),setTimeout(()=>{this.focusTypeahead.emit(`relation--${this.relations().length-1}`)},10)})}removeRelation(e){let i=this.relations();i.splice(e,1),this.relations.set([...i])}updateSeries(e,i){if(e[0]===void 0){i.series=void 0;return}i.series={id:e[0].seriesId,name:e[0].name}}createSeriesTypeahead(e,i){let n=e?{name:e.name,libraryId:e.libraryId,libraryName:e.localizedName,seriesId:e.id,format:e.format,localizedName:e.localizedName,originalName:e.originalName,sortName:e.sortName}:void 0;return this.typeaheadSettingsFactory.forSearchResult({id:`relation--${i}`,excludeSeriesId:this.series().id,savedData:n,overrides:{minCharacters:0}})}saveState(){let e=i=>this.getSeriesIdsForRelation(i);this.seriesService.updateRelationships(this.series().id,e(D.Adaptation),e(D.Character),e(D.Contains),e(D.Other),e(D.Prequel),e(D.Sequel),e(D.SideStory),e(D.SpinOff),e(D.AlternativeSetting),e(D.AlternativeVersion),e(D.Doujinshi),e(D.Edition),e(D.Annual),e(D.Cameo)).subscribe(()=>{})}getSeriesIdsForRelation(e){return this.relations().filter(i=>parseInt(i.formControl.value,10)===e&&i.series!==void 0).map(i=>i.series.id)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-series-relation`]],inputs:{series:[1,`series`],save:[1,`save`]},outputs:{saveApi:`saveApi`},decls:1,vars:1,consts:[[`badgeItem`,``],[`optionItem`,``],[4,`transloco`,`translocoPrefix`],[1,`container-fluid`],[`target`,`_blank`,`rel`,`noopener noreferrer`,`referrerpolicy`,`no-referrer`,3,`href`],[1,`row`],[1,`row`,`g-0`,`mt-3`,`mb-3`],[1,`btn`,`btn-outline-secondary`,`col-md-12`,3,`click`],[1,`form-label`,`col-md-7`],[1,`form-label`,`col-md-5`],[1,`col-sm-12`,`col-md-12`,`col-lg-7`,`mb-3`],[3,`selectedData`,`settings`,`id`,`focus`],[1,`col-sm-12`,`col-md-10`,`col-lg-3`,`mb-3`],[1,`form-select`,3,`formControl`],[`disabled`,``,3,`value`],[3,`value`],[1,`col-sm-auto`,`col-md-2`,`mb-3`,`btn`,`btn-outline-secondary`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-trash`],[1,`visually-hidden`]],template:function(i,n){i&1&&Dm$1(0,dl$1,13,5,`ng-container`,2),i&2&&Vm$1(`translocoPrefix`,`edit-series-relation`)},dependencies:[us$1,li$1,ii$2,ri$1,oi$1,Et$1,ei$1,ti$1,An$1,Dt$2,Ct$3,xo$1],encapsulation:2})}}return t})();var Ut=(()=>{class t{constructor(){this.id=TB.required({alias:`appEditTab`}),this.template=E$2(mo$2)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵdir=DT({type:t,selectors:[[``,`appEditTab`,``]],inputs:{id:[1,`appEditTab`,`id`]}})}}return t})();var pl$1=[`title`];var ml$1=(t,a)=>a.id();
45function _l$1(t,a){if(t&1&&Um$1(0,5),t&2)Vm$1(`ngTemplateOutlet`,i_$1(2).titleTemplate())}function ul$1(t,a){if(t&1&&j_$1(0),t&2)Ou(` `,i_$1(2).modalTitle(),` `)}function gl$1(t,a){if(t&1&&Um$1(0,5),t&2){let e=i_$1().$implicit;Vm$1(`ngTemplateOutlet`,e.template)}}function hl$1(t,a){if(t&1){let e=AC();bs$1(0,`li`,10)(1,`a`,15),fy(`click`,function(n){let r=_f(e).$implicit;return Mf(i_$1(2).onTabChange(r.id(),n))}),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,gl$1,1,1,`ng-template`,16),Mu()}if(t&2){let e=a.$implicit;Vm$1(`ngbNavItem`,e.id()),xb(2),Ly(iM(3,2,e.id()))}}function fl$1(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,2)(2,`div`,3)(3,`h4`,4),DC(4,_l$1,1,1,`ng-container`,5)(5,ul$1,1,1),Mu(),bs$1(6,`button`,6),fy(`click`,function(){_f(e);return Mf(i_$1().close.emit())}),Mu()(),bs$1(7,`div`,7)(8,`form`,8)(9,`ul`,9,0),CC(11,hl$1,5,4,`li`,10,ml$1),Mu(),Hm$1(13,`div`,11),Mu()(),bs$1(14,`div`,12)(15,`button`,13),fy(`click`,function(){_f(e);return Mf(i_$1().close.emit())}),j_$1(16),Mu(),bs$1(17,`button`,14),fy(`click`,function(){_f(e);return Mf(i_$1().save.emit())}),j_$1(18),Mu()()(),Gs$1()}if(t&2){let e=a.$implicit,i=p_$1(10),n=i_$1();xb(4),bC(n.titleTemplate()!==void 0?4:5),xb(2),jm$1(`aria-label`,e(`close`)),xb(),Ty(`d-flex`,!n.isMobile()),xb(),Ty(`flex-column`,n.isMobile()),Vm$1(`formGroup`,n.formGroup()),xb(),Vm$1(`activeId`,n.activeTabId())(`orientation`,n.isMobile()?`horizontal`:`vertical`),xb(2),_C(n.tabs()),xb(2),Ty(`mt-3`,n.isMobile())(`ms-4`,!n.isMobile()),Vm$1(`ngbNavOutlet`,i),xb(3),Ly(e(`close`)),xb(),Vm$1(`disabled`,!n.formGroup().valid),xb(),Ly(e(`save`))}}var gi=(()=>{class t{constructor(){this.breakpointService=E$2(W$1),this.translocoPrefix=TB.required(),this.modalTitle=TB.required({alias:`title`}),this.formGroup=TB.required(),this.activeTabId=CB(),this.save=wB(),this.close=wB(),this.tabSwitch=wB(),this.tabs=SB(Ut),this.titleTemplate=NB(`title`),this.isMobile=this.breakpointService.isMobile}onTabChange(e,i){i&&i.preventDefault(),this.activeTabId()!==e&&(this.activeTabId.set(e),this.tabSwitch.emit(e))}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-modal-shell`]],contentQueries:function(i,n,r){i&1&&yy(r,n.tabs,Ut,4)(r,n.titleTemplate,pl$1,5),i&2&&f_$1(2)},inputs:{translocoPrefix:[1,`translocoPrefix`],modalTitle:[1,`title`,`modalTitle`],formGroup:[1,`formGroup`],activeTabId:[1,`activeTabId`]},outputs:{activeTabId:`activeTabIdChange`,save:`save`,close:`close`,tabSwitch:`tabSwitch`},decls:1,vars:1,consts:[[`nav`,`ngbNav`],[4,`transloco`,`translocoPrefix`],[1,`modal-container`],[1,`modal-header`],[1,`modal-title`],[3,`ngTemplateOutlet`],[`type`,`button`,1,`btn-close`,3,`click`],[1,`modal-body`,`scrollable-modal`],[1,`w-100`,`d-flex`,3,`formGroup`],[`ngbNav`,``,1,`nav-pills`,2,`min-width`,`8.4375rem`,3,`activeId`,`orientation`],[3,`ngbNavItem`],[1,`tab-content`,`flex-fill`,3,`ngbNavOutlet`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-secondary`,3,`click`],[`type`,`submit`,1,`btn`,`btn-primary`,3,`click`,`disabled`],[`ngbNavLink`,``,3,`click`],[`ngbNavContent`,``]],template:function(i,n){i&1&&Dm$1(0,fl$1,19,17,`ng-container`,1),i&2&&Vm$1(`translocoPrefix`,n.translocoPrefix())},dependencies:[Ke$1,cn,ne,D$1,li$1,ii$2,ti$1,fn$1,ue$2,Ve,Ct$3,qe],encapsulation:2})}}return t})();var Cl$1=t=>({seriesName:t});var xl$1=t=>({item:t,field:`nameLocked`});var vl$1=t=>({item:t,field:`sortNameLocked`});var bl$1=t=>({item:t,field:`localizedNameLocked`});var Sl$1=t=>({item:t,field:`summaryLocked`});var yl$1=(t,a,e)=>({pattern:t,minlength:a,maxlength:e});var kl$1=t=>({item:t,field:`releaseYearLocked`});var El$1=t=>({item:t,field:`ageRatingLocked`});var wl$1=t=>({item:t,field:`publicationStatusLocked`});var Tl$1=(t,a)=>a.title;var Ml$1=(t,a)=>a.value;var bo$1=(t,a)=>a.id;var Il$1=(t,a)=>a.action;function Rl$1(t,a){if(t&1&&(bs$1(0,`div`),Um$1(1,14),Hm$1(2,`input`,15),Sw(),Mu()),t&2){let e=i_$1();i_$1(3);let i=p_$1(11),n=i_$1();N_$1(q_$1(`input-group `,n.series.nameLocked?`lock-active`:``)),xb(),Vm$1(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,J_$1(6,xl$1,n.series)),xb(),Vm$1(`appFormField`,e),Aw()}}function Vl$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,11),Dm$1(1,Rl$1,3,8,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`name-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`control`,a)}}function Ll$1(t,a){if(t&1&&(bs$1(0,`div`),Um$1(1,14),Hm$1(2,`input`,16),Sw(),Mu()),t&2){let e=i_$1();i_$1(3);let i=p_$1(11),n=i_$1();N_$1(q_$1(`input-group `,n.series.sortNameLocked?`lock-active`:``)),xb(),Vm$1(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,J_$1(6,vl$1,n.series)),xb(),Vm$1(`appFormField`,e),Aw()}}function Fl$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,12),Dm$1(1,Ll$1,3,8,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`sort-name-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`control`,a)}}function Pl$1(t,a){if(t&1&&(bs$1(0,`div`),Um$1(1,14),Hm$1(2,`input`,17),Sw(),Mu()),t&2){let e=i_$1();i_$1(3);let i=p_$1(11),n=i_$1();N_$1(q_$1(`input-group `,n.series.localizedNameLocked?`lock-active`:``)),xb(),Vm$1(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,J_$1(6,bl$1,n.series)),xb(),Vm$1(`appFormField`,e),Aw()}}function Al$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,13),Dm$1(1,Pl$1,3,8,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`localized-name-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`control`,a)}}function Nl$1(t,a){if(t&1&&(bs$1(0,`div`),Um$1(1,14),Hm$1(2,`textarea`,19),Sw(),Mu()),t&2){i_$1(4);let e=p_$1(11),i=i_$1();N_$1(q_$1(`input-group `,i.metadata.summaryLocked?`lock-active`:``)),xb(),Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,J_$1(5,Sl$1,i.metadata)),xb(),Aw()}}function Dl$1(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,10)(2,`app-setting-item`,18),Dm$1(3,Nl$1,3,7,`ng-template`,null,1,lM),Mu()()()),t&2){let e=i_$1(3).$implicit;xb(2),Vm$1(`title`,e(`summary-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Ol$1(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,10),DC(2,Vl$1,3,4,`app-setting-item`,11),Mu()(),bs$1(3,`div`,9)(4,`div`,10),DC(5,Fl$1,3,4,`app-setting-item`,12),Mu()(),bs$1(6,`div`,9)(7,`div`,10),DC(8,Al$1,3,4,`app-setting-item`,13),Mu()(),DC(9,Dl$1,5,3,`div`,9)),t&2){let e,i,n,r=i_$1(3);xb(2),bC((e=r.editSeriesForm.get(`name`))?2:-1,e),xb(3),bC((i=r.editSeriesForm.get(`sortName`))?5:-1,i),xb(3),bC((n=r.editSeriesForm.get(`localizedName`))?8:-1,n),xb(),bC(r.metadata?9:-1)}}function $l$1(t,a){if(t&1&&Dm$1(0,Ol$1,10,4,`ng-template`,8),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.General)}function Ul$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Bl$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Py(` `,e.title,` (`,e.isoCode,`) `)}}function Wl$1(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updateLanguage(n),Mf(r.metadata.languageLocked=!0)}
45),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.languageLocked,n)||(r.metadata.languageLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.languageLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.languageLocked=!0)}),Dm$1(1,Ul$1,1,1,`ng-template`,null,2,lM)(3,Bl$1,1,2,`ng-template`,null,3,lM),Mu()}if(t&2){i_$1(2);let e=$_$1(3),i=i_$1(3);Vm$1(`settings`,e),jy(`locked`,i.metadata.languageLocked)}}function ql$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Wl$1,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`language-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Gl$1(t,a){if(t&1&&(bs$1(0,`div`),Um$1(1,14),Hm$1(2,`input`,28),Sw(),Mu()),t&2){let e=i_$1();i_$1(3);let i=p_$1(11),n=i_$1();N_$1(q_$1(`input-group `,n.metadata.releaseYearLocked?`lock-active`:``)),xb(),Vm$1(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,J_$1(6,kl$1,n.metadata)),xb(),Vm$1(`appFormField`,e),Aw()}}function zl$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,23),Dm$1(1,Gl$1,3,8,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`release-year-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`control`,a)(`validations`,eM(5,yl$1,e(`release-year-validation`),e(`release-year-validation`),e(`release-year-validation`)))}}function jl$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Hl$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Yl$1(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updateGenres(n),Mf(r.metadata.genresLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.genresLocked,n)||(r.metadata.genresLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.genresLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.genresLocked=!0)}),Dm$1(1,jl$1,1,1,`ng-template`,null,2,lM)(3,Hl$1,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){i_$1(2);let e=$_$1(11),i=i_$1(3);Vm$1(`settings`,e),jy(`locked`,i.metadata.genresLocked)}}function Kl$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Yl$1,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`genres-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Ql$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Jl$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Zl$1(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updateTags(n),Mf(r.metadata.tagsLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.tagsLocked,n)||(r.metadata.tagsLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.tagsLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.tagsLocked=!0)}),Dm$1(1,Ql$1,1,1,`ng-template`,null,2,lM)(3,Jl$1,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){i_$1(2);let e=$_$1(16),i=i_$1(3);Vm$1(`settings`,e),jy(`locked`,i.metadata.tagsLocked)}}function Xl$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Zl$1,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`tags-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function es(t,a){if(t&1&&(bs$1(0,`option`,30),j_$1(1),rM(2,`titlecase`),Mu()),t&2){let e=a.$implicit;Vm$1(`value`,e.value),xb(),Ly(iM(2,2,e.title))}}function ts(t,a){if(t&1&&(bs$1(0,`div`),Um$1(1,14),bs$1(2,`select`,29),CC(3,es,3,4,`option`,30,Tl$1),Mu(),Sw(),Mu()),t&2){i_$1(3);let e=p_$1(11),i=i_$1();N_$1(q_$1(`input-group `,i.metadata.ageRatingLocked?`lock-active`:``)),xb(),Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,J_$1(5,El$1,i.metadata)),xb(),Aw(),xb(),_C(i.ageRatings)}}function is(t,a){if(t&1&&(bs$1(0,`option`,30),j_$1(1),rM(2,`publicationStatus`),Mu()),t&2){let e=a.$implicit;Vm$1(`value`,e.value),xb(),Ly(iM(2,2,e.value))}}function ns(t,a){if(t&1&&(bs$1(0,`div`),Um$1(1,14),bs$1(2,`select`,31),
45CC(3,is,3,4,`option`,30,Ml$1),Mu(),Sw(),Mu()),t&2){i_$1(3);let e=p_$1(11),i=i_$1();N_$1(q_$1(`input-group `,i.metadata.publicationStatusLocked?`lock-active`:``)),xb(),Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,J_$1(5,wl$1,i.metadata)),xb(),Aw(),xb(),_C(i.publicationStatuses)}}function os(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,20)(2,`div`,21),By(3),DC(4,ql$1,3,3,`app-setting-item`,18),Mu()(),bs$1(5,`div`,22)(6,`div`,10),DC(7,zl$1,3,9,`app-setting-item`,23),Mu()()(),bs$1(8,`div`,9)(9,`div`,24)(10,`div`,21),By(11),DC(12,Kl$1,3,3,`app-setting-item`,18),Mu()()(),bs$1(13,`div`,9)(14,`div`,24)(15,`div`,21),By(16),DC(17,Xl$1,3,3,`app-setting-item`,18),Mu()()(),bs$1(18,`div`,9)(19,`div`,25)(20,`div`,21)(21,`app-setting-item`,18),Dm$1(22,ts,5,7,`ng-template`,null,1,lM),Mu()()(),bs$1(24,`div`,26)(25,`div`,21)(26,`app-setting-item`,18),Dm$1(27,ns,5,7,`ng-template`,null,1,lM),Mu()()()()),t&2){let e,i=i_$1(2).$implicit,n=i_$1();xb(3);let r=B_$1(n.languageSettings());xb(),bC(r?4:-1),xb(3),bC((e=n.editSeriesForm.get(`releaseYear`))?7:-1,e),xb(4);let k=B_$1(n.genreSettings());xb(),bC(k?12:-1),xb(4);let T=B_$1(n.tagsSettings());xb(),bC(T?17:-1),xb(4),Vm$1(`title`,i(`age-rating-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,i(`publication-status-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function as(t,a){if(t&1&&(j_$1(0),rM(1,`metadataProviderTitle`)),t&2){let e=i_$1(),i=i_$1(3).$implicit;Ou(` `,e.value?iM(1,1,e.value):i(`metadata-provider-override-default`),` `)}}function rs(t,a){if(t&1&&(bs$1(0,`option`,36),j_$1(1),rM(2,`metadataProviderTitle`),Mu()),t&2){let e=a.$implicit;Vm$1(`ngValue`,e),xb(),Ly(iM(2,2,e))}}function ls(t,a){if(t&1&&(bs$1(0,`select`,35)(1,`option`,36),j_$1(2),Mu(),CC(3,rs,3,4,`option`,36,TC),Mu(),Sw()),t&2){let e=i_$1(4).$implicit,i=i_$1();Aw(),xb(),Vm$1(`ngValue`,null),xb(),Ly(e(`metadata-provider-override-default`)),xb(),_C(i.allMetadataProviders)}}function ss(t,a){if(t&1&&(bs$1(0,`div`,32)(1,`app-setting-item`,34),Dm$1(2,as,2,3,`ng-template`,null,1,lM)(4,ls,5,2,`ng-template`,null,4,lM),Mu()()),t&2){let e=i_$1(3).$implicit;xb(),Vm$1(`title`,e(`metadata-provider-override-label`))(`subtitle`,e(`metadata-provider-override-tooltip`))(`canEdit`,!0)}}function cs(t,a){if(t&1&&(DC(0,ss,6,3,`div`,32),Hm$1(1,`app-edit-external-metadata-form`,33)),t&2){let e,i=i_$1(3);bC((e=i.editSeriesForm.get(`metadataProviderOverride`))?0:-1,e),xb(),Vm$1(`form`,i.editSeriesForm)(`entity`,i.series)}}function ds(t,a){if(t&1&&Dm$1(0,os,29,13,`ng-template`,8)(1,cs,2,3,`ng-template`,8),t&2){let e=i_$1(2);Vm$1(`appEditTab`,e.Tabs.Metadata),xb(),Vm$1(`appEditTab`,e.Tabs.ExternalMetadataIds)}}function ps(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function ms(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function _s(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Writer),Mf(r.metadata.writerLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.writerLocked,n)||(r.metadata.writerLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.writerLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.writerLocked=!0)}),Dm$1(1,ps,1,1,`ng-template`,null,2,lM)(3,ms,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.writerLocked)}}function us(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,_s,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`writer-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function gs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function hs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function fs(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.CoverArtist),Mf(r.metadata.coverArtistLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.coverArtistLocked,n)||(r.metadata.coverArtistLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.coverArtistLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.coverArtistLocked=!0)}),Dm$1(1,gs,1,1,`ng-template`,null,2,lM)(3,hs,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.coverArtistLocked)}}function Cs(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,fs,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`cover-artist-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function xs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function vs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function bs(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Publisher),Mf(r.metadata.publisherL
45ocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.publisherLocked,n)||(r.metadata.publisherLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.publisherLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.publisherLocked=!0)}),Dm$1(1,xs,1,1,`ng-template`,null,2,lM)(3,vs,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.publisherLocked)}}function Ss(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,bs,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`publisher-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function ys(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function ks(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Es(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Imprint),Mf(r.metadata.publisherLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.imprintLocked,n)||(r.metadata.imprintLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.imprintLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.imprintLocked=!0)}),Dm$1(1,ys,1,1,`ng-template`,null,2,lM)(3,ks,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.imprintLocked)}}function ws(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Es,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`imprint-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Ts(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Ms(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Is(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Penciller),Mf(r.metadata.pencillerLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.pencillerLocked,n)||(r.metadata.pencillerLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.pencillerLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.pencillerLocked=!0)}),Dm$1(1,Ts,1,1,`ng-template`,null,2,lM)(3,Ms,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.pencillerLocked)}}function Rs(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Is,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`penciller-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Vs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Ls(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Fs(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Letterer),Mf(r.metadata.lettererLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.lettererLocked,n)||(r.metadata.lettererLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.lettererLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.lettererLocked=!0)}),Dm$1(1,Vs,1,1,`ng-template`,null,2,lM)(3,Ls,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.lettererLocked)}}function Ps(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Fs,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`letterer-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function As(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Ns(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Ds(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Inker),Mf(r.metadata.inkerLocked=!0)}
45),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.inkerLocked,n)||(r.metadata.inkerLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.inkerLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.inkerLocked=!0)}),Dm$1(1,As,1,1,`ng-template`,null,2,lM)(3,Ns,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.inkerLocked)}}function Os(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Ds,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`inker-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function $s(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Us(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Bs(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Editor),Mf(r.metadata.editorLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.editorLocked,n)||(r.metadata.editorLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.editorLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.editorLocked=!0)}),Dm$1(1,$s,1,1,`ng-template`,null,2,lM)(3,Us,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.editorLocked)}}function Ws(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Bs,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`editor-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function qs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Gs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function zs(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Colorist),Mf(r.metadata.coloristLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.coloristLocked,n)||(r.metadata.coloristLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.coloristLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.coloristLocked=!0)}),Dm$1(1,qs,1,1,`ng-template`,null,2,lM)(3,Gs,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.coloristLocked)}}function js(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,zs,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`colorist-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Hs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Ys(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Ks(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Translator),Mf(r.metadata.translatorLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.translatorLocked,n)||(r.metadata.translatorLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.translatorLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.translatorLocked=!0)}),Dm$1(1,Hs,1,1,`ng-template`,null,2,lM)(3,Ys,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.translatorLocked)}}function Qs(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Ks,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`translator-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Js(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Zs(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Xs(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Character),Mf(r.metadata.characterLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.characterLocked,n)||(r.metadata.characterLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.characterLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.characterLocked=!0)}),Dm$1(1,Js,1,1,`ng-template`,null,2,lM)(3,Zs,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.characterLocked)}}function ec$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Xs,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`character-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function tc$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function ic$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function nc$1(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Team),Mf(r.metadata.teamLocked=!0)}
45),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.teamLocked,n)||(r.metadata.teamLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.teamLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.teamLocked=!0)}),Dm$1(1,tc$1,1,1,`ng-template`,null,2,lM)(3,ic$1,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.teamLocked)}}function oc$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,nc$1,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`team-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function ac$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function rc$1(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function lc$1(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,27),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return Mf(r.updatePerson(n,r.PersonRole.Location))}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.metadata.locationLocked,n)||(r.metadata.locationLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.locationLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.metadata.locationLocked=!0)}),Dm$1(1,ac$1,1,1,`ng-template`,null,2,lM)(3,rc$1,1,1,`ng-template`,null,3,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.metadata.locationLocked)}}function sc$1(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,lc$1,5,2,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`location-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function cc$1(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,21),DC(2,us,3,3,`app-setting-item`,18),Mu()(),bs$1(3,`div`,9)(4,`div`,21),DC(5,Cs,3,3,`app-setting-item`,18),Mu()(),bs$1(6,`div`,9)(7,`div`,21),DC(8,Ss,3,3,`app-setting-item`,18),Mu()(),bs$1(9,`div`,9)(10,`div`,21),DC(11,ws,3,3,`app-setting-item`,18),Mu()(),bs$1(12,`div`,9)(13,`div`,21),DC(14,Rs,3,3,`app-setting-item`,18),Mu()(),bs$1(15,`div`,9)(16,`div`,21),DC(17,Ps,3,3,`app-setting-item`,18),Mu()(),bs$1(18,`div`,9)(19,`div`,21),DC(20,Os,3,3,`app-setting-item`,18),Mu()(),bs$1(21,`div`,9)(22,`div`,21),DC(23,Ws,3,3,`app-setting-item`,18),Mu()(),bs$1(24,`div`,9)(25,`div`,21),DC(26,js,3,3,`app-setting-item`,18),Mu()(),bs$1(27,`div`,9)(28,`div`,21),DC(29,Qs,3,3,`app-setting-item`,18),Mu()(),bs$1(30,`div`,9)(31,`div`,21),DC(32,ec$1,3,3,`app-setting-item`,18),Mu()(),bs$1(33,`div`,9)(34,`div`,21),DC(35,oc$1,3,3,`app-setting-item`,18),Mu()(),bs$1(36,`div`,9)(37,`div`,21),DC(38,sc$1,3,3,`app-setting-item`,18),Mu()()),t&2){let e,i,n,r,k,T,E,$,F,me,We,nn,on,ge=i_$1(3);xb(2),bC((e=ge.getPersonsSettings(ge.PersonRole.Writer))?2:-1,e),xb(3),bC((i=ge.getPersonsSettings(ge.PersonRole.CoverArtist))?5:-1,i),xb(3),bC((n=ge.getPersonsSettings(ge.PersonRole.Publisher))?8:-1,n),xb(3),bC((r=ge.getPersonsSettings(ge.PersonRole.Imprint))?11:-1,r),xb(3),bC((k=ge.getPersonsSettings(ge.PersonRole.Penciller))?14:-1,k),xb(3),bC((T=ge.getPersonsSettings(ge.PersonRole.Letterer))?17:-1,T),xb(3),bC((E=ge.getPersonsSettings(ge.PersonRole.Inker))?20:-1,E),xb(3),bC(($=ge.getPersonsSettings(ge.PersonRole.Editor))?23:-1,$),xb(3),bC((F=ge.getPersonsSettings(ge.PersonRole.Colorist))?26:-1,F),xb(3),bC((me=ge.getPersonsSettings(ge.PersonRole.Translator))?29:-1,me),xb(3),bC((We=ge.getPersonsSettings(ge.PersonRole.Character))?32:-1,We),xb(3),bC((nn=ge.getPersonsSettings(ge.PersonRole.Team))?35:-1,nn),xb(3),bC((on=ge.getPersonsSettings(ge.PersonRole.Location))?38:-1,on)}}function dc$1(t,a){if(t&1&&Dm$1(0,cc$1,39,13,`ng-template`,8),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.People)}function pc$1(t,a){if(t&1){let e=AC();bs$1(0,`p`),j_$1(1),Mu(),bs$1(2,`app-edit-list`,37),fy(`updateItems`,function(n){_f(e);return Mf(i_$1(3).updateWeblinks(n))}),Mu()}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Ly(e(`web-link-description`)),xb(),Vm$1(`items`,i.WebLinks)(`label`,e(`web-link-label`))}}function mc$1(t,a){if(t&1&&Dm$1(0,pc$1,3,3,`ng-template`,8),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.WebLinks)}function _c(t,a){if(t&1){let e=AC();bs$1(0,`p`,38),j_$1(1),Mu(),bs$1(2,`app-cover-image-chooser`,39),fy(`coverChanged`,function(n){_f(e);return Mf(i_$1(3).handleCoverChanged(n))})(`resetClicked`,function(){_f(e);return Mf(i_$1(3).handleReset())}),Mu()}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Ou(` `,e(`cover-image-description`),` `),xb(),Vm$1(`config`,i.chooserConfig())}}function uc$1(t,a){if(t&1&&Dm$1(0,_c,3,2,`ng-template`,8),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.CoverImage)}function gc(t,a){if(t&1&&Hm$1(0,`app-edit-series-relation`,40),t&2){let e=i_$1(3);Vm$1(`series`,e.series)(`save`,e.saveNestedComponents)}}function hc$1(t,a){if(t&1&&Dm$1(0,gc,1,2,`ng-template`,8),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.Related)}function fc$1(t,a){if(t&1&&(j_$1(0),rM(1,`sentenceCase`)),t&2)Ou(` `,iM(1,
451,i_$1(4).libraryName),` `)}function Cc$1(t,a){if(t&1&&(j_$1(0),rM(1,`mangaFormat`)),t&2)Ou(` `,iM(1,1,i_$1(4).series.format),` `)}function xc(t,a){if(t&1&&(j_$1(0),rM(1,`defaultValue`)),t&2)Ou(` `,iM(1,1,i_$1(4).series.folderPath),` `)}function vc$1(t,a){if(t&1&&(j_$1(0),rM(1,`defaultValue`)),t&2)Ou(` `,iM(1,1,i_$1(4).series.lowestFolderPath),` `)}function bc(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1(5).$implicit;Ou(` `,e(`no-data`),` `)}}function Sc(t,a){if(t&1&&j_$1(0),t&2)Ou(` `,i_$1(6).metadata.maxCount,` `)}function yc(t,a){if(t&1&&DC(0,bc,1,1)(1,Sc,1,1),t&2){let e=i_$1(5);bC(e.metadata.maxCount===e.LooseLeafOrDefaultNumber?0:1)}}function kc(t,a){if(t&1&&j_$1(0),t&2)Ou(` `,i_$1(5).metadata.totalCount,` `)}function Ec(t,a){if(t&1&&(j_$1(0),rM(1,`publicationStatus`)),t&2)Ou(` `,iM(1,1,i_$1(5).metadata.publicationStatus),` `)}function wc(t,a){if(t&1&&(j_$1(0),rM(1,`bytes`)),t&2)Ou(` `,iM(1,1,i_$1(5).size),` `)}function Tc(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,25)(2,`div`,21)(3,`app-setting-item`,41),Dm$1(4,yc,2,1,`ng-template`,null,1,lM),Mu()()(),bs$1(6,`div`,25)(7,`div`,21)(8,`app-setting-item`,41),Dm$1(9,kc,1,1,`ng-template`,null,1,lM),Mu()()()(),bs$1(11,`div`,9)(12,`div`,25)(13,`div`,21)(14,`app-setting-item`,18),Dm$1(15,Ec,2,3,`ng-template`,null,1,lM),Mu()()(),bs$1(17,`div`,25)(18,`div`,21)(19,`app-setting-item`,18),Dm$1(20,wc,2,3,`ng-template`,null,1,lM),Mu()()()()),t&2){let e=i_$1(3).$implicit;xb(3),Vm$1(`title`,e(`max-items-title`))(`subtitle`,e(`highest-count-tooltip`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`total-items-title`))(`subtitle`,e(`max-issue-tooltip`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(6),Vm$1(`title`,e(`publication-status-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`size-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Mc(t,a){if(t&1&&(j_$1(0),rM(1,`utcToLocalTime`)),t&2)Ou(` `,sM(1,1,i_$1(4).series.created,`shortDate`),` `)}function Ic(t,a){if(t&1&&(j_$1(0),rM(1,`defaultDate`),rM(2,`timeDifference`)),t&2)Ou(` `,iM(2,3,iM(1,1,i_$1(4).series.lastChapterAdded)),` `)}function Rc(t,a){if(t&1&&(j_$1(0),rM(1,`defaultDate`),rM(2,`timeDifference`)),t&2)Ou(` `,iM(2,3,iM(1,1,i_$1(4).series.lastFolderScanned)),` `)}function Vc(t,a){if(t&1&&(j_$1(0),rM(1,`defaultDate`),rM(2,`timeDifference`)),t&2)Ou(` `,iM(2,3,iM(1,1,i_$1(4).series.lastChapterAdded)),` `)}function Lc(t,a){if(t&1&&(j_$1(0),rM(1,`number`)),t&2)Ou(` `,iM(1,
451,i_$1(4).series.pages),` `)}function Fc(t,a){if(t&1&&(j_$1(0),rM(1,`number`)),t&2)Ou(` `,iM(1,1,i_$1(4).series.wordCount),` `)}function Pc(t,a){if(t&1&&(bs$1(0,`div`,42)(1,`span`,44),j_$1(2),Mu()()),t&2){let e=i_$1(3).$implicit;xb(2),Ly(e(`loading`))}}function Ac(t,a){if(t&1&&(bs$1(0,`li`,53)(1,`span`),j_$1(2),Mu(),bs$1(3,`div`,9)(4,`div`,49),j_$1(5),Mu(),bs$1(6,`div`,49),j_$1(7),Mu(),bs$1(8,`div`,49),j_$1(9),bs$1(10,`span`,54),j_$1(11),rM(12,`mangaFormat`),Mu()()()()),t&2){let e=a.$implicit,i=i_$1(5).$implicit;xb(2),Ly(e.filePath),xb(3),Py(` `,i(`chapter-title`),` `,e.chapter,` `),xb(2),Py(` `,i(`pages-title`),` `,e.pages,` `),xb(2),Ou(` `,i(`format-title`),` `),xb(2),Ly(iM(12,7,e.format))}}function Nc(t,a){if(t&1){let e=AC();bs$1(0,`li`,45),Hm$1(1,`app-image`,46),bs$1(2,`div`,47)(3,`h5`,48),j_$1(4),Mu(),bs$1(5,`div`)(6,`div`,9)(7,`div`,49),j_$1(8),rM(9,`utcToLocalTime`),rM(10,`defaultDate`),Mu(),bs$1(11,`div`,49),j_$1(12),rM(13,`utcToLocalTime`),rM(14,`defaultDate`),Mu()(),bs$1(15,`div`,9)(16,`div`,49)(17,`button`,50),fy(`click`,function(){_f(e);return Mf(p_$1(22).toggle())}),j_$1(18),Mu()(),bs$1(19,`div`,49),j_$1(20),Mu()(),bs$1(21,`div`,51,5),Vy(`ngbCollapseChange`,function(n){let r=_f(e).$implicit,k=i_$1(5);return H_$1(k.volumeCollapsed[r.name],n)||(k.volumeCollapsed[r.name]=n),Mf(n)}),bs$1(23,`ul`,52),CC(24,Ac,13,9,`li`,53,bo$1),Mu()()()()()}if(t&2){let e=a.$implicit,i=i_$1(4).$implicit,n=i_$1();xb(),Vm$1(`imageUrl`,n.imageService.getVolumeCoverImage(e.id)),xb(3),Ly(n.formatVolumeName(e)),xb(4),Py(` `,i(`added-title`),` `,iM(10,14,iM(9,12,e.createdUtc)),` `),xb(4),Py(` `,i(`last-modified-title`),` `,iM(14,19,sM(13,16,e.lastModifiedUtc,`short`)),` `),xb(5),Vm$1(`disabled`,!n.accountService.hasAdminRole()),jm$1(`aria-expanded`,!n.volumeCollapsed[e.name]),xb(),Ou(` `,i(`view-files`),` `),xb(2),Py(` `,i(`pages-title`),` `,e.pages,` `),xb(),jy(`ngbCollapse`,n.volumeCollapsed[e.name]),xb(3),_C(e.volumeFiles)}}function Dc(t,a){if(t&1&&(bs$1(0,`ul`,43),CC(1,Nc,26,21,`li`,45,bo$1),Mu()),t&2){let e=i_$1(4);xb(),_C(e.seriesVolumes)}}function Oc(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,25)(2,`div`,21)(3,`app-setting-item`,18),Dm$1(4,fc$1,2,3,`ng-template`,null,1,lM),Mu()()(),bs$1(6,`div`,25)(7,`div`,21)(8,`app-setting-item`,18),Dm$1(9,Cc$1,2,3,`ng-template`,null,1,lM),Mu()()()(),bs$1(11,`div`,9)(12,`div`,25)(13,`div`,21)(14,`app-setting-item`,41),Dm$1(15,xc,2,3,`ng-template`,null,1,lM),Mu()()(),bs$1(17,`div`,25)(18,`div`,21)(19,`app-setting-item`,41),Dm$1(20,vc$1,2,3,`ng-template`,null,1,lM),Mu()()()(),DC(22,Tc,22,14),bs$1(23,`div`,9)(24,`div`,25)(25,`div`,21)(26,`app-setting-item`,18),Dm$1(27,Mc,2,4,`ng-template`,null,1,lM),Mu()()(),bs$1(29,`div`,25)(30,`div`,21)(31,`app-setting-item`,18),Dm$1(32,Ic,3,5,`ng-template`,null,1,lM),Mu()()()(),bs$1(34,`div`,9)(35,`div`,25)(36,`div`,21)(37,`app-setting-item`,18),Dm$1(38,Rc,3,5,`ng-template`,null,1,lM),Mu()()(),bs$1(40,`div`,25)(41,`div`,21)(42,`app-setting-item`,18),Dm$1(43,Vc,3,5,`ng-template`,null,1,lM),Mu()()()(),bs$1(45,`div`,9)(46,`div`,25)(47,`div`,21)(48,`app-setting-item`,18),Dm$1(49,Lc,2,3,`ng-template`,null,1,lM),Mu()()(),bs$1(51,`div`,25)(52,`div`,21)(53,`app-setting-item`,18),Dm$1(54,Fc,2,3,`ng-template`,null,1,lM),Mu()()()(),bs$1(56,`h4`),j_$1(57),Mu(),DC(58,Pc,3,1,`div`,42)(59,Dc,3,0,`ul`,43)),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(3),Vm$1(`title`,e(`library-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`format-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(6),Vm$1(`title`,e(`folder-path-title`))(`subtitle`,e(`folder-path-tooltip`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`lowest-folder-path-title`))(`subtitle`,e(`lowest-folder-path-tooltip`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(3),bC(i.metadata?22:-1),xb(4),Vm$1(`title`,e(`created-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`last-added-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(6),Vm$1(`title`,e(`last-scanned-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`last-read-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(6),Vm$1(`title`,e(`total-pages-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`total-words-title`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(4),Ly(e(`volumes-title`)),xb(),bC(i.isLoadingVolumes()?58:59)}}function $c(t,a){if(t&1&&Dm$1(0,Oc,60,35,`ng-template`,8),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.Info)}function Uc(t,a){if(t&1){let e=AC();
45bs$1(0,`div`,55)(1,`app-setting-button`,56)(2,`button`,57),fy(`click`,function(){_f(e);let n=i_$1().$implicit;return Mf(i_$1(4).runTask(n))}),j_$1(3),Mu()()()}if(t&2){let e=i_$1().$implicit,i=i_$1(4);xb(),Vm$1(`subtitle`,e.description),xb(),N_$1(q_$1(`btn btn-`,e.action===i.Action.Delete?`danger`:`secondary`,` btn-sm mb-2`)),xb(),Ly(e.title)}}function Bc(t,a){if(t&1&&DC(0,Uc,4,5,`div`,55),t&2){let e=a.$implicit;bC(i_$1(4).accountService.canCurrentUserInvokeAction(e.action)?0:-1)}}function Wc(t,a){if(t&1&&CC(0,Bc,1,1,null,null,Il$1),t&2)_C(i_$1(3).tasks)}function qc(t,a){if(t&1&&Dm$1(0,Wc,2,0,`ng-template`,8),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.Tasks)}function Gc(t,a){if(t&1){let e=AC();bs$1(0,`span`,58),fy(`click`,function(){let n=_f(e),r=n.item,k=n.field;return Mf(i_$1(2).unlock(r,k))}),Hm$1(1,`i`,59),bs$1(2,`span`,44),j_$1(3),Mu()()}if(t&2){let e=i_$1().$implicit;xb(3),Ly(e(`field-locked-alt`))}}function zc(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`app-edit-modal-shell`,7),fy(`save`,function(){_f(e);return Mf(i_$1().save())})(`close`,function(){_f(e);return Mf(i_$1().close())})(`activeTabIdChange`,function(n){_f(e);return Mf(i_$1().changeTab(n))}),DC(2,$l$1,1,1,null,8),DC(3,ds,2,2),DC(4,dc$1,1,1,null,8),DC(5,mc$1,1,1,null,8),DC(6,uc$1,1,1,null,8),DC(7,hc$1,1,1,null,8),DC(8,$c,1,1,null,8),DC(9,qc,1,1,null,8),Mu(),Dm$1(10,Gc,4,1,`ng-template`,null,0,lM),Gs$1()}if(t&2){let e=a.$implicit,i=i_$1();xb(),Vm$1(`title`,e(`title`,J_$1(11,Cl$1,i.series.name)))(`activeTabId`,i.active)(`formGroup`,i.editSeriesForm),xb(),bC(i.series?2:-1),xb(),bC(i.series&&i.metadata?3:-1),xb(),bC(i.series?4:-1),xb(),bC(i.series&&i.metadata?5:-1),xb(),bC(i.series?6:-1),xb(),bC(i.series?7:-1),xb(),bC(i.series?8:-1),xb(),bC(i.series?9:-1)}}var So$1=(()=>{class t{constructor(){this.modal=E$2(F$6),this.seriesService=E$2(N$2),this.fb=E$2(xn),this.imageService=E$2(we$3),this.libraryService=E$2(S$5),this.uploadService=E$2(y$1),this.metadataService=E$2(Fe$3),this.cdRef=E$2(OB),this.accountService=E$2(yc$1),this.licenseService=E$2(vi$1),this.destroyRef=E$2(te$5),this.actionFactoryService=E$2(Qt),this.breakpointService=E$2(W$1),this.coverChooserConfigFactory=E$2(it),this.confirmService=E$2(bi),this.typeaheadSettingsFactory=E$2(jn$1),this.Tabs=me$1,this.PersonRole=t$3,this.Action=ke$3,this.seriesVolumes=[],this.isLoadingVolumes=be$3(!1),this.tasks=this.actionFactoryService.getActionablesForSettingsPage(this.actionFactoryService.getSeriesActions(),this.blackl
45ist),this.volumeCollapsed={},this.active=me$1.General,this.libraryName=void 0,this.size=0,this.libraryType=be$3(d$1.Manga),this.allMetadataProviders=qi,this.tagsSettings=be$3(null),this.languageSettings=be$3(null),this.peopleSettings=be$3({}),this.genreSettings=be$3(null),this.tags=[],this.genres=[],this.ageRatings=[],this.publicationStatuses=[],this.selectedCover=``,this.coverImageReset=!1,this.coverImageDirty=!1,this.chooserConfig=be$3({}),this.saveNestedComponents=new ht$3,this.LooseLeafOrDefaultNumber=-1e5,this.MangaFormat=e$2}get blacklist(){return[ke$3.Edit,ke$3.Info,ke$3.IncognitoRead,ke$3.Read,ke$3.SendTo,ke$3.AddToWantToReadList,ke$3.AddToCollection,ke$3.AddToReadingList,ke$3.RemoveFromWantToReadList,ke$3.RemoveFromWantToReadList]}get WebLinks(){return this.metadata?.webLinks.split(`,`)||[``]}getPersonsSettings(e){return this.peopleSettings()[e]}ngOnInit(){this.libraryService.getLibraryNames().pipe(JB(this.destroyRef)).subscribe(e=>{this.libraryName=e[this.series.libraryId]}),this.initSeries=Object.assign({},this.series),this.editSeriesForm=this.fb.group({id:new Z$2(this.series.id,[]),summary:new Z$2(``,[]),name:new Z$2(this.series.name,[Ce$3.required]),localizedName:new Z$2(this.series.localizedName,[]),sortName:new Z$2(this.series.sortName,[Ce$3.required]),rating:new Z$2(this.series.userRating,[]),coverImageLocked:new Z$2(this.series.coverImageLocked,[]),ageRating:new Z$2(``,[]),publicationStatus:new Z$2(``,[]),language:new Z$2(``,[]),releaseYear:new Z$2(``,[Ce$3.minLength(4),Ce$3.maxLength(4),Ce$3.pattern(/([1-9]\d{3})|[0]{1}/)]),metadataProviderOverride:new Z$2(this.series.metadataProviderOverride??null,[])}),pt$1(this.editSeriesForm,this.series),this.cdRef.markForCheck(),this.metadataService.getAllAgeRatings().subscribe(e=>{this.ageRatings=e,this.cdRef.markForCheck()}),this.metadataService.getAllPublicationStatus().subscribe(e=>{this.publicationStatuses=e,this.cdRef.markForCheck()}),this.seriesService.getMetadata(this.series.id).subscribe(e=>{e&&(this.metadata=e,this.setupTypeaheads(),this.editSeriesForm.get(`summary`)?.patchValue(this.metadata.summary),this.editSeriesForm.get(`ageRating`)?.patchValue(this.metadata.ageRating),this.editSeriesForm.get(`publicationStatus`)?.patchValue(this.metadata.publicationStatus),this.editSeriesForm.get(`language`)?.patchValue(this.metadata.language),this.editSeriesForm.get(`releaseYear`)?.patchValue(this.metadata.releaseYear),this.cdRef.markForCheck(),this.editSeriesForm.get(`name`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(i=>{this.series.nameLocked=!0,this.cdRef.markForCheck()}),this.editSeriesForm.get(`sortName`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(i=>{this.series.sortNameLocked=!0,this.cdRef.markForCheck()}),this.editSeriesForm.get(`localizedName`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(i=>{this.series.localizedNameLocked=!0,this.cdRef.markForCheck()}),this.editSeriesForm.get(`summary`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(i=>{this.metadata.summaryLocked=!0,this.metadata.summary=i,this.cdRef.markForCheck()}),this.editSeriesForm.get(`ageRating`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(i=>{this.metadata.ageRating=parseInt(i+``,10),this.metadata.ageRatingLocked=!0,this.cdRef.markForCheck()}),this.editSeriesForm.get(`publicationStatus`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(i=>{this.metadata.publicationStatus=parseInt(i+``,10),this.metadata.publicationStatusLocked=!0,this.cdRef.markForCheck()}),this.editSeriesForm.get(`releaseYear`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(i=>{this.metadata.releaseYear=parseInt(i+``,10),this.metadata.releaseYearLocked=!0,this.cdRef.markForCheck()}))}),this.isLoadingVolumes.set(!0),Wv({volumes:this.seriesService.getVolumes(this.series.id),libraryType:this.libraryService.getLibraryType(this.series.libraryId)}).subscribe(e=>{let i=e.volumes,n=e.libraryType;this.seriesVolumes=i,this.libraryType.set(n),this.isLoadingVolumes.set(!1),this.chooserConfig.set(this.coverChooserConfigFactory.forSeries(this.series,this.seriesVolumes,this.libraryType())),i.forEach(r=>{this.volumeCollapsed[r.name]=!0}
45),this.seriesVolumes.forEach(r=>{r.volumeFiles=r.chapters?.map(k=>k.files.map(T=>(T.chapter=k.range,T))).flat()}),i.length>0&&(this.size=i.reduce((r,k)=>r+k.chapters.reduce((T,E)=>T+E.files.reduce(($,F)=>$+F.bytes,0),0),0)),this.cdRef.markForCheck()})}setupTypeaheads(){this.languageSettings.set(this.typeaheadSettingsFactory.forLanguage({id:`language`,currentSelectedLanguage:this.metadata.language})),this.tagsSettings.set(this.typeaheadSettingsFactory.forTag({id:`tags`,savedData:this.metadata.tags??[]})),this.genreSettings.set(this.typeaheadSettingsFactory.forGenre({id:`genres`,savedData:this.metadata.genres??[]})),this.setupPersonTypeahead()}setupPersonTypeahead(){let e=[[`writer`,t$3.Writer,this.metadata.writers],[`character`,t$3.Character,this.metadata.characters],[`colorist`,t$3.Colorist,this.metadata.colorists],[`cover-artist`,t$3.CoverArtist,this.metadata.coverArtists],[`editor`,t$3.Editor,this.metadata.editors],[`inker`,t$3.Inker,this.metadata.inkers],[`letterer`,t$3.Letterer,this.metadata.letterers],[`penciller`,t$3.Penciller,this.metadata.pencillers],[`publisher`,t$3.Publisher,this.metadata.publishers],[`imprint`,t$3.Imprint,this.metadata.imprints],[`translator`,t$3.Translator,this.metadata.translators],[`teams`,t$3.Team,this.metadata.teams],[`locations`,t$3.Location,this.metadata.locations]];this.metadataService.getAllPeople().pipe(JB(this.destroyRef)).subscribe(i=>{let n={};for(let[r,k,T]of e){let E=this.typeaheadSettingsFactory.forPerson({id:r,role:k});if(T&&T.length>0){let $=T.map(F=>F.id);E.savedData=i.filter(F=>$.includes(F.id)),this.metadataService.updatePerson(this.metadata,E.savedData,k)}n[k]=E}this.peopleSettings.set(n)})}close(){this.coverImageReset?this.modal.close(s$3(this.series,!0)):this.modal.dismiss()}updateWeblinks(e){this.metadata.webLinks=e.map(i=>i.replaceAll(`,`,`%2C`)).join(`,`)}save(){return D$5(this,null,function*(){let e=this.editSeriesForm.getRawValue();(this.editSeriesForm.get(`name`)?.dirty??!1)&&this.series.sortNameLocked&&e.sortName!==e.name&&(yield this.confirmService.confirm(Mt$4(`edit-series-modal.align-sort-name`)))&&(e.sortName=e.name,this.editSeriesForm.get(`sortName`)?.patchValue(e.name));let n=null;e.nameLocked=this.series.nameLocked,e.sortNameLocked=this.series.sortNameLocked,e.localizedNameLocked=this.series.localizedNameLocked,e.language=this.metadata.language;let r=[this.seriesService.updateSeries(e).pipe(xd$1(k=>n=k)),this.seriesService.updateMetadata(this.metadata)];this.coverImageDirty&&r.push(this.uploadService.updateSeriesCoverImage(e.id,this.selectedCover,!0)),this.saveNestedComponents.emit(),Mt$3(...r).pipe(Fd$1(10),mI()).subscribe({next:()=>{this.modal.close(s$3(n??e,this.coverImageDirty||this.coverImageReset))},error:()=>{this.cdRef.markForCheck()}})})}updateTags(e){this.tags=e,this.metadata.tags=e,this.cdRef.markForCheck()}updateGenres(e){this.genres=e,this.metadata.genres=e,this.cdRef.markForCheck()}updatePerson(e,i){this.metadataService.updatePerson(this.metadata,e,i),this.cdRef.markForCheck()}updateLanguage(e){if(e.length===0){this.metadata.language=``;return}this.metadata.language=e[0].isoCode,this.cdRef.markForCheck()}handleCoverChanged(e){this.coverImageDirty=e.isDirty,this.selectedCover=e.fileName}handleReset(){this.coverImageReset=!0,this.editSeriesForm.patchValue({coverImageLocked:!1}),this.chooserConfig.set(x$3(w$4({},this.chooserConfig()),{isLocked:!1}))}unlock(e,i){e&&(e[i]=!e[i]),this.cdRef.markForCheck()}runTask(e){return D$5(this,null,function*(){e.callback(e,this.series)})}formatVolumeName(e){return e.minNumber===-1e5?Mt$4(`edit-series-modal.loose-leaf-volume`):e.minNumber===1e5?Mt$4(`edit-series-modal.specials-volume`):Mt$4(`edit-series-modal.volume-num`,{num:e.name})}changeTab(e){e&&(this.active=e,this.cdRef.markForCheck())}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-series-modal`]],inputs:{series:`series`},decls:1,vars:1,consts:[[`lock`,``],[`view`,``],[`badgeItem`,``],[`optionItem`,``],[`edit`,``],[`collapse`,`ngbCollapse`],[4,`transloco`,`translocoPrefix`],[`translocoPrefix`,`edit-series-modal`,3,`save`,`close`,`activeTabIdC
45hange`,`title`,`activeTabId`,`formGroup`],[3,`appEditTab`],[1,`row`],[1,`mb-3`,2,`width`,`100%`],[`labelid`,`name`,3,`title`,`toggleOnViewClick`,`showEdit`,`control`],[3,`title`,`toggleOnViewClick`,`showEdit`,`control`],[`labelId`,`localized-name`,3,`title`,`toggleOnViewClick`,`showEdit`,`control`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`id`,`name`,`aria-describedby`,`name-validations`,`formControlName`,`name`,`type`,`text`,1,`form-control`,3,`appFormField`],[`id`,`sort-name`,`formControlName`,`sortName`,`type`,`text`,1,`form-control`,3,`appFormField`],[`id`,`localized-name`,`formControlName`,`localizedName`,`type`,`text`,1,`form-control`,3,`appFormField`],[3,`title`,`toggleOnViewClick`,`showEdit`],[`id`,`summary`,`formControlName`,`summary`,`rows`,`4`,1,`form-control`],[1,`col-lg-8`,`col-md-12`,`pe-2`],[1,`mb-3`],[1,`col-lg-4`,`col-md-12`],[`labelId`,`release-year`,3,`title`,`toggleOnViewClick`,`showEdit`,`control`,`validations`],[1,`col-md-12`],[1,`col-lg-6`,`col-md-12`,`pe-2`],[1,`col-lg-6`,`col-md-12`],[3,`selectedData`,`lockedChange`,`onUnlock`,`newItemAdded`,`settings`,`locked`],[`type`,`number`,`inputmode`,`numeric`,`id`,`release-year`,`formControlName`,`releaseYear`,1,`form-control`,3,`appFormField`],[`id`,`age-rating`,`formControlName`,`ageRating`,1,`form-select`],[3,`value`],[`id`,`publication-status`,`formControlName`,`publicationStatus`,1,`form-select`],[1,`row`,`g-0`,`mb-4`],[3,`form`,`entity`],[3,`title`,`subtitle`,`canEdit`],[`formControlName`,`metadataProviderOverride`,1,`form-select`],[3,`ngValue`],[3,`updateItems`,`items`,`label`],[`role`,`alert`,1,`alert`,`alert-warning`],[3,`coverChanged`,`resetClicked`,`config`],[3,`series`,`save`],[3,`title`,`subtitle`,`toggleOnViewClick`,`showEdit`],[`role`,`status`,1,`spinner-border`,`text-primary`],[1,`list-unstyled`],[1,`visually-hidden`],[1,`d-flex`,`my-4`],[`width`,`74px`,1,`me-3`,2,`width`,`4.625rem`,3,`imageUrl`],[1,`flex-grow-1`],[1,`mt-0`,`mb-1`],[1,`col`],[`type`,`button`,1,`btn`,`btn-outline-primary`,3,`click`,`disabled`],[3,`ngbCollapseChange`,`ngbCollapse`],[1,`list-group`,`mt-2`],[1,`list-group-item`],[1,`badge`,`badge-secondary`],[1,`mt-3`,`mb-3`],[3,`subtitle`],[3,`click`],[1,`input-group-text`,`clickable`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-lock`]],template:function(i,n){i&1&&Dm$1(0,zc,12,13,`ng-container`,6),i&2&&Vm$1(`translocoPrefix`,`edit-series-modal`)},dependencies:[li$1,ri$1,oi$1,Qe$5,vn,Et$1,ei$1,ti$1,fn$1,wn,us$1,Qe,vo$1,yt$2,T,Dt$2,Ct$3,_i,O$1,Wt$3,cn,st$1,gi,Ut,w$6,s$4,f$6,p$1,f$1,h$4,f$9,u$6,Cn,ui,gn,$$1],styles:[`.lock-active[_ngcontent-%COMP%] > .input-group-text[_ngcontent-%COMP%]{background-color:var(--%NS%primary-color);color:#fff}
46/*# sourceMappingURL=edit-series-modal.component-PVLLB57R.css.map */`]})}}return t})();var yo$1=t=>({num:t});var jc=(t,a)=>a.id;var Hc=(t,a)=>a.action;function Yc(t,a){if(t&1&&(j_$1(0),Hm$1(1,`app-entity-title`,5)),t&2){let e=i_$1().$implicit,i=i_$1();Ou(` `,e(`title`),` `),xb(),Vm$1(`libraryType`,i.libraryType)(`entity`,i.volume)(`prioritizeTitleName`,!1)}}function Kc(t,a){if(t&1&&(j_$1(0),rM(1,`compactNumber`)),t&2){let e=i_$1(2).$implicit;Ou(` `,e(`pages-count`,J_$1(3,yo$1,iM(1,1,i_$1().volume.pages))),` `)}}function Qc(t,a){if(t&1&&(j_$1(0),rM(1,`compactNumber`)),t&2){let e=i_$1(2).$implicit;Ou(` `,e(`words-count`,J_$1(3,yo$1,iM(1,1,i_$1().volume.wordCount))),` `)}}function Jc(t,a){if(t&1&&(j_$1(0),rM(1,`readTime`)),t&2)Ou(` `,iM(1,
461,i_$1(3).volume),` `)}function Zc(t,a){if(t&1&&(j_$1(0),rM(1,`bytes`)),t&2)Ou(` `,iM(1,1,i_$1(3).size),` `)}function Xc(t,a){if(t&1&&(j_$1(0),rM(1,`utcToLocalTime`),rM(2,`defaultDate`)),t&2)Ou(` `,iM(2,4,sM(1,1,i_$1(3).volume.createdUtc,`short`)),` `)}function ed(t,a){if(t&1&&j_$1(0),t&2)Ou(` `,i_$1(3).volume.id,` `)}function td(t,a){if(t&1&&(bs$1(0,`div`)(1,`span`),j_$1(2),Mu(),Hm$1(3,`span`,10),bs$1(4,`span`),j_$1(5),rM(6,`bytes`),Mu()()),t&2){let e=a.$implicit;xb(2),Ly(e.filePath),xb(3),Ly(iM(6,2,e.bytes))}}function id(t,a){if(t&1&&CC(0,td,7,4,`div`,null,jc),t&2)_C(i_$1(4).files)}function nd(t,a){if(t&1&&(bs$1(0,`app-setting-item`,9),Dm$1(1,id,2,0,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(2).$implicit;Vm$1(`title`,e(`files-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function od(t,a){if(t&1&&(bs$1(0,`div`,6)(1,`div`,7)(2,`div`,8)(3,`app-setting-item`,9),Dm$1(4,Kc,2,5,`ng-template`,null,1,lM),Mu()()(),bs$1(6,`div`,7)(7,`div`,8)(8,`app-setting-item`,9),Dm$1(9,Qc,2,5,`ng-template`,null,1,lM),Mu()()()(),bs$1(11,`div`,6)(12,`div`,7)(13,`div`,8)(14,`app-setting-item`,9),Dm$1(15,Jc,2,3,`ng-template`,null,1,lM),Mu()()(),bs$1(17,`div`,7)(18,`div`,8)(19,`app-setting-item`,9),Dm$1(20,Zc,2,3,`ng-template`,null,1,lM),Mu()()()(),bs$1(22,`div`,6)(23,`div`,7)(24,`div`,8)(25,`app-setting-item`,9),Dm$1(26,Xc,3,6,`ng-template`,null,1,lM),Mu()()(),bs$1(28,`div`,7)(29,`div`,8)(30,`app-setting-item`,9),Dm$1(31,ed,1,1,`ng-template`,null,1,lM),Mu()()()(),DC(33,nd,3,3,`app-setting-item`,9)),t&2){let e=i_$1().$implicit,i=i_$1();xb(3),Vm$1(`title`,e(`pages-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`words-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(6),Vm$1(`title`,e(`read-time-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`size-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(6),Vm$1(`title`,e(`date-added-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`id-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(3),bC(i.accountService.hasAdminRole()?33:-1)}}function ad(t,a){if(t&1&&Hm$1(0,`app-edit-external-metadata-form`,11),t&2){let e=i_$1(3);Vm$1(`form`,e.editForm)(`entity`,e.volume)}}function rd(t,a){if(t&1&&Dm$1(0,ad,1,2,`ng-template`,4),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.ExternalMetadataIds)}function ld(t,a){if(t&1){let e=AC();bs$1(0,`p`,12),j_$1(1),Mu(),bs$1(2,`app-cover-image-chooser`,13),fy(`coverChanged`,function(n){_f(e);return Mf(i_$1(3).handleCoverChanged(n))})(`resetClicked`,function(){_f(e);return Mf(i_$1(3).handleReset())}),Mu()}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Ou(` `,e(`cover-image-description`),` `),xb(),Vm$1(`config`,i.chooserConfig())}}function sd(t,a){if(t&1&&Dm$1(0,ld,3,2,`ng-template`,4),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.CoverImage)}function cd(t,a){if(t&1){let e=AC();bs$1(0,`div`,14)(1,`app-setting-button`,15)(2,`button`,16),fy(`click`,function(){_f(e);let n=i_$1().$implicit;return Mf(i_$1(3).runTask(n))}),j_$1(3),Mu()()()}if(t&2){let e=i_$1().$implicit,i=i_$1(3);xb(),Vm$1(`subtitle`,e.description),xb(),N_$1(q_$1(`btn btn-`,e.action===i.Action.Delete?`danger`:`secondary`,` btn-sm mb-2`)),xb(),Ly(e.title)}}function dd(t,a){if(t&1&&DC(0,cd,4,5,`div`,14),t&2){let e=a.$implicit;bC(i_$1(3).accountService.canCurrentUserInvokeAction(e.action)?0:-1)}}function pd(t,a){if(t&1&&CC(0,dd,1,1,null,null,Hc),t&2)_C(i_$1(2).tasks)}function md(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`app-edit-modal-shell`,3),fy(`activeTabIdChange`,function(n){_f(e);return Mf(i_$1().changeTab(n))})(`close`,function(){_f(e);return Mf(i_$1().close())})(`save`,function(){_f(e);return Mf(i_$1().save())}),Dm$1(2,Yc,2,4,`ng-template`,null,0,lM)(4,od,34,19,`ng-template`,4),DC(5,rd,1,1,null,4),DC(6,sd,1,1,null,4),Dm$1(7,pd,2,0,`ng-template`,4),Mu(),Gs$1()}if(t&2){let e=a.$implicit,i=i_$1();xb(),Vm$1(`title`,e(`title`))(`translocoPrefix`,`edit-volume-modal`)(`formGroup`,i.editForm)(`activeTabId`,i.activeId),xb(3),Vm$1(`appEditTab`,i.Tabs.Info),xb(),bC(i.accountService.hasAdminRole()?5:-1),xb(),bC(i.accountService.hasAdminRole()?6:-1),xb(),Vm$1(`appEditTab`,i.Tabs.Tasks)}}var ko$1=(()=>{class t{constructor(){this.modal=E$2(F$6),this.utilityService=E$2(w$5),this.imageService=E$2(we$3),this.uploadService=E$2(y$1),this.cdRef=E$2(OB),this.accountService=E$2(yc$1),this.actionFactoryService=E$2(Qt),this.actionService=E$2(hi),this.downloadService=E$2(Tt$2),this.volumeService=E$2($i),this.breakpointService=E$2(W$1),this.coverChooserConfigFactory=E$2(it),this.activeId=me$1.Info,this.editForm=new G$6({}),this.selectedCover=``,this.coverImageReset=!1,this.coverImageDirty=!1,this.chooserConfig=be$3({}),this.tasks=this.actionFactoryService.getActionablesForSettingsPage(this.actionFactoryService.getVolumeActions(this.seriesId,this.library
46Id,this.libraryType),this.blacklist),this.size=0,this.files=[],this.Tabs=me$1,this.Action=ke$3,this.PersonRole=t$3,this.MangaFormat=e$2,this.accountService.hasAdminRole()||(this.activeId=me$1.Info,this.cdRef.markForCheck())}get blacklist(){return[ke$3.Edit,ke$3.IncognitoRead,ke$3.AddToReadingList]}ngOnInit(){this.initVolume=Object.assign({},this.volume),this.files=this.volume.chapters.flatMap(e=>e.files),this.size=this.files.reduce((e,i)=>e+i.bytes,0),this.editForm.addControl(`coverImageLocked`,new Z$2(this.volume.coverImageLocked,[])),pt$1(this.editForm,this.volume),this.chooserConfig.set(this.coverChooserConfigFactory.forVolume(this.volume,this.libraryType))}close(){this.coverImageReset?this.modal.close(s$3(this.volume,!0)):this.modal.dismiss()}save(){let e=this.editForm.getRawValue(),i=w$4({id:this.volume.id},e),n=[this.volumeService.updateVolume(i)];this.coverImageDirty&&n.push(this.uploadService.updateVolumeCoverImage(this.volume.id,this.selectedCover,!0)),Mt$3(...n).subscribe(()=>{let r=this.coverImageDirty||this.coverImageReset;this.modal.close(s$3(this.volume,r))})}runTask(e){return D$5(this,null,function*(){switch(e.action){case ke$3.MarkAsRead:this.actionService.markVolumeAsRead(this.seriesId,this.volume,i=>{this.volume.pagesRead=i.pagesRead,this.cdRef.markForCheck()});break;case ke$3.MarkAsUnread:this.actionService.markVolumeAsUnread(this.seriesId,this.volume,i=>{this.volume.pagesRead=0,this.cdRef.markForCheck()});break;case ke$3.Delete:yield this.actionService.deleteVolume(this.volume.id,i=>{i&&this.modal.close(r$3(this.volume))});break;case ke$3.Download:this.downloadService.download(l$1.Volume,this.volume,this.libraryId,this.seriesId);break}})}handleCoverChanged(e){this.coverImageDirty=e.isDirty,this.selectedCover=e.fileName,this.cdRef.markForCheck()}handleReset(){this.coverImageReset=!0,this.editForm.patchValue({coverImageLocked:!1}),this.chooserConfig.set(x$3(w$4({},this.chooserConfig()),{isLocked:!1}))}changeTab(e){e&&(this.activeId=e,this.cdRef.markForCheck())}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-volume-modal`]],inputs:{volume:`volume`,libraryType:`libraryType`,libraryId:`libraryId`,seriesId:`seriesId`},decls:1,vars:1,consts:[[`title`,``],[`view`,``],[4,`transloco`,`translocoPrefix`],[3,`activeTabIdChange`,`close`,`save`,`title`,`translocoPrefix`,`formGroup`,`activeTabId`],[3,`appEditTab`],[3,`libraryType`,`entity`,`prioritizeTitleName`],[1,`row`],[1,`col-lg-6`,`col-md-12`,`pe-2`],[1,`mb-3`],[3,`title`,`toggleOnViewClick`,`showEdit`],[1,`dot-separator`,`mx-2`],[3,`form`,`entity`],[`role`,`alert`,1,`alert`,`alert-warning`],[3,`coverChanged`,`resetClicked`,`config`],[1,`mt-3`,`mb-3`],[3,`subtitle`],[3,`click`]],template:function(i,n){i&1&&Dm$1(0,md,8,8,`ng-container`,2),i&2&&Vm$1(`translocoPrefix`,`edit-volume-modal`)},dependencies:[ai$1,ti$1,Ct$3,li$1,fn$1,Wt$3,F$2,O$1,Qe,st$1,gi,Ut,f$2,p$1,u$6,h$4,et],encapsulation:2})}}return t})();var fi=t=>({"lock-active":t});var _d=t=>({item:t,field:`titleNameLocked`});var ud=t=>({item:t,field:`sortOrderLocked`});var gd=t=>({item:t,field:`isbnLocked`});var hd=t=>({item:t,field:`ageRatingLocked`});var fd=t=>({item:t,field:`releaseDateLocked`});var Cd=t=>({item:t,field:`summaryLocked`});var Eo$1=t=>({num:t});var xd=(t,a)=>a.value;var vd=(t,a)=>a.id;var bd=(t,a)=>a.action;function Sd(t,a){if(t&1&&(j_$1(0),Hm$1(1,`app-entity-title`,8)),t&2){let e=i_$1().$implicit,i=i_$1();Ou(` `,e(`title`),` `),xb(),Vm$1(`libraryType`,i.libraryType)(`entity`,i.chapter)(`prioritizeTitleName`,!1)}}function yd(t,a){if(t&1&&(bs$1(0,`div`,22),Um$1(1,23),Hm$1(2,`input`,24),Sw(),Mu()),t&2){i_$1(5);let e=p_$1(12),i=i_$1();Vm$1(`ngClass`,J_$1(4,fi,i.chapter.titleNameLocked)),xb(),Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,J_$1(6,_d,i.chapter)),xb(),Vm$1(`appFormField`,a),Aw()}}function kd(t,a){if(t&1&&DC(0,yd,3,8,`div`,22),t&2){let e;bC((e=i_$1(5).editForm.get(`titleName`))?0:-1,e)}}function Ed(t,a){if(t&1&&(bs$1(0,`app-setting-item`,11),Dm$1(1,kd,1,1,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`title-label`))(`showEdit`,!1)(`toggleOnViewClick`,!1)(`control`,a)}}function wd(t,a){if(t&1&&(bs$1(0,`div`,22),Um$1(1,23),Hm$1(2,`input`,25),Sw(),Mu()),t&2){let e=i_$1();i_$1(3);let i=p_$1(12),n=i_$1();
46Vm$1(`ngClass`,J_$1(4,fi,n.chapter.sortOrderLocked)),xb(),Vm$1(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,J_$1(6,ud,n.chapter)),xb(),Vm$1(`appFormField`,e),Aw()}}function Td(t,a){if(t&1&&(bs$1(0,`app-setting-item`,13),Dm$1(1,wd,3,8,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`sort-order-label`))(`showEdit`,!1)(`toggleOnViewClick`,!1)(`control`,a)}}function Md(t,a){if(t&1&&(bs$1(0,`div`,22),Um$1(1,23),Hm$1(2,`input`,26),Sw(),Mu()),t&2){let e=i_$1();i_$1(3);let i=p_$1(12),n=i_$1();Vm$1(`ngClass`,J_$1(4,fi,n.chapter.isbnLocked)),xb(),Vm$1(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,J_$1(6,gd,n.chapter)),xb(),Vm$1(`appFormField`,e),Aw()}}function Id(t,a){if(t&1&&(bs$1(0,`app-setting-item`,14),Dm$1(1,Md,3,8,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`isbn-label`))(`showEdit`,!1)(`toggleOnViewClick`,!1)(`control`,a)}}function Rd(t,a){if(t&1&&(bs$1(0,`option`,28),j_$1(1),rM(2,`titlecase`),Mu()),t&2){let e=a.$implicit;Vm$1(`value`,e.value),xb(),Ly(iM(2,2,e.title))}}function Vd(t,a){if(t&1&&(bs$1(0,`div`,22),Um$1(1,23),bs$1(2,`select`,27),CC(3,Rd,3,4,`option`,28,xd),Mu(),Sw(),Mu()),t&2){i_$1(4);let e=p_$1(12),i=i_$1();Vm$1(`ngClass`,J_$1(3,fi,i.chapter.ageRatingLocked)),xb(),Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,J_$1(5,hd,i.chapter)),xb(),Aw(),xb(),_C(i.ageRatings)}}function Ld(t,a){if(t&1&&DC(0,Vd,5,7,`div`,22),t&2){let e;bC((e=i_$1(4).editForm.get(`ageRating`))?0:-1,e)}}function Fd(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Pd(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Py(` `,e.title,` (`,e.isoCode,`) `)}}function Ad(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);return Mf(i_$1(5).updateLanguage(n))}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.languageLocked,n)||(r.chapter.languageLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.languageLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.languageLocked=!0)}),Dm$1(1,Fd,1,1,`ng-template`,null,3,lM)(3,Pd,1,2,`ng-template`,null,4,lM),Mu()}if(t&2){i_$1(2);let e=$_$1(15),i=i_$1(3);Vm$1(`settings`,e),jy(`locked`,i.chapter.languageLocked)}}function Nd(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Ad,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`language-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Dd(t,a){if(t&1&&(bs$1(0,`div`,22),Um$1(1,23),Hm$1(2,`input`,30),Sw(),Mu()),t&2){let e=i_$1();i_$1(3);let i=p_$1(12),n=i_$1();Vm$1(`ngClass`,J_$1(4,fi,n.chapter.releaseDateLocked)),xb(),Vm$1(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,J_$1(6,fd,n.chapter)),xb(),Vm$1(`appFormField`,e),Aw()}}function Od(t,a){if(t&1&&(bs$1(0,`app-setting-item`,20),Dm$1(1,Dd,3,8,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`release-date-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`control`,a)}}function $d(t,a){if(t&1&&(bs$1(0,`div`,22),Um$1(1,23),Hm$1(2,`textarea`,31),Sw(),Mu()),t&2){i_$1(4);let e=p_$1(12),i=i_$1();Vm$1(`ngClass`,J_$1(3,fi,i.chapter.summaryLocked)),xb(),Vm$1(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,J_$1(5,Cd,i.chapter)),xb(),Aw()}}function Ud(t,a){if(t&1&&DC(0,$d,3,7,`div`,22),t&2){let e;bC((e=i_$1(4).editForm.get(`summary`))?0:-1,e)}}function Bd(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,10),DC(2,Ed,3,4,`app-setting-item`,11),Mu(),bs$1(3,`div`,12),DC(4,Td,3,4,`app-setting-item`,13),Mu()(),bs$1(5,`div`,9)(6,`div`,10),DC(7,Id,3,4,`app-setting-item`,14),Mu(),bs$1(8,`div`,12)(9,`app-setting-item`,15),Dm$1(10,Ld,1,1,`ng-template`,null,2,lM),Mu()()(),bs$1(12,`div`,9)(13,`div`,16)(14,`div`,17),By(15),DC(16,Nd,3,3,`app-setting-item`,18),Mu()(),bs$1(17,`div`,19)(18,`div`,17),DC(19,Od,3,4,`app-setting-item`,20),Mu()()(),bs$1(20,`div`,9)(21,`div`,21)(22,`app-setting-item`,15),Dm$1(23,Ud,1,1,`ng-template`,null,2,lM),Mu()()()),t&2){let e,i,n,r,k=i_$1(2).$implicit,T=i_$1();xb(2),bC((e=T.editForm.get(`titleName`))?2:-1,e),xb(2),bC((i=T.editForm.get(`sortOrder`))?4:-1,i),xb(3),bC((n=T.editForm.get(`isbn`))?7:-1,n),xb(2),Vm$1(`title`,k(`age-rating-label`))(`showEdit`,!1)(`toggleOnViewClick`,!1),xb(6);let E=B_$1(T.languageSettings());xb(),bC(E?16:-1),xb(3),bC((r=T.editForm.get(`releaseDate`))?19:-1,r),xb(3),Vm$1(`title`,k(`
46summary-label`))(`showEdit`,!1)(`toggleOnViewClick`,!1)}}function Wd(t,a){if(t&1&&DC(0,Bd,25,12),t&2)bC(i_$1(2).accountService.hasAdminRole()?0:-1)}function qd(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Gd(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function zd(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updateGenres(n),Mf(r.chapter.genresLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.genresLocked,n)||(r.chapter.genresLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.genresLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.genresLocked=!0)}),Dm$1(1,qd,1,1,`ng-template`,null,3,lM)(3,Gd,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){i_$1(2);let e=$_$1(3),i=i_$1(3);Vm$1(`settings`,e),jy(`locked`,i.chapter.genresLocked)}}function jd(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,zd,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`genres-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Hd(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Yd(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function Kd(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updateTags(n),Mf(r.chapter.tagsLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.tagsLocked,n)||(r.chapter.tagsLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.tagsLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.tagsLocked=!0)}),Dm$1(1,Hd,1,1,`ng-template`,null,3,lM)(3,Yd,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){i_$1(2);let e=$_$1(7),i=i_$1(3);Vm$1(`settings`,e),jy(`locked`,i.chapter.tagsLocked)}}function Qd(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Kd,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`tags-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Jd(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Zd(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Xd(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Imprint),Mf(r.chapter.imprintLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.imprintLocked,n)||(r.chapter.imprintLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.imprintLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.imprintLocked=!0)}),Dm$1(1,Jd,1,1,`ng-template`,null,3,lM)(3,Zd,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.imprintLocked)}}function ep(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Xd,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`imprint-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function tp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function ip(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function np(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Publisher),Mf(r.chapter.publisherLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.publisherLocked,n)||(r.chapter.publisherLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.publisherLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.publisherLocked=!0)}),Dm$1(1,tp,1,1,`ng-template`,null,3,lM)(3,ip,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.publisherLocked)}}function op(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,np,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`publisher-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function ap(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function rp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function lp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Team),Mf(r.chapter.teamLocked=!0)}
46),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.teamLocked,n)||(r.chapter.teamLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.teamLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.teamLocked=!0)}),Dm$1(1,ap,1,1,`ng-template`,null,3,lM)(3,rp,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.teamLocked)}}function sp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,lp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`team-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function cp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function dp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function pp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Location),Mf(r.chapter.locationLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.locationLocked,n)||(r.chapter.locationLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.locationLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.locationLocked=!0)}),Dm$1(1,cp,1,1,`ng-template`,null,3,lM)(3,dp,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.locationLocked)}}function mp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,pp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`location-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function _p(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function up(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function gp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Character),Mf(r.chapter.characterLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.characterLocked,n)||(r.chapter.characterLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.characterLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.characterLocked=!0)}),Dm$1(1,_p,1,1,`ng-template`,null,3,lM)(3,up,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.characterLocked)}}function hp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,gp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`character-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function fp(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,32)(2,`div`,17),By(3),DC(4,jd,3,3,`app-setting-item`,18),Mu()(),bs$1(5,`div`,32)(6,`div`,17),By(7),DC(8,Qd,3,3,`app-setting-item`,18),Mu()()(),bs$1(9,`div`,9)(10,`div`,32)(11,`div`,17),DC(12,ep,3,3,`app-setting-item`,18),Mu()(),bs$1(13,`div`,32)(14,`div`,17),DC(15,op,3,3,`app-setting-item`,18),Mu()()(),bs$1(16,`div`,9)(17,`div`,32)(18,`div`,17),DC(19,sp,3,3,`app-setting-item`,18),Mu()(),bs$1(20,`div`,32)(21,`div`,17),DC(22,mp,3,3,`app-setting-item`,18),Mu()()(),bs$1(23,`div`,9)(24,`div`,33)(25,`div`,17),DC(26,hp,3,3,`app-setting-item`,18),Mu()()()),t&2){let e,i,n,r,k,T=i_$1(3);xb(3);let E=B_$1(T.genreSettings());xb(),bC(E?4:-1),xb(3);let $=B_$1(T.tagsSettings());xb(),bC($?8:-1),xb(4),bC((e=T.getPersonsSettings(T.PersonRole.Imprint))?12:-1,e),xb(3),bC((i=T.getPersonsSettings(T.PersonRole.Publisher))?15:-1,i),xb(4),bC((n=T.getPersonsSettings(T.PersonRole.Team))?19:-1,n),xb(3),bC((r=T.getPersonsSettings(T.PersonRole.Location))?22:-1,r),xb(4),bC((k=T.getPersonsSettings(T.PersonRole.Character))?26:-1,k)}}function Cp(t,a){if(t&1&&Dm$1(0,fp,27,9,`ng-template`,7),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.Tags)}function xp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function vp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function bp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Writer),Mf(r.chapter.writerLocked=!0)}
46),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.writerLocked,n)||(r.chapter.writerLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.writerLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.writerLocked=!0)}),Dm$1(1,xp,1,1,`ng-template`,null,3,lM)(3,vp,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.writerLocked)}}function Sp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,bp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`writer-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function yp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function kp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Ep(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.CoverArtist),Mf(r.chapter.coverArtistLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.coverArtistLocked,n)||(r.chapter.coverArtistLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.coverArtistLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.coverArtistLocked=!0)}),Dm$1(1,yp,1,1,`ng-template`,null,3,lM)(3,kp,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.coverArtistLocked)}}function wp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Ep,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`cover-artist-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Tp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Mp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Ip(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Penciller),Mf(r.chapter.pencillerLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.pencillerLocked,n)||(r.chapter.pencillerLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.pencillerLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.pencillerLocked=!0)}),Dm$1(1,Tp,1,1,`ng-template`,null,3,lM)(3,Mp,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.pencillerLocked)}}function Rp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Ip,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`penciller-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Vp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Lp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Fp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Colorist),Mf(r.chapter.coloristLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.coloristLocked,n)||(r.chapter.coloristLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.coloristLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.coloristLocked=!0)}),Dm$1(1,Vp,1,1,`ng-template`,null,3,lM)(3,Lp,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.coloristLocked)}}function Pp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Fp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`colorist-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Ap(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Np(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Dp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Inker),Mf(r.chapter.inkerLocked=!0)}
46),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.inkerLocked,n)||(r.chapter.inkerLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.inkerLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.inkerLocked=!0)}),Dm$1(1,Ap,1,1,`ng-template`,null,3,lM)(3,Np,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.inkerLocked)}}function Op(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Dp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`inker-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function $p(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Up(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Bp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Letterer),Mf(r.chapter.lettererLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.lettererLocked,n)||(r.chapter.lettererLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.lettererLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.lettererLocked=!0)}),Dm$1(1,$p,1,1,`ng-template`,null,3,lM)(3,Up,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.lettererLocked)}}function Wp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Bp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`letterer-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function qp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Gp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function zp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Editor),Mf(r.chapter.editorLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.editorLocked,n)||(r.chapter.editorLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.editorLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.editorLocked=!0)}),Dm$1(1,qp,1,1,`ng-template`,null,3,lM)(3,Gp,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.editorLocked)}}function jp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,zp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`editor-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Hp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Yp(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function Kp(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,29),fy(`selectedData`,function(n){_f(e);let r=i_$1(5);return r.updatePerson(n,r.PersonRole.Translator),Mf(r.chapter.translatorLocked=!0)}),Vy(`lockedChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.chapter.translatorLocked,n)||(r.chapter.translatorLocked=n),Mf(n)}),fy(`onUnlock`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.translatorLocked=!1)})(`newItemAdded`,function(){_f(e);let n=i_$1(5);return Mf(n.chapter.translatorLocked=!0)}),Dm$1(1,Hp,1,1,`ng-template`,null,3,lM)(3,Yp,1,1,`ng-template`,null,4,lM),Mu()}if(t&2){let e=i_$1(),i=i_$1(4);Vm$1(`settings`,e),jy(`locked`,i.chapter.translatorLocked)}}function Qp(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Kp,5,2,`ng-template`,null,2,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`translator-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Jp(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,32)(2,`div`,17),DC(3,Sp,3,3,`app-setting-item`,18),Mu()(),bs$1(4,`div`,32)(5,`div`,17),DC(6,wp,3,3,`app-setting-item`,18),Mu()()(),bs$1(7,`div`,9)(8,`div`,32)(9,`div`,17),DC(10,Rp,3,3,`app-setting-item`,18),Mu()(),bs$1(11,`div`,32)(12,`div`,17),DC(13,Pp,3,3,`app-setting-item`,18),Mu()()(),bs$1(14,`div`,9)(15,`div`,32)(16,`div`,17),DC(17,Op,3,3,`app-setting-item`,18),Mu()(),bs$1(18,`div`,32)(19,`div`,17),DC(20,Wp,3,3,`app-setting-item`,18),Mu()()(),bs$1(21,`div`,9)(22,`div`,32)(23,`div`,17),DC(24,jp,3,3,`app-setting-item`,18),Mu()(),bs$1(25,`div`,32)(26,`div`,17),DC(27,Qp,3,3,`app-setting-item`,18),Mu()()()),t&2){let e,i,n,r,k,T,E,$,F=i_$1(3);xb(3),bC((e=F.getPersonsSettings(F.PersonRole.Writer))?3:-1,e),xb(3),bC((i=F.getPersonsSettings(F.PersonRole.CoverArtist))?6:-1,i),xb(4),bC((n=F.getPersonsSettings(F.PersonRole.Penciller))?10:-1,n),xb(3),bC((r=F.getPersonsSettings(F.PersonRole.Colorist))?13:-1,r),xb(4),bC((k=F.getPersonsSettings(F.PersonRole.Inker))?17:-1,k),xb(3),bC((T=F.getPersonsSettings(F.PersonRole.Letterer))?20:-1,T),xb(4),bC((E=F.getPersonsSettings(F.PersonRole.Editor))?24:-1,E),xb(3),bC(($=F.getPersonsSettings(F.PersonRole.Translator))?27:-1,$)}}function Zp(t,a){if(t&1&&Dm$1(0,Jp,28,8,`ng-template`,7),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.People)}function Xp(t,a){if(t&1&&Hm$1(0,`app-edit-external-metadata-form`,34),t&2){let e=i_$1(3);Vm$1(`form`,e.editForm)(`entity`,e.chapter)}}
46function em(t,a){if(t&1&&Dm$1(0,Xp,1,2,`ng-template`,7),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.ExternalMetadataIds)}function tm(t,a){if(t&1){let e=AC();bs$1(0,`p`,35),j_$1(1),Mu(),bs$1(2,`app-cover-image-chooser`,36),fy(`coverChanged`,function(n){_f(e);return Mf(i_$1(3).handleCoverChanged(n))})(`resetClicked`,function(){_f(e);return Mf(i_$1(3).handleReset())}),Mu()}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Ou(` `,e(`cover-image-description`),` `),xb(),Vm$1(`config`,i.chooserConfig())}}function im(t,a){if(t&1&&Dm$1(0,tm,3,2,`ng-template`,7),t&2)Vm$1(`appEditTab`,i_$1(2).Tabs.CoverImage)}function nm(t,a){if(t&1&&(j_$1(0),rM(1,`compactNumber`)),t&2){let e=i_$1(2).$implicit;Ou(` `,e(`pages-count`,J_$1(3,Eo$1,iM(1,1,i_$1().chapter.pages))),` `)}}function om(t,a){if(t&1&&(j_$1(0),rM(1,`compactNumber`)),t&2){let e=i_$1(2).$implicit;Ou(` `,e(`words-count`,J_$1(3,Eo$1,iM(1,1,i_$1().chapter.wordCount))),` `)}}function am(t,a){if(t&1&&(j_$1(0),rM(1,`readTime`)),t&2)Ou(` `,iM(1,1,i_$1(3).chapter),` `)}function rm(t,a){if(t&1&&(j_$1(0),rM(1,`bytes`)),t&2)Ou(` `,iM(1,
461,i_$1(3).size),` `)}function lm(t,a){if(t&1&&(j_$1(0),rM(1,`utcToLocalTime`),rM(2,`defaultDate`)),t&2)Ou(` `,iM(2,4,sM(1,1,i_$1(3).chapter.createdUtc,`short`)),` `)}function sm(t,a){if(t&1&&j_$1(0),t&2)Ou(` `,i_$1(3).chapter.id,` `)}function cm(t,a){if(t&1&&(bs$1(0,`a`,41),rM(1,`safeHtml`),Hm$1(2,`app-image`,42),Mu()),t&2){let e=a.$implicit,i=i_$1(4);Vm$1(`href`,iM(1,4,e),qh)(`title`,e),xb(2),Vm$1(`imageUrl`,i.imageService.getWebLinkImage(e))(`errorImage`,i.imageService.errorWebLinkImage)}}function dm(t,a){if(t&1&&(Hm$1(0,`div`,37),bs$1(1,`div`,38)(2,`div`,9)(3,`h6`,39),j_$1(4),Mu(),bs$1(5,`div`,40),CC(6,cm,3,6,`a`,41,TC),Mu()()()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(4),Ly(e(`links-label`)),xb(2),_C(i.WebLinks)}}function pm(t,a){if(t&1&&(bs$1(0,`div`)(1,`span`),j_$1(2),Mu(),Hm$1(3,`span`,43),bs$1(4,`span`),j_$1(5),rM(6,`bytes`),Mu()()),t&2){let e=a.$implicit;xb(2),Ly(e.filePath),xb(3),Ly(iM(6,2,e.bytes))}}function mm(t,a){if(t&1&&CC(0,pm,7,4,`div`,null,vd),t&2)_C(i_$1(4).chapter.files)}function _m(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`app-setting-item`,18),Dm$1(2,mm,2,0,`ng-template`,null,2,lM),Mu()()),t&2){let e=i_$1(2).$implicit;xb(),Vm$1(`title`,e(`files-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function um(t,a){if(t&1&&(bs$1(0,`div`,9)(1,`div`,32)(2,`div`,17)(3,`app-setting-item`,18),Dm$1(4,nm,2,5,`ng-template`,null,2,lM),Mu()()(),bs$1(6,`div`,32)(7,`div`,17)(8,`app-setting-item`,18),Dm$1(9,om,2,5,`ng-template`,null,2,lM),Mu()()()(),bs$1(11,`div`,9)(12,`div`,32)(13,`div`,17)(14,`app-setting-item`,18),Dm$1(15,am,2,3,`ng-template`,null,2,lM),Mu()()(),bs$1(17,`div`,32)(18,`div`,17)(19,`app-setting-item`,18),Dm$1(20,rm,2,3,`ng-template`,null,2,lM),Mu()()()(),bs$1(22,`div`,9)(23,`div`,32)(24,`div`,17)(25,`app-setting-item`,18),Dm$1(26,lm,3,6,`ng-template`,null,2,lM),Mu()()(),bs$1(28,`div`,32)(29,`div`,17)(30,`app-setting-item`,18),Dm$1(31,sm,1,1,`ng-template`,null,2,lM),Mu()()()(),DC(33,dm,8,1),DC(34,_m,4,3,`div`,9)),t&2){let e=i_$1().$implicit,i=i_$1();xb(3),Vm$1(`title`,e(`pages-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`words-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(6),Vm$1(`title`,e(`read-time-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`size-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(6),Vm$1(`title`,e(`date-added-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,e(`id-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(3),bC(i.WebLinks.length>0?33:-1),xb(),bC(i.accountService.hasAdminRole()?34:-1)}}function gm(t,a){if(t&1){let e=AC();bs$1(0,`div`,44)(1,`app-setting-button`,45)(2,`button`,46),fy(`click`,function(){_f(e);let n=i_$1().$implicit;return Mf(i_$1(3).runTask(n))}),j_$1(3),Mu()()()}if(t&2){let e=i_$1().$implicit,i=i_$1(3);xb(),Vm$1(`subtitle`,e.description),xb(),N_$1(q_$1(`btn btn-`,e.action===i.Action.Delete?`danger`:`secondary`,` btn-sm mb-2`)),xb(),Ly(e.title)}}function hm(t,a){if(t&1&&DC(0,gm,4,5,`div`,44),t&2){let e=a.$implicit;bC(i_$1(3).accountService.canCurrentUserInvokeAction(e.action)?0:-1)}}function fm(t,a){if(t&1&&CC(0,hm,1,1,null,null,bd),t&2)_C(i_$1(2).tasks)}function Cm(t,a){if(t&1){let e=AC();bs$1(0,`span`,47),fy(`click`,function(){let n=_f(e),r=n.item,k=n.field;return Mf(i_$1(2).unlock(r,k))}),Hm$1(1,`i`,48),bs$1(2,`span`,49),j_$1(3),Mu()()}if(t&2){let e=i_$1().$implicit;xb(3),Ly(e(`field-locked-alt`))}}function xm(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`app-edit-modal-shell`,6),fy(`activeTabIdChange`,function(n){_f(e);return Mf(i_$1().changeTab(n))})(`close`,function(){_f(e);return Mf(i_$1().close())})(`save`,function(){_f(e);return Mf(i_$1().save())}),Dm$1(2,Sd,2,4,`ng-template`,null,0,lM)(4,Wd,1,1,`ng-template`,7),DC(5,Cp,1,1,null,7),DC(6,Zp,1,1,null,7),DC(7,em,1,1,null,7),DC(8,im,1,1,null,7),Dm$1(9,um,35,20,`ng-template`,7)(10,fm,2,0,`ng-template`,7),Mu(),Dm$1(11,Cm,4,1,`ng-template`,null,1,lM),Gs$1()}if(t&2){let e=a.$implicit,i=i_$1();xb(),Vm$1(`activeTabId`,i.activeId)(`formGroup`,i.editForm)(`translocoPrefix`,`edit-chapter-modal`)(`title`,e(`title`)),xb(3),Vm$1(`appEditTab`,i.Tabs.General),xb(),bC(i.accountService.hasAdminRole()?5:-1),xb(),bC(i.accountService.hasAdminRole()?6:-1),xb(),bC(i.accountService.hasAdminRole()?7:-1),xb(),bC(i.accountService.hasAdminRole()?8:-1),xb(),Vm$1(`appEditTab`,i.Tabs.Info),xb(),Vm$1(`appEditTab`,i.Tabs.Tasks)}}var vm=[ke$3.Edit,ke$3.IncognitoRead,ke$3.AddToReadingList];var wo$1=(()=>{class t{get WebLinks(){return this.chapter.webLinks===``?[]:this.chapter.webLinks.split(`,`)}constructor(){this.modal=E$2(F$6),this.imageService=E$2(we$3),this.uploadService=E$2(y$1),this.metadataService=E$2(Fe$3),this.cdRef=E$2(OB),this.accountService=E$2(yc$1),this.destroyRef=E$2(te$5),this.actionFactoryService=E$2(Qt),this.actionService=E$2(hi),this.downloadService=E$2(Tt$2),this.chapterService=E$2(Ui),this.breakpointService=E$2(W$1),this.coverChooserConfigFactory=E$2(it),this.typeaheadSettingsFactory=E$2(jn$1),this.activeId=me$1.General,this.editForm=new G$6({}),this.selectedCover=``,this.coverImageReset=!1,this.coverImageDirty=!1,this.chooserConfig=be$3({}),this.tagsSettings=be$3(null),this.languageSettings=be$3(null),this.peopleSettings=be$3({}),this.genreSettings=be$3(null),this.tags=[],this.genres=[],this.ageRatings=[],this.tasks=this.actionFactoryService.getActionablesForSettingsPage(this.actionFactoryService.getChapterActions(this.seriesId,this.library
46Id,this.libraryType),vm),this.size=0,this.Tabs=me$1,this.Action=ke$3,this.PersonRole=t$3,this.MangaFormat=e$2,eo$1(()=>{this.accountService.hasAdminRole()||(this.activeId=me$1.Info,this.cdRef.markForCheck())})}ngOnInit(){this.initChapter=Object.assign({},this.chapter),this.size=this.chapter.files.reduce((e,i)=>e+i.bytes,0),this.chooserConfig.set(this.coverChooserConfigFactory.forChapter(this.chapter,this.libraryType,this.seriesId)),this.editForm.addControl(`titleName`,new Z$2(this.chapter.titleName,[])),this.editForm.addControl(`sortOrder`,new Z$2(Math.max(0,this.chapter.sortOrder),{nonNullable:!0,validators:[Ce$3.required,Ce$3.min(0)]})),this.editForm.addControl(`summary`,new Z$2(this.chapter.summary||``,[])),this.editForm.addControl(`language`,new Z$2(this.chapter.language,[])),this.editForm.addControl(`isbn`,new Z$2(this.chapter.isbn,[])),this.editForm.addControl(`ageRating`,new Z$2(this.chapter.ageRating,[])),pt$1(this.editForm,this.chapter),this.chapter.releaseDate!==`0001-01-01T00:00:00`?this.editForm.addControl(`releaseDate`,new Z$2(this.chapter.releaseDate.substring(0,10),[])):this.editForm.addControl(`releaseDate`,new Z$2(``,[])),this.editForm.addControl(`genres`,new Z$2(this.chapter.genres,[])),this.editForm.addControl(`tags`,new Z$2(this.chapter.tags,[])),this.editForm.addControl(`coverImageLocked`,new Z$2(this.chapter.coverImageLocked,[])),this.languageSettings.set(this.typeaheadSettingsFactory.forLanguage({id:`language`,currentSelectedLanguage:this.chapter.language})),this.metadataService.getAllAgeRatings().subscribe(e=>{this.ageRatings=e,this.cdRef.markForCheck()}),this.editForm.get(`titleName`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(e=>{this.chapter.titleNameLocked=!0,this.cdRef.markForCheck()}),this.editForm.get(`sortOrder`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(e=>{this.chapter.sortOrderLocked=!0,this.cdRef.markForCheck()}),this.editForm.get(`isbn`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(e=>{this.chapter.isbnLocked=!0,this.cdRef.markForCheck()}),this.editForm.get(`ageRating`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(e=>{this.chapter.ageRatingLocked=!0,this.cdRef.markForCheck()}),this.editForm.get(`summary`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(e=>{this.chapter.summaryLocked=!0,this.cdRef.markForCheck()}),this.editForm.get(`releaseDate`)?.valueChanges.pipe(JB(this.destroyRef)).subscribe(e=>{this.chapter.releaseDateLocked=!0,this.cdRef.markForCheck()}),this.setupTypeaheads()}close(){this.coverImageReset?this.modal.close(s$3(this.chapter,!0)):this.modal.dismiss()}save(){let e=this.editForm.getRawValue();e.releaseDate===``?this.chapter.releaseDate=f:this.chapter.releaseDate=e.releaseDate+`T00:00:00`,this.chapter.ageRating=parseInt(e.ageRating+``,10),this.chapter.sortOrder=e.sortOrder,this.chapter.titleName=e.titleName,this.chapter.summary=e.summary,this.chapter.isbn=e.isbn,this.chapter.aniListId=e.aniListId,this.chapter.comicVineId=e.comicVineId,this.chapter.malId=e.malId,this.chapter.hardcoverId=e.hardcoverId,this.chapter.metronId=e.metronId,this.chapter.language=e.language;let i=[this.chapterService.updateChapter(this.chapter)],n=this.coverImageDirty||this.coverImageReset;this.coverImageDirty&&i.push(this.uploadService.updateChapterCoverImage(this.chapter.id,this.selectedCover,!0)),Mt$3(...i).subscribe(r=>{this.modal.close(s$3(e,n))})}unlock(e,i){e&&(e[i]=!e[i]),this.cdRef.markForCheck()}runTask(e){return D$5(this,null,function*(){switch(e.action){case ke$3.MarkAsRead:this.actionService.markChapterAsRead(this.libraryId,this.seriesId,this.chapter,i=>{this.chapter.pagesRead=i.pagesRead,this.cdRef.markForCheck()});break;case ke$3.MarkAsUnread:this.actionService.markChapterAsUnread(this.libraryId,this.seriesId,this.chapter,i=>{this.chapter.pagesRead=0,this.cdRef.markForCheck()});break;case ke$3.Delete:yield this.actionService.deleteChapter(this.chapter.id,i=>{i&&this.modal.close(r$3(this.chapter))});break;case ke$3.Download:this.downloadService.download(l$1.Chapter,this.chapter,this.libraryId,this.seriesId);break}})}setupTypeaheads(){this.tagsSettings.set(this.typeaheadSettingsFactory.forTag({id:`tags`,savedData:this.chapter.tags??[]})),this.genreSettings.set(this.typeaheadSettingsFactory.forGenre({id:`genres`,savedData:this.chapter.genres??[]})),this.setupPersonTypeahead()}setupPersonTypeahead(){let e=[[`writer`,t$3.Writer,this.chapter.writers],[`character`,t$3.Character,this.chapter.characters],[`colorist`,t$3.Colorist,this.chapter.colorists],[`cover-artist`,t$3.CoverArtist,this.chapter.coverArtists],[`editor`,t$3.Editor,this.chapter.editors],[`inker`,t$3.Inker,this.chapter.inkers],[`letterer`,t$3.Letterer,this.chapter.letterers],[`penciller`,t$3.Penciller,this.chapter.pencillers],[`publisher`,t$3.Publisher,this.chapter.publishers],[`imprint`,t$3.Imprint,this.chapter.imprints],[`translator`,t$3.Translator,this.chapter.translators],[`teams`,t$3.Team,this.chapter.team
46s],[`locations`,t$3.Location,this.chapter.locations]];this.metadataService.getAllPeople().pipe(JB(this.destroyRef)).subscribe(i=>{let n={};for(let[r,k,T]of e){let E=this.typeaheadSettingsFactory.forPerson({id:r,role:k});if(T&&T.length>0){let $=T.map(F=>F.id);E.savedData=i.filter(F=>$.includes(F.id)),this.metadataService.updatePerson(this.chapter,E.savedData,k)}n[k]=E}this.peopleSettings.set(n)})}updateTags(e){this.tags=e,this.chapter.tags=e,this.cdRef.markForCheck()}updateGenres(e){this.genres=e,this.chapter.genres=e,this.cdRef.markForCheck()}updatePerson(e,i){this.metadataService.updatePerson(this.chapter,e,i),this.chapter.locationLocked=!0,this.cdRef.markForCheck()}updateLanguage(e){if(e.length===0){this.chapter.language=``;return}this.chapter.language=e[0].isoCode,this.chapter.languageLocked=!0,this.cdRef.markForCheck()}handleCoverChanged(e){this.coverImageDirty=e.isDirty,this.selectedCover=e.fileName,this.cdRef.markForCheck()}handleReset(){this.coverImageReset=!0,this.editForm.patchValue({coverImageLocked:!1}),this.chooserConfig.set(x$3(w$4({},this.chooserConfig()),{isLocked:!1}))}getPersonsSettings(e){return this.peopleSettings()[e]}changeTab(e){e&&(this.activeId=e,this.cdRef.markForCheck())}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-chapter-modal`]],inputs:{chapter:`chapter`,libraryType:`libraryType`,libraryId:`libraryId`,seriesId:`seriesId`},decls:1,vars:1,consts:[[`title`,``],[`lock`,``],[`view`,``],[`badgeItem`,``],[`optionItem`,``],[4,`transloco`,`translocoPrefix`],[3,`activeTabIdChange`,`close`,`save`,`activeTabId`,`formGroup`,`translocoPrefix`,`title`],[3,`appEditTab`],[3,`libraryType`,`entity`,`prioritizeTitleName`],[1,`row`],[1,`col-md-9`,`col-sm-12`,`mb-3`],[3,`title`,`showEdit`,`toggleOnViewClick`,`control`],[1,`col-md-3`,`col-sm-12`,`mb-3`],[`labelId`,`sort-order`,3,`title`,`showEdit`,`toggleOnViewClick`,`control`],[`labelId`,`isbn`,3,`title`,`showEdit`,`toggleOnViewClick`,`control`],[3,`title`,`showEdit`,`toggleOnViewClick`],[1,`col-lg-9`,`col-md-12`],[1,`mb-3`],[3,`title`,`toggleOnViewClick`,`showEdit`],[1,`col-lg-3`,`col-md-12`],[3,`title`,`toggleOnViewClick`,`showEdit`,`control`],[1,`mb-3`,2,`width`,`100%`],[1,`input-group`,3,`ngClass`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`formControlName`,`titleName`,`type`,`text`,1,`form-control`,3,`appFormField`],[`formControlName`,`sortOrder`,`type`,`number`,`min`,`0`,`step`,`0.1`,`inputmode`,`numeric`,`id`,`sort-order`,`aria-describedby`,`sort-order-validations`,1,`form-control`,3,`appFormField`],[`formControlName`,`isbn`,`type`,`text`,`id`,`isbn`,`aria-describedby`,`isbn-validations`,1,`form-control`,3,`appFormField`],[`id`,`age-rating`,`formControlName`,`ageRating`,1,`form-select`],[3,`value`],[3,`selectedData`,`lockedChange`,`onUnlock`,`newItemAdded`,`settings`,`locked`],[`formControlName`,`releaseDate`,`type`,`date`,1,`form-control`,3,`appFormField`],[`id`,`summary`,`formControlName`,`summary`,`rows`,`4`,1,`form-control`],[1,`col-lg-6`,`col-md-12`,`pe-2`],[1,`col-lg-12`,`col-md-12`,`pe-2`],[3,`form`,`entity`],[`role`,`alert`,1,`alert`,`alert-warning`],[3,`coverChanged`,`resetClicked`,`config`],[1,`setting-section-break`],[1,`container-fluid`,`mb-3`],[1,`section-title`],[1,`col-auto`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`me-1`,3,`href`,`title`],[`height`,`24px`,`width`,`24px`,`aria-hidden`,`true`,3,`imageUrl`,`errorImage`],[1,`dot-separator`,`mx-2`],[1,`mt-3`,`mb-3`],[3,`subtitle`],[3,`click`],[1,`input-group-text`,`clickable`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-lock`],[1,`visually-hidden`]],template:function(i,n){i&1&&Dm$1(0,xm,13,11,`ng-container`,5),i&2&&Vm$1(`translocoPrefix`,`edit-chapter-modal`)},dependencies:[ai$1,ri$1,oi$1,Qe$5,vn,Et$1,ei$1,ti$1,Zt$2,Ct$3,li$1,fn$1,wn,Wt$3,cn,sn,us$1,F$2,O$1,Qe,yt$2,st$1,gi,Ut,w$6,gn,f$2,p$1,u$6,h$4,tn$1,et],styles:[`.lock-active[_ngcontent-%COMP%] > .input-group-text[_ngcontent-%COMP%]{background-color:var(--%NS%primary-color);color:#fff}
47/*# sourceMappingURL=edit-chapter-modal.component-D3T2JNGN.css.map */`]})}}return t})();var bm=t=>({collectionName:t});var Sm=t=>({duplicateName:t});var ym=(t,a)=>a.id;function km(t,a){if(t&1&&(bs$1(0,`label`,26),j_$1(1),Mu(),Hm$1(2,`input`,27),Sw(),Hm$1(3,`app-vali
47dation-errors`,28)),t&2){let e=a,i=i_$1(2).$implicit;xb(),Ly(i(`name-label`)),xb(),Vm$1(`appFormField`,e),Aw(),xb(),Vm$1(`control`,e)(`messages`,J_$1(4,Sm,i(`name-validation`)))}}function Em(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1(2).$implicit;Ly(e(`promote-tooltip`))}}function wm(t,a){if(t&1&&(bs$1(0,`form`,14)(1,`div`,15)(2,`div`,16),DC(3,km,4,6),Mu(),bs$1(4,`div`,17)(5,`div`,18),Hm$1(6,`input`,19),Sw(),bs$1(7,`label`,20),j_$1(8),Mu(),Hm$1(9,`i`,21),Dm$1(10,Em,1,1,`ng-template`,null,1,lM),bs$1(12,`span`,22),Um$1(13,23),Mu()()()(),bs$1(14,`div`,15)(15,`label`,24),j_$1(16),Mu(),Hm$1(17,`textarea`,25),Sw(),Mu()()),t&2){let e,i=p_$1(11),n=i_$1().$implicit,r=i_$1();Vm$1(`formGroup`,r.collectionTagForm),xb(3),bC((e=r.collectionTagForm.get(`title`))?3:-1,e),xb(3),Aw(),xb(2),Ly(n(`promote-label`)),xb(),Vm$1(`ngbTooltip`,i),xb(4),Vm$1(`ngTemplateOutlet`,i),xb(3),Ly(n(`summary-label`)),xb(),Aw()}}function Tm(t,a){if(t&1&&(bs$1(0,`div`,30)(1,`label`,36),j_$1(2),Mu(),bs$1(3,`div`,37),Hm$1(4,`input`,38),Sw(),Mu()()),t&2){let e=i_$1(4).$implicit;xb(2),Ly(e(`filter-label`)),xb(2),Vm$1(`placeholder`,e(`filter-label`))(`appFormField`,a),Aw()}}function Mm(t,a){if(t&1){let e=AC();bs$1(0,`li`,34)(1,`div`,31)(2,`input`,39),fy(`change`,function(){let n=_f(e).$implicit;return Mf(i_$1(5).handleSelection(n))}),Mu(),Sw(),bs$1(3,`label`,40),j_$1(4),Mu()()()}if(t&2){let e=a.$implicit,i=a.$index,n=i_$1(5);xb(2),Vm$1(`id`,q_$1(`series-`,i))(`disabled`,n.tag().source!==n.ScrobbleProvider.Kavita)(`ngModel`,n.selections.isSelected(e)),Aw(),xb(),Vm$1(`for`,q_$1(`series-`,i)),xb(),Py(``,e.name,` (`,n.libraryName(e.libraryId),`)`)}}function Im(t,a){if(t&1){let e=AC();bs$1(0,`div`,35)(1,`ngb-pagination`,41),Vy(`pageChange`,function(n){_f(e);let r=i_$1(5);return H_$1(r.pagination.currentPage,n)||(r.pagination.currentPage=n),Mf(n)}),fy(`pageChange`,function(n){_f(e);return Mf(i_$1(5).onPageChange(n))}),Mu()()}if(t&2){let e=i_$1(5);xb(),jy(`page`,e.pagination.currentPage),Vm$1(`pageSize`,e.pagination.itemsPerPage)(`rotate`,!1)(`ellipses`,!1)(`boundaryLinks`,!0)(`collectionSize`,e.pagination.totalItems)}}function Rm(t,a){if(t&1){let e=AC();bs$1(0,`div`,29)(1,`form`,14)(2,`div`,15),DC(3,Tm,5,3,`div`,30),Mu()(),bs$1(4,`div`,31)(5,`input`,32),fy(`change`,function(){_f(e);return Mf(i_$1(4).toggleAll())}),Mu(),Sw(),bs$1(6,`label`,33),j_$1(7),Mu()(),bs$1(8,`ul`),CC(9,Mm,5,8,`li`,34,ym),rM(11,`filter`),Mu(),DC(12,Im,2,6,`div`,35),Mu()}if(t&2){let e,i=i_$1(3).$implicit,n=i_$1();xb(),Vm$1(`formGroup`,n.formGroup),xb(2),bC((e=n.formGroup.get(`filter`))?3:-1,e),xb(2),Vm$1(`disabled`,n.tag().source!==n.ScrobbleProvider.Kavita)(`ngModel`,n.selectAll)(`indeterminate`,n.hasSomeSelected),Aw(),xb(2),Ly(n.selectAll?i(`deselect-all`):i(`select-all`)),xb(2),_C(sM(11,7,n.series,n.filterList)),xb(3),bC(n.pagination&&n.series.length!==0&&n.pagination.totalPages>1?12:-1)}}function Vm(t,a){if(t&1&&DC(0,Rm,13,10,`div`,29),t&2)bC(i_$1(3).isLoading?-1:0)}function Lm(t,a){if(t&1&&(bs$1(0,`li`,7)(1,`a`,8),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,Vm,1,1,`ng-template`,9),Mu()),t&2){let e=i_$1(2);Vm$1(`ngbNavItem`,e.Tabs.Series),xb(2),Ly(iM(3,2,e.Tabs.Series))}}function Fm(t,a){if(t&1){let e=AC();bs$1(0,`app-cover-image-chooser`,42),fy(`coverChanged`,function(n){_f(e);return Mf(i_$1(2).handleCoverChanged(n))})(`resetClicked`,function(){_f(e);return Mf(i_$1(2).handleReset())}),Mu()}if(t&2)Vm$1(`config`,i_$1(2).chooserConfig())}function Pm(t,a){if(t&1&&(bs$1(0,`h6`),j_$1(1),Mu(),bs$1(2,`div`,46),Hm$1(3,`p`,47),rM(4,`safeHtml`),Mu()),t&2){i_$1();let e=$_$1(26),i=i_$1(2).$implicit;xb(),Ly(i(`missing-series-title`)),xb(2),Vm$1(`innerHTML`,iM(4,2,e),$h)}}function Am(t,a){if(t&1&&(bs$1(0,`div`,43)(1,`div`,44)(2,`div`),j_$1(3),Mu(),bs$1(4,`div`),j_$1(5),rM(6,`utcToLocalTime`),rM(7,`defaultDate`),Mu()(),bs$1(8,`div`,44)(9,`div`),j_$1(10),Mu(),bs$1(11,`a`,45),rM(12,`safeUrl`),j_$1(13),Mu()()(),bs$1(14,`div`,43)(15,`div`,44)(16,`div`),j_$1(17),Mu(),bs$1(18,`div`),j_$1(19),rM(20,`number`),Mu()(),bs$1(21,`div`,44)(22,`div`),j_$1(23),Mu(),bs$1(24,`div`),j_$1(25),Mu()()(),By(26),DC(27,Pm,5,4)),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(3),Ly(e(`last-sync-title`)),xb(2),Ly(iM(7,13,sM(6,10,i.tag().lastSyncUtc,`shortDate`))),xb(5),Ly(e(`source-url-title`)),xb(),Vm$1(`href`,iM(12,15,i.tag().sourceUrl),qh),xb(2),Ly(i.tag().sourceUrl),xb(4),Ly(e(`total-series-title`)),xb(2),Ly(iM(20,17,i.tag().totalSourceCount)),xb(4),Ly(e(`missing-series-title`)),xb(2),Ly(i.tag().totalSourceCount-i.series.length),xb();let n=B_$1(i.tag().missingSeriesFromSource);xb(),bC(n!==null&&i.tag().totalSourceCount-i.series.length>0?27:-1)}}function Nm(t,a){if(t&1&&(bs$1(0,`li`,7)(1,`a`,8),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,Am,28,20,`ng-template`,9),Mu()),t&2){let e=i_$1(2);Vm$1(`ngbNavItem`,e.Tabs.Info),xb(2),Ly(iM(3,2,e.Tabs.Info))}}function Dm(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,3)(2,`h4`,4),j_$1(3),Mu(),bs$1(4,`button`,5),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Mu()(),bs$1(5,`div`)(6,`ul`,6,0),Vy(`activeIdChange`,function(n){_f(e);let r=i_$1();return H_$1(r.active,n)||(r.active=n),Mf(n)}),bs$1(8,`li`,7)(9,`a`,8),j_$1(10),rM(11,`tabTitle`),Mu(),Dm$1(12,wm,18,6,`ng-template`,9),Mu(),DC(13,Lm,5,4,`li`,7),bs$1(14,`li`,7)(15,`a`,8),j_$1(16),rM(17,`tabTitle`),Mu(),Dm$1(18,Fm,1,1,`ng-template`,9),Mu(),DC(19,Nm,5,4,`li`,7),Mu(),Hm$1(20,`div`,10),Mu(),bs$1(21,`div`,11)(22,`button`,12),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),j_$1(23),Mu(),bs$1(24,`button`,13),fy(`click`,function(){_f(e);return Mf(i_$1().save())}),j_$1(25),Mu()(),Gs$1()}if(t&2){let e=a.$implicit,i=p_$1(7),n=i_$1();xb(3),Ly(e(`title`,J_$1(25,bm,n.tag().title))),xb(),jm$1(`aria-label`,e(`close`)),xb(),N_$1(q_$1(`modal-body scrollable-modal `,n.breakpointService.isMobile()?``:`d-flex`)),xb(),Vm$1(`orientation`,U_$1(n.breakpointService.isMobile()?`horizontal`:`vertical`)),jy(`activeId`,n.active),xb(2),Vm$1(`ngbNavItem`,n.Tabs.General),xb(2),Ly(iM(11,21,n.Tabs.General)),xb(3),bC(n.tag().source===n.ScrobbleProvider.Kavita?13:-1),xb(),Vm$1(`ngbNavItem`,n.Tabs.CoverImage),xb(2),Ly(iM(17,23,n.Tabs.CoverImage)),xb(3),bC(n.tag().source!==n.ScrobbleProvider.Kavita?19:-1),xb(),N_$1(q_$1(`tab-content `,n.breakpointService.isMobile()?`mt-3`:`ms-4 flex-fill`)),Vm$1(`ngbNavOutlet`,i),xb(3),Ly(e(`cancel`)),xb(),Vm$1(`disabled`,n.collectionTagForm.invali
47d),xb(),Ly(e(`save`))}}var To$1=(()=>{class t{get hasSomeSelected(){return this.selections!=null&&this.selections.hasSomeSelected()}constructor(){this.modal=E$2(F$6),this.utilityService=E$2(w$5),this.destroyRef=E$2(te$5),this.seriesService=E$2(N$2),this.collectionService=E$2(S$8),this.toastr=E$2(Bt$3),this.confirmService=E$2(bi),this.libraryService=E$2(S$5),this.imageService=E$2(we$3),this.uploadService=E$2(y$1),this.cdRef=E$2(OB),this.accountService=E$2(yc$1),this.breakpointService=E$2(W$1),this.coverChooserConfigFactory=E$2(it),this.tag=TB.required(),this.series=[],this.isLoading=!0,this.selectAll=!0,this.active=me$1.General,this.selectedCover=``,this.coverImageDirty=!1,this.coverImageReset=!1,this.chooserConfig=be$3({}),this.formGroup=new G$6({filter:new Z$2(``,[])}),this.filterList=e=>{let i=(this.formGroup.get(`filter`)?.value||``).toLowerCase();return e.name.toLowerCase().indexOf(i)>=0||e.localizedName.toLowerCase().indexOf(i)>=0},this.Tabs=me$1,this.ScrobbleProvider=i$2,eo$1(()=>{this.accountService.hasPromoteRole()||(this.collectionTagForm.get(`promoted`)?.disable(),this.cdRef.markForCheck())})}ngOnInit(){this.pagination??={totalPages:1,totalItems:200,itemsPerPage:200,currentPage:0};let e=this.tag();this.collectionTagForm=new G$6({title:new Z$2(e.title,{nonNullable:!0,validators:[Ce$3.required]}),summary:new Z$2(e.summary,{nonNullable:!0,validators:[]}),coverImageLocked:new Z$2(e.coverImageLocked,{nonNullable:!0,validators:[]}),promoted:new Z$2(e.promoted,{nonNullable:!0,validators:[]})}),e.source!==i$2.Kavita&&(this.collectionTagForm.get(`title`)?.disable(),this.collectionTagForm.get(`summary`)?.disable()),this.collectionTagForm.get(`title`)?.valueChanges.pipe(Ed$1(100),Dd$1(),Sd$1(i=>this.collectionService.tagNameExists(i)),xd$1(i=>{let n=this.collectionTagForm.get(`title`)?.value===this.tag().title;!i||n?this.collectionTagForm.get(`title`)?.setErrors(null):this.collectionTagForm.get(`title`)?.setErrors({duplicateName:!0}),this.cdRef.markForCheck()}),JB(this.destroyRef)).subscribe(),this.loadSeries()}onPageChange(e){this.pagination.currentPage=e,this.loadSeries()}toggleAll(){this.selectAll=!this.selectAll,this.series.forEach(e=>this.selections.toggle(e,this.selectAll)),this.cdRef.markForCheck()}loadSeries(){Wv([this.seriesService.getSeriesForTag(this.tag().id,this.pagination.currentPage,this.pagination.itemsPerPage),this.libraryService.getLibraryNames()]).subscribe(e=>{let i=e[0];this.pagination=i.pagination,this.series=i.result,this.chooserConfig.set(this.coverChooserConfigFactory.forCollection(this.tag(),this.series)),this.selections=new N$3(!0,this.series),this.isLoading=!1,this.libraryNames=e[1],this.cdRef.markForCheck()})}handleSelection(e){this.selections.toggle(e);let i=this.selections.selected().length;i==0?this.selectAll=!1:i==this.series.length&&(this.selectAll=!0),this.cdRef.markForCheck()}libraryName(e){return this.libraryNames[e]}close(){this.coverImageReset?this.modal.close(s$3(this.tag(),!0)):this.modal.dismiss()}save(){return D$5(this,null,function*(){let e=this.selections.unselected().map(T=>T.id),i=this.collectionTagForm.value;if(i.id=this.tag().id,i.title=this.collectionTagForm.get(`title`).value,i.summary=this.collectionTagForm.get(`summary`).value,e.length==this.series.length&&!(yield this.confirmService.confirm(Mt$4(`toasts.no-series-collection-warning`))))return;
47let n=null,r=[this.collectionService.updateTag(i).pipe(xd$1(T=>n=T))],k=this.selections.unselected().map(T=>T.id);k.length>0&&r.push(this.collectionService.updateSeriesForTag(i,k)),this.coverImageDirty&&r.push(this.uploadService.updateCollectionCoverImage(this.tag().id,this.selectedCover)),Mt$3(...r).pipe(Fd$1(10),mI()).subscribe(()=>{this.toastr.success(Mt$4(`toasts.collection-updated`)),this.modal.close(s$3(n??i,this.coverImageDirty))})})}handleCoverChanged(e){this.coverImageDirty=e.isDirty,this.selectedCover=e.fileName,this.cdRef.markForCheck()}handleReset(){this.coverImageReset=!0,this.collectionTagForm.patchValue({coverImageLocked:!1}),this.chooserConfig.set(x$3(w$4({},this.chooserConfig()),{isLocked:!1}))}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-collection-tags`]],inputs:{tag:[1,`tag`]},decls:1,vars:1,consts:[[`nav`,`ngbNav`],[`promotedTooltip`,``],[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[`id`,`modal-basic-title`,1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[`ngbNav`,``,1,`nav-pills`,2,`min-width`,`8.4375rem`,3,`activeIdChange`,`activeId`,`orientation`],[3,`ngbNavItem`],[`ngbNavLink`,``],[`ngbNavContent`,``],[3,`ngbNavOutlet`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-secondary`,3,`click`],[`type`,`button`,1,`btn`,`btn-primary`,3,`click`,`disabled`],[3,`formGroup`],[1,`row`,`g-0`,`mb-3`],[1,`col-md-8`,`col-sm-12`],[1,`col-md-3`,`col-sm-12`,`ms-2`],[1,`form-check`,`form-switch`],[`type`,`checkbox`,`id`,`tag-promoted`,`role`,`switch`,`formControlName`,`promoted`,`switch`,``,`aria-labelledby`,`auto-close-label`,`aria-describedby`,`tag-promoted-help`,1,`form-check-input`],[`for`,`tag-promoted`,1,`form-check-label`,`me-1`],[`aria-hidden`,`true`,`placement`,`left`,`role`,`button`,`tabindex`,`0`,1,`fa`,`fa-info-circle`,3,`ngbTooltip`],[`id`,`tag-promoted-help`,1,`visually-hidden`],[3,`ngTemplateOutlet`],[`for`,`summary`,1,`form-label`],[`id`,`summary`,`formControlName`,`summary`,`rows`,`3`,1,`form-control`],[`for`,`library-name`,1,`form-label`],[`id`,`library-name`,`formControlName`,`title`,`type`,`text`,`aria-describedby`,`library-name-validations`,1,`form-control`,3,`appFormField`],[`inputId`,`library-name`,3,`control`,`messages`],[1,`list-group`],[1,`col-md-12`],[1,`form-check`],[`id`,`select-all`,`type`,`checkbox`,1,`form-check-input`,3,`change`,`disabled`,`ngModel`,`indeterminate`],[`for`,`select-all`,1,`form-check-label`],[1,`list-group-item`],[1,`d-flex`,`justify-content-center`],[`for`,`filter`,1,`visually-hidden`],[1,`input-group`],[`id`,`filter`,`type`,`text`,`formControlName`,`filter`,1,`form-control`,3,`placeholder`,`appFormField`],[`type`,`checkbox`,1,`form-check-input`,3,`change`,`id`,`disabled`,`ngModel`],[1,`form-check-label`,3,`for`],[3,`pageChange`,`page`,`pageSize`,`rotate`,`ellipses`,`boundaryLinks`,`collectionSize`],[3,`coverChanged`,`resetClicked`,`config`],[1,`row`,`g-0`,`mb-2`],[1,`col-md-6`],[`rel`,`noopener noreferrer`,`target`,`_blank`,3,`href`],[1,`row`,`g-0`],[3,`innerHTML`]],template:function(i,n){i&1&&Dm$1(0,Dm,26,27,`ng-container`,2),i&2&&Vm$1(`translocoPrefix`,`edit-collection-tags`)},dependencies:[D$1,ne,Ve,ue$2,li$1,ii$2,Qe$5,It$1,ei$1,ti$1,fn$1,wn,ai$1,pn$1,We,Qe,Ke$1,Y$4,Ct$3,cn,G$7,w$6,o,p$1,tn$1,u$1,Cn,u$6,qe],styles:[`.form-switch[_ngcontent-%COMP%]{margin-top:2.4rem}
48/*# sourceMappingURL=edit-collection-tags-modal.component-7QMUQY5U.css.map */`]})}}return t})();var Om=t=>({personName:t});var $m=t=>[t];function Um(t,a){if(t&1&&(Hm$1(0,`input`,24),Sw()),t&2)Vm$1(`appFormField`,i_$1()),Aw()}function Bm(t,a){if(t&1&&(bs$1(0,`app-setting-item`,18),Dm$1(1,Um,1,1,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`name-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`control`,a)}}function Wm(t,a){if(t&1&&(Hm$1(0,`input`,25),Sw()),t&2)Vm$1(`appFormField`,i_$1()),Aw()}function qm(t,a){if(t&1&&(bs$1(0,`app-setting-item`,20),Dm$1(1,Wm,1,1,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit,i=i_$1();Vm$1(`title`,e(`mal-id-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`subtitle`,e(`mal-tooltip`+i.tooltip))(`control`,a)}}function Gm(t,a){if(t&1&&(Hm$1(0,`input`,26),Sw()),t&2)Vm$1(`appFormField`,i_$1()),Aw()}function zm(t,a){if(t&1&&(bs$1(0,`app-setting-item`,20),Dm$1(1,Gm,1,1,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit,i=i_$1();Vm$1(`title`,e(`anilist-id-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`subtitle`,e(`anilist-tooltip`+i.tooltip))(`control`,a)}}function jm(t,a){if(t&1&&(Hm$1(0,`input`,27),Sw()),t&2)Vm$1(`appFormField`,i_$1()),Aw()}function Hm(t,a){if(t&1&&(bs$1(0,`app-setting-item`,20),Dm$1(1,jm,1,1,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`hardcover-id-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`subtitle`,e(`hardcover-tooltip`))(`control`,a)}}
48function Ym(t,a){if(t&1&&(Hm$1(0,`input`,28),Sw()),t&2)Vm$1(`appFormField`,i_$1()),Aw()}function Km(t,a){if(t&1&&(bs$1(0,`app-setting-item`,20),Dm$1(1,Ym,1,1,`ng-template`,null,1,lM),Mu()),t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`asin-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)(`subtitle`,e(`asin-tooltip`))(`control`,a)}}function Qm(t,a){t&1&&(bs$1(0,`div`,29),Hm$1(1,`textarea`,30),Sw(),Mu()),t&2&&(xb(),Aw())}function Jm(t,a){if(t&1&&(bs$1(0,`div`,16)(1,`div`,17),DC(2,Bm,3,4,`app-setting-item`,18),Mu()(),bs$1(3,`div`,16)(4,`div`,19),DC(5,qm,3,5,`app-setting-item`,20),Mu(),bs$1(6,`div`,21),DC(7,zm,3,5,`app-setting-item`,20),Mu()(),bs$1(8,`div`,16)(9,`div`,19),DC(10,Hm,3,5,`app-setting-item`,20),Mu(),bs$1(11,`div`,21),DC(12,Km,3,5,`app-setting-item`,20),Mu()(),bs$1(13,`div`,16)(14,`div`,22)(15,`app-setting-item`,23),Dm$1(16,Qm,2,0,`ng-template`,null,1,lM),Mu()()()),t&2){let e,i,n,r,k,T=i_$1(2).$implicit,E=i_$1();xb(2),bC((e=E.editForm.get(`name`))?2:-1,e),xb(3),bC((i=E.editForm.get(`malId`))?5:-1,i),xb(2),bC((n=E.editForm.get(`aniListId`))?7:-1,n),xb(3),bC((r=E.editForm.get(`hardcoverId`))?10:-1,r),xb(2),bC((k=E.editForm.get(`asin`))?12:-1,k),xb(3),Vm$1(`title`,T(`description-label`))(`toggleOnViewClick`,!1)(`showEdit`,!1)}}function Zm(t,a){if(t&1){let e=AC();bs$1(0,`h5`),j_$1(1),Mu(),bs$1(2,`div`,31),j_$1(3),Mu(),bs$1(4,`app-edit-list`,32),fy(`updateItems`,function(n){_f(e);let r=i_$1(3);return Mf(r.person.aliases=n)}),Mu()}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Ly(e(`aliases-label`)),xb(2),Ly(e(`aliases-tooltip`)),xb(),Vm$1(`items`,i.person.aliases)(`asyncValidators`,J_$1(6,$m,i.aliasValidator()))(`errorMessage`,e(`alias-overlap`))(`label`,e(`aliases-label`))}}function Xm(t,a){if(t&1){let e=AC();bs$1(0,`p`,33),j_$1(1),Mu(),bs$1(2,`button`,34),fy(`click`,function(){_f(e);return Mf(i_$1(3).downloadCover())}),j_$1(3),Mu(),bs$1(4,`app-cover-image-chooser`,35),fy(`coverChanged`,function(n){_f(e);return Mf(i_$1(3).handleCoverChanged(n))})(`resetClicked`,function(){_f(e);return Mf(i_$1(3).handleReset())}),Mu()}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Py(` `,e(`cover-image-description`),` `,e(`cover-image-description-extra`),` `),xb(),Vm$1(`disabled`,i.fetchDisabled),xb(),Ly(e(`download-coversdb`)),xb(),Vm$1(`config`,i.chooserConfig())}}function e_(t,a){if(t&1){let e=AC();bs$1(0,`div`,3)(1,`div`,4)(2,`h4`,5),j_$1(3),Mu(),bs$1(4,`button`,6),fy(`click`,function(){_f(e);return Mf(i_$1(2).close())}),Mu()(),bs$1(5,`div`)(6,`form`,7)(7,`ul`,8,0),Vy(`activeIdChange`,function(n){_f(e);let r=i_$1(2);return H_$1(r.active,n)||(r.active=n),Mf(n)}),bs$1(9,`li`,9)(10,`a`,10),j_$1(11),rM(12,`tabTitle`),Mu(),Dm$1(13,Jm,18,8,`ng-template`,11),Mu(),bs$1(14,`li`,9)(15,`a`,10),j_$1(16),rM(17,`tabTitle`),Mu(),Dm$1(18,Zm,5,8,`ng-template`,11),Mu(),bs$1(19,`li`,9)(20,`a`,10),j_$1(21),rM(22,`tabTitle`),Mu(),Dm$1(23,Xm,5,5,`ng-template`,11),Mu()()(),Hm$1(24,`div`,12),Mu(),bs$1(25,`div`,13)(26,`button`,14),fy(`click`,function(){_f(e);return Mf(i_$1(2).close())}),j_$1(27),Mu(),bs$1(28,`button`,15),fy(`click`,function(){_f(e);return Mf(i_$1(2).save())}),j_$1(29),Mu()()()}if(t&2){let e=p_$1(8),i=i_$1().$implicit,n=i_$1();xb(3),Ou(` `,i(`title`,J_$1(28,Om,n.person.name))),xb(),jm$1(`aria-label`,i(`close`)),xb(),N_$1(q_$1(`modal-body scrollable-modal `,n.breakpointService.isMobile()?``:`d-flex`)),xb(),Vm$1(`formGroup`,n.editForm),xb(),Vm$1(`orientation`,U_$1(n.breakpointService.isMobile()?`horizontal`:`vertical`)),jy(`activeId`,n.active),xb(2),Vm$1(`ngbNavItem`,n.Tabs.General),xb(2),Ly(iM(12,22,n.Tabs.General)),xb(3),Vm$1(`ngbNavItem`,n.Tabs.Aliases),xb(2),Ly(iM(17,24,n.Tabs.Aliases)),xb(3),Vm$1(`ngbNavItem`,n.Tabs.CoverImage),xb(2),Ly(iM(22,26,n.Tabs.CoverImage)),xb(3),N_$1(q_$1(`tab-content `,n.breakpointService.isMobile()?`mt-3`:`ms-4 flex-fill`)),Vm$1(`ngbNavOutlet`,e),xb(3),Ly(i(`close`)),xb(),Vm$1(`disabled`,!n.editForm.valid),xb(),Ly(i(`save`))}}function t_(t,a){if(t&1&&(xu(0),DC(1,e_,30,30,`div`,3),Gs$1()),t&2){let e=i_$1();xb(),bC(e.person!==void 0?1:-1)}}var Mo$1=(()=>{class t{constructor(){this.utilityService=E$2(w$5),this.modal=E$2(F$6),this.cdRef=E$2(OB),this.personService=E$2(Bi),this.uploadService=E$2(y$1),this.imageService=E$2(we$3),this.accountService=E$2(yc$1),this.toastr=E$2(Bt$3),this.breakpointService=E$2(W$1),this.coverChooserConfigFactory=E$2(it),this.Tabs=me$1,this.active=me$1.General,this.editForm=new G$6({name:new Z$2(``,[Ce$3.required]),description:new Z$2(``,[]),asin:new Z$2(``,[],[this.amazonCodeValidator()]),aniListId:new Z$2(``,[]),malId:new Z$2(``,[]),hardcoverId:new Z$2(``,[])}),this.selectedCover=``,this.coverImageReset=!1,this.coverImageDirty=!1,this.chooserConfig=be$3({}),this.fetchDisabled=!1,this.tooltip=``}ngOnInit(){if(this.person){this.editForm.get(`name`).setValue(this.person.name),this.editForm.get(`description`).setValue(this.person.description),this.editForm.get(`asin`).setValue(this.person.asin||``),this.editForm.get(`aniListId`).setValue((this.person.aniListId||``)+``),this.editForm.get(`malId`).setValue((this.person.malId||``)+``),this.editForm.get(`hardcoverId`).setValue(this.person.hardcoverId||``),this.editForm.addControl(`coverImageLocked`,new Z$2(this.person.coverImageLocked,[])),this.chooserConfig.set(this.coverChooserConfigFactory.forPerson(this.person));let e=this.person.roles??[];e.length===1&&e.includes(t$3.Character)&&(this.tooltip=`-character`),this.cdRef.markForCheck()}else alert(`no person`)}close(){this.coverImageReset?this.modal.close(s$3(this.person,!0)):this.modal.dismiss()}save(){let e=[],i={id:this.person.id,coverImageLocked:this.person.coverImageLocked,name:this.editForm.get(`name`).value||``,de
48scription:this.editForm.get(`description`).value||``,asin:this.editForm.get(`asin`).value||``,aniListId:this.editForm.get(`aniListId`).value===``?null:parseInt(this.editForm.get(`aniListId`).value,10),malId:this.editForm.get(`malId`).value===``?null:parseInt(this.editForm.get(`malId`).value,10),hardcoverId:this.editForm.get(`hardcoverId`).value||``,aliases:this.person.aliases};e.push(this.personService.updatePerson(i));let n=this.coverImageDirty||this.coverImageReset;this.coverImageDirty&&e.push(this.uploadService.updatePersonCoverImage(this.person.id,this.selectedCover,!0)),Mt$3(...e).subscribe(r=>{this.modal.close(s$3(i,n))})}handleCoverChanged(e){this.coverImageDirty=e.isDirty,this.selectedCover=e.fileName,this.cdRef.markForCheck()}handleReset(){this.coverImageReset=!0,this.editForm.patchValue({coverImageLocked:!1}),this.chooserConfig.set(x$3(w$4({},this.chooserConfig()),{isLocked:!1}))}downloadCover(){this.personService.downloadCover(this.person.id).subscribe(e=>{e&&(this.toastr.success(Mt$4(`toasts.person-image-downloaded`)),this.fetchDisabled=!0,this.coverChooser?.addImage({url:e,title:Mt$4(`cover-image-chooser.download-cover`)}),this.cdRef.markForCheck())})}aliasValidator(){return e=>{let i=e.value;if(!i||i.trim().length===0)return la$2(null);let n=this.editForm.get(`name`).value;return this.personService.isValidAlias(this.person.id,i,n).pipe(qe$2(r=>r?null:{invalidAlias:{alias:i}}))}}amazonCodeValidator(){return e=>{let i=e.value;return!i||i.trim().length===0?la$2(null):!i.toUpperCase().startsWith(`B0`)||!/^(B0|BT)[0-9A-Z]{8}$/.test(i.toUpperCase())?la$2({amazonCode:{asin:i}}):la$2(null)}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-person-modal`]],viewQuery:function(i,n){if(i&1&&my(Qe,5),i&2){let r;u_$1(r=d_$1())&&(n.coverChooser=r.first)}},inputs:{person:`person`},decls:1,vars:1,consts:[[`nav`,`ngbNav`],[`view`,``],[4,`transloco`,`translocoPrefix`],[1,`modal-container`],[1,`modal-header`],[1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[3,`formGroup`],[`ngbNav`,``,1,`nav-pills`,2,`min-width`,`8.4375rem`,3,`activeIdChange`,`activeId`,`orientation`],[3,`ngbNavItem`],[`ngbNavLink`,``],[`ngbNavContent`,``],[3,`ngbNavOutlet`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-secondary`,3,`click`],[`type`,`submit`,1,`btn`,`btn-primary`,3,`click`,`disabled`],[1,`row`,`g-0`],[1,`mb-3`],[3,`title`,`toggleOnViewClick`,`showEdit`,`control`],[1,`mb-3`,`col-md-6`,`col-xs-12`,`pe-2`],[3,`title`,`toggleOnViewClick`,`showEdit`,`subtitle`,`control`],[1,`mb-3`,`col-md-6`,`col-xs-12`],[1,`mb-3`,2,`width`,`100%`],[3,`title`,`toggleOnViewClick`,`showEdit`],[`formControlName`,`name`,`type`,`text`,1,`form-control`,3,`appFormField`],[`formControlName`,`malId`,`type`,`number`,1,`form-control`,3,`appFormField`],[`formControlName`,`aniListId`,`type`,`number`,1,`form-control`,3,`appFormField`],[`formControlName`,`hardcoverId`,`type`,`text`,1,`form-control`,3,`appFormField`],[`id`,`asin`,`formControlName`,`asin`,`type`,`text`,1,`form-control`,3,`appFormField`],[1,`input-group`],[`id`,`description`,`formControlName`,`description`,`rows`,`4`,1,`form-control`],[1,`text-muted`,`mb-2`],[3,`updateItems`,`items`,`asyncValidators`,`errorMessage`,`label`],[`role`,`alert`,1,`alert`,`alert-primary`],[1,`btn`,`btn-primary`,`mb-2`,`w-100`,3,`click`,`disabled`],[3,`coverChanged`,`resetClicked`,`config`]],template:function(i,n){i&1&&Dm$1(0,t_,2,1,`ng-container`,2),i&2&&Vm$1(`translocoPrefix`,`edit-person-modal`)},dependencies:[li$1,ii$2,Qe$5,vn,ei$1,ti$1,fn$1,wn,D$1,ne,Ct$3,ae,ue$2,Ke$1,Qe,Wt$3,Ve,_i,w$6,qe],encapsulation:2})}}return t})();var i_=[`badgeExpanderItem`];var n_=(t,a,e)=>({$implicit:t,idx:a,last:e});var o_=t=>({count:t});function a_(t,a){t&1&&(bs$1(0,`span`),j_$1(1,`, `),Mu())}function r_(t,a){if(t&1&&(Um$1(0,4),DC(1,a_,2,0,`span`)),t&2){let e=a.$implicit,i=a.$index,n=a.$count,r=i_$1(2);Vm$1(`ngTemplateOutlet`,r.itemTemplate())(`ngTemplateOutletContext`,eM(3,n_,e,i,i===n-1)),xb(),bC(i!==n-1&&r.includeComma()?1:-1)}}function l_(t,a){t&1&&(j_$1(0),rM(1,`defaultValue`)),t&2&&Ou(` `,iM(1,
481,null),` `)}function s_(t,a){if(t&1){let e=AC();bs$1(0,`a`,5),fy(`click`,function(){_f(e);return Mf(i_$1(2).toggleVisible())}),j_$1(1),Mu()}if(t&2){let e=i_$1().$implicit,i=i_$1();jm$1(`aria-expanded`,!i.isCollapsed()),xb(),Ou(` `,e(`more-items`,J_$1(2,o_,i.itemsLeft())),` `)}}function c_(t,a){if(t&1&&(xu(0),bs$1(1,`div`,1)(2,`div`,2),CC(3,r_,2,7,null,null,TC,!1,l_,2,3),DC(6,s_,2,4,`a`,3),Mu()(),Gs$1()),t&2){let e=i_$1();xb(3),_C(e.visibleItems()),xb(3),bC(e.isCollapsed()&&e.itemsLeft()!==0?6:-1)}}var Io$1=(()=>{class t{constructor(){this.items=TB.required(),this.itemsTillExpander=TB(4),this.allowToggle=TB(!0),this.includeComma=TB(!0),this.defaultExpanded=TB(!1),this.toggled=wB(),this.itemTemplate=NB(`badgeExpanderItem`),this.isCollapsed=be$3(void 0),this.visibleItems=it$3(()=>{let e=this.items(),i=this.isCollapsed(),n=this.itemsTillExpander();return i?e.slice(0,n):e}),this.itemsLeft=it$3(()=>{let e=this.items(),i=this.visibleItems();return e.length-i.length})}ngOnInit(){this.isCollapsed.set(!this.defaultExpanded())}toggleVisible(){this.toggled.emit(void 0),this.allowToggle()&&this.isCollapsed.update(e=>!e)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-badge-expander`]],contentQueries:function(i,n,r){i&1&&yy(r,n.itemTemplate,i_,5),i&2&&f_$1()},inputs:{items:[1,`items`],itemsTillExpander:[1,`itemsTillExpander`],allowToggle:[1,`allowToggle`],includeComma:[1,`includeComma`],defaultExpanded:[1,`defaultExpanded`]},outputs:{toggled:`toggled`},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`badge-expander`],[1,`content`],[`href`,`javascript:void(0);`,`type`,`button`,1,`dark-exempt`,`btn-icon`,`ms-1`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`href`,`javascript:void(0);`,`type`,`button`,1,`dark-exempt`,`btn-icon`,`ms-1`,3,`click`]],template:function(i,n){i&1&&Dm$1(0,c_,7,2,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`badge-expander`)},dependencies:[Ct$3,cn,f$9],styles:[`.content[_ngcontent-%COMP%]{width:100%}.collapsed[_ngcontent-%COMP%]{height:2.1875rem;overflow:hidden}  .badge-expander .content a,   .badge-expander .content span{font-size:.8rem}
49/*# sourceMappingURL=badge-expander.component-FRJWQ6H5.css.map */`]})}}return t})();var d_=t=>({personName:t});function p_(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function m_(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function __(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,18),fy(`selectedData`,function(n){_f(e);return Mf(i_$1(3).updatePerson(n))}),Dm$1(1,p_,1,1,`ng-template`,null,1,lM)(3,m_,1,1,`ng-template`,null,2,lM),Mu()}if(t&2){i_$1();let e=$_$1(0),i=i_$1(2);Vm$1(`settings`,e)(`unFocus`,i.typeAheadUnfocus)}}function u_(t,a){if(t&1&&(By(0),DC(1,__,5,2,`app-typeahead`,17)),t&2){let e=B_$1(i_$1(2).typeAheadSettings());xb(),bC(e?1:-1)}}function g_(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e,` `)}}function h_(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.name,` `)}}function f_(t,a){if(t&1&&(bs$1(0,`h5`,20),j_$1(1),Mu(),bs$1(2,`app-badge-expander`,19),Dm$1(3,h_,1,1,`ng-template`,null,3,lM),Mu()),t&2){let e=i_$1(2).$implicit;xb(),Ly(e(`known-for-title`)),xb(),Vm$1(`items`,a)}}function C_(t,a){if(t&1&&(bs$1(0,`div`,10)(1,`div`,11)(2,`div`,12)(3,`h5`),j_$1(4),Mu(),bs$1(5,`app-badge-expander`,19),Dm$1(6,g_,1,1,`ng-template`,null,3,lM),Mu(),DC(8,f_,5,2),rM(9,`async`),Mu()()()),t&2){let e,i=i_$1().$implicit,n=i_$1();xb(4),Ly(i(`alias-title`)),xb(),Vm$1(`items`,n.allNewAliases()),xb(3),bC((e=iM(9,3,n.knownFor$))?8:-1,e)}}function x_(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,5)(2,`div`,6)(3,`h4`,7),j_$1(4),Mu(),bs$1(5,`button`,8),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Mu()()(),bs$1(6,`div`,9)(7,`div`,10)(8,`div`,11)(9,`div`,12)(10,`app-setting-item`,13),Dm$1(11,u_,2,2,`ng-template`,null,0,lM),Mu()()()(),DC(13,C_,10,5,`div`,10),Mu(),bs$1(14,`div`,14)(15,`button`,15),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),j_$1(16),Mu(),bs$1(17,`button`,16),fy(`click`,function(){_f(e);return Mf(i_$1().save())}),j_$1(18),Mu()(),Gs$1()}if(t&2){let e=a.$implicit,i=i_$1();xb(4),Ou(` `,e(`title`,J_$1(10,d_,i.person().name))),xb(),jm$1(`aria-label`,e(`close`)),xb(5),Vm$1(`title`,e(`src`))(`subtitle`,e(`merge-warning`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(3),bC(i.mergee()?13:-1),xb(3),Ly(e(`close`)),xb(),Vm$1(`disabled`,i.mergee()===null),xb(),Ly(e(`save`))}}var Ro$1=(()=>{class t{constructor(){this.personService=E$2(Bi),this.utilityService=E$2(w$5),this.destroyRef=E$2(te$5),this.modal=E$2(F$6),this.typeaheadSettingsFactory=E$2(jn$1),this.typeAheadSettings=be$3(null),this.typeAheadUnfocus=new ht$3,this.person=TB.required(),this.mergee=be$3(null),this.knownFor$=null,this.allNewAliases=it$3(()=>{let e=this.mergee();return e?[e.name,...e.aliases]:[]}),this.FilterField=n$2}save(){let e=this.mergee();if(!e){this.close();return}this.personService.mergePerson(this.person().id,e.id).subscribe(i=>{this.modal.close(s$3(i))})}close(){this.modal.dismiss()}ngOnInit(){this.typeAheadSettings.set(this.typeaheadSettingsFactory.forPerson({id:`merge-person-modal-typeahead`,addIfNonExisting:!1,overrides:{fetchFn:e=>e.length==0?la$2([]):this.personService.searchPerson(e).pipe(qe$2(i=>i.filter(n=>this.utilityService.filter(n.name,e)&&n.id!=this.person().id))),multiple:!1}}))}
49updatePerson(e){e.length!=0&&(this.typeAheadUnfocus.emit(this.typeAheadSettings().id),this.mergee.set(e[0]),this.knownFor$=this.personService.getSeriesMostKnownFor(this.mergee().id).pipe(JB(this.destroyRef)))}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-merge-person-modal`]],inputs:{person:[1,`person`]},decls:1,vars:1,consts:[[`view`,``],[`badgeItem`,``],[`optionItem`,``],[`badgeExpanderItem`,``],[4,`transloco`,`translocoPrefix`],[1,`modal-container`],[1,`modal-header`],[1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[1,`modal-body`,`scrollable-modal`,`d-flex`,`flex-column`,2,`min-height`,`18.75rem`],[1,`row`],[1,`col-lg-12`,`col-md-12`,`pe-2`],[1,`mb-3`],[3,`title`,`subtitle`,`toggleOnViewClick`,`showEdit`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-secondary`,3,`click`],[`type`,`submit`,1,`btn`,`btn-primary`,3,`click`,`disabled`],[3,`settings`,`unFocus`],[3,`selectedData`,`settings`,`unFocus`],[3,`items`],[1,`mt-2`]],template:function(i,n){i&1&&Dm$1(0,x_,19,12,`ng-container`,4),i&2&&Vm$1(`translocoPrefix`,`merge-person-modal`)},dependencies:[Ct$3,us$1,Wt$3,Io$1,fn],encapsulation:2})}}return t})();var Qi=(()=>{class t{constructor(){this.httpClient=E$2(ue$6),this.baseUrl=i$1.apiUrl}saveFilter(e){let i=De$2.getApiRoutePrefixForEntityType(`filter/update/`,e.entityType);return this.httpClient.post(this.baseUrl+i,e)}getAllFilters(){return this.httpClient.get(this.baseUrl+`filter`)}deleteFilter(e){return this.httpClient.delete(this.baseUrl+`filter?filterId=`+e)}renameSmartFilter(e){return this.httpClient.post(this.baseUrl+`filter/rename?filterId=${e.id}&name=${e.name.trim()}`,{})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var v_=t=>({name:t});var b_=t=>({duplicateName:t});function S_(t,a){if(t&1&&(Hm$1(0,`input`,10),Sw(),Hm$1(1,`app-validation-errors`,11)),t&2){let e=a,i=i_$1().$implicit;Vm$1(`appFormField`,e),Aw(),xb(),Vm$1(`control`,e)(`messages`,J_$1(3,b_,i(`filter-name-unique`)))}}function y_(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,1)(2,`h4`,2),j_$1(3),rM(4,`sentenceCase`),Mu(),bs$1(5,`button`,3),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Mu()(),bs$1(6,`form`,4)(7,`div`,5)(8,`label`,6),j_$1(9),Mu(),DC(10,S_,2,5),Mu()(),bs$1(11,`div`,7)(12,`button`,8),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),j_$1(13),Mu(),bs$1(14,`button`,9),fy(`click`,function(){_f(e);return Mf(i_$1().save())}),j_$1(15),Mu()(),Gs$1()}if(t&2){let e,i=a.$implicit,n=i_$1();xb(3),Ou(` `,i(`edit-smart-filter`,J_$1(10,v_,iM(4,8,n.smartFilter().name))),` `),xb(2),jm$1(`aria-label`,i(`close`)),xb(),Vm$1(`formGroup`,n.smartFilterForm),xb(3),Ly(i(`name-label`)),xb(),bC((e=n.smartFilterForm.get(`name`))?10:-1,e),xb(3),Ly(i(`cancel`)),xb(),Vm$1(`disabled`,!n.smartFilterForm.valid),xb(),Ly(i(`save`))}}var Vo$1=(()=>{class t{constructor(){this.modal=E$2(F$6),this.filterService=E$2(Qi),this.destroyRef=E$2(te$5),this.smartFilterForm=new G$6({name:new Z$2(``,[Ce$3.required])}),this.smartFilter=CB.required(),this.allFilters=be$3([])}ngOnInit(){this.filterService.getAllFilters().subscribe(e=>{this.allFilters.set(e)}),this.smartFilterForm.get(`name`).setValue(this.smartFilter().name),this.smartFilterForm.get(`name`).valueChanges.pipe(Ed$1(100),Dd$1(),Sd$1(e=>{return la$2(this.allFilters().find(n=>n.id!==this.smartFilter().id&&n.name===e)!==void 0)}),xd$1(e=>{let i=this.smartFilter().name===this.smartFilterForm.get(`name`).value,n=this.smartFilterForm.get(`name`).value.trim().length===0;!e||i?n||this.smartFilterForm.get(`name`).setErrors(null):this.smartFilterForm.get(`name`).setErrors({duplicateName:!0})}),JB(this.destroyRef)).subscribe()}close(){this.modal.dismiss()}save(){this.smartFilter.update(e=>(e.name=this.smartFilterForm.get(`name`).value,e)),this.filterService.renameSmartFilter(this.smartFilter()).subscribe({next:()=>{this.modal.close(s$3(this.smartFilter()))},error:()=>{this.modal.dismiss()}})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-edit-smart-filter-modal`]],inputs:{smartFilter:[1,`smartFilter`]},outputs:{smartFilter:`smartFilterChange`},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[`id`,`modal-basic-title`,1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[3,`formGroup`],[1,`m-3`],[`for`,`smart-filter-title`,1,`form-label`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-light`,3,`click`],[`type`,`button`,1,`btn`,`btn-primary`,3,`click`,`disabled`],[`id`,`smart-filter-title`,`formControlName`,`name`,`type`,`text`,`aria-describedby`,`smart-filter-title-validations`,1,`form-control`,3,`appFormField`],[`inputId`,`smart-filter-title`,3,`control`,`messages`]],template:function(i,n){i&1&&Dm$1(0,y_,16,12,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`manage-smart-filters`)},dependencies:[Ct$3,li$1,ii$2,Qe$5,ei$1,ti$1,fn$1,wn,w$6,G$7,s$4],encapsulation:2})}}return t})();var Lo$1=(()=>{class t{constructor(){this.httpClient=E$2(ue$6),this.baseUrl=i$1.apiUrl}
49getDashboardStreams(e=!0){return this.httpClient.get(this.baseUrl+`stream/dashboard?visibleOnly=`+e)}updateDashboardStreamPosition(e,i,n,r){return this.httpClient.post(this.baseUrl+`stream/update-dashboard-position`,{streamName:e,id:i,fromPosition:n,toPosition:r},e$1)}updateDashboardStream(e){return this.httpClient.post(this.baseUrl+`stream/update-dashboard-stream`,e,e$1)}createDashboardStream(e){return this.httpClient.post(this.baseUrl+`stream/add-dashboard-stream?smartFilterId=`+e,{})}deleteSmartFilterStream(e){return this.httpClient.delete(this.baseUrl+`stream/smart-filter-dashboard-stream?dashboardStreamId=`+e,{})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var hi=(()=>{class t{constructor(){this.chapterService=E$2(Ui),this.volumeService=E$2($i),this.libraryService=E$2(S$5),this.seriesService=E$2(N$2),this.readerService=E$2(ft$1),this.toastr=E$2(Bt$3),this.modalService=E$2(st$4),this.confirmService=E$2(bi),this.memberService=E$2(f$7),this.deviceService=E$2(_),this.collectionTagService=E$2(S$8),this.readingListService=E$2(x$6),this.collectionService=E$2(S$8),this.downloadService=E$2(Tt$2),this.readingProfilesService=E$2(b$3),this.router=E$2(J$7),this.annotationsService=E$2(O$2),this.sideNavService=E$2(X$3),this.filterService=E$2(Qi),this.dashboardService=E$2(Lo$1),this.readingListModalRef=null,this.collectionModalRef=null}handleLibraryAction(e,i){if(!i.hasOwnProperty(`id`)||i.id===void 0)return la$2(this.fromAction(e,i,`none`));switch(e.action){case ke$3.Scan:return this.libraryService.scan(i.id,!1).pipe(xd$1(()=>this.toastr.info(Mt$4(`toasts.scan-queued`,{name:i.name}))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.RefreshMetadata:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-regen-covers`))).pipe(We$5(n=>n),Sd$1(()=>this.libraryService.refreshMetadata(i.id,!0,!1)),xd$1(()=>this.toastr.info(Mt$4(`toasts.refresh-covers-queued`,{name:i.name}))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.GenerateColorScape:return this.libraryService.refreshMetadata(i.id,!1,!1).pipe(xd$1(()=>this.toastr.info(Mt$4(`toasts.generate-colorscape-queued`,{name:i.name}))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.Delete:return $e$5(this.confirmService.alert(Mt$4(`toasts.confirm-library-delete`))).pipe(We$5(n=>n),Sd$1(()=>this.libraryService.delete(i.id)),xd$1(()=>this.toastr.info(Mt$4(`toasts.library-deleted`,{name:i.name}))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Edit:{let n=this.modalService.open(Fo$1,At$2());return n.componentInstance.library=i,this.handleEditModal(n,e,i)}case ke$3.SetReadingProfile:return this.setReadingProfileForLibrary(i),la$2(this.fromAction(e,i,`none`));case ke$3.ClearReadingProfile:return this.readingProfilesService.clearLibraryProfiles(i.id).pipe(xd$1(()=>this.toastr.success(Mt$4(`actionable.cleared-profile`))),qe$2(()=>this.fromAction(e,i,`none`)));default:return la$2(this.fromAction(e,i,`none`))}}handleSeriesAction(e,i){switch(e.action){case ke$3.MarkAsRead:case ke$3.MarkAsReadWithSession:let n=e.action===ke$3.MarkAsReadWithSession;return this.seriesService.markRead(i.id,n).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.entity-read`,{name:i.name}))),qe$2(()=>this.fromAction(e,x$3(w$4({},i),{pagesRead:i.pages}),`update`)));case ke$3.MarkAsUnread:return this.seriesService.markUnread(i.id).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.entity-unread`,{name:i.name}))),qe$2(()=>this.fromAction(e,x$3(w$4({},i),{pagesRead:0}),`update`)));case ke$3.Scan:return this.seriesService.scan(i.libraryId,i.id).pipe(xd$1(()=>this.toastr.info(Mt$4(`toasts.scan-queued`,{name:i.name}))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.RefreshMetadata:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-regen-covers`))).pipe(We$5(r=>r),Sd$1(()=>this.seriesService.refreshMetadata(i,!0,!1)),xd$1(()=>this.toastr.info(Mt$4(`toasts.refresh-covers-queued`,{name:i.name}))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.GenerateColorScape:return this.seriesService.refreshMetadata(i,!1,!1).pipe(xd$1(()=>this.toastr.info(Mt$4(`toasts.generate-colorscape-queued`,{name:i.name}))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.AnalyzeFiles:return this.seriesService.analyzeFiles(i.library
49Id,i.id).pipe(xd$1(()=>this.toastr.info(Mt$4(`toasts.scan-queued`,{name:i.name}))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-series`))).pipe(We$5(r=>r),Sd$1(()=>this.seriesService.delete(i.id)),xd$1(()=>this.toastr.success(Mt$4(`toasts.series-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Edit:{let r=this.modalService.open(So$1,At$2());return r.componentInstance.series=i,this.handleEditModal(r,e,i)}case ke$3.Match:{let r=this.modalService.open(tn,At$2());return r.setInput(`series`,i),$e$5(r.closed).pipe(We$5(k=>k),qe$2(()=>this.fromAction(e,i,`reload`)))}case ke$3.AddToReadingList:{if(this.readingListModalRef!=null)return at$3;let r=this.modalService.open(lt$5,Nt$3());return this.readingListModalRef=r,r.setInput(`title`,i.name),r.setInput(`showCreate`,!0),r.setInput(`createLabel`,Mt$4(`add-to-list-modal.reading-list-label`)),r.setInput(`inputItems`,[]),r.setInput(`loading`,!0),r.setInput(`createInitialValue`,i.name),this.readingListService.getReadingLists(!1,!0).pipe(lt$3(1),ua$2(()=>at$3),bd$1(()=>r.setInput(`loading`,!1))).subscribe(k=>{r.setInput(`inputItems`,k.result.map(T=>({label:T.title,value:T})))}),r.setInput(`interceptCreate`,k=>this.readingListService.createList(k).pipe(Sd$1(T=>this.readingListService.updateBySeries(T.id,i.id)),xd$1(()=>this.toastr.success(Mt$4(`toasts.series-added-to-reading-list`))))),r.setInput(`interceptConfirm`,k=>{let T=k;this.readingListService.updateBySeries(T.id,i.id).subscribe(()=>{this.toastr.success(Mt$4(`toasts.series-added-to-reading-list`)),r.close()})}),new M$3(k=>{r.closed.subscribe(()=>{this.readingListModalRef=null,k.next(this.fromAction(e,i,`none`)),k.complete()}),r.dismissed.subscribe(()=>{this.readingListModalRef=null,k.complete()})})}case ke$3.AddToCollection:{if(this.collectionModalRef!=null)return at$3;let r=this.modalService.open(lt$5,Nt$3());this.collectionModalRef=r;let k=[i.id];return r.setInput(`title`,Mt$4(`bulk-add-to-collection.title`)),r.setInput(`showCreate`,!0),r.setInput(`createLabel`,Mt$4(`bulk-add-to-collection.collection-label`)),r.setInput(`createInitialValue`,Mt$4(`actionable.new-collection`)),r.setInput(`inputItems`,[]),r.setInput(`loading`,!0),this.collectionService.allCollections(!0,!0).pipe(lt$3(1),ua$2(()=>at$3),bd$1(()=>r.setInput(`loading`,!1))).subscribe(T=>{let E=T.filter($=>$.source===i$2.Kavita);r.setInput(`inputItems`,E.map($=>({label:$.title,value:$})))}),r.setInput(`interceptCreate`,T=>this.collectionService.addByMultiple(0,k,T).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.series-added-to-collection`,{collectionName:T}))))),r.setInput(`interceptConfirm`,T=>{let E=T;this.collectionService.addByMultiple(E.id,k,``).subscribe(()=>{this.toastr.success(Mt$4(`toasts.series-added-to-collection`,{collectionName:E.title})),r.close()})}),new M$3(T=>{r.closed.subscribe(()=>{this.collectionModalRef=null,T.next(this.fromAction(e,i,`none`)),T.complete()}),r.dismissed.subscribe(()=>{this.collectionModalRef=null,T.complete()})})}case ke$3.Download:return this.downloadService.download(l$1.Series,i,i.libraryId,i.id),la$2(this.fromAction(e,i,`none`));case ke$3.AddToWantToReadList:return this.memberService.addSeriesToWantToRead([i.id]).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.series-added-want-to-read`))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.RemoveFromWantToReadList:return this.memberService.removeSeriesToWantToRead([i.id]).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.series-removed-want-to-read`))),qe$2(()=>this.fromAction(e,i,`reload`)));case ke$3.RemoveFromOnDeck:return this.seriesService.removeFromOnDeck(i.id).pipe(qe$2(()=>this.fromAction(e,i,`reload`)));case ke$3.SendTo:{let r=e._extra.data;return this.deviceService.sendSeriesToEmailDevice(i.id,r.id).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.file-send-to`,{name:r.name}))),qe$2(()=>this.fromAction(e,i,`none`)))}case ke$3.SetReadingProfile:return this.setReadingProfileForMultiple([i]),la$2(this.fromAction(e,i,`none`));case ke$3.ClearReadingProfile:return this.readingProfilesService.clearSeriesProfiles(i.id).pipe(xd$
491(()=>this.toastr.success(Mt$4(`actionable.cleared-profile`))),qe$2(()=>this.fromAction(e,i,`none`)));default:return la$2(this.fromAction(e,i,`none`))}}handleVolumeAction(e,i,n,r,k){switch(e.action){case ke$3.MarkAsRead:case ke$3.MarkAsReadWithSession:let T=e.action===ke$3.MarkAsReadWithSession;return this.readerService.markVolumeRead(n,i.id,T).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.mark-read`))),qe$2(()=>{let E=x$3(w$4({},i),{pagesRead:i.pages,chapters:i.chapters?.map($=>x$3(w$4({},$),{pagesRead:$.pages}))});return this.fromAction(e,E,`update`)}));case ke$3.MarkAsUnread:return this.readerService.markVolumeUnread(n,i.id).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.mark-unread`))),qe$2(()=>{let E=x$3(w$4({},i),{pagesRead:0,chapters:i.chapters?.map($=>x$3(w$4({},$),{pagesRead:0}))});return this.fromAction(e,E,`update`)}));case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-volume`))).pipe(We$5(E=>E),Sd$1(()=>this.volumeService.deleteVolume(i.id)),We$5(E=>E),xd$1(()=>this.toastr.success(Mt$4(`toasts.volume-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Edit:{let E=this.modalService.open(ko$1,At$2());return E.componentInstance.volume=i,E.componentInstance.libraryType=k,E.componentInstance.seriesId=n,E.componentInstance.libraryId=r,this.handleEditModal(E,e,i)}case ke$3.AddToReadingList:{if(this.readingListModalRef!=null)return at$3;let E=this.modalService.open(lt$5,Nt$3());return this.readingListModalRef=E,E.setInput(`title`,Mt$4(`add-to-list-modal.title`)),E.setInput(`showCreate`,!0),E.setInput(`createLabel`,Mt$4(`add-to-list-modal.reading-list-label`)),E.setInput(`inputItems`,[]),E.setInput(`loading`,!0),this.readingListService.getReadingLists(!1,!0).pipe(lt$3(1),ua$2(()=>at$3),bd$1(()=>E.setInput(`loading`,!1))).subscribe($=>{E.setInput(`inputItems`,$.result.map(F=>({label:F.title,value:F})))}),E.setInput(`interceptCreate`,$=>this.readingListService.createList($).pipe(Sd$1(F=>this.readingListService.updateByVolume(F.id,n,i.id)),xd$1(()=>this.toastr.success(Mt$4(`toasts.volumes-added-to-reading-list`))))),E.setInput(`interceptConfirm`,$=>{let F=$;this.readingListService.updateByVolume(F.id,n,i.id).subscribe(()=>{this.toastr.success(Mt$4(`toasts.volumes-added-to-reading-list`)),E.close()})}),new M$3($=>{E.closed.subscribe(()=>{this.readingListModalRef=null,$.next(this.fromAction(e,i,`none`)),$.complete()}),E.dismissed.subscribe(()=>{this.readingListModalRef=null,$.complete()})})}case ke$3.IncognitoRead:if(i.chapters!=null&&i.chapters.length>=1){let E=[...i.chapters].sort(($,F)=>$.minNumber-F.minNumber);this.readerService.readChapter(r,n,E[0],!0)}return la$2(this.fromAction(e,i,`none`));case ke$3.SendTo:{let E=e._extra.data;return this.deviceService.sendToEmailDevice(i.chapters.map($=>$.id),E.id).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.file-send-to`,{name:E.name}))),qe$2(()=>this.fromAction(e,i,`none`)))}case ke$3.Download:return this.downloadService.download(l$1.Volume,i,r,n),la$2(this.fromAction(e,i,`none`));default:return la$2(this.fromAction(e,i,`none`))}}handleChapterAction(e,i,n,r,k){switch(e.action){case ke$3.MarkAsRead:case ke$3.MarkAsReadWithSession:let T=e.action===ke$3.MarkAsReadWithSession;return this.readerService.markChapterRead(n,i.id,T).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.mark-read`))),qe$2(()=>{let F=x$3(w$4({},i),{pagesRead:i.pages});return this.fromAction(e,F,`update`)}));case ke$3.MarkAsUnread:return this.readerService.saveProgress(r,n,i.volumeId,i.id,0).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.mark-unread`))),qe$2(()=>{let F=x$3(w$4({},i),{pagesRead:0});return this.fromAction(e,F,`update`)}));case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-chapter`))).pipe(We$5(F=>F),Sd$1(()=>this.chapterService.deleteChapter(i.id)),We$5(F=>F),xd$1(()=>this.toastr.success(Mt$4(`toasts.chapter-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Download:return this.downloadService.download(l$1.Chapter,i,r,n),la$2(this.fromAction(e,i,`none`));case ke$3.Edit:let E=this.modalService.open(wo$1,At$2());return E.componentInstance.chapter=i,E.componentInstance.libraryType=k,E.componentInstance.seriesId=n,E.componentInstance.libraryId=r,this.handleEditModal(E,e,i);case ke$3.AddToReadingList:{if(this.readingListModalRef!=null)return at$3;let F=this.modalService.open(lt$5,Nt$3());return this.readingListModalRef=F,F.setInput(`title`,Mt$4(`add-to-list-modal.title`)),F.setInput(`showCreate`,!0),F.setInput(`createLabel`,Mt$4(`add-to-list-modal.reading-list-label`)),F.setInput(`inputItems`,[]),F.setInput(`loading`,!0),this.readingListService.getReadingLists(!1,!0).pipe(lt$3(1),ua$2(()=>at$3),bd$1(()=>F.setInput(`loading`,!1))).subscribe(me=>{F.setInput(`inputItems`,me.result.map(We=>({label:We.title,value:We})))}),F.setInput(`interceptCreate`,me=>this.readingListService.createList(me).pipe(Sd$1(We=>this.readingListService.updateByChapter(We.id,n,i.id)),xd$1(()=>this.toastr.success(Mt$4(`toasts.chapter-added-to-reading-list`))))),F.setInput(`interceptConfirm`,me=>{let We=me;this.readingListService.updateByChapter(We.id,n,i.id).subscribe(()=>{this.toastr.success(Mt$4(`toasts.chapter-added-to-reading-list`)),F.close()})}),new M$3(me=>{F.closed.subscribe(()=>{this.readingListModalRef=null,me.next(this.fromAction(e,i,`none`)),me.complete()}),F.dismissed.subscribe(()=>{this.readingListModalRef=null,me.complete()})})}case ke$3.IncognitoRead:return this.readerService.readChapter(r,n,i,!0),la$2(this.fromAction(e,i,`none`));case ke$3.SendTo:let $=e._extra.data;return this.deviceService.sendToEmailDevice([i.id],$.id).pipe(xd$
491(()=>this.toastr.success(Mt$4(`toasts.file-send-to`,{name:$.name}))),qe$2(()=>this.fromAction(e,i,`none`)));default:return la$2(this.fromAction(e,i,`none`))}}handleBookmarkAction(e,i,n){let r=n();switch(e.action){case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`bookmarks.confirm-single-delete`,{seriesName:r.seriesName}))).pipe(We$5(k=>k),Sd$1(()=>this.readerService.clearBookmarks(r.seriesId)),xd$1(()=>this.toastr.success(Mt$4(`bookmarks.delete-single-success`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Download:return this.downloadService.download(l$1.Bookmark,[i],0,0),la$2(this.fromAction(e,i,`none`));case ke$3.ViewSeries:return this.router.navigate([`library`,r.libraryId,`series`,r.seriesId]),la$2(this.fromAction(e,i,`none`));default:return la$2(this.fromAction(e,i,`none`))}}handleReadingListAction(e,i){switch(e.action){case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-reading-list`))).pipe(We$5(r=>r),Sd$1(()=>this.readingListService.delete(i.id)),xd$1(()=>this.toastr.success(Mt$4(`toasts.reading-list-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Download:return this.downloadService.download(l$1.ReadingList,i,0,0),la$2(this.fromAction(e,i,`none`));case ke$3.Edit:let n=this.modalService.open(Xi,At$2());return n.componentInstance.readingList=i,this.handleEditModal(n,e,i);case ke$3.RefreshMetadata:return this.readingListService.refreshCover(i.id).pipe(qe$2(()=>this.fromAction(e,w$4({},i),`none`)));case ke$3.Promote:return this.readingListService.promoteMultipleReadingLists([i.id],!0).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.reading-list-promoted`))),qe$2(()=>this.fromAction(e,x$3(w$4({},i),{promoted:!0}),`update`)));case ke$3.UnPromote:return this.readingListService.promoteMultipleReadingLists([i.id],!1).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.reading-list-unpromoted`))),qe$2(()=>this.fromAction(e,x$3(w$4({},i),{promoted:!1}),`update`)));case ke$3.ExportAsV1:return this.downloadService.exportReadingList(i.id,i.title).pipe(qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.ExportAsV2:return this.downloadService.exportReadingList(i.id,i.title,!0).pipe(qe$2(()=>this.fromAction(e,i,`none`)));default:return la$2(this.fromAction(e,i,`none`))}}handleCollectionAction(e,i){switch(e.action){case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-collection`))).pipe(We$5(r=>r),Sd$1(()=>this.collectionService.deleteTag(i.id)),xd$1(()=>this.toastr.success(Mt$4(`toasts.collection-tag-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Edit:let n=this.modalService.open(To$1,At$2());return n.setInput(`tag`,i),this.handleEditModal(n,e,i);case ke$3.Promote:return this.collectionService.promoteMultipleCollections([i.id],!0).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.collections-promoted`))),qe$2(()=>this.fromAction(e,x$3(w$4({},i),{promoted:!0}),`update`)));case ke$3.UnPromote:return this.collectionService.promoteMultipleCollections([i.id],!1).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.collections-unpromoted`))),qe$2(()=>this.fromAction(e,x$3(w$4({},i),{promoted:!1}),`update`)));case ke$3.Download:return this.downloadService.download(l$1.Collection,i,0,0),la$2(this.fromAction(e,i,`none`));default:return la$2(this.fromAction(e,i,`none`))}}handleAnnotationAction(e,i){switch(e.action){case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-annotations`))).pipe(We$5(n=>n),Sd$1(()=>this.annotationsService.bulkDelete([i.id])),xd$1(()=>this.toastr.success(Mt$4(`toasts.annotations-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Export:return this.annotationsService.exportAnnotations([i.id]).pipe(qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.Like:return this.annotationsService.likeAnnotations([i.id]).pipe(qe$2(()=>this.fromAction(e,i,`update`)));case ke$3.UnLike:return this.annotationsService.unLikeAnnotations([i.id]).pipe(qe$2(()=>this.fromAction(e,i,`update`)));default:return la$2(this.fromAction(e,i,`none`))}}handleClientDeviceAction(e,i){switch(e.action){case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-client-device`))).pipe(We$5(n=>n),Sd$1(()=>this.deviceService.deleteClientDevice(i.id)),qe$2(n=>this.fromAction(e,i,n?`remove`:`none`)));case ke$3.Edit:return la$2(this.fromAction(e,i,`update`));default:return la$2(this.fromAction(e,i,`none`))}}handlePersonAction(e,i){switch(e.action){case ke$3.Edit:let n=this.modalService.open(Mo$1,At$2());return n.componentInstance.person=i,this.handleEditModal(n,e,i);case ke$3.Merge:let r=this.modalService.open(Ro$1,At$2());return r.setInput(`person`,i),$e$5(r.closed).pipe(We$5(k=>k.success),qe$2(k=>this.fromAction(e,i,k.success?`reload`:`none`)));default:return la$2(this.fromAction(e,i,`none`))}}handleSmartFilterAction(e,i){switch(e.action){case ke$3.AddToDashboard:return this.dashboardService.createDashboardStream(i.id).pipe(qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.AddToSideNav:return this.sideNavService.createSideNavStream(i.id).pipe(qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.Edit:let n=this.modalService.open(Vo$1,At$2());return n.setInput(`smartFilter`,i),this.handleEditModal(n,e,i);case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-smart-filter`))).pipe(We$5(r=>r),Sd$1(()=>this.filterService.deleteFilter(i.id)),xd$1(()=>this.toastr.success(Mt$4(`toasts.smart-filter-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));default:return la$2(this.fromAction(e,i,`none`))}}handleSideNavStreamAction(e,i){switch(e.action){case ke$3.MarkAsVisible:return this.sideNavService.bulkToggleSideNavStreamVisibility([i.id],!0).pipe(qe$2(()=>this.fromAction(e,x$3(w$4({},i),{visible:!0}),`update`)));case ke$3.MarkAsInvisible:return this.sideNavService.bulkToggleSideNavStreamVisibility([i.id],!1).pipe(qe$2(()=>this.fromAction(e,x$3(w$4({},i),{visible:!1}),`update`)));default:return la$2(this.fromAction(e,i,`none`))}}handleSideNavHomeStream(e,i){return e.action===ke$3.Edit?la$2(this.fromAction(e,i,`none`)):la$2(this.fromAction(e,i,`none`))}handleSideNavReadingListStream(e,i){return e.action===ke$3.Navigate?la$2(this.fromAction(e,i,`none`)):la$2(this.fromAction(e,i,`none`))}handleBulkLibraryAction(e,i){return la$2(this.fromAction(e,i,`none`))}handleBulkSeriesAction(e,i){switch(e.action){case ke$3.MarkAsRead:case ke$3.MarkAsReadWithSession:let n=e.action===ke$3.MarkAsReadWithSession;return this.readerService.markMultipleSeriesRead(i.map(r=>
49r.id),n).pipe(xd$1(()=>{i.forEach(r=>r.pagesRead=r.pages),this.toastr.success(Mt$4(`toasts.mark-read`))}),qe$2(()=>this.fromAction(e,i,`update`)));case ke$3.MarkAsUnread:return this.readerService.markMultipleSeriesUnread(i.map(r=>r.id)).pipe(xd$1(()=>{i.forEach(r=>r.pagesRead=0),this.toastr.success(Mt$4(`toasts.mark-unread`))}),qe$2(()=>this.fromAction(e,i,`update`)));case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-multiple-series`,{count:i.length}))).pipe(We$5(r=>r),Sd$1(()=>this.seriesService.deleteMultipleSeries(i.map(r=>r.id))),xd$1(r=>{r?this.toastr.success(Mt$4(`toasts.series-deleted`)):this.toastr.error(Mt$4(`errors.generic`))}),We$5(r=>r),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.AddToReadingList:{if(this.readingListModalRef!=null)return at$3;let r=this.modalService.open(lt$5,Nt$3());this.readingListModalRef=r;let k=i.map(T=>T.id);return r.setInput(`title`,Mt$4(`actionable.multiple-selections`)),r.setInput(`showCreate`,!0),r.setInput(`createLabel`,Mt$4(`add-to-list-modal.reading-list-label`)),r.setInput(`inputItems`,[]),r.setInput(`loading`,!0),this.readingListService.getReadingLists(!1,!0).pipe(lt$3(1),ua$2(()=>at$3),bd$1(()=>r.setInput(`loading`,!1))).subscribe(T=>{r.setInput(`inputItems`,T.result.map(E=>({label:E.title,value:E})))}),r.setInput(`interceptCreate`,T=>this.readingListService.createList(T).pipe(Sd$1(E=>this.readingListService.updateByMultipleSeries(E.id,k)),xd$1(()=>this.toastr.success(Mt$4(`toasts.series-added-to-reading-list`))))),r.setInput(`interceptConfirm`,T=>{let E=T;this.readingListService.updateByMultipleSeries(E.id,k).subscribe(()=>{this.toastr.success(Mt$4(`toasts.series-added-to-reading-list`)),r.close()})}),new M$3(T=>{r.closed.subscribe(()=>{this.readingListModalRef=null,T.next(this.fromAction(e,i,`none`)),T.complete()}),r.dismissed.subscribe(()=>{this.readingListModalRef=null,T.complete()})})}case ke$3.AddToCollection:{if(this.collectionModalRef!=null)return at$3;let r=this.modalService.open(lt$5,Nt$3());this.collectionModalRef=r;let k=i.map(T=>T.id);return r.setInput(`title`,Mt$4(`bulk-add-to-collection.title`)),r.setInput(`showCreate`,!0),r.setInput(`createLabel`,Mt$4(`bulk-add-to-collection.collection-label`)),r.setInput(`createInitialValue`,Mt$4(`actionable.new-collection`)),r.setInput(`inputItems`,[]),r.setInput(`loading`,!0),this.collectionService.allCollections(!0,!0).pipe(lt$3(1),ua$2(()=>at$3),bd$1(()=>r.setInput(`loading`,!1))).subscribe(T=>{let E=T.filter($=>$.source===i$2.Kavita);r.setInput(`inputItems`,E.map($=>({label:$.title,value:$})))}),r.setInput(`interceptCreate`,T=>this.collectionService.addByMultiple(0,k,T).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.series-added-to-collection`,{collectionName:T}))))),r.setInput(`interceptConfirm`,T=>{let E=T;this.collectionService.addByMultiple(E.id,k,``).subscribe(()=>{this.toastr.success(Mt$4(`toasts.series-added-to-collection`,{collectionName:E.title})),r.close()})}),new M$3(T=>{r.closed.subscribe(()=>{this.collectionModalRef=null,T.next(this.fromAction(e,i,`none`)),T.complete()}),r.dismissed.subscribe(()=>{this.collectionModalRef=null,T.complete()})})}case ke$3.AddToWantToReadList:return this.memberService.addSeriesToWantToRead(i.map(r=>r.id)).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.series-added-want-to-read`))),qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.RemoveFromWantToReadList:return this.memberService.removeSeriesToWantToRead(i.map(r=>r.id)).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.series-removed-want-to-read`))),qe$2(()=>this.fromAction(e,i,`reload`)));case ke$3.SetReadingProfile:{if(this.readingListModalRef!=null)return at$3;this.readingListModalRef=this.modalService.open(Ki,Nt$3()),this.readingListModalRef.setInput(`seriesIds`,i.map(k=>k.id));let r=this.readingListModalRef;return new M$3(k=>{r.closed.subscribe(()=>{this.readingListModalRef=null,k.next(this.fromAction(e,i,`none`)),k.complete()}),r.dismissed.subscribe(()=>{this.readingListModalRef=null,k.complete()})})}case ke$3.Download:for(let r of i)this.downloadService.download(l$1.Series,r,r.libraryId,r.id);return la$2(this.fromAction(e,i,`none`));default:return la$2(this.fromAction(e,i,`none`))}}handleBulkVolumeChapterAction(e,i,n,r,k=0){switch(e.action){case ke$3.MarkAsRead:case ke$3.MarkAsReadWithSession:let T=e.action===ke$3.MarkAsReadWithSession;
49return this.readerService.markMultipleRead(r,i.map(E=>E.id),n.map(E=>E.id),T).pipe(xd$1(()=>{i.forEach(E=>{E.pagesRead=E.pages,E.chapters?.forEach($=>$.pagesRead=$.pages)}),n.forEach(E=>E.pagesRead=E.pages),this.toastr.success(Mt$4(`toasts.mark-read`))}),qe$2(()=>this.fromAction(e,[...i,...n],`update`)));case ke$3.MarkAsUnread:return this.readerService.markMultipleUnread(r,i.map(E=>E.id),n.map(E=>E.id)).pipe(xd$1(()=>{i.forEach(E=>{E.pagesRead=0,E.chapters?.forEach($=>$.pagesRead=0)}),n.forEach(E=>E.pagesRead=0),this.toastr.success(Mt$4(`toasts.mark-unread`))}),qe$2(()=>this.fromAction(e,[...i,...n],`update`)));case ke$3.AddToReadingList:{if(this.readingListModalRef!=null)return at$3;let E=this.modalService.open(lt$5,Nt$3());this.readingListModalRef=E;let $=i.map(me=>me.id),F=n.map(me=>me.id);return E.setInput(`title`,Mt$4(`actionable.multiple-selections`)),E.setInput(`showCreate`,!0),E.setInput(`createLabel`,Mt$4(`add-to-list-modal.reading-list-label`)),E.setInput(`inputItems`,[]),E.setInput(`loading`,!0),this.readingListService.getReadingLists(!1,!0).pipe(lt$3(1),ua$2(()=>at$3),bd$1(()=>E.setInput(`loading`,!1))).subscribe(me=>{E.setInput(`inputItems`,me.result.map(We=>({label:We.title,value:We})))}),E.setInput(`interceptCreate`,me=>this.readingListService.createList(me).pipe(Sd$1(We=>this.readingListService.updateByMultiple(We.id,r,$,F)),xd$1(()=>this.toastr.success(Mt$4(`toasts.multiple-added-to-reading-list`))))),E.setInput(`interceptConfirm`,me=>{let We=me;this.readingListService.updateByMultiple(We.id,r,$,F).subscribe(()=>{this.toastr.success(Mt$4(`toasts.multiple-added-to-reading-list`)),E.close()})}),new M$3(me=>{E.closed.subscribe(()=>{this.readingListModalRef=null,me.next(this.fromAction(e,[...i,...n],`none`)),me.complete()}),E.dismissed.subscribe(()=>{this.readingListModalRef=null,me.complete()})})}case ke$3.SendTo:{let E=e._extra.data,$=[...i.flatMap(F=>F.chapters?.map(me=>me.id)??[]),...n.map(F=>F.id)];return this.deviceService.sendToEmailDevice($,E.id).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.file-send-to`,{name:E.name}))),qe$2(()=>this.fromAction(e,[...i,...n],`none`)))}case ke$3.Delete:{let E=[...i,...n],$=[];return i.length>0&&$.push($e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-multiple-volumes`,{count:i.length}))).pipe(We$5(F=>F),Sd$1(()=>this.volumeService.deleteMultipleVolumes(i.map(F=>F.id))))),n.length>0&&$.push($e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-multiple-chapters`,{count:n.length}))).pipe(We$5(F=>F),Sd$1(()=>this.chapterService.deleteMultipleChapters(r,n.map(F=>F.id))))),$.length===0?at$3:$e$5($).pipe(Sd$1(F=>F),qe$2(()=>this.fromAction(e,E,`remove`)))}case ke$3.Download:return this.downloadService.downloadBulk(i,n,k,r),la$2(this.fromAction(e,[...i,...n],`none`));default:return la$2(this.fromAction(e,[...i,...n],`none`))}}handleBulkBookmarkAction(e,i,n){switch(e.action){case ke$3.Download:return this.downloadService.download(l$1.Bookmark,i,0,0),la$2(this.fromAction(e,i,`none`));case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`bookmarks.confirm-delete`,{seriesName:``}))).pipe(We$5(r=>r),Sd$1(()=>this.readerService.clearMultipleBookmarks(n)),xd$1(()=>this.toastr.success(Mt$4(`bookmarks.delete-success`))),qe$2(()=>this.fromAction(e,i,`remove`)));default:return la$2(this.fromAction(e,i,`none`))}}handleBulkCollectionAction(e,i){switch(e.action){case ke$3.Promote:return this.collectionTagService.promoteMultipleCollections(i.map(n=>n.id),!0).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.collections-promoted`))),qe$2(()=>this.fromAction(e,i.map(n=>x$3(w$4({},n),{promoted:!0})),`update`)));case ke$3.UnPromote:return this.collectionTagService.promoteMultipleCollections(i.map(n=>n.id),!1).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.collections-unpromoted`))),qe$2(()=>this.fromAction(e,i.map(n=>x$3(w$4({},n),{promoted:!1})),`update`)));case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-collections`))).pipe(We$5(n=>n),Sd$1(()=>this.collectionTagService.deleteMultipleCollections(i.map(n=>n.id))),xd$1(()=>this.toastr.success(Mt$4(`toasts.collections-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Download:for(let n of i)this.downloadService.download(l$1.Collection,n,0,0);return la$2(this.fromAction(e,i,`none`));default:return la$2(this.fromAction(e,i,`none`))}}handleBulkReadingListAction(e,i){switch(e.action){case ke$3.Promote:return this.readingListService.promoteMultipleReadingLists(i.map(n=>
49n.id),!0).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.reading-list-promoted`))),qe$2(()=>this.fromAction(e,i.map(n=>x$3(w$4({},n),{promoted:!0})),`update`)));case ke$3.UnPromote:return this.readingListService.promoteMultipleReadingLists(i.map(n=>n.id),!1).pipe(xd$1(()=>this.toastr.success(Mt$4(`toasts.reading-list-unpromoted`))),qe$2(()=>this.fromAction(e,i.map(n=>x$3(w$4({},n),{promoted:!1})),`update`)));case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-reading-list`))).pipe(We$5(n=>n),Sd$1(()=>this.readingListService.deleteMultipleReadingLists(i.map(n=>n.id))),xd$1(()=>this.toastr.success(Mt$4(`toasts.reading-lists-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Download:for(let n of i)this.downloadService.download(l$1.ReadingList,n,0,0);return la$2(this.fromAction(e,i,`none`));default:return la$2(this.fromAction(e,i,`none`))}}handleBulkAnnotationAction(e,i){switch(e.action){case ke$3.Delete:return $e$5(this.confirmService.confirm(Mt$4(`toasts.confirm-delete-annotations`))).pipe(We$5(n=>n),Sd$1(()=>this.annotationsService.bulkDelete(i.map(n=>n.id))),xd$1(()=>this.toastr.success(Mt$4(`toasts.annotations-deleted`))),qe$2(()=>this.fromAction(e,i,`remove`)));case ke$3.Export:return this.annotationsService.exportAnnotations(i.map(n=>n.id)).pipe(qe$2(()=>this.fromAction(e,i,`none`)));case ke$3.Like:return this.annotationsService.likeAnnotations(i.map(n=>n.id)).pipe(qe$2(()=>this.fromAction(e,i,`update`)));case ke$3.UnLike:return this.annotationsService.unLikeAnnotations(i.map(n=>n.id)).pipe(qe$2(()=>this.fromAction(e,i,`update`)));default:return la$2(this.fromAction(e,i,`none`))}}handleBulkSideNavStreamAction(e,i){switch(e.action){case ke$3.MarkAsVisible:return this.sideNavService.bulkToggleSideNavStreamVisibility(i.map(n=>n.id),!0).pipe(qe$2(()=>this.fromAction(e,i.map(n=>x$3(w$4({},n),{visible:!0})),`update`)));case ke$3.MarkAsInvisible:return this.sideNavService.bulkToggleSideNavStreamVisibility(i.map(n=>n.id),!1).pipe(qe$2(()=>this.fromAction(e,i.map(n=>x$3(w$4({},n),{visible:!1})),`update`)));default:return la$2(this.fromAction(e,i,`none`))}}scanLibrary(e,i){return D$5(this,null,function*(){!e.hasOwnProperty(`id`)||e.id===void 0||this.libraryService.scan(e.id,!1).subscribe(n=>{this.toastr.info(Mt$4(`toasts.scan-queued`,{name:e.name})),i&&i(e)})})}markVolumeAsRead(e,i,n){this.readerService.markVolumeRead(e,i.id).subscribe(()=>{i.pagesRead=i.pages,i.chapters?.forEach(r=>r.pagesRead=r.pages),this.toastr.success(Mt$4(`toasts.mark-read`)),n&&n(i)})}markVolumeAsUnread(e,i,n){this.readerService.markVolumeUnread(e,i.id).subscribe(()=>{i.pagesRead=0,i.chapters?.forEach(r=>r.pagesRead=0),this.toastr.success(Mt$4(`toasts.mark-unread`)),n&&n(i)})}markChapterAsRead(e,i,n,r){this.readerService.saveProgress(e,i,n.volumeId,n.id,n.pages).subscribe(()=>{n.pagesRead=n.pages,this.toastr.success(Mt$4(`toasts.mark-read`)),r&&r(n)})}markChapterAsUnread(e,i,n,r){this.readerService.saveProgress(e,i,n.volumeId,n.id,0).subscribe(()=>{n.pagesRead=0,this.toastr.success(Mt$4(`toasts.mark-unread`)),r&&r(n)})}addMultipleSeriesToWantToReadList(e,i){this.memberService.addSeriesToWantToRead(e).subscribe(()=>{this.toastr.success(Mt$4(`toasts.series-added-want-to-read`)),i?.()})}removeMultipleSeriesFromWantToReadList(e,i){this.memberService.removeSeriesToWantToRead(e).subscribe(()=>{this.toastr.success(Mt$4(`toasts.series-removed-want-to-read`)),i?.()})}editReadingList(e,i){let n=this.modalService.open(Xi,At$2());n.componentInstance.readingList=e,n.closed.pipe(lt$3(1)).subscribe(r=>{i&&r!==void 0&&i(e)}),n.dismissed.pipe(lt$3(1)).subscribe(r=>{i&&r!==void 0&&i(e)})}deleteChapter(e,i){return D$5(this,null,function*(){if(!(yield this.confirmService.confirm(Mt$4(`toasts.confirm-delete-chapter`)))){i&&i(!1);return}this.chapterService.deleteChapter(e).subscribe(n=>{i&&(n?this.toastr.success(Mt$4(`toasts.chapter-deleted`)):this.toastr.error(Mt$4(`errors.generic`)),i(n))})})}deleteVolume(e,i){return D$5(this,null,function*(){if(!(yield this.confirmService.confirm(Mt$4(`toasts.confirm-delete-volume`)))){i&&i(!1);return}this.volumeService.deleteVolume(e).subscribe(n=>{i&&(n?this.toastr.success(Mt$4(`toasts.volume-deleted`)):this.toastr.error(Mt$4(`errors.generic`)),i(n))})})}sendToDevice(e,i,n){this.deviceService.sendToEmailDevice(e,i.id).subscribe(()=>{this.toastr.success(Mt$4(`toasts.file-send-to`,{name:i.name})),n?.()})}matchSeries(e,i){let n=this.modalService.open(tn);n.setInput(`series`,e),n.closed.subscribe(r=>{i&&i(r)})}setReadingProfileForMultiple(e,i){this.readingListModalRef??(this.readingListModalRef=this.modalService.open(Ki,Nt$3()),this.readingListModalRef.setInput(`seriesIds`,e.map(n=>n.id)),this.readingListModalRef.closed.subscribe(()=>{this.readingListModalRef=null,i&&i(!0)}),this.readingListModalRef.dismissed.subscribe(()=>{this.readingListModalRef=null,i&&i(!1)}))}setReadingProfileForLibrary(e,i){this.readingListModalRef??(this.readingListModalRef=this.modalService.open(Ki,Nt$3()),this.readingListModalRef.setInput(`libraryId`,e.id),this.readingListModalRef.closed.subscribe(()=>{this.readingListModalRef=null,i&&i(!0)}),this.readingListModalRef.dismissed.subscribe(()=>{this.readingListModalRef=null,i&&i(!1)}))}handleEditModal(e,i,n){return $e$5(e.closed).pipe(We$5(r=>r.success),qe$2(r=>r.isDeleted?this.fromAction(i,n,`remove`):this.fromAction(i,r.data??n,`update`)))}fromAction(e,i,n){return{action:e.action,entity:i,effect:n}}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var Qt=(()=>{class t{constructor(){this.accountService=E$2(yc$1),this.deviceService=E$2(_),this.actionService=E$2(hi),this.settingsService=E$2(x),this.libraryActions=[],this.seriesActions=[],this.volumeActions=[],this.chapterActions=[],this.collectionTagActions=[],this.readingListActions=[],this.bookmarkActions=[],this.personActions=[],this.sideNavStreamActions=[],this.smartFilterActions=[],this.sideNavHomeActions=[],this.sideNavReadingListActions=[],this.annotationActions=[],this.clientDeviceActions=[],this._resetActions(),eo$1(()=>{this.accountService.currentUser(),this._resetActions()})}getLibraryActions(e=this.basicReadRender){return this.applyCallbackToList(this.libraryActions,(i,n)=>this.actionService.handleLibraryAction(i,n),e)}getSeriesActions(e=this.basicReadRender,i=!1){return this.applyCallbackToList(this.seriesActions,(n,r)=>this.actionService.handleSeriesAction(n,r),(n,r,k)=>n.action===ke$3.RemoveFromOnDeck?i:e(n,r,k))}getVolumeActions(e,i,n,r=this.basicReadRender){return this.applyCallbackToList(this.volumeActions,
49(k,T)=>this.actionService.handleVolumeAction(k,T,e,i,n),r)}getChapterActions(e,i,n,r=this.basicReadRender){return this.applyCallbackToList(this.chapterActions,(k,T)=>this.actionService.handleChapterAction(k,T,e,i,n),r)}getBookmarkActions(e,i=this.basicReadRender){return this.applyCallbackToList(this.bookmarkActions,(n,r)=>this.actionService.handleBookmarkAction(n,r,e),i)}getReadingListActions(e=this.basicReadRender){return this.applyCallbackToList(this.readingListActions,(i,n)=>this.actionService.handleReadingListAction(i,n),e)}getCollectionTagActions(e=this.basicReadRender){return this.applyCallbackToList(this.collectionTagActions,(i,n)=>this.actionService.handleCollectionAction(i,n),e)}getAnnotationActions(e=this.basicReadRender){return this.applyCallbackToList(this.annotationActions,(i,n)=>this.actionService.handleAnnotationAction(i,n),e)}getClientDeviceActions(e=this.basicReadRender){return this.applyCallbackToList(this.clientDeviceActions,(i,n)=>this.actionService.handleClientDeviceAction(i,n),e)}getPersonActions(e=this.basicReadRender){return this.applyCallbackToList(this.personActions,(i,n)=>this.actionService.handlePersonAction(i,n),e)}getSmartFilterActions(e=this.basicReadRender){return this.applyCallbackToList(this.smartFilterActions,(i,n)=>this.actionService.handleSmartFilterAction(i,n),e)}getSideNavStreamActions(e=this.basicReadRender){return this.applyCallbackToList(this.sideNavStreamActions,(i,n)=>this.actionService.handleSideNavStreamAction(i,n),e)}getSideNavHomeActions(e=this.basicReadRender){let i=e===this.basicReadRender?(n,r,k)=>!this.accountService.hasReadOnlyRole():e;
49return this.applyCallbackToList(this.sideNavHomeActions,(n,r)=>this.actionService.handleSideNavHomeStream(n,r),i)}getSideNavReadingListActions(e=this.basicReadRender){let i=e===this.basicReadRender?(n,r,k)=>!this.accountService.hasReadOnlyRole():e;return this.applyCallbackToList(this.sideNavReadingListActions,(n,r)=>this.actionService.handleSideNavReadingListStream(n,r),i)}getBulkLibraryActions(e=this.basicReadRender){let i=this.flattenActions(this.libraryActions).filter(n=>[ke$3.Delete,ke$3.GenerateColorScape,ke$3.RefreshMetadata,ke$3.CopySettings].includes(n.action));return i.push({_extra:void 0,class:void 0,description:``,dynamicList:void 0,action:ke$3.CopySettings,callback:this.dummyCallback,shouldRender:e,children:[],requiredRoles:[S$6.Admin],title:`copy-settings`}),this.applyCallbackToList(i,(n,r)=>this.actionService.handleBulkLibraryAction(n,r),e)}dummyCallback(e,i){return at$3}dummyShouldRender(e,i,n){return!0}basicReadRender(e,i,n){if(i==null||!i.hasOwnProperty(`pagesRead`)&&!i.hasOwnProperty(`pages`))return!0;switch(e.action){case ke$3.MarkAsRead:case ke$3.MarkAsReadWithSession:return i.pagesRead<i.pages;case ke$3.MarkAsUnread:return i.pagesRead!==0;default:return!0}}getActionablesForSettingsPage(e,i=[]){let n=[],r;for(let k of e)if(k.action!==ke$3.SendTo){if(k.children.length===0){r=w$4({},k),r.title=Mt$4(`actionable.`+r.title),r.description!==``&&(r.description=Mt$4(`actionable.`+r.description)),n.push(r);continue}for(let T of k.children)T.action!==ke$3.SendTo&&(r=w$4({},T),r.title=Mt$4(`actionable.`+r.title),r.description!==``&&(r.description=Mt$4(`actionable.`+r.description)),n.push(r))}return n.filter(k=>!i.includes(k.action))}flattenActions(e){return e.reduce((i,n)=>(n.action!==ke$3.Submenu&&i.push(n),n.children&&n.children.length>0&&i.push(...this.flattenActions(n.children)),i),[])}sendToChildren(){return this.settingsService.isEmailSetup(!0).pipe(Sd$1(e=>e?this.deviceService.devices$:la$2([])),qe$2(e=>e.map(i=>({title:i.name,data:i}))),Td$1())}_resetActions(){this.libraryActions=[{action:ke$3.Scan,title:`scan-library`,description:`scan-library-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.Submenu,title:`reading-profiles`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.SetReadingProfile,title:`set-reading-profile`,description:`set-reading-profile-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.ClearReadingProfile,title:`clear-reading-profile`,description:`clear-reading-profile-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.Submenu,title:`others`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[{action:ke$3.RefreshMetadata,title:`refresh-covers`,description:`refresh-covers-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.GenerateColorScape,title:`generate-colorscape`,description:`generate-colorscape-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.Delete,title:`delete`,description:`delete-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]}]},{action:ke$3.Edit,title:`settings`,description:`settings-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]}],this.collectionTagActions=[{action:ke$3.Edit,title:`edit`,description:`edit-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Download,title:`download`,description:`download-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Download],children:[]},{action:ke$3.Delete,title:`delete`,description:`delete-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],class:`danger`,children:[]},{action:ke$3.Promote,title:`promote`,description:`promote-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.UnPromote,title:`unpromote`,description:`unpromote-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}],this.seriesActions=[{action:ke$3.Submenu,title:`mark-as-read`,description:`mark-as-read-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.MarkAsRead,title:`mark-as-read`,description:`mark-as-read-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.MarkAsReadWithSession,title:`mark-as-read-with-session`,description:`mark-as-read-with-session-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.MarkAsUnread,title:`mark-as-unread`,description:`mark-as-unread-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Scan,title:`scan-series`,description:`scan-series-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.Submenu,title:`add-to`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.AddToWantToReadList,title:`add-to-want-to-read`,description:`add-to-want-to-read-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.RemoveFromWantToReadList,title:`remove-from-want-to-read`,description:`remove-from-want-to-read-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.AddToReadingList,title:`add-to-reading-list`,description:`add-to-reading-list-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.AddToCollection,title:`add-to-collection`,description:`add-to-collection-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.Submenu,title:`send-to`,description:`send-to-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.SendTo,title:``,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],dynamicList:this.sendToChildren(),children:[]}]},{action:ke$3.Submenu,title:`reading-profiles`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.SetReadingProfile,title:`set-reading-profile`,description:`set-reading-profile-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.ClearReadingProfile,title:`clear-reading-profile`,description:`clear-reading-profile-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.Submenu,title:`others`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.RemoveFromOnDeck,title:`remove-from-on-deck`,description:`remove-from-on-deck-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.RefreshMetadata,title:`refresh-covers`,description:`refresh-covers-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.GenerateColorScape,title:`generate-colorscape`,description:`generate-colorscape-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.AnalyzeFiles,title:`analyze-files`,description:`analyze-files-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.Delete,title:`delete`,description:`delete-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],class:`danger`,children:[]}]},{action:ke$3.Match,title:`match`,description:`match-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.Download,title:`download`,description:`download-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Download],children:[]},{action:ke$3.Edit,title:`edit`,description:`edit-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]}],this.volumeActions=[{action:ke$3.IncognitoRead,title:`read-incognito`,description:`read-incognito-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Submenu,title:`mark-as-read`,description:`mark-as-read-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.MarkAsRead,title:`mark-as-read`,description:`mark-as-read-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.MarkAsReadWithSession,title:`mark-as-read-with-session`,description:`mark-as-read-with-session-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.MarkAsUnread,title:`mark-as-unread`,description:`mark-as-unread-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Submenu,title:`add-to`,description:`=`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.AddToReadingList,title:`add-to-reading-list`,description:`add-to-reading-list-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.Submenu,title:`send-to`,description:`send-to-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.SendTo,title:``,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],dynamicList:this.sendToChildren(),children:[]}]},{action:ke$3.Submenu,title:`others`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.Delete,title:`delete`,description:`delete-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.Download,title:`download`,description:`download-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.Edit,title:`details`,description:`edit-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}],this.chapterActions=[{action:ke$3.IncognitoRead,title:`read-incognito`,description:`read-incognito-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Submenu,title:`mark-as-read`,description:`mark-as-read-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.MarkAsRead,title:`mark-as-read`,description:`mark-as-read-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.MarkAsReadWithSession,title:`mark-as-read-with-session`,description:`mark-as-read-with-session-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.MarkAsUnread,title:`mark-as-unread`,description:`mark-as-unread-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Submenu,title:`add-to`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.AddToReadingList,title:`add-to-reading-list`,description:`add-to-reading-list-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.Submenu,title:`send-to`,description:`send-to-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.SendTo,title:``,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],dynamicList:this.sendToChildren(),children:[]}]},{action:ke$3.Submenu,title:`others`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.Delete,title:`delete`,description:`delete-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.Download,title:`download`,description:`download-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Download],children:[]}]},{action:ke$3.Edit,title:`edit`,description:`edit-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}],this.readingListActions=[{action:ke$3.Edit,title:`edit`,description:`edit-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.RefreshMetadata,title:`refresh-covers`,description:`refresh-covers-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Download,title:`download`,description:`download-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Download],children:[]},{action:ke$3.Delete,title:`delete`,description:`delete-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],class:`danger`,children:[]},{action:ke$3.Promote,title:`promote`,description:`promote-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.UnPromote,title:`unpromote`,description:`unpromote-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Submenu,title:`export`,description:`export-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.ExportAsV1,title:`export-v1`,description:`export-v1-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.ExportAsV2,title:`export-v2`,description:`export-v2-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]}],this.personActions=[{action:ke$3.Edit,title:`edit`,description:`edit-person-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]},{action:ke$3.Merge,title:`merge`,description:`merge-person-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[S$6.Admin],children:[]}
49],this.bookmarkActions=[{action:ke$3.ViewSeries,title:`view-series`,description:`view-series-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Download,title:`download`,description:`download-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Delete,title:`clear`,description:`delete-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,class:`danger`,requiredRoles:[],children:[]}],this.sideNavStreamActions=[{action:ke$3.MarkAsVisible,title:`mark-visible`,description:`mark-visible-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.MarkAsInvisible,title:`mark-invisible`,description:`mark-invisible-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}],this.smartFilterActions=[{action:ke$3.Submenu,title:`add-to`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[{action:ke$3.AddToDashboard,title:`add-to-dashboard`,description:`add-to-dashboard-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.AddToSideNav,title:`add-to-side-nav`,description:`add-to-side-nav-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]},{action:ke$3.Edit,title:`rename`,description:`rename-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Delete,title:`delete`,description:`delete-tooltip`,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}],this.sideNavHomeActions=[{action:ke$3.Edit,title:`reorder`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}],this.sideNavReadingListActions=[{action:ke$3.Navigate,title:`cbl-manager`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}],this.annotationActions=[{action:ke$3.Delete,title:`delete`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Export,title:`export`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Like,title:`like`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.UnLike,title:`unlike`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}],this.clientDeviceActions=[{action:ke$3.Edit,title:`edit-device-name`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]},{action:ke$3.Delete,title:`delete`,description:``,callback:this.dummyCallback,shouldRender:this.dummyShouldRender,requiredRoles:[],children:[]}]}applyCallback(e,i,n){e.callback=i,e.shouldRender=n,!(e.children===null||e.children?.length===0)&&(e.children=e.children.map(r=>w$4({},r)),e.children.forEach(r=>{this.applyCallback(r,i,n)}))}applyCallbackToList(e,i,n=this.dummyShouldRender){let r=e.map(k=>w$4({},k));return r.forEach(k=>this.applyCallback(k,i,n)),r}hasAction(e,i){if(e.length===0)return!1;for(let n=0;n<e.length;n++)if(e[n].action===i||this.hasAction(e[n].children,i))return!0;return!1}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var k_=t=>({name:t});var E_=t=>({duplicateName:t});var w_=()=>[];var T_=(t,a)=>a.value;var M_=(t,a)=>a.action;function I_(t,a){if(t&1&&(j_$1(0),rM(1,`sentenceCase`)),t&2){let e=i_$1().$implicit;Ou(` `,e(`edit-title`,J_$1(3,k_,iM(1,1,i_$1().library.name))),` `)}}function R_(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1().$implicit;Ou(` `,e(`add-title`),` `)}}function V_(t,a){if(t&1&&(Hm$1(0,`input`,33),Sw(),Hm$1(1,`app-validation-errors`,34)),t&2){let e=a,i=i_$1(2).$implicit;Vm$1(`appFormField`,e),Aw(),xb(),Vm$1(`control`,e)(`messages`,J_$1(3,E_,i(`library-name-unique`)))}}function L_(t,a){if(t&1&&(bs$1(0,`span`,27),j_$1(1),Hm$1(2,`i`,35),Mu()
49),t&2){i_$1();let e=p_$1(12),i=i_$1().$implicit;xb(),Ou(` `,i(`kavitaplus-eligible-label`),` `),xb(),Vm$1(`ngbTooltip`,e)}}function F_(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1(2).$implicit;Ly(e(`type-tooltip`))}}function P_(t,a){if(t&1&&j_$1(0),t&2){let e=i_$1(2).$implicit;Ly(e(`kavitaplus-eligible-tooltip`))}}function A_(t,a){if(t&1&&(bs$1(0,`option`,31),j_$1(1),Mu()),t&2){let e=a.$implicit;Vm$1(`value`,e.value),xb(),Ly(e.title)}}function N_(t,a){if(t&1&&(bs$1(0,`div`),j_$1(1),bs$1(2,`span`),j_$1(3),rM(4,`utcToLocalTime`),rM(5,`defaultDate`),Mu()()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Ou(` `,e(`last-scanned-label`),` `),xb(2),Ly(iM(5,5,sM(4,2,i.library?.lastScanned,`short`)))}}function D_(t,a){if(t&1&&(bs$1(0,`div`,23)(1,`label`,24),j_$1(2),Mu(),DC(3,V_,2,5),Mu(),bs$1(4,`div`,23)(5,`label`,25),j_$1(6),Mu(),Hm$1(7,`i`,26),DC(8,L_,3,2,`span`,27),Dm$1(9,F_,1,1,`ng-template`,null,1,lM)(11,P_,1,1,`ng-template`,null,2,lM),bs$1(13,`span`,28),Um$1(14,29),Mu(),bs$1(15,`select`,30),CC(16,A_,2,2,`option`,31,T_),Mu(),Sw(),bs$1(18,`div`,32),j_$1(19),rM(20,`libraryTypeSubtitle`),Mu()(),DC(21,N_,6,7,`div`)),t&2){let e,i=p_$1(10),n=i_$1().$implicit,r=i_$1();xb(2),Ly(n(`name-label`)),xb(),bC((e=r.libraryForm.get(`name`))?3:-1,e),xb(3),Ly(n(`type-label`)),xb(),Vm$1(`ngbTooltip`,i),xb(),bC(r.supportsMetadata()?8:-1),xb(6),Vm$1(`ngTemplateOutlet`,i),xb(),Aw(),xb(),_C(r.libraryTypes),xb(3),Ou(` `,iM(20,8,r.LibraryTypeValue),` `),xb(2),bC(r.isAddLibrary()?-1:21)}}function O_(t,a){if(t&1&&(bs$1(0,`p`,36),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;xb(),Ly(e(`files-at-root-warning`))}}function $_(t,a){if(t&1&&Hm$1(0,`i`,44),t&2){let e=i_$1(3).$implicit;Vm$1(`ngbTooltip`,e(`files-at-root-warning`))}}function U_(t,a){if(t&1){let e=AC();bs$1(0,`li`,38),j_$1(1),bs$1(2,`div`,43),DC(3,$_,1,1,`i`,44),bs$1(4,`button`,45),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(3).removeFolder(n))}),Hm$1(5,`i`,46),Mu()()()}if(t&2){let e=a.$implicit,i=i_$1(3);xb(),Ou(` `,e,` `),xb(2),bC(i.filesAtRoot().includes(e)?3:-1)}}function B_(t,a){if(t&1){let e=AC();DC(0,O_,2,1,`p`,36),bs$1(1,`p`),j_$1(2),Mu(),bs$1(3,`ul`,37),CC(4,U_,6,2,`li`,38,TC),Mu(),bs$1(6,`div`,39)(7,`button`,40),fy(`click`,function(){_f(e);return Mf(i_$1(2).openDirectoryPicker())}),Hm$1(8,`i`,41),j_$1(9),Mu()(),bs$1(10,`div`,39)(11,`p`),j_$1(12),bs$1(13,`a`,42),j_$1(14),Mu(),j_$1(15),Mu()(),bs$1(16,`div`,39)(17,`p`),j_$1(18),bs$1(19,`a`,42),j_$1(20),Mu(),j_$1(21),Mu()()}if(t&2){let e=i_$1().$implicit,i=i_$1();bC(i.filesAtRoot().length>0?0:-1),xb(2),Ly(e(`folder-description`)),xb(2),_C(i.selectedFolders),xb(5),Ou(` `,e(`browse`),` `),xb(3),Ly(e(`help-us-part-1`)),xb(),Vm$1(`href`,i.WikiLink.ManagingFiles,qh),xb(),Ly(e(`help-us-part-2`)),xb(),Ou(` `,e(`help-us-part-3`)),xb(3),Ly(e(`naming-conventions-part-1`)),xb(),Vm$1(`href`,i.WikiLink.Scanner,qh),xb(),Ly(e(`naming-conventions-part-2`)),xb(),Ou(` `,e(`naming-conventions-part-3`))}}function W_(t,a){if(t&1&&(bs$1(0,`p`,47),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;xb(),Ly(e(`cover-description`))}}function q_(t,a){if(t&1){let e=AC();DC(0,W_,2,1,`p`,47),bs$1(1,`p`),j_$1(2),Mu(),bs$1(3,`app-cover-image-chooser`,48),fy(`coverChanged`,function(n){_f(e);return Mf(i_$1(2).handleCoverChanged(n))}),Mu()}if(t&2){let e=i_$1().$implicit,i=i_$1();bC(i.isAddLibrary()?0:-1),xb(2),Ly(e(`cover-description-extra`)),xb(),Vm$1(`config`,i.chooserConfig())}}function G_(t,a){if(t&1&&(bs$1(0,`div`,56),Hm$1(1,`input`,57),Sw(),bs$1(2,`label`,58),j_$1(3),rM(4,`fileTypeGroup`),Mu()()),t&2){let e=a.$implicit;xb(),Vm$1(`formControlName`,e)(`id`,e),Aw(),xb(),Vm$1(`for`,e),xb(),Ly(iM(4,4,e))}}function z_(t,a){if(t&1&&(bs$1(0,`div`,55),CC(1,G_,5,6,`div`,56,TC),Mu()),t&2){let e=i_$1(3);xb(),_C(e.fileTypeGroups)}}function j_(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,60),Sw(),Mu()),t&2&&(xb(),Aw())}function H_(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,61),Sw(),Mu()),t&2&&(xb(),Aw())}function Y_(t,a){if(t&1&&(j_$1(0),rM(1,`metadataProviderTitle`)),t&2)Ou(` `,iM(1,
491,i_$1().value),` `)}function K_(t,a){if(t&1&&(bs$1(0,`option`,64),j_$1(1),rM(2,`metadataProviderTitle`),Mu()),t&2){let e=a.$implicit;Vm$1(`ngValue`,e),xb(),Ly(iM(2,2,e))}}function Q_(t,a){if(t&1&&(bs$1(0,`select`,63),CC(1,K_,3,4,`option`,64,TC),Mu(),Sw()),t&2){let e=i_$1(4);Aw();let i=e.validMetadataProviders.hasValue()?e.validMetadataProviders.value():K_$1(0,w_);xb(),_C(i)}}function J_(t,a){if(t&1&&(bs$1(0,`div`,49)(1,`app-setting-item`,62),Dm$1(2,Y_,2,3,`ng-template`,null,3,lM)(4,Q_,3,1,`ng-template`,null,4,lM),Mu()()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Vm$1(`title`,e(`metadata-provider-label`))(`subtitle`,e(`metadata-provider-tooltip`))(`canEdit`,i.validMetadataProviders.hasValue()&&i.validMetadataProviders.value().length>1)}}function Z_(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,65),Sw(),Mu()),t&2&&(xb(),Aw())}function X_(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,66),Sw(),Mu()),t&2&&(xb(),Aw())}function e0(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,67),Sw(),Mu()),t&2&&(xb(),Aw())}function t0(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,68),Sw(),Mu()),t&2&&(xb(),Aw())}function i0(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,69),Sw(),Mu()),t&2&&(xb(),Aw())}function n0(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,70),Sw(),Mu()),t&2&&(xb(),Aw())}function o0(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,71),Sw(),Mu()),t&2&&(xb(),Aw())}function a0(t,a){t&1&&(bs$1(0,`div`,59),Hm$1(1,`input`,72),Sw(),Mu()),t&2&&(xb(),Aw())}function r0(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Ou(` `,e.title,` `)}}function l0(t,a){if(t&1&&j_$1(0),t&2){let e=a.$implicit;Py(` `,e.title,` (`,e.isoCode,`) `)}}function s0(t,a){if(t&1){let e=AC();bs$1(0,`app-typeahead`,74),fy(`selectedData`,function(n){_f(e);return Mf(i_$1(4).updateLanguage(n))}),Dm$1(1,r0,1,1,`ng-template`,null,5,lM)(3,l0,1,2,`ng-template`,null,6,lM),Mu()}if(t&2){i_$1();Vm$1(`settings`,$_$1(0))(`locked`,!1)}}function c0(t,a){if(t&1&&(By(0),DC(1,s0,5,2,`app-typeahead`,73)),t&2){let e=B_$1(i_$1(3).languageSettings());xb(),bC(e?1:-1)}}function d0(t,a){if(t&1){let e=AC();bs$1(0,`app-edit-list`,75),fy(`updateItems`,function(n){_f(e);return Mf(i_$1(3).updateGlobs(n))}),Mu()}if(t&2){let e=i_$1(2).$implicit;Vm$1(`items`,i_$1().excludePatterns)(`label`,e(`exclude-patterns-label`))}}function p0(t,a){if(t&1&&(bs$1(0,`div`,49)(1,`app-setting-item`,50),Dm$1(2,z_,3,0,`ng-template`,null,3,lM),Mu()(),bs$1(4,`div`,49)(5,`app-setting-switch`,51),Dm$1(6,j_,2,0,`ng-template`),Mu()(),bs$1(7,`div`,49)(8,`app-setting-switch`,51),Dm$1(9,H_,2,0,`ng-template`),Mu()(),DC(10,J_,6,3,`div`,49),bs$1(11,`div`,49)(12,`app-setting-switch`,51),Dm$1(13,Z_,2,0,`ng-template`),Mu()(),bs$1(14,`div`,49)(15,`app-setting-switch`,51),Dm$1(16,X_,2,0,`ng-template`),Mu()(),bs$1(17,`div`,49)(18,`app-setting-switch`,51),Dm$1(19,e
490,2,0,`ng-template`),Mu()(),bs$1(20,`div`,49)(21,`app-setting-switch`,51),Dm$1(22,t0,2,0,`ng-template`),Mu()(),bs$1(23,`div`,49)(24,`app-setting-switch`,51),Dm$1(25,i0,2,0,`ng-template`),Mu()(),bs$1(26,`div`,49)(27,`app-setting-switch`,51),Dm$1(28,n0,2,0,`ng-template`),Mu()(),bs$1(29,`div`,49)(30,`app-setting-switch`,51),Dm$1(31,o0,2,0,`ng-template`),Mu()(),bs$1(32,`div`,49)(33,`app-setting-switch`,51),Dm$1(34,a0,2,0,`ng-template`),Mu()(),bs$1(35,`div`,49)(36,`app-setting-item`,52),Dm$1(37,c0,2,2,`ng-template`,null,3,lM),Mu()(),Hm$1(39,`div`,53),bs$1(40,`div`,54)(41,`app-setting-item`,50),Dm$1(42,d0,1,2,`ng-template`,null,3,lM),Mu()()),t&2){let e,i=i_$1().$implicit,n=i_$1();xb(),Vm$1(`title`,i(`file-type-group-label`))(`showEdit`,!1)(`canEdit`,!1)(`subtitle`,i(`file-type-group-tooltip`))(`toggleOnViewClick`,!1),xb(4),Vm$1(`title`,i(`remove-prefix-for-sortname-label`))(`subtitle`,i(`remove-prefix-for-sortname-tooltip`)),xb(3),Vm$1(`title`,i(`enable-metadata-label`))(`subtitle`,i(`enable-metadata-tooltip`)),xb(2),bC((e=n.libraryForm.get(`metadataProvider`))?10:-1,e),xb(2),Vm$1(`title`,i(`manage-collection-label`))(`subtitle`,i(`manage-collection-tooltip`)),xb(3),Vm$1(`title`,i(`manage-reading-list-label`))(`subtitle`,i(`manage-reading-list-tooltip`)),xb(3),Vm$1(`title`,i(`allow-scrobbling-label`))(`subtitle`,i(`allow-scrobbling-tooltip`)),xb(3),Vm$1(`title`,i(`allow-metadata-matching-label`))(`subtitle`,i(`allow-metadata-matching-tooltip`)),xb(3),Vm$1(`title`,i(`folder-watching-label`))(`subtitle`,i(`folder-watching-tooltip`)),xb(3),Vm$1(`title`,i(`include-in-dashboard-label`))(`subtitle`,i(`include-in-dashboard-tooltip`)),xb(3),Vm$1(`title`,i(`include-in-search-label`))(`subtitle`,i(`include-in-search-tooltip`)),xb(3),Vm$1(`title`,i(`inherit-web-links-label`))(`subtitle`,i(`inherit-web-links-tooltip`)),xb(3),Vm$1(`title`,i(`default-language-label`))(`subtitle`,i(`default-language-tooltip`))(`toggleOnViewClick`,!1)(`showEdit`,!1),xb(5),Vm$1(`title`,i(`exclude-patterns-label`))(`showEdit`,!1)(`canEdit`,!1)(`subtitle`,n.excludePatternTooltip)(`toggleOnViewClick`,!1)}}function m0(t,a){if(t&1){let e=AC();bs$1(0,`div`,76)(1,`app-setting-button`,77)(2,`button`,78),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).runTask(n))}),j_$1(3),Mu()()()}if(t&2){let e=a.$implicit,i=i_$1(4);xb(),Vm$1(`subtitle`,e.description),xb(),N_$1(q_$1(`btn btn-`,e.action===i.Action.Delete?`danger`:`secondary`,` btn-sm mb-2`)),xb(),Ly(e.title)}}function _0(t,a){if(t&1&&CC(0,m0,4,5,`div`,76,M_),t&2)_C(i_$1(3).tasks)}function u0(t,a){if(t&1&&(bs$1(0,`li`,13)(1,`a`,14),j_$1(2),rM(3,`tabTitle`),Mu(),Dm$1(4,_0,2,0,`ng-template`,15),Mu()),t&2){let e=i_$1(2);Vm$1(`ngbNavItem`,e.Tabs.Tasks),xb(2),Ly(iM(3,2,e.Tabs.Tasks))}}function g0(t,a){if(t&1){let e=AC();bs$1(0,`button`,79),fy(`click`,function(){_f(e);return Mf(i_$1(2).nextStep())}),j_$1(1),Mu()}if(t&2){let e=i_$1().$implicit,i=i_$1();Vm$1(`disabled`,i.isNextDisabled()||i.libraryForm.invalid),xb(),Ly(e(`next`))}}function h0(t,a){if(t&1){let e=AC();bs$1(0,`button`,79),fy(`click`,function(){_f(e);return Mf(i_$1(2).save())}),j_$1(1),Mu()}if(t&2){let e=i_$1().$implicit;Vm$1(`disabled`,i_$1().isDisabled()),xb(),Ly(e(`save`))}}function f0(t,a){if(t&1){let e=AC();xu(0),bs$1(1,`div`,8)(2,`h4`,9),DC(3,I_,2,5)(4,R_,1,1),Mu(),bs$1(5,`button`,10),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Mu()(),bs$1(6,`form`,11)(7,`div`)(8,`ul`,12,0),Vy(`activeIdChange`,function(n){_f(e);let r=i_$1();return H_$1(r.active,n)||(r.active=n),Mf(n)}),bs$1(10,`li`,13)(11,`a`,14),j_$1(12),rM(13,`tabTitle`),Mu(),Dm$1(14,D_,22,10,`ng-template`,15),Mu(),bs$1(15,`li`,16)(16,`a`,14),j_$1(17),rM(18,`tabTitle`),Mu(),Dm$1(19,B_,22,11,`ng-template`,15),Mu(),bs$1(20,`li`,16)(21,`a`,14),j_$1(22),rM(23,`tabTitle`),Mu(),Dm$1(24,q_,4,3,`ng-template`,15),Mu(),bs$1(25,`li`,16)(26,`a`,14),j_$1(27),rM(28,`tabTitle`),Mu(),Dm$1(29,p0,44,35,`ng-template`,15),Mu(),DC(30,u0,5,4,`li`,13),Mu(),Hm$1(31,`div`,17),Mu()(),bs$1(32,`div`,18)(33,`button`,19),fy(`click`,function(){_f(e);return Mf(i_$1().forceScan())}),j_$1(34),Mu(),bs$1(35,`button`,20),fy(`click`,function(){_f(e);return Mf(i_$1().reset())}),j_$1(36),Mu(),bs$1(37,`button`,21),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),j_$1(38),Mu(),DC(39,g0,2,2,`button`,22)(40,h0,2,2,`button`,22),Mu(),Gs$1()}if(t&2){let e=a.$implicit,i=p_$1(9),n=i_$1();xb(3),bC(n.isAddLibrary()?4:3),xb(2),jm$1(`aria-label`,e(`close`)),xb(),Vm$1(`formGroup`,n.libraryForm),xb(),N_$1(q_$1(`modal-body scrollable-modal `,n.breakpointService.isMobile()?``:`d-flex`)),xb(),Vm$1(`orientation`,U_$1(n.breakpointService.isMobile()?`horizontal`:`vertical`)),jy(`activeId`,n.active),xb(2),Vm$1(`ngbNavItem`,n.Tabs.General),xb(2),Ly(iM(13,31,n.Tabs.General)),xb(3),Vm$1(`ngbNavItem`,n.Tabs.Folder)(`disabled`,n.isAddLibrary()&&n.setupStep<1),xb(2),Ly(iM(18,33,n.Tabs.Folder)),xb(3),Vm$1(`ngbNavItem`,n.Tabs.CoverImage)(`disabled`,n.isAddLibrary()&&n.setupStep<2),xb(2),Ly(iM(23,35,n.Tabs.CoverImage)),xb(3),Vm$1(`ngbNavItem`,n.Tabs.Advanced)(`disabled`,n.isAddLibrary()&&n.setupStep<3),xb(2),Ly(iM(28,37,n.Tabs.Advanced)),xb(3),bC(n.isAddLibrary()?-1:30),xb(),N_$1(q_$1(`tab-content `,n.breakpointService.isMobile()?`mt-3`:`ms-4 flex-fill`)),Vm$1(`ngbNavOutlet`,i),xb(2),Vm$1(`placement`,`above`)(`ngbTooltip`,e(`force-scan-tooltip`)),xb(),Ly(e(`force-scan`)),xb(2),Ly(e(`reset`)),xb(2),Ly(e(`cancel`)),xb(),bC(n.isAddLibrary()&&n.setupStep!==3?39:40)}}var Bt=(function(t){return t[t.General=0]=`General`,t[t.Folder=1]=`Folder`,t[t.Cover=2]=`Cover`,t[t.Advanced=3]=`Advanced`,t})(Bt||{});var Fo$1=(()=>{class t{get LibraryTypeValue(){return parseInt(this.libraryForm.get(`type`)?.value+``,10)}constructor(){this.utilityService=E$2(w$5),this.modal=E$2(F$6),this.destroyRef=E$2(te$5),this.uploadService=E$2(y$1),this.modalService=E$2(st$4),this.confirmService=E$2(bi),this.libraryService=E$2(S$5),this.toastr=E$2(Bt$3),this.cdRef=E$2(OB),this.actionFactoryService=E$2(Qt),this.metadataService=E$2(Fe$3),this.breakpointService=E$2(W$1),this.coverChooserConfigFactory=E$2(it),this.typeaheadSettingFactoryService=E$2(jn$1),this.LibraryType=d$1,this.Tabs=me$1,this.WikiLink=e$3,this.Action=ke$3,this.libraryTypePipe=new Wi,this.active=me$1.General,this.chooserConfig=be$3({}),this.excludePatternTooltip=`<span>
49`+Mt$4(`library-settings-modal.exclude-patterns-tooltip`)+`<a class="ms-1" href="${e$3.ScannerExclude}" rel="noopener noreferrer" target="_blank">${Mt$4(`library-settings-modal.help`)}<i class="fa fa-external-link-alt ms-1" aria-hidden="true"></i></a>`,this.libraryForm=new G$6({name:new Z$2(``,{nonNullable:!0,validators:[Ce$3.required]}),type:new Z$2(d$1.Manga,{nonNullable:!0,validators:[Ce$3.required]}),folderWatching:new Z$2(!0,{nonNullable:!0,validators:[]}),includeInDashboard:new Z$2(!0,{nonNullable:!0,validators:[]}),includeInRecommended:new Z$2(!0,{nonNullable:!0,validators:[]}),includeInSearch:new Z$2(!0,{nonNullable:!0,validators:[]}),manageCollections:new Z$2(!1,{nonNullable:!0,validators:[]}),manageReadingLists:new Z$2(!1,{nonNullable:!0,validators:[]}),allowScrobbling:new Z$2(!0,{nonNullable:!0,validators:[]}),allowMetadataMatching:new Z$2(!0,{nonNullable:!0,validators:[]}),collapseSeriesRelationships:new Z$2(!1,{nonNullable:!0,validators:[]}),enableMetadata:new Z$2(!0,{nonNullable:!0,validators:[]}),removePrefixForSortName:new Z$2(!1,{nonNullable:!0,validators:[]}),inheritWebLinksFromFirstChapter:new Z$2(!1,{nonNullable:!0,validators:[]}),defaultLanguage:new Z$2(``,{nonNullable:!0,validators:[]}),metadataProvider:new Z$2(Ke.Mangabaka,{nonNullable:!0,validators:[]})}),this.selectedLibraryType=e$(this.libraryForm.get(`type`).valueChanges.pipe(qe$2(()=>this.libraryForm.getRawValue().type)),{initialValue:d$1.Manga}),this.supportsMetadata=it$3(()=>this.validMetadataProviders.hasValue()?this.validMetadataProviders.value().length>0:!1),this.scrobbleEnabledLibraries=be$3([]),this.validMetadataProviders=this.libraryService.getSupportedMetadataProviders(()=>this.selectedLibraryType()),this.selectedFolders=[],this.madeChanges=!1,this.libraryTypes=t$4.map(e=>({title:this.libraryTypePipe.transform(e),value:e})).sort((e,i)=>e.title.localeCompare(i.title)),this.languageSettings=be$3(null),this.isAddLibrary=be$3(!1),this.setupStep=Bt.General,this.fileTypeGroups=mi,this.excludePatterns=[``],this.filesAtRoot=be$3([]),this.tasks=this.getTasks(),eo$1(()=>{if(!this.validMetadataProviders.hasValue())return;let e=this.validMetadataProviders.value(),i=this.libraryForm.get(`metadataProvider`).value;e.includes(i)||this.libraryForm.get(`metadataProvider`)?.setValue(e[0])})}ngOnInit(){this.library===void 0&&this.isAddLibrary.set(!0),this.chooserConfig.set(this.coverChooserConfigFactory.forLibrary(this.library)),this.libraryService.getLibraryTypesWithScrobbleSupport().pipe(JB(this.destroyRef),xd$1(e=>{this.scrobbleEnabledLibraries.set(e),e.includes(this.library?.type??this.LibraryTypeValue)||(this.libraryForm.get(`allowScrobbling`)?.setValue(!1),this.libraryForm.get(`allowScrobbling`)?.disable()),this.setValues()})).subscribe(),this.libraryForm.get(`name`)?.valueChanges.pipe(Ed$1(100),Dd$1(),Sd$1(e=>this.libraryService.libraryNameExists(e)),xd$1(e=>{let i=this.libraryForm.get(`name`)?.value===this.library?.name;!e||i?this.libraryForm.get(`name`)?.setErrors(null):this.libraryForm.get(`name`)?.setErrors({duplicateName:!0}),this.cdRef.markForCheck()}),JB(this.destroyRef)).subscribe(),this.languageSettings.set(this.typeaheadSettingFactoryService.forLanguage({id:`language`,currentSelectedLanguage:this.library?.defaultLanguage,overrides:{showLocked:!1}})),this.libraryForm.get(`enableMetadata`)?.valueChanges.pipe(xd$1(e=>{let i=this.libraryForm.get(`manageCollections`),n=this.libraryForm.get(`manageReadingLists`);i?.setValue(e),n?.setValue(e),this.cdRef.markForCheck()}),JB(this.destroyRef)).subscribe(),this.libraryForm.get(`type`)?.valueChanges.pipe(xd$1(e=>{let i=parseInt(e+``,10);switch(i){case d$1.Manga:this.libraryForm.get(ue$1.Archive+``)?.setValue(!0),this.libraryForm.get(ue$1.Images+``)?.setValue(!0),this.libraryForm.get(ue$1.Pdf+``)?.setValue(!1),this.libraryForm.get(ue$1.Epub+``)?.setValue(!1);break;case d$1.Comic:case d$1.ComicVine:this.libraryForm.get(ue$1.Archive+``)?.setValue(!0),this.libraryForm.get(ue$1.Images+``)?.setValue(!1),this.libraryForm.get(ue$1.Pdf+``)?.setValue(!1),this.libraryForm.get(ue$1.Epub+``)?.setValue(!1);break;case d$1.Book:this.libraryForm.get(ue$1.Archive+``)?.setValue(!1),this.libraryForm.get(ue$1.Images+``)?.setValue(!1),this.libraryForm.get(ue$1.Pdf+``)?.setValue(!0),this.libraryForm.get(ue$1.Epub+``)?.setValue(!0);break;case d$1.LightNovel:this.libraryForm.get(ue$1.Archive+``)?.setValue(!1),this.libraryForm.get(ue$1.Images+``)?.setValue(!1),this.libraryForm.get(ue$1.Pdf+``)?.setValue(!1),this.libraryForm.get(ue$1.Epub+``)?.setValue(!0);break;case d$1.Images:this.libraryForm.get(ue$1.Archive+``)?.setValue(!1),this.libraryForm.get(ue$1.Images+``)?.setValue(!0),this.libraryForm.get(ue$1.Pdf+``)?.setValue(!1),this.libraryForm.get(ue$1.Epub+``)?.setValue(!1);break}this.scrobbleEnabledLibraries().includes(i)?(this.libraryForm.get(`allowScrobbling`)?.setValue(!0),this.libraryForm.get(`allowScrobbling`)?.enable()):(this.libraryForm.get(`allowScrobbling`)?.setValue(!1),this.libraryForm.get(`allowScrobbling`)?.disable()),this.libraryForm.get(`allowMetadataMatching`)?.setValue(!0),this.cdRef.markForCheck()}),JB(this.destroyRef)).subscribe()}setValues(){if(this.library!==void 0){this.libraryForm.get(`name`)?.setValue(this.library.name),this.libraryForm.get(`type`)?.setValue(this.library.type),this.libraryForm.get(`folderWatching`)?.setValue(this.library.folderWatching),this.libraryForm.get(`includeInDashboard`)?.setValue(this.library.includeInDashboard),this.libraryForm.get(`includeInRecommended`)?.setValue(this.library.includeInRecommended),this.libraryForm.get(`includeInSearch`)?.setValue(this.library.includeInSearch),this.libraryForm.get(`manageCollections`)?.setValue(this.library.manageCollections),this.libraryForm.get(`manageReadingLists`)?.setValue(this.library.manageReadingLists),this.libraryForm.get(`collapseSeriesRelationships`)?.setValue(this.library.collapseSeriesRelationships),this.libraryForm.get(`allowScrobbling`)?.setValue(this.scrobbleEnabledLibraries().includes(this.library.type)?this.library.allowScrobbling:!1),this.libraryForm.get(`allowMetadataMatching`)?.setValue(this.library.allowMetadataMatching),this.libraryForm.get(`metadataProvider`)?.setValue(this.library.metadataProvider),this.libraryForm.get(`excludePatterns`)?.setValue(this.excludePatterns?this.library.excludePatterns:!1),this.libraryForm.get(`enableMetadata`)?.setValue(this.library.enableMetadata),this.libraryForm.get(`removePrefixForSortName`)?.setValue(this.library.removePrefixForSortName),this.libraryForm.get(`inheritWebLinksFromFirstChapter`)?.setValue(this.library.inheritWebLinksFromFirstChapter),this.libraryForm.get(`defaultLanguage`)?.setValue(this.library.defaultLanguage),this.selectedFolders=this.library.folders,this.checkForFilesAtRoot(),this.madeChanges=!1;for(let e of mi)this.libraryForm.addControl(e+``,new Z$2((this.library.libraryFileTypes||[]).includes(e),[]));for(let e of this.library.excludePatterns)this.libraryForm.addControl(`excludeGlob-`,new Z$2(e,[]));this.excludePatterns=this.library.excludePatterns}
49else for(let e of mi)this.libraryForm.addControl(e+``,new Z$2(!0,[]));this.excludePatterns.length===0&&(this.excludePatterns=[``]),this.cdRef.markForCheck()}updateLanguage(e){this.libraryForm.get(`defaultLanguage`).setValue(e.at(0)?.isoCode??``)}updateGlobs(e){this.excludePatterns=e,this.cdRef.markForCheck()}isDisabled(){let e=[];for(let i of mi)this.libraryForm.value[i]&&e.push(i);return!(this.libraryForm.valid&&this.selectedFolders.length>0&&e.length>0)}reset(){this.setValues()}close(){this.modal.dismiss()}forceScan(){this.libraryService.scan(this.library.id,!0).subscribe(()=>{this.toastr.info(Mt$4(`toasts.forced-scan-queued`,{name:this.library.name})),this.close()})}save(){return D$5(this,null,function*(){let e=this.libraryForm.getRawValue();e.folders=this.selectedFolders,e.fileGroupTypes=[];for(let i of mi)e[i]&&e.fileGroupTypes.push(i);if(e.excludePatterns=this.excludePatterns,!this.libraryForm.errors)if(this.library!==void 0){if(e.id=this.library.id,e.folders=e.folders.map(i=>i.startsWith(`\\`)?i.substr(1,i.length):i),e.type=parseInt(e.type,10),e.type!==this.library.type&&!(yield this.confirmService.confirm(Mt$4(`toasts.confirm-library-type-change`))))return;this.libraryService.update(e).subscribe(i=>{this.modal.close(s$3(i))})}else e.folders=e.folders.map(i=>i.startsWith(`\\`)?i.substr(1,i.length):i),e.type=parseInt(e.type,10),this.libraryService.create(e).subscribe(i=>{this.toastr.success(Mt$4(`toasts.library-created`)),this.modal.close(s$3(i))})})}nextStep(){switch(this.setupStep++,this.setupStep){case Bt.Folder:this.active=me$1.Folder;break;case Bt.Cover:this.active=me$1.CoverImage;break;case Bt.Advanced:this.active=me$1.Advanced;break}this.cdRef.markForCheck()}applyCoverImage(e){this.uploadService.updateLibraryCoverImage(this.library.id,e).subscribe()}handleCoverChanged(e){e.isDirty&&this.applyCoverImage(e.fileName)}openDirectoryPicker(){this.modalService.open(ii).closed.subscribe(i=>{i.success&&(this.selectedFolders.includes(i.folderPath)||(this.selectedFolders.push(i.folderPath),this.madeChanges=!0,this.checkForFilesAtRoot(!0),this.cdRef.markForCheck()))})}removeFolder(e){this.selectedFolders=this.selectedFolders.filter(i=>i!==e),this.madeChanges=!0,this.checkForFilesAtRoot(),this.cdRef.markForCheck()}isNextDisabled(){switch(this.setupStep){case Bt.General:return this.libraryForm.get(`name`)?.invalid||this.libraryForm.get(`type`)?.invalid;case Bt.Folder:return this.selectedFolders.length===0;case Bt.Cover:return!1;case Bt.Advanced:return!1}}getTasks(){let e=[ke$3.Edit];return this.actionFactoryService.getActionablesForSettingsPage(this.actionFactoryService.getLibraryActions(),e)}runTask(e){e.callback&&e.callback(e,this.library).subscribe()}checkForFilesAtRoot(e=!1){this.libraryService.hasFilesAtRoot(this.selectedFolders).subscribe(i=>{let n=i.filter(r=>!this.filesAtRoot().includes(r));e&&n.length>0&&this.toastr.error(Mt$4(`library-settings-modal.files-at-root-warning`)),this.filesAtRoot.set(i)})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-library-settings-modal`]],inputs:{library:`library`},decls:1,vars:1,consts:[[`nav`,`ngbNav`],[`typeTooltip`,``],[`kavitaplusEligibleTooltip`,``],[`view`,``],[`edit`,``],[`badgeItem`,``],[`optionItem`,``],[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[`id`,`modal-basic-title`,1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[3,`formGroup`],[`ngbNav`,``,1,`nav-pills`,2,`min-width`,`8.4375rem`,3,`activeIdChange`,`activeId`,`orientation`],[3,`ngbNavItem`],[`ngbNavLink`,``],[`ngbNavContent`,``],[3,`ngbNavItem`,`disabled`],[3,`ngbNavOutlet`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-light`,3,`click`,`placement`,`ngbTooltip`],[`type`,`button`,1,`btn`,`btn-light`,3,`click`],[`type`,`button`,1,`btn`,`btn-secondary`,3,`click`],[`type`,`button`,1,`btn`,`btn-primary`,3,`disabled`],[1,`mb-3`],[`for`,`library-name`,1,`form-label`],[`for`,`library-type`,1,`form-label`],[`placement`,`end`,`role`,`button`,`tabindex`,`0`,1,`fa`,`fa-info-circle`,`ms-1`,3,`ngbTooltip`],[1,`float-end`],[`id`,`library-type-help`,1,`visually-hidden`],[3,`ngTemplateOutlet`],[`id`,`library-type`,`formControlName`,`type`,`aria-describedby`,`library-type-help`,1,`form-select`],[3,`value`],[1,`text-muted`,`mt-2`],[`id`,`library-name`,`formControlName`,`name`,`type`,`text`,1,`form-control`,3,`appFormField`],[`inputId`,`library-name`,3,`control`,`messages`],[`placement`,`start`,`role`,`button`,`tabindex`,`0`,1,`fa`,`fa-info-circle`,`ms-1`,3,`ngbTooltip`],[1,`alert`,`alert-warning`],[1,`list-group`,`list-group-flush`,2,`width`,`100%`],[1,`list-group-item`],[1,`row`,`mt-2`],[1,`btn`,`btn-secondary`,`float-end`,`btn-sm`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-plus`],[`rel`,`noopener noreferrer`,`target`,`_blank`,`referrerpolicy`,`no-referrer`,3,`href`],[1,`float-end`,`d-flex`,`flex-row`,`align-items-center`],[1,`fa`,`fa-warning`,`text-danger`,3,`ngbTooltip`],[1,`btn`,`btn-sm`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-times-circle`],[`role`,`alert`,1,`alert`,`alert-warning`],[3,`coverChanged`,`config`],[1,`row`,`g-0`,`mt-4`,`mb-4`],[3,`title`,`showEdit`,`canEdit`,`subtitle`,`toggleOnViewClick`],[3,`title`,`subtitle`],[3,`title`,`subtitle`,`toggleOnViewClick`,`showEdit`],[1,`setting-section-break`],[1,`row`,`g-0`,`mt-4`,`pb-4`],[1,`hstack`,`gap-2`],[1,`form-check`,`form-switch`],[`type`,`checkbox`,`switch`,``,1,`form-check-input`,3,`formControlName`,`id`],[1,`form-check-label`,3,`for`],[1,`form-check`,`form-switch`,`float-end`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`removePrefixForSortName`,1,`form-check-input`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`enableMetadata`,1,`form-check-input`],[3,`title`,`subtitle`,`canEdit`],[`formControlName`,`metadataProvider`,1,`form-select`],[3,`ngValue`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`manageCollections`,1,`form-check-input`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`manageReadingLists`,1,`form-check-input`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`allowScrobbling`,1,`form-check-input`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`allowMetadataMatching`,1,`form-check-input`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`folderWatching`,1,`form-check-input`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`includeInDashboard`,1,`form-check-input`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`includeInSearch`,1,`form-check-input`],[`type`,`checkbox`,`role`,`switch`,`formControlName`,`inheritWebLinksFromFirstChapter`,1,`form-check-input`],[3,`settings`,`locked`],[3,`selectedData`,`settings`,`locked`],[3,`updateItems`,`items`,`label`],[1,`mt-3`,`mb-3`],[3,`subtitle`],[3,`click`],[`type`,`button`,1,`btn`,`btn-primary`,3,`click`,`disabled`]],template:function(i,n){i&1&&Dm$1(0,f0,41,39,`ng-container`,7),i&2&&Vm$1(`translocoPrefix`,`library-settings-modal`)},dependencies:[jt$2,Ve,ne,ue$2,li$1,ii$2,ri$1,oi$1,Qe$5,It$1,Et$1,ei$1,ti$1,fn$1,wn,Y$4,D$1,Ke$1,Qe,Dt$2,Ct$3,_i,Wt$3,ie,O$1,cn,us$1,w$6,G$7,s$4,p$1,ao$1,ro$1,qe,ui,u$6],encapsulation:2})}}return t})();var ve=`transloco--kavita`;function re(){localStorage.removeItem(`translocoLang`),localStorage.removeItem(`@transloco/translations`),localStorage.removeItem(`@transloco/translations/timestamp`)}var ce=i=>({count:i});function de(i,u){if(i&1){let e=AC();bs$1(0,`button`,8),fy(`click`,function(){_f(e);return Mf(i_$1(2).close())}),Mu()}if(i&2){let e=i_$1().$implicit;jm$1(`aria-label`,e(`close`))}}function pe(i,u){if(i&1&&(bs$1(0,`p`)(1,`strong`),j_$1(2),Mu()(),bs$1(3,`p`),j_$1(4),Mu(),Hm$1(5,`p`,9),rM(6,`safeHtml`),bs$1(7,`p`),j_$1(8),Mu()),i&2){let e=i_$1().$implicit,t=i_$1();xb(2),Ly(e(`out-of-date.subtitle`,J_$1(6,ce,t.versionsOutOfDate()))),xb(2),Ly(e(`out-of-date.description-1`)),xb(),Vm$1(`innerHTML`,iM(6,4,e(`out-of-date.description-2`)),$h),xb(3),Ly(e(`out-of-date.description-3`))}}function ue(i,u){if(i&1&&Hm$1(0,`app-changelog-update-item`,5),i&2)Vm$1(`update`,i_$1(2).update())(`showExtras`,!1)}function me(i,u){if(i&1){let e=AC();
49bs$1(0,`button`,10),fy(`click`,function(){_f(e);return Mf(i_$1(2).refresh())}),j_$1(1),Mu()}if(i&2){let e=i_$1().$implicit;xb(),Ly(e(`new-version.refresh`))}}function he(i,u){if(i&1){let e=AC();bs$1(0,`a`,14),fy(`click`,function(){_f(e);return Mf(i_$1(3).close())}),j_$1(1),Mu()}if(i&2){let e=i_$1(2).$implicit;Vm$1(`href`,i_$1().update()?.updateUrl,qh),xb(),Ly(e(`update-notification.download`))}}function _e(i,u){if(i&1){let e=AC();bs$1(0,`a`,11),j_$1(1),Mu(),bs$1(2,`button`,12),fy(`click`,function(){_f(e);return Mf(i_$1(2).close())}),j_$1(3),Mu(),DC(4,he,2,2,`a`,13)}if(i&2){let e=i_$1().$implicit,t=i_$1();Vm$1(`href`,t.helpUrl(),qh),xb(),Ly(e(`update-notification.help`)),xb(),N_$1(q_$1(`btn `,t.isDocker()?`btn-primary`:`btn-secondary`)),xb(),Ly(e(`close`)),xb(),bC(t.isDocker()?-1:4)}}function fe(i,u){if(i&1){let e=AC();bs$1(0,`a`,15),j_$1(1,`Discord`),Mu(),bs$1(2,`button`,10),fy(`click`,function(){_f(e);return Mf(i_$1(2).close())}),j_$1(3),Mu()}if(i&2){let e=i_$1().$implicit;xb(3),Ly(e(`close`))}}function Se(i,u){if(i&1&&(xu(0),bs$1(1,`div`,1)(2,`h4`,2),j_$1(3),Mu(),DC(4,de,1,1,`button`,3),Mu(),bs$1(5,`div`,4),DC(6,pe,9,8)(7,ue,1,2,`app-changelog-update-item`,5),Mu(),bs$1(8,`div`,6),DC(9,me,2,1,`button`,7)(10,_e,5,7)(11,fe,4,1),Mu(),Gs$1()),i&2){let e,t=i_$1();xb(3),Ly(t.title()),xb(),bC(t.mode()!==`refresh`?4:-1),xb(2),bC(t.mode()===`out-of-date`?6:t.update()?7:-1),xb(3),bC((e=t.mode())===`refresh`?9:e===`update-available`?10:e===`out-of-date`?11:-1)}}var se=(()=>{class i{constructor(){this.translocoService=E$2(De$3),this.modal=E$2(F$6),this.mode=TB(`refresh`),this.update=TB(null),this.versionsOutOfDate=TB(0),this.isDocker=it$3(()=>this.update()?.isDocker??!1),this.helpUrl=it$3(()=>this.isDocker()?e$3.UpdateDocker:e$3.UpdateNative),this.localePrefix={refresh:`new-version`,"update-available":`update-notification`,"out-of-date":`out-of-date`},this.title=it$3(()=>{let e=this.update();return this.mode()===`update-available`&&e?.updateTitle!=``?e?.updateTitle??this.translocoService.translate(`${this.localePrefix[this.mode()]}.title`):this.translocoService.translate(`${this.localePrefix[this.mode()]}.title`)})}close(){this.modal.dismiss()}refresh(){this.bustLocaleCache(),location.reload(),this.modal.dismiss()}bustLocaleCache(){re();let e=localStorage.getItem(`kavita-locale`)||`en`;this.translocoService.cache.delete(e),this.translocoService.cache.clear(),setTimeout(()=>{this.translocoService.setActiveLang(e)},10)}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=yT({type:i,selectors:[[`app-version-update-modal`]],inputs:{mode:[1,`mode`],update:[1,`update`],versionsOutOfDate:[1,`versionsOutOfDate`]},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[1,`modal-title`],[`type`,`button`,1,`btn-close`],[1,`modal-body`],[3,`update`,`showExtras`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-primary`],[`type`,`button`,1,`btn-close`,3,`click`],[3,`innerHTML`],[`type`,`button`,1,`btn`,`btn-primary`,3,`click`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`btn`,`btn-icon`,`me-1`,3,`href`],[`type`,`button`,3,`click`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`btn`,`btn-primary`,3,`href`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`btn`,`btn-primary`,3,`click`,`href`],[`href`,`https://discord.gg/b52wT37kt7`,`target`,`_blank`,`rel`,`noreferrer noopener`,1,`btn`,`btn-link`,`me-1`]],template:function(t,o){t&1&&Dm$1(0,Se,12,4,`ng-container`,0),t&2&&Vm$1(`translocoPrefix`,`version-update-modal`)},dependencies:[_e$4,Ct$3,tn$1],styles:[`.update-body[_ngcontent-%COMP%]{width:100%;word-wrap:break-word;white-space:pre-wrap}  .update-body img{max-width:100%}
50/*# sourceMappingURL=version-update-modal.component-DTJFAZ3S.css.map */`]})}}return i})();var Ye=(()=>{class i{static{this.SERVER_VERSION_KEY=`kavita--version`}static{this.CLIENT_REFRESH_KEY=`kavita--client-refresh-last-shown`}static{this.DISMISS_KEY_PREFIX=`kavita--update-dismiss-`}constructor(){this.serverService=E$2(k$2),this.accountService=E$2(yc$1),this.modalService=E$2(st$4),this.router=E$2(J$7),this.destroyRef=E$2(te$5),this._currentVersion=be$3(void 0),this.currentVersion=this._currentVersion.asReadonly(),this.VERSION_CHECK_INTERVAL=1800*1e3,this.OUT_OF_BAND_AMOUNT=3,this.BACKOFF_INTERVALS=[1440*60*1e3,4320*60*1e3,10080*60*1e3,336*60*60*1e3,720*60*60*1e3],this.MAX_DISMISSALS=5,this.EXCLUDED_ROUTES=[`/manga/`,`/book/`,`/pdf/`,`/reader/`],this.modalOpen=!1,this.loadedVersion=null,this.activeModalVersion=null,this.startInitialVersionCheck(),this.startVersionCheck()}startInitialVersionCheck(){XB(this.accountService.currentUserGenericApiKey).pipe(We$5(e=>!!e),lt$3(1),Sd$1(e=>this.serverService.getVersion(e))).subscribe(e=>{this.loadedVersion=e,localStorage.setItem(i.SERVER_VERSION_KEY,e),this._currentVersion.set(e),this.cleanupOldDismissals(e),console.log(`Initial version check - Server version:`,e)})}startVersionCheck(){this.versionCheckSubscription=nI(this.VERSION_CHECK_INTERVAL).pipe(qe$2(()=>this.accountService.currentUserGenericApiKey()),We$5(e=>!!e&&!this.modalOpen),Sd$1(e=>this.serverService.getVersion(e)),We$5(e=>!!e),xd$1(e=>this.handleVersionCheck(e)),JB(this.destroyRef)).subscribe()}isExcludedRoute(){let e=this.router.url;return this.EXCLUDED_ROUTES.some(t=>e.includes(t))}handleVersionCheck(e){if(this.modalOpen||this.isExcludedRoute())return;this.loadedVersion!==null&&this.loadedVersion!==e?(localStorage.setItem(i.SERVER_VERSION_KEY,e),this._currentVersion.set(e),this.serverService.getChangelog(1).subscribe(o=>{this.showRefreshModal(o[0]),localStorage.setItem(i.CLIENT_REFRESH_KEY,Date.now().toString())}
50)):this.handleUpdateCheck()}handleUpdateCheck(){this.accountService.hasAdminRole()&&this.serverService.checkHowOutOfDate().pipe(We$5(e=>!isNaN(e)&&e>0)).subscribe(e=>{e>this.OUT_OF_BAND_AMOUNT?this.handleOutOfDate(e):this.handleUpdateAvailable(e)})}handleUpdateAvailable(e){this.serverService.getChangelog(1).subscribe(t=>{this.showUpdateAvailableModal(t[0],e)})}handleOutOfDate(e){this.showOutOfDateModal(e)}showUpdateModal(e,t={},o=!1){if(this.modalOpen)return;if(e!==`refresh`&&!o){let C=this.getBackoffVersion(e,t);if(C&&!this.shouldShowNotification(C))return;this.activeModalVersion=C}this.pauseChecks(),this.modalOpen=!0;let p=e===`refresh`?Vt$3():Wt$2(),m=this.modalService.open(se,p);m.setInput(`mode`,e),t?.update!=null&&m.setInput(`update`,t.update),t?.versionsOutOfDate!=null&&m.setInput(`versionsOutOfDate`,t.versionsOutOfDate),m.closed.subscribe(C=>this.onModalClosed()),m.dismissed.subscribe(C=>this.onModalClosed())}showRefreshModal(e){this.showUpdateModal(`refresh`,{update:e})}showUpdateAvailableModal(e,t=1){this.showUpdateModal(`update-available`,{update:e,versionsOutOfDate:t})}showOutOfDateModal(e){this.showUpdateModal(`out-of-date`,{versionsOutOfDate:e})}getBackoffVersion(e,t){return e===`update-available`?t.update?.updateVersion??null:e===`out-of-date`?this.loadedVersion:null}shouldShowNotification(e){let t=localStorage.getItem(i.DISMISS_KEY_PREFIX+e);if(!t)return!0;let{count:o,lastDismissed:p}=JSON.parse(t);if(o>=this.MAX_DISMISSALS)return!1;let m=this.BACKOFF_INTERVALS[Math.min(o-1,this.BACKOFF_INTERVALS.length-1)];return Date.now()-p>=m}recordDismissal(e){let t=localStorage.getItem(i.DISMISS_KEY_PREFIX+e),o=t?JSON.parse(t):{count:0};localStorage.setItem(i.DISMISS_KEY_PREFIX+e,JSON.stringify({count:o.count+1,lastDismissed:Date.now()}))}cleanupOldDismissals(e){let t=i.DISMISS_KEY_PREFIX+e;for(let o=localStorage.length-1;o>=0;o--){let p=localStorage.key(o);p&&p.startsWith(i.DISMISS_KEY_PREFIX)&&p!==t&&localStorage.removeItem(p)}}pauseChecks(){this.versionCheckSubscription?.unsubscribe()}onModalClosed(){this.activeModalVersion&&(this.recordDismissal(this.activeModalVersion),this.activeModalVersion=null),this.modalOpen=!1,this.startVersionCheck()}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵprov=J$6({token:i,factory:i.ɵfac,providedIn:`root`})}}return i})();var c=(function(r){return r[r.Unknown=0]=`Unknown`,r[r.Windows=1]=`Windows`,r[r.MacOs=2]=`MacOs`,r[r.Ios=3]=`Ios`,r[r.Linux=4]=`Linux`,r[r.Android=5]=`Android`,r})(c||{});var a=(function(r){return r[r.Unknown=0]=`Unknown`,r[r.WebBrowser=1]=`WebBrowser`,r[r.WebApp=2]=`WebApp`,r[r.KoReader=3]=`KoReader`,r[r.Panels=4]=`Panels`,r[r.Librera=5]=`Librera`,r[r.OpdsClient=6]=`OpdsClient`,r})(a||{});var u=(()=>{class r{static{this.DEVICE_FINGERPRINT_KEY=`kavita-fingerprint-id`}constructor(){this.clientInfo=be$3(this.detectClientInfo()),this.deviceFingerprint=be$3(this.getOrCreateDeviceFingerprint()),window.addEventListener(`resize`,()=>{this.clientInfo.update(e=>x$3(w$4({},e),{screenWidth:window.innerWidth,screenHeight:window.innerHeight,orientation:this.getOrientation()}))})}getDeviceId(){return this.deviceFingerprint()}clearDeviceFingerprint(){localStorage.removeItem(r.DEVICE_FINGERPRINT_KEY),this.deviceFingerprint.set(this.generateDeviceFingerprint())}getOrCreateDeviceFingerprint(){let e=localStorage.getItem(r.DEVICE_FINGERPRINT_KEY);return e||(e=this.generateDeviceFingerprint(),localStorage.setItem(r.DEVICE_FINGERPRINT_KEY,e)),e}generateDeviceFingerprint(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let n=Math.random()*16|0;return(e===`x`?n:n&3|8).toString(16)})}getClientInfoHeader(){let e=this.clientInfo();return`web-app/${e.appVersion} (${e.browser}/${e.browserVersion}; ${e.platform}; ${e.deviceType}; ${e.screenWidth}x${e.screenHeight}; ${e.orientation})`}detectClientInfo(){let e=navigator.userAgent;return{browser:this.detectBrowser(e),browserVersion:this.detectBrowserVersion(e),platform:c.Unknown,deviceType:this.detectDeviceType(e),screenWidth:window.innerWidth,screenHeight:window.innerHeight,orientation:this.getOrientation(),appVersion:this.getAppVersion()}}detectBrowser(e){return e.includes(`Edg/`)?`Edge`:e.includes(`Chrome/`)?`Chrome`:e.includes(`Safari/`)&&!e.includes(`Chrome`)?`Safari`:e.includes(`Firefox/`)?`Firefox`:e.includes(`Opera/`)||e.includes(`OPR/`)?`Opera`:`Unknown`}detectBrowserVersion(e){let n=null;return e.includes(`Edg/`)?n=e.match(/Edg\/(\d+\.\d+)/):e.includes(`Chrome/`)?n=e.match(/Chrome\/(\d+\.\d+)/):e.includes(`Safari/`)&&!e.includes(`Chrome`)?n=e.match(/Version\/(\d+\.\d+)/):e.includes(`Firefox/`)&&(n=e.match(/Firefox\/(\d+\.\d+)/)),n?n[1]:`Unknown`}detectDeviceType(e){return e.includes(`iPad`)||e.includes(`Android`)&&!e.includes(`Mobile`)?`Tablet`:e.includes(`Mobile`)||e.includes(`iPhone`)||e.includes(`Android`)?`Mobile`:`Desktop`}getOrientation(){return window.innerWidth>window.innerHeight?`landscape`:`portrait`}getAppVersion(){return localStorage.getItem(Ye.SERVER_VERSION_KEY)}static{this.ɵfac=function(n){return new(n||r)}}static{this.ɵprov=J$6({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();var U$1=t=>({color:t});var j=(t,l)=>l.value;function z(t,l){t&1&&(bs$1(0,`span`,3),j_$1(1),Mu()),t&2&&(xb(),Ly(l))}function G$1(t,l){t&1&&(bs$1(0,`span`,4),j_$1(1),Mu()),t&2&&(xb(),Ly(l))}function H(t,l){if(t&1){let e=AC();
50bs$1(0,`span`,10),fy(`click`,function(){_f(e);return Mf(i_$1(2).toggleAll())}),Hm$1(1,`input`,11),bs$1(2,`label`,12),j_$1(3),Mu()()}if(t&2){let e=i_$1().$implicit,i=i_$1();xb(),Vm$1(`indeterminate`,i.selectedValues().length>0&&!i.allSelected())(`checked`,i.allSelected())(`disabled`,i.disabled()),xb(2),Ly(i.allSelected()?e(`deselect-all`):e(`select-all`))}}function X(t,l){if(t&1&&Hm$1(0,`i`,16),t&2){let i=i_$1().$implicit.colour;Vm$1(`ngStyle`,J_$1(1,U$1,`rgba(${i.r}, ${i.g}, ${i.b}, ${i.a})`))}}function J$1(t,l){if(t&1){let e=AC();bs$1(0,`li`,9)(1,`div`,13)(2,`input`,14),fy(`change`,function(n){let g=_f(e).$implicit;return Mf(i_$1(2).onCheckboxChange(g,n))}),Mu(),bs$1(3,`label`,15),j_$1(4),Mu(),DC(5,X,1,3,`i`,16),Mu()()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(2);xb(2),Vm$1(`id`,W_$1(``,n.id(),`--option--`,i))(`checked`,n.isChecked(e))(`disabled`,n.isDisabled(e)),xb(),Vm$1(`for`,W_$1(``,n.id(),`--option--`,i)),xb(),Ly(e.label),xb(),bC(e.colour?5:-1)}}function K(t,l){if(t&1&&(bs$1(0,`li`,9),j_$1(1),Mu()),t&2){let e=i_$1().$implicit;xb(),Ou(` `,e(`no-data`),` `)}}function Q(t,l){if(t&1&&(xu(0),bs$1(1,`div`,1)(2,`div`,2)(3,`h4`),j_$1(4),Mu(),DC(5,z,2,1,`span`,3),DC(6,G$1,2,1,`span`,4),Mu(),DC(7,H,4,4,`span`,5),Mu(),Hm$1(8,`app-loading`,6),bs$1(9,`div`,7)(10,`ul`,8),CC(11,J$1,6,10,`li`,9,j,!1,K,2,1,`li`,9),Mu()(),Gs$1()),t&2){let e,i,n=i_$1();xb(4),Ly(n.title()),xb(),bC((e=n.tooltip())?5:-1,e),xb(),bC((i=n.warning())?6:-1,i),xb(),bC(!n.isLoading()&&n.options().length>0?7:-1),xb(),Vm$1(`loading`,n.isLoading()),xb(3),_C(n.options())}}var le=(()=>{class t{constructor(){this.id=TB.required(),this.title=TB.required(),this.tooltip=TB(``),this.loading=TB(void 0),this.options=TB.required(),this.disabled=CB(!1),this.warning=TB(void 0),this.isLoading=it$3(()=>{let e=this.loading();return e!==void 0&&e}),this.allSelected=it$3(()=>this.options().length===this.selectedValues().length),this.selectedValues=be$3([]),this._onChange=()=>{},this._onTouched=()=>{},eo$1(()=>{let e=this.selectedValues();this._onChange(e),this._onTouched()})}writeValue(e){this.selectedValues.set(e||[])}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled.set(e)}isChecked(e){return this.selectedValues().includes(e.value)}isDisabled(e){let i=this.disabled(),n=this.selectedValues();return i?!0:e.disableFunc&&e.disableFunc(e.value,n)}onCheckboxChange(e,i){i.target.checked?this.selectedValues.update(g=>[...g,e.value]):this.selectedValues.update(g=>g.filter(f=>f!==e.value))}toggleAll(){this.allSelected()?this.selectedValues.set([]):this.selectedValues.set(this.options().map(e=>e.value))}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-setting-multi-check-box`]],inputs:{id:[1,`id`],title:[1,`title`],tooltip:[1,`tooltip`],loading:[1,`loading`],options:[1,`options`],disabled:[1,`disabled`],warning:[1,`warning`]},outputs:{disabled:`disabledChange`},features:[Y_$1([{provide:D$6,useExisting:Ii(()=>t),multi:!0}])],decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`d-flex`,`justify-content-between`],[1,`w-70`],[1,`text-muted`,`d-block`],[1,`d-block`,`invalid-feedback`],[1,`form-check`,`float-end`],[3,`loading`],[1,`list-group`,`mt-2`],[1,`ps-0`],[1,`list-group-item`],[1,`form-check`,`float-end`,3,`click`],[`id`,`select-all`,`type`,`checkbox`,1,`form-check-input`,3,`indeterminate`,`checked`,`disabled`],[`for`,`select-all text-nowrap`,1,`form-check-label`],[1,`form-check`],[`type`,`checkbox`,1,`form-check-input`,3,`change`,`id`,`checked`,`disabled`],[1,`form-check-label`,3,`for`],[1,`fas`,`fa-circle`,3,`ngStyle`]],template:function(i,n){i&1&&Dm$1(0,Q,14,6,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`multi-check-box-form`)},dependencies:[Ct$3,w$7,li$1,un],styles:[`.list-group-item[_ngcontent-%COMP%]{border:none}.text-muted[_ngcontent-%COMP%]{font-size:.875rem}
51/*# sourceMappingURL=setting-multi-check-box.component-PFN7VXHT.css.map */`]})}}return t})();function k(t,l){if(t&1&&(bs$1(0,`app-tag-badge`),j_$1(1),Mu()),t&2){let e=l.$implicit;xb(),Ly(e)}}function G(t,l){t&1&&(j_$1(0),rM(1,`defaultValue`)),t&2&&Ou(` `,iM(1,
511,null),` `)}function U(t,l){if(t&1&&CC(0,k,2,1,`app-tag-badge`,null,TC,!1,G,2,3),t&2)_C(i_$1().selectedValues())}function $(t,l){if(t&1){let e=AC();bs$1(0,`textarea`,3),fy(`change`,function(o){_f(e);return Mf(i_$1().onTextFieldChange(o))}),j_$1(1,`      `),Mu()}if(t&2){let e=i_$1();Vm$1(`appFormField`,e.control())(`value`,e.textFieldValue())(`disabled`,e.disabled())}}var ee$1=(()=>{class t{constructor(){this.valueConvertor=TB(e=>e.trim()),this.stringConvertor=TB(e=>e),this.valueFilter=TB(e=>e.length>0),this.title=TB.required(),this.tooltip=TB(``),this.loading=TB(void 0),this.control=TB.required(),this.isLoading=it$3(()=>{let e=this.loading();return e!==void 0&&e}),this.textFieldValue=it$3(()=>this.selectedValues().map(this.stringConvertor()).join(`,`)),this.selectedValues=be$3([]),this.disabled=be$3(!1),this._onChange=()=>{},this._onTouched=()=>{},eo$1(()=>{let e=this.selectedValues();this._onChange(e),this._onTouched()})}writeValue(e){this.selectedValues.set(e||[])}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled.set(e)}onTextFieldChange(e){let n=e.target.value;this.selectedValues.set(n.split(`,`).map(this.valueConvertor()).filter(this.valueFilter()))}static{this.ɵfac=function(n){return new(n||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-setting-multi-text-field`]],inputs:{valueConvertor:[1,`valueConvertor`],stringConvertor:[1,`stringConvertor`],valueFilter:[1,`valueFilter`],title:[1,`title`],tooltip:[1,`tooltip`],loading:[1,`loading`],control:[1,`control`]},features:[Y_$1([{provide:D$6,useExisting:Ii(()=>t),multi:!0}])],decls:6,vars:3,consts:[[`view`,``],[`edit`,``],[3,`title`,`subtitle`,`control`],[`rows`,`3`,1,`form-control`,3,`change`,`appFormField`,`value`,`disabled`]],template:function(n,o){n&1&&(xu(0),bs$1(1,`app-setting-item`,2),Dm$1(2,U,3,1,`ng-template`,null,0,lM)(4,$,2,3,`ng-template`,null,1,lM),Mu(),Gs$1()),n&2&&(xb(),Vm$1(`title`,o.title())(`subtitle`,o.tooltip())(`control`,o.control()))},dependencies:[ai$1,li$1,Wt$3,S$9,w$6,f$9],encapsulation:2})}}return t})();var qn=(t,l)=>{let e=E$2(f$7),i=E$2(J$7),n=parseInt(t.parent?.paramMap.get(`libraryId`)??t.paramMap.get(`libraryId`)??``,10);return isNaN(n)?la$2(i.parseUrl(`/home`)):e.hasLibraryAccess(n).pipe(qe$2(d=>d||i.parseUrl(`/home`)))};var xt=(t,l)=>{let e=E$2(N$2),i=E$2(J$7),n=t.parent?.paramMap.get(`seriesId`)||t.paramMap.get(`seriesId`);return!n||n===`0`?(console.error(`Series ID not found in route params or 0`),la$2(i.parseUrl(`/home`))):e.getSeries(parseInt(n,10)).pipe(ua$2(()=>la$2(i.parseUrl(`/home`))))};var jn=(t,l)=>{let e=E$2($i),i=E$2(J$7),n=t.parent?.paramMap.get(`volumeId`)||t.paramMap.get(`volumeId`);return!n||n===`0`?(console.error(`Volume ID not found in route params or 0`),la$2(i.parseUrl(`/home`))):e.getVolumeMetadata(parseInt(n,10)).pipe(ua$2(()=>la$2(i.parseUrl(`/home`))))};var Kn=(t,l)=>{let e=E$2(Ui),i=E$2(J$7),n=t.parent?.paramMap.get(`chapterId`)||t.paramMap.get(`chapterId`);return!n||n===`0`?(console.error(`Chapter ID not found in route params or 0`),la$2(i.parseUrl(`/home`))):e.getChapterMetadata(parseInt(n,10)).pipe(ua$2(()=>la$2(i.parseUrl(`/home`))))};var Zn=(t,l)=>{let e=E$2(Bi),i=E$2(J$7),n=t.parent?.paramMap.get(`name`)||t.paramMap.get(`name`);return!n||n===``?(console.error(`Person Name not found in route params or 0`),la$2(i.parseUrl(`/home`))):e.get(n).pipe(Sd$1(d=>d===null?la$2(i.parseUrl(`/home`)):la$2(d)),ua$2(()=>la$2(i.parseUrl(`/home`))))};var Yn=(t,l)=>{let e=E$2(x$6),i=E$2(J$7),n=t.paramMap.get(`readingListId`)||t.parent?.paramMap.get(`readingListId`);return!n||n===`0`?(console.error(`Reading List ID not found in route params or 0`),la$2(i.parseUrl(`/home`))):e.getReadingList(parseInt(n,10)).pipe(Sd$1(d=>d===null?la$2(i.parseUrl(`/home`)):la$2(d)),ua$2(()=>la$2(i.parseUrl(`/home`))))};var Dt=(()=>{class t{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=Mn({token:t,factory:t.ɵfac})}}return t})();var ko=()=>[`--primary-color`,`--primary-color-dark-shade`,`--primary-color-darker-shade`,`--primary-color-darkest-shade`,`--error-color`,`--error-accent-color`,`--warning-color`,`--success-color`,`--body-text-color`,`--text-muted-color`,`--offwhite-text-color`,`--white-text-color`];var Eo=()=>[`--elevation-layer0-dark-solid`,`--elevation-layer1-dark-solid`,`--elevation-layer2-dark-solid`,`--elevation-layer3-dark-solid`,`--elevation-layer4-dark-solid`,`--elevation-layer5-dark-solid`,`--elevation-layer6-dark-solid`,`--elevation-layer7-dark-solid`,`--elevation-layer8-dark-solid`,`--elevation-layer9-dark-solid`];var Do=()=>[`--bs-body-bg`,`--card-bg-color`,`--modal-bg-color`,`--navbar-bg-color`,`--side-nav-bg-color`,`--drawer-bg-color`,`--popover-body-bg-color`,`--dropdown-item-bg
51-color`,`--input-bg-color`,`--accent-bg-color`];function Mo(t,l){if(t&1&&(bs$1(0,`div`,5),Hm$1(1,`div`,133),bs$1(2,`code`,134),j_$1(3),Mu()()),t&2){let e=l.$implicit;xb(),wy(`background`,`var(`+e+`)`),xb(2),Ly(e)}}function Io(t,l){if(t&1&&(bs$1(0,`div`,5),Hm$1(1,`div`,133),bs$1(2,`code`,134),j_$1(3),Mu()()),t&2){let e=l.$implicit;xb(),wy(`background`,`var(`+e+`)`),xb(2),Ly(e)}}function No(t,l){if(t&1&&(bs$1(0,`div`,5),Hm$1(1,`div`,133),bs$1(2,`code`,134),j_$1(3),Mu()()),t&2){let e=l.$implicit;xb(),wy(`background`,`var(`+e+`)`),xb(2),Ly(e)}}function Oo(t,l){t&1&&j_$1(0,` Current value `)}function Po(t,l){t&1&&Hm$1(0,`input`,135)}function Vo(t,l){t&1&&(bs$1(0,`div`,91),Hm$1(1,`input`,136),Mu())}var Jn=(()=>{class t{constructor(){this.confirmService=E$2(bi),this.TagBadgeCursor=l,this.PlusMediaFormat=bt$1,this.ScrobbleProvider=i$2,this.form=new G$6({textArea:new Z$2(``,[Ce$3.required])}),this.select2Demo=[{value:1,label:`Option A`},{value:2,label:`Option B`},{value:3,label:`Option C`}],this.settingCheckboxOptions=[{label:`Option One`,value:1},{label:`Option Two`,value:2},{label:`Option Three`,value:3}]}confirm(){this.confirmService.confirm(`Test content`)}alert(){this.confirmService.alert(`Test content`)}info(){this.confirmService.info(`Test content`,`Info`)}prompt(){this.confirmService.prompt(`Enter a value`)}dangerConfirm(){let e=new S$7;e.header=`Delete series`,e.content=`This action cannot be undone.`,e.buttons=[{text:`Cancel`,type:`secondary`},{text:`Delete`,type:`danger`}],this.confirmService.confirm(void 0,e)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-theme`]],decls:485,vars:51,consts:[[`view`,``],[`edit`,``],[3,`open`],[`accTitle`,``],[1,`swatch-grid`],[1,`swatch`],[1,`setting-section-break`],[1,`demo-row`],[1,`btn`,`btn-primary`],[1,`fas`,`fa-exclamation`],[1,`btn`,`btn-secondary`],[1,`btn`,`btn-warning`],[1,`btn`,`btn-danger`],[`disabled`,``,1,`btn`,`btn-primary`],[1,`btn`,`btn-outline-primary`],[1,`btn`,`btn-outline-secondary`],[1,`btn`,`btn-outline-warning`],[1,`btn`,`btn-outline-danger`],[1,`btn`,`btn-primary-text`],[1,`btn`,`btn-secondary-text`],[1,`btn`,`btn-warning-text`],[1,`btn`,`btn-danger-text`],[1,`btn`,`btn-icon`],[1,`fas`,`fa-ellipsis-v`],[1,`btn`,`btn-actions`],[1,`fas`,`fa-cog`],[1,`btn`,`btn-link`],[1,`badge`,`bg-primary`],[1,`badge`,`bg-secondary`],[1,`badge`,`bg-success`],[1,`badge`,`bg-danger`],[1,`badge`,`bg-warning`],[1,`badge`,`bg-info`],[1,`badge`,`rounded-pill`,`bg-primary`],[3,`color`],[3,`size`],[3,`shape`],[3,`fillStyle`],[3,`fillStyle`,`color`],[3,`fillStyle`,`shape`],[3,`fillStyle`,`selectionMode`,`color`],[3,`pct`],[3,`format`],[3,`provider`],[3,`provider`,`id`],[`role`,`alert`,1,`alert`,`alert-primary`],[`role`,`alert`,1,`alert`,`alert-secondary`],[`role`,`alert`,1,`alert`,`alert-success`],[`role`,`alert`,1,`alert`,`alert-danger`],[`role`,`alert`,1,`alert`,`alert-warning`],[`role`,`alert`,1,`alert`,`alert-info`],[`role`,`alert`,1,`alert`,`alert-light`],[`role`,`alert`,1,`alert`,`alert-dark`],[`role`,`alert`,`aria-live`,`assertive`,`aria-atomic`,`true`,1,`toast`,`show`],[1,`toast-header`],[1,`me-auto`],[`type`,`button`,`aria-label`,`Close`,1,`btn-close`],[1,`toast-body`],[1,`nav`,`nav-tabs`],[1,`nav-item`],[`href`,`javascript:void(0);`,1,`nav-link`,`active`],[`href`,`javascript:void(0);`,1,`nav-link`],[`aria-disabled`,`true`,1,`nav-link`,`disabled`],[1,`demo-stack`],[`for`,`demo-text`,1,`form-label`],[`type`,`text`,`id`,`demo-text`,`placeholder`,`Placeholder text`,1,`form-control`],[1,`form-text`],[`for`,`demo-textarea`,1,`form-label`],[`id`,`demo-textarea`,`rows`,`3`,`placeholder`,`Multi-line text`,1,`form-control`],[`for`,`demo-select`,1,`form-label`],[`id`,`demo-select`,1,`form-select`],[`for`,`demo-disabled`,1,`form-label`],[`type`,`text`,`id`,`demo-disabled`,`value`,`Disabled value`,`disabled`,``,1,`form-control`],[`for`,`demo-readonly`,1,`form-label`],[`type`,`text`,`id`,`demo-readonly`,`value`,`Readonly value`,`readonly`,``,1,`form-control`],[`labelId`,`demo-setting-item`,3,`title`,`subtitle`],[3,`title`,`subtitle`],[`id`,`demo-multi-check`,3,`title`,`tooltip`,`options`],[3,`formGroup`],[3,`title`,`tooltip`,`control`],[1,`form-check`],[`type`,`checkbox`,`id`,`demo-check-1`,`checked`,``,1,`form-check-input`],[`for`,`demo-check-1`,1,`form-check-label`],[`type`,`checkbox`,`id`,`demo-check-2`,1,`form-check-input`],[`for`,`demo-check-2`,1,`form-check-label`],[`type`,`checkbox`,`id`,`demo-check-3`,`disabled`,``,1,`form-check-input`],[`for`,`demo-check-3`,1,`form-check-label`],[`type`,`radio`,`name`,`demo-radio`,`id`,`demo-radio-1`,`checked`,``,1,`form-check-input`],[`for`,`demo-radio-1`,1,`form-check-label`],[`type`,`radio`,`name`,`demo-radio`,`id`,`demo-radio-2`,1,`form-check-input`],[`for`,`demo-radio-2`,1,`form-check-label`],[1,`form-check`,`form-switch`],[`type`,`checkbox`,`role`,`switch`,`id`,`demo-switch-1`,`checked`,``,1,`form-check-input`],[`for`,`demo-switch-1`,1,`form-check-label`],[`type`,`checkbox`,`role`,`switch`,`id`,`demo-switch-2`,1,`form-check-input`],[`for`,`demo-switch-2`,1,`form-check-label`],[`type`,`range`,`min`,`0`,`max`,`100`,`value`,`50`,1,`form-range`],[`href`,`javascript:void(0);`],[1,`dropdown-menu`,`show`,`position-static`,`d-inline-block`],[`type`,`button`,1,`dropdown-item`,`active`],[`type`,`button`,1,`dropdown-item`],[1,`dropdown-divider`],[`type`,`button`,`disabled`,``,1,`dropdown-item`],[`aria-label`,`Demo single select`,3,`data`,`overlay`],[`aria-label`,`Demo multi select`,3,`data`,`multiple`,`overlay`],[1,`card`,2,`max-width`,`22rem`],[1,`card-body`],[1,`card-title`],[1,`card-subtitle`,`mb-2`],[1,`card-text`],[1,`card-footer`],[1,`list-group`],[1,`list-group-item`,`active`],[1,`list-group-item`],[1,`list-group-item`,`disabled`],[1,`table`,`table-striped`],[`scope`,`col`],[`aria-label`,`Demo pagination`],[1,`pagination`],[1,`page-item`,`disabled`],[`href`,`javascript:void(0);`,1,`page-link`],[1,`page-item`,`active`],[1,`page-item`],[`role`,`progressbar`,`aria-label`,`Demo progress`,`aria-valuenow`,`35`,`aria-valuemin`,`0`,`aria-valuemax`,`
51100`,1,`progress`],[1,`progress-bar`,2,`width`,`35%`],[`role`,`progressbar`,`aria-label`,`Demo striped progress`,`aria-valuenow`,`65`,`aria-valuemin`,`0`,`aria-valuemax`,`100`,1,`progress`],[1,`progress-bar`,`progress-bar-striped`,`progress-bar-animated`,2,`width`,`65%`],[`aria-label`,`breadcrumb`],[1,`breadcrumb`],[1,`breadcrumb-item`],[`aria-current`,`page`,1,`breadcrumb-item`,`active`],[1,`btn`,`btn-primary`,3,`click`],[1,`btn`,`btn-danger`,3,`click`],[1,`swatch-chip`],[1,`swatch-label`],[`type`,`text`,`id`,`demo-setting-item`,`value`,`Current value`,1,`form-control`],[`type`,`checkbox`,`role`,`switch`,`checked`,``,1,`form-check-input`]],template:function(i,n){i&1&&(bs$1(0,`app-accordion`,2)(1,`span`,3),j_$1(2,`Color & Token Palette`),Mu(),bs$1(3,`h4`),j_$1(4,`Base colors`),Mu(),bs$1(5,`div`,4),CC(6,Mo,4,3,`div`,5,TC),Mu(),Hm$1(8,`div`,6),bs$1(9,`h4`),j_$1(10,`Elevation layers (solid)`),Mu(),bs$1(11,`div`,4),CC(12,Io,4,3,`div`,5,TC),Mu(),Hm$1(14,`div`,6),bs$1(15,`h4`),j_$1(16,`Surfaces`),Mu(),bs$1(17,`div`,4),CC(18,No,4,3,`div`,5,TC),Mu()(),bs$1(20,`app-accordion`)(21,`span`,3),j_$1(22,`Buttons`),Mu(),bs$1(23,`h4`),j_$1(24,`Primary classes`),Mu(),bs$1(25,`div`,7)(26,`button`,8),Hm$1(27,`i`,9),j_$1(28,` btn-primary `),Mu(),bs$1(29,`button`,10),Hm$1(30,`i`,9),j_$1(31,` btn-secondary `),Mu(),bs$1(32,`button`,11),Hm$1(33,`i`,9),j_$1(34,` btn-warning `),Mu(),bs$1(35,`button`,12),Hm$1(36,`i`,9),j_$1(37,` btn-danger `),Mu(),bs$1(38,`button`,13),Hm$1(39,`i`,9),j_$1(40,` disabled `),Mu()(),Hm$1(41,`div`,6),bs$1(42,`h4`),j_$1(43,`Outline classes`),Mu(),bs$1(44,`div`,7)(45,`button`,14),Hm$1(46,`i`,9),j_$1(47,` btn-outline-primary `),Mu(),bs$1(48,`button`,15),Hm$1(49,`i`,9),j_$1(50,` btn-outline-secondary `),Mu(),bs$1(51,`button`,16),Hm$1(52,`i`,9),j_$1(53,` btn-outline-warning `),Mu(),bs$1(54,`button`,17),Hm$1(55,`i`,9),j_$1(56,` btn-outline-danger `),Mu()(),Hm$1(57,`div`,6),bs$1(58,`h4`),j_$1(59,`Outline Classes (as Anchors)`),Mu(),bs$1(60,`div`,7)(61,`a`,14),Hm$1(62,`i`,9),j_$1(63,` btn-outline-primary `),Mu(),bs$1(64,`a`,15),Hm$1(65,`i`,9),j_$1(66,` btn-outline-secondary `),Mu(),bs$1(67,`a`,16),Hm$1(68,`i`,9),j_$1(69,` btn-outline-warning `),Mu(),bs$1(70,`a`,17),Hm$1(71,`i`,9),j_$1(72,` btn-outline-danger `),Mu()(),Hm$1(73,`div`,6),bs$1(74,`h4`),j_$1(75,`Text classes`),Mu(),bs$1(76,`div`,7)(77,`button`,18),Hm$1(78,`i`,9),j_$1(79,` btn-primary-text `),Mu(),bs$1(80,`button`,19),Hm$1(81,`i`,9),j_$1(82,` btn-secondary-text `),Mu(),bs$1(83,`button`,20),Hm$1(84,`i`,9),j_$1(85,` btn-warning-text `),Mu(),bs$1(86,`button`,21),Hm$1(87,`i`,9),j_$1(88,` btn-danger-text `),Mu()(),Hm$1(89,`div`,6),bs$1(90,`h4`),j_$1(91,`Icon & action classes`),Mu(),bs$1(92,`div`,7)(93,`button`,22),Hm$1(94,`i`,23),Mu(),bs$1(95,`button`,24),Hm$1(96,`i`,25),Mu(),bs$1(97,`button`,26),j_$1(98,`btn-link`),Mu()()(),bs$1(99,`app-accordion`)(100,`span`,3),j_$1(101,`Badges`),Mu(),bs$1(102,`h4`),j_$1(103,`Bootstrap badges`),Mu(),bs$1(104,`div`,7)(105,`span`,27),j_$1(106,`primary`),Mu(),bs$1(107,`span`,28),j_$1(108,`secondary`),Mu(),bs$1(109,`span`,29),j_$1(110,`success`),Mu(),bs$1(111,`span`,30),j_$1(112,`danger`),Mu(),bs$1(113,`span`,31),j_$1(114,`warning`),Mu(),bs$1(115,`span`,32),j_$1(116,`info`),Mu(),bs$1(117,`span`,33),j_$1(118,`pill`),Mu()(),Hm$1(119,`div`,6),bs$1(120,`h4`),j_$1(121,`Tag badge (outline)`),Mu(),bs$1(122,`div`,7)(123,`app-tag-badge`),j_$1(124,`default`),Mu(),bs$1(125,`app-tag-badge`,34),j_$1(126,`primary`),Mu(),bs$1(127,`app-tag-badge`,34),j_$1(128,`secondary`),Mu(),bs$1(129,`app-tag-badge`,34),j_$1(130,`error`),Mu(),bs$1(131,`app-tag-badge`,35),j_$1(132,`small`),Mu(),bs$1(133,`app-tag-badge`,36),j_$1(134,`pill`),Mu()(),Hm$1(135,`div`,6),bs$1(136,`h4`),j_$1(137,`Tag badge (filled)`),Mu(),bs$1(138,`div`,7)(139,`app-tag-badge`,37),j_$1(140,`default`),Mu(),bs$1(141,`app-tag-badge`,38),j_$1(142,`primary`),Mu(),bs$1(143,`app-tag-badge`,38),j_$1(144,`secondary`),Mu(),bs$1(145,`app-tag-badge`,38),j_$1(146,`error`),Mu(),bs$1(147,`app-tag-badge`,39),j_$1(148,`pill`),Mu(),bs$1(149,`app-tag-badge`,40),j_$1(150,`clickable`),Mu()(),Hm$1(151,`div`,6),bs$1(152,`h4`),j_$1(153,`Confidence chip`),Mu(),bs$1(154,`div`,7),Hm$1(155,`app-confidence-chip`,41)(156,`app-confidence-chip`,41)(157,`app-confidence-chip`,41)(158,`app-confidence-chip`,41),Mu(),Hm$1(159,`div`,6),bs$1(160,`h4`),j_$1(161,`Media format pill`),Mu(),bs$1(162,`div`,7),Hm$1(163,`app-media-format-pill`,42)(164,`app-media-format-pill`,42)(165,`app-media-format-pill`,42)(166,`app-media-format-pill`,42),Mu(),Hm$1(167,`div`,6),bs$1(168,`h4`),j_$1(169,`Scrobble provider tag badge`),Mu(),bs$1(170,`div`,7),Hm$1(171,`app-scrobble-provider-tag-badge`,43)(172,`app-scrobble-provider-tag-badge`,43)(173,`app-scrobble-provider-tag-badge`,43)(174,`app-scrobble-provider-tag-badge`,43)(175,`app-scrobble-provider-tag-badge`,44),Mu()(),bs$1(176,`app-accordion`)(177,`span`,3),j_$1(178,`Alerts`),Mu(),bs$1(179,`div`,45),j_$1(180,` A simple primary alert—check it out! `),Mu(),bs$1(181,`div`,46),j_$1(182,` A simple secondary alert—check it out! `),Mu(),bs$1(183,`div`,47),j_$1(184,` A simple success alert—check it out! `),Mu(),bs$1(185,`div`,48),j_$1(186,` A simple danger alert—check it out! `),Mu(),bs$1(187,`div`,49),j_$1(188,` A simple warning alert—check it out! `),Mu(),bs$1(189,`div`,50),j_$1(190,` A simple info alert—check it out! `),Mu(),bs$1(191,`div`,51),j_$1(192,` A simple light alert—check it out! `),Mu(),bs$1(193,`div`,52),j_$1(194,` A simple dark alert—check it out! `),Mu()(),bs$1(195,`app-accordion`)(196,`span`,3),j_$1(197,`Toasts`),Mu(),bs$1(198,`div`,53)(199,`div`,54)(200,`strong`,55),j_$1(201,`Kavita`),Mu(),bs$1(202,`small`),j_$1(203,`just now`),Mu(),Hm$1(204,`button`,56),Mu(),bs$1(205,`div`,57),j_$1(206,` A static toast body, shown so toast tokens render without a JS trigger. `),Mu()()(),bs$1(207,`app-accordion`)(208,`span`,3),j_$1(209,`Tabs`),Mu(),bs$1(210,`ul`,58)(211,`li`,59)(212,`a`,60),j_$1(213,`Active`),Mu()(),bs$1(214,`li`,59)(215,`a`,61),j_$1(216,`Inactive`),Mu()(),bs$1(217,`li`,59)(218,`a`,61),j_$1(219,`Another`),Mu()(),bs$1(220,`li`,59)(221,`a`,62),j_$1(222,`Disabled`),Mu()()()(),bs$1(223,`app-accordion`)(224,`span`,3),j_$1(225,`Form Controls`),Mu(),bs$1(226,`div`,63)(227,`div`)(228,`label`,64),j_$1(229,`Text input`),Mu(),Hm$1(230,`input`,65),bs$1(231,`div`,66),j_$1(232,`Helper text below the input.`),Mu()(),bs$1(233,`div`)(234,`label`,67),j_$1(235,`Textarea`),Mu(),Hm$1(236,`textarea`,68),Mu(),bs$1(237,`div`)(238,`label`,69),j_$1(239,`Native select`),Mu(),bs$1(240,`select`,70)(241,`option`),j_$1(242,`Option 1`),Mu(),bs$1(243,`option`),j_$1(244,`Option 2`),Mu(),bs$1(245,`option`),j_$1(246,`Option 3`),Mu()()(),bs$1(247,`div`)(248,`label`,71),j_$1(249,`Disabled`),Mu(),Hm$1(250,`input`,72),Mu(),bs$1(251,`div`)(252,`label`,73),j_$1(253,`Readonly`),Mu(),Hm$1(254,`input`,74),Mu()()(),bs$1(255,`app-accordion`)(256,`span`,3),j_$1(257,`Setting Input Fields`),Mu(),bs$1(258,`h4`),j_$1(259,`app-setting-item`),Mu(),bs$1(260,`app-setting-item`,75),Dm$1(261,Oo,1,0,`ng-template`,null,0,lM)(263,Po,1,0,`ng-template`,null,1,lM),Mu(),Hm$1(265,`div`,6),bs$1(266,`h4`),j_$1(267,`app-setting-switch`),Mu(),bs$1(268,`app-setting-switch`,76),Dm$1(269,Vo,2,0,`ng-template`),Mu(),Hm$1(270,`div`,6),bs$1(271,`h4`),j_$1(272,`app-setting-multi-check-box`),Mu(),Hm$1(273,`app-setting-multi-check-box`,77)(274,`div`,6),bs$1(275,`h4`),j_$1(276,`app-setting-multi-text-field`),Mu(),bs$1(277,`form`,78),Hm$1(278,`app-setting-multi-text-field`,79),Mu()(),bs$1(279,`app-accordion`)(280,`span`,3),j_$1(281,`Checkbox / Radio / Switch`),Mu(),bs$1(282,`h4`),j_$1(283,`Checkboxes`),Mu(),bs$1(284,`div`,80),Hm$1(285,`input`,81),bs$1(286,`label`,82),j_$1(287,`Checked`),Mu()(),bs$1(288,`div`,80),Hm$1(289,`input`,83),bs$1(290,`label`,84),j_$1(291,`Unchecked`),Mu()(),bs$1(292,`div`,80),Hm$1(293,`input`,85),bs$1(294,`label`,86),j_$1(295,`Disabled`),Mu()(),Hm$1(296,`div`,6),bs$1(297,`h4`),j_$1(298,`Radios`),Mu(),bs$1(299,`div`,80),Hm$1(300,`input`,87),bs$1(301,`label`,88),j_$1(302,`Selected`),Mu()(),bs$1(303,`div`,80),Hm$1(304,`input`,89),bs$1(305,`label`,90),j_$1(306,`Unselected`),Mu()(),Hm$1(307,`div`,6),bs$1(308,`h4`),j_$1(309,`Switch`),Mu(),bs$1(310,`div`,91),Hm$1(311,`input`,92),bs$1(312,`label`,93),j_$1(313,`On`),Mu()(),bs$1(314,`div`,91),Hm$1(315,`input`,94),bs$1(316,`label`,95),j_$1(317,`Off`),Mu()(),Hm$1(318,`div`,6),bs$1(319,`h4`),j_$1(320,`Range slider`),Mu(),Hm$1(321,`input`,96),Mu(),bs$1(322,`app-accordion`)(323,`span`,3),j_$1(324,`Links (Anchors)`),Mu(),bs$1(325,`p`),j_$1(326,` An inline `),bs$1(327,`a`,97),j_$1(328,`anchor link`),Mu(),j_$1(329,` within a paragraph of body text to show the default link color and hover treatment. `),Mu()(),bs$1(330,`app-accordion`)(331,`span`,3),j_$1(332,`Dropdown & Select2`),Mu(),bs$1(333,`h4`),j_$1(334,`Bootstrap dropdown (static)`),Mu(),bs$1(335,`div`,98)(336,`button`,99),j_$1(337,`Active item`),Mu(),bs$1(338,`button`,100),j_$1(339,`Regular item`),Mu(),bs$1(340,`button`,100),j_$1(341,`Another item`),Mu(),Hm$1(342,`div`,101),bs$1(343,`button`,102),j_$1(344,`Disabled item`),Mu()(),Hm$1(345,`div`,6),bs$1(346,`h4`),j_$1(347,`Select2 (single)`),Mu(),Hm$1(348,`select2`,103)(349,`div`,6),bs$1(350,`h4`),j_$1(351,`Select2 (multiple)`),Mu(),Hm$1(352,`select2`,104),Mu(),bs$1(353,`app-accordion`)(354,`span`,3),j_$1(355,`Cards`),Mu(),bs$1(356,`div`,105)(357,`div`,106)(358,`h5`,107),j_$1(359,`Card title`),Mu(),bs$1(360,`h6`,108),j_$1(361,`Card subtitle`),Mu(),bs$1(362,`p`,109),j_$1(363,`Some quick example body text to build on the card and fill out its content.`),Mu(),bs$1(364,`button`,8),j_$1(365,`Action`),Mu()(),bs$1(366,`div`,110),j_$1(367,` Card footer `),Mu()()(),bs$1(368,`app-accordion`)(369,`span`,3),j_$1(370,`Lists`),Mu(),bs$1(371,`ul`,111)(372,`li`,112),j_$1(373,`Active item`),Mu(),bs$1(374,`li`,113),j_$1(375,`A second item`),Mu(),bs$1(376,`li`,113),j_$1(377,`A third item`),Mu(),bs$1(378,`li`,114),j_$1(379,`A disabled item`),Mu()()(),bs$1(380,`app-accordion`)(381,`span`,3),j_$1(382,`Table`),Mu(),bs$1(383,`table`,115)(384,`thead`)(385,`tr`)(386,`th`,116),j_$1(387,`#`),Mu(),bs$1(388,`th`,116),j_$1(389,`Name`),Mu(),bs$1(390,`th`,116),j_$1(391,`Format`),Mu(),bs$1(392,`th`,116),j_$1(393,`Status`),Mu()()(),bs$1(394,`tbody`)(395,`tr`)(396,`td`),j_$1(397,`1`),Mu(),bs$1(398,`td`),j_$1(399,`Series One`),Mu(),bs$1(400,`td`),j_$1(401,`Manga`),Mu(),bs$1(402,`td`),j_$1(403,`Ongoing`),Mu()(),bs$1(404,`tr`)(405,`td`),j_$1(406,`2`),Mu(),bs$1(407,`td`),j_$1(408,`Series Two`),Mu(),bs$1(409,`td`),j_$1(410,`Comic`),Mu(),bs$1(411,`td`),j_$1(412,`Completed`),Mu()(),bs$1(413,`tr`)(414,`td`),j_$1(415,`3`),Mu(),bs$1(416,`td`),j_$1(417,`Series Three`),Mu(),bs$1(418,`td`),j_$1(419,`Light Novel`),Mu(),bs$1(420,`td`),j_$1(421,`Hiatus`),Mu()()()()(),bs$1(422,`app-accordion`)(423,`span`,3),j_$1(424,`Pagination`),Mu(),bs$1(425,`nav`,117)(426,`ul`,118)(427,`li`,119)(428,`a`,120),j_$1(429,`Previous`),Mu()(),bs$1(430,`li`,121)(431,`a`,120),j_$1(432,`1`),Mu()(),bs$1(433,`li`,122)(434,`a`,120),j_$1(435,`2`),Mu()(),bs$1(436,`li`,122)(437,`a`,120),j_$1(438,`3`),Mu()(),bs$1(439,`li`,122)(440,`a`,120),j_$1(441,`Next`),Mu()()()()(),bs$1(442,`app-accordion`)(443,`span`,3),j_$1(444,`Progress`),Mu(),bs$1(445,`div`,123)(446,`div`,124),j_$1(447,`35%`),Mu()(),Hm$1(448,`div`,6),bs$1(449,`div`,125),Hm$1(450,`div`,126),Mu()(),bs$1(451,`app-accordion`)(452,`span`,3),j_$1(453,`Breadcrumb`),Mu(),bs$1(454,`nav`,127)(455,`ol`,128)(456,`li`,129)(457,`a`,97),j_$1(458,`Home`),Mu()(),bs$1(459,`li`,129)(460,`a`,97),j_$1(461,`Library`),Mu()(),bs$1(462,`li`,130),j_$1(463,`Series`),Mu()()()(),bs$1(464,`app-accordion`)(465,`span`,3),j_$1(466,`Dividers`),Mu(),Hm$1(467,`div`,6)(468,`hr`),Mu(),bs$1(469,`app-accordion`)(470,`span`,3),j_$1(471,`Confirm Popups`),Mu(),bs$1(472,`p`),j_$1(473,`Each dialog type drives its own accent color and header icon. The danger example shows the destructive button variant.`),Mu(),bs$1(474,`div`,7)(475,`button`,131),fy(`click`,function(){return n.confirm()}),j_$1(476,`Confirm`),Mu(),bs$1(477,`button`,132),fy(`click`,function(){return n.alert()}),j_$1(478,`Alert`),Mu(),bs$1(479,`button`,131),fy(`click`,function(){return n.info()}),j_$1(480,`Info`),Mu(),bs$1(481,`button`,131),fy(`click`,function(){return n.prompt()}),j_$1(482,`Prompt`),Mu(),bs$1(483,`button`,132),fy(`click`,function(){return n.dangerConfirm()}),j_$1(484,`Danger Confirm`),Mu()()()),i&2&&(Vm$1(`open`,!0),xb(6),_C(K_$1(48,ko)),xb(6),_C(K_$1(49,Eo)),xb(6),_C(K_$1(50,Do)),xb(107),Vm$1(`color`,`primary`),xb(2),Vm$1(`color`,`secondary`),xb(2),Vm$1(`color`,`error`),xb(2),Vm$1(`size`,`sm`),xb(2),Vm$1(`shape`,`pill`),xb(6),Vm$1(`fillStyle`,`filled`),xb(2),Vm$1(`fillStyle`,`filled`)(`color`,`primary`),xb(2),Vm$1(`fillStyle`,`filled`)(`color`,`secondary`),xb(2),Vm$1(`fillStyle`,`filled`)(`color`,`error`),xb(2),Vm$1(`fillStyle`,`filled`)(`shape`,`pill`),xb(2),Vm$1(`fillStyle`,`filled`)(`selectionMode`,n.TagBadgeCursor.Clickable)(`color`,`primary`),xb(6),Vm$1(`pct`,95),xb(),Vm$1(`pct`,80),xb(),Vm$1(`pct`,60),xb(),Vm$1(`pct`,40),xb(5),Vm$1(`format`,n.PlusMediaFormat.Manga),xb(),Vm$1(`format`,n.PlusMediaFormat.LightNovel),xb(),Vm$1(`format`,n.PlusMediaFormat.Comic),xb(),Vm$1(`format`,n.PlusMediaFormat.Book),xb(5),Vm$1(`provider`,n.ScrobbleProvider.AniList),xb(),Vm$1(`provider`,n.ScrobbleProvider.Mal),xb(
51),Vm$1(`provider`,n.ScrobbleProvider.Cbr),xb(),Vm$1(`provider`,n.ScrobbleProvider.Hardcover),xb(),Vm$1(`provider`,n.ScrobbleProvider.MangaBaka)(`id`,12345),xb(85),Vm$1(`title`,`Setting item`)(`subtitle`,`Click the row or Edit to toggle into edit mode.`),xb(8),Vm$1(`title`,`Setting switch`)(`subtitle`,`A labelled toggle row.`),xb(5),Vm$1(`title`,`Setting multi check-box`)(`tooltip`,`Select any number of options.`)(`options`,n.settingCheckboxOptions),xb(4),Vm$1(`formGroup`,n.form),xb(),Vm$1(`title`,`Setting multi text-field`)(`tooltip`,`Comma-separated values become tag badges.`)(`control`,n.form.get(`textArea`)),xb(70),Vm$1(`data`,n.select2Demo)(`overlay`,!0),xb(4),Vm$1(`data`,n.select2Demo)(`multiple`,!0)(`overlay`,!0))},dependencies:[B$1,pn,S$9,mo$1,so$1,Hi,Wt$3,ie,ee$1,le,li$1,ii$2,ri$1,oi$1,ti$1,fn$1],styles:[`.demo-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.demo-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;max-width:32rem}.swatch-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(9.5rem,1fr));gap:.75rem}.swatch[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem;padding:.5rem;border:1px solid var(--%NS%hr-color);border-radius:var(--%NS%card-border-radius);background-color:var(--%NS%card-bg-color)}.swatch-chip[_ngcontent-%COMP%]{height:3.5rem;border-radius:var(--%NS%card-border-radius);box-shadow:inset 0 0 0 1px var(--%NS%hr-color)}.swatch-label[_ngcontent-%COMP%]{font-size:.7rem;color:var(--%NS%text-muted-color);word-break:break-all}
52/*# sourceMappingURL=theme.component-IK246EXE.css.map */`]})}}return t})();var eo=[{path:``,canActivate:[A$1],runGuardsAndResolvers:`always`,children:[{path:`theme`,loadChildren:()=>[{path:``,component:Jn,pathMatch:`full`,title:`Themes`}]},{path:`settings`,loadChildren:()=>import(`./chunk-CnYlwpVW2.js`).then(t=>t.routes)},{path:`collections`,loadChildren:()=>import(`./chunk-BC985U192.js`).then(t=>t.routes)},{path:`announcements`,loadChildren:()=>import(`./chunk-o06Mli8O.js`).then(t=>t.routes)},{path:`bookmarks`,loadChildren:()=>import(`./chunk-CW0v84WV.js`).then(t=>t.routes)},{path:`all-series`,loadChildren:()=>import(`./chunk-CtT_ReeX.js`).then(t=>t.routes)},{path:`all-filters`,loadChildren:()=>import(`./chunk-wfkl3veT.js`).then(t=>t.routes)},{path:`want-to-read`,loadChildren:()=>import(`./chunk-DRf8dp6u.js`).then(t=>t.routes)},{path:`home`,loadChildren:()=>import(`./chunk-BKDDrYW4.js`).then(t=>t.routes)},{path:`person/:name`,runGuardsAndResolvers:`always`,canActivate:[A$1],resolve:{person:Zn},loadComponent:()=>import(`./chunk-CvCDPG1z2.js`).then(t=>t.PersonDetailComponent)},{path:`browse`,loadChildren:()=>import(`./chunk-DNZkqUpf2.js`).then(t=>t.routes)},{path:`profile`,loadChildren:()=>import(`./chunk-K0nAaLbk2.js`).then(t=>t.routes)},{path:`lists`,pathMatch:`full`,title:`title.reading-lists`,loadComponent:()=>import(`./chunk-BzoxLUI6.js`).then(t=>t.ReadingListsComponent),resolve:{filter:m$2}},{path:`lists/:readingListId`,runGuardsAndResolvers:`always`,canActivate:[A$1],data:{titleField:`readingList`,titleProp:`title`},resolve:{readingList:Yn},loadComponent:()=>import(`./chunk-DN0xfL8H.js`).then(t=>t.ReadingListDetailComponent)},{path:`library/:libraryId`,runGuardsAndResolvers:`always`,canActivate:[qn],resolve:{library:y$3},children:[{path:``,pathMatch:`full`,loadChildren:()=>import(`./chunk-V5nn23l82.js`).then(t=>t.routes)},{path:`series/:seriesId`,pathMatch:`full`,data:{titleField:`series`,titleProp:`name`,titleSuffix:` Details`},resolve:{series:xt},loadComponent:()=>import(`./chunk-CP_apXHv.js`).then(t=>t.default)},{path:`series/:seriesId/volume/:volumeId`,pathMatch:`full`,resolve:{series:xt,volume:jn},loadComponent:()=>import(`./chunk-0fu_U5K02.js`).then(t=>t.VolumeDetailComponent)},{path:`series/:seriesId/chapter/:chapterId`,pathMatch:`full`,resolve:{series:xt,chapter:Kn},loadComponent:()=>import(`./chunk-C-KRzZek.js`).then(t=>t.ChapterDetailComponent)},{path:`series/:seriesId/manga`,loadChildren:()=>import(`./chunk-CgJUzj2S.js`).then(t=>t.routes)},{path:`series/:seriesId/book`,loadChildren:()=>import(`./chunk-CPLQz9F9.js`).then(t=>t.routes)},{path:`series/:seriesId/pdf`,loadChildren:()=>import(`./chunk--zerVsQQ.js`).then(t=>t.routes)}]},{path:``,pathMatch:`full`,redirectTo:`home`}]},{path:`registration`,loadChildren:()=>import(`./chunk-C_3yplf82.js`).then(t=>t.routes)},{path:`login`,loadChildren:()=>import(`./chunk-C_3yplf82.js`).then(t=>t.routes)},{path:`libraries`,pathMatch:`full`,redirectTo:`home`},{path:`**`,redirectTo:`home`}];var to=(t,l)=>{let i=E$2(yc$1).currentUser();return i?.token&&(t=t.clone({setHeaders:{Authorization:`Bearer ${i.token}`}})),l(t)}
52;var io=(t,l)=>{E$2(J$7);let i=E$2(Bt$3),n=E$2(yc$1);E$2(De$3);let y=E$2(tt$3);return l(t).pipe(ua$2(B=>{if(B==null)return Qv(()=>B);switch(B.status){case 400:Fo(B,i);break;case 401:Bo(t,B,n,i,y);break;case 403:Ro(B,i);break;case 404:Lo(i);break;case 500:Ao(B,i);break;case 413:$o(i);break;default:let It=Mt$4(`errors.generic`);i.previousToastMessage!==`Something unexpected went wrong.`&&i.previousToastMessage!==It&&J(It,i),console.error(B);break}return Qv(()=>B)}))};function Fo(t,l){if(Array.isArray(t.error)){let e=[];throw t.error.length>0&&t.error[0].hasOwnProperty(`message`)?t.error[0].details===null?t.error.forEach(i=>{e.push(i.message)}):t.error.forEach(i=>{e.push(i.details)}):t.error.forEach(i=>{e.push(i.description)}),e.flat()}else if(t.error&&t.error.errors){let e=[];for(let i in t.error.errors)t.error.errors[i]&&e.push(t.error.errors[i]);throw e.flat()}else if(console.error(`error:`,t),t.statusText===`Bad Request`){if(t.error instanceof Blob){J(`errors.download`,l,t.status);return}J(t.error,l,Mt$4(`errors.error-code`,{num:t.status}))}else J(t.statusText===`OK`?t.error:t.statusText,l,Mt$4(`errors.error-code`,{num:t.status}))}function Ro(t,l){let e=t.error?.message??t.error;if(typeof e==`string`&&e.trim()!==``){J(e,l);return}J(`errors.generic`,l)}function Lo(t){J(`errors.not-found`,t)}function $o(t){J(`errors.upload-too-large`,t)}function Ao(t,l){let e=t.error;if(e.hasOwnProperty(`message`)&&e.message.trim()!==``){e.message!==`User is not authenticated`&&t.message!==`errors.user-not-auth`&&console.error(`500 error: `,t),J(e.message,l);return}if(t.hasOwnProperty(`message`)&&t.message.trim()!==``){t.message!==`User is not authenticated`&&t.message!==`errors.user-not-auth`&&console.error(`500 error: `,t);return}J(`errors.unknown-crit`,l),console.error(`500 error:`,t)}function Bo(t,l,e,i,n){if(location.href.includes(`/registration/confirm-email?token=`))return;let d=window.location.pathname;d!==`/login`&&!d.startsWith(n+`registration`)&&d!==``&&localStorage.setItem(`kavita--auth-intersection-url`,d),l.error&&l.error!==`Unauthorized`&&J(Mt$4(l.error),i),e.logout(t.method===`GET`&&t.url.endsWith(`/api/account`))}function J(t,l,e){let i=typeof e==`number`?e.toString():e;(t+``).startsWith(`errors.`)?l.error(Mt$4(t),i):l.error(t,i)}var Uo={ttl:86400,storageKey:`@transloco/translations`};var oo=new x$4(``);var ao=new x$4(``);var ro=new x$4(``);function Qo(t){return Le$3(t?.then)}function no(t){return Qo(t)||Zv(t)?$e$5(t):la$2(t)}function Mt(t){return`${t}/timestamp`}var Go=(()=>{class t{loader=E$2(oo);storage=E$2(ao);config=E$2(ro);subscription=this.clearCurrentStorage().subscribe();cache=null;getTranslation(e){let i=this.config.storageKey;return this.getCached(i).pipe(Sd$1(n=>n?.[e]?la$2(n[e]):$e$5(this.loader.getTranslation(e)).pipe(xd$1(d=>this.setCache(i,e,d)))))}clearCache(){this.clearTimestamp(this.config.storageKey),this.clearTranslations(),this.cache=null}getCached(e){return this.cache?la$2(this.cache):no(this.storage.getItem(e)).pipe(qe$2(i=>i?this.decode(e,i):null),xd$1(i=>{this.cache=i}),lt$3(1))}setCache(e,i,n){let d=this.cache||{};d[i]=n,this.setTimestamp(e),this.storage.setItem(e,this.encode(d)),this.cache=d}encode(e){return JSON.stringify(e)}decode(e,i){if(C$6(i))return i;if(p$7(i))try{return JSON.parse(i)}catch(n){return console.error(`storage key: ${e} is not serializable`),null}return null}setTimestamp(e){this.storage.setItem(Mt(e),Date.now())}getTimestamp(e){return no(this.storage.getItem(Mt(e))).pipe(qe$2(parseInt))}clearTimestamp(e){this.storage.removeItem(Mt(e))}clearTranslations(){this.storage.removeItem(this.config.storageKey)}clearCurrentStorage(){let e=this.config.storageKey;return this.getTimestamp(e).pipe(We$5(Boolean),xd$1(i=>{Date.now()-i>=this.config.ttl&&this.storage.removeItem(e)}))}ngOnDestroy(){this.subscription?.unsubscribe(),this.subscription=null}static ɵfac=function(i){return new(i||t)};static ɵprov=J$6({token:t,factory:t.ɵfac})}return t})();function lo(i){var n=i,{storage:t,loader:l}=n,e=z$4(n,[`storage`,`loader`]);return Ci([{provide:Te$6,useClass:Go},zo(e),{provide:oo,useClass:l},w$4({provide:ao},t)])}function zo(t){return{provide:ro,useValue:w$4(w$4({},Uo),t)}}var co={};var so=(()=>{class t{constructor(){this.http=E$2(ue$6),this.loadedVersions={}}getTranslation(e){let i=e.split(`/`),n=i[i.length-1],d=co[n]||`en`,y=this.loadedVersions[n];y&&y!==d&&(console.log(`Translation hash changed for ${n}. Clearing cache.`),this.clearTranslocoCache(n)),this.loadedVersions[n]=d;let B=`assets/langs/${n}.json?v=${d}`;return console.log(`Loading locale:`,B),this.http.get(B,{headers:{"Cache-Control":`no-cache, no-store, must-revalidate`,Pragma:`no-cache`,Expires:`0`}})}clearTranslocoCache(e){re()}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵprov=J$6({token:t,factory:t.ɵfac,providedIn:`root`})}}return t})();var mo=(t,l)=>{let e=E$2(u);return l(t.clone({setHeaders:{"X-Kavita-Client":e.getClientInfoHeader(),"X-Device-Id":e.getDeviceId()}}))};function po(t){let l=E$2(J$7);console.error(t),l.navigate([`/home`])}var qo=(t,l)=>l.name+l.order;function jo(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,12),t&2){let e=i_$1(4).$implicit,i=i_$1();Vm$1(`title`,e(`customize`))(`fragment`,i.SettingsTabId.Customize)}}function Ko(t,l){if(t&1){let e=AC();bs$1(0,`div`,13)(1,`label`,14),j_$1(2),Mu(),bs$1(3,`div`,15)(4,`input`,16),Vy(`ngModelChange`,function(n){_f(e);let d=i_$1(5);return H_$1(d.filterQuery,n)||(d.filterQuery=n),Mf(n)}),Mu(),Sw(),bs$1(5,`button`,17),fy(`click`,function(){_f(e);let n=i_$1(5);return Mf(n.filterQuery=``)}),Mu()()()}if(t&2){let e=i_$1(4).$implicit,i=i_$1();xb(2),Ly(e(`filter-label`)),xb(2),jy(`ngModel`,i.filterQuery),Aw(),xb(),jm$1(`aria-label`,e(`clear`))}}function Zo(t,l){if(t&1){let e=AC();bs$1(0,`app-side-nav-item`,11),fy(`click`,function(){_f(e);return Mf(i_$1(4).showLess())}),Mu(),DC(1,jo,1,2,`app-side-nav-item`,12),DC(2,Ko,6,3,`div`,13)}if(t&2){let e=i_$1(),i=i_$1(2).$implicit,n=$_$1(2),d=i_$1();Vm$1(`title`,i(d.editMode?`cancel-edit`:`back`)),xb(),bC(d.isReadOnly()?-1:1),xb(),bC(e.length>d.ItemLimit&&!n&&!d.editMode?2:-1)}}function Yo(t,l){if(t&1&&(bs$1(0,`app-side-nav-item`,18),xu(1,8),Hm$1(2,`app-card-actionables`,27),Gs$1(),Mu()
52),t&2){let e=i_$1().$implicit,i=i_$1(4);Vm$1(`cdkDragDisabled`,!i.editMode)(`cdkDragData`,e)(`editMode`,i.editMode)(`link`,`/library/`+e.libraryId+`/`)(`icon`,i.getLibraryTypeIcon(e.library.type))(`imageUrl`,i.getLibraryImage(e.library))(`title`,e.library.name)(`comparisonMethod`,`startsWith`),xb(2),Vm$1(`entity`,e.library)(`actions`,i.actions)(`labelBy`,e.name)}}function Xo(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,19),t&2){let e=i_$1().$implicit,i=i_$1(3).$implicit,n=i_$1();Vm$1(`cdkDragDisabled`,!n.editMode)(`cdkDragData`,e)(`editMode`,n.editMode)(`title`,i(`all-series`))}}function Jo(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,20),t&2){let e=i_$1().$implicit,i=i_$1(3).$implicit,n=i_$1();Vm$1(`cdkDragDisabled`,!n.editMode)(`cdkDragData`,e)(`editMode`,n.editMode)(`title`,i(`bookmarks`))}}function ea(t,l){if(t&1){let e=AC();bs$1(0,`app-side-nav-item`,21),xu(1,8),bs$1(2,`app-card-actionables`,28),fy(`actionHandler`,function(n){_f(e);return Mf(i_$1(5).performReadingListAction(n))}),Mu(),Gs$1(),Mu()}if(t&2){let e=i_$1().$implicit,i=i_$1(3).$implicit,n=i_$1();Vm$1(`cdkDragDisabled`,!n.editMode)(`cdkDragData`,e)(`editMode`,n.editMode)(`title`,i(`reading-lists`)),xb(2),Vm$1(`actions`,n.readingListActions)}}function ta(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,22),t&2){let e=i_$1().$implicit,i=i_$1(3).$implicit,n=i_$1();Vm$1(`cdkDragDisabled`,!n.editMode)(`cdkDragData`,e)(`editMode`,n.editMode)(`title`,i(`collections`))}}function ia(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,23),t&2){let e=i_$1().$implicit,i=i_$1(3).$implicit,n=i_$1();Vm$1(`cdkDragDisabled`,!n.editMode)(`cdkDragData`,e)(`editMode`,n.editMode)(`title`,i(`want-to-read`))}}function na(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,24),t&2){let e=i_$1().$implicit,i=i_$1(3).$implicit,n=i_$1();Vm$1(`cdkDragDisabled`,!n.editMode)(`cdkDragData`,e)(`editMode`,n.editMode)(`title`,i(`browse-people`))}}function oa(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,25),t&2){let e=i_$1().$implicit,i=i_$1(4);Vm$1(`cdkDragDisabled`,!i.editMode)(`cdkDragData`,e)(`editMode`,i.editMode)(`title`,e.name)(`link`,i.getSmartFilterBaseLink(e))(`queryParams`,e.smartFilterEncoded)}}function aa(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,26),t&2){let e=i_$1().$implicit;Vm$1(`editMode`,i_$1(4).editMode)(`title`,e.name)(`link`,e.externalSource.host+`login`+(e.externalSource.apiKey?`?apiKey=`+e.externalSource.apiKey:``))(`external`,!0)}}function ra(t,l){if(t&1&&DC(0,Yo,3,11,`app-side-nav-item`,18)(1,Xo,1,4,`app-side-nav-item`,19)(2,Jo,1,4,`app-side-nav-item`,20)(3,ea,3,5,`app-side-nav-item`,21)(4,ta,1,4,`app-side-nav-item`,22)(5,ia,1,4,`app-side-nav-item`,23)(6,na,1,4,`app-side-nav-item`,24)(7,oa,1,6,`app-side-nav-item`,25)(8,aa,1,4,`app-side-nav-item`,26),t&2){let e,i=l.$implicit,n=i_$1(4);bC((e=i.streamType)===n.SideNavStreamType.Library?0:e===n.SideNavStreamType.AllSeries?1:e===n.SideNavStreamType.Bookmarks?2:e===n.SideNavStreamType.ReadingLists?3:e===n.SideNavStreamType.Collections?4:e===n.SideNavStreamType.WantToRead?5:e===n.SideNavStreamType.BrowseAuthors?6:e===n.SideNavStreamType.SmartFilter?7:e===n.SideNavStreamType.ExternalSource?8:-1)}}function la(t,l){if(t&1){let e=AC();bs$1(0,`app-side-nav-item`,29),fy(`click`,function(){_f(e);return Mf(i_$1(4).showMore())}),Mu()}if(t&2){let e=i_$1(3).$implicit;Vm$1(`title`,e(`more`))}}function ca(t,l){if(t&1&&(DC(0,Zo,3,3),CC(1,ra,9,1,null,null,qo),rM(3,`filter`),DC(4,la,1,1,`app-side-nav-item`,10)),t&2){let e=i_$1(3);bC(e.showAll?0:-1),xb(),_C(sM(3,2,l,e.filterLibrary)),xb(3),bC(e.totalSize>e.ItemLimit&&!e.showAll?4:-1)}}function sa(t,l){if(t&1){let e=AC();bs$1(0,`div`,5)(1,`div`,6),fy(`cdkDropListDropped`,function(n){_f(e);return Mf(i_$1(2).reorderDrop(n))}),bs$1(2,`app-side-nav-item`,7),xu(3,8),bs$1(4,`app-card-actionables`,9),fy(`actionHandler`,function(n){_f(e);return Mf(i_$1(2).performHomeAction(n))}),Mu(),Gs$1(),Mu(),DC(5,ca,5,5),rM(6,`async`),Mu()()}if(t&2){let e,i=i_$1().$implicit,n=$_$1(1),d=$_$1(2),y=i_$1();Ty(`no-donate`,y.licenseService.hasActiveLicense())(`closed`,d)(`hidden`,!n),xb(),Vm$1(`cdkDropListDisabled`,y.accountService.hasReadOnlyRole()),xb(),Vm$1(`title`,i(`home`)),xb(2),Vm$1(`actions`,y.homeActions),xb(),bC((e=iM(6,10,y.navStreams$))?5:-1,e)}}function da(t,l){if(t&1){let e=AC();bs$1(0,`div`,30),fy(`click`,function(){_f(e);return Mf(i_$1(2).toggleNavBar())}),Mu()}if(t&2){i_$1();Ty(`closed`,$_$1(2))}}function ma(t,l){if(t&1&&Hm$1(0,`app-side-nav-item`,4),t&2){let e=i_$1().$implicit,i=i_$1();Vm$1(`ngbTooltip`,e(`donate-tooltip`))(`link`,i.WikiLink.Donation)(`external`,!0)}}function pa(t,l){if(t&1&&(xu(0),By(1)(2),DC(3,sa,7,12,`div`,1),DC(4,da,1,2,`div`,2),bs$1(5,`div`,3),DC(6,ma,1,3,`app-side-nav-item`,4),Mu(),Gs$1()),t&2){let e=i_$1();xb();let i=B_$1(e.navService.sideNavVisibilitySignal());xb();let n=B_$1(e.navService.sideNavCollapsedSignal());xb(),bC(e.accountService.currentUser()?3:-1),xb(),bC(e.breakpointService.isTabletOrBelow()?4:-1),xb(),Ty(`closed`,n
52)(`hidden`,!i||e.licenseService.hasActiveLicense()),xb(),bC(e.licenseService.hasActiveLicense()?-1:6)}}var _o=(()=>{class t{constructor(){this.router=E$2(J$7),this.utilityService=E$2(w$5),this.messageHub=E$2(Ao$2),this.navService=E$2(X$3),this.cdRef=E$2(OB),this.imageService=E$2(we$3),this.accountService=E$2(yc$1),this.licenseService=E$2(vi$1),this.destroyRef=E$2(te$5),this.actionFactoryService=E$2(Qt),this.toastr=E$2(Bt$3),this.keyBindService=E$2(W$3),this.breakpointService=E$2(W$1),this.cachedData=null,this.actions=this.actionFactoryService.getLibraryActions(),this.homeActions=this.actionFactoryService.getSideNavHomeActions(),this.readingListActions=this.actionFactoryService.getSideNavReadingListActions(),this.filterQuery=``,this.filterLibrary=e=>e.name.toLowerCase().indexOf((this.filterQuery||``).toLowerCase())>=0,this.showAll=!1,this.editMode=!1,this.totalSize=0,this.isReadOnly=this.accountService.hasReadOnlyRole,this.hasValidLicense$=XB(this.licenseService.hasActiveLicense),this.showAllSubject=new Tr$2(!1),this.showAll$=this.showAllSubject.asObservable(),this.loadDataSubject=ne
52w zt$2,this.loadData$=this.loadDataSubject.asObservable(),this.loadDataOnInit$=this.loadData$.pipe(Sd$1(()=>this.cachedData!=null?la$2(this.cachedData):this.navService.getSideNavStreams().pipe(qe$2(e=>(this.cachedData=e,e))))),this.navStreams$=rI(this.showAll$.pipe(Nd$1(!1),Dd$1(),xd$1(e=>this.showAll=e),Sd$1(e=>e?this.loadDataOnInit$.pipe(xd$1(i=>this.totalSize=i.length)):this.loadDataOnInit$.pipe(xd$1(i=>this.totalSize=i.length),qe$2(i=>i.slice(0,this.ItemLimit)))),JB(this.destroyRef)),this.messageHub.messages$.pipe(We$5(e=>e.event===c$2.LibraryModified||e.event===c$2.SideNavUpdate),xd$1(()=>{this.cachedData=null}),Sd$1(()=>this.showAll?this.loadDataOnInit$:this.loadDataOnInit$.pipe(qe$2(e=>e.slice(0,this.ItemLimit)))),JB(this.destroyRef))).pipe(Nd$1(null),We$5(e=>e!==null),JB(this.destroyRef)),this.collapseSideNavOnMobileNav$=this.router.events.pipe(We$5(e=>e instanceof z$5),JB(this.destroyRef),qe$2(e=>e),We$5(()=>this.breakpointService.isMobile()&&this.navService.sideNavCollapsedSignal()),We$5(e=>!e)),this.WikiLink=e$3,this.ItemLimit=13,this.SideNavStreamType=s$2,this.SettingsTabId=n,this.breakpointService.isMobile()&&this.navService.collapseSideNav(!0),this.collapseSideNavOnMobileNav$.subscribe(()=>{this.navService.collapseSideNav(!1)}),this.keyBindService.registerListener(this.destroyRef,e=>this.router.navigate([`/settings`],{fragment:n.Account}),[r$2.NavigateToSettings],{condition$:this.navService.sideNavVisibility$}),this.keyBindService.registerListener(this.destroyRef,e=>this.router.navigate([`/settings`],{fragment:n.MyActivity}),[r$2.NavigateToScrobbling],{condition$:this.hasValidLicense$}),eo$1(()=>{this.accountService.currentUser()&&this.loadDataSubject.next()})}performHomeAction(e){e.action===ke$3.Edit&&this.showMore(!0)}performReadingListAction(e){if(e.action===ke$3.Navigate){this.router.navigateByUrl(`/settings#cbl-import`);return}}getLibraryTypeIcon(e){switch(e){case d$1.Book:case d$1.LightNovel:return`fa-book`;case d$1.Comic:case d$1.ComicVine:case d$1.Manga:return`fa-book-open`;case d$1.Images:return`fa-images`}}getLibraryImage(e){return e.coverImage?this.imageService.getLibraryCoverImage(e.id):null}toggleNavBar(){this.navService.toggleSideNav()}showMore(e=!1){this.showAllSubject.next(!0),this.editMode=e,this.cdRef.markForCheck()}showLess(){this.filterQuery=``,this.showAllSubject.next(!1),this.editMode=!1,this.cdRef.markForCheck()}getSmartFilterBaseLink(e){return`/`+De$2.getFilterLink(e.entityType,``)}reorderDrop(e){return D$5(this,null,function*(){if(e.currentIndex<3||this.accountService.hasReadOnlyRole())return;let n=e.item.data;this.navService.updateSideNavStreamPosition(n.name,n.id,n.order,e.currentIndex-3,!1).subscribe({next:()=>{this.showAllSubject.next(this.showAll),this.cdRef.markForCheck()},error:d=>{console.error(d),this.toastr.error(Mt$4(`errors.generic`))}})})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-side-nav`]],decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`side-nav-container`,3,`no-donate`,`closed`,`hidden`],[1,`side-nav-overlay`,3,`closed`],[1,`sidenav-bottom`],[`icon`,`fa-heart`,1,`donate`,3,`ngbTooltip`,`link`,`external`],[1,`side-nav-container`],[`cdkDropList`,``,1,`side-nav`,3,`cdkDropListDropped`,`cdkDropListDisabled`],[`cdkDrag`,``,`cdkDragDisabled`,``,`icon`,`fa-home`,`link`,`/home/`,3,`title`],[`actions`,``],[`labelBy`,`home`,`iconClass`,`fa-ellipsis-v`,3,`actionHandler`,`actions`],[`icon`,`fa fa-chevron-right`,3,`title`],[`cdkDrag`,``,`cdkDragDisabled`,``,`icon`,`fa fa-chevron-left`,3,`click`,`title`],[`cdkDrag`,``,`cdkDragDisabled`,``,`icon`,`fa-cogs`,`link`,`/settings`,3,`title`,`fragment`],[`cdkDrag`,``,`cdkDragDisabled`,``,1,`mb-2`,`mt-3`,`ms-2`,`me-2`],[`for`,`filter`,1,`form-label`,`visually-hidden`],[1,`form-group`,`position-relative`],[`id`,`filter`,`autocomplete`,`off`,`type`,`text`,`aria-describedby`,`reset-input`,1,`form-control`,3,`ngModelChange`,`ngModel`],[`type`,`button`,`id`,`reset-input`,1,`btn-close`,3,`click`],[`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,3,`cdkDragDisabled`,`cdkDragData`,`editMode`,`link`,`icon`,`imageUrl`,`title`,`comparisonMethod`],[`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,`icon`,`fa-regular fa-rectangle-list`,`link`,`/all-series/`,3,`cdkDragDisabled`,`cdkDragData`,`editMode`,`title`],[`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,`icon`,`fa-bookmark`,`link`,`/bookmarks/`,3,`cdkDragDisabled`,`cdkDragData`,`editMode`,`title`],[`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,`icon`,`fa-list-ol`,`link`,`/lists/`,3,`cdkDragDisabled`,`cdkDragData`,`editMode`,`title`],[`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,`icon`,`fa-list`,`link`,`/collections/`,3,`cdkDragDisabled`,`cdkDragData`,`editMode`,`title`],[`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,`icon`,`fa-star`,`link`,`/want-to-read/`,3,`cdkDragDisabled`,`cdkDragData`,`editMode`,`title`],[`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,`icon`,`fa-users`,`link`,`/browse/people/`,3,`cdkDragDisabled`,`cdkDragData`,`editMode`,`title`],[`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,`icon`,`fa-bars-staggered`,3,`cdkDragDisabled`,`cdkDragData`,`editMode`,`title`,`link`,`queryParams`],[`icon`,`fa-server`,`cdkDrag`,``,`cdkDragBoundary`,`.side-nav-container`,`cdkDragPreviewContainer`,`parent`,3,`editMode`,`title`,`link`,`external`],[`iconClass`,`fa-ellipsis-v`,3,`entity`,`actions`,`labelBy`],[`labelBy`,`reading-lists`,`iconClass`,`fa-ellipsis-v`,3,`actionHandler`,`actions`],[`icon`,`fa fa-chevron-right`,3,`click`,`title`],[1,`side-nav-overlay`,3,`click`]],template:function(i,n){i&1&&Dm$1(0,pa,7,9,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`side-nav`)},dependencies:[Ie$3,Ct$1,ai$1,Qe$5,ei$1,pn$1,Ct$3,Y$4,Ue$2,We$3,o,fn],encapsulation:2})}}return t})();var uo=(()=>{class t{constructor(){this.translocoService=E$2(De$3)}transform(e){return this.translocoService.translate(`download-queue-status-pipe.`+e)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`downloadQueueStatus`,type:t,pure:!0})}}return t})();var go=(()=>{class t{transform(e){if(e==null||e<=0)return``;if(e<60)return`${e}s`;let i=Math.floor(e/60),n=e%60;if(i<60)return n>0?`${i}m ${n}s`:`${i}m`;let d=Math.floor(i/60),y=i%60;return y>0?`${d}h ${y}m`:`${d}h`}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵpipe=bT({name:`compactEta`,type:t,pure:!0})}}return t})();function _a(t,l){if(t&1&&(bs$1(0,`span`,7),j_$1(1,`•`),Mu(),bs$1(2,`span`),j_$1(3),rM(4,`compactEta`),Mu()),t&2){let e=i_$1(4);xb(3),Ly(iM(4,1,e.item().etaSeconds))}}function ua(t,l){if(t&1&&(bs$1(0,`span`,14)(1,`span`),j_$1(2),rM(3,`bytes`),Mu(),DC(4,_a,5,3),Mu()),t&2){let e=i_$1(3);xb(2),Ou(``,cM(3,2,e.item().speedBps,!0,1,!0),`/s`),xb(2),bC(e.item().etaSeconds&&e.item().etaSeconds>0?4:-1)}}function ga(t,l){if(t&1&&(bs$1(0,`div`,8)(1,`span`),j_$1(2),rM(3,`bytes`),Mu(),DC(4,ua,5,7,`span`,14),Mu()),t&2){let e=i_$1(2);xb(2),Ly(iM(3,2,e.item().estimatedSize)),xb(2),bC(e.showSpeedInfo()?4:-1)}}function va(t,l){if(t&1&&(bs$1(0,`div`,9),Hm$1(1,`div`,15),Mu()),t&2){let e=i_$1(2);jm$1(`aria-valuenow`,e.item().progress),xb(),wy(`width`,e.item().progress,`%`)}}function fa(t,l){if(t&1&&(bs$1(0,`div`,10),j_$1(1),Mu()),t&2){let e=i_$1(2);Vm$1(`title`,e.item().errorMessage),xb(),Ly(e.item().errorMessage)}}function ha(t,l){if(t&1){let e=AC();bs$1(0,`button`,16),fy(`click`,function(){_f(e);let n=i_$1(2);return Mf(n.cancelled.emit(n.item().id))}),Hm$1(1,`i`,17),Mu()}if(t&2){let e=i_$1().$implicit;Vm$1(`title`,e(`cancel`))}}function Ca(t,l){if(t&1){let e=AC();bs$1(0,`button`,18),fy(`click`,function(){_f(e);let n=i_$1(2);return Mf(n.retry.emit(n.item().id))}),Hm$1(1,`i`,19),Mu()}if(t&2){let e=i_$1().$implicit;Vm$1(`title`,e(`retry`))}}function xa(t,l){if(t&1){let e=AC();bs$1(0,`button`,16),fy(`click`,function(){_f(e);let n=i_$1(2);return Mf(n.remove.emit(n.item().id))}),Hm$1(1,`i`,20),Mu()}if(t&2){let e=i_$1().$implicit;Vm$1(`title`,e(`remove`))}}function ba(t,l){if(t&1){let e=AC();xu(0),bs$1(1,`div`,1),Hm$1(2,`app-image`,2),bs$1(3,`div`,3)(4,`a`,4),fy(`click`,function(){_f(e);let n=i_$1();return Mf(n.navigate.emit(n.item()))}),j_$1(5),Mu(),bs$1(6,`div`,5)(7,`app-tag-badge`,6),j_$1(8),rM(9,`downloadQueueStatus`),Mu(),bs$1(10,`span`,7),j_$1(11,`•`),Mu(),bs$1(12,`span`),j_$1(13),rM(14,`timeDifference`),Mu()(),DC(15,ga,5,4,`div`,8),DC(16,va,2,3,`div`,9),DC(17,fa,2,2,`div`,10),Mu(),bs$1(18,`div`,11),DC(19,ha,2,1,`button`,12),DC(20,Ca,2,1,`button`,13),DC(21,xa,2,1,`button`,12),Mu()(),Gs$1()}if(t&2){let e=i_$1();xb(2),Vm$1(`imageUrl`,e.imageUrl())(`processEvents`,!1),xb(2),Vm$1(`title`,e.item().label),xb(),Ly(e.item().label),xb(2),Vm$1(`selectionMode`,e.TagBadgeCursor.Selectable)(`fillStyle`,`outline`)(`color`,e.statusBadgeColor())(`size`,`sm`),xb(),Ou(` `,iM(9,16,e.item().status),` `),xb(5),Ly(iM(14,18,e.timeDisplay())),xb(2),bC(e.showSize()?15:-1),xb(),bC(e.isActive()?16:-1),xb(),bC(e.item().status===`failed`&&e.item().errorMessage?17:-1),xb(2),bC(e.item().status===`queued`?19:-1),xb(),bC(e.item().status===`failed`&&e.item().retryCount<3?20:-1),xb(),bC(e.item().status===`completed`||e.item().status===`failed`?21:-1)}}var vo=(()=>{class t{constructor(){this.imageService=E$2(we$3),this.item=TB.required(),this.cancelled=wB(),this.retry=wB(),this.remove=wB(),this.navigate=wB(),this.imageUrl=it$3(()=>{let e=this.item();switch(e.entityType){case l$1.Volume:return this.imageService.getVolumeCoverImage(e.entityId);case l$1.Chapter:return this.imageService.getChapterCoverImage(e.entityId);case l$1.ReadingListItem:return this.imageService.getChapterCoverImage(e.chapterId)}}),this.statusBadgeColor=it$3(()=>{switch(this.item().status){case`completed`:return`primary`;case`failed`:return`error`;case`downloading`:case`preparing`:return`primary`;default:return`secondary`}}),this.timeDisplay=it$3(()=>{let e=this.item();return e.completedAt&&(e.status===`completed`||e.status===`failed`)?e.completedAt:e.queuedAt}),this.showSpeedInfo=it$3(()=>{let e=this.item();return(e.status===`preparing`||e.status===`downloading`)&&(e.speedBps??0)>0}),this.isActive=it$3(()=>{let e=this.item().status;return e===`preparing`||e===`downloading`}),this.showSize=it$3(()=>this.item().estimatedSize>0),this.TagBadgeCursor=l}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-download-queue-item`]],inputs:{item:[1,`item`]},outputs:{cancelled:`cancelled`,retry:`retry`,remove:`remove`,navigate:`navigate`},decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`queue-item`,`d-flex`,`align-items-center`,`gap-2`,`py-2`],[`width`,`40px`,`height`,`56px`,1,`queue-item-cover`,`flex-shrink-0`,3,`imageUrl`,`processEvents`],[1,`queue-item-info`,`flex-grow-1`,`overflow-hidden`],[`href`,`javascript:void(0)`,1,`item-title`,`text-truncate`,`fw-semibold`,3,`click`,`title`],[1,`text-muted`,`small`,`d-flex`,`align-items-center`,`flex-wrap`],[3,`selectionMode`,`fillStyle`,`color`,`size`],[1,`ps-1`,`pe-1`],[1,`text-muted`,`small`,`dl-info-row`],[`role`,`progressbar`,`aria-valuemin`,`0`,`aria-valuemax`,`
52100`,1,`progress`,`mt-1`,2,`height`,`4px`],[1,`text-danger`,`small`,`text-truncate`,3,`title`],[1,`queue-item-actions`,`d-flex`,`gap-1`,`flex-shrink-0`],[1,`btn`,`btn-sm`,`btn-outline-secondary`,3,`title`],[1,`btn`,`btn-sm`,`btn-outline-primary`,3,`title`],[1,`dl-speed`],[1,`progress-bar`],[1,`btn`,`btn-sm`,`btn-outline-secondary`,3,`click`,`title`],[`aria-hidden`,`true`,1,`fa`,`fa-times`],[1,`btn`,`btn-sm`,`btn-outline-primary`,3,`click`,`title`],[`aria-hidden`,`true`,1,`fa`,`fa-redo`],[`aria-hidden`,`true`,1,`fa`,`fa-trash`]],template:function(i,n){i&1&&Dm$1(0,ba,22,20,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`download-queue-item`)},dependencies:[Ct$3,yt$2,S$9,h$4,uo,go,$$1],styles:[`.queue-item-info[_ngcontent-%COMP%]{min-width:0}.queue-item-actions[_ngcontent-%COMP%]{align-self:flex-start;padding-top:2px}.item-title[_ngcontent-%COMP%]{display:block;color:inherit;text-decoration:none}.item-title[_ngcontent-%COMP%]:hover{text-decoration:underline}.dl-info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-variant-numeric:tabular-nums}.dl-speed[_ngcontent-%COMP%]{text-align:right}
53/*# sourceMappingURL=download-queue-item.component-QV3XSWO4.css.map */`]})}}return t})();var bt=(t,l)=>l.id;function Sa(t,l){t&1&&Hm$1(0,`i`,5)}function ya(t,l){if(t&1){let e=AC();bs$1(0,`button`,20),fy(`click`,function(){_f(e);return Mf(i_$1(4).downloadService.resumeQueue())}),Hm$1(1,`i`,21),j_$1(2),Mu()}if(t&2){let e=i_$1(3).$implicit;xb(2),Ou(``,e(`resume`),` `)}}function wa(t,l){if(t&1){let e=AC();bs$1(0,`button`,22),fy(`click`,function(){_f(e);return Mf(i_$1(4).downloadService.pauseQueue())}),Hm$1(1,`i`,23),j_$1(2),Mu()}if(t&2){let e=i_$1(3).$implicit;xb(2),Ou(``,e(`pause`),` `)}}function Ta(t,l){if(t&1&&(bs$1(0,`div`,16),DC(1,ya,3,1,`button`,18)(2,wa,3,1,`button`,19),Mu()),t&2){let e=i_$1(3);xb(),bC(e.downloadService.isPaused()?1:2)}}function ka(t,l){if(t&1){let e=AC();bs$1(0,`app-download-queue-item`,24),fy(`cancelled`,function(n){_f(e);return Mf(i_$1(3).downloadService.cancelDownload(n))})(`retry`,function(n){_f(e);return Mf(i_$1(3).downloadService.retryDownload(n))})(`remove`,function(){let n=_f(e);return Mf(i_$1(3).downloadService.removeItem(n))})(`navigate`,function(n){_f(e);return Mf(i_$1(3).navigateToItem(n))}),Mu(),Hm$1(1,`div`,25)}t&2&&Vm$1(`item`,l)}function Ea(t,l){t&1&&Hm$1(0,`div`,31)}function Da(t,l){if(t&1){let e=AC();bs$1(0,`app-download-queue-item`,24),fy(`cancelled`,function(n){_f(e);return Mf(i_$1(4).downloadService.cancelDownload(n))})(`retry`,function(n){_f(e);return Mf(i_$1(4).downloadService.retryDownload(n))})(`remove`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).downloadService.removeItem(n))})(`navigate`,function(n){_f(e);return Mf(i_$1(4).navigateToItem(n))}),Mu(),DC(1,Ea,1,0,`div`,31)}if(t&2){let e=l.$implicit,i=l.$index,n=l.$count;Vm$1(`item`,e),xb(),bC(i!==n-1?1:-1)}}function Ma(t,l){if(t&1){let e=AC();bs$1(0,`div`,26)(1,`span`,27),j_$1(2),Mu(),bs$1(3,`div`,28)(4,`button`,29),fy(`click`,function(){_f(e);return Mf(i_$1(3).downloadService.clearAllFailed())}),j_$1(5),Mu(),bs$1(6,`button`,30),fy(`click`,function(){_f(e);return Mf(i_$1(3).downloadService.retryAllFailed())}),j_$1(7),Mu()()(),CC(8,Da,2,2,null,null,bt),Hm$1(10,`div`,31)}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Py(``,e(`failed`),` (`,i.downloadService.failedItems().length,`)`),xb(3),Ly(e(`clear-all`)),xb(2),Ly(e(`retry-all`)),xb(),_C(i.downloadService.failedItems())}}function Ia(t,l){t&1&&Hm$1(0,`div`,31)}function Na(t,l){if(t&1){let e=AC();bs$1(0,`app-download-queue-item`,24),fy(`cancelled`,function(n){_f(e);return Mf(i_$1(4).downloadService.cancelDownload(n))})(`retry`,function(n){_f(e);return Mf(i_$1(4).downloadService.retryDownload(n))})(`remove`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).downloadService.removeItem(n))})(`navigate`,function(n){_f(e);return Mf(i_$1(4).navigateToItem(n))}),Mu(),DC(1,Ia,1,0,`div`,31)}if(t&2){let e=l.$implicit,i=l.$index,n=l.$count;Vm$1(`item`,e),xb(),bC(i!==n-1?1:-1)}}function Oa(t,l){if(t&1){let e=AC();bs$1(0,`div`,26)(1,`span`,32),j_$1(2),Mu(),bs$1(3,`button`,30),fy(`click`,function(){_f(e);return Mf(i_$1(3).downloadService.cancelAllQueued())}),j_$1(4),Mu()(),CC(5,Na,2,2,null,null,bt)}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Py(``,e(`queued`),` (`,i.downloadService.queuedItems().length,`)`),xb(2),Ly(e(`cancel-all`)),xb(),_C(i.downloadService.queuedItems())}}function Pa(t,l){if(t&1&&(bs$1(0,`div`,17),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;xb(),Ly(e(`empty`))}}function Va(t,l){if(t&1&&(bs$1(0,`div`,15),DC(1,Ta,3,1,`div`,16),DC(2,ka,2,1),DC(3,Ma,11,4),DC(4,Oa,7,3),DC(5,Pa,2,1,`div`,17),Mu()),t&2){let e,i=i_$1(2);xb(),bC(i.downloadService.activeItem()||i.downloadService.queuedItems().length>0?1:-1),xb(),bC((e=i.downloadService.activeItem())?2:-1,e),xb(),bC(i.downloadService.failedItems().length>0?3:-1),xb(),bC(i.downloadService.queuedItems().length>0?4:-1),xb(),bC(!i.downloadService.activeItem()&&i.downloadService.queuedItems().length===0&&i.downloadService.failedItems().length===0?5:-1)}}function Fa(t,l){t&1&&Hm$1(0,`div`,31)}function Ra(t,l){if(t&1){let e=AC();bs$1(0,`app-download-queue-item`,24),fy(`cancelled`,function(n){_f(e);return Mf(i_$1(5).downloadService.cancelDownload(n))})(`retry`,function(n){_f(e);return Mf(i_$1(5).downloadService.retryDownload(n))})(`remove`,function(){let n=_f(e).$implicit;return Mf(i_$1(5).downloadService.removeItem(n))})(`navigate`,function(n){_f(e);return Mf(i_$1(5).navigateToItem(n))}),Mu(),DC(1,Fa,1,0,`div`,31)}if(t&2){let e=l.$implicit,i=l.$index,n=l.$count;Vm$1(`item`,e),xb(),bC(i!==n-1?1:-1)}}function La(t,l){if(t&1){let e=AC();bs$1(0,`div`,26)(1,`span`,32),j_$1(2),Mu(),bs$1(3,`button`,30),fy(`click`,function(){_f(e);return Mf(i_$1(4).clearCompletedToday())}),j_$1(4),Mu()(),CC(5,Ra,2,2,null,null,bt)}if(t&2){let e=i_$1(3).$implicit,i=i_$1();xb(2),Ly(e(`today`)),xb(2),Ly(e(`clear-all`)),xb(),_C(i.completedToday())}}function $a(t,l){t&1&&Hm$1(0,`div`,31)}function Aa(t,l){t&1&&Hm$1(0,`div`,31)}function Ba(t,l){if(t&1){let e=AC();bs$1(0,`app-download-queue-item`,24),fy(`cancelled`,function(n){_f(e);return Mf(i_$1(5).downloadService.cancelDownload(n))})(`retry`,function(n){_f(e);return Mf(i_$1(5).downloadService.retryDownload(n))})(`remove`,function(){let n=_f(e).$implicit;return Mf(i_$1(5).downloadService.removeItem(n))})(`navigate`,function(n){_f(e);return Mf(i_$1(5).navigateToItem(n))}),Mu(),DC(1,Aa,1,0,`div`,31)}if(t&2){let e=l.$implicit,i=l.$index,n=l.$count;Vm$1(`item`,e),xb(),bC(i!==n-1?1:-1)}}function Ha(t,l){if(t&1){let e=AC();DC(0,$a,1,0,`div`,31),bs$1(1,`div`,26)(2,`button`,33),fy(`click`,function(){_f(e);return Mf(i_$1(4).expandOlder())}),Hm$1(3,`i`,34),j_$1(4),Mu(),bs$1(5,`button`,30),fy(`click`,function(){_f(e);return Mf(i_$1(4).clearCompletedOlder())}),j_$1(6),Mu()(),bs$1(7,`div`,35),CC(8,Ba,2,2,null,null,bt),Mu()}if(t&2){let e=i_$1(3).$implicit,i=i_$1();bC(i.completedToday().length>0?0:-1),xb(3),Ty(`expanded`,!i.olderCollapsed),xb(),Py(` `,e(`older`),` (`,i.olderCount(),`) `),xb(2),Ly(e(`clear-all`)),xb(),Vm$1(`ngbCollapse`,i.olderCollapsed),xb(),_C(i.olderItems())}}function Ua(t,l){if(t&1&&(DC(0,La,7,2),DC(1,Ha,10,7)),t&2){let e=i_$1(3);bC(e.completedToday().length>0?0:-1),xb(),bC(e.olderCount()>0?1:-1)}}function Qa(t,l){if(t&1&&(bs$1(0,`div`,17),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;xb(),Ly(e(`empty`))}}function Ga(t,l){if(t&1&&(bs$1(0,`div`,15),DC(1,Ua,2,2)(2,Qa,2,1,`div`,17),Mu()),t&2){let e=i_$1(2);xb(),bC(e.completedToday().length>0||e.olderCount()>0?1:2)}}function za(t,l){if(t&1){let e=AC();xu(0),Hm$1(1,`app-off-canvas-resize`,2),bs$1(2,`div`,3)(3,`h5`,4),j_$1(4),Mu(),DC(5,Sa,1,0,`i`,5),bs$1(6,`button`,6),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Hm$1(7,`i`,7),Mu()(),bs$1(8,`div`,8)(9,`ul`,9,0),Vy(`activeIdChange`,function(n){_f(e);let d=i_$1();return H_$1(d.activeTabId,n)||(d.activeTabId=n),Mf(n)}),bs$1(11,`li`,10)(12,`a`,11),j_$1(13),bs$1(14,`span`,12),j_$1(15),Mu()(),Dm$1(16,Va,6,5,`ng-template`,13),Mu(),bs$1(17,`li`,10)(18,`a`,11),j_$1(19),bs$1(20,`span`,12),j_$1(21),Mu()(),Dm$1(22,Ga,3,1,`ng-template`,13),Mu()(),Hm$1(23,`div`,14),Mu(),Gs$1()}if(t&2){let e=l.$implicit,i=p_$1(10),n=i_$1();xb(),Vm$1(`resizeMode`,n.ResizeMode.Width)(`minWidth`,n.breakpointService.isTabletOrBelow()?200:300)(`maxWidth`,n.breakpointService.isTabletOrBelow()?n.window.innerWidth:n.window.innerWidth*.5),xb(3),Ly(e(`title`)),xb(),bC(n.downloadService.isPaused()?5:-1),xb(),jm$1(`aria-label`,e(`close`)),xb(3),jy(`activeId`,n.activeTabId),xb(2),Vm$1(`ngbNavItem`,`downloading`),xb(2),Ou(``,e(`tab-downloading`),` `),xb(2),Ly(n.downloadingTabCount()),xb(2),Vm$1(`ngbNavItem`,`completed`),xb(2),Ou(``,e(`tab-completed`),` `),xb(2),Ly(n.
53completedTabCount()),xb(2),Vm$1(`ngbNavOutlet`,i)}}var fo=(()=>{class t{constructor(){this.activeOffcanvas=E$2(w$2),this.router=E$2(J$7),this.downloadService=E$2(Tt$2),this.breakpointService=E$2(W$1),this.activeTabId=be$3(`downloading`),this.olderCollapsed=!0,this.downloadingTabCount=it$3(()=>(this.downloadService.activeItem()?1:0)+this.downloadService.queuedItems().length+this.downloadService.failedItems().length),this.completedTabCount=it$3(()=>this.downloadService.completedTodayCount()+this.downloadService.olderCompletedCount()),this.completedToday=this.downloadService.completedItems,this.olderItems=this.downloadService.olderCompletedItems,this.olderCount=this.downloadService.olderCompletedCount,this.ResizeMode=h$2,this.window=window}close(){this.activeOffcanvas.close()}navigateToItem(e){e.entityType===`volume`?this.router.navigate([`/library`,e.libraryId,`series`,e.seriesId,`volume`,e.entityId]):e.entityType===`chapter`?this.router.navigate([`/library`,e.libraryId,`series`,e.seriesId,`chapter`,e.entityId]):this.router.navigate([`/library`,e.libraryId,`series`,e.seriesId]),this.close()}clearCompletedToday(){let e=this.completedToday().map(i=>i.id);this.downloadService.clearCompletedByIds(e)}clearCompletedOlder(){this.downloadService.clearOlderCompleted()}expandOlder(){this.olderCollapsed=!this.olderCollapsed,this.olderCollapsed||this.downloadService.loadOlderCompleted()}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-download-queue-drawer`]],decls:1,vars:1,consts:[[`nav`,`ngbNav`],[4,`transloco`,`translocoPrefix`],[`canvasPosition`,`end`,3,`resizeMode`,`minWidth`,`maxWidth`],[1,`offcanvas-header`],[1,`offcanvas-title`],[1,`fa-solid`,`fa-circle-pause`,`text-warning`,`ms-2`],[`type`,`button`,1,`btn-unstyled`,`ms-auto`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-times`],[1,`offcanvas-body`],[`ngbNav`,``,1,`nav-tabs`,3,`activeIdChange`,`activeId`],[3,`ngbNavItem`],[`ngbNavLink`,``],[1,`badge`,`bg-secondary`,`ms-1`],[`ngbNavContent`,``],[3,`ngbNavOutlet`],[1,`tab-body`,`mt-3`],[1,`d-flex`,`align-items-center`,`justify-content-end`,`gap-2`,`mb-2`],[1,`text-muted`,`text-center`,`py-4`],[1,`btn`,`btn-sm`,`btn-primary`],[1,`btn`,`btn-sm`,`btn-outline-secondary`],[1,`btn`,`btn-sm`,`btn-primary`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-play`,`me-1`],[1,`btn`,`btn-sm`,`btn-outline-secondary`,3,`click`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-circle-pause`,`me-1`],[3,`cancelled`,`retry`,`remove`,`navigate`,`item`],[1,`section-break-lg`],[1,`d-flex`,`align-items-center`,`justify-content-between`,`mb-1`],[1,`section-label`,`text-danger`],[1,`d-flex`,`gap-2`],[1,`btn`,`btn-sm`,`btn-link`,`p-0`,`text-danger`,3,`click`],[1,`btn`,`btn-sm`,`btn-link`,`p-0`,3,`click`],[1,`setting-section-break`],[1,`section-label`],[`type`,`button`,1,`btn-unstyled`,`section-label`,`d-flex`,`align-items-center`,`gap-1`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-chevron-right`,`collapse-chevron`],[3,`ngbCollapse`]],template:function(i,n){i&1&&Dm$1(0,za,24,14,`ng-container`,1),i&2&&Vm$1(`translocoPrefix`,`download-queue-drawer`)},dependencies:[Ct$3,L$3,vo,D$1,ne,Ve,ue$2,Ke$1,T],styles:[`.download-queue-drawer[_ngcontent-%COMP%]{height:100%;overflow-y:auto}.section-label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--%NS%text-muted-color);text-decoration:none}.section-label[_ngcontent-%COMP%]:hover{text-decoration:none}[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column}[_nghost-%COMP%]   .setting-section-break[_ngcontent-%COMP%]{margin:.5rem 0}[_nghost-%COMP%]   .section-break-lg[_ngcontent-%COMP%]{margin:1rem 0;border-bottom:1px solid var(--%NS%drawer-section-break-color, var(--%NS%bs-border-color))}.collapse-chevron[_ngcontent-%COMP%]{font-size:.65rem;transition:transform .2s ease}.collapse-chevron.expanded[_ngcontent-%COMP%]{transform:rotate(90deg)}
54/*# sourceMappingURL=download-queue-drawer.component-QWPUSIJ2.css.map */`]})}}return t})();function Wa(t,l){t&1&&Hm$1(0,`i`,4)}function qa(t,l){if(t&1&&(bs$1(0,`span`,5),j_$1(1),Mu()),t&2){let e=i_$1(3);xb(),Ly(e.downloadService.totalActiveCount())}}function ja(t,l){if(t&1){let e=AC();bs$1(0,`div`,1)(1,`button`,2),fy(`click`,function(){_f(e);return Mf(i_$1(2).openDownloadQueue())}),Hm$1(2,`i`,3),DC(3,Wa,1,0,`i`,4),DC(4,qa,2,1,`span`,5),Mu()()}if(t&2){let e=i_$1().$implicit,i=i_$1();xb(),Vm$1(`title`,e(`title`)),jm$1(`aria-label`,e(`title`)),xb(),Ty(`colored`,i.downloadService.hasActiveDownloads()&&
54!i.downloadService.isPaused())(`text-warning`,i.downloadService.isPaused()&&i.downloadService.queuedItems().length>0),xb(),bC(i.downloadService.isPaused()&&i.downloadService.queuedItems().length>0?3:-1),xb(),bC(i.downloadService.totalActiveCount()>0?4:-1)}}function Ka(t,l){if(t&1&&(xu(0),DC(1,ja,5,8,`div`,1),Gs$1()),t&2){let e=i_$1();xb(),bC(e.downloadService.hasActiveDownloads()||e.downloadService.completedTodayCount()>0||e.downloadService.olderCompletedCount()>0||e.downloadService.failedItems().length>0?1:-1)}}var ho=(()=>{class t{constructor(){this.downloadService=E$2(Tt$2),this.drawerService=E$2(G$5)}openDownloadQueue(){this.drawerService.open(fo,{position:`end`})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-download-queue-widget`]],decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`nav-item`],[1,`btn`,`btn-icon`,`position-relative`,3,`click`,`title`],[`aria-hidden`,`true`,1,`fa`,`fa-download`,`nav`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-circle-pause`,`text-warning`,`pause-overlay`],[1,`badge`,`bg-primary`,`position-absolute`,`top-0`,`start-100`,`translate-middle`,`badge`,`rounded-pill`,`dl-count-pill`]],template:function(i,n){i&1&&Dm$1(0,Ka,2,1,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`download-queue-widget`)},dependencies:[Ct$3],styles:[`.dl-count-pill[_ngcontent-%COMP%]{font-size:.55rem;transform:translate(-70%)!important}.pause-overlay[_ngcontent-%COMP%]{position:absolute;bottom:0;right:-2px;font-size:.6rem}
55/*# sourceMappingURL=download-queue-widget.component-4DTV2V4I.css.map */`]})}}return t})();var Co=t=>({leftToProcess:t});var xo=(t,l)=>({leftToProcess:t,totalToProcess:l});var Za=t=>({width:t});var Ya=()=>[`settings`];var Xa=t=>({num:t});var Ja=(t,l)=>l.name+`_`+l.eventType;function er(t,l){if(t&1&&(bs$1(0,`span`,9),j_$1(1),Mu()),t&2){i_$1();let e=$_$1(1),i=i_$1();Ty(`colored`,i.activeEvents()>0||i.updateAvailable()||e>0),xb(),Ou(` `,e,` `)}}function tr(t,l){t&1&&Hm$1(0,`i`,5)}function ir(t,l){t&1&&Hm$1(0,`i`,6)}function nr(t,l){t&1&&Hm$1(0,`i`,7)}function or(t,l){t&1&&Hm$1(0,`div`,8)}function ar(t,l){if(t&1){let e=AC();bs$1(0,`li`,15),fy(`click`,function(){_f(e);return Mf(i_$1(3).clearAllErrorOrInfos())}),j_$1(1),Mu()}if(t&2){let e=i_$1(2).$implicit;xb(),Ou(` `,e(`dismiss-all`),` `)}}function rr(t,l){if(t&1&&(bs$1(0,`div`,17),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;Vm$1(`title`,e.subTitle),xb(),Ly(e.subTitle)}}function lr(t,l){if(t&1&&(bs$1(0,`div`,17),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1(2).$implicit;Vm$1(`title`,i(`left-to-process`,J_$1(2,Co,e.body.leftToProcess))),xb(),Ou(` `,i(`left-to-process`,X_$1(4,xo,e.body.leftToProcess,e.body.totalToProcess)),` `)}}function cr(t,l){t&1&&(bs$1(0,`div`,19),Hm$1(1,`div`,20),Mu()),t&2&&(xb(),jm$1(`aria-valuenow`,100))}function sr(t,l){if(t&1&&(bs$1(0,`li`,14)(1,`div`,16),j_$1(2),Mu(),DC(3,rr,2,2,`div`,17),DC(4,lr,2,7,`div`,17),bs$1(5,`div`,18),DC(6,cr,2,1,`div`,19),Mu()()),t&2){let e=i_$1().$implicit,i=i_$1(3);xb(2),Ly(e.title),xb(),bC(e.subTitle!==``?3:-1),xb(),bC(e.name===i.EVENTS.ScanProgress&&e.body.leftToProcess>0?4:-1),xb(2),bC(e.progress===`indeterminate`?6:-1)}}function dr(t,l){if(t&1&&(bs$1(0,`div`,17),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;Vm$1(`title`,e.subTitle),xb(),Ly(e.subTitle)}}function mr(t,l){if(t&1&&(bs$1(0,`div`,17),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1(2).$implicit;Vm$1(`title`,i(`left-to-process`,J_$1(2,Co,e.body.leftToProcess))),xb(),Ou(` `,i(`left-to-process`,X_$1(4,xo,e.body.leftToProcess,e.body.totalToProcess)),` `)}}function pr(t,l){if(t&1&&(bs$1(0,`li`,14)(1,`div`,16),j_$1(2),Mu(),DC(3,dr,2,2,`div`,17),bs$1(4,`div`,18)(5,`div`,21),j_$1(6),Mu(),bs$1(7,`div`,22),Hm$1(8,`div`,23),Mu()(),DC(9,mr,2,7,`div`,17),Mu()),t&2){let e=i_$1().$implicit,i=i_$1(3);xb(2),Ly(e.title),xb(),bC(e.subTitle!==``?3:-1),xb(3),Ly(i.prettyPrintProgress(e.body.progress)+`%`),xb(2),Vm$1(`ngStyle`,J_$1(6,Za,e.body.progress*100+`%`)),jm$1(`aria-valuenow`,e.body.progress*100),xb(),bC(e.name===i.EVENTS.ScanProgress&&e.body.leftToProcess>0?9:-1)}}function _r(t,l){if(t&1&&DC(0,sr,7,4,`li`,14)(1,pr,10,8,`li`,14),t&2){let e=l.$implicit;bC(e.progress===`indeterminate`||e.progress===`none`?0:1)}}function ur(t,l){if(t&1){let e=AC();bs$1(0,`li`,25),fy(`click`,function(){_f(e);let n=i_$1().$implicit;return Mf(i_$1(3).handleUpdateAvailableClick(n))}),Hm$1(1,`i`,26),j_$1(2),Mu()}if(t&2){let e=i_$1(3).$implicit;xb(2),Ou(``,e(`update-available`),` `)}}function gr(t,l){if(t&1&&(bs$1(0,`div`,27),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;xb(),Ly(e.subTitle)}}function vr(t,l){if(t&1&&(bs$1(0,`li`,24)(1,`div`),j_$1(2),Mu(),DC(3,gr,2,1,`div`,27),Mu()),t&2){let e=i_$1().$implicit;xb(2),Ly(e.title),xb(),bC(e.subTitle!==``?3:-1)}}function fr(t,l){if(t&1&&DC(0,ur,3,1,`li`,24)(1,vr,4,2,`li`,24),t&2){let e=l.$implicit,i=i_$1(3);bC(e.name===i.EVENTS.UpdateAvailable?0:1)}}function hr(t,l){if(t&1){let e=AC();bs$1(0,`li`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(3).seeMore(n))}),bs$1(1,`div`)(2,`div`,16),Hm$1(3,`i`,29),j_$1(4),Mu(),bs$1(5,`div`,30),j_$1(6),Mu()(),bs$1(7,`button`,31),fy(`click`,function(n){let d=_f(e).$implicit;return Mf(i_$1(3).removeErrorOrInfo(d,n))}),Mu()()}if(t&2){let e=l.$implicit,i=i_$1(2).$implicit;xb(4),Ly(e.title),xb(2),Ly(i(`more-info`)),xb(),jm$1(`aria-label`,i(`close`))}}function Cr(t,l){if(t&1){let e=AC();bs$1(0,`li`,32),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(3).seeMore(n))}),bs$1(1,`div`)(2,`div`,16),Hm$1(3,`i`,33),j_$1(4),Mu(),bs$1(5,`div`,30),j_$1(6),Mu()(),bs$1(7,`button`,31),fy(`click`,function(n){let d=_f(e).$implicit;return Mf(i_$1(3).removeErrorOrInfo(d,n))}),Mu()()}if(t&2){let e=l.$implicit,i=i_$1(2).$implicit;xb(4),Ly(e.title),xb(2),Ly(i(`more-info`)),xb(),jm$1(`aria-label`,i(`close`))}}function xr(t,l){if(t&1&&(bs$1(0,`li`,14)(1,`a`,34),j_$1(2),Mu()()),t&2){let e=i_$1(2).$implicit,i=$_$1(1);xb(),Vm$1(`routerLink`,K_$1(3,Ya))(`fragment`,`admin-activity`),xb(
55),Ly(e(`reading-now`,J_$1(4,Xa,i)))}}function br(t,l){if(t&1&&(bs$1(0,`li`,14),j_$1(1),Mu()),t&2){let e=i_$1(3).$implicit;xb(),Ly(e(`no-data`))}}function Sr(t,l){if(t&1&&(bs$1(0,`li`,14),j_$1(1),Mu()),t&2){let e=i_$1(3).$implicit;xb(),Ly(e(`not-connected`))}}function yr(t,l){if(t&1&&DC(0,br,2,1,`li`,14)(1,Sr,2,1,`li`,14),t&2)bC(i_$1(3).isConnected()?0:1)}function wr(t,l){if(t&1&&(bs$1(0,`ul`,10),DC(1,ar,2,1,`li`,11),CC(2,_r,2,1,null,null,Ja),CC(4,fr,2,1,null,null,TC),CC(6,hr,8,3,`li`,12,TC),CC(8,Cr,8,3,`li`,13,TC),DC(10,xr,3,6,`li`,14),DC(11,yr,2,1),Mu()),t&2){i_$1();let e=$_$1(1),i=i_$1();xb(),bC(i.errors().length>0||i.infos().length>0?1:-1),xb(),_C(i.progressEvents()),xb(2),_C(i.singleUpdates()),xb(2),_C(i.errors()),xb(2),_C(i.infos()),xb(2),bC(e>0?10:-1),xb(),bC(!i.downloadService.hasActiveDownloads()&&i.activeEvents()===0&&e===0?11:-1)}}function Tr(t,l){if(t&1&&(xu(0),By(1),bs$1(2,`button`,2),DC(3,er,2,3,`span`,3),Hm$1(4,`i`,4),DC(5,tr,1,0,`i`,5)(6,ir,1,0,`i`,6)(7,nr,1,0,`i`,7)(8,or,1,0,`div`,8),Mu(),Dm$1(9,wr,12,3,`ng-template`,null,0,lM),Gs$1()),t&2){let e=l.$implicit,i=p_$1(10),n=i_$1();xb();let d=B_$1(n.activeReadingSessions().size);xb(),Vm$1(`ngbPopover`,i)(`title`,e(`title-alt`))(`popoverClass`,`nav-events`)(`autoClose`,`outside`),xb(),bC(d>1?3:-1),xb(),Ty(`colored`,n.activeEvents()>0||n.updateAvailable()),xb(),bC(n.errors().length>0?5:n.infos().length>0?6:n.updateAvailable()?7:n.activeEvents()>0?8:-1)}}var bo=(()=>{class t{constructor(){this.downloadService=E$2(Tt$2),this.messageHub=E$2(Ao$2),this.versionService=E$2(Ye),this.accountService=E$2(yc$1),this.confirmService=E$2(bi),this.destroyRef=E$2(te$5),this.user=TB.required(),this.progressEvents=be$3([]),this.singleUpdates=be$3([]),this.errors=be$3([]),this.infos=be$3([]),this.activeReadingSessions=be$3(new Set),this.isConnected=this.messageHub.isConnectedSignal,this.activeEvents=it$3(()=>this.progressEvents().length+this.singleUpdates().length+this.errors().length+this.infos().length),this.updateAvailable=be$3(!1),this.EVENTS=c$2}ngOnInit(){this.messageHub.messages$.pipe(JB(this.destroyRef)).subscribe(e=>{if(e.event===c$2.NotificationProgress)this.processNotificationProgressEvent(e);else if(e.event===c$2.Error)this.errors.update(i=>[...i,e.payload]);else if(e.event===c$2.Info)this.infos.update(i=>[...i,e.payload]);else if(e.event===c$2.UpdateAvailable)this.handleUpdateAvailableClick(e.payload);else if(e.event===c$2.ReadingSessionUpdate){let i=e.payload;this.activeReadingSessions.update(n=>new Set([...n,i.sessionId]))}else e.event===c$2.ReadingSessionClose&&this.activeReadingSessions.update(i=>{let n=new Set(i);return n.delete(e.payload.sessionId),n})})}processNotificationProgressEvent(e){let i=e.payload;switch(e.payload.eventType){case`single`:this.singleUpdates.update(n=>[...n,i]),e.payload.name===c$2.UpdateAvailable&&this.updateAvailable.set(!0);break;case`started`:case`updated`:this.progressEvents.update(n=>this.mergeOrUpdate(n,i));break;case`ended`:this.progressEvents.update(n=>n.filter(d=>d.name!==i.name));break;default:break}}mergeOrUpdate(e,i){let n=e.findIndex(y=>y.name===i.name);if(n<0)return[...e,i];let d=[...e];return d[n]=i,d}handleUpdateAvailableClick(e){let i=`body`in e?e.body:e;this.versionService.showUpdateModal(`update-available`,{update:i},!0)}seeMore(e){return D$5(this,null,function*(){let i=new S$7;e.name===c$2.Error?i.buttons=[{text:`Ok`,type:`secondary`},{text:`Dismiss`,type:`primary`}]:i.buttons=[{text:`Ok`,type:`primary`}],i.header=e.title,i.content=e.subTitle,(yield this.confirmService.alert(e.subTitle||e.title,i))&&this.removeErrorOrInfo(e)})}clearAllErrorOrInfos(){this.infos.set([]),this.errors.set([])}removeErrorOrInfo(e,i){i&&(i.stopPropagation(),i.preventDefault()),e.name===c$2.Info?this.infos.update(n=>n.filter(d=>d!==e)):this.errors.update(n=>n.filter(d=>d!==e))}prettyPrintProgress(e){return Math.trunc(e*100)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-nav-events-toggle`]],inputs:{user:[1,`user`]},decls:1,vars:1,consts:[[`popContent`,``],[4,`transloco`,`translocoPrefix`],[`type`,`button`,`placement`,`bottom`,1,`btn`,`btn-icon`,3,`ngbPopover`,`title`,`popoverClass`,`autoClose`],[1,`me-2`,3,`colored`],[`aria-hidden`,`true`,1,`fa`,`fa-wave-square`,`nav`],[`aria-hidden`,`true`,1,`fa`,`fa-circle-exclamation`,`nav`,`widget-button--indicator`,`error`],[`aria-hidden`,`true`,1,`fa`,`fa-circle-info`,`nav`,`widget-button--indicator`,`info`],[`aria-hidden`,`true`,1,`fa`,`fa-circle-arrow-up`,`nav`,`widget-button--indicator`,`update`],[1,`nav`,`widget-button--indicator`,`spinner-border`,`spinner-border-sm`],[1,`me-2`],[1,`list-group`,`list-group-flush`,`dark-menu`],[1,`list-group-item`,`dark-menu-item`,`clickable`],[`role`,`alert`,1,`list-group-item`,`dark-menu-item`,`error`],[`role`,`alert`,1,`list-group-item`,`dark-menu-item`,`info`],[1,`list-group-item`,`dark-menu-item`],[1,`list-group-item`,`dark-menu-item`,`clickable`,3,`click`],[1,`h6`,`mb-1`],[1,`accent-text`,`mb-1`,3,`title`],[1,`progress-container`,`row`,`g-0`,`align-items-center`],[`role`,`progressbar`,1,`progress`,2,`height`,`0.3125rem`],[`aria-valuemin`,`0`,`aria-valuemax`,`
55100`,1,`progress-bar`,`progress-bar-striped`,`progress-bar-animated`,2,`width`,`100%`],[1,`col-2`],[`role`,`progressbar`,1,`col-10`,`progress`,2,`height`,`0.3125rem`],[`aria-valuemin`,`0`,`aria-valuemax`,`100`,1,`progress-bar`,3,`ngStyle`],[1,`list-group-item`,`dark-menu-item`,`update-available`],[1,`list-group-item`,`dark-menu-item`,`update-available`,3,`click`],[`aria-hidden`,`true`,1,`fa`,`fa-chevron-circle-up`,`me-1`],[1,`accent-text`],[`role`,`alert`,1,`list-group-item`,`dark-menu-item`,`error`,3,`click`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-triangle-exclamation`,`me-2`],[1,`accent-text`,`mb-1`],[`type`,`button`,1,`btn-close`,`float-end`,3,`click`],[`role`,`alert`,1,`list-group-item`,`dark-menu-item`,`info`,3,`click`],[`aria-hidden`,`true`,1,`fa-solid`,`fa-circle-info`,`me-2`],[3,`routerLink`,`fragment`]],template:function(i,n){i&1&&Dm$1(0,Tr,11,9,`ng-container`,1),i&2&&Vm$1(`translocoPrefix`,`events-widget`)},dependencies:[me$4,un,Ct$3,Vt$2],styles:[`.dark-menu[_ngcontent-%COMP%]{background-color:var(--%NS%navbar-bg-color);border-color:var(--%NS%event-widget-border-color)}.dark-menu-item[_ngcontent-%COMP%]{color:var(--%NS%event-widget-text-color);background-color:var(--%NS%event-widget-item-bg-color);border-color:var(--%NS%event-widget-item-border-color)}  .bs-popover-bottom>.popover-arrow:after, .bs-popover-bottom[_ngcontent-%COMP%] > .popover-arrow[_ngcontent-%COMP%]:before{border-bottom-color:transparent}.colored[_ngcontent-%COMP%]{color:var(--%NS%event-widget-activity-bg-color)!important}.widget-button--indicator[_ngcontent-%COMP%]{position:absolute;top:1.5rem;color:var(--%NS%event-widget-activity-bg-color)}.widget-button--indicator.error[_ngcontent-%COMP%]{color:var(--%NS%event-widget-error-bg-color)!important}.widget-button--indicator.info[_ngcontent-%COMP%]{color:var(--%NS%event-widget-info-bg-color)!important}.widget-button--indicator.update[_ngcontent-%COMP%]{color:var(--%NS%event-widget-update-bg-color)!important}  .nav-events .popover-body{min-width:18.75rem;max-width:18.75rem;padding:0;box-shadow:0 0 .75rem #000000bf;max-height:calc(100vh - 3.75rem);overflow-y:auto}  .nav-events .popover{min-width:18.75rem}.progress-container[_ngcontent-%COMP%]{width:100%}.progress[_ngcontent-%COMP%]{padding:0}.accent-text[_ngcontent-%COMP%]{width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.small-spinner[_ngcontent-%COMP%]{width:1rem;height:1rem}.btn-icon[_ngcontent-%COMP%]{color:var(--%NS%event-widget-text-color)}.dark-menu-item.update-available[_ngcontent-%COMP%]{cursor:pointer;opacity:1}.dark-menu-item.update-available[_ngcontent-%COMP%]   i.fa[_ngcontent-%COMP%]{color:var(--%NS%primary-color)!important}.dark-menu-item.update-available[_ngcontent-%COMP%]{color:var(--%NS%primary-color)}.dark-menu-item.error[_ngcontent-%COMP%]{cursor:pointer;position:relative}.dark-menu-item.error[_ngcontent-%COMP%]   .h6[_ngcontent-%COMP%]{color:var(--%NS%event-widget-error-bg-color)}.dark-menu-item.error[_ngcontent-%COMP%]   i.fa[_ngcontent-%COMP%]{color:var(--%NS%primary-color)!important}.dark-menu-item.error[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]{top:.3125rem;right:.625rem;font-size:.6875rem;position:absolute}.dark-menu-item.info[_ngcontent-%COMP%]{cursor:pointer;position:relative}.dark-menu-item.info[_ngcontent-%COMP%]   .h6[_ngcontent-%COMP%]{color:var(--%NS%event-widget-info-bg-color)}.dark-menu-item.info[_ngcontent-%COMP%]   i.fa[_ngcontent-%COMP%]{color:var(--%NS%primary-color)!important}.dark-menu-item.info[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]{top:2.1875rem;right:.625rem;font-size:.6875rem;position:absolute}
56/*# sourceMappingURL=events-widget.component-GXIB3EUS.css.map */`]})}}return t})();var kr=[`itemTemplate`];var Er=[`seriesTemplate`];var Dr=[`collectionTemplate`];var Mr=[`tagTemplate`];var Ir=[`personTemplate`];var Nr=[`genreTemplate`];var Or=[`noResultsTemplate`];var Pr=[`libraryTemplate`];var Vr=[`readingListTemplate`];var Fr=[`fileTemplate`];var Rr=[`chapterTemplate`];var Lr=[`bookmarkTemplate`];var $r=[`annotationTemplate`];var Ar=[`extraTemplate`];var Br=[`input`];var Hr=t=>({focused:t});var ee=(t,l)=>({$implicit:t,idx:l});function Ur(t,l){if(t&1&&(bs$1(0,`div`,8)(1,`span`,10),j_$1(2),Mu()()),t&2){let e=i_$1(2).$implicit;xb(2),Ly(e(`loading`))}}function Qr(t,l){if(t&1){let e=AC();bs$1(0,`button`,11),fy(`click`,function(){_f(e);return Mf(i_$1(3).resetField())}),Mu()}if(t&2){let e=i_$1(2).$implicit;jm$1(`aria-label`,e(`close`))}}function Gr(t,l){if(t&1&&DC(0,Ur,3,1,`div`,8)(1,Qr,1,1,`button`,9),t&2)bC(i_$1(2).isLoading?0:1)}function zr(t,l){if(t&1&&(bs$1(0,`div`,6),j_$1(1),rM(2,`keyBind`),Mu()),t&2){let e=i_$1(2);xb(),Ou(` `,sM(2,1,e.keyBindService.allKeyBinds().OpenSearch.at(0),!1),` `)}}function Wr(t,l){if(t&1){let e=AC();bs$1(0,`li`,20),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.seriesTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function qr(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`,17),j_$1(2,`Series`),Mu()(),bs$1(3,`ul`,18),CC(4,Wr,2,5,`li`,19,TC),Mu()),t&2){let e=i_$1(3);xb(4),_C(e.groupedData.series)}}function jr(t,l){if(t&1){let e=AC();bs$1(0,`li`,23),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.collectionTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function Kr(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`),j_$1(2),Mu()(),bs$1(3,`ul`,14),CC(4,jr,2,5,`li`,22,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`collections`)),xb(2),_C(i.groupedData.collections)}}function Zr(t,l){if(t&1){let e=AC();bs$1(0,`li`,23),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.readingListTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function Yr(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`),j_$1(2),Mu()(),bs$1(3,`ul`,14),CC(4,Zr,2,5,`li`,22,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`reading-lists`)),xb(2),_C(i.groupedData.readingLists)}}function Xr(t,l){if(t&1){let e=AC();bs$1(0,`li`,23),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.bookmarkTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function Jr(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`),j_$1(2),Mu()(),bs$1(3,`ul`,14),CC(4,Xr,2,5,`li`,22,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`bookmarks`)),xb(2),_C(i.groupedData.bookmarks)}}function el(t,l){if(t&1){let e=AC();bs$1(0,`li`,27),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.libraryTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function tl(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`,24),j_$1(2),Mu()(),bs$1(3,`ul`,25),CC(4,el,2,5,`li`,26,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`libraries`)),xb(2),_C(i.groupedData.libraries)}}function il(t,l){if(t&1){let e=AC();bs$1(0,`li`,23),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.genreTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function nl(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`),j_$1(2),Mu()(),bs$1(3,`ul`,14),CC(4,il,2,5,`li`,22,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`genres`)),xb(2),_C(i.groupedData.genres)}}function ol(t,l){if(t&1){let e=AC();bs$1(0,`li`,23),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.tagTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function al(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`),j_$1(2),Mu()(),bs$1(3,`ul`,14),CC(4,ol,2,5,`li`,22,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`tags`)),xb(2),_C(i.groupedData.tags)}}function rl(t,l){if(t&1){let e=AC();bs$1(0,`li`,23),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.personTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function ll(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`),j_$1(2),Mu()(),bs$1(3,`ul`,14),CC(4,rl,2,5,`li`,22,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`people`)),xb(2),_C(i.groupedData.persons)}}function cl(t,l){if(t&1){let e=AC();bs$1(0,`li`,23),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.chapterTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function sl(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`),j_$1(2),Mu()(),bs$1(3,`ul`,14),CC(4,cl,2,5,`li`,22,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`chapters`)),xb(2),_C(i.groupedData.chapters)}}function dl(t,l){if(t&1){let e=AC();bs$1(0,`li`,23),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.fileTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function ml(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`),j_$1(2),Mu()(),bs$1(3,`ul`,14),CC(4,dl,2,5,`li`,22,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`files`)),xb(2),_C(i.groupedData.files)}}function pl(t,l){if(t&1){let e=AC();bs$1(0,`li`,31),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).handleResultClick(n))}),Um$1(1,21),Mu()}if(t&2){let e=l.$implicit,i=l.$index,n=i_$1(4);xb(),Vm$1(`ngTemplateOutlet`,n.annotationTemplate())(`ngTemplateOutletContext`,X_$1(2,ee,e,i))}}function _l(t,l){if(t&1&&(bs$1(0,`li`,16)(1,`h5`,28),j_$1(2),Mu()(),bs$1(3,`ul`,29),CC(4,pl,2,5,`li`,30,TC),Mu()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`annotations`)),xb(2),_C(i.groupedData.annotations)}}function ul(t,l){if(t&1&&(bs$1(0,`ul`,14)(1,`li`,32),Um$1(2,33),Mu()()),t&2){let e=i_$1(3);
56xb(2),Vm$1(`ngTemplateOutlet`,e.noResultsTemplate())}}function gl(t,l){if(t&1&&(bs$1(0,`li`,34),fy(`click`,function(i){return i.stopPropagation()}),Um$1(1,33),bs$1(2,`form`,35)(3,`div`,36),Hm$1(4,`input`,37),Sw(),bs$1(5,`label`,38),j_$1(6),Mu()()()()),t&2){let e=i_$1(2).$implicit,i=i_$1();xb(),Vm$1(`ngTemplateOutlet`,i.extraTemplate()),xb(),Vm$1(`formGroup`,i.searchSettingsForm),xb(2),Aw(),xb(2),Ly(e(`include-extras`))}}function vl(t,l){if(t&1&&(bs$1(0,`div`,7)(1,`div`,12)(2,`ul`,13),DC(3,qr,6,0),DC(4,Kr,6,1),DC(5,Yr,6,1),DC(6,Jr,6,1),DC(7,tl,6,1),DC(8,nl,6,1),DC(9,al,6,1),DC(10,ll,6,1),DC(11,sl,6,1),DC(12,ml,6,1),DC(13,_l,6,1),DC(14,ul,3,1,`ul`,14),DC(15,gl,7,3,`li`,15),Mu()()()),t&2){let e=i_$1(2);xb(3),bC(e.seriesTemplate()!==void 0&&e.groupedData.series.length>0?3:-1),xb(),bC(e.collectionTemplate()!==void 0&&e.groupedData.collections.length>0?4:-1),xb(),bC(e.readingListTemplate()!==void 0&&e.groupedData.readingLists.length>0?5:-1),xb(),bC(e.bookmarkTemplate()!==void 0&&e.groupedData.bookmarks.length>0?6:-1),xb(),bC(e.libraryTemplate()!==void 0&&e.groupedData.libraries.length>0?7:-1),xb(),bC(e.genreTemplate()!==void 0&&e.groupedData.genres.length>0?8:-1),xb(),bC(e.tagTemplate()!==void 0&&e.groupedData.tags.length>0?9:-1),xb(),bC(e.personTemplate()!==void 0&&e.groupedData.persons.length>0?10:-1),xb(),bC(e.chapterTemplate()!==void 0&&e.groupedData.chapters.length>0?11:-1),xb(),bC(e.fileTemplate()!==void 0&&e.groupedData.files.length>0?12:-1),xb(),bC(e.annotationTemplate()!==void 0&&e.groupedData.annotations.length>0?13:-1),xb(),bC(!e.hasData&&e.searchTerm.length>0&&!e.isLoading?14:-1),xb(),bC(e.searchTerm.length>0&&!e.isLoading?15:-1)}}function fl(t,l){if(t&1){let e=AC();xu(0),bs$1(1,`form`,2)(2,`div`,3),fy(`click`,function(n){_f(e);return Mf(i_$1().onInputFocus(n))}),bs$1(3,`div`,4)(4,`input`,5,0),fy(`focusout`,function(n){_f(e);return Mf(i_$1().close(n))})(`focus`,function(n){_f(e);return Mf(i_$1().open(n))}),Mu(),Sw(),DC(6,Gr,2,1)(7,zr,3,4,`div`,6),Mu()(),DC(8,vl,16,13,`div`,7),Mu(),Gs$1()}if(t&2){let e=i_$1();xb(),Vm$1(`formGroup`,e.typeaheadForm),xb(),Vm$1(`ngClass`,J_$1(7,Hr,e.hasFocus)),xb(2),Vm$1(`id`,e.id)(`placeholder`,e.placeholder),jm$1(`aria-expanded`,e.hasFocus&&e.hasData),Aw(),xb(2),bC(e.searchTerm.length>0?6:7),xb(2),bC(e.hasFocus?8:-1)}}var So=(()=>{class t{constructor(){this.destroyRef=E$2(te$5),this.cdRef=E$2(OB),this.keyBindService=E$2(W$3),this.id=`grouped-typeahead`,this.minQueryLength=0,this.initialValue=``,this.groupedData=new kt$2,this.placeholder=``,this.isLoading=!1,this.debounceTime=200,this.inputChanged=wB(),this.selected=wB(),this.clearField=wB(),this.focusChanged=wB(),this.inputElem=_B.required(`input`),this.itemTemplate=NB.required(`itemTemplate`),this.seriesTemplate=NB(`seriesTemplate`),this.collectionTemplate=NB(`collectionTemplate`),this.tagTemplate=NB(`tagTemplate`),this.personTemplate=NB(`personTemplate`),this.genreTemplate=NB(`genreTemplate`),this.noResultsTemplate=NB(`noResultsTemplate`),this.libraryTemplate=NB(`libraryTemplate`),this.readingListTemplate=NB(`readingListTemplate`),this.fileTemplate=NB(`fileTemplate`),this.chapterTemplate=NB(`chapterTemplate`),this.bookmarkTemplate=NB(`bookmarkTemplate`),this.annotationTemplate=NB(`annotationTemplate`),this.extraTemplate=NB(`extraTemplate`),this.hasFocus=!1,this.typeaheadForm=new G$6({typeahead:new Z$2(``,[])}),this.includeChapterAndFiles=!1,this.prevSearchTerm=``,this.searchSettingsForm=new G$6({includeExtras:new Z$2(!1)})}get searchTerm(){return this.typeaheadForm.get(`typeahead`)?.value||``}get hasData(){return!(this.noResultsTemplate!=null&&!this.groupedData.persons.length&&!this.groupedData.collections.length&&!this.groupedData.series.length&&!this.groupedData.persons.length&&!this.groupedData.tags.length&&!this.groupedData.genres.length&&!this.groupedData.libraries.length&&!this.groupedData.files.length&&!this.groupedData.chapters.length&&!this.groupedData.bookmarks.length)}handleDocumentClick(e){this.close()}focusElement(e){let i=this.inputElem();i.nativeElement&&(e.triggered=!0,i.nativeElement.focus(),i.nativeElement.click())}ngOnInit(){this.typeaheadForm.get(`typeahead`)?.setValue(this.initialValue),this.cdRef.markForCheck(),this.keyBindService.registerListener(this.destroyRef,e=>this.focusElement(e),[r$2.OpenSearch],{fireInEditable:!0}),this.keyBindService.registerListener(this.destroyRef,e=>{this.hasFocus&&(this.close(),e.triggered=!0)},[r$2.Escape],{markAsTriggered:!1,fireInEditable:!0}),this.searchSettingsForm.get(`includeExtras`).valueChanges.pipe(Nd$1(!1),qe$2(e=>e===null?!1:e),Dd$1(),xd$1(e=>this.toggleIncludeFiles(e)),JB(this.destroyRef)).subscribe(),this.typeaheadForm.valueChanges.pipe(Ed$1(this.debounceTime),JB(this.destroyRef)).subscribe(e=>{let i=this.typeaheadForm.get(`typeahead`)?.value;if(i!=null&&i!=``&&!this.hasFocus&&(this.hasFocus=!0,this.cdRef.markForCheck()),i!=null&&i.length>=this.minQueryLength){if(this.prevSearchTerm===i)return;this.inputChanged.emit({value:i,includeFiles:this.includeChapterAndFiles}),this.prevSearchTerm=i,this.cdRef.markForCheck()}})}onInputFocus(e){return e&&(e.stopPropagation(),e.preventDefault()),this.openDropdown(),this.hasFocus}openDropdown(){setTimeout(()=>{let e=this.typeaheadForm.get(`typeahead`);e&&e.setValue(e.value)})}handleResultClick(e){this.selected.emit(e)}toggleIncludeFiles(e){let i=!e&&e===this.includeChapterAndFiles;if(this.includeChapterAndFiles=e,this.inputChanged.emit({value:this.searchTerm,includeFiles:this.includeChapterAndFiles}),!i){this.hasFocus=!0;let n=this.inputElem();n&&n.nativeElement&&n.nativeElement.focus(),this.openDropdown()}this.cdRef.markForCheck()}resetField(){this.prevSearchTerm=``,this.typeaheadForm.get(`typeahead`)?.setValue(this.initialValue),this.clearField.emit(void 0),this.cdRef.markForCheck()}close(e){e&&(this.hasData||this.searchTerm)||(this.searchTerm===``&&this.resetField(),this.hasFocus=!1,this.cdRef.markForCheck(),this.focusChanged.emit(this.hasFocus),this.inputElem().nativeElement.blur())}open(e){this.hasFocus=!0,this.focusChanged.emit(this.hasFocus),this.cdRef.markForCheck()}clear(){this.prevSearchTerm=``,this.typeaheadForm.get(`typeahead`)?.setValue(this.initialValue),this.cdRef.markForCheck()}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-grouped-typeahead`]],c
56ontentQueries:function(i,n,d){i&1&&yy(d,n.itemTemplate,kr,5)(d,n.seriesTemplate,Er,5)(d,n.collectionTemplate,Dr,5)(d,n.tagTemplate,Mr,5)(d,n.personTemplate,Ir,5)(d,n.genreTemplate,Nr,5)(d,n.noResultsTemplate,Or,5)(d,n.libraryTemplate,Pr,5)(d,n.readingListTemplate,Vr,5)(d,n.fileTemplate,Fr,5)(d,n.chapterTemplate,Rr,5)(d,n.bookmarkTemplate,Lr,5)(d,n.annotationTemplate,$r,5)(d,n.extraTemplate,Ar,5),i&2&&f_$1(14)},viewQuery:function(i,n){i&1&&vy(n.inputElem,Br,5),i&2&&f_$1()},hostBindings:function(i,n){i&1&&fy(`click`,function(y){return n.handleDocumentClick(y)},PD)},inputs:{id:`id`,minQueryLength:`minQueryLength`,initialValue:`initialValue`,groupedData:`groupedData`,placeholder:`placeholder`,isLoading:`isLoading`,debounceTime:`debounceTime`},outputs:{inputChanged:`inputChanged`,selected:`selected`,clearField:`clearField`,focusChanged:`focusChanged`},decls:1,vars:1,consts:[[`input`,``],[4,`transloco`,`translocoPrefix`],[1,`grouped-typeahead`,3,`formGroup`],[1,`typeahead-input`,3,`click`,`ngClass`],[1,`search`],[`type`,`text`,`inputmode`,`search`,`autocomplete`,`off`,`formControlName`,`typeahead`,`aria-haspopup`,`listbox`,`aria-owns`,`dropdown`,`aria-autocomplete`,`list`,`role`,`searchbox`,3,`focusout`,`focus`,`id`,`placeholder`],[1,`input-hint`,`d-none`,`d-lg-block`],[1,`overlay`],[`role`,`status`,1,`spinner-border`,`spinner-border-sm`],[`type`,`button`,1,`btn-close`],[1,`visually-hidden`],[`type`,`button`,1,`btn-close`,3,`click`],[1,`dropdown`],[`role`,`listbox`,`id`,`dropdown`,1,`list-group`],[1,`list-group`,`results`],[1,`list-group-item`,2,`min-height`,`2.125rem`],[1,`list-group-item`,`section-header`],[`id`,`series-group`],[`role`,`group`,`aria-describedby`,`series-group`,1,`list-group`,`results`],[`tabindex`,`0`,`aria-labelledby`,`series-group`,`role`,`option`,1,`list-group-item`],[`tabindex`,`0`,`aria-labelledby`,`series-group`,`role`,`option`,1,`list-group-item`,3,`click`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`tabindex`,`0`,`role`,`option`,1,`list-group-item`],[`tabindex`,`0`,`role`,`option`,1,`list-group-item`,3,`click`],[`id`,`libraries-group`],[`role`,`group`,`aria-describedby`,`libraries-group`,1,`list-group`,`results`],[`tabindex`,`0`,`aria-labelledby`,`libraries-group`,`role`,`option`,1,`list-group-item`],[`tabindex`,`0`,`aria-labelledby`,`libraries-group`,`role`,`option`,1,`list-group-item`,3,`click`],[`id`,`annotations-group`],[`role`,`group`,`aria-describedby`,`annotations-group`,1,`list-group`,`results`],[`tabindex`,`0`,`aria-labelledby`,`annotations-group`,`role`,`option`,1,`list-group-item`],[`tabindex`,`0`,`aria-labelledby`,`annotations-group`,`role`,`option`,1,`list-group-item`,3,`click`],[1,`list-group-item`],[3,`ngTemplateOutlet`],[1,`list-group-item`,2,`min-height`,`2.125rem`,3,`click`],[3,`formGroup`],[1,`form-check`,`form-switch`],[`type`,`checkbox`,`id`,`search-include-extras`,`role`,`switch`,`formControlName`,`includeExtras`,`switch`,``,`aria-labelledby`,`auto-close-label`,`aria-describedby`,`tag-promoted-help`,1,`form-check-input`],[`for`,`search-include-extras`,1,`form-check-label`]],template:function(i,n){i&1&&Dm$1(0,fl,9,9,`ng-container`,1),i&2&&Vm$1(`translocoPrefix`,`grouped-typeahead`)},dependencies:[li$1,ii$2,Qe$5,It$1,ei$1,ti$1,fn$1,wn,sn,cn,Ct$3,y$6],styles:[`.search-result[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%!important}.btn-close[_ngcontent-%COMP%]{margin-top:.5rem;font-size:.8rem;position:absolute;right:.3125rem}.input-hint[_ngcontent-%COMP%]{font-size:.8rem;margin-top:.1875rem;margin-bottom:.1875rem;margin-right:.5625rem;border:1px solid var(--%NS%input-hint-border-color, lightgrey);color:var(--%NS%input-hint-text-color);border-radius:.25rem;padding:.125rem}.typeahead-input[_ngcontent-%COMP%]{border:1px solid transparent;border-radius:.25rem;overflow:hidden;position:relative;z-index:1;box-sizing:border-box;box-shadow:none;cursor:text;background-color:var(--%NS%searchbar-bg-color);color:var(--%NS%body-text-color);min-height:2rem;transition-property:all;transition-duration:.3s;display:block;width:50%}.typeahead-input[_ngcontent-%COMP%]   .search[_ngcontent-%COMP%]{display:flex;position:relative;min-height:2rem}.typeahead-input[_ngcontent-%COMP%]   .search[_ngcontent-%COMP%]   .btn-close[_ngcontent-%COMP%]{position:unset;margin-top:unset;align-self:center;margin:0 .5rem}.typeahead-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:100%;padding:0 .375rem;outline:0!important;border-radius:.28571429rem;margin:0!important;text-indent:0!important;line-height:inherit!important;box-shadow:none!important;transition-property:all;transition-duration:.3s;display:block;opacity:1;position:relative;
56left:.25rem;border:none;background-color:transparent}.typeahead-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus-visible{width:100%}.typeahead-input.focused[_ngcontent-%COMP%]{width:100%;border-color:var(--%NS%primary-color)}.typeahead-input.focused[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{color:#fff}@media only screen and (max-width:980px){.typeahead-input[_ngcontent-%COMP%]{width:65%}}@media only screen and (max-width:650px){.typeahead-input[_ngcontent-%COMP%]{width:75%;margin:0 auto}}@media only screen and (max-width:500px){.typeahead-input[_ngcontent-%COMP%]{width:100%}}.section-header[_ngcontent-%COMP%]{color:var(--%NS%body-text-color)}.section-header[_ngcontent-%COMP%]:hover{background-color:var(--%NS%search-list-group-item-bg-color, black)!important;cursor:default}.list-group-item[_ngcontent-%COMP%]{background-color:var(--%NS%search-list-group-item-bg-color, black)}.dropdown[_ngcontent-%COMP%]{width:100vw;top:3.4375rem;position:fixed;justify-content:center;left:0;overflow-y:auto;display:flex;flex-wrap:wrap;margin-top:.5625rem}.list-group[_ngcontent-%COMP%]{max-width:37.5rem;z-index:1000;overflow-y:auto;overflow-x:hidden;display:block;flex:auto;max-height:calc(var(--%NS%vh) * 100 - var(--%NS%nav-offset));height:fit-content}.list-group.results[_ngcontent-%COMP%]{max-height:unset}@media only screen and (max-width:600px){.list-group[_ngcontent-%COMP%]{max-width:unset}}.list-group-item[_ngcontent-%COMP%]{padding:.3125rem .625rem}li[_ngcontent-%COMP%]{list-style:none;border-radius:0!important;margin:0!important}ul[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{border-radius:0!important}.spinner-border[_ngcontent-%COMP%]{position:absolute;right:.625rem;margin:auto;cursor:pointer;top:30%}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;background:#0006;width:100vw;height:100vh}
57/*# sourceMappingURL=grouped-typeahead.component-IKX5X5GE.css.map */`]})}}return t})();function hl(t,l){if(t&1&&(bs$1(0,`a`,6),j_$1(1),Mu()),t&2){let e=i_$1().$implicit,i=i_$1().$implicit;Vm$1(`routerLink`,e.routerLink)(`fragment`,e.fragment),xb(),Ly(i(e.transLocoKey))}}function Cl(t,l){if(t&1&&(bs$1(0,`a`,10),j_$1(1),Mu()),t&2){let e=i_$1().$implicit,i=i_$1().$implicit;Vm$1(`href`,e.href,qh),xb(),Ly(i(e.transLocoKey))}}function xl(t,l){if(t&1){let e=AC();bs$1(0,`a`,12),fy(`click`,function(){_f(e);let n=i_$1().$implicit;return Mf(n.click())}),j_$1(1),Mu()}if(t&2){let e=i_$1().$implicit,i=i_$1().$implicit;xb(),Ly(i(e.transLocoKey))}}function bl(t,l){if(t&1&&(bs$1(0,`div`,5),DC(1,hl,2,3,`a`,6)(2,Cl,2,2,`a`,10)(3,xl,2,1,`a`,11),Mu()),t&2){let e=l.$implicit;xb(),bC(e.routerLink?1:e.href?2:e.click?3:-1)}}function Sl(t,l){if(t&1){let e=AC();xu(0),bs$1(1,`div`,1)(2,`h4`,2),j_$1(3),Mu(),bs$1(4,`button`,3),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),Mu()(),bs$1(5,`div`,4)(6,`div`,5)(7,`a`,6),j_$1(8),Mu()(),bs$1(9,`div`,5)(10,`a`,7),fy(`click`,function(){_f(e);return Mf(i_$1().closeIfOnSettings())}),j_$1(11),Mu()(),CC(12,bl,4,1,`div`,5,wC),Mu(),bs$1(14,`div`,8)(15,`button`,9),fy(`click`,function(){_f(e);return Mf(i_$1().close())}),j_$1(16),Mu()(),Gs$1()}if(t&2){let e=l.$implicit,i=i_$1();xb(3),Ly(e(`nav-link-header`)),xb(),jm$1(`aria-label`,e(`close`)),xb(3),Vm$1(`routerLink`,i.profileLink())(`fragment`,`stats-tab`),xb(),Ly(e(`my-profile`)),xb(2),Vm$1(`fragment`,i.SettingsTabId.Preferences)(`title`,e(`settings`)),xb(),Ly(e(`settings`)),xb(),_C(i.navService.navItems),xb(4),Ly(e(`close`))}}var yo=(()=>{class t{constructor(){this.WikiLink=e$3,this.SettingsTabId=n,this.cdRef=E$2(OB),this.modal=E$2(F$6),this.router=E$2(J$7),this.navService=E$2(X$3),this.accountService=E$2(yc$1),this.profileLink=it$3(()=>[`/profile`,this.accountService.currentUser()?.id??``])}close(){this.modal.close()}closeIfOnSettings(){setTimeout(()=>{this.router.url.startsWith(`/settings`)&&this.close()},10)}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-nav-link-modal`]],decls:1,vars:1,consts:[[4,`transloco`,`translocoPrefix`],[1,`modal-header`],[`id`,`modal-basic-title`,1,`modal-title`],[`type`,`button`,1,`btn-close`,3,`click`],[1,`modal-body`],[1,`mb-3`],[3,`routerLink`,`fragment`],[`routerLink`,`/settings`,3,`click`,`fragment`,`title`],[1,`modal-footer`],[`type`,`button`,1,`btn`,`btn-primary`,3,`click`],[`rel`,`noopener noreferrer`,`target`,`_blank`,3,`href`],[`href`,`javascript:void(0);`],[`href`,`javascript:void(0);`,3,`click`]],template:function(i,n){i&1&&Dm$1(0,Sl,17,9,`ng-container`,0),i&2&&Vm$1(`translocoPrefix`,`nav-header`)},dependencies:[Vt$2,li$1,Ct$3],encapsulation:2})}}return t})();var yl=[`search`];var wl=()=>
57({background:`none`,"max-height":`24px`,height:`24px`,width:`24px`,"border-radius":`50%`});function Tl(t,l){if(t&1){let e=AC();bs$1(0,`a`,23),fy(`click`,function(n){_f(e);return Mf(i_$1(3).toggleSideNav(n))}),Hm$1(1,`i`,24),Mu()}}function kl(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).clickLibraryResult(n))}),bs$1(1,`div`,29)(2,`span`),j_$1(3),Mu()()()}if(t&2){let e=l.$implicit;xb(3),Ly(e.name)}}function El(t,l){if(t&1&&j_$1(0),t&2){let e=i_$1().$implicit;Ou(` `,e.localizedName,` `)}}function Dl(t,l){if(t&1&&j_$1(0),t&2){let e=i_$1().$implicit;Ou(` `,e.name,` `)}}function Ml(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).clickSeriesSearchResult(n))}),bs$1(1,`div`,30),Hm$1(2,`app-image`,31),Mu(),bs$1(3,`div`,29),Hm$1(4,`app-series-format`,32),bs$1(5,`span`,29),DC(6,El,1,1)(7,Dl,1,1),Mu(),bs$1(8,`div`,33),j_$1(9),Mu()()()}if(t&2){let e=l.$implicit,i=i_$1(4);xb(2),Vm$1(`imageUrl`,i.imageService.getSeriesCoverImage(e.seriesId)),xb(2),Vm$1(`format`,e.format);let n=i.searchTerm.toLowerCase().trim();xb(2),bC(e.localizedName.toLowerCase().trim().indexOf(n)>=0?6:7),xb(3),Ou(`in `,e.libraryName)}}function Il(t,l){if(t&1&&Hm$1(0,`quill-view`,34),t&2){let e=i_$1().$implicit;Vm$1(`content`,e.context)}}function Nl(t,l){if(t&1&&(bs$1(0,`span`),j_$1(1),Mu()),t&2){let e=i_$1().$implicit;xb(),Ly(e.chapterTitle)}}function Ol(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).clickAnnotationSearchResult(n))}),bs$1(1,`div`,29),DC(2,Il,1,1,`quill-view`,34)(3,Nl,2,1,`span`),Mu()()}if(t&2){let e=l.$implicit,i=i_$1(4).searchTerm.toLowerCase().trim();xb(2),bC(e.comment.toLowerCase().trim().indexOf(i)>=0?2:3)}}function Pl(t,l){if(t&1&&(bs$1(0,`span`),j_$1(1),Mu()),t&2){let e=i_$1(2).$implicit;xb(),Ly(e.seriesName)}}function Vl(t,l){if(t&1&&Hm$1(0,`span`,35),t&2){let e=i_$1(2).$implicit;Vm$1(`innerHTML`,e.localizedSeriesName,$h)}}function Fl(t,l){if(t&1&&DC(0,Pl,2,1,`span`)(1,Vl,1,1,`span`,35),t&2){let e=i_$1().$implicit;bC(e.seriesName.toLowerCase().trim().indexOf(l)>=0?0:1)}}function Rl(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).clickBookmarkSearchResult(n))}),bs$1(1,`div`,30),Hm$1(2,`app-image`,31),Mu(),bs$1(3,`div`,29),Hm$1(4,`app-series-format`,32),DC(5,Fl,2,1),Mu()()}if(t&2){let e,i=l.$implicit,n=i_$1(4);xb(2),Vm$1(`imageUrl`,n.imageService.getSeriesCoverImage(i.seriesId)),xb(2),Vm$1(`format`,i.format),xb(),bC((e=n.searchTerm.toLowerCase().trim())?5:-1,e)}}function Ll(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).clickCollectionSearchResult(n))}),bs$1(1,`div`,30),Hm$1(2,`app-image`,31),Mu(),bs$1(3,`div`,29)(4,`div`)(5,`span`),j_$1(6),Mu(),Hm$1(7,`app-promoted-icon`,36),Mu(),Hm$1(8,`app-collection-owner`,37),Mu()()}if(t&2){let e=l.$implicit,i=i_$1(4);xb(2),Vm$1(`imageUrl`,i.imageService.getCollectionCoverImage(e.id)),xb(4),Ly(e.title),xb(),Vm$1(`promoted`,e.promoted),xb(),Vm$1(`collection`,e)}}function $l(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).clickReadingListSearchResult(n))}),bs$1(1,`div`,29)(2,`span`),j_$1(3),Mu(),Hm$1(4,`app-promoted-icon`,36),Mu()()}if(t&2){let e=l.$implicit;xb(3),Ly(e.title),xb(),Vm$1(`promoted`,e.promoted)}}function Al(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit,d=i_$1(4);return Mf(d.goToOther(d.FilterField.Tags,n.id))}),bs$1(1,`div`,29)(2,`span`),j_$1(3),Mu()()()}if(t&2){let e=l.$implicit;xb(3),Ly(e.title)}}function Bl(t,l){if(t&1&&(bs$1(0,`span`,39),j_$1(1),Mu()),t&2){let e=i_$1(4).$implicit;xb(),Ou(` `,e(`person-aka-status`),` `)}}function Hl(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).goToPerson(n))}),bs$1(1,`div`,30),Hm$1(2,`app-image`,38),Mu(),bs$1(3,`div`,29)(4,`div`),j_$1(5),Mu(),DC(6,Bl,2,1,`span`,39),Mu()()}if(t&2){let e=l.$implicit,i=i_$1(4);xb(2),Vm$1(`styles`,K_$1(5,wl))(`imageUrl`,i.imageService.getPersonImage(e.id))(`errorImage`,i.imageService.n
57oPersonImage),xb(3),Ou(` `,e.name,` `),xb(),bC(e.aliases.length>0?6:-1)}}function Ul(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit,d=i_$1(4);return Mf(d.goToOther(d.FilterField.Genres,n.id))}),bs$1(1,`div`,29),Hm$1(2,`div`,35),Mu()()}if(t&2){let e=l.$implicit;xb(2),Vm$1(`innerHTML`,e.title,$h)}}function Ql(t,l){if(t&1&&Hm$1(0,`app-series-format`,32),t&2){let e=i_$1().$implicit;Vm$1(`format`,e.files?.[0].format)}}function Gl(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).clickChapterSearchResult(n))}),bs$1(1,`div`,29),DC(2,Ql,1,1,`app-series-format`,32),bs$1(3,`span`),j_$1(4),Mu()()()}if(t&2){let e=l.$implicit;xb(2),bC(e.files.length>0?2:-1),xb(2),Ly(e.titleName||e.range)}}function zl(t,l){if(t&1){let e=AC();bs$1(0,`div`,28),fy(`click`,function(){let n=_f(e).$implicit;return Mf(i_$1(4).clickFileSearchResult(n))}),bs$1(1,`div`,29),Hm$1(2,`app-series-format`,32),bs$1(3,`span`),j_$1(4),Mu()()()}if(t&2){let e=l.$implicit;xb(2),Vm$1(`format`,e.format),xb(2),Ly(e.filePath)}}function Wl(t,l){if(t&1&&j_$1(0),t&2){let e=i_$1(3).$implicit;Ou(` `,e(`no-data`),` `)}}function ql(t,l){if(t&1){let e=AC();bs$1(0,`div`,22)(1,`label`,25),j_$1(2),Mu(),bs$1(3,`div`,26)(4,`app-grouped-typeahead`,27,0),fy(`inputChanged`,function(n){_f(e);return Mf(i_$1(3).onChangeSearch(n))})(`clearField`,function(){_f(e);return Mf(i_$1(3).clearSearch())}),Dm$1(6,kl,4,1,`ng-template`,null,1,lM)(8,Ml,10,4,`ng-template`,null,2,lM)(10,Ol,4,1,`ng-template`,null,3,lM)(12,Rl,6,3,`ng-template`,null,4,lM)(14,Ll,9,4,`ng-template`,null,5,lM)(16,$l,5,2,`ng-template`,null,6,lM)(18,Al,4,1,`ng-template`,null,7,lM)(20,Hl,7,6,`ng-template`,null,8,lM)(22,Ul,3,1,`ng-template`,null,9,lM)(24,Gl,5,2,`ng-template`,null,10,lM)(26,zl,5,2,`ng-template`,null,11,lM)(28,Wl,1,1,`ng-template`,null,12,lM),Mu()()()}if(t&2){let e=i_$1(2).$implicit,i=i_$1();xb(2),Ly(e(`search-series-alt`)),xb(2),Vm$1(`minQueryLength`,2)(`isLoading`,i.isLoading())(`placeholder`,e(`search-alt`))(`groupedData`,i.searchResults)}}function jl(t,l){if(t&1&&(bs$1(0,`div`,40),Hm$1(1,`app-nav-events-toggle`,42),Mu()),t&2){i_$1(2);let e=$_$1(0);xb(),Vm$1(`user`,e)}}function Kl(t,l){if(t&1){let e=AC();bs$1(0,`button`,43),fy(`click`,function(){_f(e);return Mf(i_$1(4).openLinkSelectionMenu())}),Hm$1(1,`app-profile-icon`,44),Mu()}if(t&2){i_$1(2);let e=$_$1(0);xb(),Vm$1(`userId`,e.id)(`size`,20)}}function Zl(t,l){if(t&1&&(bs$1(0,`a`,54),j_$1(1),Mu()),t&2){let e=i_$1().$implicit,i=i_$1(4).$implicit;Vm$1(`routerLink`,e.routerLink)(`fragment`,e.fragment),xb(),Ly(i(e.transLocoKey))}}function Yl(t,l){if(t&1&&(bs$1(0,`a`,55),j_$1(1),Mu()),t&2){let e=i_$1().$implicit,i=i_$1(4).$implicit;Vm$1(`href`,e.href,qh),xb(),Ly(i(e.transLocoKey))}}function Xl(t,l){if(t&1){let e=AC();bs$1(0,`a`,57),fy(`click`,function(){_f(e);let n=i_$1().$implicit;return Mf(n.click())}),j_$1(1),Mu()}if(t&2){let e=i_$1().$implicit,i=i_$1(4).$implicit;xb(),Ly(i(e.transLocoKey))}}function Jl(t,l){if(t&1&&DC(0,Zl,2,3,`a`,54)(1,Yl,2,2,`a`,55)(2,Xl,2,1,`a`,56),t&2){let e=l.$implicit;bC(e.routerLink?0:e.href?1:e.click?2:-1)}}function ec(t,l){if(t&1&&(bs$1(0,`div`,45)(1,`a`,46),Hm$1(2,`i`,47),bs$1(3,`span`,48),j_$1(4),Mu()()(),bs$1(5,`div`,49)(6,`button`,50)(7,`span`,51),Hm$1(8,`app-profile-icon`,44),Mu(),bs$1(9,`span`,52),j_$1(10),rM(11,`sentenceCase`),Mu()(),bs$1(12,`div`,53)(13,`a`,54),j_$1(14),Mu(),CC(15,Jl,3,1,null,null,wC),Mu()()),t&2){i_$1(2);let e=$_$1(0),i=i_$1().$implicit,n=i_$1();xb(),Vm$1(`fragment`,n.SettingsTabId.Preferences)(`title`,i(`settings`)),xb(3),Ly(i(`settings`)),xb(4),Vm$1(`userId`,e.id)(`size`,20),xb(2),Ly(iM(11,9,e.username)),xb(3),Vm$1(`routerLink`,n.profileLink())(`fragment`,`stats-tab`),xb(),Ly(i(`my-profile`)),xb(),_C(n.navService.navItems)}}function tc(t,l){if(t&1&&(Hm$1(0,`app-download-queue-widget`),DC(1,jl,2,1,`div`,40),DC(2,Kl,2,2,`button`,41)(3,ec,17,11)),t&2){let e=i_$1(3);xb(),bC(e.accountService.hasAdminRole()?1:-1),xb(),bC(e.breakpointService.isMobileOrBelow()?2:3)}}function ic(t,l){if(t&1){let e=AC();By(0),bs$1(1,`nav`,14)(2,`div`,15)(3,`a`,16),fy(`click`,function(){_f(e);return Mf(i_$1(2).moveFocus())}),j_$1(4),Mu(),DC(5,Tl,2,0,`a`,17),bs$1(6,`a`,18),Hm$1(7,`app-image`,19),bs$1(8,`div`,20)(9,`span`),j_$1(10,`Kavita`),Mu()()(),bs$1(11,`ul`,21),DC(12,ql,30,5,`div`,22),Mu(),DC(13,tc,4,2),Mu()()}if(t&2){let e=i_$1().$implicit,i=i_$1(),n=B_$1(i.currentUser());xb(4),Ly(e(`skip-alt`)),xb(),bC(i.navService.sideNavVisibilitySignal()?5:-1),xb(7),bC(n?12:-1),xb(),bC(n?13:-1)}}function nc(t,l){if(t&1&&(xu(0),DC(1,ic,14,5,`nav`,14),Gs$1()),t&2){let e=i_$1();xb(),bC(e.navService.navbarVisibleSignal()?1:-1)}}var wo=(()=>{class t{constructor(){this.router=E$2(J$7),this.searchService=E$2(pi$1),this.filterUtilityService=E$2(De$2),this.accountService=E$2(yc$1),this.cdRef=E$2(OB),this.destroyRef=E$2(te$5),this.navService=E$2(X$3),this.imageService=E$2(we$3),this.breakpointService=E$2(W$1),this.modalService=E$2(st$4),this.metadataService=E$2(Fe$3),this.annotationService=E$2(O$2),this.document=E$2(Xr$2),this.searchViewRef=_B.required(`search`),this.profileLink=it$3(()=>[`/profile`,this.accountService.currentUser()?.id??``]),this.currentUser=it$3(()=>this.accountService.currentUser()),this.isLoading=be$3(!1),this.debounceTime=300,this.searchResults=new kt$2,this.searchTerm=``,this.FilterField=n$2,this.WikiLink=e$3,this.ScrobbleProvider=i$2,this.SettingsTabId=n}moveFocus(){this.document.getElementById(`content`)?.focus()}onChangeSearch(e){this.isLoading.set(!0),this.searchTerm=e.value.trim(),this.cdRef.markForCheck(),this.searchService.search(this.searchTerm,e.includeFiles).pipe(JB(this.destroyRef)).subscribe(i=>{this.searchResults=i,this.isLoading.set(!1),this.cdRef.markForCheck()},()=>{this.searchResults.reset(),this.isLoading.set(!1),this.searchTerm=``,this.cdRef.markForCheck()})}goTo(e){let i={},n=this.metadataService.createDefaultFilterDto(`series`);n.statements=[e],i.page=1,this.clearSearch(),this.filterUtilityService.applyFilterWithParams([`all-series`],n,i).subscribe()}goToOther(e,i){this.goTo({field:e,comparison:I$3.Equal,value:i+``})}goToPerson(e){this.clearSearch(),this.router.navigate([`person`,e.name])}clearSearch(){this.searchViewRef().clear(),this.searchTerm=``,this.searchResults=new kt$2,this.cdRef.markForCheck()}clickSeriesSearchResult(e){this.clearSearch();let i=e.libraryId,n=e.seriesId;this.router.navigate([`library`,i,`series`,n])}clickAnnotationSearchResult(e){this.clearSearch(),this.annotationService.navigateToAnnotation(e)}clickBookmarkSearchResult(e){this.clearSearch();let i=e.libraryId,n=e.seriesId;this.router.navigate([`library`,i,`series`,n,`manga`,e.chapterId],{queryParams:{incognitoMode:!1,bookmarkMode:!0}})}clickFileSearchResult(e){this.clearSearch(),this.searchService.getSeriesForMangaFile(e.id).subscribe(i=>
57{i!=null&&this.router.navigate([`library`,i.libraryId,`series`,i.id])})}clickChapterSearchResult(e){this.clearSearch(),this.searchService.getSeriesForChapter(e.id).subscribe(i=>{i!=null&&this.router.navigate([`library`,i.libraryId,`series`,i.id])})}clickLibraryResult(e){this.clearSearch(),this.router.navigate([`library`,e.id])}clickCollectionSearchResult(e){this.clearSearch(),this.router.navigate([`collections`,e.id])}clickReadingListSearchResult(e){this.clearSearch(),this.router.navigate([`lists`,e.id])}toggleSideNav(e){console.log(`nav-header: toggling side nav`),e.stopPropagation(),this.navService.toggleSideNav()}openLinkSelectionMenu(){this.modalService.open(yo,{fullscreen:`sm`})}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-nav-header`]],viewQuery:function(i,n){i&1&&vy(n.searchViewRef,yl,5),i&2&&f_$1()},decls:1,vars:1,consts:[[`search`,``],[`libraryTemplate`,``],[`seriesTemplate`,``],[`annotationTemplate`,``],[`bookmarkTemplate`,``],[`collectionTemplate`,``],[`readingListTemplate`,``],[`tagTemplate`,``],[`personTemplate`,``],[`genreTemplate`,``],[`chapterTemplate`,``],[`fileTemplate`,``],[`noResultsTemplate`,``],[4,`transloco`,`translocoPrefix`],[1,`navbar`,`navbar-expand-md`,`navbar-dark`,`fixed-top`],[1,`container-fluid`],[`href`,`javascript:void(0);`,1,`visually-hidden-focusable`,`focus-visible`,3,`click`],[1,`side-nav-toggle`],[`routerLink`,`/home`,`routerLinkActive`,`active`,1,`navbar-brand`,`dark-exempt`],[`width`,`24px`,`height`,`24px`,`imageUrl`,`assets/images/logo-32.png`,`classes`,`logo-icon`],[1,`d-none`,`d-md-inline`,`logo`],[1,`navbar-nav`,`col`,`me-auto`],[1,`nav-item`,`search`],[1,`side-nav-toggle`,3,`click`],[`aria-hidden`,`true`,1,`fas`,`fa-bars`],[`for`,`nav-search`,1,`form-label`,`visually-hidden`],[1,`ng-autocomplete`],[`id`,`nav-search`,`initialValue`,``,3,`inputChanged`,`clearField`,`minQueryLength`,`isLoading`,`placeholder`,`groupedData`],[1,`clickable`,2,`display`,`flex`,`padding`,`0.3125rem`,3,`click`],[1,`ms-1`],[1,`me-1`,2,`width`,`1.5rem`],[`width`,`24px`,1,`me-3`,`search-result`,3,`imageUrl`],[3,`format`],[1,`text-light`,`fst-italic`,2,`font-size`,`0.8rem`],[3,`content`],[3,`innerHTML`],[3,`promoted`],[3,`collection`],[`width`,`24px`,1,`me-3`,`search-result`,3,`styles`,`imageUrl`,`errorImage`],[1,`small-text`],[1,`nav-item`],[1,`btn`,`btn-outline-secondary`,`primary-text`],[3,`user`],[1,`btn`,`btn-outline-secondary`,`primary-text`,3,`click`],[3,`userId`,`size`],[1,`nav-item`,`not-xs-only`],[`routerLink`,`/settings`,1,`dark-exempt`,`btn`,`btn-icon`,3,`fragment`,`title`],[`aria-hidden`,`true`,1,`fa`,`fa-cogs`,`nav`],[1,`visually-hidden`],[`ngbDropdown`,``,`display`,`dynamic`,`placement`,`bottom-right`,1,`nav-item`,`dropdown`,`d-sm-none`,`d-md-block`],[`ngbDropdownToggle`,``,1,`btn`,`btn-outline-secondary`,`primary-text`],[1,`phone-hidden`,`d-xs-inline-block`,`d-sm-inline-block`,`me-2`],[1,`d-none`,`d-xs-none`,`d-sm-none`,`d-md-inline-block`,`fw-bold`],[`ngbDropdownMenu`,``],[`ngbDropdownItem`,``,3,`routerLink`,`fragment`],[`ngbDropdownItem`,``,`rel`,`noopener noreferrer`,`target`,`_blank`,3,`href`],[`ngbDropdownItem`,``],[`ngbDropdownItem`,``,3,`click`]],template:function(i,n){i&1&&Dm$1(0,nc,2,1,`ng-container`,13),i&2&&Vm$1(`translocoPrefix`,`nav-header`)},dependencies:[Vt$2,Ys$1,So,yt$2,go$1,bo,L,se$3,q$1,U$4,Ct$3,V$4,E,Qe$4,K$2,ho,s$4],styles:[`.btn[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .1rem var(--%NS%navbar-btn-hover-outline-color)}.navbar[_ngcontent-%COMP%]{background-color:var(--%NS%navbar-bg-color)}.navbar[_ngcontent-%COMP%]   .navbar-nav[_ngcontent-%COMP%]   .nav-item.search[_ngcontent-%COMP%]{width:100%}.navbar[_ngcontent-%COMP%]   .side-nav-toggle[_ngcontent-%COMP%]{cursor:pointer;margin-left:.8125rem;font-size:1.2rem}.navbar[_ngcontent-%COMP%]   .side-nav-toggle[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:var(--%NS%navbar-fa-icon-color);opacity:.8}.navbar[_ngcontent-%COMP%]   .side-nav-toggle[_ngcontent-%COMP%]:hover   i[_ngcontent-%COMP%]{opacity:1}.navbar[_ngcontent-%COMP%]   .nav-item[_ngcontent-%COMP%]:not(.search){display:unset;opacity:.8}.navbar[_ngcontent-%COMP%]   .nav-item[_ngcontent-%COMP%]:not(.search):hover{opacity:1}.xs-only[_ngcontent-%COMP%]{display:none}.not-xs-only[_ngcontent-%COMP%]{display:inherit}@media only screen and (max-width:300px){.xs-only[_ngcontent-%COMP%]{display:inherit}.not-xs-only[_ngcontent-%COMP%]{display:none}}.nav-item.dropdown[_ngcontent-%COMP%]{position:unset}.navbar-brand[_ngcontent-%COMP%]{font-family:var(--%NS%brand-font-family);font-weight:700;margin:0 2rem;display:flex;align-items:center}.navbar-brand[_ngcontent-%COMP%]:hover{text-decoration:none}.navbar-brand[_ngcontent-%COMP%]   .logo-icon[_ngcontent-%COMP%]{align-items:center;align-self:center;display:flex;flex-direction:column;height:1.5rem;width:1.5rem;margin-right:.5rem}.navbar-brand[_ngcontent-%COMP%]   .logo[_ngcontent-%COMP%]{vertical-align:text-top;max-height:1.75rem;line-height:2.0625rem;margin-left:.3125rem}.navbar-brand[_ngcontent-%COMP%]   .phone-hidden[_ngcontent-%COMP%]{vertical-align:middle}.focus-visible[_ngcontent-%COMP%]:focus{visibility:visible;color:var(--%NS%nav-header-text-color)}.ng-autocomplete[_ngcontent-%COMP%]{margin-bottom:0}.primary-text[_ngcontent-%COMP%]{color:var(--%NS%nav-header-text-color);border:none}.search-result[_ngcontent-%COMP%]{width:1.5rem;margin-top:.3125rem}.scroll-to-top[_ngcontent-%COMP%]:hover{animation:MoveUpDown 1s linear infinite}.text-light[_ngcontent-%COMP%]{color:var(--%NS%search-result-text-lite-color)!important}@media only screen and (max-width:650px){.navbar-nav[_ngcontent-%COMP%]{width:0}.navbar-brand[_ngcontent-%COMP%]{margin:0 1rem}.navbar-brand[_ngcontent-%COMP%]   .logo-icon[_ngcontent-%COMP%]{margin:unset}}.small-text[_ngcontent-%COMP%]{font-size:.8rem}[_nghost-%COMP%]     .dropdown-toggle:hover, [_nghost-%COMP%]     .dropdown-toggle:active, [_nghost-%COMP%]     .show{background-color:transparent;border-bottom-color:transparent;box-shadow:none}
58/*# sourceMappingURL=nav-header.component-OQVZEBHB.css.map */`]})}}return t})();var oc=(t,l)=>({closed:t,"content-wrapper":l});var ac=t=>({"g-0":t});var rc=(t,l)=>({"companion-bar-content":t,"companion-bar-collapsed":l});function lc(t,l){t&1&&(bs$1(0,`div`,0)(1,`div`,3),Hm$1(2,`canvas`,4),Mu()())}function cc(t,l){t&1&&Hm$1(0,`app-preference-nav`)}function sc(t,l){t&1&&Hm$1(0,`app-side-nav`)}function dc(t,l){if(t&1&&DC(0,cc,1,0,`app-preference-nav`)(1,sc,1,0,`app-side-nav`),t&2){i_$1();bC($_$1(5)?0:1)}}function mc(t,l){if(t&1&&(bs$1(0,`div`)(1,`div`,5),Hm$1(2,`router-outlet`),Mu()()),t&2){i_$1();let e=$_$1(4),i=$_$1(5);xb(),Vm$1(`ngClass`,X_$1(1,rc,!e||i,e&&i))}}function pc(t,l){t&1&&Hm$1(0,`router-outlet`)}var To=(()=>{class t{constructor(){this.destroyRef=E$2(te$5),this.offcanvas=E$2(be$2),this.navService=E$2(X$3),this.utilityService=E$2(w$5),this.serverService=E$2(k$2),this.accountService=E$2(yc$1),this.libraryService=E$2(S$5),this.ngbModal=E$2(ue$7),this.router=E$2(J$7),this.themeService=E$2(X$6),this.document=E$2(Xr$2),this.translocoService=E$2(De$3),this.versionService=E$2(Ye),this.breakpointService=E$2(W$1),this.licenseService=E$2(vi$1),this.localizationService=E$2(yi),this.ngbCanvasConfig=E$2(Y$2),this.keyBindService=E$2(W$3),this.transitionState=it$3(()=>this.accountService.userPreferences()?.noTransitions??!1);let e=window.matchMedia(`(prefers-reduced-motion: reduce)`);eo$1(()=>{this.applyAnimationState(this.transitionState(),e.matches)}),e.addEventListener(`change`,()=>{this.applyAnimationState(this.transitionState(),e.matches)}),this.router.events.pipe(We$5(i=>i instanceof ae$4),JB(this.destroyRef)).subscribe(i=>D$5(this,null,function*(){if(!(!this.ngbModal.hasOpenModals()&&!this.offcanvas.hasOpenOffcanvas())&&(this.ngbModal.hasOpenModals()&&this.ngbModal.dismissAll(),this.offcanvas.hasOpenOffcanvas()&&this.offcanvas.dismiss(),i.navigationTrigger===`popstate`)){let n=this.router.routerState;yield this.router.navigateByUrl(n.snapshot.url,{skipLocationChange:!0})}})),this.localizationService.getLocales().subscribe(),this.keyBindService.registerListener(this.destroyRef,i=>this.router.navigateByUrl(`/`).catch(console.error),[r$2.NavigateHome])}setDocHeight(){let e=window.innerHeight*.01;this.document.documentElement.style.setProperty(`--vh`,`${e}px`)}ngOnInit(){this.setDocHeight(),this.setCurrentUser(),this.themeService.setColorScape(``)}applyAnimationState(e,i){let n=e||i;this.ngbCanvasConfig.animation=!n,n?document.documentElement.classList.add(`animate-disabled`):document.documentElement.classList.remove(`animate-disabled`)}setCurrentUser(){this.accountService.currentUser()&&(this.accountService.hasAdminRole()&&this.licenseService.getLicenseInfo().subscribe(),this.themeService.getThemes().subscribe(),this.libraryService.getLibraryNames().pipe(lt$3(1),Td$1({refCount:!0,bufferSize:1})).subscribe())}static{this.ɵfac=function(i){return new(i||t)}}static{this.ɵcmp=yT({type:t,selectors:[[`app-root`]],hostBindings:function(i,n){i&1&&fy(`resize`,function(){return n.setDocHeight()},PD)(`orientationchange`,function(){return n.setDocHeight()},PD)},decls:13,vars:22,consts:[[1,`fullpage-background`],[3,`ngClass`],[`id`,`content`],[1,`background-area`],[`id`,`backgroundCanvas`,1,`default-background`,2,`width`,`100%`,`height`,`calc(var('--vh') * 100)`],[1,`companion-bar`,3,`ngClass`]],template:function(i,n){if(i&1&&(bs$1(0,`div`),DC(1,lc,3,0,`div`,0),rM(2,`async`),Hm$1(3,`app-nav-header`),By(4)(5),rM(6,`async`),bs$1(
587,`div`,1),DC(8,dc,2,1),bs$1(9,`div`,1),Hm$1(10,`a`,2),DC(11,mc,3,4,`div`)(12,pc,1,0,`router-outlet`),Mu()()()),i&2){Ty(`no-animations`,n.transitionState())(`no-transitions`,n.transitionState())(`animate-disabled`,n.transitionState());let d=n.accountService.currentUser();xb(),bC(d&&iM(2,11,n.navService.navbarVisible$)===!0?1:-1);let y=n.navService.sideNavVisibilitySignal();xb(3);let B=B_$1(n.navService.sideNavCollapsedSignal());xb(),B_$1(iM(6,14,n.navService.usePreferenceSideNav$)),xb(2),Vm$1(`ngClass`,X_$1(17,oc,B,y)),xb(),bC(y?8:-1),xb(),Vm$1(`ngClass`,J_$1(20,ac,!y)),xb(2),bC(y?11:12)}},dependencies:[sn,_o,Dr$2,wo,Zi,fn],styles:[`.content-wrapper[_ngcontent-%COMP%]{padding:0 0 0 .625rem;height:calc(var(--%NS%vh) * 100 - var(--%NS%nav-offset))}.companion-bar[_ngcontent-%COMP%]{transition:all var(--%NS%side-nav-companion-bar-transistion);margin-left:2.8125rem;overflow-y:hidden;overflow-x:hidden;height:calc(var(--%NS%vh) * 100 - var(--%NS%nav-mobile-offset));scrollbar-gutter:stable;scrollbar-width:thin;mask-image:linear-gradient(to bottom,transparent,black 0%,black 95%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent,black 0%,black 95%,transparent 100%)}@supports (-moz-appearance: none){.companion-bar[_ngcontent-%COMP%]{scrollbar-color:transparent transparent;scrollbar-width:thin}}.companion-bar[_ngcontent-%COMP%]::-webkit-scrollbar{background-color:transparent;width:inherit;display:none;visibility:hidden;background:transparent}.companion-bar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:transparent}.companion-bar[_ngcontent-%COMP%]:hover{scrollbar-width:thin;overflow-y:auto}@supports (-moz-appearance: none){.companion-bar[_ngcontent-%COMP%]:hover{scrollbar-color:rgba(255,255,255,.3) rgba(0,0,0,0)}}.companion-bar[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{visibility:visible;background-color:#ffffff4d}.companion-bar-collapsed[_ngcontent-%COMP%]{margin-left:0!important}.companion-bar-content[_ngcontent-%COMP%]{margin-left:var(--%NS%side-nav-width)}@media(max-width:992px){  html{height:100dvh!important}.container-fluid[_ngcontent-%COMP%]{padding:0}.content-wrapper[_ngcontent-%COMP%]{overflow:hidden;height:calc(var(--%NS%vh) * 100);padding:0}.content-wrapper.closed[_ngcontent-%COMP%]{overflow:auto;height:calc(var(--%NS%vh) * 100)}.companion-bar[_ngcontent-%COMP%]{margin-left:0;padding-left:0;width:100%;height:calc(var(--%NS%vh) * 100 - var(--%NS%nav-mobile-offset));scrollbar-color:rgba(255,255,255,.3) rgba(0,0,0,.1);scrollbar-width:thin;margin-bottom:1.25rem;overflow-y:auto}.companion-bar-content[_ngcontent-%COMP%]{margin-left:0}}.default-background[_ngcontent-%COMP%]{background:radial-gradient(circle farthest-side at 0% 100%,var(--%NS%colorscape-darker-color) 0%,var(--%NS%colorscape-darker-no-alpha-color) 100%),radial-gradient(circle farthest-side at 100% 100%,var(--%NS%colorscape-primary-color) 0%,var(--%NS%colorscape-primary-no-alpha-color) 100%),radial-gradient(circle farthest-side at 100% 0%,var(--%NS%colorscape-lighter-color) 0%,var(--%NS%colorscape-lighter-no-alpha-color) 100%),radial-gradient(circle farthest-side at 0% 0%,var(--%NS%colorscape-complementary-color) 0%,var(--%NS%colorscape-complementary-no-alpha-color) 100%),var(--%NS%bs-body-bg)}.fullpage-background[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:-1;pointer-events:none;background-color:var(--%NS%bs-body-bg);filter:blur(1.25rem);object-fit:contain;transform:scale(1.1);mix-blend-mode:color}.fullpage-background[_ngcontent-%COMP%]   .background-area[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:113vh}
59/*# sourceMappingURL=app.component-AF3AL7ZI.css.map */`]})}}return t})();!(`animate`in document.documentElement)&&document.documentElement.classList.add(`no-animations`,`animate-disabled`);function uc(t){let l=[];return t.forEach(e=>{if(l.push(e),e.includes(`-`)){let i=e.replace(`-`,`_`);l.push(i)}}),l}var vc={config:{reRenderOnLangChange:!0,availableLangs:uc([`af`,`af_ZA`,`ar`,`ar_AE`,`ar_BH`,`ar_DZ`,`ar_EG`,`ar_IQ`,`ar_JO`,`ar_KW`,`ar_LB`,`ar_LY`,`ar_MA`,`ar_OM`,`ar_QA`,`ar_SA`,`ar_SY`,`ar_TN`,`ar_YE`,`az`,`az_AZ`,`az_AZ`,`be`,`be_BY`,`bg`,`bg_BG`,`bs_BA`,`ca`,`ca_ES`,`cs`,`cs_CZ`,`cy`,`cy_GB`,`da`,`da_DK`,`de`,`de_AT`,`de_CH`,`de_DE`,`de_LI`,`de_LU`,`dv`,`dv_MV`,`el`,`el_GR`,`en`,`en_AU`,`en_B
59Z`,`en_CA`,`en_CB`,`en_GB`,`en_IE`,`en_JM`,`en_NZ`,`en_PH`,`en_TT`,`en_US`,`en_ZA`,`en_ZW`,`eo`,`es`,`es_AR`,`es_BO`,`es_CL`,`es_CO`,`es_CR`,`es_DO`,`es_EC`,`es_ES`,`es_ES`,`es_GT`,`es_HN`,`es_MX`,`es_NI`,`es_PA`,`es_PE`,`es_PR`,`es_PY`,`es_SV`,`es_UY`,`es_VE`,`et`,`et_EE`,`eu`,`eu_ES`,`fa`,`fa_IR`,`fi`,`fi_FI`,`fo`,`fo_FO`,`fr`,`fr_BE`,`fr_CA`,`fr_CH`,`fr_FR`,`fr_LU`,`fr_MC`,`gl`,`gl_ES`,`gu`,`gu_IN`,`he`,`he_IL`,`hi`,`hi_IN`,`hr`,`hr_BA`,`hr_HR`,`hu`,`hu_HU`,`hy`,`hy_AM`,`id`,`id_ID`,`is`,`is_IS`,`it`,`it_CH`,`it_IT`,`ja`,`ja_JP`,`ka`,`ka_GE`,`kk`,`kk_KZ`,`kn`,`kn_IN`,`ko`,`ko_KR`,`kok`,`kok_IN`,`ky`,`ky_KG`,`lt`,`lt_LT`,`lv`,`lv_LV`,`mi`,`mi_NZ`,`mk`,`mk_MK`,`mn`,`mn_MN`,`mr`,`mr_IN`,`ms`,`ms_BN`,`ms_MY`,`mt`,`mt_MT`,`nb`,`nb_NO`,`nl`,`nl_BE`,`nl_NL`,`nn_NO`,`ns`,`ns_ZA`,`pa`,`pa_IN`,`pl`,`pl_PL`,`ps`,`ps_AR`,`pt`,`pt_BR`,`pt_PT`,`qu`,`qu_BO`,`qu_EC`,`qu_PE`,`ro`,`ro_RO`,`ru`,`ru_RU`,`sa`,`sa_IN`,`se`,`se_FI`,`se_FI`,`se_FI`,`se_NO`,`se_NO`,`se_NO`,`se_SE`,`se_SE`,`se_SE`,`sk`,`sk_SK`,`sl`,`sl_SI`,`sq`,`sq_AL`,`sr_BA`,`sr_BA`,`sr_SP`,`sr_SP`,`sv`,`sv_FI`,`sv_SE`,`sw`,`sw_KE`,`syr`,`syr_SY`,`ta`,`ta_IN`,`te`,`te_IN`,`th`,`th_TH`,`tl`,`tl_PH`,`tn`,`tn_ZA`,`tr`,`tr_TR`,`tt`,`tt_RU`,`ts`,`uk`,`uk_UA`,`ur`,`ur_PK`,`uz`,`uz_UZ`,`uz_UZ`,`vi`,`vi_VN`,`xh`,`xh_ZA`,`zh`,`zh_CN`,`zh_HK`,`zh_MO`,`zh_SG`,`zh_TW`,`zu`,`zu_ZA`,`zh_Hans`,`zh_Hant`,`nb_NO`,`ga`]),prodMode:i$1.production,defaultLang:`en`,fallbackLang:`en`,missingHandler:{useFallbackTranslation:!0,allowEmpty:!1,logMissingKey:!0},failedRetries:2}};function fc(t){return t.getBaseHrefFromDOM()}function hc(t,l){let i=l.currentUser()?.preferences?.locale||localStorage.getItem(yc$1.localeKey)||`en`;return t.setActiveLang(i),t.load(i)}function Cc(){let t=E$2(yc$1),l=E$2(Ao$2),e=E$2(Tt$2),i=E$2(S$5),n=E$2(De$3),d=t.getUserFromLocalStorage();return d&&t.setCurrentUser(d,!1),kv(t.isOidcAuthenticated().pipe(Sd$1(y=>y?t.getAccount():t.refreshAccount()),ua$2(()=>la$2(null)),Sd$1(()=>hc(n,t)),Sd$1(()=>{let y=t.currentUser();return y?(l.createHubConnection(y),i.cacheLibraryInfo().pipe(xd$
591(()=>e.restoreQueue()))):la$2(null)})))}Ze$2(To,{providers:[hf(nt$2,$e$4,Xt$2.forRoot({positionClass:`toast-bottom-right`,preventDuplicates:!0,timeOut:6e3,countDuplicates:!0,autoDismiss:!0})),eo$2(eo,co$2(),oo$1(Js$1),ro$2({scrollPositionRestoration:`enabled`}),ao$2(po)),Rt$1(vc),z$2({defaultLocale:`en`}),lo({loader:so,storage:{useValue:localStorage},ttl:i$1.production?129600:0,storageKey:ve}),Zt$1,{provide:Pr$2,useClass:I$2},{provide:Ee$4,useFactory:Ne$5},{provide:tt$3,useFactory:fc,deps:[te$6]},mt$2(Tt$1([to,io,mo])),TT(()=>Cc()),RB(),{provide:lt$4,useFactory:()=>Object.assign(new lt$4,x$5)},{provide:Dt,useFactory:()=>Object.assign(new Dt,{max:5,resettable:!0})}]}).catch(t=>console.error(t));export{_e$1 as $,Qe$4 as $t,$$1 as A,jt$1 as At,t as B,m$2 as Bt,ko$1 as C,S$1 as Ct,ie as D,Ge$2 as Dt,xo$1 as E,pn as Et,f as F,be$2 as Ft,me$1 as G,v$1 as Gt,Ke$1 as H,De$2 as Ht,g as I,w$2 as It,ue$2 as J,yt$2 as Jt,ne as K,V$4 as Kt,O$1 as L,o$2 as Lt,T as M,G$5 as Mt,O as N,L$3 as Nt,p as O,Ue$2 as Ot,ii as P,h$2 as Pt,Je as Q,Ge$3 as Qt,a$1 as R,s$1 as Rt,hi as S,r$1 as St,wo$1 as T,K$2 as Tt,Ve as U,P$5 as Ut,D$1 as V,C$3 as Vt,ae as W,T$6 as Wt,u$1 as X,P$6 as Xt,ft$1 as Y,B$3 as Yt,O$2 as Z,I$2 as Zt,Qt as _,t$1 as _t,u as a,o as at,Wi as b,C as bt,$i as c,Ct$1 as ct,Fo$1 as d,q$1 as dt,y$3 as en,F$2 as et,Hi as f,se$3 as ft,Qi as g,W$1 as gt,Lo$1 as h,n as ht,c as i,We as it,p$1 as j,E as jt,x as k,We$3 as kt,Bi as l,L as lt,Ke as m,Te$4 as mt,le as n,_ as nt,Ye as o,et as ot,Io$1 as p,B$1 as pt,qe as q,we$3 as qt,a as r,y$1 as rt,re as s,q as st,ee$1 as t,me$4 as tn,b$3 as tt,D as u,U$4 as ut,So$1 as v,f$2 as vt,ui as w,J$4 as wt,go$1 as x,U$6 as xt,Ui as y,X$3 as yt,f$1 as z,s$2 as zt};
60//# debugId=978bedc7-7f03-5b6f-9b89-5b4dac33f418
61//# sourceMappingURL=main-7A7AJKIF.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.