PageSourceSearch

https://www.myfortiva.com/my-account/chunk-JOWPALQN.js

js myfortiva.com collected 2026-10-01 13:55:07 UTC 858,710 bytes, 355 lines download raw bytes

1import{a as Nv,e as Qs,f as Wm,g as Fv,h as Bv,i as zv,l as Yi,m as Xi,n as Js,p as Vv,r as jv,s as to,u as We,v as Ge,y as Hv,z as Dn}from"./chunk-QCJKNMAG.js";import{$ as Ec,$a as J0,$c as Lv,A as Ys,Aa as Ii,Ab as sv,Ac as Ev,B as Cu,Ba as V,Bb as jm,Bc as Sv,C as At,Ca as oe,Cb as Jo,Cc as Pv,D as j0,Da as we,Db as Re,E as Cc,Ea as qt,Eb as Hm,Ec as Tv,Fa as Z0,Fb as ov,Fc as Ba,Ga as de,Gb as Um,Gc as za,H as dt,Hb as rv,I as Ut,Ib as Ou,J as Wt,Jb as He,Jc as Iv,K as je,Ka as D,Kb as av,Kc as Va,L as F,La as R,Lb as Fa,Lc as Xs,Ma as Q,Mb as lv,Nb as Mn,O as Ra,Ob as cv,Oc as kv,P as En,Pa as jt,Pb as dv,Q as yt,Qa as Ru,Qb as hv,Qc as Ks,R as vt,Ra as ut,Rb as Nu,Rc as $i,S as H0,Sa as j,Sb as Fu,Sc as Mv,Ta as bi,Tb as uv,Tc as Vu,U as Eu,Ua as ae,V as Ti,Va as Q0,W as U0,Wc as ju,X as Vt,Xa as Tn,Xc as Dv,Y as Kt,Ya as De,Yb as pv,Za as Jt,Zb as fv,_ as ne,_a as te,_c as Rv,a as Wi,aa as W0,ab as tv,ad as ja,b as ka,ba as Vm,bb as Pc,c as Dt,ca as Su,cb as G,cc as mv,d as F0,da as G0,db as Ct,ea as Sn,eb as Et,f as Lm,fa as $0,fb as Gi,fc as gv,fd as Ha,g as Ma,ga as Pu,gb as ev,ha as Tu,hb as iv,hd as qs,i as Cn,j as B0,ja as Pn,ka as Y0,kc as _v,kd as Ov,l as z0,la as P,lb as La,lc as bv,ld as Ua,m as V0,ma as Iu,mb as Oa,mc as yv,md as Zs,na as ss,nb as Na,nc as vv,o as xe,oa as Sc,ob as nv,oc as Bu,od as Ue,p as $s,pa as ct,pb as os,pc as xv,q as ui,qa as ku,qc as wv,r as Om,ra as X0,s as Nm,sa as K0,sb as In,ta as kt,tc as Av,u as Da,ua as Gt,uc as Cv,v as wu,va as Me,w as Fm,wa as q0,wb as Z,x as Bm,xa as Mu,xb as nt,y as zm,ya as q,yb as kn,yc as zu,z as Au,za as Du,zb as Lu}from"./chunk-YHDM4NZS.js";import{a as Tc,b as Gm}from"./chunk-3J7GGTVR.js";import{a as Wa}from"./chunk-V7KNVW2Q.js";import{a as ft,b as Pi,g as O0,i as k,j as a,k as b,l as m,m as f,n as Ze,o as Ia,p as O,q as Dm,r as Rm,s as N0}from"./chunk-VYVKEP6M.js";var $m;try{$m=typeof Intl<"u"&&Intl.v8BreakIterator}catch{$m=!1}var Ae=(()=>{let t=class t{_platformId=F(G0);isBrowser=this._platformId?uv(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||$m)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();function Rn(r,t,e,i,n){let s=parseInt(jm.major),o=parseInt(jm.minor);return s>19||s===19&&o>0||s===0&&o===0?r.listen(t,e,i,n):(t.addEventListener(e,i,n),()=>{t.removeEventListener(e,i,n)})}var Ym;function Uv(){if(Ym==null){let r=typeof document<"u"?document.head:null;Ym=!!(r&&(r.createShadowRoot||r.attachShadow))}return Ym}function Xm(r){if(Uv()){let t=r.getRootNode?r.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function ki(r){return r.composedPath?r.composedPath()[0]:r.target}function Km(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var Hu=new WeakMap,Ln=(()=>{let t=class t{_appRef;_injector=F(Ti);_environmentInjector=F(Ra);load(i){let n=this._appRef=this._appRef||this._injector.get(Du),s=Hu.get(n);s||(s={loaders:new Set,refs:[]},Hu.set(n,s),n.onDestroy(()=>{var o;(o=Hu.get(n))==null||o.refs.forEach(l=>l.destroy()),Hu.delete(n)})),s.loaders.has(i)||(s.loaders.add(i),s.refs.push(Ou(i,{environmentInjector:this._environmentInjector})))}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();function Ce(r){return r==null?"":typeof r=="string"?r:`${r}px`}function Ga(r){return Array.isArray(r)?r:[r]}function Wv(r,t=0){return Gv(r)?Number(r):arguments.length===2?t:0}function Gv(r){return!isNaN(parseFloat(r))&&!isNaN(Number(r))}function On(r){return r instanceof ne?r.nativeElement:r}var FE=new Wt("cdk-dir-doc",{providedIn:"root",factory:BE});function BE(){return F(He)}var zE=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function $v(r){let t=(r==null?void 0:r.toLowerCase())||"";return t==="auto"&&typeof navigator<"u"&&(navigator!=null&&navigator.language)?zE.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var eo=(()=>{let t=class t{value="ltr";change=new Vt;
1constructor(){let i=F(FE,{optional:!0});if(i){let n=i.body?i.body.dir:null,s=i.documentElement?i.documentElement.dir:null;this.value=$v(n||s||"ltr")}}ngOnDestroy(){this.change.complete()}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();var tr;function Yv(){if(tr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return tr=!1,tr;if("scrollBehavior"in document.documentElement.style)tr=!0;else{let r=Element.prototype.scrollTo;r?tr=!/\{\s*\[native code\]\s*\}/.test(r.toString()):tr=!1}}return tr}var io=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({}));let r=t;return r})();var VE=20,qm=(()=>{let t=class t{_ngZone=F(Kt);_platform=F(Ae);_renderer=F(ss).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new Dt;_scrolledCount=0;scrollContainers=new Map;register(i){this.scrollContainers.has(i)||this.scrollContainers.set(i,i.elementScrolled().subscribe(()=>this._scrolled.next(i)))}deregister(i){let n=this.scrollContainers.get(i);n&&(n.unsubscribe(),this.scrollContainers.delete(i))}scrolled(i=VE){return this._platform.isBrowser?new ka(n=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let s=i>0?this._scrolled.pipe(Om(i)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{var o;s.unsubscribe(),this._scrolledCount--,this._scrolledCount||((o=this._cleanupGlobalListener)==null||o.call(this),this._cleanupGlobalListener=void 0)}}):Ma()}ngOnDestroy(){var i;(i=this._cleanupGlobalListener)==null||i.call(this),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,s)=>this.deregister(s)),this._scrolled.complete()}ancestorScrolled(i,n){let s=this.getAncestorScrollContainers(i);return this.scrolled(n).pipe(ui(o=>!o||s.indexOf(o)>-1))}getAncestorScrollContainers(i){let n=[];return this.scrollContainers.forEach((s,o)=>{this._scrollableContainsElement(o,i)&&n.push(o)}),n}_scrollableContainsElement(i,n){let s=On(n),o=i.getElementRef().nativeElement;do if(s==o)return!0;while(s=s.parentElement);return!1}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();var jE=20,$a=(()=>{let t=class t{_platform=F(Ae);_listeners;_viewportSize;_change=new Dt;_document=F(He,{optional:!0});constructor(){let i=F(Kt),n=F(ss).createRenderer(null,null);i.runOutsideAngular(()=>{if(this._platform.isBrowser){let s=o=>this._change.next(o);this._listeners=[n.listen("window","resize",s),n.listen("window","orientationchange",s)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){var i;(i=this._listeners)==null||i.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let i={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),i}getViewportRect(){let i=this.getViewportScrollPosition(),{width:n,height:s}=this.getViewportSize();return{top:i.top,left:i.left,bottom:i.top+s,right:i.left+n,height:s,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let i=this._document,n=this._getWindow(),s=i.documentElement,o=s.getBoundingClientRect(),l=-o.top||i.body.scrollTop||n.scrollY||s.scrollTop||0,c=-o.left||i.body.scrollLeft||n.scrollX||s.scrollLeft||0;return{top:l,left:c}}change(i=jE){return i>0?this._change.pipe(Om(i)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let i=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:i.innerWidth,height:i.innerHeight}:{width:0,height:0}}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();var Ic=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({}));let r=t;return r})(),Zm=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({imports:[io,Ic,io,Ic]}));let r=t;return r})();var kc=class{_attachedHost;attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;t!=null&&(this._attachedHost=null,t.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},Qm=class extends kc{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(t,e,i,n,s){super(),this.component=t,this.viewContainerRef
1=e,this.injector=i,this.projectableNodes=s}},Mc=class extends kc{templateRef;viewContainerRef;context;injector;constructor(t,e,i,n){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=n}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},Jm=class extends kc{element;constructor(t){super(),this.element=t instanceof ne?t.nativeElement:t}},tg=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof Qm)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof Mc)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof Jm)return this._attachedPortal=t,this.attachDomPortal(t)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var Uu=class extends tg{outletElement;_appRef;_defaultInjector;_document;constructor(t,e,i,n,s){super(),this.outletElement=t,this._appRef=i,this._defaultInjector=n,this._document=s}attachComponentPortal(t){let e;if(t.viewContainerRef){let i=t.injector||t.viewContainerRef.injector,n=i.get(K0,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:i,ngModuleRef:n,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let i=this._appRef,n=t.injector||this._defaultInjector||Ti.NULL,s=n.get(Ra,i.injector);e=Ou(t.component,{elementInjector:n,environmentInjector:s,projectableNodes:t.projectableNodes||void 0}),i.attachView(e.hostView),this.setDisposeFn(()=>{i.viewCount>0&&i.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(n=>this.outletElement.appendChild(n)),i.detectChanges(),this.setDisposeFn(()=>{let n=e.indexOf(i);n!==-1&&e.remove(n)}),this._attachedPortal=t,i}attachDomPortal=t=>{let e=t.element;e.parentNode;let i=this._document.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}};var Xv=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({}));let r=t;return r})();var eg={},Nn=(()=>{let t=class t{_appId=F(Su);getId(i){return this._appId!=="ng"&&(i+=this._appId),eg.hasOwnProperty(i)||(eg[i]=0),`${i}${eg[i]++}`}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();function Fn(r,...t){return t.length?t.some(e=>r[e]):r.altKey||r.shiftKey||r.ctrlKey||r.metaKey}var Kv=Yv(),Wu=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(t,e){this._viewportRuler=t,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Ce(-this._previousScrollPosition.left),t.style.top=Ce(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,e=this._document.body,i=t.style,n=e.style,s=i.scrollBehavior||"",o=n.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),Kv&&(i.scrollBehavior=n.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Kv&&(i.scrollBehavior=s,n.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}};var Gu=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(t,e,i,n){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler
1=i,this._config=n}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(ui(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},Dc=class{enable(){}disable(){}attach(){}};function ig(r,t){return t.some(e=>{let i=r.bottom<e.top,n=r.top>e.bottom,s=r.right<e.left,o=r.left>e.right;return i||n||s||o})}function qv(r,t){return t.some(e=>{let i=r.top<e.top,n=r.bottom>e.bottom,s=r.left<e.left,o=r.right>e.right;return i||n||s||o})}var $u=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=n}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(!this._scrollSubscription){let t=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(t).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:n}=this._viewportRuler.getViewportSize();ig(e,[{width:i,height:n,bottom:n,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},nx=(()=>{let t=class t{_scrollDispatcher=F(qm);_viewportRuler=F($a);_ngZone=F(Kt);_document=F(He);constructor(){}noop=()=>new Dc;close=i=>new Gu(this._scrollDispatcher,this._ngZone,this._viewportRuler,i);block=()=>new Wu(this._viewportRuler,this._document);reposition=i=>new $u(this._scrollDispatcher,this._viewportRuler,this._ngZone,i)};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})(),Rc=class{positionStrategy;scrollStrategy=new Dc;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(t){if(t){let e=Object.keys(t);for(let i of e)t[i]!==void 0&&(this[i]=t[i])}}};var Yu=class{connectionPair;scrollableViewProperties;constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}};var sx=(()=>{let t=class t{_attachedOverlays=[];_document=F(He);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(i){this.remove(i),this._attachedOverlays.push(i)}remove(i){let n=this._attachedOverlays.indexOf(i);n>-1&&this._attachedOverlays.splice(n,1),this._attachedOverlays.length===0&&this.detach()}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})(),ox=(()=>{let t=class t extends sx{_ngZone=F(Kt);_renderer=F(ss).createRenderer(null,null);_cleanupKeydown;add(i){super.add(i),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){var i;this._isAttached&&((i=this._cleanupKeydown)==null||i.call(this),this._isAttached=!1)}_keydownListener=i=>{let n=this._attachedOverlays;for(let s=n.length-1;s>-1;s--)if(n[s]._keydownEvents.observers.length>0){this._ngZone.run(()=>n[s]._keydownEvents.next(i));break}}};k(t,"\u0275fac",(()=>{let i;return function(s){return(i||(i=Eu(t)))(s||t)}})()),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})(),rx=(()=>{let t=class t extends sx{_platform=F(Ae);_ngZone=F(Kt);_renderer=F(ss).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(i){if(super.add(i),!this._isAttached){let n=this._document.body,s={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Rn(this._renderer,n,"pointerdown",this._pointerDownListener,s),Rn(this._renderer,n,"click",this._clickListener,s),Rn(this._renderer,n,"auxclick",this._clickListener,s),Rn(this._renderer,n,"contextmenu",this._clickListener,s)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,
1n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){var i;this._isAttached&&((i=this._cleanups)==null||i.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=i=>{this._pointerDownEventTarget=ki(i)};_clickListener=i=>{let n=ki(i),s=i.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:n;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let l=o.length-1;l>-1;l--){let c=o[l];if(c._outsidePointerEvents.observers.length<1||!c.hasAttached())continue;if(Zv(c.overlayElement,n)||Zv(c.overlayElement,s))break;let h=c._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(i)):h.next(i)}}};k(t,"\u0275fac",(()=>{let i;return function(s){return(i||(i=Eu(t)))(s||t)}})()),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();function Zv(r,t){let e=typeof ShadowRoot<"u"&&ShadowRoot,i=t;for(;i;){if(i===r)return!0;i=e&&i instanceof ShadowRoot?i.host:i.parentNode}return!1}var ax=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275cmp",kt({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,s){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
2`],encapsulation:2,changeDetection:0}));let r=t;return r})(),lx=(()=>{let t=class t{_platform=F(Ae);_containerElement;_document=F(He);_styleLoader=F(Ln);constructor(){}ngOnDestroy(){var i;(i=this._containerElement)==null||i.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let i="cdk-overlay-container";if(this._platform.isBrowser||Km()){let s=this._document.querySelectorAll(`.${i}[platform="server"], .${i}[platform="test"]`);for(let o=0;o<s.length;o++)s[o].remove()}let n=this._document.createElement("div");n.classList.add(i),Km()?n.setAttribute("platform","test"):this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}_loadStyles(){this._styleLoader.load(ax)}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})(),ng=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(t,e,i,n){this._renderer=e,this._ngZone=i,this.element=t.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",n)}detach(){this._ngZone.runOutsideAngular(()=>{var e;let t=this.element;clearTimeout(this._fallbackTimeout),(e=this._cleanupTransitionEnd)==null||e.call(this),this._cleanupTransitionEnd=this._renderer.listen(t,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),t.style.pointerEvents="none",t.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{var t,e;clearTimeout(this._fallbackTimeout),(t=this._cleanupClick)==null||t.call(this),(e=this._cleanupTransitionEnd)==null||e.call(this),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Xu=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new Dt;_attachments=new Dt;_detachments=new Dt;_positionStrategy;_scrollStrategy;_locationChanges=Wi.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new Dt;_outsidePointerEvents=new Dt;_renders=new Dt;_afterRenderRef;_afterNextRenderRef;constructor(t,e,i,n,s,o,l,c,h,d=!1,u,p){this._portalOutlet=t,this._host=e,this._pane=i,this._config=n,this._ngZone=s,this._keyboardDispatcher=o,this._document=l,this._location=c,this._outsideClickDispatcher=h,this._animationsDisabled=d,this._injector=u,this._renderer=p,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy,this._afterRenderRef=ov(()=>Pu(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){var t;return((t=this._backdropRef)==null?void 0:t.element)||null}get hostElement(){return this._host}attach(t){var i;!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),(i=this._afterNextRenderRef)==null||i.destroy(),this._afterNextRenderRef=Tu(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof(e==null?void 0:e.onDestroy)=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){var e,i,n;let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),(e=this._backdropRef)==null||e.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dis
2pose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),(i=this._host)==null||i.remove(),(n=this._afterNextRenderRef)==null||n.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,t&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=ft(ft({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Pi(ft({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?typeof t=="string"?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=Ce(this._config.width),t.height=Ce(this._config.height),t.minWidth=Ce(this._config.minWidth),t.minHeight=Ce(this._config.minHeight),t.maxWidth=Ce(this._config.maxWidth),t.maxHeight=Ce(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){var e;let t="cdk-overlay-backdrop-showing";(e=this._backdropRef)==null||e.dispose(),this._backdropRef=new ng(this._document,this._renderer,this._ngZone,i=>{this._backdropClick.next(i)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{var i;return(i=this._backdropRef)==null?void 0:i.element.classList.add(t)})}):this._backdropRef.element.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){var t,e;this._animationsDisabled?((t=this._backdropRef)==null||t.dispose(),this._backdropRef=null):(e=this._backdropRef)==null||e.detach()}_toggleClasses(t,e,i){let n=Ga(e||[]).filter(s=>!!s);n.length&&(i?t.classList.add(...n):t.classList.remove(...n))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let t=this._renders.pipe(At($s(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){var e;let t=this._scrollStrategy;t==null||t.disable(),(e=t==null?void 0:t.detach)==null||e.call(t)}},Qv="cdk-overlay-connected-position-bounding-box",HE=/([A-Za-z%]+)$/,Ku=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new Dt;_resizeSubscription=Wi.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}
vendor: 10,405 bytes, line 2
2constructor(t,e,i,n,s){this._viewportRuler=e,this._document=i,this._platform=n,this._overlayContainer=s,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(Qv),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._originRect,e=this._overlayRect,i=this._viewportRect,n=this._containerRect,s=[],o;for(let l of this._preferredPositions){let c=this._getOriginPoint(t,n,l),h=this._getOverlayPoint(c,e,l),d=this._getOverlayFit(h,e,i,l);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(l,c);return}if(this._canFitWithFlexibleDimensions(d,h,i)){s.push({position:l,origin:c,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(c,l)});continue}(!o||o.overlayFit.visibleArea<d.visibleArea)&&(o={overlayFit:d,overlayPoint:h,originPoint:c,position:l,overlayRect:e})}if(s.length){let l=null,c=-1;for(let h of s){let d=h.boundingBoxRect.width*h.boundingBoxRect.height*(h.position.weight||1);d>c&&(c=d,l=h)}this._isPushed=!1,this._applyPosition(l.position,l.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(o.position,o.originPoint);return}this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&er(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Qv),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,t.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,i){let n;if(i.originX=="center")n=t.left+t.width/2;else{let o=this._isRtl()?t.right:t.left,l=this._isRtl()?t.left:t.right;n=i.originX=="start"?o:l}e.left<0&&(n-=e.left);let s;return i.originY=="center"?s=t.top+t.height/2:s=i.originY=="top"?t.top:t.bottom,e.top<0&&(s-=e.top),{x:n,y:s}}_getOverlayPoint(t,e,i){let n;i.overlayX=="center"?n=-e.width/2:i.overlayX==="start"?n=this._isRtl()?-e.width:0:n=this._isRtl()?0:-e.width;let s;return i.overlayY=="center"?s=-e.height/2:s=i.overlayY=="top"?0:-e.height,{x:t.x+n,y:t.y+s}}_getOverlayFit(t,e,i,n){let s=tx(e),{x:o,y:l}=t,c=this._getOffset(n,"x"),h=this._getOffset(n,"y");c&&(o+=c),h&&(l+=h);let d=0-o,u=o+s.width-i.width,p=0-l,g=l+s.height-i.height,_=this._subtractOverflows(s.width,d,u),y=this._subtractOverflows(s.height,p,g),C=_*y;return{visibleArea:C,isCompletelyWithinViewport:s.width*s.height===C,fitsInViewportVertically:y===s.height,fitsInViewportHorizontally:_==s.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){let n=i.bottom-e.y,s=i.right-e.x,o=Jv(this._overlayRef.getConfig().minHeight),l=Jv(this._overlayRef.getConfig().minWidth),c=t.fitsInViewportVertically||o!=null&&o<=n,h=t.fitsInViewportHorizontally||l!=null&&l<=s;return c&&h}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let n=tx(e),s=this._viewportRect,o=Math.max(t.x+n.width-s.width,0),l=Math.max(t.y+n.height-s.height,0),c=Math.max(s.top-i.top-t.y,0),h=Math.max(s.left-i.left-t.x,0),d=0,u=0;return n.width<=s.width?d=h||-o:d=t.x<this._viewportMargin?s.left-i.left-t.x:0,n.height<=s.height?u=c||-l:u=t.y<this._viewportMargin?s.top-i.top-t.y:0,this._previousPushAmount={x:d,y:u},{x:t.x+d,y:t.y+u}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._positionChanges.observers.length){let i=this._getScrollVisibility();if(t!==this._lastPosition||!this._lastScrollVisibility||!UE(this._lastScrollVisibility,i)){let n=new Yu(t,i);this._positionChanges.next(n)}this._lastScrollVisibility=i}this._lastPosition=t,this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),i,n=t.overlayY;t.overlayX==="center"?i="center":this._isRtl()?i=t.overlayX==="start"?"right":"left":i=t.overlayX==="start"?"left":"right";for(let s=0;s<e.length;s++)e[s].style.transformOrigin=`${i} ${n}`}_calculateBoundingBoxRect(t,e){let i=this._viewportRect,n=this._isRtl(),s,o,l;if(e.overlayY==="top")o=t.y,s=i.height-o+this._viewportMargin;else if(e.overlayY==="bottom")l=i.height-t.y+this._viewportMargin*2,s=i.height-l+this._viewportMargin;else{let g=Math.min(i.bottom-t.y+i.top,t.y),_=this._lastBoundingBoxSize.height;s=g*2,o=t.y-g,s>_&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-_/2)}let c=e.overlayX==="start"&&!n||e.overlayX==="end"&&n,h=e.overlayX==="end"&&!n||e.overlayX==="start"&&n,d,u,p;if(h)p=i.width-t.x+this._viewportMargin*2,d=t.x-this._viewportMargin;else if(c)u=t.x,d=i.right-t.x;else{let g=Math.min(i.right-t.x+i.left,t.x),_=this._lastBoundingBoxSize.width;d=g*2,u=t.x-g,d>_&&!this._isInitialRender&&!this._growAfterOpen&&(u=t.x-_/2)}return{top:o,left:u,bottom:l,right:p,width:d,height:s}}_setBoundingBoxStyles(t,e){let i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{let s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;n.height=Ce(i.height),n.top=Ce(i.top),n.bottom=Ce(i.bottom),n.width=Ce(i.width),n.left=Ce(i.left),n.right=Ce(i.right),e.overlayX==="center"?n.alignItems="center":n.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?n.justifyContent="center":n.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",s&&(n.maxHeight=Ce(s)),o&&(n.maxWidth=Ce(o))}this._lastBoundingBoxSize=i,er(this._boundingBox.style,n)}_resetBoundingBoxStyles(){er(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){er(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let i={},n=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(n){let d=this._viewportRuler.getViewportScrollPosition();er(i,this._getExactOverlayY(e,t,d)),er(i,this._getExactOverlayX(e,t,d))}else i.position="static";let l="",c=this._getOffset(e,"x"),h=this._getOffset(e,"y");c&&(l+=`translateX(${c}px) `),h&&(l+=`translateY(${h}px)`),i.transform=l.trim(),o.maxHeight&&(n?i.maxHeight=Ce(o.maxHeight):s&&(i.maxHeight="")),o.maxWidth&&(n?i.maxWidth=Ce(o.maxWidth):s&&(i.maxWidth="")),er(this._pane.style,i)}_getExactOverlayY(t,e,i){let n={top:"",bottom:""},s=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),t.overlayY==="bottom"){let o=this._document.documentElement.clientHeight;n.bottom=`${o-(s.y+this._overlayRect.height)}px`}else n.top=Ce(s.y);return n}_getExactOverlayX(t,e,i){let n={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i));let o;if(this._isRtl()?o=t.overlayX==="end"?"left":"right":o=t.overlayX==="end"?"right":"left",o==="right"){let l=this._document.documentElement.clientWidth;n.right=`${l-(s.x+this._overlayRect.width)}px`}else n.left=Ce(s.x);return n}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(n=>n.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:qv(t,i),isOriginOutsideView:ig(t,i),isOverlayClipped:qv(e,i),isOverlayOutsideView:ig(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,n)=>i-Math.max(n,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return e==="x"?t.offsetX==null?this._offsetX:t.offsetX:t.offsetY==null?this._offsetY:t.offsetY}_validatePositions(){}
2_addPanelClasses(t){this._pane&&Ga(t).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){let t=this._origin;if(t instanceof ne)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}};function er(r,t){for(let e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return r}function Jv(r){if(typeof r!="number"&&r!=null){let[t,e]=r.split(HE);return!e||e==="px"?parseFloat(t):null}return r||null}function tx(r){return{top:Math.floor(r.top),right:Math.floor(r.right),bottom:Math.floor(r.bottom),left:Math.floor(r.left),width:Math.floor(r.width),height:Math.floor(r.height)}}function UE(r,t){return r===t?!0:r.isOriginClipped===t.isOriginClipped&&r.isOriginOutsideView===t.isOriginOutsideView&&r.isOverlayClipped===t.isOverlayClipped&&r.isOverlayOutsideView===t.isOverlayOutsideView}var ex="cdk-global-overlay-wrapper",qu=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(ex),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:n,height:s,maxWidth:o,maxHeight:l}=i,c=(n==="100%"||n==="100vw")&&(!o||o==="100%"||o==="100vw"),h=(s==="100%"||s==="100vh")&&(!l||l==="100%"||l==="100vh"),d=this._xPosition,u=this._xOffset,p=this._overlayRef.getConfig().direction==="rtl",g="",_="",y="";c?y="flex-start":d==="center"?(y="center",p?_=u:g=u):p?d==="left"||d==="end"?(y="flex-end",g=u):(d==="right"||d==="start")&&(y="flex-start",_=u):d==="left"||d==="start"?(y="flex-start",g=u):(d==="right"||d==="end")&&(y="flex-end",_=u),t.position=this._cssPosition,t.marginLeft=c?"0":g,t.marginTop=h?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=c?"0":_,e.justifyContent=y,e.alignItems=h?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(ex),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},cx=(()=>{let t=class t{_viewportRuler=F($a);_document=F(He);_platform=F(Ae);_overlayContainer=F(lx);constructor(){}global(){return new qu}flexibleConnectedTo(i){return new Ku(i,this._viewportRuler,this._document,this._platform,this._overlayContainer)}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})(),no=(()=>{let t=class t{scrollStrategies=F(nx);_overlayContainer=F(lx);_positionBuilder=F(cx);_keyboardDispatcher=F(ox);_injector=F(Ti);_ngZone=F(Kt);_document=F(He);_directionality=F(eo);_location=F(av);_outsideClickDispatcher=F(rx);_animationsModuleType=F(Sn,{optional:!0});_idGenerator=F(Nn);_renderer=F(ss).createRenderer(null,null);_appRef;_styleLoader=F(Ln);constructor(){}create(i){this._styleLoader.load(ax);let n=this._createHostElement(),s=this._createPaneElement(n),o=this._createPortalOutlet(s),l=new Rc(i);return l.direction=l.direction||this._directionality.value,new Xu(o,n,s,l,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Ra),this._renderer)}position(){return this._positionBuilder}_createPaneElement(i){let n=this._document.createElement("div");return n.id=this._idGenerator.getId("cdk-overlay-"),n.classList.add("cdk-overlay-pane"),i.appendChild(n),n}_createHostElement(){let i=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalOutlet(i){return this._appRef||(this._appRef=this._injector.get(Du)),new Uu(i,null,this._appRef,this._injector,this._document)}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})(),WE=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],dx=new Wt("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let r=F(no);return()=>r.scrollStrategies.reposition()}}),Ya=(()=>{let t=class t{elementRef=F(ne);constructor(){}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}));let r=t;return r})(),Zu=(()=>{let t=class t{_overlay=F(no);_dir=F(eo,{optional:!0});_overlayRef;_templatePortal;_backdropSubscription=Wi.EMPTY;_attachSubscription=Wi.EMPTY;_detachSubscription=Wi.EMPTY;_positionSubscription=Wi.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=F(dx);_disposeOnNavigation=!1;_ngZone=F(Kt);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(i){this._offsetX=i,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(i){this._offsetY=i,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(i){this._disposeOnNavigation=i}backdropClick=new Vt;positionChange=new Vt;attach=new Vt;detach=new Vt;overlayKeydown=new Vt;overlayOutsideClick=new Vt;
2constructor(){let i=F(Iu),n=F(ku);this._templatePortal=new Mc(i,n),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){var i;this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),(i=this._overlayRef)==null||i.dispose()}ngOnChanges(i){var n;this._position&&(this._updatePositionStrategy(this._position),(n=this._overlayRef)==null||n.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),i.origin&&this.open&&this._position.apply()),i.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=WE);let i=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=i.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=i.detachments().subscribe(()=>this.detach.emit()),i.keydownEvents().subscribe(n=>{this.overlayKeydown.next(n),n.keyCode===27&&!this.disableClose&&!Fn(n)&&(n.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(n=>{let s=this._getOriginElement(),o=ki(n);(!s||s!==o&&!s.contains(o))&&this.overlayOutsideClick.next(n)})}_buildConfig(){let i=this._position=this.positionStrategy||this._createPositionStrategy(),n=new Rc({direction:this._dir||"ltr",positionStrategy:i,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(n.width=this.width),(this.height||this.height===0)&&(n.height=this.height),(this.minWidth||this.minWidth===0)&&(n.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(n.minHeight=this.minHeight),this.backdropClass&&(n.backdropClass=this.backdropClass),this.panelClass&&(n.panelClass=this.panelClass),n}_updatePositionStrategy(i){let n=this.positions.map(s=>({originX:s.originX,originY:s.originY,overlayX:s.overlayX,overlayY:s.overlayY,offsetX:s.offsetX||this.offsetX,offsetY:s.offsetY||this.offsetY,panelClass:s.panelClass||void 0}));return i.setOrigin(this._getOrigin()).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let i=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(i),i}_getOrigin(){return this.origin instanceof Ya?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Ya?this.origin.elementRef.nativeElement:this.origin instanceof ne?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(i=>{this.backdropClick.emit(i)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(j0(()=>this.positionChange.observers.length>0)).subscribe(i=>{this._ngZone.run(()=>this.positionChange.emit(i)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){var i;(i=this._overlayRef)==null||i.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",Re],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",Re],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",Re],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",Re],push:[2,"cdkConnectedOverlayPush","push",Re],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",Re]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[En]}));let r=t;return r})();function GE(r){return()=>r.scrollStrategies.reposition()}var $E={provide:dx,deps:[no],useFactory:GE},sg=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({providers:[no,$E],imports:[io,Xv,Zm,Zm]}));let r=t;return r})();function Lc(r){return r.buttons===0||r.detail===0}function Oc(r){let t=r.touches&&r.touches[0]||r.changedTouches&&r.changedTouches[0];
2return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var Nc;function hx(){if(Nc==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Nc=!0}))}finally{Nc=Nc||!1}return Nc}function Xa(r){return hx()?r:!!r.capture}var ux=new Wt("cdk-input-modality-detector-options"),px={ignoreKeys:[18,17,224,91,16]},fx=650,og={passive:!0,capture:!0},mx=(()=>{let t=class t{_platform=F(Ae);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new F0(null);_options;_lastTouchMs=0;_onKeydown=i=>{var n,s;(s=(n=this._options)==null?void 0:n.ignoreKeys)!=null&&s.some(o=>o===i.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=ki(i))};_onMousedown=i=>{Date.now()-this._lastTouchMs<fx||(this._modality.next(Lc(i)?"keyboard":"mouse"),this._mostRecentTarget=ki(i))};_onTouchstart=i=>{if(Oc(i)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=ki(i)};constructor(){let i=F(Kt),n=F(He),s=F(ux,{optional:!0});if(this._options=ft(ft({},px),s),this.modalityDetected=this._modality.pipe(Au(1)),this.modalityChanged=this.modalityDetected.pipe(Fm()),this._platform.isBrowser){let o=F(ss).createRenderer(null,null);this._listenerCleanups=i.runOutsideAngular(()=>[Rn(o,n,"keydown",this._onKeydown,og),Rn(o,n,"mousedown",this._onMousedown,og),Rn(o,n,"touchstart",this._onTouchstart,og)])}}ngOnDestroy(){var i;this._modality.complete(),(i=this._listenerCleanups)==null||i.forEach(n=>n())}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})(),Fc=function(r){return r[r.IMMEDIATE=0]="IMMEDIATE",r[r.EVENTUAL=1]="EVENTUAL",r}(Fc||{}),gx=new Wt("cdk-focus-monitor-default-options"),Qu=Xa({passive:!0,capture:!0}),YE=(()=>{let t=class t{_ngZone=F(Kt);_platform=F(Ae);_inputModalityDetector=F(mx);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=F(He,{optional:!0});_stopInputModalityDetector=new Dt;constructor(){let i=F(gx,{optional:!0});this._detectionMode=(i==null?void 0:i.detectionMode)||Fc.IMMEDIATE}_rootNodeFocusAndBlurListener=i=>{let n=ki(i);for(let s=n;s;s=s.parentElement)i.type==="focus"?this._onFocus(i,s):this._onBlur(i,s)};monitor(i,n=!1){let s=On(i);if(!this._platform.isBrowser||s.nodeType!==1)return Ma();let o=Xm(s)||this._getDocument(),l=this._elementInfo.get(s);if(l)return n&&(l.checkChildren=!0),l.subject;let c={checkChildren:n,subject:new Dt,rootNode:o};return this._elementInfo.set(s,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(i){let n=On(i),s=this._elementInfo.get(n);s&&(s.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(s))}focusVia(i,n,s){let o=On(i),l=this._getDocument().activeElement;o===l?this._getClosestElementsInfo(o).forEach(([c,h])=>this._originChanged(c,n,h)):(this._setOrigin(n),typeof o.focus=="function"&&o.focus(s))}ngOnDestroy(){this._elementInfo.forEach((i,n)=>this.stopMonitoring(n))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(i){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(i)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:i&&this._isLastInteractionFromInputLabel(i)?"mouse":"program"}_shouldBeAttributedToTouch(i){return this._detectionMode===Fc.EVENTUAL||!!(i!=null&&i.contains(this._inputModalityDetector._mostRecentTarget))}_setClasses(i,n){i.classList.toggle("cdk-focused",!!n),i.classList.toggle("cdk-touch-focused",n==="touch"),i.classList.toggle("cdk-keyboard-focused",n==="keyboard"),i.classList.toggle("cdk-mouse-focused",n==="mouse"),i.classList.toggle("cdk-program-focused",n==="program")}_setOrigin(i,n=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=i,this._originFromTouchInteraction=i==="touch"&&n,this._detectionMode===Fc.IMMEDIATE){clearTimeout(this._originTimeoutId);let s=this._originFromTouchInteraction?fx:1;this._originTimeoutId=setTimeout(()=>this._origin=null,s)}})}_onFocus(i,n){let s=this._elementInfo.get(n),o=ki(i);!s||!s.checkChildren&&n!==o||this._originChanged(n,this._getFocusOrigin(o),s)}_onBlur(i,n){let s=this._elementInfo.get(n);!s||s.checkChildren&&i.relatedTarget instanceof Node&&n.contains(i.relatedTarget)||(this._setClasses(n),this._emitOrigin(s,null))}_emitOrigin(i,n){i.subject.observers.length&&this._ngZone.run(()=>i.subject.next(n))}_registerGlobalListeners(i){if(!this._platform.isBrowser)return;let n=i.rootNode,s=this._rootNodeFocusListenerCount.get(n)||0;s||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,Qu),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,Qu)}),this._rootNodeFocusListenerCount.set(n,s+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(At(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(i){let n=i.rootNode;if(this._rootNodeFocusListenerCount.has(n)){let s=this._rootNodeFocusListenerCount.get(n);s>1?this._rootNodeFocusListenerCount.set(n,s-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Qu),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Qu),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(i,n,s){this._setClasses(i,n),this._emitOrigin(s,n),this._lastFocusOrigin=n}_getClosestElementsInfo(i){let n=[];return this._elementInfo.forEach((s,o)=>{(o===i||s.checkChildren&&o.contains(i))&&n.push([o,s])}),n}_isLastInteractionFromInputLabel(i){let{_mostRecentTarget:n,mostRecentModality:s}=this._inputModalityDetector;if(s!=="mouse"||!n||n===i||i.nodeName!=="INPUT"&&i.nodeName!=="TEXTAREA"||i.disabled)return!1;let o=i.labels;if(o){for(let l=0;l<o.length;l++)if(o[l].contains(n))return!0}return!1}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();var Ju=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275cmp",kt({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,s){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
3`],encapsulation:2,changeDetection:0}));let r=t;return r})();var _x=new Set,ir,XE=(()=>{let t=class t{_platform=F(Ae);_nonce=F($0,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):qE}matchMedia(i){return(this._platform.WEBKIT||this._platform.BLINK)&&KE(i,this._nonce),this._matchMedia(i)}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();function KE(r,t){if(!_x.has(r))try{ir||(ir=document.createElement("style"),t&&ir.setAttribute("nonce",t),ir.setAttribute("type","text/css"),document.head.appendChild(ir)),ir.sheet&&(ir.sheet.insertRule(`@media ${r} {body{ }}`,0),_x.add(r))}catch(e){console.error(e)}}function qE(r){return{matches:r==="all"||r==="",media:r,addListener:()=>{},removeListener:()=>{}}}var yx=(()=>{let t=class t{_mediaMatcher=F(XE);_zone=F(Kt);_queries=new Map;
3_destroySubject=new Dt;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(i){return bx(Ga(i)).some(s=>this._registerQuery(s).mql.matches)}observe(i){let s=bx(Ga(i)).map(l=>this._registerQuery(l).observable),o=B0(s);return o=z0(o.pipe(wu(1)),o.pipe(Au(1),Da(0))),o.pipe(Cn(l=>{let c={matches:!1,breakpoints:{}};return l.forEach(({matches:h,query:d})=>{c.matches=c.matches||h,c.breakpoints[d]=h}),c}))}_registerQuery(i){if(this._queries.has(i))return this._queries.get(i);let n=this._mediaMatcher.matchMedia(i),o={observable:new ka(l=>{let c=h=>this._zone.run(()=>l.next(h));return n.addListener(c),()=>{n.removeListener(c)}}).pipe(Ys(n),Cn(({matches:l})=>({query:i,matches:l})),At(this._destroySubject)),mql:n};return this._queries.set(i,o),o}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();function bx(r){return r.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}var ZE=(()=>{let t=class t{create(i){return typeof MutationObserver>"u"?null:new MutationObserver(i)}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();var tp=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({providers:[ZE]}));let r=t;return r})();var wx=new Wt("liveAnnouncerElement",{providedIn:"root",factory:Ax});function Ax(){return null}var Cx=new Wt("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),QE=0,ag=(()=>{let t=class t{_ngZone=F(Kt);_defaultOptions=F(Cx,{optional:!0});_liveElement;_document=F(He);_previousTimeout;_currentPromise;_currentResolve;constructor(){let i=F(wx,{optional:!0});this._liveElement=i||this._createLiveElement()}announce(i,...n){let s=this._defaultOptions,o,l;return n.length===1&&typeof n[0]=="number"?l=n[0]:[o,l]=n,this.clear(),clearTimeout(this._previousTimeout),o||(o=s&&s.politeness?s.politeness:"polite"),l==null&&s&&(l=s.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(c=>this._currentResolve=c)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{var c;this._liveElement.textContent=i,typeof l=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),l)),(c=this._currentResolve)==null||c.call(this),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){var i,n;clearTimeout(this._previousTimeout),(i=this._liveElement)==null||i.remove(),this._liveElement=null,(n=this._currentResolve)==null||n.call(this),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let i="cdk-live-announcer-element",n=this._document.getElementsByClassName(i),s=this._document.createElement("div");for(let o=0;o<n.length;o++)n[o].remove();return s.classList.add(i),s.classList.add("cdk-visually-hidden"),s.setAttribute("aria-atomic","true"),s.setAttribute("aria-live","polite"),s.id=`cdk-live-announcer-${QE++}`,this._document.body.appendChild(s),s}_exposeAnnouncerToModals(i){let n=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let s=0;s<n.length;s++){let o=n[s],l=o.getAttribute("aria-owns");l?l.indexOf(i)===-1&&o.setAttribute("aria-owns",l+" "+i):o.setAttribute("aria-owns",i)}}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();var so=function(r){return r[r.NONE=0]="NONE",r[r.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",r[r.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",r}(so||{}),vx="cdk-high-contrast-black-on-white",xx="cdk-high-contrast-white-on-black",rg="cdk-high-contrast-active",ep=(()=>{let t=class t{_platform=F(Ae);_hasCheckedHighContrastMode;_document=F(He);_breakpointSubscription;constructor(){this._breakpointSubscription=F(yx).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasse
3s())})}getHighContrastMode(){if(!this._platform.isBrowser)return so.NONE;let i=this._document.createElement("div");i.style.backgroundColor="rgb(1,2,3)",i.style.position="absolute",this._document.body.appendChild(i);let n=this._document.defaultView||window,s=n&&n.getComputedStyle?n.getComputedStyle(i):null,o=(s&&s.backgroundColor||"").replace(/ /g,"");switch(i.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return so.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return so.BLACK_ON_WHITE}return so.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let i=this._document.body.classList;i.remove(rg,vx,xx),this._hasCheckedHighContrastMode=!0;let n=this.getHighContrastMode();n===so.BLACK_ON_WHITE?i.add(rg,vx):n===so.WHITE_ON_BLACK&&i.add(rg,xx)}}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})(),JE=(()=>{let t=class t{constructor(){F(ep)._applyBodyHighContrastModeCssClasses()}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({imports:[tp]}));let r=t;return r})();var tS=200,ip=class{_letterKeyStream=new Dt;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new Dt;selectedItem=this._selectedItem;constructor(t,e){let i=typeof(e==null?void 0:e.debounceInterval)=="number"?e.debounceInterval:tS;e!=null&&e.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(t),this._setupKeyHandler(i)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(t){this._selectedItemIndex=t}setItems(t){this._items=t}handleKey(t){let e=t.keyCode;t.key&&t.key.length===1?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(t){this._letterKeyStream.pipe(Cc(e=>this._pressedLetters.push(e)),Da(t),ui(()=>this._pressedLetters.length>0),Cn(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{var i,n;for(let s=1;s<this._items.length+1;s++){let o=(this._selectedItemIndex+s)%this._items.length,l=this._items[o];if(!((i=this._skipPredicateFn)!=null&&i.call(this,l))&&((n=l.getLabel)==null?void 0:n.call(l).toLocaleUpperCase().trim().indexOf(e))===0){this._selectedItem.next(l);break}}this._pressedLetters=[]})}};var np=class{_items;_activeItemIndex=-1;_activeItem=W0(null);_wrap=!1;_typeaheadSubscription=Wi.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=t=>t.disabled;constructor(t,e){this._items=t,t instanceof Vm?this._itemChangesSubscription=t.changes.subscribe(i=>this._itemsChanged(i.toArray())):Ec(t)&&(this._effectRef=rv(()=>this._itemsChanged(t()),{injector:e}))}tabOut=new Dt;change=new Dt;skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new ip(e,{debounceInterval:typeof t=="number"?t:void 0,skipPredicate:i=>this._skipPredicateFn(i)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(i=>{this.setActiveItem(i)}),this}cancelTypeahead(){var t;return(t=this._typeahead)==null||t.reset(),this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}withPageUpDown(t=!0,e=10){return this._pageUpAndDown={enabled:t,delta:e},this}setActiveItem(t){let e=this._activeItem();this.updateActiveItem(t),this._activeItem()!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){var s,o;let e=t.keyCode,n=["altKey","ctrlKey","metaKey","shiftKey"].every(l=>!t[l]||this._allowedModifierKeys.indexOf(l)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&n){this.setNextItemActive();break}else return;case 38:if(this._vertical&&n){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&n){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&n){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&n){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&n){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&n){let l=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(l>0?l:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&n){let l=this._activeItemIndex+this._pageUpAndDown.delta,c=this._getItemsArray().length;this._setActiveItemByIndex(l<c?l:c-1,-1);break}else return;default:(n||Fn(t,"shiftKey"))&&((s=this._typeahead)==null||s.handleKey(t));return}(o=this._typeahead)==null||o.reset(),t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){var s;let e=this._getItemsArray(),i=typeof t=="number"?t:e.indexOf(t),n=e[i];this._activeItem.set(n==null?null:n),this._activeItemIndex=i,(s=this._typeahead)==null||s.setCurrentSelectedItemIndex(i)}destroy(){var t,e,i;
3this._typeaheadSubscription.unsubscribe(),(t=this._itemChangesSubscription)==null||t.unsubscribe(),(e=this._effectRef)==null||e.destroy(),(i=this._typeahead)==null||i.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){let e=this._getItemsArray();for(let i=1;i<=e.length;i++){let n=(this._activeItemIndex+t*i+e.length)%e.length,s=e[n];if(!this._skipPredicateFn(s)){this.setActiveItem(n);return}}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){let i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(t+=e,!i[t])return;this.setActiveItem(t)}}_getItemsArray(){return Ec(this._items)?this._items():this._items instanceof Vm?this._items.toArray():this._items}_itemsChanged(t){var i,n;(i=this._typeahead)==null||i.setItems(t);let e=this._activeItem();if(e){let s=t.indexOf(e);s>-1&&s!==this._activeItemIndex&&(this._activeItemIndex=s,(n=this._typeahead)==null||n.setCurrentSelectedItemIndex(s))}}};var Bc=class extends np{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}};var Ix=" ";function ug(r,t,e){let i=op(r,t);e=e.trim(),!i.some(n=>n.trim()===e)&&(i.push(e),r.setAttribute(t,i.join(Ix)))}function rp(r,t,e){let i=op(r,t);e=e.trim();let n=i.filter(s=>s!==e);n.length?r.setAttribute(t,n.join(Ix)):r.removeAttribute(t)}function op(r,t){var i;let e=r.getAttribute(t);return(i=e==null?void 0:e.match(/\S+/g))!=null?i:[]}var kx="cdk-describedby-message",sp="cdk-describedby-host",hg=0,JL=(()=>{let t=class t{_platform=F(Ae);_document=F(He);_messageRegistry=new Map;_messagesContainer=null;_id=`${hg++}`;constructor(){F(Ln).load(Ju),this._id=F(Su)+"-"+hg++}describe(i,n,s){if(!this._canBeDescribed(i,n))return;let o=dg(n,s);typeof n!="string"?(Tx(n,this._id),this._messageRegistry.set(o,{messageElement:n,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(n,s),this._isElementDescribedByMessage(i,o)||this._addMessageReference(i,o)}removeDescription(i,n,s){var l;if(!n||!this._isElementNode(i))return;let o=dg(n,s);if(this._isElementDescribedByMessage(i,o)&&this._removeMessageReference(i,o),typeof n=="string"){let c=this._messageRegistry.get(o);c&&c.referenceCount===0&&this._deleteMessageElement(o)}((l=this._messagesContainer)==null?void 0:l.childNodes.length)===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){var n;let i=this._document.querySelectorAll(`[${sp}="${this._id}"]`);for(let s=0;s<i.length;s++)this._removeCdkDescribedByReferenceIds(i[s]),i[s].removeAttribute(sp);(n=this._messagesContainer)==null||n.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(i,n){let s=this._document.createElement("div");Tx(s,this._id),s.textContent=i,n&&s.setAttribute("role",n),this._createMessagesContainer(),this._messagesContainer.appendChild(s),this._messageRegistry.set(dg(i,n),{messageElement:s,referenceCount:0})}_deleteMessageElement(i){var n,s;(s=(n=this._messageRegistry.get(i))==null?void 0:n.messageElement)==null||s.remove(),this._messageRegistry.delete(i)}_createMessagesContainer(){if(this._messagesContainer)return;let i="cdk-describedby-message-container",n=this._document.querySelectorAll(`.${i}[platform="server"]`);for(let o=0;o<n.length;o++)n[o].remove();let s=this._document.createElement("div");s.style.visibility="hidden",s.classList.add(i),s.classList.add("cdk-visually-hidden"),this._platform.isBrowser||s.setAttribute("platform","server"),this._document.body.appendChild(s),this._messagesContainer=s}_removeCdkDescribedByReferenceIds(i){let n=op(i,"aria-describedby").filter(s=>s.indexOf(kx)!=0);i.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(i,n){let s=this._messageRegistry.get(n);ug(i,"aria-describedby",s.messageElement.id),i.setAttribute(sp,this._id),s.referenceCount++}_removeMessageReference(i,n){let s=this._messageRegistry.get(n);s.referenceCount--,rp(i,"aria-describedby",s.messageElement.id),i.removeAttribute(sp)}_isElementDescribedByMessage(i,n){let s=op(i,"aria-describedby"),o=this._messageRegistry.get(n),l=o&&o.messageElement.id;return!!l&&s.indexOf(l)!=-1}_canBeDescribed(i,n){if(!this._isElementNode(i))return!1;if(n&&typeof n=="object")return!0;let s=n==null?"":`${n}`.trim(),o=i.getAttribute("aria-label");return s?!o||o.trim()!==s:!1}_isElementNode(i){return i.nodeType===this._document.ELEMENT_NODE}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();function dg(r,t){return typeof r=="string"?`${t||""}/${r}`:r}function Tx(r,t){r.id||(r.id=`${kx}-${t}-${hg++}`)}var zc=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())
3),this._selected}changed=new Dt;constructor(t=!1,e,i=!0,n){this._multiple=t,this._emitChanges=i,this.compareWith=n,e&&e.length&&(t?e.forEach(s=>this._markSelected(s)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...t){this._verifyValueAssignment(t),t.forEach(i=>this._markSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...t){this._verifyValueAssignment(t),t.forEach(i=>this._unmarkSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...t){this._verifyValueAssignment(t);let e=this.selected,i=new Set(t.map(s=>this._getConcreteValue(s)));t.forEach(s=>this._markSelected(s)),e.filter(s=>!i.has(this._getConcreteValue(s,i))).forEach(s=>this._unmarkSelected(s));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}toggle(t){return this.isSelected(t)?this.deselect(t):this.select(t)}clear(t=!0){this._unmarkAll();let e=this._hasQueuedChanges();return t&&this._emitChangeEvent(),e}isSelected(t){return this._selection.has(this._getConcreteValue(t))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){t=this._getConcreteValue(t),this.isSelected(t)||(this._multiple||this._unmarkAll(),this.isSelected(t)||this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){t=this._getConcreteValue(t),this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){t.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(t,e){if(this.compareWith){e=e!=null?e:this._selection;for(let i of e)if(this.compareWith(t,i))return i;return t}else return t}};function pg(r){return r!=null&&`${r}`!="false"}var fg=class{_box;_destroyed=new Dt;_resizeSubject=new Dt;_resizeObserver;_elementObservables=new Map;constructor(t){this._box=t,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(t){return this._elementObservables.has(t)||this._elementObservables.set(t,new ka(e=>{var n;let i=this._resizeSubject.subscribe(e);return(n=this._resizeObserver)==null||n.observe(t,{box:this._box}),()=>{var s;(s=this._resizeObserver)==null||s.unobserve(t),i.unsubscribe(),this._elementObservables.delete(t)}}).pipe(ui(e=>e.some(i=>i.target===t)),zm({bufferSize:1,refCount:!0}),At(this._destroyed))),this._elementObservables.get(t)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Mx=(()=>{let t=class t{_cleanupErrorListener;_observers=new Map;_ngZone=F(Kt);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){var i;for(let[,n]of this._observers)n.destroy();this._observers.clear(),(i=this._cleanupErrorListener)==null||i.call(this)}observe(i,n){let s=(n==null?void 0:n.box)||"content-box";return this._observers.has(s)||this._observers.set(s,new fg(s)),this._observers.get(s).observe(i)}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();var eS=["notch"],iS=["matFormFieldNotchedOutline",""],nS=["*"],sS=["textField"],oS=["iconPrefixContainer"],rS=["textPrefixContainer"],aS=["iconSuffixContainer"],lS=["textSuffixContainer"],cS=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],dS=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function hS(r,t){r&1&&Q(0,"span",20)}function uS(r,t){if(r&1&&(D(0,"label",19),ae(1,1),q(2,hS,1,0,"span",20),R()),r&2){let e=j(2);V("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Ii("for",e._control.disableAutomaticLabeling?null:e._control.id),P(2),de(!e.hideRequiredMarker&&e._control.required?2:-1)}}function pS(r,t){if(r&1&&q(0,uS,3,5,"label",19),r&2){let e=j();de(e._hasFloatingLabel()?0:-1)}}function fS(r,t){r&1&&Q(0,"div",7)}function mS(r,t){}function gS(r,t){if(r&1&&q(0,mS,0,0,"ng-template",13),r&2){j(2);let e=Pc(1);V("ngTemplateOutlet",e)}}function _S(r,t){if(r&1&&(D(0,"div",9),q(1,gS,1,1,null,13),R()),r&2){let e=j();V("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),P(),de(e._forceDisplayInfixLabel()?-1:1)}}function bS(r,t){r&1&&(D(0,"div",10,2),ae(2,2),R())}function yS(r,t){r&1&&(D(0,"div",11,3),ae(2,3),R())}function vS(r,t){}function xS(r,t){if(r&1&&q(0,vS,0,0,"ng-template",13),r&2){j();let e=Pc(1);V("ngTemplateOutlet",e)}}function wS(r,t){r&1&&(D(0,"div",14,4),ae(2,4),R())}function AS(r,t){r&1&&(D(0,"div",15,5),ae(2,5),R())}function CS(r,t){r&1&&Q(0,"div",16)}function ES(r,t){r&1&&ae(0,6)}function SS(r,t){if(r&1&&(D(0,"mat-hint",21),G(1),R()),r&2){let e=j(2);V("id",e._hintLabelId),P(),Ct(e.hintLabel)}}function PS(r,t){if(r&1&&(q(0,SS,2,2,"mat-hint",21),ae(1,7),Q(2,"div",22),ae(3,8)),r&2){let e=j();de(e.hintLabel?0:-1)}}var Vc=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t,selectors:[["mat-label"]]}));let r=t;return r})(),TS=new Wt("MatError");var mg=(()=>{let t=class t{align="start";id=F(Nn).getId("mat-mdc-hint-")};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(n,s){n&2&&(Ru("id",s.id),Ii("align",null),we("mat-mdc-form-field-hint-end",s.align==="end"))},inputs:{align:"align",id:"id"}}));let r=t;return r})(),IS=new Wt("MatPrefix");var kS=new Wt("MatSuffix");var Bx=new Wt("FloatingLabelParent"),Dx=(()=>{let t=class t{_elementRef=F(ne);get floating(){return this._floating}set floating(i){this._floating=i,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(i){this._monitorResize=i,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=F(Mx);_ngZone=F(Kt);_parent=F(Bx);_resizeSubscription=new Wi;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return MS(this._elementRef.nativeElement)}
3get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(n,s){n&2&&we("mdc-floating-label--float-above",s.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}}));let r=t;return r})();function MS(r){let t=r;if(t.offsetParent!==null)return t.scrollWidth;let e=t.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}var Rx="mdc-line-ripple--active",ap="mdc-line-ripple--deactivating",Lx=(()=>{let t=class t{_elementRef=F(ne);_cleanupTransitionEnd;constructor(){let i=F(Kt),n=F(Sc);i.runOutsideAngular(()=>{this._cleanupTransitionEnd=n.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let i=this._elementRef.nativeElement.classList;i.remove(ap),i.add(Rx)}deactivate(){this._elementRef.nativeElement.classList.add(ap)}_handleTransitionEnd=i=>{let n=this._elementRef.nativeElement.classList,s=n.contains(ap);i.propertyName==="opacity"&&s&&n.remove(Rx,ap)};ngOnDestroy(){this._cleanupTransitionEnd()}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}));let r=t;return r})(),Ox=(()=>{let t=class t{_elementRef=F(ne);_ngZone=F(Kt);open=!1;_notch;constructor(){}ngAfterViewInit(){let i=this._elementRef.nativeElement.querySelector(".mdc-floating-label");i?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(i.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>i.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(i){!this.open||!i?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${i}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275cmp",kt({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(n,s){if(n&1&&De(eS,5),n&2){let o;Jt(o=te())&&(s._notch=o.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(n,s){n&2&&we("mdc-notched-outline--notched",s.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:iS,ngContentSelectors:nS,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(n,s){n&1&&(bi(),Q(0,"div",1),D(1,"div",2,0),ae(3),R(),Q(4,"div",3))},encapsulation:2,changeDetection:0}));let r=t;return r})(),gg=(()=>{let t=class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t}));let r=t;return r})();var _g=new Wt("MatFormField"),DS=new Wt("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Nx="fill",RS="auto",Fx="fixed",LS="translateY(-50%)",bg=(()=>{let t=class t{_elementRef=F(ne);_changeDetectorRef=F(Jo);_dir=F(eo);_platform=F(Ae);_idGenerator=F(Nn);_ngZone=F(Kt);_injector=F(Ti);_defaults=F(DS,{optional:!0});_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=X0(Vc);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(i){this._hideRequiredMarker=pg(i)}_hideRequiredMarker=!1;color="primary";get floatLabel(){var i;return this._floatLabel||((i=this._defaults)==null?void 0:i.floatLabel)||RS}set floatLabel(i){i!==this._floatLabel&&(this._floatLabel=i,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearance}set appearance(i){var o;let n=this._appearance,s=i||((o=this._defaults)==null?void 0:o.appearance)||Nx;this._appearance=s,this._appearance==="outline"&&this._appearance!==n&&(this._needsOutlineLabelOffsetUpdate=!0)}_appearance=Nx;
3get subscriptSizing(){var i;return this._subscriptSizing||((i=this._defaults)==null?void 0:i.subscriptSizing)||Fx}set subscriptSizing(i){var n;this._subscriptSizing=i||((n=this._defaults)==null?void 0:n.subscriptSizing)||Fx}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(i){this._hintLabel=i,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(i){this._explicitFormFieldControl=i}_destroyed=new Dt;_isFocused=null;_explicitFormFieldControl;_needsOutlineLabelOffsetUpdate=!1;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_animationsDisabled;constructor(){let i=this._defaults;i&&(i.appearance&&(this.appearance=i.appearance),this._hideRequiredMarker=!!(i!=null&&i.hideRequiredMarker),i.color&&(this.color=i.color)),this._animationsDisabled=F(Sn,{optional:!0})==="NoopAnimations"}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){var i,n,s;(i=this._stateChanges)==null||i.unsubscribe(),(n=this._valueChanges)==null||n.unsubscribe(),(s=this._describedByChanges)==null||s.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=Um(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(i){var o,l,c;let n=this._control,s="mat-mdc-form-field-type-";i&&this._elementRef.nativeElement.classList.remove(s+i.controlType),n.controlType&&this._elementRef.nativeElement.classList.add(s+n.controlType),(o=this._stateChanges)==null||o.unsubscribe(),this._stateChanges=n.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),(l=this._describedByChanges)==null||l.unsubscribe(),this._describedByChanges=n.stateChanges.pipe(Ys([void 0,void 0]),Cn(()=>[n.errorState,n.userAriaDescribedBy]),Bm(),ui(([[h,d],[u,p]])=>h!==u||d!==p)).subscribe(()=>this._syncDescribedByIds()),(c=this._valueChanges)==null||c.unsubscribe(),n.ngControl&&n.ngControl.valueChanges&&(this._valueChanges=n.ngControl.valueChanges.pipe(At(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(i=>!i._isText),this._hasTextPrefix=!!this._prefixChildren.find(i=>i._isText),this._hasIconSuffix=!!this._suffixChildren.find(i=>!i._isText),this._hasTextSuffix=!!this._suffixChildren.find(i=>i._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),$s(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){var i,n,s;this._control.focused&&!this._isFocused?(this._isFocused=!0,(i=this._lineRipple)==null||i.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,(n=this._lineRipple)==null||n.deactivate()),(s=this._textField)==null||s.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),Pu(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(At(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}
3_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=Um(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(i){let n=this._control?this._control.ngControl:null;return n&&n[i]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){var i,n;!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?(i=this._notchedOutline)==null||i._setNotchWidth(0):(n=this._notchedOutline)==null||n._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let i=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&i.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let n=this._hintChildren?this._hintChildren.find(o=>o.align==="start"):null,s=this._hintChildren?this._hintChildren.find(o=>o.align==="end"):null;n?i.push(n.id):this._hintLabel&&i.push(this._hintLabelId),s&&i.push(s.id)}else this._errorChildren&&i.push(...this._errorChildren.map(n=>n.id));this._control.setDescribedByIds(i)}}_updateOutlineLabelOffset(){var x,I,A,E,L,v,S,M;if(!this._hasOutline()||!this._floatingLabel)return;let i=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){i.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let n=(x=this._iconPrefixContainer)==null?void 0:x.nativeElement,s=(I=this._textPrefixContainer)==null?void 0:I.nativeElement,o=(A=this._iconSuffixContainer)==null?void 0:A.nativeElement,l=(E=this._textSuffixContainer)==null?void 0:E.nativeElement,c=(L=n==null?void 0:n.getBoundingClientRect().width)!=null?L:0,h=(v=s==null?void 0:s.getBoundingClientRect().width)!=null?v:0,d=(S=o==null?void 0:o.getBoundingClientRect().width)!=null?S:0,u=(M=l==null?void 0:l.getBoundingClientRect().width)!=null?M:0,p=this._dir.value==="rtl"?"-1":"1",g=`${c+h}px`,y=`calc(${p} * (${g} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;i.style.transform=`var(
4        --mat-mdc-form-field-label-transform,
5        ${LS} translateX(${y})
6    )`;let C=c+h+d+u;this._elementRef.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${C}px)`)}_isAttachedToDom(){let i=this._elementRef.nativeElement;if(i.getRootNode){let n=i.getRootNode();return n&&n!==i}return document.documentElement.contains(i)}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275cmp",kt({type:t,selectors:[["mat-form-field"]],contentQueries:function(n,s,o){if(n&1&&(J0(o,s._labelChild,Vc,5),Tn(o,gg,5),Tn(o,IS,5),Tn(o,kS,5),Tn(o,TS,5),Tn(o,mg,5)),n&2){tv();let l;Jt(l=te())&&(s._formFieldControl=l.first),Jt(l=te())&&(s._prefixChildren=l),Jt(l=te())&&(s._suffixChildren=l),Jt(l=te())&&(s._errorChildren=l),Jt(l=te())&&(s._hintChildren=l)}},viewQuery:function(n,s){if(n&1&&(De(sS,5),De(oS,5),De(rS,5),De(aS,5),De(lS,5),De(Dx,5),De(Ox,5),De(Lx,5)),n&2){let o;Jt(o=te())&&(s._textField=o.first),Jt(o=te())&&(s._iconPrefixContainer=o.first),Jt(o=te())&&(s._textPrefixContainer=o.first),Jt(o=te())&&(s._iconSuffixContainer=o.first),Jt(o=te())&&(s._textSuffixContainer=o.first),Jt(o=te())&&(s._floatingLabel=o.first),Jt(o=te())&&(s._notchedOutline=o.first),Jt(o=te())&&(s._lineRipple=o.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:40,hostBindings:function(n,s){n&2&&we("mat-mdc-form-field-label-always-float",s._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",s._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",s._hasIconSuffix)("mat-form-field-invalid",s._control.errorState)("mat-form-field-disabled",s._control.disabled)("mat-form-field-autofilled",s._control.autofilled)("mat-form-field-appearance-fill",s.appearance=="fill")("mat-form-field-appearance-outline",s.appearance=="outline")("mat-form-field-hide-placeholder",s._hasFloatingLabel()&&!s._shouldLabelFloat())("mat-focused",s._control.focused)("mat-primary",s.color!=="accent"&&s.color!=="warn")("mat-accent",s.color==="accent")("mat-warn",s.color==="warn")("ng-untouched",s._shouldForward("untouched"))("ng-touched",s._shouldForward("touched"))("ng-pristine",s._shouldForward("pristine"))("ng-dirty",s._shouldForward("dirty"))("ng-valid",s._shouldForward("valid"))("ng-invalid",s._shouldForward("invalid"))("ng-pending",s._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[os([{provide:_g,useExisting:t},{provide:Bx,useExisting:t}])],ngContentSelectors:dS,decls:20,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormField
6FloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(n,s){if(n&1){let o=jt();bi(cS),q(0,pS,1,1,"ng-template",null,0,sv),D(2,"div",6,1),ut("click",function(c){return yt(o),vt(s._control.onContainerClick(c))}),q(4,fS,1,0,"div",7),D(5,"div",8),q(6,_S,2,2,"div",9)(7,bS,3,0,"div",10)(8,yS,3,0,"div",11),D(9,"div",12),q(10,xS,1,1,null,13),ae(11),R(),q(12,wS,3,0,"div",14)(13,AS,3,0,"div",15),R(),q(14,CS,1,0,"div",16),R(),D(15,"div",17),nv(16),D(17,"div",18),q(18,ES,1,0)(19,PS,4,1),R()()}if(n&2){let o;P(2),we("mdc-text-field--filled",!s._hasOutline())("mdc-text-field--outlined",s._hasOutline())("mdc-text-field--no-label",!s._hasFloatingLabel())("mdc-text-field--disabled",s._control.disabled)("mdc-text-field--invalid",s._control.errorState),P(2),de(!s._hasOutline()&&!s._control.disabled?4:-1),P(2),de(s._hasOutline()?6:-1),P(),de(s._hasIconPrefix?7:-1),P(),de(s._hasTextPrefix?8:-1),P(2),de(!s._hasOutline()||s._forceDisplayInfixLabel()?10:-1),P(2),de(s._hasTextSuffix?12:-1),P(),de(s._hasIconSuffix?13:-1),P(),de(s._hasOutline()?-1:14),P(),we("mat-mdc-form-field-subscript-dynamic-size",s.subscriptSizing==="dynamic");let l=s._getSubscriptMessageType();P(2),we("mat-mdc-form-field-error-wrapper",l==="error")("mat-mdc-form-field-hint-wrapper",l==="hint"),P(),de((o=l)==="error"?18:o==="hint"?19:-1)}},dependencies:[Dx,Ox,dv,Lx,mg],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;
6left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-sys-outline));border-width:var(--mdc-outlined-text-field-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):h
6over .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):h
6over .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-en
6abled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}
7`],encapsulation:2,changeDetection:0}));let r=t;return r})();var Ki=function(r){return r[r.FADING_IN=0]="FADING_IN",r[r.VISIBLE=1]="VISIBLE",r[r.FADING_OUT=2]="FADING_OUT",r[r.HIDDEN=3]="HIDDEN",r}(Ki||{}),yg=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=Ki.HIDDEN;constructor(t,e,i,n=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},zx=Xa({passive:!0,capture:!0}),vg=class{_events=new Map;addHandler(t,e,i,n){let s=this._events.get(e);if(s){let o=s.get(i);o?o.add(n):s.set(i,new Set([n]))}else this._events.set(e,new Map([[i,new Set([n])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,zx)})}removeHandler(t,e,i){let n=this._events.get(t);if(!n)return;let s=n.get(e);s&&(s.delete(i),s.size===0&&n.delete(e),n.size===0&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,zx)))}_delegateEventHandler=t=>{var i;let e=ki(t);e&&((i=this._events.get(t.type))==null||i.forEach((n,s)=>{(s===e||s.contains(e))&&n.forEach(o=>o.handleEvent(t))}))}},Vx={enterDuration:225,exitDuration:150},OS=800,jx=Xa({passive:!0,capture:!0}),Hx=["mousedown","touchstart"],Ux=["mouseup","mouseleave","touchend","touchcancel"],NS=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275cmp",kt({type:t,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(n,s){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}
8`],encapsulation:2,changeDetection:0}));let r=t;return r})(),jc=class jc{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;constructor(t,e,i,n,s){this._target=t,this._ngZone=e,this._platform=n,n.isBrowser&&(this._containerElement=On(i)),s&&s.get(Ln).load(NS)}fadeInRipple(t,e,i={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s=ft(ft({},Vx),i.animation);i.centered&&(t=n.left+n.width/2,e=n.top+n.height/2);let o=i.radius||FS(t,e,n),l=t-n.left,c=e-n.top,h=s.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${l-o}px`,d.style.top=`${c-o}px`,d.style.height=`${o*2}px`,d.style.width=`${o*2}px`,i.color!=null&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${h}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),p=u.transitionProperty,g=u.transitionDuration,_=p==="none"||g==="0s"||g==="0s, 0s"||n.width===0&&n.height===0,y=new yg(this,d,i,_);d.style.transform="scale3d(1, 1, 1)",y.state=Ki.FADING_IN,i.persistent||(this._mostRecentTransientRipple=y);let C=null;return!_&&(h||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let x=()=>{C&&(C.fallbackTimer=null),clearTimeout(A),this._finishRippleTransition(y)},I=()=>this._destroyRipple(y),A=setTimeout(I,h+100);d.addEventListener("transitionend",x),d.addEventListener("transitioncancel",I),C={onTransitionEnd:x,onTransitionCancel:I,fallbackTimer:A}}),this._activeRipples.set(y,C),(_||!h)&&this._finishRippleTransition(y),y}fadeOutRipple(t){if(t.state===Ki.FADING_OUT||t.state===Ki.HIDDEN)return;let e=t.element,i=ft(ft({},Vx),t.config.animation);e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=Ki.FADING_OUT,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}
8fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=On(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,Hx.forEach(i=>{jc._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(t){t.type==="mousedown"?this._onMousedown(t):t.type==="touchstart"?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{Ux.forEach(e=>{this._triggerElement.addEventListener(e,this,jx)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===Ki.FADING_IN?this._startFadeOutTransition(t):t.state===Ki.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=Ki.VISIBLE,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){var i;let e=(i=this._activeRipples.get(t))!=null?i:null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=Ki.HIDDEN,e!==null&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),t.element.remove()}_onMousedown(t){let e=Lc(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+OS;!this._target.rippleDisabled&&!e&&!i&&(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!Oc(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=t.changedTouches;if(e)for(let i=0;i<e.length;i++)this.fadeInRipple(e[i].clientX,e[i].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(t=>{let e=t.state===Ki.VISIBLE||t.config.terminateOnPointerUp&&t.state===Ki.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(Hx.forEach(e=>jc._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&(Ux.forEach(e=>t.removeEventListener(e,this,jx)),this._pointerUpEventsRegistered=!1))}};k(jc,"_eventManager",new vg);var xg=jc;function FS(r,t,e){let i=Math.max(Math.abs(r-e.left),Math.abs(r-e.right)),n=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+n*n)}var BS=new Wt("mat-ripple-global-options"),Wx=(()=>{let t=class t{_elementRef=F(ne);_animationMode=F(Sn,{optional:!0});color;unbounded;centered;radius=0;animation;get disabled(){return this._disabled}set disabled(i){i&&this.fadeOutAllNonPersistent(),this._disabled=i,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(i){this._trigger=i,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let i=F(Kt),n=F(Ae),s=F(BS,{optional:!0}),o=F(Ti);this._globalOptions=s||{},this._rippleRenderer=new xg(this,i,this._elementRef,n,o)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:ft(ft(ft({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(i,n=0,s){return typeof i=="number"?this._rippleRenderer.fadeInRipple(i,n,ft(ft({},this.rippleConfig),s)):this._rippleRenderer.fadeInRipple(0,0,ft(ft({},this.rippleConfig),i))}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(n,s){n&2&&we("mat-ripple-unbounded",s.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]}));let r=t;return r})();var Gx=(()=>{let t=class t{_animationMode=F(Sn,{optional:!0});state="unchecked";disabled=!1;appearance="full";constructor(){}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275cmp",kt({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(n,s){n&2&&we("mat-pseudo-checkbox-indeterminate",s.state==="indeterminate")("mat-pseudo-checkbox-checked",s.state==="checked")("mat-pseudo-checkbox-disabled",s.disabled)("mat-pseudo-checkbox-minimal",s.appearance==="minimal")("mat-pseudo-checkbox-full",s.appearance==="full")("_mat-animation-noopable",s._animationMode==="NoopAnimations")},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(n,s){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;
8height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}
9`],encapsulation:2,changeDetection:0}));let r=t;return r})();var $x=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275cmp",kt({type:t,selectors:[["structural-styles"]],decls:0,vars:0,template:function(n,s){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}
10`],encapsulation:2,changeDetection:0}));let r=t;return r})();var zS=["text"],VS=[[["mat-icon"]],"*"],jS=["mat-icon","*"];function HS(r,t){if(r&1&&Q(0,"mat-pseudo-checkbox",1),r&2){let e=j();V("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function US(r,t){if(r&1&&Q(0,"mat-pseudo-checkbox",3),r&2){let e=j();V("disabled",e.disabled)}}function WS(r,t){if(r&1&&(D(0,"span",4),G(1),R()),r&2){let e=j();P(),Et("(",e.group.label,")")}}var Ag=new Wt("MAT_OPTION_PARENT_COMPONENT"),Cg=new Wt("MatOptgroup");var wg=class{source;isUserInput;constructor(t,e=!1){this.source=t,this.isUserInput=e}},Hc=(()=>{let t=class t{_element=F(ne);_changeDetectorRef=F(Jo);_parent=F(Ag,{optional:!0});group=F(Cg,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_disabled=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=F(Nn).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(i){this._disabled=i}get disableRipple(){var i;return this._signalDisableRipple?this._parent.disableRipple():!!((i=this._parent)!=null&&i.disableRipple)}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new Vt;_text;_stateChanges=new Dt;constructor(){let i=F(Ln);i.load($x),i.load(Ju),this._signalDisableRipple=!!this._parent&&Ec(this._parent.disableRipple)}get active(){return this._active}get viewValue(){var i;return(((i=this._text)==null?void 0:i.nativeElement.textContent)||"").trim()}select(i=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),i&&this._emitSelectionChangeEvent())}deselect(i=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),i&&this._emitSelectionChangeEvent())}focus(i,n){let s=this._getHostElement();typeof s.focus=="function"&&s.focus(n)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(i){(i.keyCode===13||i.keyCode===32)&&!Fn(i)&&(this._selectViaInteraction(),i.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let i=this.viewValue;i!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=i)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(i=!1){this.onSelectionChange.emit(new wg(this,i))}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275cmp",kt({type:t,selectors:[["mat-option"]],viewQuery:function(n,s){if(n&1&&De(zS,7),n&2){let o;Jt(o=te())&&(s._text=o.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(n,s){n&1&&ut("click",function(){return s._selectViaInteraction()})("keydown",function(l){return s._handleKeydown(l)}),n&2&&(Ru("id",s.id),Ii("aria-selected",s.selected)("aria-disabled",s.disabled.toString()),we("mdc-list-item--selected",s.selected)("mat-mdc-option-multiple",s.multiple)("mat-mdc-option-active",s.active)("mdc-list-item--disabled",s.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",Re]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:jS,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(n,s){n&1&&(bi(VS),q(0,HS,1,2,"mat-pseudo-checkbox",1),ae(1),D(2,"span",2,0),ae(4,1),R(),q(5,US,1,1,"mat-pseudo-checkbox",3)(6,WS,2,1,"span",4),Q(7,"div",5)),n&2&&(de(s.multiple?0:-1),P(5),de(!s.multiple&&s.selected&&!s.hideSingleSelectionIndicator?5:-1),P(),de(s.group&&s.group._inert?6:-1),P(),V("matRippleTrigger",s._getHostElement())("matRippleDisabled",s.disabled||s.disableRipple))},dependencies:[Gx,Wx],styles:[`.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:""}
11`],encapsulation:2,changeDetection:0}));let r=t;return r})();function Yx(r,t,e){if(e.length){let i=t.toArray(),n=e.toArray(),s=0;for(let o=0;o<r+1;o++)i[o].group&&i[o].group===n[s]&&s++;return s}return 0}function Xx(r,t,e,i){return r<e?r:r+t>e+i?Math.max(0,r-i+t):e}var Kx=(()=>{let t=class t{isErrorState(i,n){return!!(i&&i.invalid&&(i.touched||n&&n.submitted))}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275prov",dt({token:t,factory:t.\u0275fac,providedIn:"root"}));let r=t;return r})();var dp=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(t,e,i,n,s){this._defaultMatcher=t,this.ngControl=e,this._parentFormGroup=i,this._parentForm=n,this._stateChanges=s}updateErrorState(){var o;let t=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,n=this.ngControl?this.ngControl.control:null,s=(o=i==null?void 0:i.isErrorState(n,e))!=null?o:!1;s!==t&&(this.errorState=s,this._stateChanges.next())}};var Mi=(()=>{let t=class t{constructor(){F(ep)._applyBodyHighContrastModeCssClasse
11s()}};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({imports:[io,io]}));let r=t;return r})();var qx=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({imports:[Mi,Mi]}));let r=t;return r})();var Zx=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({imports:[Mi]}));let r=t;return r})();var Eg=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({imports:[qx,Mi,Zx]}));let r=t;return r})();var Qx=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({imports:[Mi,tp,Mi]}));let r=t;return r})();var GS=["trigger"],$S=["panel"],YS=[[["mat-select-trigger"]],"*"],XS=["mat-select-trigger","*"];function KS(r,t){if(r&1&&(D(0,"span",4),G(1),R()),r&2){let e=j();P(),Ct(e.placeholder)}}function qS(r,t){r&1&&ae(0)}function ZS(r,t){if(r&1&&(D(0,"span",11),G(1),R()),r&2){let e=j(2);P(),Ct(e.triggerValue)}}function QS(r,t){if(r&1&&(D(0,"span",5),q(1,qS,1,0)(2,ZS,2,1,"span",11),R()),r&2){let e=j();P(),de(e.customTrigger?1:2)}}function JS(r,t){if(r&1){let e=jt();D(0,"div",12,1),ut("keydown",function(n){yt(e);let s=j();return vt(s._handleKeydown(n))}),ae(2,1),R()}if(r&2){let e=j();Z0("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),we("mat-select-panel-animations-enabled",!e._animationsDisabled),V("ngClass",e.panelClass),Ii("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var Sg=new Wt("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let r=F(no);return()=>r.scrollStrategies.reposition()}});function Jx(r){return()=>r.scrollStrategies.reposition()}var tw=new Wt("MAT_SELECT_CONFIG"),ew={provide:Sg,deps:[no],useFactory:Jx},Pg=new Wt("MatSelectTrigger"),hp=class{source;value;constructor(t,e){this.source=t,this.value=e}},Tg=(()=>{var t,e,i,n,s,o,l;let c=class c{_viewportRuler=F($a);_changeDetectorRef=F(Jo);_elementRef=F(ne);_dir=F(eo,{optional:!0});_idGenerator=F(Nn);_renderer=F(Sc);_parentFormField=F(_g,{optional:!0});ngControl=F(bv,{self:!0,optional:!0});_liveAnnouncer=F(ag);_defaultOptions=F(tw,{optional:!0});_animationsDisabled=F(Sn,{optional:!0})==="NoopAnimations";_initialized=new Dt;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(d){let u=this.options.toArray()[d];if(u){let p=this.panel.nativeElement,g=Yx(d,this.options,this.optionGroups),_=u._getHostElement();d===0&&g===1?p.scrollTop=0:p.scrollTop=Xx(_.offsetTop,_.offsetHeight,p.scrollTop,p.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(d){return new hp(this,d)}_scrollStrategyFactory=F(Sg);_panelOpen=!1;_compareWith=(d,u)=>d===u;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new Dt;_errorStateTracker;stateChanges=new Dt;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=((t=this._defaultOptions)==null?void 0:t.overlayPanelClass)||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;disableRipple=!1;tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(d){this._hideSingleSelectionIndicator=d,this._syncParentProperties()}_hideSingleSelectionIndicator=(i=(e=this._defaultOptions)==null?void 0:e.hideSingleSelectionIndicator)!=null?i:!1;get placeholder(){return this._placeholder}set placeholder(d){this._placeholder=d,this.stateChanges.next()}_placeholder;get required(){var d,u,p,g;return(g=(p=this._required)!=null?p:(u=(d=this.ngControl)==null?void 0:d.control)==null?void 0:u.hasValidator(_v.required))!=null?g:!1}set required(d){this._required=d,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(d){this._selectionModel,this._multiple=d}_multiple=!1;disableOptionCentering=(s=(n=this._defaultOptions)==null?void 0:n.disableOptionCentering)!=null?s:!1;get compareWith(){return this._compareWith}set compareWith(d){this._compareWith=d,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(d){this._assignValue(d)&&this._onChange(d)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(d){this._errorStateTracker.matcher=d}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(d){this._id=d||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(d){this._errorStateTracker.errorState=d}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=(l=(o=this._defaultOptions)==null?void 0:o.canSelectNullableOptions)!=null?l:!1;optionSelectionChanges=V0(()=>{let d=this.options;return d?d.changes.pipe(Ys(d),Cu(()=>$s(...d.map(u=>u.onSelectionChange)))):this._initialized.pipe(Cu(()=>this.optionSelectionChanges))});openedChange=new Vt;
11_openedStream=this.openedChange.pipe(ui(d=>d),Cn(()=>{}));_closedStream=this.openedChange.pipe(ui(d=>!d),Cn(()=>{}));selectionChange=new Vt;valueChange=new Vt;constructor(){var _;let d=F(Kx),u=F(Bu,{optional:!0}),p=F(Av,{optional:!0}),g=F(new U0("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),((_=this._defaultOptions)==null?void 0:_.typeaheadDebounceInterval)!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new dp(d,this.ngControl,p,u,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=g==null?0:parseInt(g)||0,this.id=this.id}ngOnInit(){this._selectionModel=new zc(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(At(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(At(this._destroy)).subscribe(d=>{d.added.forEach(u=>u.select()),d.removed.forEach(u=>u.deselect())}),this.options.changes.pipe(Ys(null),At(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let d=this._getTriggerAriaLabelledby(),u=this.ngControl;if(d!==this._triggerAriaLabelledBy){let p=this._elementRef.nativeElement;this._triggerAriaLabelledBy=d,d?p.setAttribute("aria-labelledby",d):p.removeAttribute("aria-labelledby")}u&&(this._previousControl!==u.control&&(this._previousControl!==void 0&&u.disabled!==null&&u.disabled!==this.disabled&&(this.disabled=u.disabled),this._previousControl=u.control),this.updateErrorState())}ngOnChanges(d){(d.disabled||d.userAriaDescribedBy)&&this.stateChanges.next(),d.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){var d,u;(d=this._cleanupDetach)==null||d.call(this),(u=this._keyManager)==null||u.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){var d;this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),(d=this._cleanupDetach)==null||d.call(this),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(wu(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let d=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!d)return;let u=`${this.id}-panel`;this._trackedModal&&rp(this._trackedModal,"aria-owns",u),ug(d,"aria-owns",u),this._trackedModal=d}_clearFromModal(){if(!this._trackedModal)return;let d=`${this.id}-panel`;rp(this._trackedModal,"aria-owns",d),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){var g;if(this._animationsDisabled||!this.panel){this._detachOverlay();return}(g=this._cleanupDetach)==null||g.call(this),this._cleanupDetach=()=>{u(),clearTimeout(p),this._cleanupDetach=void 0};let d=this.panel.nativeElement,u=this._renderer.listen(d,"animationend",_=>{var y;_.animationName==="_mat-select-exit"&&((y=this._cleanupDetach)==null||y.call(this),this._detachOverlay())}),p=setTimeout(()=>{var _;(_=this._cleanupDetach)==null||_.call(this),this._detachOverlay()},200);d.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(d){this._assignValue(d)}registerOnChange(d){this._onChange=d}registerOnTouched(d){this._onTouched=d}setDisabledState(d){this.disabled=d,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){var d,u;return this.multiple?((d=this._selectionModel)==null?void 0:d.selected)||[]:(u=this._selectionModel)==null?void 0:u.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let d=this._selectionModel.selected.map(u=>u.viewValue);return this._isRtl()&&d.reverse(),d.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(d){this.disabled||(this.panelOpen?this._handleOpenKeydown(d):this._handleClosedKeydown(d))}_handleClosedKeydown(d){let u=d.keyCode,p=u===40||u===38||u===37||u===39,g=u===13||u===32,_=this._keyManager;if(!_.isTyping()&&g&&!Fn(d)||(this.multiple||d.altKey)&&p)d.preventDefault(),this.open();else if(!this.multiple){let y=this.selected;_.onKeydown(d);let C=this.selected;C&&y!==C&&this._liveAnnouncer.announce(C.viewValue,1e4)}}_handleOpenKeydown(d){let u=this._keyManager,p=d.keyCode,g=p===40||p===38,_=u.isTyping();if(g&&d.altKey)d.preventDefault(),this.close();else if(!_&&(p===13||p===32)&&u.activeItem&&!Fn(d))d.preventDefault(),u.activeItem._selectViaInteraction();else if(!_&&this._multiple&&p===65&&d.ctrlKey){d.preventDefault();let y=this.options.some(C=>!C.disabled&&!C.selected);this.options.forEach(C=>{C.disabled||(y?C.select():C.deselect())})}else{let y=u.activeItemIndex;u.onKeydown(d),this._multiple&&g&&d.shiftKey&&u.activeItem&&u.activeItemIndex!==y&&u.activeItem._selectViaInteraction()}}_handleOverlayKeydown(d){d.keyCode===27&&!Fn(d)&&(d.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){var d;this._focused=!1,(d=this._keyManager)==null||d.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}
11_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(d){if(this.options.forEach(u=>u.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&d)Array.isArray(d),d.forEach(u=>this._selectOptionByValue(u)),this._sortValues();else{let u=this._selectOptionByValue(d);u?this._keyManager.updateActiveItem(u):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(d){let u=this.options.find(p=>{if(this._selectionModel.isSelected(p))return!1;try{return(p.value!=null||this.canSelectNullableOptions)&&this._compareWith(p.value,d)}catch{return!1}});return u&&this._selectionModel.select(u),u}_assignValue(d){return d!==this._value||this._multiple&&Array.isArray(d)?(this.options&&this._setSelectionByValue(d),this._value=d,!0):!1}_skipPredicate=d=>this.panelOpen?!1:d.disabled;_getOverlayWidth(d){return this.panelWidth==="auto"?(d instanceof Ya?d.elementRef:d||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let d of this.options)d._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Bc(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let d=$s(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(At(d)).subscribe(u=>{this._onSelect(u.source,u.isUserInput),u.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),$s(...this.options.map(u=>u._stateChanges)).pipe(At(d)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(d,u){let p=this._selectionModel.isSelected(d);!this.canSelectNullableOptions&&d.value==null&&!this._multiple?(d.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(d.value)):(p!==d.selected&&(d.selected?this._selectionModel.select(d):this._selectionModel.deselect(d)),u&&this._keyManager.setActiveItem(d),this.multiple&&(this._sortValues(),u&&this.focus())),p!==this._selectionModel.isSelected(d)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let d=this.options.toArray();this._selectionModel.sort((u,p)=>this.sortComparator?this.sortComparator(u,p,d):d.indexOf(u)-d.indexOf(p)),this.stateChanges.next()}}_propagateChanges(d){let u;this.multiple?u=this.selected.map(p=>p.value):u=this.selected?this.selected.value:d,this._value=u,this.valueChange.emit(u),this._onChange(u),this.selectionChange.emit(this._getChangeEvent(u)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let d=-1;for(let u=0;u<this.options.length;u++)if(!this.options.get(u).disabled){d=u;break}this._keyManager.setActiveItem(d)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){var d;return!this._panelOpen&&!this.disabled&&((d=this.options)==null?void 0:d.length)>0&&!!this._overlayDir}focus(d){this._elementRef.nativeElement.focus(d)}_getPanelAriaLabelledby(){var p;if(this.ariaLabel)return null;let d=((p=this._parentFormField)==null?void 0:p.getLabelId())||null,u=d?d+" ":"";return this.ariaLabelledby?u+this.ariaLabelledby:d}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){var u;if(this.ariaLabel)return null;let d=((u=this._parentFormField)==null?void 0:u.getLabelId())||"";return this.ariaLabelledby&&(d+=" "+this.ariaLabelledby),d||(d=this._valueId),d}setDescribedByIds(d){d.length?this._elementRef.nativeElement.setAttribute("aria-describedby",d.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};k(c,"\u0275fac",function(u){return new(u||c)}),k(c,"\u0275cmp",kt({type:c,selectors:[["mat-select"]],contentQueries:function(u,p,g){if(u&1&&(Tn(g,Pg,5),Tn(g,Hc,5),Tn(g,Cg,5)),u&2){let _;
11Jt(_=te())&&(p.customTrigger=_.first),Jt(_=te())&&(p.options=_),Jt(_=te())&&(p.optionGroups=_)}},viewQuery:function(u,p){if(u&1&&(De(GS,5),De($S,5),De(Zu,5)),u&2){let g;Jt(g=te())&&(p.trigger=g.first),Jt(g=te())&&(p.panel=g.first),Jt(g=te())&&(p._overlayDir=g.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(u,p){u&1&&ut("keydown",function(_){return p._handleKeydown(_)})("focus",function(){return p._onFocus()})("blur",function(){return p._onBlur()}),u&2&&(Ii("id",p.id)("tabindex",p.disabled?-1:p.tabIndex)("aria-controls",p.panelOpen?p.id+"-panel":null)("aria-expanded",p.panelOpen)("aria-label",p.ariaLabel||null)("aria-required",p.required.toString())("aria-disabled",p.disabled.toString())("aria-invalid",p.errorState)("aria-activedescendant",p._getAriaActiveDescendant()),we("mat-mdc-select-disabled",p.disabled)("mat-mdc-select-invalid",p.errorState)("mat-mdc-select-required",p.required)("mat-mdc-select-empty",p.empty)("mat-mdc-select-multiple",p.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",Re],disableRipple:[2,"disableRipple","disableRipple",Re],tabIndex:[2,"tabIndex","tabIndex",d=>d==null?0:Hm(d)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Re],placeholder:"placeholder",required:[2,"required","required",Re],multiple:[2,"multiple","multiple",Re],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",Re],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",Hm],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",Re]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[os([{provide:gg,useExisting:c},{provide:Ag,useExisting:c}]),En],ngContentSelectors:XS,decls:11,vars:9,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(u,p){if(u&1){let g=jt();bi(YS),D(0,"div",2,0),ut("click",function(){return yt(g),vt(p.open())}),D(3,"div",3),q(4,KS,2,1,"span",4)(5,QS,3,1,"span",5),R(),D(6,"div",6)(7,"div",7),H0(),D(8,"svg",8),Q(9,"path",9),R()()()(),q(10,JS,3,10,"ng-template",10),ut("detach",function(){return yt(g),vt(p.close())})("backdropClick",function(){return yt(g),vt(p.close())})("overlayKeydown",function(y){return yt(g),vt(p._handleOverlayKeydown(y))})}if(u&2){let g=Pc(1);P(3),Ii("id",p._valueId),P(),de(p.empty?4:5),P(6),V("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",p._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",p._scrollStrategy)("cdkConnectedOverlayOrigin",p._preferredOverlayOrigin||g)("cdkConnectedOverlayPositions",p._positions)("cdkConnectedOverlayWidth",p._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)}},dependencies:[Ya,Zu,Fa],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}
11}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}
12`],encapsulation:2,changeDetection:0}));let r=c;return r})(),tP=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275dir",Me({type:t,selectors:[["mat-select-trigger"]],features:[os([{provide:Pg,useExisting:t}])]}));let r=t;return r})(),up=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({providers:[ew],imports:[sg,Eg,Mi,Ic,Qx,Eg,Mi]}
12));let r=t;return r})();var iw=(()=>{let t=class t{constructor(){}loadPageEvent(i,n){let s="#AC"+i,o=n==null?void 0:n.userName,l=n==null?void 0:n.customerId;console.log("AC analytic finalPageName="+s+" for customerid="+l+" username="+o),dataLayer.push({event:"Pageview",user_id:o,customer_id:l,url:s})}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=dt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var zF=(()=>{let t=class t{constructor(){}updatedFromIonic(){return"@CHANNEL_UPDATE@"}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=dt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var nw=Wa("Keyboard");var sw=(()=>{let t=class t{constructor(i){this._sanitizer=i}transform(i,n="html"){switch(n){case"html":return this._sanitizer.bypassSecurityTrustHtml(i);case"style":return this._sanitizer.bypassSecurityTrustStyle(i);case"script":return this._sanitizer.bypassSecurityTrustScript(i);case"url":return this._sanitizer.bypassSecurityTrustUrl(i);case"resourceUrl":return this._sanitizer.bypassSecurityTrustResourceUrl(i);default:throw new Error(`Invalid safe type specified: ${n}`)}}};t.\u0275fac=function(n){return new(n||t)(ct(mv,16))},t.\u0275pipe=q0({name:"safe",type:t,pure:!0,standalone:!1});let r=t;return r})();function sP(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),Q(3,"br"),R()),r&2&&(P(),Ct(nt(2,1,"debit_card.title")))}function oP(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),Q(3,"br"),R()),r&2&&(P(),Ct(nt(2,1,"debit_card.adtitle")))}function rP(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),Q(3,"br"),R()),r&2&&(P(),Ct(nt(2,1,"Virtual Card")))}function aP(r,t){if(r&1&&(D(0,"span",11),G(1),R()),r&2){let e=j(3);P(),Et(" ",e.pageCtrl.util.formatCardName(e.account==null||e.account.account==null?null:e.account.account.cardName,e.account==null||e.account.accountKey==null?null:e.account.accountKey.last4AccountNumber)," ")}}function lP(r,t){if(r&1&&(D(0,"span",11),G(1),Z(2,"translate"),R()),r&2){let e=j(3);P(),Gi(" ",nt(2,2,"account_selector.ending")," ",e.account==null||e.account.accountKey==null?null:e.account.accountKey.last4AccountNumber," ")}}function cP(r,t){if(r&1){let e=jt();D(0,"ion-toolbar",5)(1,"ion-title",6),q(2,sP,4,3,"span",0)(3,oP,4,3,"span",0)(4,rP,4,3,"span",0)(5,aP,2,1,"span",7)(6,lP,3,4,"span",7),R(),D(7,"ion-buttons",8)(8,"ion-button",9),ut("click",function(){yt(e);let n=j(2);return vt(n.closePage())}),Q(9,"ion-icon",10),R()()()}if(r&2){let e=j(2);qt(e.pageCtrl.styleUtil.getMenuPrimary()),P(2),V("ngIf",!e.shoppingpass&&!e.ssoURL&&!e.fromAutoDeduct),P(),V("ngIf",e.fromAutoDeduct),P(),V("ngIf",e.shoppingpass),P(),V("ngIf",e.account==null||e.account.account==null?null:e.account.account.cardName),P(),V("ngIf",!(!(e.account==null||e.account.account==null)&&e.account.account.cardName))}}function dP(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),Q(3,"br"),R()),r&2&&(P(),Ct(nt(2,1,"debit_card.title")))}function hP(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),Q(3,"br"),R()),r&2&&(P(),Ct(nt(2,1,"Virtual Card")))}function uP(r,t){if(r&1&&(D(0,"span",11),G(1),R()),r&2){let e=j(3);P(),Et(" ",e.pageCtrl.util.formatCardName(e.account==null||e.account.account==null?null:e.account.account.cardName,e.account==null||e.account.accountKey==null?null:e.account.accountKey.last4AccountNumber)," ")}}function pP(r,t){if(r&1&&(D(0,"span",11),G(1),Z(2,"translate"),R()),r&2){let e=j(3);P(),Gi(" ",nt(2,2,"account_selector.ending")," ",e.account==null||e.account.accountKey==null?null:e.account.accountKey.last4AccountNumber," ")}}function fP(r,t){if(r&1){let e=jt();D(0,"ion-toolbar")(1,"ion-button",12),ut("click",function(){yt(e);let n=j(2);return vt(n.closePage())}),Q(2,"ion-icon",13),R(),D(3,"ion-title",14),q(4,dP,4,3,"span",0)(5,hP,4,3,"span",0)(6,uP,2,1,"span",7)(7,pP,3,4,"span",7),R()()}if(r&2){let e=j(2);qt(e.pageCtrl.styleUtil.getMenuPrimary()),P(),qt(e.pageCtrl.styleUtil.getMenuPrimary()),P(3),V("ngIf",!e.shoppingpass&&!e.ssoURL),P(),V("ngIf",e.shoppingpass),P(),V("ngIf",e.account==null||e.account.account==null?null:e.account.account.cardName),P(),V("ngIf",!(!(e.account==null||e.account.account==null)&&e.account.account.cardName))}}function mP(r,t){if(r&1&&(D(0,"ion-header"),q(1,cP,10,7,"ion-toolbar",3)(2,fP,8,8,"ion-toolbar",4),R()),r&2){let e=j();
12P(),V("ngIf",!e.pageCtrl.platform.is("mobile")),P(),V("ngIf",e.pageCtrl.platform.is("mobile"))}}var ow=(()=>{let t=class t{constructor(i,n,s,o,l,c,h,d){this.navParams=i,this.api=n,this.pageCtrl=s,this.lookup=o,this.alertCtrl=l,this.util=c,this.modalCtrl=h,this.router=d}ngOnInit(){var p,g,_,y,C,x,I,A,E,L;this.paymentAmount=this.paymentAmount?this.paymentAmount:this.navParams.get("paymentAmount"),this.account=this.account?this.account:this.navParams.get("account"),this.paymentAccount=this.paymentAccount?this.paymentAccount:this.navParams.get("paymentaccount"),this.theme=this.theme?this.theme:this.navParams.get("theme"),this.lang=this.lang?this.lang:this.navParams.get("lang"),this.shoppingpass=this.shoppingpass?this.shoppingpass:this.navParams.get("shoppingpass"),console.log("debit shoppingpass="+this.shoppingpass+" fromAutoPromo=",this.fromAutoPromo+" promotion=",this.promotion);let i=this.pageCtrl.platform.getACCode(),n=i+"APP";var s;if(i=="FAC"||i=="FMC"||i=="HAC"||i=="EAC"||i=="FXC"||i=="CAC"||i=="IAC"||i=="AXC"||i=="KAC")s={base:{fontFamily:"Roboto"},invalid:{color:"#fa755a",iconColor:"#fa755a"},submit:{backgroundColor:this.getBackgroundButtonColor(i)}};else if(i=="AAC")s={base:{fontFamily:"Roboto"},invalid:{color:"#009490",iconColor:"#009490"},submit:{backgroundColor:"#025B5D"}};else if(i=="PAC")s={base:{fontFamily:"Roboto"},invalid:{color:"#525252",iconColor:"#525252"},submit:{backgroundColor:"#141414"}};else{let v="linear-gradient(0,#f17522 50%,#ffd800 140%)";this.pageCtrl.platform.isIEBrowser()&&(v="-ms-linear-gradient(top,#f17522 50%,#ffd800 140%)"),s={base:{fontFamily:"Roboto"},invalid:{color:"#fa755a",iconColor:"#fa755a"},submit:{backgroundImage:v}}}var o={onSubmitResponse:(v,S)=>{console.log(parent.location.href),v&&console.log("Iframed error=",v),S&&console.log("Iframed json=",S)}};let l=this.lookup.get("DEBITCARDURL")+"/index.html";this.launchApiName="/ols/s/tracking/",this.closeApiName="/ols/s/tracking/";
12let c={leadGenCompanyId:n,leadGenLocationId:n,leadGenName:n,referenceNumber:this.promotion?(p=this.promotion)==null?void 0:p.custContactWorkflowId:1},h={},d={},u={};if(this.promotion&&(u={vantageScoreEnrollmentInd:this.enrollVantage,paperlessEnrollmentInd:this.enrollPaperless,promoType:this.promotion.destinationUrl=="auto-statementbundle"?"STMTBUNDLE":"AUTODEDUCT"}),(this.fromAutoDeduct||this.fromAutoPromo)&&(d={cardNumber:(g=this.paymentAccount)==null?void 0:g.bankAccountNumber,expirationDate:this.paymentAccount.expirationDate,zipCode:this.customer.zipCode,autoDeductionMethod:this.autoDeductionMethod,bankAccountType:"D",autoDeductTranId:this.paymentAccount.cardToken},h={progSolNumber:this.account.accountKey.progSolNumber,accountNumber:this.account.accountKey.accountNumber,last4AccountNumber:this.account.accountKey.last4AccountNumber,cardHolderFirstName:(_=this.customer)==null?void 0:_.firstName.toUpperCase(),cardHolderLastName:(y=this.customer)==null?void 0:y.lastName.toUpperCase(),customerId:(C=this.customer)==null?void 0:C.customerId,language:this.pageCtrl.platform.trans.getDefaultLang(),systemIdentifier:this.account.account.systemIdentifier,brandDescription:this.account.accountKey.brandDescription,principalIdentifier:this.account.account.principalIdentifier}),this.paymentInfo&&(h={progSolNumber:this.account.accountKey.progSolNumber,accountNumber:this.account.accountKey.accountNumber,last4AccountNumber:this.account.accountKey.last4AccountNumber,cardHolderFirstName:(x=this.customer)==null?void 0:x.firstName.toUpperCase(),cardHolderLastName:(I=this.customer)==null?void 0:I.lastName.toUpperCase(),language:this.pageCtrl.platform.trans.getDefaultLang(),brandDescription:this.account.accountKey.brandDescription,customerId:(A=this.customer)==null?void 0:A.customerId,verifiedEmailInd:this.verifiedEmailInd}),console.log("debit card customer=",this.customer+" paymentInfo=",this.paymentInfo),this.ssoURL)this.url=this.ssoURL,this.pageCtrl.util.invokeTracking("on_success","zelleResponse");else if(this.shoppingpass){this.apiType="SP";let v=this.account.account.logo,M="https://"+this.lookup.getAccCode("homeURL")+"/m/images/UX/"+v+"_logo.png";console.log("shopping pass brandLogo="+M),this.url=`${l}?accountKey=${encodeURIComponent(JSON.stringify(this.account.accountKey))}&styles=${encodeURIComponent(JSON.stringify(s))}&token=${this.api.getToken()}&last4AccountNumber=${this.account.accountKey.last4AccountNumber}&applicationName=${n}&operatorID=${i}&language=${this.lang}&brandLogo=${M}`}else this.specialPrograms?(this.url=`${l}?paymentAmount=${this.paymentAmount}&serializedEventListeners=${encodeURIComponent(JSON.stringify(o))}&styles=${encodeURIComponent(JSON.stringify(s))}&clientInfo=${encodeURIComponent(JSON.stringify(c))}&paymentInfo=${encodeURIComponent(JSON.stringify(this.paymentInfo))}&accountInfo=${encodeURIComponent(JSON.stringify(h))}&specialPrograms=${encodeURIComponent(JSON.stringify(this.specialPrograms))}&spEnrollmentInfo=${encodeURIComponent(JSON.stringify(this.spEnrollmentInfo))}&programChannelCode=${n}&operatorId=${n}&functionality=makePayment`,this.paymentAccount&&this.paymentAccount.bankAccountType=="D"?this.url+=`&paymentAccount=${encodeURIComponent(JSON.stringify(this.paymentAccount))}`:this.url+='&paymentAccount=""',((E=this.operatorNotes)==null?void 0:E.length)>0&&(this.url+=`&operatorNotes=${this.operatorNotes}`)):this.fromAutoDeduct?this.url=`${l}?serializedEventListeners=${encodeURIComponent(JSON.stringify(o))}&styles=${encodeURIComponent(JSON.stringify(s))}&clientInfo=${encodeURIComponent(JSON.stringify(c))}&autoDeductInfo=${encodeURIComponent(JSON.stringify(d))}&accountInfo=${encodeURIComponent(JSON.stringify(h))}&programChannelCode=${n}&operatorId=${i}&functionality=setAccountAutoDeduct&language=${this.lang}`:this.fromAutoPromo?this.url=`${l}?serializedEventListeners=${encodeURIComponent(JSON.stringify(o))}&styles=${encodeURIComponent(JSON.stringify(s))}&clientInfo=${encodeURIComponent(JSON.stringify(c))}&autoDeductInfo=${encodeURIComponent(JSON.stringify(d))}&accountInfo=${encodeURIComponent(JSON.stringify(h))}&programChannelCode=${n}&operatorId=${i}&functionality=setAccountAutoDeduct&language=${this.lang}&programEnrollment=${encodeURIComponent(JSON.stringify(u))}&destinationURL=${(L=this.promotion)==null?void 0:L.destinationUrl}`:this.paymentInfo?this.url=`${l}?paymentAmount=${this.paymentAmount}&serializedEventListeners=${encodeURIComponent(JSON.stringify(o))}&styles=${encodeURIComponent(JSON.stringify(s))}&clientInfo=${encodeURIComponent(JSON.stringify(c))}&paymentInfo=${encodeURIComponent(JSON.stringify(this.paymentInfo))}&accountInfo=${encodeURIComponent(JSON.stringify(h))}&programChannelCode=${n}&operatorId=${i}&functionality=makePayment`:this.url=`${l}?paymentAmount=${this.paymentAmount}&serializedEventListeners=${encodeURIComponent(JSON.stringify(o))}&accountKey=${encodeURIComponent(JSON.stringify(this.account.accountKey))}&styles=${encodeURIComponent(JSON.stringify(s))}&token=${this.api.getToken()}&last4AccountNumber=${this.account.accountKey.last4AccountNumber}&applicationName=${n}&operatorID=${i}&language=${this.lang}`;
12this.ssoURL||(this.launchApiName+="launch"+this.apiType,this.closeApiName+="close"+this.apiType,console.log("debit url="+this.url+" launchApiName="+this.launchApiName+" closeApiName="+this.closeApiName),this.invokeLaunch(this.url),this.shoppingpass&&this.account.account.logo==="thd"&&this.invokeGenerateDigitalShoppingPass()),window.onmessage=this.onMessage.bind(this)}onMessage(i){var n,s;console.log("debit card onMessage Event=",i.data),i.data&&(((n=i.data.status)==null?void 0:n.toLowerCase())==="success"||((s=i.data.status)==null?void 0:s.toLowerCase())==="error"||i.data.event==="jha:ztk:message.frame.close")&&(this.response=i.data,console.log("debit card onMessage Event response="+this.response),this.pageCtrl.platform.isApp()&&nw.hide(),this.ssoURL?this.ssoURL&&this.pageCtrl.util.invokeTracking("on_close","zelleResponse"):this.invokeClose(JSON.stringify(i.data)),this.modalCtrl.dismiss(i.data))}onAlertCallback(i){this.router.navigate(["/base"])}closePage(){return O(this,null,function*(){this.ssoURL?this.ssoURL&&this.pageCtrl.util.invokeTracking("on_close","zelleResponse"):this.invokeClose("USEREXIT"),this.modalCtrl.dismiss(),this.response&&(console.log("Debit Card response="+this.response),this.response=="SUCCESS"?yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isSuccessAlert:!0,alertCallback:this.onAlertCallback.bind(this),message:this.pageCtrl.platform.translate("debit_card.success.message")}})).present():yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,alertCallback:this.onAlertCallback.bind(this),message:this.pageCtrl.platform.translate("debit_card.error.message")}})).present())})}ngOnDestroy(){window.onmessage=null}invokeGenerateDigitalShoppingPass(){return O(this,null,function*(){let i=yield this.api.post("/ols/s/customer/generateDigitalShoppingPass",{accountKey:this.account?this.account.accountKey:null});i&&i.outcome&&console.log("generateDigitalShoppingPass status="+i.outcome)})}invokeLaunch(i){return O(this,null,function*(){let n=yield this.api.post(this.launchApiName,{accountKey:this.account?this.account.accountKey:null,launchURL:i});n&&n.outcome&&console.log(this.launchApiName+" status="+n.outcome)})}invokeClose(i){return O(this,null,function*(){let n=yield this.api.post(this.closeApiName,{accountKey:this.account?this.account.accountKey:null,callbackData:i});n&&n.outcome&&console.log(this.closeApiName+" status="+n.outcome)})}getBackgroundButtonColor(i){return i=="CAC"||i=="HAC"||i=="EAC"?"#505050":i=="FAC"?"#0076A9":i=="FMC"?"#194892":i=="KAC"?"#112866":i=="FXC"?"#3C4543":i=="IAC"?"#006FDC":i=="AXC"?"#041E42":"#F57F26"}};t.\u0275fac=function(n){return new(n||t)(ct(zu),ct(Xi),ct(We),ct(Js),ct(Ua),ct(Dn),ct(Ue),ct(gv))},t.\u0275cmp=kt({type:t,selectors:[["app-debit-card"]],inputs:{paymentAmount:"paymentAmount",account:"account",customer:"customer",paymentInfo:"paymentInfo",matchPayAmount:"matchPayAmount",eligibleStatus:"eligibleStatus",paymentAccount:"paymentAccount",theme:"theme",lang:"lang",shoppingpass:"shoppingpass",apiType:"apiType",ssoURL:"ssoURL",specialPrograms:"specialPrograms",fromAutoDeduct:"fromAutoDeduct",fromAutoPromo:"fromAutoPromo",promotion:"promotion",enrollVantage:"enrollVantage",enrollPaperless:"enrollPaperless",autoDeductionMethod:"autoDeductionMethod",operatorNotes:"operatorNotes",verifiedEmailInd:"verifiedEmailInd",spEnrollmentInfo:"spEnrollmentInfo"},standalone:!1,decls:4,vars:6,consts:[[4,"ngIf"],[3,"--overflow"],["width","100%","height","100%",2,"border","none",3,"src"],["style","text-align:center;color:white;",3,"class",4,"ngIf"],[3,"class",4,"ngIf"],[2,"text-align","center","color","white"],[1,"global-font-17"],["class","global-font-13",4,"ngIf"],["slot","primary"],[1,"global-font-16",3,"click"],["name","close",2,"color","white"],[1,"global-font-13"],[1,"global-font-16",2,"float","left",3,"click"],["name","arrow-back"],[1,"myclass","mobile-title","global-font-17",2,"padding","0 0 0 50px !important","text-align","left","color","white"]],template:function(n,s){n&1&&(q(0,mP,3,2,"ion-header",0),D(1,"ion-content",1),Q(2,"iframe",2),Z(3,"safe"),R()),n&2&&(V("ngIf",!s.ssoURL),P(),V("--overflow",s.account?"hidden":""),P(),V("src",kn(3,3,s.url,"resourceUrl"),Y0))},dependencies:[Mn,Ba,za,Xs,Ks,$i,Ha,qs,Qs,sw],styles:[".scroll-content[_ngcontent-%COMP%]{overflow:hidden}"]});let r=t;return r})();var rw=(()=>{let t=class t{constructor(i,n){this.api=i,this.pageCtrl=n,this.acctTypes={C:"Checking",S:"Saving",D:"Debit"},this.invertAcctTypes={Checking:"C",Savings:"S",Debit:"D",C:"C",S:"S",D:"D"},this.addNewPaymentAccount=!1,this.newAcct={}}ngOnInit(){this.getPaymentAccounts()}getBankInfo(i){return O(this,null,function*(){let n=yield this.api.getBankName(i);(n==null?void 0:n.outcome)=="SUCCESS"?this.newAcctBankName=n.routingInfo.bankName:this.newAcctBankName=""})}getPaymentAccounts(i,n){return O(this,null,function*(){if((i==null?void 0:i.account.paycheckAutoDeductInd)=="Y"){this.getEPMPaymentAccounts(n);return}try{let s=yield this.api.post("/ols/s/customer/getCustomerPaymentAccounts",{});if((s==null?void 0:s.outcome)!="SUCCESS")throw"Outcome error";return console.log("base payment isModifyAuto="+this.isModifyAuto+" isAutoPay="+this.isAutoPay),this.isAutoPay?this.isModifyAuto?(this.paymentAccounts=s.paymentAccounts.filter(o=>o.bankAccountType=="C"),this.paymentAccounts.push({bankName:this.pageCtrl.platform.translate("payment.account.checkingtype"),bankAccountType:"C",isNewAccount:!0})):(this.paymentAccounts=s.paymentAccounts.filter(o=>o.bankAccountType=="C"||o.bankAccountType=="D"),this.paymentAccounts.push({bankName:this.pageCtrl.platform.translate("payment.account.checkingtype"),bankAccountType:"C",isNewAccount:!0}),this.paymentAccounts.push({bankName:this.pageCtrl.platform.translate("payment.card.type"),bankAccountType:"D",isDebitCard:!0})):(this.paymentAccounts=s.paymentAccounts,this.paymentAccounts.push({bankName:this.pageCtrl.platform.translate("payment.account.type"),isNewAccount:!0})),this.paymentAccounts}catch(s){return console.log("Failed to getCustomerPaymentAccounts err=",s),[]}})}payAcctSelect(i){this.addNewPaymentAccount=i&&i.isNewAccount}addBank(i){return O(this,null,function*(){let n=yield this.api.post("/ols/s/customer/addCustomerPaymentAccount",{paymentAccount:i});return(n==null?void 0:n.outcome)=="SUCCESS"?(console.log("Successfully added payment account"),console.log(n.paymentAccount),this.errors=null,n.paymentAccount):(console.log(n),this.errors=this.api.convertError(n),!1)})}getEPMPaymentAccounts(i){return O(this,null,function*(){try{let n=yield this.api.post("/ols/s/customer/getCustomerPaymentAccounts",{});if((n==null?void 0:n.outcome)!="SUCCESS")throw"Outcome error";return console.log("base payment isModifyAuto="+this.isModifyAuto+" isAutoPay="+this.isAutoPay),this.paymentAccounts=n.paymentAccounts.filter(s=>s.bankAccountType=="D"),this.paymentAccounts.push({bankName:this.pageCtrl.platform.translate("payment.card.type"),bankAccountType:"D",isDebitCard:!0}),i=="en"&&this.paymentAccounts.push({bankName:this.pageCtrl.platform.translate("payment.epmcard.type"),bankAccountType:"P",isDebitCard:!0}),this.paymentAccounts}catch(n){return console.log("Failed to getCustomerPaymentAccounts err=",n),[]}})}};t.\u0275fac=function(n){return new(n||t)(ct(Xi),ct(We))},t.\u0275cmp=kt({type:t,selectors:[["app-base-payment"]],inputs:{paymentAccounts:"paymentAccounts",paymentAccount:"paymentAccount",buttonLabel:"buttonLabel",addNewPaymentAccount:"addNewPaymentAccount",newAcct:"newAcct",endPoint:"endPoint",originalBankName:"originalBankName",originalBankType:"originalBankType",isAutoPay:"isAutoPay",isModifyAuto:"isModifyAuto"},standalone:!1,decls:0,vars:0,template:function(n,s){},encapsulation:2});let r=t;return r})();var gP=r=>({mybank:r});function _P(r,t){if(r&1&&(D(0,"span",19),G(1),R()),r&2){let e=j();P(),Et(" ",e.pageCtrl.util.formatCardName(e.account.account.cardName,e.account.account.last4AccountNumber)," ")}}function bP(r,t){if(r&1&&(D(0,"span",19),G(1),Z(2,"translate"),R()),r&2){let e=j();P(),Gi(" ",nt(2,2,"account_selector.ending")," ",e.account.account.last4AccountNumber," ")}}function yP(r,t){r&1&&(D(0,"span"),Q(1,"br")(2,"br"),D(3,"span",25),G(4),Z(5,"translate"),Z(6,"translate"),R(),Q(7,"br"),R()),r&2&&(P(4),Gi("",nt(5,2,"payment_confirmation.description3")," ",nt(6,4,"payment.card.type"),""))}function vP(r,t){if(r&1&&(D(0,"span"),Q(1,"br"),D(2,"span",21),G(3),Z(4,"translate"),R(),Q(5,"br")(6,"br"),D(7,"span",25),G(8),Z(9,"translate"),R(),Q(10,"br"),R()),r&2){let e=j(2);P(3),Gi("",nt(4,4,"payment_confirmation.description2")," ",e.util.convertSpanishDate(e.formattedDate,e.profile.config.getLanguage()),""),P(5),Gi("",nt(9,6,"payment_confirmation.description3")," ",e.paymentAccount.bankName,"")}}function xP(r,t){if(r&1&&(D(0,"span")(1,"span",25),G(2),Z(3,"translate"),R()()),r&2){let e=j(2);P(2),Et(" ",kn(3,1,"payment_confirmation.ach_text",In(4,gP,e.mybank))," ")}}function wP(r,t){if(r&1&&(D(0,"div",20),Q(1,"br"),D(2,"span",21),G(3),Z(4,"translate"),Q(5,"br")(6,"br"),R(),D(7,"span",22),G(8),Z(9,"currency"),R(),q(10,yP,8,6,"span",23)(11,vP,11,8,"span",23),D(12,"span",24),G(13),R(),Q(14,"br")(15,"br"),q(16,xP,4,6,"span",23),R()),r&2){let e=j();P(3),Et(" ",nt(4,6,"payment_confirmation.description1"),""),P(5),Et(" ",Lu(9,8,e.amount,"USD","symbol","1.2-2")," "),P(2),V("ngIf",e.paymentAccount.bankAccountType=="D"),P(),V("ngIf",e.paymentAccount.bankAccountType!="D"),P(2),Ct(e.util.showOnlyLastAndType(e.paymentAccount.bankAccountNumber,e.paymentAccount.bankAccountType,4)),P(3),V("ngIf",e.paymentAccount.bankAccountType!="D")}}function AP(r,t){if(r&1&&(D(0,"div",26),Q(1,"br"),G(2),Z(3,"translate"),Q(4,"br"),D(5,"span",27),G(6),Z(7,"translate"),R(),Q(8,"br"),D(9,"span",21),G(10),Z(11,"translate"),R(),Q(12,"br")(13,"br"),D(14,"span",25),G(15),R(),Q(16,"br"),D(17,"span",24),G(18),R(),Q(19,"br")(20,"br"),R()),r&2){let e=j();P(2),Et(" ",nt(3,5,"autopay_confirmation.description1")," "),P(4),Et(" ",nt(7,7,e.amountChoices[e.amountChoice])," "),P(4),Ct(nt(11,9,"auto
12pay_confirmation.description2")),P(5),Ct(e.paymentAccount.bankName),P(3),Ct(e.util.showOnlyLastAndType(e.amountNumber,e.amountType,4))}}function CP(r,t){if(r&1&&(D(0,"div",26),Q(1,"br"),G(2),Z(3,"translate"),Q(4,"br"),D(5,"span",27),G(6),Z(7,"translate"),R(),Q(8,"br"),D(9,"span",21),G(10),Z(11,"translate"),R(),Q(12,"br")(13,"br"),D(14,"span",25),G(15),Z(16,"translate"),R(),D(17,"span",24),G(18),R(),Q(19,"br")(20,"br"),R()),r&2){let e=j();P(2),Et(" ",nt(3,5,"autopay_confirmation.description1")," "),P(4),Et(" ",nt(7,7,e.amountChoices[e.autoDeductMethod])," "),P(4),Ct(nt(11,9,"autopay_confirmation.description2")),P(5),Ct(nt(16,11,"payment.card.type")),P(3),Ct(e.util.showOnlyLastAndType(e.amountNumber,e.amountType,4))}}function EP(r,t){if(r&1&&(D(0,"div",28),Q(1,"br")(2,"br"),D(3,"span",29),G(4),Z(5,"translate"),Z(6,"translate"),Z(7,"translate"),Q(8,"br")(9,"br"),G(10),Z(11,"translate"),R()()),r&2){let e=j();P(4),iv(" ",nt(5,5,"Automatic payments will occur on the")," ",e.paymentDueDay," ",nt(6,7,"of each month, which is your regular Payment Due Date.")," ",nt(7,9,"payment_confirmation.paymentinfo")," "),P(6),Et("",nt(11,11,"payment_confirmation.payment_reminder_email")," ")}}var Dg=(()=>{let t=class t{constructor(i,n,s,o,l,c){var h,d,u;this.navParams=i,this.modalCtrl=n,this.util=s,this.profile=o,this.lookup=l,this.pageCtrl=c,this.accode=this.pageCtrl.platform.getACCode(),this.amountChoices={minPaymentDue:this.accode=="FXC"?this.pageCtrl.platform.translate("balance.label.payment_due"):"Minimum Payment",statementBalance:"Statement Balance"},this.account=this.navParams.get("account"),this.amount=this.navParams.get("amount"),this.paymentAccount=this.navParams.get("paymentAccount"),this.amountChoice=this.navParams.get("amountChoice"),this.date=this.navParams.get("date"),this.formattedDate=Hv(new Date(this.date),"MMM do"),this.callback=this.navParams.get("callback"),this.theme=this.navParams.get("theme"),this.amountType=this.navParams.get("amountType"),this.amountNumber=this.navParams.get("amountNumber"),this.paymentDueDay=this.account.account.paymentDueDay,this.mybank="The Bank of Missouri",(((h=this.pageCtrl)==null?void 0:h.util.getUtilPlatformCode())==="IAC"||((d=this.pageCtrl)==null?void 0:d.util.getUtilPlatformCode())==="FXC")&&(this.mybank="WebBank"),((u=this.pageCtrl)==null?void 0:u.util.getUtilPlatformCode())==="AXC"&&(this.mybank="Axiom Bank")}close(){this.modalCtrl.dismiss(this.fromSetupAutoPay)}submit(){let i=document.getElementById("mysubmitid");i&&i.setAttribute("disabled","true"),this.modalCtrl.dismiss(),this.callback()}getAcctImg(i){return"https://"+this.lookup.getAccCode("homeURL")+"/m/images/UX/"+i+".svg"}};t.\u0275fac=function(n){return new(n||t)(ct(zu),ct(Ue),ct(Dn),ct(to),ct(Js),ct(We))},t.\u0275cmp=kt({type:t,selectors:[["app-payment-confirmation"]],inputs:{fromDebitcard:"fromDebitcard",fromSetupAutoPay:"fromSetupAutoPay",autoDeductMethod:"autoDeductMethod"},standalone:!1,decls:31,vars:20,consts:[[1,"header"],[1,"brand-logo"],[3,"src"],[2,"padding-top","12px"],[1,"global-font-15","font-family-black","header-title"],["class","global-font-12 font-family-light header-subtitle",4,"ngIf"],["slot","primary"],[1,"global-font-16",3,"click"],["name","close-circle-outline",2,"color","#FFF"],[1,"section",2,"border-bottom","0px solid #cccccc"],["inset",""],[2,"--inner-border-width","0","border-bottom","1px solid #ccc"],["class","small-text payment-conf-info",4,"ngIf"],["class","small-text","style","text-align:center;color:black !important; margin: auto;",4,"ngIf"],["text-justify","",4,"ngIf"],[1,"dialog-button-box"],["size","6"],["expand","block","strong","","size","default",3,"click"],["id","mysubmitid","expand","block","strong","","size","default",2,"font-size","1.6rem !important",3,"click"],[1,"global-font-12","font-family-light","header-subtitle"],[1,"small-text","payment-conf-info"],[2,"color","black !important"],[1,"value-text",2,"color","black !important"],[4,"ngIf"],[1,"small-text","small-text-light",2,"color","black !important"],[1,"small-text",2,"color","black !important"],[1,"small-text",2,"text-align","center","color","black !important","margin","auto"],[1,"payment-text",2,"color","black !important","font-weight","bold !important"],["text-justify",""],[1,"small-text-12",2,"color","black !important"]],template:function(n,s){n&1&&(D(0,"ion-header")(1,"ion-toolbar",0)(2,"ion-avatar",1),Q(3,"img",2),R(),D(4,"div",3)(5,"span",4),G(6),R(),Q(7,"br"),q(8,_P,2,1,"span",5)(9,bP,3,4,"span",5),R(),D(10,"ion-buttons",6)(11,"ion-button",7),ut("click",function(){return s.close()}),Q(12,"ion-icon",8),R()()()(),D(13,"ion-content")(14,"div",9)(15,"ion-list",10)(16,"ion-item",11),q(17,wP,17,13,"div",12)(18,AP,21,11,"div",13)(19,CP,21,13,"div",13),R(),q(20,EP,12,13,"div",14),R()()(),D(21,"ion-footer")(22,"ion-row",15)(23,"ion-col",16)(24,"ion-button",17),ut("click",function(){return s.close()}),G(25),Z(26,"translate"),R()(),D(27,"ion-col",16)(28,"ion-button",18),ut("click",function(){return s.submit()}
12),G(29),Z(30,"translate"),R()()()()),n&2&&(P(),qt(s.pageCtrl.styleUtil.getMenuPrimary()),P(2),V("src",(s.pageCtrl==null?null:s.pageCtrl.util.getUtilPlatformCode())==="FXC"?s.getAcctImg("fxt"):s.pageCtrl.util.getAcctImg(s.account==null||s.account.account==null?null:s.account.account.logo,s.pageCtrl.util.isAACType(s.account==null||s.account.account==null?null:s.account.account.logo)?"aca":void 0),Pn),P(3),Et(" ",s.account.account.logo==="thd"?"Home Improver Card":s.account.account.brandDescription," "),P(2),V("ngIf",s.account.account==null?null:s.account.account.cardName),P(),V("ngIf",!(s.account.account!=null&&s.account.account.cardName)),P(8),V("ngIf",(s.amount||!s.amountChoice)&&!s.fromDebitcard),P(),V("ngIf",s.amountChoice),P(),V("ngIf",s.fromDebitcard),P(),V("ngIf",s.amountChoice||s.fromDebitcard),P(4),qt(s.pageCtrl.util.getSecondButton()),P(),Et(" ",nt(26,16,s.fromSetupAutoPay?"global.button.no_return":"global.button.no_cancel")," "),P(3),qt(s.pageCtrl.util.getButtonClass()),P(),Ct(nt(30,18,"global.button.yes_continue")))},dependencies:[Mn,Tv,Ba,za,Va,Xs,kv,Ks,$i,Vu,ju,ja,qs,Nu,Qs],styles:["ion-content[_ngcontent-%COMP%]{display:contents}ion-content[_ngcontent-%COMP%]::part(scroll){position:static}.payment-conf-info[_ngcontent-%COMP%]{padding-top:2%;text-align:center;color:#000!important;margin:0 auto}.payment-text[_ngcontent-%COMP%]{font-family:var(--ion-font-family-regular);font-size:1.6rem!important}.payment-no-margin[_ngcontent-%COMP%]{padding-left:2%;margin:0!important}.dialog-button-box[_ngcontent-%COMP%]{background-color:#f2f2f2;padding:12px}.header-title[_ngcontent-%COMP%]{height:17px;width:187px;color:#fff;letter-spacing:0;line-height:17px}.header-subtitle[_ngcontent-%COMP%]{height:15px;width:172px;color:var(--ion-color-3-AAC);letter-spacing:0;line-height:15px}.brand-logo[_ngcontent-%COMP%]{height:50px;width:50px;float:left;padding:16px 6px 6px}.header[_ngcontent-%COMP%]{height:62px;padding-top:unset;background:linear-gradient(180deg,#059496,#025b5d)}"]});let r=t;return r})();var Kl={};O0(Kl,{AbortException:()=>AT,AnnotationEditorLayer:()=>CT,AnnotationEditorParamsType:()=>ET,AnnotationEditorType:()=>ry,AnnotationEditorUIManager:()=>ST,AnnotationLayer:()=>PT,AnnotationMode:()=>TT,ColorPicker:()=>IT,DOMSVGFactory:()=>kT,DrawLayer:()=>MT,FeatureTest:()=>DT,GlobalWorkerOptions:()=>ay,ImageKind:()=>RT,InvalidPDFException:()=>LT,MissingPDFException:()=>OT,OPS:()=>NT,OutputScale:()=>FT,PDFDataRangeTransport:()=>BT,PDFDateString:()=>zT,PDFWorker:()=>VT,PasswordResponses:()=>jT,PermissionFlag:()=>HT,PixelsPerInch:()=>UT,RenderingCancelledException:()=>WT,TextLayer:()=>GT,UnexpectedResponseException:()=>$T,Util:()=>YT,VerbosityLevel:()=>ly,XfaLayer:()=>XT,build:()=>KT,createValidAbsoluteUrl:()=>qT,fetchData:()=>ZT,getDocument:()=>cy,getFilenameFromUrl:()=>QT,getPdfFilenameFromUrl:()=>JT,getXfaPageViewport:()=>tI,isDataScheme:()=>eI,isPdfFile:()=>iI,noContextMenu:()=>nI,normalizeUnicode:()=>sI,setLayerDimensions:()=>oI,shadow:()=>rI,version:()=>Mh});var ld={};ld.d=(r,t)=>{for(var e in t)ld.o(t,e)&&!ld.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})};ld.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t);var _t=globalThis.pdfjsLib={};ld.d(_t,{AbortException:()=>Ls,AnnotationEditorLayer:()=>wT,AnnotationEditorParamsType:()=>gt,AnnotationEditorType:()=>St,AnnotationEditorUIManager:()=>md,AnnotationLayer:()=>Ab,AnnotationMode:()=>lo,ColorPicker:()=>Tf,DOMSVGFactory:()=>vd,DrawLayer:()=>qb,FeatureTest:()=>ei,GlobalWorkerOptions:()=>vn,ImageKind:()=>xp,InvalidPDFException:()=>Qp,MissingPDFException:()=>Rs,OPS:()=>cn,OutputScale:()=>fd,PDFDataRangeTransport:()=>ff,PDFDateString:()=>cd,PDFWorker:()=>rl,PasswordResponses:()=>kP,PermissionFlag:()=>IP,PixelsPerInch:()=>Po,RenderingCancelledException:()=>pd,TextLayer:()=>bd,UnexpectedResponseException:()=>Xl,Util:()=>ot,VerbosityLevel:()=>Gf,XfaLayer:()=>_f,build:()=>vT,createValidAbsoluteUrl:()=>LP,fetchData:()=>Kf,getDocument:()=>gT,getFilenameFromUrl:()=>HP,getPdfFilenameFromUrl:()=>UP,getXfaPageViewport:()=>WP,isDataScheme:()=>qf,isPdfFile:()=>ey,noContextMenu:()=>on,normalizeUnicode:()=>zP,setLayerDimensions:()=>ta,shadow:()=>Ot,version:()=>yT});var di=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),Aw=[1,0,0,1,0,0],Bg=[.001,0,0,.001,0,0],SP=1e7,vp=1.35,PP=.35,x2=PP/vp,Bi={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},lo={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},TP="pdfjs_internal_editor_",St={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15}
12,gt={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},IP={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},oi={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},xp={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Le={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};var Wc={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};var Gf={ERRORS:0,WARNINGS:1,INFOS:5},cn={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},kP={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},$f=Gf.WARNINGS;function MP(r){Number.isInteger(r)&&($f=r)}function DP(){return $f}function Yf(r){$f>=Gf.INFOS&&console.log(`Info: ${r}`)}function Tt(r){$f>=Gf.WARNINGS&&console.log(`Warning: ${r}`)}function re(r){throw new Error(r)}function Be(r,t){r||re(t)}function RP(r){switch(r==null?void 0:r.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function LP(r,t=null,e=null){if(!r)return null;try{if(e&&typeof r=="string"){if(e.addDefaultProtocol&&r.startsWith("www.")){let n=r.match(/\./g);(n==null?void 0:n.length)>=2&&(r=`http://${r}`)}if(e.tryConvertEncoding)try{r=BP(r)}catch{}}let i=t?new URL(r,t):new URL(r);if(RP(i))return i}catch{}return null}function Ot(r,t,e,i=!1){return Object.defineProperty(r,t,{value:e,enumerable:!i,configurable:!0,writable:!1}),e}var ko=function(){function t(e,i){this.message=e,this.name=i}return t.prototype=new Error,t.constructor=t,t}(),dd=class extends ko{constructor(t,e){super(t,"PasswordException"),this.code=e}},hd=class extends ko{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}},Qp=class extends ko{constructor(t){super(t,"InvalidPDFException")}},Rs=class extends ko{constructor(t){super(t,"MissingPDFException")}},Xl=class extends ko{constructor(t,e){super(t,"UnexpectedResponseException"),this.status=e}},zg=class extends ko{constructor(t){super(t,"FormatError")}},Ls=class extends ko{constructor(t){super(t,"AbortException")}};function Cw(r){(typeof r!="object"||(r==null?void 0:r.length)===void 0)&&re("Invalid argument for bytesToString");let t=r.length,e=8192;if(t<e)return String.fromCharCode.apply(null,r);let i=[];for(let n=0;n<t;n+=e){let s=Math.min(n+e,t),o=r.subarray(n,s);i.push(String.fromCharCode.apply(null,o))}return i.join("")}function Xf(r){typeof r!="string"&&re("Invalid argument for stringToBytes");let t=r.length,e=new Uint8Array(t);for(let i=0;i<t;++i)e[i]=r.charCodeAt(i)&255;return e}function OP(r){return String.fromCharCode(r>>24&255,r>>16&255,r>>8&255,r&255)}function Jb(r){let t=Object.create(null);for(let[e,i]of r)t[e]=i;return t}function NP(){let r=new Uint8Array(4);return r[0]=1,new Uint32Array(r.buffer,0,1)[0]===1}function FP(){try{return new Function(""),!0}catch{return!1}}var ei=class{static get isLittleEndian(){return Ot(this,"isLittleEndian",NP())}static get isEvalSupported(){return Ot(this,"isEvalSupported",FP())}static get isOffscreenCanvasSupported(){return Ot(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="str
12ing"?Ot(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):Ot(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var t,e;return Ot(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}},Rg=Array.from(Array(256).keys(),r=>r.toString(16).padStart(2,"0")),Ms,wp,Vg,ot=class{static makeHexColor(t,e,i){return`#${Rg[t]}${Rg[e]}${Rg[i]}`}static scaleMinMax(t,e){let i;t[0]?(t[0]<0&&(i=e[0],e[0]=e[2],e[2]=i),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(i=e[1],e[1]=e[3],e[3]=i),e[1]*=t[3],e[3]*=t[3]):(i=e[0],e[0]=e[1],e[1]=i,i=e[2],e[2]=e[3],e[3]=i,t[1]<0&&(i=e[1],e[1]=e[3],e[3]=i),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(i=e[0],e[0]=e[2],e[2]=i),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){let i=t[0]*e[0]+t[1]*e[2]+e[4],n=t[0]*e[1]+t[1]*e[3]+e[5];return[i,n]}static applyInverseTransform(t,e){let i=e[0]*e[3]-e[1]*e[2],n=(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/i,s=(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/i;return[n,s]}static getAxialAlignedBoundingBox(t,e){let i=this.applyTransform(t,e),n=this.applyTransform(t.slice(2,4),e),s=this.applyTransform([t[0],t[3]],e),o=this.applyTransform([t[2],t[1]],e);return[Math.min(i[0],n[0],s[0],o[0]),Math.min(i[1],n[1],s[1],o[1]),Math.max(i[0],n[0],s[0],o[0]),Math.max(i[1],n[1],s[1],o[1])]}static inverseTransform(t){let e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){let e=[t[0],t[2],t[1],t[3]],i=t[0]*e[0]+t[1]*e[2],n=t[0]*e[1]+t[1]*e[3],s=t[2]*e[0]+t[3]*e[2],o=t[2]*e[1]+t[3]*e[3],l=(i+o)/2,c=Math.sqrt((i+o)**2-4*(i*o-s*n))/2,h=l+c||1,d=l-c||1;return[Math.sqrt(h),Math.sqrt(d)]}static normalizeRect(t){let e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){let i=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),n=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(i>n)return null;let s=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),o=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return s>o?null:[i,s,n,o]}static bezierBoundingBox(t,e,i,n,s,o,l,c,h){return h?(h[0]=Math.min(h[0],t,l),h[1]=Math.min(h[1],e,c),h[2]=Math.max(h[2],t,l),h[3]=Math.max(h[3],e,c)):h=[Math.min(t,l),Math.min(e,c),Math.max(t,l),Math.max(e,c)],f(this,Ms,Vg).call(this,t,i,s,l,e,n,o,c,3*(-t+3*(i-s)+l),6*(t-2*i+s),3*(i-t),h),f(this,Ms,Vg).call(this,t,i,s,l,e,n,o,c,3*(-e+3*(n-o)+c),6*(e-2*n+o),3*(n-e),h),h}};Ms=new WeakSet,wp=function(t,e,i,n,s,o,l,c,h,d){if(h<=0||h>=1)return;let u=1-h,p=h*h,g=p*h,_=u*(u*(u*t+3*h*e)+3*p*i)+g*n,y=u*(u*(u*s+3*h*o)+3*p*l)+g*c;d[0]=Math.min(d[0],_),d[1]=Math.min(d[1],y),d[2]=Math.max(d[2],_),d[3]=Math.max(d[3],y)},Vg=function(t,e,i,n,s,o,l,c,h,d,u,p){if(Math.abs(h)<1e-12){Math.abs(d)>=1e-12&&f(this,Ms,wp).call(this,t,e,i,n,s,o,l,c,-u/d,p);return}let g=d**2-4*u*h;if(g<0)return;let _=Math.sqrt(g),y=2*h;f(this,Ms,wp).call(this,t,e,i,n,s,o,l,c,(-d+_)/y,p),f(this,Ms,wp).call(this,t,e,i,n,s,o,l,c,(-d-_)/y,p)},b(ot,Ms);function BP(r){return decodeURIComponent(escape(r))}var Lg=null,aw=null;function zP(r){return Lg||(Lg=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,aw=new Map([["\uFB05","\u017Ft"]])),r.replaceAll(Lg,(t,e,i)=>e?e.normalize("NFKC"):aw.get(i))}function VP(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();let r=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(r);else for(let t=0;t<32;t++)r[t]=Math.floor(Math.random()*255);return Cw(r)}var ty="pdfjs_internal_id_",as={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};function jP(r){return Uint8Array.prototype.toBase64?r.toBase64():btoa(Cw(r))}var cs="http://www.w3.org/2000/svg",ar=class ar{};k(ar,"CSS",96),k(ar,"PDF",72),k(ar,"PDF_TO_CSS_UNITS",ar.CSS/ar.PDF);var Po=ar;function Kf(r,t="text"){return O(this,null,function*(){if(Yc(r,document.baseURI)){let e=yield fetch(r);if(!e.ok)throw new Error(e.statusText);switch(t){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"json":return e.json()}return e.text()}return new Promise((e,i)=>{let n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType=t,n.onreadystatechange=()=>{if(n.readyState===XMLHttpRequest.DONE){if(n.status===200||n.status===0){switch(t){case"arraybuffer":case"blob":case"json":e(n.response);return}e(n.responseText);return}i(new Error(n.statusText))}},n.send(null)})})}
12var ud=class r{constructor({viewBox:t,scale:e,rotation:i,offsetX:n=0,offsetY:s=0,dontFlip:o=!1}){this.viewBox=t,this.scale=e,this.rotation=i,this.offsetX=n,this.offsetY=s;let l=(t[2]+t[0])/2,c=(t[3]+t[1])/2,h,d,u,p;switch(i%=360,i<0&&(i+=360),i){case 180:h=-1,d=0,u=0,p=1;break;case 90:h=0,d=1,u=1,p=0;break;case 270:h=0,d=-1,u=-1,p=0;break;case 0:h=1,d=0,u=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(u=-u,p=-p);let g,_,y,C;h===0?(g=Math.abs(c-t[1])*e+n,_=Math.abs(l-t[0])*e+s,y=(t[3]-t[1])*e,C=(t[2]-t[0])*e):(g=Math.abs(l-t[0])*e+n,_=Math.abs(c-t[1])*e+s,y=(t[2]-t[0])*e,C=(t[3]-t[1])*e),this.transform=[h*e,d*e,u*e,p*e,g-h*e*l-u*e*c,_-d*e*l-p*e*c],this.width=y,this.height=C}get rawDims(){let{viewBox:t}=this;return Ot(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:i=this.offsetX,offsetY:n=this.offsetY,dontFlip:s=!1}={}){return new r({viewBox:this.viewBox.slice(),scale:t,rotation:e,offsetX:i,offsetY:n,dontFlip:s})}convertToViewportPoint(t,e){return ot.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){let e=ot.applyTransform([t[0],t[1]],this.transform),i=ot.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],i[0],i[1]]}convertToPdfPoint(t,e){return ot.applyInverseTransform([t,e],this.transform)}},pd=class extends ko{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}};function qf(r){let t=r.length,e=0;for(;e<t&&r[e].trim()==="";)e++;return r.substring(e,e+5).toLowerCase()==="data:"}function ey(r){return typeof r=="string"&&/\.pdf$/i.test(r)}function HP(r){return[r]=r.split(/[#?]/,1),r.substring(r.lastIndexOf("/")+1)}function UP(r,t="document.pdf"){if(typeof r!="string")return t;if(qf(r))return Tt('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;let e=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=e.exec(r),s=i.exec(n[1])||i.exec(n[2])||i.exec(n[3]);if(s&&(s=s[0],s.includes("%")))try{s=i.exec(decodeURIComponent(s))[0]}catch{}return s||t}var Jp=class{started=Object.create(null);times=[];time(t){t in this.started&&Tt(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||Tt(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){let t=[],e=0;for(let{name:i}of this.times)e=Math.max(i.length,e);for(let{name:i,start:n,end:s}of this.times)t.push(`${i.padEnd(e)} ${s-n}ms
13`);return t.join("")}};function Yc(r,t){try{let{protocol:e}=t?new URL(r,t):new URL(r);return e==="http:"||e==="https:"}catch{return!1}}function on(r){r.preventDefault()}function lw(r){console.log("Deprecated API usage: "+r)}var Cd,cd=class{static toDateObject(t){if(!t||typeof t!="string")return null;a(this,Cd)||m(this,Cd,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));let e=a(this,Cd).exec(t);if(!e)return null;let i=parseInt(e[1],10),n=parseInt(e[2],10);n=n>=1&&n<=12?n-1:0;let s=parseInt(e[3],10);s=s>=1&&s<=31?s:1;let o=parseInt(e[4],10);o=o>=0&&o<=23?o:0;let l=parseInt(e[5],10);l=l>=0&&l<=59?l:0;let c=parseInt(e[6],10);c=c>=0&&c<=59?c:0;let h=e[7]||"Z",d=parseInt(e[8],10);d=d>=0&&d<=23?d:0;let u=parseInt(e[9],10)||0;return u=u>=0&&u<=59?u:0,h==="-"?(o+=d,l+=u):h==="+"&&(o-=d,l-=u),new Date(Date.UTC(i,n,s,o,l,c))}};Cd=new WeakMap,b(cd,Cd);function WP(r,{scale:t=1,rotation:e=0}){let{width:i,height:n}=r.attributes.style,s=[0,0,parseInt(i),parseInt(n)];return new ud({viewBox:s,scale:t,rotation:e})}function iy(r){if(r.startsWith("#")){let t=parseInt(r.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return r.startsWith("rgb(")?r.slice(4,-1).split(",").map(t=>parseInt(t)):r.startsWith("rgba(")?r.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(Tt(`Not a valid color format: "${r}"`),[0,0,0])}function GP(r){let t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(let e of r.keys()){t.style.color=e;let i=window.getComputedStyle(t).color;r.set(e,iy(i))}t.remove()}function pe(r){let{a:t,b:e,c:i,d:n,e:s,f:o}=r.getTransform();return[t,e,i,n,s,o]}function ls(r){let{a:t,b:e,c:i,d:n,e:s,f:o}=r.getTransform().invertSelf();return[t,e,i,n,s,o]}function ta(r,t,e=!1,i=!0){if(t instanceof ud){let{pageWidth:n,pageHeight:s}=t.rawDims,{style:o}=r,l=ei.isCSSRoundSupported,c=`var(--scale-factor) * ${n}px`,h=`var(--scale-factor) * ${s}px`,d=l?`round(down, ${c}, var(--scale-round-x, 1px))`:`calc(${c}
13)`,u=l?`round(down, ${h}, var(--scale-round-y, 1px))`:`calc(${h})`;!e||t.rotation%180===0?(o.width=d,o.height=u):(o.width=u,o.height=d)}i&&r.setAttribute("data-main-rotation",t.rotation)}var fd=class{constructor(){let t=window.devicePixelRatio||1;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}},co,dr,dn,hr,Ed,Sd,kf,Ew,mi,Sw,Pw,Ap,Tw,Hg,ds=class ds{constructor(t){b(this,mi);b(this,co,null);b(this,dr,null);b(this,dn);b(this,hr,null);b(this,Ed,null);m(this,dn,t),a(ds,Sd)||m(ds,Sd,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){let t=m(this,co,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");let e=a(this,dn)._uiManager._signal;t.addEventListener("contextmenu",on,{signal:e}),t.addEventListener("pointerdown",f(ds,kf,Ew),{signal:e});let i=m(this,hr,document.createElement("div"));i.className="buttons",t.append(i);let n=a(this,dn).toolbarPosition;if(n){let{style:s}=t,o=a(this,dn)._uiManager.direction==="ltr"?1-n[0]:n[0];s.insetInlineEnd=`${100*o}%`,s.top=`calc(${100*n[1]}% + var(--editor-toolbar-vert-offset))`}return f(this,mi,Tw).call(this),t}get div(){return a(this,co)}hide(){var t;a(this,co).classList.add("hidden"),(t=a(this,dr))==null||t.hideDropdown()}show(){var t;a(this,co).classList.remove("hidden"),(t=a(this,Ed))==null||t.shown()}addAltText(t){return O(this,null,function*(){let e=yield t.render();f(this,mi,Ap).call(this,e),a(this,hr).prepend(e,a(this,mi,Hg)),m(this,Ed,t)})}addColorPicker(t){m(this,dr,t);let e=t.renderButton();f(this,mi,Ap).call(this,e),a(this,hr).prepend(e,a(this,mi,Hg))}remove(){var t;a(this,co).remove(),(t=a(this,dr))==null||t.destroy(),m(this,dr,null)}};co=new WeakMap,dr=new WeakMap,dn=new WeakMap,hr=new WeakMap,Ed=new WeakMap,Sd=new WeakMap,kf=new WeakSet,Ew=function(t){t.stopPropagation()},mi=new WeakSet,Sw=function(t){a(this,dn)._focusEventsAllowed=!1,t.preventDefault(),t.stopPropagation()},Pw=function(t){a(this,dn)._focusEventsAllowed=!0,t.preventDefault(),t.stopPropagation()},Ap=function(t){let e=a(this,dn)._uiManager._signal;t.addEventListener("focusin",f(this,mi,Sw).bind(this),{capture:!0,signal:e}),t.addEventListener("focusout",f(this,mi,Pw).bind(this),{capture:!0,signal:e}),t.addEventListener("contextmenu",on,{signal:e})},Tw=function(){let{editorType:t,_uiManager:e}=a(this,dn),i=document.createElement("button");i.className="delete",i.tabIndex=0,i.setAttribute("data-l10n-id",a(ds,Sd)[t]),f(this,mi,Ap).call(this,i),i.addEventListener("click",n=>{e.delete()},{signal:e._signal}),a(this,hr).append(i)},Hg=function(){let t=document.createElement("div");return t.className="divider",t},b(ds,kf),b(ds,Sd,null);var jg=ds,Pd,ur,pr,To,Iw,kw,Mw,Ug=class{constructor(t){b(this,To);b(this,Pd,null);b(this,ur,null);b(this,pr);m(this,pr,t)}show(t,e,i){let[n,s]=f(this,To,kw).call(this,e,i),{style:o}=a(this,ur)||m(this,ur,f(this,To,Iw).call(this));t.append(a(this,ur)),o.insetInlineEnd=`${100*n}%`,o.top=`calc(${100*s}% + var(--editor-toolbar-vert-offset))`}hide(){a(this,ur).remove()}};Pd=new WeakMap,ur=new WeakMap,pr=new WeakMap,To=new WeakSet,Iw=function(){let t=m(this,ur,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",on,{signal:a(this,pr)._signal});let e=m(this,Pd,document.createElement("div"));return e.className="buttons",t.append(e),f(this,To,Mw).call(this),t},kw=function(t,e){let i=0,n=0;for(let s of t){let o=s.y+s.height;if(o<i)continue;let l=s.x+(e?s.width:0);if(o>i){n=l,i=o;continue}e?l>n&&(n=l):l<n&&(n=l)}return[e?1-n:n,i]},Mw=function(){let t=document.createElement("button");t.className="highlightButton",t.tabIndex=0,t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");let e=document.createElement("span");t.append(e),e.className="visuallyHidden",e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");let i=a(this,pr)._signal;t.addEventListener("contextmenu",on,{signal:i}),t.addEventListener("click",()=>{a(this,pr).highlightSelection("floating_button")},{signal:i}),a(this,Pd).append(t)};function tf(r,t,e){for(let i of e)t.addEventListener(i,r[i].bind(r))}function $P(r){return Math.round(Math.min(255,Math.max(1,255*r))).toString(16).padStart(2,"0")}var Mf,Wg=class{constructor(){b(this,Mf,0)}get id(){return`${TP}${Ze(this,Mf)._++}`}};Mf=new WeakMap;var al,Td,ai,ll,Cp,dy=class dy{constructor(){b(this,ll);b(this,al,VP());b(this,Td,0);b(this,ai,null)}static get _isSVGFittingCanvas(){let t='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',i=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),n=new Image;n.src=t;let s=n.decode().then(()=>
13(i.drawImage(n,0,0,1,1,0,0,1,3),new Uint32Array(i.getImageData(0,0,1,1).data.buffer)[0]===0));return Ot(this,"_isSVGFittingCanvas",s)}getFromFile(t){return O(this,null,function*(){let{lastModified:e,name:i,size:n,type:s}=t;return f(this,ll,Cp).call(this,`${e}_${i}_${n}_${s}`,t)})}getFromUrl(t){return O(this,null,function*(){return f(this,ll,Cp).call(this,t,t)})}getFromBlob(t,e){return O(this,null,function*(){let i=yield e;return f(this,ll,Cp).call(this,t,i)})}getFromId(t){return O(this,null,function*(){a(this,ai)||m(this,ai,new Map);let e=a(this,ai).get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){let{blobPromise:i}=e;return delete e.blobPromise,this.getFromBlob(e.id,i)}return this.getFromUrl(e.url)})}getFromCanvas(t,e){a(this,ai)||m(this,ai,new Map);let i=a(this,ai).get(t);if(i!=null&&i.bitmap)return i.refCounter+=1,i;let n=new OffscreenCanvas(e.width,e.height);return n.getContext("2d").drawImage(e,0,0),i={bitmap:n.transferToImageBitmap(),id:`image_${a(this,al)}_${Ze(this,Td)._++}`,refCounter:1,isSvg:!1},a(this,ai).set(t,i),a(this,ai).set(i.id,i),i}getSvgUrl(t){let e=a(this,ai).get(t);return e!=null&&e.isSvg?e.svgUrl:null}deleteId(t){var n;a(this,ai)||m(this,ai,new Map);let e=a(this,ai).get(t);if(!e||(e.refCounter-=1,e.refCounter!==0))return;let{bitmap:i}=e;if(!e.url&&!e.file){let s=new OffscreenCanvas(i.width,i.height);s.getContext("bitmaprenderer").transferFromImageBitmap(i),e.blobPromise=s.convertToBlob()}(n=i.close)==null||n.call(i),e.bitmap=null}isValidId(t){return t.startsWith(`image_${a(this,al)}_`)}};al=new WeakMap,Td=new WeakMap,ai=new WeakMap,ll=new WeakSet,Cp=function(t,e){return O(this,null,function*(){a(this,ai)||m(this,ai,new Map);let i=a(this,ai).get(t);if(i===null)return null;if(i!=null&&i.bitmap)return i.refCounter+=1,i;try{i||(i={bitmap:null,id:`image_${a(this,al)}_${Ze(this,Td)._++}`,refCounter:0,isSvg:!1});let n;if(typeof e=="string"?(i.url=e,n=yield Kf(e,"blob")):e instanceof File?n=i.file=e:e instanceof Blob&&(n=e),n.type==="image/svg+xml"){let s=dy._isSVGFittingCanvas,o=new FileReader,l=new Image,c=new Promise((h,d)=>{l.onload=()=>{i.bitmap=l,i.isSvg=!0,h()},o.onload=()=>O(this,null,function*(){let u=i.svgUrl=o.result;l.src=(yield s)?`${u}#svgView(preserveAspectRatio(none))`:u}),l.onerror=o.onerror=d});o.readAsDataURL(n),yield c}else i.bitmap=yield createImageBitmap(n);i.refCounter=1}catch(n){console.error(n),i=null}return a(this,ai).set(t,i),i&&a(this,ai).set(i.id,i),i})};var Gg=dy,$e,ho,Id,Ye,$g=class{constructor(t=128){b(this,$e,[]);b(this,ho,!1);b(this,Id);b(this,Ye,-1);m(this,Id,t)}add({cmd:t,undo:e,post:i,mustExec:n,type:s=NaN,overwriteIfSameType:o=!1,keepUndo:l=!1}){if(n&&t(),a(this,ho))return;let c={cmd:t,undo:e,post:i,type:s};if(a(this,Ye)===-1){a(this,$e).length>0&&(a(this,$e).length=0),m(this,Ye,0),a(this,$e).push(c);return}if(o&&a(this,$e)[a(this,Ye)].type===s){l&&(c.undo=a(this,$e)[a(this,Ye)].undo),a(this,$e)[a(this,Ye)]=c;return}let h=a(this,Ye)+1;h===a(this,Id)?a(this,$e).splice(0,1):(m(this,Ye,h),h<a(this,$e).length&&a(this,$e).splice(h)),a(this,$e).push(c)}undo(){if(a(this,Ye)===-1)return;m(this,ho,!0);let{undo:t,post:e}=a(this,$e)[a(this,Ye)];t(),e==null||e(),m(this,ho,!1),m(this,Ye,a(this,Ye)-1)}redo(){if(a(this,Ye)<a(this,$e).length-1){m(this,Ye,a(this,Ye)+1),m(this,ho,!0);let{cmd:t,post:e}=a(this,$e)[a(this,Ye)];t(),e==null||e(),m(this,ho,!1)}}hasSomethingToUndo(){return a(this,Ye)!==-1}hasSomethingToRedo(){return a(this,Ye)<a(this,$e).length-1}destroy(){m(this,$e,null)}};$e=new WeakMap,ho=new WeakMap,Id=new WeakMap,Ye=new WeakMap;var Df,Dw,ea=class{constructor(t){b(this,Df);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;let{isMac:e}=ei.platform;for(let[i,n,s={}]of t)for(let o of i){let l=o.startsWith("mac+");e&&l?(this.callbacks.set(o.slice(4),{callback:n,options:s}),this.allKeys.add(o.split("+").at(-1))):!e&&!l&&(this.callbacks.set(o,{callback:n,options:s}),this.allKeys.add(o.split("+").at(-1)))}}exec(t,e){if(!this.allKeys.has(e.key))return;let i=this.callbacks.get(f(this,Df,Dw).call(this,e));if(!i)return;let{callback:n,options:{bubbles:s=!1,args:o=[],checker:l=null}}=i;l&&!l(t,e)||(n.bind(t,...o,e)(),s||(e.stopPropagation(),e.preventDefault()))}};Df=new WeakSet,Dw=function(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);let e=this.buffer.join("+");return this.buffer.length=0,e};var Rf=class Rf{get _colors(){let t=new Map([["CanvasText",null],["Canvas",null]]);return GP(t),Ot(this,"_colors",t)}convert(t){let e=iy(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(let[i,n]of this._colors)if(n.every((s,o)=>s===e[o]))return Rf._colorsMapping.get(i);return e}getHexCode(t){let e=this._colors.get(t);return e?ot.makeHexColor(...e):t}};k(Rf,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));var Yg=Rf,md=(()=>{var t,e,i,n,s,o,l,c,h,d,u,p,g,_,y,C,x,I,A,E,L,v,S,M,T,N,B,W,$,X,et,rt,it,at,ii,ni,me,zt,Lt,si,ye,U,Ep,Xg,Rw,Lw,Sp,Ow,Nw,Fw,Kg,Bw,qg,Zg,zw,pi,ro,Vw,jw,Qg,Hw,Xc,Jg;let Ta=class Ta{constructor(w,z,tt,K,lt,pt,bt,Ft,ie,ke,ve){b(this,U);b(this,t,new AbortController);b(this,e,null);b(this,i,new Map);b(this,n,new Map);b(this,s,null);b(this,o,null);b(this,l,null);b(this,c,new $g);b(this,h,null);b(this,d,0);b(this,u,new Set);b(this,p,null);b(this,g,null);b(this,_,new Set);b(this,y,!1);b(this,C,!1);b(this,x,!1);b(this,I,null);b(this,A,null);b(this,E,null);b(this,L,null);b(this,v,!1);b(this,S,null);b(this,M,new Wg);b(this,T,!1);b(this,N,!1);b(this,B,null);b(this,W,null);b(this,$,null);b(this,X,null);b(this,et,St.NONE);b(this,rt,new Set);b(this,it,null);b(this,at,null);b(this,ii,null);b(this,ni,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});b(this,me,[0,0]);b(this,zt,null);b(this,Lt,null);b(this,si,null);b(this,ye,null);let se=this._signal=a(this,t).signal;m(this,Lt,w),m(this,si,z),m(this,s,tt),this._eventBus=K,K._on("editingaction",this.onEditingAction.bind(this),{signal:se}),K._on("pagechanging",this.onPageChanging.bind(this),{signal:se}),K._on("scalechanging",this.onScaleChanging.bind(this),{signal:se}),K._on("rotationchanging",this.onRotationChanging.bind(this),{signal:se}),K._on("setpreference",this.onSetPreference.bind(this),{signal:se}),K._on("switchannotationeditorparams",Qo=>this.updateParams(Qo.type,Qo.value),{signal:se}),f(this,U,Ow).call(this),f(this,U,zw).call(this),f(this,U,Kg).call(this),m(this,o,lt.annotationStorage),m(this,I,lt.filterFactory),m(this,at,pt),m(this,L,bt||null),m(this,y,Ft),m(this,C,ie),m(this,x,ke),m(this,X,ve||null),this.viewParameters={realScale:Po.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){let w=Ta.prototype,z=pt=>a(pt,Lt).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&pt.hasSomethingToControl(),tt=(pt,{target:bt})=>
13{if(bt instanceof HTMLInputElement){let{type:Ft}=bt;return Ft!=="text"&&Ft!=="number"}return!0},K=this.TRANSLATE_SMALL,lt=this.TRANSLATE_BIG;return Ot(this,"_keyboardManager",new ea([[["ctrl+a","mac+meta+a"],w.selectAll,{checker:tt}],[["ctrl+z","mac+meta+z"],w.undo,{checker:tt}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],w.redo,{checker:tt}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],w.delete,{checker:tt}],[["Enter","mac+Enter"],w.addNewEditorFromKeyboard,{checker:(pt,{target:bt})=>!(bt instanceof HTMLButtonElement)&&a(pt,Lt).contains(bt)&&!pt.isEnterHandled}],[[" ","mac+ "],w.addNewEditorFromKeyboard,{checker:(pt,{target:bt})=>!(bt instanceof HTMLButtonElement)&&a(pt,Lt).contains(document.activeElement)}],[["Escape","mac+Escape"],w.unselectAll],[["ArrowLeft","mac+ArrowLeft"],w.translateSelectedEditors,{args:[-K,0],checker:z}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],w.translateSelectedEditors,{args:[-lt,0],checker:z}],[["ArrowRight","mac+ArrowRight"],w.translateSelectedEditors,{args:[K,0],checker:z}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],w.translateSelectedEditors,{args:[lt,0],checker:z}],[["ArrowUp","mac+ArrowUp"],w.translateSelectedEditors,{args:[0,-K],checker:z}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],w.translateSelectedEditors,{args:[0,-lt],checker:z}],[["ArrowDown","mac+ArrowDown"],w.translateSelectedEditors,{args:[0,K],checker:z}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],w.translateSelectedEditors,{args:[0,lt],checker:z}]]))}destroy(){var w,z,tt,K;(w=a(this,ye))==null||w.resolve(),m(this,ye,null),(z=a(this,t))==null||z.abort(),m(this,t,null),this._signal=null;for(let lt of a(this,n).values())lt.destroy();a(this,n).clear(),a(this,i).clear(),a(this,_).clear(),m(this,e,null),a(this,rt).clear(),a(this,c).destroy(),(tt=a(this,s))==null||tt.destroy(),(K=a(this,S))==null||K.hide(),m(this,S,null),a(this,A)&&(clearTimeout(a(this,A)),m(this,A,null)),a(this,zt)&&(clearTimeout(a(this,zt)),m(this,zt,null))}combinedSignal(w){return AbortSignal.any([this._signal,w.signal])}get mlManager(){return a(this,X)}get useNewAltTextFlow(){return a(this,C)}get useNewAltTextWhenAddingImage(){return a(this,x)}get hcmFilter(){return Ot(this,"hcmFilter",a(this,at)?a(this,I).addHCMFilter(a(this,at).foreground,a(this,at).background):"none")}get direction(){return Ot(this,"direction",getComputedStyle(a(this,Lt)).direction)}get highlightColors(){return Ot(this,"highlightColors",a(this,L)?new Map(a(this,L).split(",").map(w=>w.split("=").map(z=>z.trim()))):null)}get highlightColorNames(){return Ot(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,w=>w.reverse())):null)}setMainHighlightColorPicker(w){m(this,$,w)}editAltText(w,z=!1){var tt;(tt=a(this,s))==null||tt.editAltText(this,w,z)}switchToMode(w,z){this._eventBus.on("annotationeditormodechanged",z,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:w})}setPreference(w,z){this._eventBus.dispatch("setpreference",{source:this,name:w,value:z})}onSetPreference({name:w,value:z}){switch(w){case"enableNewAltTextWhenAddingImage":m(this,x,z);break}}onPageChanging({pageNumber:w}){m(this,d,w-1)}focusMainContainer(){a(this,Lt).focus()}findParent(w,z){for(let tt of a(this,n).values()){let{x:K,y:lt,width:pt,height:bt}=tt.div.getBoundingClientRect();if(w>=K&&w<=K+pt&&z>=lt&&z<=lt+bt)return tt}return null}disableUserSelect(w=!1){a(this,si).classList.toggle("noUserSelect",w)}addShouldRescale(w){a(this,_).add(w)}removeShouldRescale(w){a(this,_).delete(w)}onScaleChanging({scale:w}){this.commitOrRemove(),this.viewParameters.realScale=w*Po.PDF_TO_CSS_UNITS;for(let z of a(this,_))z.onScaleChanging()}onRotationChanging({pagesRotation:w}){this.commitOrRemove(),this.viewParameters.rotation=w}highlightSelection(w=""){let z=document.getSelection();if(!z||z.isCollapsed)return;let{anchorNode:tt,anchorOffset:K,focusNode:lt,focusOffset:pt}=z,bt=z.toString(),ie=f(this,U,Ep).call(this,z).closest(".textLayer"),ke=this.getSelectionBoxes(ie);if(!ke)return;z.empty();let ve=f(this,U,Xg).call(this,ie),se=a(this,et)===St.NONE,Qo=()=>{ve==null||ve.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:w,boxes:ke,anchorNode:tt,anchorOffset:K,focusNode:lt,focu
13sOffset:pt,text:bt}),se&&this.showAllEditors("highlight",!0,!0)};if(se){this.switchToMode(St.HIGHLIGHT,Qo);return}Qo()}addToAnnotationStorage(w){!w.isEmpty()&&a(this,o)&&!a(this,o).has(w.id)&&a(this,o).setValue(w.id,w)}blur(){if(this.isShiftKeyDown=!1,a(this,v)&&(m(this,v,!1),f(this,U,Sp).call(this,"main_toolbar")),!this.hasSelection)return;let{activeElement:w}=document;for(let z of a(this,rt))if(z.div.contains(w)){m(this,W,[z,w]),z._focusEventsAllowed=!1;break}}focus(){if(!a(this,W))return;let[w,z]=a(this,W);m(this,W,null),z.addEventListener("focusin",()=>{w._focusEventsAllowed=!0},{once:!0,signal:this._signal}),z.focus()}addEditListeners(){f(this,U,Kg).call(this),f(this,U,qg).call(this)}removeEditListeners(){f(this,U,Bw).call(this),f(this,U,Zg).call(this)}dragOver(w){for(let{type:z}of w.dataTransfer.items)for(let tt of a(this,g))if(tt.isHandlingMimeForPasting(z)){w.dataTransfer.dropEffect="copy",w.preventDefault();return}}drop(w){for(let z of w.dataTransfer.items)for(let tt of a(this,g))if(tt.isHandlingMimeForPasting(z.type)){tt.paste(z,this.currentLayer),w.preventDefault();return}}copy(w){var tt;if(w.preventDefault(),(tt=a(this,e))==null||tt.commitOrRemove(),!this.hasSelection)return;let z=[];for(let K of a(this,rt)){let lt=K.serialize(!0);lt&&z.push(lt)}z.length!==0&&w.clipboardData.setData("application/pdfjs",JSON.stringify(z))}cut(w){this.copy(w),this.delete()}paste(w){return O(this,null,function*(){w.preventDefault();let{clipboardData:z}=w;for(let lt of z.items)for(let pt of a(this,g))if(pt.isHandlingMimeForPasting(lt.type)){pt.paste(lt,this.currentLayer);return}let tt=z.getData("application/pdfjs");if(!tt)return;try{tt=JSON.parse(tt)}catch(lt){Tt(`paste: "${lt.message}".`);return}if(!Array.isArray(tt))return;this.unselectAll();let K=this.currentLayer;try{let lt=[];for(let Ft of tt){let ie=yield K.deserialize(Ft);if(!ie)return;lt.push(ie)}let pt=()=>{for(let Ft of lt)f(this,U,Qg).call(this,Ft);f(this,U,Jg).call(this,lt)},bt=()=>{for(let Ft of lt)Ft.remove()};this.addCommands({cmd:pt,undo:bt,mustExec:!0})}catch(lt){Tt(`paste: "${lt.message}".`)}})}keydown(w){!this.isShiftKeyDown&&w.key==="Shift"&&(this.isShiftKeyDown=!0),a(this,et)!==St.NONE&&!this.isEditorHandlingKeyboard&&Ta._keyboardManager.exec(this,w)}keyup(w){this.isShiftKeyDown&&w.key==="Shift"&&(this.isShiftKeyDown=!1,a(this,v)&&(m(this,v,!1),f(this,U,Sp).call(this,"main_toolbar")))}onEditingAction({name:w}){switch(w){case"undo":case"redo":case"delete":case"selectAll":this[w]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}setEditingState(w){w?(f(this,U,Nw).call(this),f(this,U,qg).call(this),f(this,U,pi).call(this,{isEditing:a(this,et)!==St.NONE,isEmpty:f(this,U,Xc).call(this),hasSomethingToUndo:a(this,c).hasSomethingToUndo(),hasSomethingToRedo:a(this,c).hasSomethingToRedo(),hasSelectedEditor:!1})):(f(this,U,Fw).call(this),f(this,U,Zg).call(this),f(this,U,pi).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(w){if(!a(this,g)){m(this,g,w);for(let z of a(this,g))f(this,U,ro).call(this,z.defaultPropertiesToUpdate)}}getId(){return a(this,M).id}get currentLayer(){return a(this,n).get(a(this,d))}getLayer(w){return a(this,n).get(w)}get currentPageIndex(){return a(this,d)}addLayer(w){a(this,n).set(w.pageIndex,w),a(this,T)?w.enable():w.disable()}removeLayer(w){a(this,n).delete(w.pageIndex)}updateMode(w,z=null,tt=!1){return O(this,null,function*(){if(a(this,et)!==w&&!(a(this,ye)&&(yield a(this,ye).promise,!a(this,ye)))){if(m(this,ye,Promise.withResolvers()),m(this,et,w),w===St.NONE){this.setEditingState(!1),f(this,U,jw).call(this),a(this,ye).resolve();return}this.setEditingState(!0),yield f(this,U,Vw).call(this),this.unselectAll();for(let K of a(this,n).values())K.updateMode(w);if(!z){tt&&this.addNewEditorFromKeyboard(),a(this,ye).resolve();return}for(let K of a(this,i).values())K.annotationElementId===z?(this.setSelected(K),K.enterInEditMode()):K.unselect();a(this,ye).resolve()}})}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(w){w!==a(this,et)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:w})}updateParams(w,z){var tt;if(a(this,g)){switch(w){case gt.CREATE:this.currentLayer.addNewEditor();return;case gt.HIGHLIGHT_DEFAULT_COLOR:(tt=a(this,$))==null||tt.updateColor(z);break;case gt.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(a(this,ii)||m(this,ii,new Map)).set(w,z),this.showAllEditors("highlight",z);break}for(let K of a(this,rt))K.updateParams(w,z);for(let K of a(this,g))K.updateDefaultParams(w,z)}}showAllEditors(w,z,tt=!1){var lt,pt;for(let bt of a(this,i).values())bt.editorType===w&&bt.show(z);((pt=(lt=a(this,ii))==null?void 0:lt.get(gt.HIGHLIGHT_SHOW_ALL))!=null?pt:!0)!==z&&f(this,U,ro).call(this,[[gt.HIGHLIGHT_SHOW_ALL,z]])}enableWaiting(w=!1){if(a(this,N)!==w){m(this,N,w);for(let z of a(this,n).values())w?z.disableClick():z.enableClick(),z.div.classList.toggle("waiting",w)}}getEditors(w){let z=[];for(let tt of a(this,i).values())tt.pageIndex===w&&z.push(tt);return z}getEditor(w){return a(this,i).get(w)}addEditor(w){a(this,i).set(w.id,w)}removeEditor(w){var z;w.div.contains(document.activeElement)&&(a(this,A)&&clearTimeout(a(this,A)),m(this,A,setTimeout(()=>{this.focusMainContainer(),m(this,A,null)},0))),a(this,i).delete(w.id),this.unselect(w),(!w.annotationElementId||!a(this,u).has(w.annotationElementId))&&((z=a(this,o))==null||z.remove(w.id))}addDeletedAnnotationElement(w){a(this,u).add(w.annotationElementId),this.addChangedExistingAnnotation(w),w.deleted=!0}
13isDeletedAnnotationElement(w){return a(this,u).has(w)}removeDeletedAnnotationElement(w){a(this,u).delete(w.annotationElementId),this.removeChangedExistingAnnotation(w),w.deleted=!1}setActiveEditor(w){a(this,e)!==w&&(m(this,e,w),w&&f(this,U,ro).call(this,w.propertiesToUpdate))}updateUI(w){a(this,U,Hw)===w&&f(this,U,ro).call(this,w.propertiesToUpdate)}toggleSelected(w){if(a(this,rt).has(w)){a(this,rt).delete(w),w.unselect(),f(this,U,pi).call(this,{hasSelectedEditor:this.hasSelection});return}a(this,rt).add(w),w.select(),f(this,U,ro).call(this,w.propertiesToUpdate),f(this,U,pi).call(this,{hasSelectedEditor:!0})}setSelected(w){for(let z of a(this,rt))z!==w&&z.unselect();a(this,rt).clear(),a(this,rt).add(w),w.select(),f(this,U,ro).call(this,w.propertiesToUpdate),f(this,U,pi).call(this,{hasSelectedEditor:!0})}isSelected(w){return a(this,rt).has(w)}get firstSelectedEditor(){return a(this,rt).values().next().value}unselect(w){w.unselect(),a(this,rt).delete(w),f(this,U,pi).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return a(this,rt).size!==0}get isEnterHandled(){return a(this,rt).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){a(this,c).undo(),f(this,U,pi).call(this,{hasSomethingToUndo:a(this,c).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:f(this,U,Xc).call(this)})}redo(){a(this,c).redo(),f(this,U,pi).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:a(this,c).hasSomethingToRedo(),isEmpty:f(this,U,Xc).call(this)})}addCommands(w){a(this,c).add(w),f(this,U,pi).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:f(this,U,Xc).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;let w=[...a(this,rt)],z=()=>{for(let K of w)K.remove()},tt=()=>{for(let K of w)f(this,U,Qg).call(this,K)};this.addCommands({cmd:z,undo:tt,mustExec:!0})}commitOrRemove(){var w;(w=a(this,e))==null||w.commitOrRemove()}hasSomethingToControl(){return a(this,e)||this.hasSelection}selectAll(){for(let w of a(this,rt))w.commit();f(this,U,Jg).call(this,a(this,i).values())}unselectAll(){if(!(a(this,e)&&(a(this,e).commitOrRemove(),a(this,et)!==St.NONE))&&this.hasSelection){for(let w of a(this,rt))w.unselect();a(this,rt).clear(),f(this,U,pi).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(w,z,tt=!1){if(tt||this.commitOrRemove(),!this.hasSelection)return;a(this,me)[0]+=w,a(this,me)[1]+=z;let[K,lt]=a(this,me),pt=[...a(this,rt)],bt=1e3;a(this,zt)&&clearTimeout(a(this,zt)),m(this,zt,setTimeout(()=>{m(this,zt,null),a(this,me)[0]=a(this,me)[1]=0,this.addCommands({cmd:()=>{for(let Ft of pt)a(this,i).has(Ft.id)&&Ft.translateInPage(K,lt)},undo:()=>{for(let Ft of pt)a(this,i).has(Ft.id)&&Ft.translateInPage(-K,-lt)},mustExec:!1})},bt));for(let Ft of pt)Ft.translateInPage(w,z)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),m(this,p,new Map);for(let w of a(this,rt))a(this,p).set(w,{savedX:w.x,savedY:w.y,savedPageIndex:w.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!a(this,p))return!1;this.disableUserSelect(!1);let w=a(this,p);m(this,p,null);let z=!1;for(let[{x:K,y:lt,pageIndex:pt},bt]of w)bt.newX=K,bt.newY=lt,bt.newPageIndex=pt,z||(z=K!==bt.savedX||lt!==bt.savedY||pt!==bt.savedPageIndex);if(!z)return!1;let tt=(K,lt,pt,bt)=>{if(a(this,i).has(K.id)){let Ft=a(this,n).get(bt);Ft?K._setParentAndPosition(Ft,lt,pt):(K.pageIndex=bt,K.x=lt,K.y=pt)}};return this.addCommands({cmd:()=>{for(let[K,{newX:lt,newY:pt,newPageIndex:bt}]of w)tt(K,lt,pt,bt)},undo:()=>{for(let[K,{savedX:lt,savedY:pt,savedPageIndex:bt}]of w)tt(K,lt,pt,bt)},mustExec:!0}),!0}dragSelectedEditors(w,z){if(a(this,p))for(let tt of a(this,p).keys())tt.drag(w,z)}rebuild(w){if(w.parent===null){let z=this.getLayer(w.pageIndex);z?(z.changeParent(w),z.addOrRebuild(w)):(this.addEditor(w),this.addToAnnotationStorage(w),w.rebuild())}else w.parent.addOrRebuild(w)}get isEditorHandlingKeyboard(){var w;return((w=this.getActive())==null?void 0:w.shouldGetKeyboardEvents())||a(this,rt).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(w){return a(this,e)===w}getActive(){return a(this,e)}getMode(){return a(this,et)}get imageManager(){return Ot(this,"imageManager",new Gg)}getSelectionBoxes(w){if(!w)return null;let z=document.getSelection();for(let ie=0,ke=z.rangeCount;ie<ke;ie++)if(!w.contains(z.getRangeAt(ie).commonAncestorContainer))return null;let{x:tt,y:K,width:lt,height:pt}=w.getBoundingClientRect(),bt;switch(w.getAttribute("data-main-rotation")){case"90":bt=(ie,ke,ve,se)=>({x:(ke-K)/pt,y:1-(ie+ve-tt)/lt,width:se/pt,height:ve/lt});break;case"180":bt=(ie,ke,ve,se)=>({x:1-(ie+ve-tt)/lt,y:1-(ke+se-K)/pt,width:ve/lt,height:se/pt});break;case"270":bt=(ie,ke,ve,se)=>({x:1-(ke+se-K)/pt,y:(ie-tt)/lt,width:se/pt,height:ve/lt});break;default:bt=(ie,ke,ve,se)=>({x:(ie-tt)/lt,y:(ke-K)/pt,width:ve/lt,height:se/pt});break}let Ft=[];for(let ie=0,ke=z.rangeCount;ie<ke;ie++){let ve=z.getRangeAt(ie);if(!ve.collapsed)for(let{x:se,y:Qo,width:R0,height:L0}of ve.getClientRects())R0===0||L0===0||Ft.push(bt(se,Qo,R0,L0))}return Ft.length===0?null:Ft}addChangedExistingAnnotation({annotationElementId:w,id:z}){(a(this,l)||m(this,l,new Map)).set(w,z)}removeChangedExistingAnnotation({annotationElementId:w}){var z;(z=a(this,l))==null||z.delete(w)}renderAnnotationElement(w){var K;let z=(K=a(this,l))==null?void 0:K.get(w.data.id);if(!z)return;let tt=a(this,o).getRawValue(z);tt&&(a(this,et)===St.NONE&&!tt.hasBeenModified||tt.renderAnnotationElement(w))}};t=new WeakMap,e=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,g=new WeakMap,_=new WeakMap,y=new WeakMap,C=new WeakMap,x=new WeakMap,I=new WeakMap,A=new WeakMap,E=new WeakMap,L=new WeakMap,v=new WeakMap,S=new WeakMap,M=new WeakMap,T=new WeakMap,N=new WeakMap,B=new WeakMap,W=new WeakMap,$=new WeakMap,X=new WeakMap,et=new WeakMap,rt=new WeakMap,it=new WeakMap,at=new WeakMap,ii=new WeakMap,ni=new WeakMap,me=new WeakMap,zt=new WeakMap,Lt=new WeakMap,si=new WeakMap,ye=new WeakMap,U=new WeakSet,Ep=function({anchorNode:w}){return w.nodeType===Node.TEXT_NODE?w.parentElement:w},Xg=function(w){let{currentLayer:z}=this;if(z.hasTextLayer(w))return z;for(let tt of a(this,n).values())if(tt.hasTextLayer(w))return tt;return null},Rw=function(){let w=document.getSelection();if(!w||w.isCollapsed)return;let tt=f(this,U,Ep).call(this,w).closest(".textLayer"),K=this.getSelectionBoxes(tt);K&&(a(this,S)||m(this,S,new Ug(this)),a(this,S).show(tt,K,this.direction==="ltr"))},Lw=function(){var lt,pt,bt;let w=document.getSelection();if(!w||w.isCollapsed){a(this,it)&&((lt=a(this,S))==null||lt.hide(),m(this,it,null),f(this,U,pi).call(this,{hasSelectedText:!1}));return}let{anchorNode:z}=w;if(z===a(this,it))return;let K=f(this,U,Ep).call(this,w).closest(".textLayer");if(!K){a(this,it)&&((pt=a(this,S))==null||pt.hide(),m(this,it,null),f(this,U,pi).call(this,{hasSelectedText:!1}));return}if((bt=a(this,S))==null||bt.hide(),m(this,it,z),f(this,U,pi).call(this,{hasSelectedText:!0}),!(a(this,et)!==St.HIGHLIGHT&&a(this,et)!==St.NONE)&&(a(this,et)===St.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),m(this,v,this.isShiftKeyDown),!this.isShiftKeyDown)){let Ft=a(this,et)===St.HIGHLIGHT?f(this,U,Xg).call(this,K):null;Ft==null||Ft.toggleDrawing();let ie=new AbortController,ke=this.combinedSignal(ie),ve=se=>{se.type==="pointerup"&&se.button!==0||(ie.abort(),Ft==null||Ft.toggleDrawing(!0),se.type==="pointerup"&&f(this,U,Sp).call(this,"main_toolbar"))};window.addEventListener("pointerup",ve,{signal:ke}),window.addEventListener("blur",ve,{signal:ke})}},Sp=function(w=""){a(this,et)===St.HIGHLIGHT?this.highlightSelection(w):a(this,y)&&f(this,U,Rw).call(this)},Ow=function(){document.addEventListener("selectionchange",f(this,U,Lw).bind(this),{signal:this._signal})},Nw=function(){if(a(this,E))return;m(this,E,new AbortController);let w=this.combinedSignal(a(this,E));window.addEventListener("focus",this.focus.bind(this),{signal:w}),window.addEventListener("blur",this.blur.bind(this),{signal:w})},Fw=function(){var w;(w=a(this,E))==null||w.abort(),m(this,E,null)},Kg=function(){if(a(this,B))return;m(this,B,new AbortController);let w=this.combinedSignal(a(this,B));window.addEventListener("keydown",this.keydown.bind(this),{signal:w}),window.addEventListener("keyup",this.keyup.bind(this),{signal:w})},Bw=function(){var w;(w=a(this,B))==null||w.abort(),m(this,B,null)},qg=function(){if(a(this,h))return;m(this,h,new AbortController);let w=this.combinedSignal(a(this,h));document.addEventListener("copy",this.copy.bind(this),{signal:w}),document.addEventListener("cut",this.cut.bind(this),{signal:w}),document.addEventListener("paste",this.paste.bind(this),{signal:w})},Zg=function(){var w;(w=a(this,h))==null||w.abort(),m(this,h,null)},zw=function(){let w=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:w}),document.addEventListener("drop",this.drop.bind(this),{signal:w})},pi=function(w){Object.entries(w).some(([tt,K])=>a(this,ni)[tt]!==K)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(a(this,ni),w)}),a(this,et)===St.HIGHLIGHT&&w.hasSelectedEditor===!1&&f(this,U,ro).call(this,[[gt.HIGHLIGHT_FREE,!0]]))},ro=function(w){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:w})},Vw=function(){return O(this,null,function*(){if(!a(this,T)){m(this,T,!0);let w=[];for(let z of a(this,n).values())w.push(z.enable());yield Promise.all(w);for(let z of a(this,i).values())z.enable()}})},jw=function(){if(this.unselectAll(),a(this,T)){m(this,T,!1);for(let w of a(this,n).values())w.disable();for(let w of a(this,i).values())w.disable()}},Qg=function(w){let z=a(this,n).get(w.pageIndex);z?z.addOrRebuild(w):(this.addEditor(w),this.addToAnnotationStorage(w))},Hw=function(){let w=null;for(w of a(this,rt));return w},Xc=function(){if(a(this,i).size===0)return!0;
13if(a(this,i).size===1)for(let w of a(this,i).values())return w.isEmpty();return!1},Jg=function(w){for(let z of a(this,rt))z.unselect();a(this,rt).clear();for(let z of w)z.isEmpty()||(a(this,rt).add(z),z.select());f(this,U,pi).call(this,{hasSelectedEditor:this.hasSelection})},k(Ta,"TRANSLATE_SMALL",1),k(Ta,"TRANSLATE_BIG",10);let r=Ta;return r})(),cw=(()=>{var t,e,i,n,s,o,l,c,h,d,u,p,g,_,Kc,Pp;let x=class x{constructor(A){b(this,_);b(this,t,null);b(this,e,!1);b(this,i,null);b(this,n,null);b(this,s,null);b(this,o,null);b(this,l,!1);b(this,c,null);b(this,h,null);b(this,d,null);b(this,u,null);b(this,p,!1);m(this,h,A),m(this,p,A._uiManager.useNewAltTextFlow),a(x,g)||m(x,g,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(A){var E;(E=x._l10n)!=null||(x._l10n=A)}render(){return O(this,null,function*(){let A=m(this,i,document.createElement("button"));A.className="altText",A.tabIndex="0";let E=m(this,n,document.createElement("span"));A.append(E),a(this,p)?(A.classList.add("new"),A.setAttribute("data-l10n-id",a(x,g).missing),E.setAttribute("data-l10n-id",a(x,g)["missing-label"])):(A.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),E.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));let L=a(this,h)._uiManager._signal;A.addEventListener("contextmenu",on,{signal:L}),A.addEventListener("pointerdown",S=>S.stopPropagation(),{signal:L});let v=S=>{S.preventDefault(),a(this,h)._uiManager.editAltText(a(this,h)),a(this,p)&&a(this,h)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:a(this,_,Kc)}})};return A.addEventListener("click",v,{capture:!0,signal:L}),A.addEventListener("keydown",S=>{S.target===A&&S.key==="Enter"&&(m(this,l,!0),v(S))},{signal:L}),yield f(this,_,Pp).call(this),A})}finish(){a(this,i)&&(a(this,i).focus({focusVisible:a(this,l)}),m(this,l,!1))}isEmpty(){return a(this,p)?a(this,t)===null:!a(this,t)&&!a(this,e)}hasData(){return a(this,p)?a(this,t)!==null||!!a(this,d):this.isEmpty()}get guessedText(){return a(this,d)}setGuessedText(A){return O(this,null,function*(){a(this,t)===null&&(m(this,d,A),m(this,u,yield x._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:A})),f(this,_,Pp).call(this))})}toggleAltTextBadge(A=!1){var E;if(!a(this,p)||a(this,t)){(E=a(this,c))==null||E.remove(),m(this,c,null);return}if(!a(this,c)){let L=m(this,c,document.createElement("div"));L.className="noAltTextBadge",a(this,h).div.append(L)}a(this,c).classList.toggle("hidden",!A)}serialize(A){let E=a(this,t);return!A&&a(this,d)===E&&(E=a(this,u)),{altText:E,decorative:a(this,e),guessedText:a(this,d),textWithDisclaimer:a(this,u)}}get data(){return{altText:a(this,t),decorative:a(this,e)}}set data({altText:A,decorative:E,guessedText:L,textWithDisclaimer:v,cancel:S=!1}){L&&(m(this,d,L),m(this,u,v)),!(a(this,t)===A&&a(this,e)===E)&&(S||(m(this,t,A),m(this,e,E)),f(this,_,Pp).call(this))}toggle(A=!1){a(this,i)&&(!A&&a(this,o)&&(clearTimeout(a(this,o)),m(this,o,null)),a(this,i).disabled=!A)}shown(){a(this,h)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:a(this,_,Kc)}})}destroy(){var A,E;(A=a(this,i))==null||A.remove(),m(this,i,null),m(this,n,null),m(this,s,null),(E=a(this,c))==null||E.remove(),m(this,c,null)}};t=new WeakMap,e=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,g=new WeakMap,_=new WeakSet,Kc=function(){return a(this,t)&&"added"||a(this,t)===null&&this.guessedText&&"review"||"missing"},Pp=function(){return O(this,null,function*(){var v,S,M;let A=a(this,i);if(!A)return;if(a(this,p)){if(A.classList.toggle("done",!!a(this,t)),A.setAttribute("data-l10n-id",a(x,g)[a(this,_,Kc)]),(v=a(this,n))==null||v.setAttribute("data-l10n-id",a(x,g)[`${a(this,_,Kc)}-label`]),!a(this,t)){(S=a(this,s))==null||S.remove();return}}else{if(!a(this,t)&&!a(this,e)){A.classList.remove("done"),(M=a(this,s))==null||M.remove();return}A.classList.add("done"),A.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let E=a(this,s);if(!E){m(this,s,E=document.createElement("span")),E.className="tooltip",
13E.setAttribute("role","tooltip"),E.id=`alt-text-tooltip-${a(this,h).id}`;let T=100,N=a(this,h)._uiManager._signal;N.addEventListener("abort",()=>{clearTimeout(a(this,o)),m(this,o,null)},{once:!0}),A.addEventListener("mouseenter",()=>{m(this,o,setTimeout(()=>{m(this,o,null),a(this,s).classList.add("show"),a(this,h)._reportTelemetry({action:"alt_text_tooltip"})},T))},{signal:N}),A.addEventListener("mouseleave",()=>{var B;a(this,o)&&(clearTimeout(a(this,o)),m(this,o,null)),(B=a(this,s))==null||B.classList.remove("show")},{signal:N})}a(this,e)?E.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(E.removeAttribute("data-l10n-id"),E.textContent=a(this,t)),E.parentNode||A.append(E);let L=a(this,h).getImageForAltText();L==null||L.setAttribute("aria-describedby",E.id)})},b(x,g,null),k(x,"_l10n",null);let r=x;return r})(),fr,hn,he,cl,mr,Je,gr,uo,kd,_r,po,Md,br,us,zn,dl,hl,Zi,Dd,Lf,Pt,t_,Rd,e_,i_,Uw,Ww,n_,s_,o_,Gw,r_,$w,Yw,Xw,a_,qc,Ht=class Ht{constructor(t){b(this,Pt);b(this,fr,null);b(this,hn,null);b(this,he,null);b(this,cl,!1);b(this,mr,!1);b(this,Je,null);b(this,gr,null);b(this,uo,null);b(this,kd,"");b(this,_r,!1);b(this,po,null);b(this,Md,!1);b(this,br,!1);b(this,us,!1);b(this,zn,null);b(this,dl,0);b(this,hl,0);b(this,Zi,null);k(this,"_editToolbar",null);k(this,"_initialOptions",Object.create(null));k(this,"_initialData",null);k(this,"_isVisible",!0);k(this,"_uiManager",null);k(this,"_focusEventsAllowed",!0);b(this,Dd,!1);b(this,Lf,Ht._zIndex++);this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;let{rotation:e,rawDims:{pageWidth:i,pageHeight:n,pageX:s,pageY:o}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[i,n],this.pageTranslation=[s,o];let[l,c]=this.parentDimensions;this.x=t.x/l,this.y=t.y/c,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){let t=Ht.prototype._resizeWithKeyboard,e=md.TRANSLATE_SMALL,i=md.TRANSLATE_BIG;return Ot(this,"_resizerKeyboardManager",new ea([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-i,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[i,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-i]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,i]}],[["Escape","mac+Escape"],Ht.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return Ot(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){let e=new l_({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){var n;if((n=Ht._l10n)!=null||(Ht._l10n=t),Ht._l10nResizer||(Ht._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),Ht._borderLineWidth!==-1)return;let i=getComputedStyle(document.documentElement);Ht._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){re("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return a(this,Dd)}set _isDraggable(t){var e;m(this,Dd,t),(e=this.div)==null||e.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){let[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(t*2),this.y+=this.width*t/(e*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(t*2),this.y-=this.width*t/(e*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}
13setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=a(this,Lf)}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):f(this,Pt,qc).call(this),this.parent=t}focusin(t){this._focusEventsAllowed&&(a(this,_r)?m(this,_r,!1):this.parent.setSelected(this))}focusout(t){var i;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;let e=t.relatedTarget;e!=null&&e.closest(`#${this.id}`)||(t.preventDefault(),(i=this.parent)!=null&&i.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,i,n){let[s,o]=this.parentDimensions;[i,n]=this.screenToPageTranslation(i,n),this.x=(t+i)/s,this.y=(e+n)/o,this.fixAndSetPosition()}translate(t,e){f(this,Pt,t_).call(this,this.parentDimensions,t,e)}translateInPage(t,e){a(this,po)||m(this,po,[this.x,this.y]),f(this,Pt,t_).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}drag(t,e){a(this,po)||m(this,po,[this.x,this.y]);let[i,n]=this.parentDimensions;if(this.x+=t/i,this.y+=e/n,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){let{x:h,y:d}=this.div.getBoundingClientRect();this.parent.findNewParent(this,h,d)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:s,y:o}=this,[l,c]=this.getBaseTranslation();s+=l,o+=c,this.div.style.left=`${(100*s).toFixed(2)}%`,this.div.style.top=`${(100*o).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!a(this,po)&&(a(this,po)[0]!==this.x||a(this,po)[1]!==this.y)}getBaseTranslation(){let[t,e]=this.parentDimensions,{_borderLineWidth:i}=Ht,n=i/t,s=i/e;switch(this.rotation){case 90:return[-n,s];case 180:return[n,s];case 270:return[n,-s];default:return[-n,-s]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){let[e,i]=this.pageDimensions,{x:n,y:s,width:o,height:l}=this;if(o*=e,l*=i,n*=e,s*=i,this._mustFixPosition)switch(t){case 0:n=Math.max(0,Math.min(e-o,n)),s=Math.max(0,Math.min(i-l,s));break;case 90:n=Math.max(0,Math.min(e-l,n)),s=Math.min(i,Math.max(o,s));break;case 180:n=Math.min(e,Math.max(o,n)),s=Math.min(i,Math.max(l,s));break;case 270:n=Math.min(e,Math.max(l,n)),s=Math.max(0,Math.min(i-o,s));break}this.x=n/=e,this.y=s/=i;let[c,h]=this.getBaseTranslation();n+=c,s+=h;let{style:d}=this.div;d.left=`${(100*n).toFixed(2)}%`,d.top=`${(100*s).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,e){var i;return f(i=Ht,Rd,e_).call(i,t,e,this.parentRotation)}pageTranslationToScreen(t,e){var i;return f(i=Ht,Rd,e_).call(i,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){let{parentScale:t,pageDimensions:[e,i]}=this;return[e*t,i*t]}setDims(t,e){let[i,n]=this.parentDimensions;this.div.style.width=`${(100*t/i).toFixed(2)}%`,a(this,mr)||(this.div.style.height=`${(100*e/n).toFixed(2)}%`)}fixDims(){let{style:t}=this.div,{height:e,width:i}=t,n=i.endsWith("%"),s=!a(this,mr)&&e.endsWith("%");if(n&&s)return;let[o,l]=this.parentDimensions;n||(t.width=`${(100*parseFloat(i)/o).toFixed(2)}%`),!a(this,mr)&&!s&&(t.height=`${(100*parseFloat(e)/l).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var t;(t=a(this,he))==null||t.finish()}addEditToolbar(){return O(this,null,function*(){return this._editToolbar||a(this,br)?this._editToolbar:(this._editToolbar=new jg(this),this.div.append(this._editToolbar.render()),a(this,he)&&(yield this._editToolbar.addAltText(a(this,he))),this._editToolbar)})}removeEditToolbar(){var t;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(t=a(this,he))==null||t.destroy())}addContainer(t){var i;let e=(i=this._editToolbar)==null?void 0:i.div;e?e.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}addAltTextButton(){return O(this,null,function*(){a(this,he)||(cw.initialize(Ht._l10n),m(this,he,new cw(this)),a(this,fr)&&(a(this,he).data=a(this,fr),m(this,fr,null)),yield this.addEditToolbar())})}get altTextData(){var t;return(t=a(this,he))==null?void 0:t.data}set altTextData(t){a(this,he)&&(a(this,he).data=t)}get guessedAltText(){var t;return(t=a(this,he))==null?void 0:t.guessedText}setGuessedAltText(t){return O(this,null,function*(){var e;yield(e=a(this,he))==null?void 0:e.setGuessedText(t)})}serializeAltText(t){var e;return(e=a(this,he))==null?void 0:e.serialize(t)}hasAltText(){return!!a(this,he)&&!a(this,he).isEmpty()}hasAltTextData(){var t,e;return(e=(t=a(this,he))==null?void 0:t.hasData())!=null?e:!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=a(this,cl)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),f(this,Pt,r_).call(this);let[t,e]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*e/t).toFixed(2)}%`,this.div.style.maxHeight=`${(100*t/e).toFixed(2)}%`);let[i,n]=this.getInitialTranslation();return this.translate(i,n),tf(this,this.div,["pointerdown"]),this.div}pointerdown(t){let{isMac:e}=ei.platform;if(t.button!==0||t.ctrlKey&&e){t.preventDefault();return}
13if(m(this,_r,!0),this._isDraggable){f(this,Pt,Gw).call(this,t);return}f(this,Pt,o_).call(this,t)}get isSelected(){return this._uiManager.isSelected(this)}moveInDOM(){a(this,zn)&&clearTimeout(a(this,zn)),m(this,zn,setTimeout(()=>{var t;m(this,zn,null),(t=this.parent)==null||t.moveEditorInDOM(this)},0))}_setParentAndPosition(t,e,i){t.changeParent(this),this.x=e,this.y=i,this.fixAndSetPosition()}getRect(t,e,i=this.rotation){let n=this.parentScale,[s,o]=this.pageDimensions,[l,c]=this.pageTranslation,h=t/n,d=e/n,u=this.x*s,p=this.y*o,g=this.width*s,_=this.height*o;switch(i){case 0:return[u+h+l,o-p-d-_+c,u+h+g+l,o-p-d+c];case 90:return[u+d+l,o-p+h+c,u+d+_+l,o-p+h+g+c];case 180:return[u-h-g+l,o-p+d+c,u-h+l,o-p+d+_+c];case 270:return[u-d-_+l,o-p-h-g+c,u-d+l,o-p-h+c];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){let[i,n,s,o]=t,l=s-i,c=o-n;switch(this.rotation){case 0:return[i,e-o,l,c];case 90:return[i,e-n,c,l];case 180:return[s,e-n,l,c];case 270:return[s,e-o,c,l];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){m(this,br,!0)}disableEditMode(){m(this,br,!1)}isInEditMode(){return a(this,br)}shouldGetKeyboardEvents(){return a(this,us)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){f(this,Pt,r_).call(this)}rotate(t){}serializeDeleted(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((t=this._initialData)==null?void 0:t.popupRef)||""}}serialize(t=!1,e=null){re("An editor must be serializable")}static deserialize(t,e,i){return O(this,null,function*(){let n=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:i});n.rotation=t.rotation,m(n,fr,t.accessibilityData);let[s,o]=n.pageDimensions,[l,c,h,d]=n.getRectInCurrentCoords(t.rect,o);return n.x=l/s,n.y=c/o,n.width=h/s,n.height=d/o,n})}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var t;if((t=a(this,uo))==null||t.abort(),m(this,uo,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),a(this,zn)&&(clearTimeout(a(this,zn)),m(this,zn,null)),f(this,Pt,qc).call(this),this.removeEditToolbar(),a(this,Zi)){for(let e of a(this,Zi).values())clearTimeout(e);m(this,Zi,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(f(this,Pt,Uw).call(this),a(this,Je).classList.remove("hidden"),tf(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),m(this,gr,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});let e=a(this,Je).children;if(!a(this,hn)){m(this,hn,Array.from(e));let o=f(this,Pt,$w).bind(this),l=f(this,Pt,Yw).bind(this),c=this._uiManager._signal;for(let h of a(this,hn)){let d=h.getAttribute("data-resizer-name");h.setAttribute("role","spinbutton"),h.addEventListener("keydown",o,{signal:c}),h.addEventListener("blur",l,{signal:c}),h.addEventListener("focus",f(this,Pt,Xw).bind(this,d),{signal:c}),h.setAttribute("data-l10n-id",Ht._l10nResizer[d])}}let i=a(this,hn)[0],n=0;for(let o of e){if(o===i)break;n++}let s=(360-this.rotation+this.parentRotation)%360/90*(a(this,hn).length/4);if(s!==n){if(s<n)for(let l=0;l<n-s;l++)a(this,Je).append(a(this,Je).firstChild);else if(s>n)for(let l=0;l<s-n;l++)a(this,Je).firstChild.before(a(this,Je).lastChild);let o=0;for(let l of e){let h=a(this,hn)[o++].getAttribute("data-resizer-name");l.setAttribute("data-l10n-id",Ht._l10nResizer[h])}}f(this,Pt,a_).call(this,0),m(this,us,!0),a(this,Je).firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}_resizeWithKeyboard(t,e){a(this,us)&&f(this,Pt,s_).call(this,a(this,kd),{movementX:t,movementY:e})}_stopResizingWithKeyboard(){f(this,Pt,qc).call(this),this.div.focus()}select(){var t,e,i;if(this.makeResizable(),(t=this.div)==null||t.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var n,s;(n=this.div)!=null&&n.classList.contains("selectedEditor")&&((s=this._editToolbar)==null||s.show())});return}(e=this._editToolbar)==null||e.show(),(i=a(this,he))==null||i.toggleAltTextBadge(!1)}unselect(){var t,e,i,n,s;(t=a(this,Je))==null||t.classList.add("hidden"),(e=this.div)==null||e.classList.remove("selectedEditor"),(i=this.div)!=null&&i.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(n=this._editToolbar)==null||n.hide(),(s=a(this,he))==null||s.toggleAltTextBadge(!0)}updateParams(t,e){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return a(this,Md)}set isEditing(t){m(this,Md,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){m(this,mr,!0);let i=t/e,{style:n}=this.div;n.aspectRatio=i,n.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,e=!1){if(e){a(this,Zi)||m(this,Zi,new Map);let{action:i}=t,n=a(this,Zi).get(i);n&&clearTimeout(n),n=setTimeout(()=>{this._reportTelemetry(t),a(this,Zi).delete(i),a(this,Zi).size===0&&m(this,Zi,null)},Ht._telemetryTimeout),a(this,Zi).set(i,n);return}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}
13show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),m(this,cl,!1)}disable(){this.div&&(this.div.tabIndex=-1),m(this,cl,!0)}renderAnnotationElement(t){let e=t.container.querySelector(".annotationContent");if(!e)e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);else if(e.nodeName==="CANVAS"){let i=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),i.before(e)}return e}resetAnnotationElement(t){let{firstChild:e}=t.container;(e==null?void 0:e.nodeName)==="DIV"&&e.classList.contains("annotationContent")&&e.remove()}};fr=new WeakMap,hn=new WeakMap,he=new WeakMap,cl=new WeakMap,mr=new WeakMap,Je=new WeakMap,gr=new WeakMap,uo=new WeakMap,kd=new WeakMap,_r=new WeakMap,po=new WeakMap,Md=new WeakMap,br=new WeakMap,us=new WeakMap,zn=new WeakMap,dl=new WeakMap,hl=new WeakMap,Zi=new WeakMap,Dd=new WeakMap,Lf=new WeakMap,Pt=new WeakSet,t_=function([t,e],i,n){[i,n]=this.screenToPageTranslation(i,n),this.x+=i/t,this.y+=n/e,this.fixAndSetPosition()},Rd=new WeakSet,e_=function(t,e,i){switch(i){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}},i_=function(t){switch(t){case 90:{let[e,i]=this.pageDimensions;return[0,-e/i,i/e,0]}case 180:return[-1,0,0,-1];case 270:{let[e,i]=this.pageDimensions;return[0,e/i,-i/e,0]}default:return[1,0,0,1]}},Uw=function(){if(a(this,Je))return;m(this,Je,document.createElement("div")),a(this,Je).classList.add("resizers");let t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal;for(let i of t){let n=document.createElement("div");a(this,Je).append(n),n.classList.add("resizer",i),n.setAttribute("data-resizer-name",i),n.addEventListener("pointerdown",f(this,Pt,Ww).bind(this,i),{signal:e}),n.addEventListener("contextmenu",on,{signal:e}),n.tabIndex=-1}this.div.prepend(a(this,Je))},Ww=function(t,e){var _;e.preventDefault();let{isMac:i}=ei.platform;if(e.button!==0||e.ctrlKey&&i)return;(_=a(this,he))==null||_.toggle(!1);let n=this._isDraggable;this._isDraggable=!1;let s=new AbortController,o=this._uiManager.combinedSignal(s);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",f(this,Pt,s_).bind(this,t),{passive:!0,capture:!0,signal:o}),window.addEventListener("contextmenu",on,{signal:o});let l=this.x,c=this.y,h=this.width,d=this.height,u=this.parent.div.style.cursor,p=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;let g=()=>{var y;s.abort(),this.parent.togglePointerEvents(!0),(y=a(this,he))==null||y.toggle(!0),this._isDraggable=n,this.parent.div.style.cursor=u,this.div.style.cursor=p,f(this,Pt,n_).call(this,l,c,h,d)};window.addEventListener("pointerup",g,{signal:o}),window.addEventListener("blur",g,{signal:o})},n_=function(t,e,i,n){let s=this.x,o=this.y,l=this.width,c=this.height;s===t&&o===e&&l===i&&c===n||this.addCommands({cmd:()=>{this.width=l,this.height=c,this.x=s,this.y=o;let[h,d]=this.parentDimensions;
13this.setDims(h*l,d*c),this.fixAndSetPosition()},undo:()=>{this.width=i,this.height=n,this.x=t,this.y=e;let[h,d]=this.parentDimensions;this.setDims(h*i,d*n),this.fixAndSetPosition()},mustExec:!0})},s_=function(t,e){let[i,n]=this.parentDimensions,s=this.x,o=this.y,l=this.width,c=this.height,h=Ht.MIN_SIZE/i,d=Ht.MIN_SIZE/n,u=it=>Math.round(it*1e4)/1e4,p=f(this,Pt,i_).call(this,this.rotation),g=(it,at)=>[p[0]*it+p[2]*at,p[1]*it+p[3]*at],_=f(this,Pt,i_).call(this,360-this.rotation),y=(it,at)=>[_[0]*it+_[2]*at,_[1]*it+_[3]*at],C,x,I=!1,A=!1;switch(t){case"topLeft":I=!0,C=(it,at)=>[0,0],x=(it,at)=>[it,at];break;case"topMiddle":C=(it,at)=>[it/2,0],x=(it,at)=>[it/2,at];break;case"topRight":I=!0,C=(it,at)=>[it,0],x=(it,at)=>[0,at];break;case"middleRight":A=!0,C=(it,at)=>[it,at/2],x=(it,at)=>[0,at/2];break;case"bottomRight":I=!0,C=(it,at)=>[it,at],x=(it,at)=>[0,0];break;case"bottomMiddle":C=(it,at)=>[it/2,at],x=(it,at)=>[it/2,0];break;case"bottomLeft":I=!0,C=(it,at)=>[0,at],x=(it,at)=>[it,0];break;case"middleLeft":A=!0,C=(it,at)=>[0,at/2],x=(it,at)=>[it,at/2];break}let E=C(l,c),L=x(l,c),v=g(...L),S=u(s+v[0]),M=u(o+v[1]),T=1,N=1,[B,W]=this.screenToPageTranslation(e.movementX,e.movementY);if([B,W]=y(B/i,W/n),I){let it=Math.hypot(l,c);T=N=Math.max(Math.min(Math.hypot(L[0]-E[0]-B,L[1]-E[1]-W)/it,1/l,1/c),h/l,d/c)}else A?T=Math.max(h,Math.min(1,Math.abs(L[0]-E[0]-B)))/l:N=Math.max(d,Math.min(1,Math.abs(L[1]-E[1]-W)))/c;let $=u(l*T),X=u(c*N);v=g(...x($,X));let et=S-v[0],rt=M-v[1];this.width=$,this.height=X,this.x=et,this.y=rt,this.setDims(i*$,n*X),this.fixAndSetPosition()},o_=function(t){let{isMac:e}=ei.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)},Gw=function(t){let{isSelected:e}=this;this._uiManager.setUpDragSession();let i=new AbortController,n=this._uiManager.combinedSignal(i);if(e){this.div.classList.add("moving"),m(this,dl,t.clientX),m(this,hl,t.clientY);let o=l=>{let{clientX:c,clientY:h}=l,[d,u]=this.screenToPageTranslation(c-a(this,dl),h-a(this,hl));m(this,dl,c),m(this,hl,h),this._uiManager.dragSelectedEditors(d,u)};window.addEventListener("pointermove",o,{passive:!0,capture:!0,signal:n})}let s=()=>{i.abort(),e&&this.div.classList.remove("moving"),m(this,_r,!1),this._uiManager.endDragSession()||f(this,Pt,o_).call(this,t)};window.addEventListener("pointerup",s,{signal:n}),window.addEventListener("blur",s,{signal:n})},r_=function(){if(a(this,uo)||!this.div)return;m(this,uo,new AbortController);let t=this._uiManager.combinedSignal(a(this,uo));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})},$w=function(t){Ht._resizerKeyboardManager.exec(this,t)},Yw=function(t){var e;a(this,us)&&((e=t.relatedTarget)==null?void 0:e.parentNode)!==a(this,Je)&&f(this,Pt,qc).call(this)},Xw=function(t){m(this,kd,a(this,us)?t:"")},a_=function(t){if(a(this,hn))for(let e of a(this,hn))e.tabIndex=t},qc=function(){if(m(this,us,!1),f(this,Pt,a_).call(this,-1),a(this,gr)){let{savedX:t,savedY:e,savedWidth:i,savedHeight:n}=a(this,gr);f(this,Pt,n_).call(this,t,e,i,n),m(this,gr,null)}},b(Ht,Rd),k(Ht,"_l10n",null),k(Ht,"_l10nResizer",null),k(Ht,"_borderLineWidth",-1),k(Ht,"_colorManager",new Yg),k(Ht,"_zIndex",1),k(Ht,"_telemetryTimeout",1e3);var Yt=Ht,l_=class extends Yt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}},dw=3285377520,qi=4294901760,Bn=65535,ef=class{constructor(t){this.h1=t?t&4294967295:dw,this.h2=t?t&4294967295:dw}update(t){let e,i;if(typeof t=="string"){e=new Uint8Array(t.length*2),i=0;for(let y=0,C=t.length;y<C;y++){let x=t.charCodeAt(y);x<=255?e[i++]=x:(e[i++]=x>>>8,e[i++]=x&255)}}else if(ArrayBuffer.isView(t))e=t.slice(),i=e.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");let n=i>>2,s=i-n*4,o=new Uint32Array(e.buffer,0,n),l=0,c=0,h=this.h1,d=this.h2,u=3432918353,p=461845907,g=u&Bn,_=p&Bn;for(let y=0;y<n;y++)y&1?(l=o[y],l=l*u&qi|l*g&Bn,l=l<<15|l>>>17,l=l*p&qi|l*_&Bn,h^=l,h=h<<13|h>>>19,h=h*5+3864292196):(c=o[y],c=c*u&qi|c*g&Bn,c=c<<15|c>>>17,c=c*p&qi|c*_&Bn,d^=c,d=d<<13|d>>>19,d=d*5+3864292196);switch(l=0,s){case 3:l^=e[n*4+2]<<16;case 2:l^=e[n*4+1]<<8;case 1:l^=e[n*4],l=l*u&qi|l*g&Bn,l=l<<15|l>>>17,l=l*p&qi|l*_&Bn,n&1?h^=l:d^=l}this.h1=h,this.h2=d}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=t*3981806797&qi|t*36045&Bn,e=e*4283543511&qi|((e<<16|t>>>16)*2950163797&qi)>>>16,t^=e>>>1,t=t*444984403&qi|t*60499&Bn,e=e*3301882366&qi|((e<<16|t>>>16)*3120437893&qi)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}},c_=Object.freeze({map:null,hash:"",transfer:void 0}),yr,vr,Xe,Of,Kw,gd=class{constructor(){b(this,Of);b(this,yr,!1);b(this,vr,null);b(this,Xe,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){let i=a(this,Xe).get(t);return i===void 0?e:Object.assign(e,i)}getRawValue(t){return a(this,Xe).get(t)}remove(t){if(a(this,Xe).delete(t),a(this,Xe).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(let e of a(this,Xe).values())if(e instanceof Yt)return;this.onAnnotationEditor(null)}}setValue(t,e){let i=a(this,Xe).get(t),n=!1;if(i!==void 0)for(let[s,o]of Object.entries(e))i[s]!==o&&(n=!0,i[s]=o);else n=!0,a(this,Xe).set(t,e);n&&f(this,Of,Kw).call(this),e instanceof Yt&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(e.constructor._type)}has(t){return a(this,Xe).has(t)}getAll(){return a(this,Xe).size>0?Jb(a(this,Xe)):null}setAll(t){for(let[e,i]of Object.entries(t))this.setValue(e,i)}get size(){return a(this,Xe).size}resetModified(){a(this,yr)&&(m(this,yr,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new nf(this)}get serializable(){if(a(this,Xe).size===0)return c_;let t=new Map,e=new ef,i=[],n=Object.create(null),s=!1;for(let[o,l]of a(this,Xe)){let c=l instanceof Yt?l.serialize(!1,n):l;c&&(t.set(o,c),e.update(`${o}:${JSON.stringify(c)}`),s||(s=!!c.bitmap))}if(s)for(let o of t.values())o.bitmap&&i.push(o.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:i}:c_}get editorStats(){var i;let t=null,e=new Map;for(let n of a(this,Xe).values()){if(!(n instanceof Yt))continue;let s=n.telemetryFinalData;if(!s)continue;let{type:o}=s;e.has(o)||e.set(o,Object.getPrototypeOf(n).constructor),t||(t=Object.create(null));let l=t[o]||(t[o]=new Map);for(let[c,h]of Object.entries(s)){if(c==="type")continue;let d=l.get(c);d||(d=new Map,l.set(c,d));let u=(i=d.get(h))!=null?i:0;d.set(h,u+1)}}for(let[n,s]of e)t[n]=s.computeTelemetryFinalData(t[n]);return t}resetModifiedIds(){m(this,vr,null)}get modifiedIds(){if(a(this,vr))return a(this,vr);let t=[];for(let e of a(this,Xe).values())!(e instanceof Yt)||!e.annotationElementId||!e.serialize()||t.pu
13sh(e.annotationElementId);return m(this,vr,{ids:new Set(t),hash:t.join(",")})}};yr=new WeakMap,vr=new WeakMap,Xe=new WeakMap,Of=new WeakSet,Kw=function(){a(this,yr)||(m(this,yr,!0),typeof this.onSetModified=="function"&&this.onSetModified())};var Ld,nf=class extends gd{constructor(e){super();b(this,Ld);let{map:i,hash:n,transfer:s}=e.serializable,o=structuredClone(i,s?{transfer:s}:null);m(this,Ld,{map:o,hash:n,transfer:s})}get print(){re("Should not call PrintAnnotationStorage.print")}get serializable(){return a(this,Ld)}get modifiedIds(){return Ot(this,"modifiedIds",{ids:new Set,hash:""})}};Ld=new WeakMap;var ul,d_=class{constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){b(this,ul,new Set);this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));let e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(let t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),a(this,ul).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}loadSystemFont(i){return O(this,arguments,function*({systemFontInfo:t,_inspectFont:e}){if(!(!t||a(this,ul).has(t.loadedName))){if(Be(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){let{loadedName:n,src:s,style:o}=t,l=new FontFace(n,s,o);this.addNativeFontFace(l);try{yield l.load(),a(this,ul).add(n),e==null||e(t)}catch{Tt(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(l)}return}re("Not implemented: loadSystemFont without the Font Loading API.")}})}bind(t){return O(this,null,function*(){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){yield this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){let i=t.createNativeFontFace();if(i){this.addNativeFontFace(i);try{yield i.loaded}catch(n){throw Tt(`Failed to load font '${i.family}': '${n}'.`),t.disableFontFace=!0,n}}return}let e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;yield new Promise(i=>{let n=this._queueLoadingCallback(i);this._prepareFontLoadEvent(t,n)})}})}get isFontLoadingAPISupported(){var e;let t=!!((e=this._document)!=null&&e.fonts);return Ot(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let t=!1;return(di||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0),Ot(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){function e(){for(Be(!n.done,"completeRequest() cannot be called twice."),n.done=!0;i.length>0&&i[0].done;){let s=i.shift();setTimeout(s.callback,0)}}let{loadingRequests:i}=this,n={done:!1,complete:e,callback:t};return i.push(n),n}get _loadTestFont(){let t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return Ot(this,"_loadTestFont",t)}
13_prepareFontLoadEvent(t,e){function i(E,L){return E.charCodeAt(L)<<24|E.charCodeAt(L+1)<<16|E.charCodeAt(L+2)<<8|E.charCodeAt(L+3)&255}function n(E,L,v,S){let M=E.substring(0,L),T=E.substring(L+v);return M+S+T}let s,o,l=this._document.createElement("canvas");l.width=1,l.height=1;let c=l.getContext("2d"),h=0;function d(E,L){if(++h>30){Tt("Load test font never loaded."),L();return}if(c.font="30px "+E,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0){L();return}setTimeout(d.bind(null,E,L))}let u=`lt${Date.now()}${this.loadTestFontId++}`,p=this._loadTestFont;p=n(p,976,u.length,u);let _=16,y=1482184792,C=i(p,_);for(s=0,o=u.length-3;s<o;s+=4)C=C-y+i(u,s)|0;s<u.length&&(C=C-y+i(u+"XXX",s)|0),p=n(p,_,4,OP(C));let x=`url(data:font/opentype;base64,${btoa(p)});`,I=`@font-face {font-family:"${u}";src:${x}}`;this.insertRule(I);let A=this._document.createElement("div");A.style.visibility="hidden",A.style.width=A.style.height="10px",A.style.position="absolute",A.style.top=A.style.left="0px";for(let E of[t.loadedName,u]){let L=this._document.createElement("span");L.textContent="Hi",L.style.fontFamily=E,A.append(L)}this._document.body.append(A),d(u,()=>{A.remove(),e.complete()})}};ul=new WeakMap;var h_=class{constructor(t,{disableFontFace:e=!1,inspectFont:i=null}){this.compiledGlyphs=Object.create(null);for(let n in t)this[n]=t[n];this.disableFontFace=e===!0,this._inspectFont=i}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{let i={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(i.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,i)}return(e=this._inspectFont)==null||e.call(this,this),t}createFontFaceRule(){var i;if(!this.data||this.disableFontFace)return null;let t=`url(data:${this.mimetype};base64,${jP(this.data)});`,e;if(!this.cssFontInfo)e=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let n=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(n+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${n}src:${t}}`}return(i=this._inspectFont)==null||i.call(this,this,t),e}getPathGenerator(t,e){if(this.compiledGlyphs[e]!==void 0)return this.compiledGlyphs[e];let i;try{i=t.get(this.loadedName+"_path_"+e)}catch(s){Tt(`getPathGenerator - ignoring character: "${s}".`)}if(!Array.isArray(i)||i.length===0)return this.compiledGlyphs[e]=function(s,o){};let n=[];for(let s=0,o=i.length;s<o;)switch(i[s++]){case as.BEZIER_CURVE_TO:{let[l,c,h,d,u,p]=i.slice(s,s+6);n.push(g=>g.bezierCurveTo(l,c,h,d,u,p)),s+=6}break;case as.MOVE_TO:{let[l,c]=i.slice(s,s+2);n.push(h=>h.moveTo(l,c)),s+=2}break;case as.LINE_TO:{let[l,c]=i.slice(s,s+2);n.push(h=>h.lineTo(l,c)),s+=2}break;case as.QUADRATIC_CURVE_TO:{let[l,c,h,d]=i.slice(s,s+4);n.push(u=>u.quadraticCurveTo(l,c,h,d)),s+=4}break;case as.RESTORE:n.push(l=>l.restore());break;case as.SAVE:n.push(l=>l.save());break;case as.SCALE:Be(n.length===2,"Scale command is only valid at the third position.");break;case as.TRANSFORM:{let[l,c,h,d,u,p]=i.slice(s,s+6);n.push(g=>g.transform(l,c,h,d,u,p)),s+=6}break;case as.TRANSLATE:{let[l,c]=i.slice(s,s+2);n.push(h=>h.translate(l,c)),s+=2}break}return this.compiledGlyphs[e]=function(o,l){n[0](o),n[1](o),o.scale(l,-l);for(let c=2,h=n.length;c<h;c++)n[c](o)}}},Od,sf=class{constructor({enableHWA:t=!1}){b(this,Od,!1);m(this,Od,t)}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");let i=this._createCanvas(t,e);return{canvas:i,context:i.getContext("2d",{willReadFrequently:!a(this,Od)})}}reset(t,e,i){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||i<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=i}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){re("Abstract method `_createCanvas` called.")}};Od=new WeakMap;var u_=class extends sf{constructor({ownerDocument:t=globalThis.document,enableHWA:e=!1}){super({enableHWA:e}),this._document=t}_createCanvas(t,e){let i=this._document.createElement("canvas");return i.width=t,i.height=e,i}},of=class{constructor({baseUrl:t=null,isCompressed:e=!0}){this.baseUrl=t,this.isCompressed=e}fetch(e){return O(this,arguments,function*({name:t}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!t)throw new Error("CMap name must be specified.");let i=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetch(i).then(n=>({cMapData:n,isCompressed:this.isCompressed})).catch(n=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${i}`)})})}_fetch(t){return O(this,null,function*(){re("Abstract method `_fetch` called.")})}},rf=class extends of{_fetch(t){return O(this,null,function*(){let e=yield Kf(t,this.isCompressed?"arraybuffer":"text");return e instanceof ArrayBuffer?new Uint8Array(e):Xf(e)})}},af=class{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,i,n,s){return"none"}destroy(t=!1){}},xr,wr,Vn,ps,li,Nf,Ar,J,ri,Ka,qa,Tp,Za,qw,f_,Qa,Zc,Qc,m_,Jc,p_=class extends af{constructor({docId:e,ownerDocument:i=globalThis.document}){super();b(this,J);b(this,xr);b(this,wr);b(this,Vn);b(this,ps);b(this,li);b(this,Nf);b(this,Ar,0);
13m(this,ps,e),m(this,li,i)}addFilter(e){if(!e)return"none";let i=a(this,J,ri).get(e);if(i)return i;let[n,s,o]=f(this,J,Tp).call(this,e),l=e.length===1?n:`${n}${s}${o}`;if(i=a(this,J,ri).get(l),i)return a(this,J,ri).set(e,i),i;let c=`g_${a(this,ps)}_transfer_map_${Ze(this,Ar)._++}`,h=f(this,J,Za).call(this,c);a(this,J,ri).set(e,h),a(this,J,ri).set(l,h);let d=f(this,J,Qa).call(this,c);return f(this,J,Qc).call(this,n,s,o,d),h}addHCMFilter(e,i){var _;let n=`${e}-${i}`,s="base",o=a(this,J,Ka).get(s);if((o==null?void 0:o.key)===n||(o?((_=o.filter)==null||_.remove(),o.key=n,o.url="none",o.filter=null):(o={key:n,url:"none",filter:null},a(this,J,Ka).set(s,o)),!e||!i))return o.url;let l=f(this,J,Jc).call(this,e);e=ot.makeHexColor(...l);let c=f(this,J,Jc).call(this,i);if(i=ot.makeHexColor(...c),a(this,J,qa).style.color="",e==="#000000"&&i==="#ffffff"||e===i)return o.url;let h=new Array(256);for(let y=0;y<=255;y++){let C=y/255;h[y]=C<=.03928?C/12.92:((C+.055)/1.055)**2.4}let d=h.join(","),u=`g_${a(this,ps)}_hcm_filter`,p=o.filter=f(this,J,Qa).call(this,u);f(this,J,Qc).call(this,d,d,d,p),f(this,J,f_).call(this,p);let g=(y,C)=>{let x=l[y]/255,I=c[y]/255,A=new Array(C+1);for(let E=0;E<=C;E++)A[E]=x+E/C*(I-x);return A.join(",")};return f(this,J,Qc).call(this,g(0,5),g(1,5),g(2,5),p),o.url=f(this,J,Za).call(this,u),o.url}addAlphaFilter(e){let i=a(this,J,ri).get(e);if(i)return i;let[n]=f(this,J,Tp).call(this,[e]),s=`alpha_${n}`;if(i=a(this,J,ri).get(s),i)return a(this,J,ri).set(e,i),i;let o=`g_${a(this,ps)}_alpha_map_${Ze(this,Ar)._++}`,l=f(this,J,Za).call(this,o);a(this,J,ri).set(e,l),a(this,J,ri).set(s,l);let c=f(this,J,Qa).call(this,o);return f(this,J,m_).call(this,n,c),l}addLuminosityFilter(e){let i=a(this,J,ri).get(e||"luminosity");if(i)return i;let n,s;if(e?([n]=f(this,J,Tp).call(this,[e]),s=`luminosity_${n}`):s="luminosity",i=a(this,J,ri).get(s),i)return a(this,J,ri).set(e,i),i;let o=`g_${a(this,ps)}_luminosity_map_${Ze(this,Ar)._++}`,l=f(this,J,Za).call(this,o);a(this,J,ri).set(e,l),a(this,J,ri).set(s,l);let c=f(this,J,Qa).call(this,o);return f(this,J,qw).call(this,c),e&&f(this,J,m_).call(this,n,c),l}addHighlightHCMFilter(e,i,n,s,o){var I;let l=`${i}-${n}-${s}-${o}`,c=a(this,J,Ka).get(e);if((c==null?void 0:c.key)===l||(c?((I=c.filter)==null||I.remove(),c.key=l,c.url="none",c.filter=null):(c={key:l,url:"none",filter:null},a(this,J,Ka).set(e,c)),!i||!n))return c.url;let[h,d]=[i,n].map(f(this,J,Jc).bind(this)),u=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),p=Math.round(.2126*d[0]+.7152*d[1]+.0722*d[2]),[g,_]=[s,o].map(f(this,J,Jc).bind(this));p<u&&([u,p,g,_]=[p,u,_,g]),a(this,J,qa).style.color="";let y=(A,E,L)=>{let v=new Array(256),S=(p-u)/L,M=A/255,T=(E-A)/(255*L),N=0;for(let B=0;B<=L;B++){let W=Math.round(u+B*S),$=M+B*T;for(let X=N;X<=W;X++)v[X]=$;N=W+1}for(let B=N;B<256;B++)v[B]=v[N-1];return v.join(",")},C=`g_${a(this,ps)}_hcm_${e}_filter`,x=c.filter=f(this,J,Qa).call(this,C);return f(this,J,f_).call(this,x),f(this,J,Qc).call(this,y(g[0],_[0],5),y(g[1],_[1],5),y(g[2],_[2],5),x),c.url=f(this,J,Za).call(this,C),c.url}destroy(e=!1){e&&a(this,J,Ka).size!==0||(a(this,Vn)&&(a(this,Vn).parentNode.parentNode.remove(),m(this,Vn,null)),a(this,wr)&&(a(this,wr).clear(),m(this,wr,null)),m(this,Ar,0))}};xr=new WeakMap,wr=new WeakMap,Vn=new WeakMap,ps=new WeakMap,li=new WeakMap,Nf=new WeakMap,Ar=new WeakMap,J=new WeakSet,ri=function(){return a(this,wr)||m(this,wr,new Map)},Ka=function(){return a(this,Nf)||m(this,Nf,new Map)},qa=function(){if(!a(this,Vn)){let e=a(this,li).createElement("div"),{style:i}=e;i.visibility="hidden",i.contain="strict",i.width=i.height=0,i.position="absolute",i.top=i.left=0,i.zIndex=-1;let n=a(this,li).createElementNS(cs,"svg");n.setAttribute("width",0),n.setAttribute("height",0),m(this,Vn,a(this,li).createElementNS(cs,"defs")),e.append(n),n.append(a(this,Vn)),a(this,li).body.append(e)}return a(this,Vn)},Tp=function(e){if(e.length===1){let h=e[0],d=new Array(256);for(let p=0;p<256;p++)d[p]=h[p]/255;let u=d.join(",");return[u,u,u]}let[i,n,s]=e,o=new Array(256),l=new Array(256),c=new Array(256);for(let h=0;h<256;h++)o[h]=i[h]/255,l[h]=n[h]/255,c[h]=s[h]/255;return[o.join(","),l.join(","),c.join(",")]},Za=function(e){if(a(this,xr)===void 0){m(this,xr,"");let i=a(this,li).URL;i!==a(this,li).baseURI&&(qf(i)?Tt('#createUrl: ignore "data:"-URL for performance reasons.'):m(this,xr,i.split("#",1)[0]))}return`url(${a(this,xr)}#${e})`},qw=function(e){let i=a(this,li).createElementNS(cs,"feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.a
13ppend(i)},f_=function(e){let i=a(this,li).createElementNS(cs,"feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(i)},Qa=function(e){let i=a(this,li).createElementNS(cs,"filter");return i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("id",e),a(this,J,qa).append(i),i},Zc=function(e,i,n){let s=a(this,li).createElementNS(cs,i);s.setAttribute("type","discrete"),s.setAttribute("tableValues",n),e.append(s)},Qc=function(e,i,n,s){let o=a(this,li).createElementNS(cs,"feComponentTransfer");s.append(o),f(this,J,Zc).call(this,o,"feFuncR",e),f(this,J,Zc).call(this,o,"feFuncG",i),f(this,J,Zc).call(this,o,"feFuncB",n)},m_=function(e,i){let n=a(this,li).createElementNS(cs,"feComponentTransfer");i.append(n),f(this,J,Zc).call(this,n,"feFuncA",e)},Jc=function(e){return a(this,J,qa).style.color=e,iy(getComputedStyle(a(this,J,qa)).getPropertyValue("color"))};var lf=class{constructor({baseUrl:t=null}){this.baseUrl=t}fetch(e){return O(this,arguments,function*({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!t)throw new Error("Font filename must be specified.");let i=`${this.baseUrl}${t}`;return this._fetch(i).catch(n=>{throw new Error(`Unable to load font data at: ${i}`)})})}_fetch(t){return O(this,null,function*(){re("Abstract method `_fetch` called.")})}},cf=class extends lf{_fetch(t){return O(this,null,function*(){let e=yield Kf(t,"arraybuffer");return new Uint8Array(e)})}};di&&(Ip=Promise.withResolvers(),sl=null,O(null,null,function*(){let t=yield import("./chunk-L2HEV66R.js"),e=yield import("./chunk-BMBYILCS.js"),i=yield import("./chunk-ALIQTIYY.js"),n=yield import("./chunk-NYZOWURK.js"),s,o;return new Map(Object.entries({fs:t,http:e,https:i,url:n,canvas:s,path2d:o}))}).then(t=>{sl=t,Ip.resolve()},t=>{Tt(`loadPackages: ${t}`),sl=new Map,Ip.resolve()}));var Ip,sl,Xn=class{static get promise(){return Ip.promise}static get(t){return sl==null?void 0:sl.get(t)}};function Zw(r){return O(this,null,function*(){let e=yield Xn.get("fs").promises.readFile(r);return new Uint8Array(e)})}var g_=class extends af{},__=class extends sf{_createCanvas(t,e){return Xn.get("canvas").createCanvas(t,e)}},b_=class extends of{_fetch(t){return O(this,null,function*(){return Zw(t)})}},y_=class extends lf{_fetch(t){return O(this,null,function*(){return Zw(t)})}},fi={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function v_(r,t){if(!t)return;let e=t[2]-t[0],i=t[3]-t[1],n=new Path2D;n.rect(t[0],t[1],e,i),r.clip(n)}var _d=class{getPattern(){re("Abstract method `getPattern` called.")}},x_=class extends _d{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;this._type==="axial"?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(let i of this._colorStops)e.addColorStop(i[0],i[1]);return e}getPattern(t,e,i,n){let s;if(n===fi.STROKE||n===fi.FILL){let o=e.current.getClippedPathBoundingBox(n,pe(t))||[0,0,0,0],l=Math.ceil(o[2]-o[0])||1,c=Math.ceil(o[3]-o[1])||1,h=e.cachedCanvases.getCanvas("pattern",l,c),d=h.context;d.clearRect(0,0,d.canvas.width,d.canvas.height),d.beginPath(),d.rect(0,0,d.canvas.width,d.canvas.height),d.translate(-o[0],-o[1]),i=ot.transform(i,[1,0,0,1,o[0],o[1]]),d.transform(...e.baseTransform),this.matrix&&d.transform(...this.matrix),v_(d,this._bbox),d.fillStyle=this._createGradient(d),d.fill(),s=t.createPattern(h.canvas,"no-repeat");let u=new DOMMatrix(i);s.setTransform(u)}else v_(t,this._bbox),s=this._createGradient(t);return s}};function Og(r,t,e,i,n,s,o,l){let c=t.coords,h=t.colors,d=r.data,u=r.width*4,p;c[e+1]>c[i+1]&&(p=e,e=i,i=p,p=s,s=o,o=p),c[i+1]>c[n+1]&&(p=i,i=n,n=p,p=o,o=l,l=p),c[e+1]>c[i+1]&&(p=e,e=i,i=p,p=s,s=o,o=p);let g=(c[e]+t.offsetX)*t.scaleX,_=(c[e+1]+t.offsetY)*t.scaleY,y=(c[i]+t.offsetX)*t.scaleX,C=(c[i+1]+t.offsetY)*t.scaleY,x=(c[n]+t.offsetX)*t.scaleX,I=(c[n+1]+t.offsetY)*t.scaleY;if(_>=I)return;let A=h[s],E=h[s+1],L=h[s+2],v=h[o],S=h[o+1],M=h[o+2],T=h[l],N=h[l+1],B=h[l+2],W=Math.round(_),$=Math.round(I),X,et,rt,it,at,ii,ni,me;for(let zt=W;zt<=$;zt++){if(zt<C){let Xt=zt<_?0:(_-zt)/(_-C);X=g-(g-y)*Xt,et=A-(A-v)*Xt,rt=E-(E-S)*Xt,it=L-(L-M)*Xt}else{let Xt;zt>I?Xt=1:C===I?Xt=0:Xt=(C-zt)/(C-I),X=y-(y-x)*Xt,et=v-(v-T)*Xt,rt=S-(S-N)*Xt,it=M-(M-B)*Xt}let Lt;zt<_?Lt=0:zt>I?Lt=1:Lt=(_-zt)/(_-I),at=g-(g-x)*Lt,ii=A-(A-T)*Lt,ni=E-(E-N)*Lt,me=L-(L-B)*Lt;let si=Math.round(Math.min(X,at)),ye=Math.round(Math.max(X,at)),U=u*zt+si*4;for(let Xt=si;Xt<=ye;Xt++)Lt=(X-Xt)/(X-at),Lt<0?Lt=0:Lt>1&&(Lt=1),d[U++]=et-(et-ii)*Lt|0,d[U++]=rt-(rt-ni)*Lt|0,d[U++]=it-(it-me)*Lt|0,d[U++]=255}}function YP(r,t,e){let i=t.coords,n=t.colors,s,o;switch(t.type){case"lattice":let l=t.verticesPerRow,c=Math.floor(i.length/l)-1,h=l-1;for(s=0;s<c;s++){let d=s*l;for(let u=0;u<h;u++,d++)Og(r,e,i[d],i[d+1],i[d+l],n[d],n[d+1],n[d+l]),Og(r,e,i[d+l+1],i[d+1],i[d+l],n[d+l+1],n[d+1],n[d+l])}break;case"triangles":for(s=0,o=i.length;s<o;s+=3)Og(r,e,i[s],i[s+1],i[s+2],n[s],n[s+1],n[s+2]);break;default:throw new Error("illegal figure")}}var w_=class extends _d{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[7],this._background=t[8],this.matrix=null}_createMeshCanvas(t,e,i){let l=Math.floor(this._bounds[0]),c=Math.floor(this._bounds[1]),h=Math.ceil(this._bounds[2])-l,d=Math.ceil(this._bounds[3])-c,u=Math.min(Math.ceil(Math.abs(h*t[0]*1.1)),3e3),p=Math.min(Math.ceil(Math.abs(d*t[1]*1.1)),3e3),g=h/u,_=d/p,y={coords:this._coords,colors:this._colors,offsetX:-l,offsetY:-c,scaleX:1/g,scaleY:1/_},C=u+2*2,x=p+2*2,I=i.getCanvas("mesh",C,x),A=I.context,E=A.createImageData(u,p);if(e){let v=E.data;for(let S=0,M=v.length;S<M;S+=4)v[S]=e[0],v[S+1]=e[1],v[S+2]=e[2],v[S+3]=255}for(let v of this._figures)YP(E,v,y);return A.putImageData(E,2,2),{canvas:I.canvas,offsetX:l-2*g,offsetY:c-2*_,scaleX:g,scaleY:_}}getPattern(t,e,i,n){v_(t,this._bbox);let s;if(n===fi.SHADING)s=ot.singularValueDecompose2dScale(pe(t));else if(s=ot.singularValueDecompose2dScale(e.baseTransform),this.matrix
13){let l=ot.singularValueDecompose2dScale(this.matrix);s=[s[0]*l[0],s[1]*l[1]]}let o=this._createMeshCanvas(s,n===fi.SHADING?null:this._background,e.cachedCanvases);return n!==fi.SHADING&&(t.setTransform(...e.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(o.offsetX,o.offsetY),t.scale(o.scaleX,o.scaleY),t.createPattern(o.canvas,"no-repeat")}},A_=class extends _d{getPattern(){return"hotpink"}};function XP(r){switch(r[0]){case"RadialAxial":return new x_(r);case"Mesh":return new w_(r);case"Dummy":return new A_}throw new Error(`Unknown IR type: ${r[0]}`)}var hw={COLORED:1,UNCOLORED:2},KP=(()=>{let t=class t{constructor(i,n,s,o,l){this.operatorList=i[2],this.matrix=i[3],this.bbox=i[4],this.xstep=i[5],this.ystep=i[6],this.paintType=i[7],this.tilingType=i[8],this.color=n,this.ctx=s,this.canvasGraphicsFactory=o,this.baseTransform=l}createPatternCanvas(i){let{bbox:n,operatorList:s,paintType:o,tilingType:l,color:c,canvasGraphicsFactory:h}=this,{xstep:d,ystep:u}=this;d=Math.abs(d),u=Math.abs(u),Yf("TilingType: "+l);let p=n[0],g=n[1],_=n[2],y=n[3],C=_-p,x=y-g,I=ot.singularValueDecompose2dScale(this.matrix),A=ot.singularValueDecompose2dScale(this.baseTransform),E=I[0]*A[0],L=I[1]*A[1],v=C,S=x,M=!1,T=!1,N=Math.ceil(d*E),B=Math.ceil(u*L),W=Math.ceil(C*E),$=Math.ceil(x*L);N>=W?v=d:M=!0,B>=$?S=u:T=!0;let X=this.getSizeAndScale(v,this.ctx.canvas.width,E),et=this.getSizeAndScale(S,this.ctx.canvas.height,L),rt=i.cachedCanvases.getCanvas("pattern",X.size,et.size),it=rt.context,at=h.createCanvasGraphics(it);if(at.groupLevel=i.groupLevel,this.setFillAndStrokeStyleToContext(at,o,c),it.translate(-X.scale*p,-et.scale*g),at.transform(X.scale,0,0,et.scale,0,0),it.save(),this.clipBbox(at,p,g,_,y),at.baseTransform=pe(at.ctx),at.executeOperatorList(s),at.endDrawing(),it.restore(),M||T){let ii=rt.canvas;M&&(v=d),T&&(S=u);let ni=this.getSizeAndScale(v,this.ctx.canvas.width,E),me=this.getSizeAndScale(S,this.ctx.canvas.height,L),zt=ni.size,Lt=me.size,si=i.cachedCanvases.getCanvas("pattern-workaround",zt,Lt),ye=si.context,U=M?Math.floor(C/d):0,Xt=T?Math.floor(x/u):0;for(let ln=0;ln<=U;ln++)for(let Zo=0;Zo<=Xt;Zo++)ye.drawImage(ii,zt*ln,Lt*Zo,zt,Lt,0,0,zt,Lt);return{canvas:si.canvas,scaleX:ni.scale,scaleY:me.scale,offsetX:p,offsetY:g}}return{canvas:rt.canvas,scaleX:X.scale,scaleY:et.scale,offsetX:p,offsetY:g}}getSizeAndScale(i,n,s){let o=Math.max(t.MAX_PATTERN_SIZE,n),l=Math.ceil(i*s);return l>=o?l=o:s=l/i,{scale:s,size:l}}clipBbox(i,n,s,o,l){let c=o-n,h=l-s;i.ctx.rect(n,s,c,h),i.current.updateRectMinMax(pe(i.ctx),[n,s,o,l]),i.clip(),i.endPath()}setFillAndStrokeStyleToContext(i,n,s){let o=i.ctx,l=i.current;switch(n){case hw.COLORED:let c=this.ctx;o.fillStyle=c.fillStyle,o.strokeStyle=c.strokeStyle,l.fillColor=c.fillStyle,l.strokeColor=c.strokeStyle;break;case hw.UNCOLORED:let h=ot.makeHexColor(s[0],s[1],s[2]);o.fillStyle=h,o.strokeStyle=h,l.fillColor=h,l.strokeColor=h;break;default:throw new zg(`Unsupported paint type: ${n}`)}}getPattern(i,n,s,o){let l=s;o!==fi.SHADING&&(l=ot.transform(l,n.baseTransform),this.matrix&&(l=ot.transform(l,this.matrix)));let c=this.createPatternCanvas(n),h=new DOMMatrix(l);h=h.translate(c.offsetX,c.offsetY),h=h.scale(1/c.scaleX,1/c.scaleY);let d=i.createPattern(c.canvas,"repeat");return d.setTransform(h),d}};k(t,"MAX_PATTERN_SIZE",3e3);let r=t;return r})();function qP({src:r,srcPos:t=0,dest:e,width:i,height:n,nonBlackColor:s=4294967295,inverseDecode:o=!1}){let l=ei.isLittleEndian?4278190080:255,[c,h]=o?[s,l]:[l,s],d=i>>3,u=i&7,p=r.length;e=new Uint32Array(e.buffer);let g=0;for(let _=0;_<n;_++){for(let C=t+d;t<C;t++){let x=t<p?r[t]:255;e[g++]=x&128?h:c,e[g++]=x&64?h:c,e[g++]=x&32?h:c,e[g++]=x&16?h:c,e[g++]=x&8?h:c,e[g++]=x&4?h:c,e[g++]=x&2?h:c,e[g++]=x&1?h:c}if(u===0)continue;let y=t<p?r[t++]:255;for(let C=0;C<u;C++)e[g++]=y&1<<7-C?h:c}return{srcPos:t,destPos:g}}var uw=16,pw=100,ZP=15,fw=10,mw=1e3,Ai=16;function QP(r,t){if(r._removeMirroring)throw new Error("Context is already forwarding operations.");r.__originalSave=r.save,r.__originalRestore=r.restore,r.__originalRotate=r.rotate,r.__originalScale=r.scale,r.__originalTranslate=r.translate,r.__originalTransform=r.transform,r.__originalSetTransform=r.setTransform,r.__originalResetTransform=r.resetTransform,r.__originalClip=r.clip,r.__originalMoveTo=r.moveTo,r.__originalLineTo=r.lineTo,r.__originalBezierCurveTo=r.bezierCurveTo,r.__originalRect=r.rect,r.__originalClosePath=r.closePath,r.__originalBeginPath=r.beginPath,r._removeMirroring=()=>{r.save=r.__originalSave,r.restore=r.__originalRestore,r.rotate=r.__originalRotate,r.scale=r.__originalScale,r.translate=r.__originalTranslate,r.transform=r.__originalTransform,r.setTransform=r.__originalSetTransform,r.resetTransform=r.__originalResetTransform,r.clip=r.__originalClip,r.moveTo=r.__originalMoveTo,r.lineTo=r.__originalLineTo,r.bezierCurveTo=r.__originalBezierCurveTo,r.rect=r.__originalRect,r.closePath=r.__originalClosePath,r.beginPath=r.__originalBeginPath,delete r._removeMirroring},r.save=function(){t.save(),this.__originalSave()}
13,r.restore=function(){t.restore(),this.__originalRestore()},r.translate=function(i,n){t.translate(i,n),this.__originalTranslate(i,n)},r.scale=function(i,n){t.scale(i,n),this.__originalScale(i,n)},r.transform=function(i,n,s,o,l,c){t.transform(i,n,s,o,l,c),this.__originalTransform(i,n,s,o,l,c)},r.setTransform=function(i,n,s,o,l,c){t.setTransform(i,n,s,o,l,c),this.__originalSetTransform(i,n,s,o,l,c)},r.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},r.rotate=function(i){t.rotate(i),this.__originalRotate(i)},r.clip=function(i){t.clip(i),this.__originalClip(i)},r.moveTo=function(e,i){t.moveTo(e,i),this.__originalMoveTo(e,i)},r.lineTo=function(e,i){t.lineTo(e,i),this.__originalLineTo(e,i)},r.bezierCurveTo=function(e,i,n,s,o,l){t.bezierCurveTo(e,i,n,s,o,l),this.__originalBezierCurveTo(e,i,n,s,o,l)},r.rect=function(e,i,n,s){t.rect(e,i,n,s),this.__originalRect(e,i,n,s)},r.closePath=function(){t.closePath(),this.__originalClosePath()},r.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}var C_=class{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,i){let n;return this.cache[t]!==void 0?(n=this.cache[t],this.canvasFactory.reset(n,e,i)):(n=this.canvasFactory.create(e,i),this.cache[t]=n),n}delete(t){delete this.cache[t]}clear(){for(let t in this.cache){let e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}};function mp(r,t,e,i,n,s,o,l,c,h){let[d,u,p,g,_,y]=pe(r);if(u===0&&p===0){let I=o*d+_,A=Math.round(I),E=l*g+y,L=Math.round(E),v=(o+c)*d+_,S=Math.abs(Math.round(v)-A)||1,M=(l+h)*g+y,T=Math.abs(Math.round(M)-L)||1;return r.setTransform(Math.sign(d),0,0,Math.sign(g),A,L),r.drawImage(t,e,i,n,s,0,0,S,T),r.setTransform(d,u,p,g,_,y),[S,T]}if(d===0&&g===0){let I=l*p+_,A=Math.round(I),E=o*u+y,L=Math.round(E),v=(l+h)*p+_,S=Math.abs(Math.round(v)-A)||1,M=(o+c)*u+y,T=Math.abs(Math.round(M)-L)||1;return r.setTransform(0,Math.sign(u),Math.sign(p),0,A,L),r.drawImage(t,e,i,n,s,0,0,T,S),r.setTransform(d,u,p,g,_,y),[T,S]}r.drawImage(t,e,i,n,s,o,l,c,h);let C=Math.hypot(d,u),x=Math.hypot(p,g);return[C*c,x*h]}function JP(r){let{width:t,height:e}=r;if(t>mw||e>mw)return null;let i=1e3,n=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),s=t+1,o=new Uint8Array(s*(e+1)),l,c,h,d=t+7&-8,u=new Uint8Array(d*e),p=0;for(let x of r.data){let I=128;for(;I>0;)u[p++]=x&I?0:255,I>>=1}let g=0;for(p=0,u[p]!==0&&(o[0]=1,++g),c=1;c<t;c++)u[p]!==u[p+1]&&(o[c]=u[p]?2:1,++g),p++;for(u[p]!==0&&(o[c]=2,++g),l=1;l<e;l++){p=l*d,h=l*s,u[p-d]!==u[p]&&(o[h]=u[p]?1:8,++g);let x=(u[p]?4:0)+(u[p-d]?8:0);for(c=1;c<t;c++)x=(x>>2)+(u[p+1]?4:0)+(u[p-d+1]?8:0),n[x]&&(o[h+c]=n[x],++g),p++;if(u[p-d]!==u[p]&&(o[h+c]=u[p]?2:4,++g),g>i)return null}for(p=d*(e-1),h=l*s,u[p]!==0&&(o[h]=8,++g),c=1;c<t;c++)u[p]!==u[p+1]&&(o[h+c]=u[p]?4:8,++g),p++;if(u[p]!==0&&(o[h+c]=4,++g),g>i)return null;let _=new Int32Array([0,s,-1,0,-s,0,0,0,1]),y=new Path2D;for(l=0;g&&l<=e;l++){let x=l*s,I=x+t;for(;x<I&&!o[x];)x++;if(x===I)continue;y.moveTo(x%s,l);let A=x,E=o[x];do{let L=_[E];do x+=L;while(!o[x]);let v=o[x];v!==5&&v!==10?(E=v,o[x]=0):(E=v&51*E>>4,o[x]&=E>>2|E<<2),y.lineTo(x%s,x/s|0),o[x]||--g}while(A!==x);--l}return u=null,o=null,function(x){x.save(),x.scale(1/t,-1/e),x.translate(0,-e),x.fill(y),x.beginPath(),x.restore()}}var df=class{constructor(t,e){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=Aw,this.textMatrixScale=1,this.fontMatrix=Bg,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=oi.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,t,e])}clone(){let t=Object.create(this);return t.clipBox=this.clipBox.slice(),t}setCurrentPoint(t,e){this.x=t,this.y=e}updatePathMinMax(t,e,i){[e,i]=ot.applyTransform([e,i],t),this.minX=Math.min(this.minX,e),this.minY=Math.min(this.minY,i),this.maxX=Math.max(this.maxX,e),this.maxY=Math.max(this.maxY,i)}updateRectMinMax(t,e){let i=ot.applyTransform(e,t),n=ot.applyTransform(e.slice(2),t),s=ot.applyTransform([e[0],e[3]],t),o=ot.applyTransform([e[2],e[1]],t);this.minX=Math.min(this.minX,i[0],n[0],s[0],o[0]),this.minY=Math.min(this.minY,i[1],n[1],s[1],o[1]),this.maxX=Math.max(this.maxX,i[0],n[0],s[0],o[0]),this.maxY=Math.max(this.maxY,i[1],n[1],s[1],o[1])}updateScalingPathMinMax(t,e){ot.scaleMinMax(t,e),this.minX=Math.min(this.minX,e[0]),this.minY=Math.min(this.minY,e[1]),this.maxX=Math.max(this.maxX,e[2]),this.maxY=Math.max(this.maxY,e[3])}updateCurvePathMinMax(t,e,i,n,s,o,l,c,h,d){let u=ot.bezierBoundingBox(e,i,n,s,o,l,c,h,d);d||this.updateRectMinMax(t,u)}getPathBoundingBox(t=fi.FILL,e=null){let i=[this.minX,this.minY,this.maxX,this.maxY];if(t===fi.STROKE){e||re("Stroke bounding box must include transform.");let n=ot.singularValueDecompose2dScale(e),s=n[0]*this.lineWidth/2,o=n[1]*this.lineWidth/2;i[0]-=s,i[1]-=o,i[2]+=s,i[3]+=o}return i}
13updateClipFromPath(){let t=ot.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(t=fi.FILL,e=null){return ot.intersect(this.clipBox,this.getPathBoundingBox(t,e))}};function gw(r,t){if(typeof ImageData<"u"&&t instanceof ImageData){r.putImageData(t,0,0);return}let e=t.height,i=t.width,n=e%Ai,s=(e-n)/Ai,o=n===0?s:s+1,l=r.createImageData(i,Ai),c=0,h,d=t.data,u=l.data,p,g,_,y;if(t.kind===xp.GRAYSCALE_1BPP){let C=d.byteLength,x=new Uint32Array(u.buffer,0,u.byteLength>>2),I=x.length,A=i+7>>3,E=4294967295,L=ei.isLittleEndian?4278190080:255;for(p=0;p<o;p++){for(_=p<s?Ai:n,h=0,g=0;g<_;g++){let v=C-c,S=0,M=v>A?i:v*8-7,T=M&-8,N=0,B=0;for(;S<T;S+=8)B=d[c++],x[h++]=B&128?E:L,x[h++]=B&64?E:L,x[h++]=B&32?E:L,x[h++]=B&16?E:L,x[h++]=B&8?E:L,x[h++]=B&4?E:L,x[h++]=B&2?E:L,x[h++]=B&1?E:L;for(;S<M;S++)N===0&&(B=d[c++],N=128),x[h++]=B&N?E:L,N>>=1}for(;h<I;)x[h++]=0;r.putImageData(l,0,p*Ai)}}else if(t.kind===xp.RGBA_32BPP){for(g=0,y=i*Ai*4,p=0;p<s;p++)u.set(d.subarray(c,c+y)),c+=y,r.putImageData(l,0,g),g+=Ai;p<o&&(y=i*n*4,u.set(d.subarray(c,c+y)),r.putImageData(l,0,g))}else if(t.kind===xp.RGB_24BPP)for(_=Ai,y=i*_,p=0;p<o;p++){for(p>=s&&(_=n,y=i*_),h=0,g=y;g--;)u[h++]=d[c++],u[h++]=d[c++],u[h++]=d[c++],u[h++]=255;r.putImageData(l,0,p*Ai)}else throw new Error(`bad image kind: ${t.kind}`)}function _w(r,t){if(t.bitmap){r.drawImage(t.bitmap,0,0);return}let e=t.height,i=t.width,n=e%Ai,s=(e-n)/Ai,o=n===0?s:s+1,l=r.createImageData(i,Ai),c=0,h=t.data,d=l.data;for(let u=0;u<o;u++){let p=u<s?Ai:n;({srcPos:c}=qP({src:h,srcPos:c,dest:d,width:i,height:p,nonBlackColor:0})),r.putImageData(l,0,u*Ai)}}function Gc(r,t){let e=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(let i of e)r[i]!==void 0&&(t[i]=r[i]);r.setLineDash!==void 0&&(t.setLineDash(r.getLineDash()),t.lineDashOffset=r.lineDashOffset)}function gp(r){if(r.strokeStyle=r.fillStyle="#000000",r.fillRule="nonzero",r.globalAlpha=1,r.lineWidth=1,r.lineCap="butt",r.lineJoin="miter",r.miterLimit=10,r.globalCompositeOperation="source-over",r.font="10px sans-serif",r.setLineDash!==void 0&&(r.setLineDash([]),r.lineDashOffset=0),!di){let{filter:t}=r;t!=="none"&&t!==""&&(r.filter="none")}}function bw(r,t){if(t)return!0;let e=ot.singularValueDecompose2dScale(r);e[0]=Math.fround(e[0]),e[1]=Math.fround(e[1]);let i=Math.fround((globalThis.devicePixelRatio||1)*Po.PDF_TO_CSS_UNITS);return e[0]<=i&&e[1]<=i}var tT=["butt","round","square"],eT=["miter","round","bevel"],iT={},yw={},Io,E_,S_,hy=class hy{constructor(t,e,i,n,s,{optionalContentConfig:o,markedContentStack:l=null},c,h){b(this,Io);this.ctx=t,this.current=new df(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=e,this.objs=i,this.canvasFactory=n,this.filterFactory=s,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=l||[],this.optionalContentConfig=o,this.cachedCanvases=new C_(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=c,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=h,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t,e=null){return typeof t=="string"?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}beginDrawing({transform:t,viewport:e,transparency:i=!1,background:n=null}){let s=this.ctx.canvas.width,o=this.ctx.canvas.height,l=this.ctx.fillStyle;if(this.ctx.fillStyle=n||"#ffffff",this.ctx.fillRect(0,0,s,o),this.ctx.fillStyle=l,i){let c=this.cachedCanvases.getCanvas("transparent",s,o);this.compositeCtx=this.ctx,this.transparentCanvas=c.canvas,this.ctx=c.context,this.ctx.save(),this.ctx.transform(...pe(this.compositeCtx))}this.ctx.save(),gp(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...e.transform),this.viewportScale=e.scale,this.baseTransform=pe(this.ctx)}executeOperatorList(t,e,i,n){let s=t.argsArray,o=t.fnArray,l=e||0,c=s.length;if(c===l)return l;let h=c-l>fw&&typeof i=="function",d=h?Date.now()+ZP:0,u=0,p=this.commonObjs,g=this.objs,_;for(;;){if(n!==void 0&&l===n.nextBreakPoint)return n.breakIt(l,i),l;if(_=o[l],_!==cn.dependency)this[_].apply(this,s[l]);else for(let y of s[l]){let C=y.startsWith("g_")?p:g;if(!C.has(y))return C.get(y,i),l}if(l++,l===c)return l;if(h&&++u>fw){if(Date.now()>d)return i(),l;u=0}}}endDrawing(){f(this,Io,E_).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(let t of this._cachedBitmapsMap.values()){for(let e of t.values())typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),f(this,Io,S_).call(this)}_scaleImage(t,e){var p,g;let i=(p=t.width)!=null?p:t.displayWidth,n=(g=t.height)!=null?g:t.displayHeight,s=Math.max(Math.hypot(e[0],e[1]),1),o=Math.max(Math.hypot(e[2],e[3]),1),l=i,c=n,h="prescale1",d,u;
13for(;s>2&&l>1||o>2&&c>1;){let _=l,y=c;s>2&&l>1&&(_=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),s/=l/_),o>2&&c>1&&(y=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2,o/=c/y),d=this.cachedCanvases.getCanvas(h,_,y),u=d.context,u.clearRect(0,0,_,y),u.drawImage(t,0,0,l,c,0,0,_,y),t=d.canvas,l=_,c=y,h=h==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:l,paintHeight:c}}_createMaskCanvas(t){let e=this.ctx,{width:i,height:n}=t,s=this.current.fillColor,o=this.current.patternFill,l=pe(e),c,h,d,u;if((t.bitmap||t.data)&&t.count>1){let M=t.bitmap||t.data.buffer;h=JSON.stringify(o?l:[l.slice(0,4),s]),c=this._cachedBitmapsMap.get(M),c||(c=new Map,this._cachedBitmapsMap.set(M,c));let T=c.get(h);if(T&&!o){let N=Math.round(Math.min(l[0],l[2])+l[4]),B=Math.round(Math.min(l[1],l[3])+l[5]);return{canvas:T,offsetX:N,offsetY:B}}d=T}d||(u=this.cachedCanvases.getCanvas("maskCanvas",i,n),_w(u.context,t));let p=ot.transform(l,[1/i,0,0,-1/n,0,0]);p=ot.transform(p,[1,0,0,1,0,-n]);let[g,_,y,C]=ot.getAxialAlignedBoundingBox([0,0,i,n],p),x=Math.round(y-g)||1,I=Math.round(C-_)||1,A=this.cachedCanvases.getCanvas("fillCanvas",x,I),E=A.context,L=g,v=_;E.translate(-L,-v),E.transform(...p),d||(d=this._scaleImage(u.canvas,ls(E)),d=d.img,c&&o&&c.set(h,d)),E.imageSmoothingEnabled=bw(pe(E),t.interpolate),mp(E,d,0,0,d.width,d.height,0,0,i,n),E.globalCompositeOperation="source-in";let S=ot.transform(ls(E),[1,0,0,1,-L,-v]);return E.fillStyle=o?s.getPattern(e,this,S,fi.FILL):s,E.fillRect(0,0,i,n),c&&!o&&(this.cachedCanvases.delete("fillCanvas"),c.set(h,A.canvas)),{canvas:A.canvas,offsetX:Math.round(L),offsetY:Math.round(v)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=tT[t]}setLineJoin(t){this.ctx.lineJoin=eT[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,e){let i=this.ctx;i.setLineDash!==void 0&&(i.setLineDash(t),i.lineDashOffset=e)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(let[e,i]of t)switch(e){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=i;break;case"ca":this.current.fillAlpha=i,this.ctx.globalAlpha=i;break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){let t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");let t=this.ctx.canvas.width,e=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(i,t,e);this.suspendedCtx=this.ctx,this.ctx=n.context;let s=this.ctx;s.setTransform(...pe(this.suspendedCtx)),Gc(this.suspendedCtx,s),QP(s,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Gc(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];let e=this.current.activeSMask,i=this.suspendedCtx;this.composeSMask(i,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,e,i,n){let s=n[0],o=n[1],l=n[2]-s,c=n[3]-o;l===0||c===0||(this.genericComposeSMask(e.context,i,l,c,e.subtype,e.backdrop,e.transferMap,s,o,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(i.canvas,0,0),t.restore(
13))}genericComposeSMask(t,e,i,n,s,o,l,c,h,d,u){let p=t.canvas,g=c-d,_=h-u;if(o){let C=ot.makeHexColor(...o);if(g<0||_<0||g+i>p.width||_+n>p.height){let x=this.cachedCanvases.getCanvas("maskExtension",i,n),I=x.context;I.drawImage(p,-g,-_),I.globalCompositeOperation="destination-atop",I.fillStyle=C,I.fillRect(0,0,i,n),I.globalCompositeOperation="source-over",p=x.canvas,g=_=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);let x=new Path2D;x.rect(g,_,i,n),t.clip(x),t.globalCompositeOperation="destination-atop",t.fillStyle=C,t.fillRect(g,_,i,n),t.restore()}}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),s==="Alpha"&&l?e.filter=this.filterFactory.addAlphaFilter(l):s==="Luminosity"&&(e.filter=this.filterFactory.addLuminosityFilter(l));let y=new Path2D;y.rect(c,h,i,n),e.clip(y),e.globalCompositeOperation="destination-in",e.drawImage(p,g,_,i,n,c,h,i,n),e.restore()}save(){this.inSMaskMode?(Gc(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();let t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),Gc(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,e,i,n,s,o){this.ctx.transform(t,e,i,n,s,o),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,i){let n=this.ctx,s=this.current,o=s.x,l=s.y,c,h,d=pe(n),u=d[0]===0&&d[3]===0||d[1]===0&&d[2]===0,p=u?i.slice(0):null;for(let g=0,_=0,y=t.length;g<y;g++)switch(t[g]|0){case cn.rectangle:o=e[_++],l=e[_++];let C=e[_++],x=e[_++],I=o+C,A=l+x;n.moveTo(o,l),C===0||x===0?n.lineTo(I,A):(n.lineTo(I,l),n.lineTo(I,A),n.lineTo(o,A)),u||s.updateRectMinMax(d,[o,l,I,A]),n.closePath();break;case cn.moveTo:o=e[_++],l=e[_++],n.moveTo(o,l),u||s.updatePathMinMax(d,o,l);break;case cn.lineTo:o=e[_++],l=e[_++],n.lineTo(o,l),u||s.updatePathMinMax(d,o,l);break;case cn.curveTo:c=o,h=l,o=e[_+4],l=e[_+5],n.bezierCurveTo(e[_],e[_+1],e[_+2],e[_+3],o,l),s.updateCurvePathMinMax(d,c,h,e[_],e[_+1],e[_+2],e[_+3],o,l,p),_+=6;break;case cn.curveTo2:c=o,h=l,n.bezierCurveTo(o,l,e[_],e[_+1],e[_+2],e[_+3]),s.updateCurvePathMinMax(d,c,h,o,l,e[_],e[_+1],e[_+2],e[_+3],p),o=e[_+2],l=e[_+3],_+=4;break;case cn.curveTo3:c=o,h=l,o=e[_+2],l=e[_+3],n.bezierCurveTo(e[_],e[_+1],o,l,o,l),s.updateCurvePathMinMax(d,c,h,e[_],e[_+1],o,l,o,l,p),_+=4;break;case cn.closePath:n.closePath();break}u&&s.updateScalingPathMinMax(d,p),s.setCurrentPoint(o,l)}closePath(){this.ctx.closePath()}stroke(t=!0){let e=this.ctx,i=this.current.strokeColor;e.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof i=="object"&&(i!=null&&i.getPattern)?(e.save(),e.strokeStyle=i.getPattern(e,this,ls(e),fi.STROKE),this.rescaleAndStroke(!1),e.restore()):this.rescaleAndStroke(!0)),t&&this.consumePath(this.current.getClippedPathBoundingBox()),e.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(t=!0){let e=this.ctx,i=this.current.fillColor,n=this.current.patternFill,s=!1;n&&(e.save(),e.fillStyle=i.getPattern(e,this,ls(e),fi.FILL),s=!0);let o=this.current.getClippedPathBoundingBox();this.contentVisible&&o!==null&&(this.pendingEOFill?(e.fill("evenodd"),this.pendingEOFill=!1):e.fill()),s&&e.restore(),t&&this.consumePath(o)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=iT}eoClip(){this.pendingClip=yw}beginText(){this.current.textMatrix=Aw,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){let t=this.pendingTextPaths,e=this.ctx;if(t===void 0){e.beginPath();return}e.save(),e.beginPath();for(let i of t)e.setTransform(...i.transform),e.translate(i.x,i.y),i.addToPath(e,i.fontSize);
13e.restore(),e.clip(),e.beginPath(),delete this.pendingTextPaths}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,e){var d;let i=this.commonObjs.get(t),n=this.current;if(!i)throw new Error(`Can't find font for ${t}`);if(n.fontMatrix=i.fontMatrix||Bg,(n.fontMatrix[0]===0||n.fontMatrix[3]===0)&&Tt("Invalid font matrix for font "+t),e<0?(e=-e,n.fontDirection=-1):n.fontDirection=1,this.current.font=i,this.current.fontSize=e,i.isType3Font)return;let s=i.loadedName||"sans-serif",o=((d=i.systemFontInfo)==null?void 0:d.css)||`"${s}", ${i.fallbackName}`,l="normal";i.black?l="900":i.bold&&(l="bold");let c=i.italic?"italic":"normal",h=e;e<uw?h=uw:e>pw&&(h=pw),this.current.fontSizeScale=e/h,this.ctx.font=`${c} ${l} ${h}px ${o}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}setTextMatrix(t,e,i,n,s,o){this.current.textMatrix=[t,e,i,n,s,o],this.current.textMatrixScale=Math.hypot(t,e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,e,i,n){let s=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,h=o.fontSize/o.fontSizeScale,d=c&oi.FILL_STROKE_MASK,u=!!(c&oi.ADD_TO_PATH_FLAG),p=o.patternFill&&!l.missingFile,g;(l.disableFontFace||u||p)&&(g=l.getPathGenerator(this.commonObjs,t)),l.disableFontFace||p?(s.save(),s.translate(e,i),s.beginPath(),g(s,h),n&&s.setTransform(...n),(d===oi.FILL||d===oi.FILL_STROKE)&&s.fill(),(d===oi.STROKE||d===oi.FILL_STROKE)&&s.stroke(),s.restore()):((d===oi.FILL||d===oi.FILL_STROKE)&&s.fillText(t,e,i),(d===oi.STROKE||d===oi.FILL_STROKE)&&s.strokeText(t,e,i)),u&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:pe(s),x:e,y:i,fontSize:h,addToPath:g})}get isFontSubpixelAAEnabled(){let{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);let e=t.getImageData(0,0,10,10).data,i=!1;for(let n=3;n<e.length;n+=4)if(e[n]>0&&e[n]<255){i=!0;break}return Ot(this,"isFontSubpixelAAEnabled",i)}showText(t){let e=this.current,i=e.font;if(i.isType3Font)return this.showType3Text(t);let n=e.fontSize;if(n===0)return;let s=this.ctx,o=e.fontSizeScale,l=e.charSpacing,c=e.wordSpacing,h=e.fontDirection,d=e.textHScale*h,u=t.length,p=i.vertical,g=p?1:-1,_=i.defaultVMetrics,y=n*e.fontMatrix[0],C=e.textRenderingMode===oi.FILL&&!i.disableFontFace&&!e.patternFill;s.save(),s.transform(...e.textMatrix),s.translate(e.x,e.y+e.textRise),h>0?s.scale(d,-1):s.scale(d,1);let x;if(e.patternFill){s.save();let v=e.fillColor.getPattern(s,this,ls(s),fi.FILL);x=pe(s),s.restore(),s.fillStyle=v}let I=e.lineWidth,A=e.textMatrixScale;if(A===0||I===0){let v=e.textRenderingMode&oi.FILL_STROKE_MASK;(v===oi.STROKE||v===oi.FILL_STROKE)&&(I=this.getSinglePixelWidth())}else I/=A;if(o!==1&&(s.scale(o,o),I/=o),s.lineWidth=I,i.isInvalidPDFjsFont){let v=[],S=0;for(let M of t)v.push(M.unicode),S+=M.width;s.fillText(v.join(""),0,0),e.x+=S*y*d,s.restore(),this.compose();return}let E=0,L;for(L=0;L<u;++L){let v=t[L];if(typeof v=="number"){E+=g*v*n/1e3;continue}let S=!1,M=(v.isSpace?c:0)+l,T=v.fontChar,N=v.accent,B,W,$=v.width;if(p){let et=v.vmetric||_,rt=-(v.vmetric?et[1]:$*.5)*y,it=et[2]*y;$=et?-et[0]:$,B=rt/o,W=(E+it)/o}else B=E/o,W=0;if(i.remeasure&&$>0){let et=s.measureText(T).width*1e3/n*o;if($<et&&this.isFontSubpixelAAEnabled){let rt=$/et;S=!0,s.save(),s.scale(rt,1),B/=rt}else $!==et&&(B+=($-et)/2e3*n/o)}if(this.contentVisible&&(v.isInFont||i.missingFile)){if(C&&!N)s.fillText(T,B,W);else if(this.paintChar(T,B,W,x),N){let et=B+n*N.offset.x/o,rt=W-n*N.offset.y/o;this.paintChar(N.fontChar,et,rt,x)}}
13let X=p?$*y-M*h:$*y+M*h;E+=X,S&&s.restore()}p?e.y-=E:e.x+=E*d,s.restore(),this.compose()}showType3Text(t){let e=this.ctx,i=this.current,n=i.font,s=i.fontSize,o=i.fontDirection,l=n.vertical?1:-1,c=i.charSpacing,h=i.wordSpacing,d=i.textHScale*o,u=i.fontMatrix||Bg,p=t.length,g=i.textRenderingMode===oi.INVISIBLE,_,y,C,x;if(!(g||s===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,e.save(),e.transform(...i.textMatrix),e.translate(i.x,i.y),e.scale(d,o),_=0;_<p;++_){if(y=t[_],typeof y=="number"){x=l*y*s/1e3,this.ctx.translate(x,0),i.x+=x*d;continue}let I=(y.isSpace?h:0)+c,A=n.charProcOperatorList[y.operatorListId];if(!A){Tt(`Type3 character "${y.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=y,this.save(),e.scale(s,s),e.transform(...u),this.executeOperatorList(A),this.restore()),C=ot.applyTransform([y.width,0],u)[0]*s+I,e.translate(C,0),i.x+=C*d}e.restore(),this.processingType3=null}}setCharWidth(t,e){}setCharWidthAndBounds(t,e,i,n,s,o){this.ctx.rect(i,n,s-i,o-n),this.ctx.clip(),this.endPath()}getColorN_Pattern(t){let e;if(t[0]==="TilingPattern"){let i=t[1],n=this.baseTransform||pe(this.ctx),s={createCanvasGraphics:o=>new hy(o,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};e=new KP(t,i,this.ctx,s,n)}else e=this._getPattern(t[1],t[2]);return e}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,e,i){this.ctx.strokeStyle=this.current.strokeColor=ot.makeHexColor(t,e,i)}
13setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(t,e,i){this.ctx.fillStyle=this.current.fillColor=ot.makeHexColor(t,e,i),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,e=null){let i;return this.cachedPatterns.has(t)?i=this.cachedPatterns.get(t):(i=XP(this.getObject(t)),this.cachedPatterns.set(t,i)),e&&(i.matrix=e),i}shadingFill(t){if(!this.contentVisible)return;let e=this.ctx;this.save();let i=this._getPattern(t);e.fillStyle=i.getPattern(e,this,ls(e),fi.SHADING);let n=ls(e);if(n){let{width:s,height:o}=e.canvas,[l,c,h,d]=ot.getAxialAlignedBoundingBox([0,0,s,o],n);this.ctx.fillRect(l,c,h-l,d-c)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){re("Should not call beginInlineImage")}beginImageData(){re("Should not call beginImageData")}paintFormXObjectBegin(t,e){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=pe(this.ctx),e)){let i=e[2]-e[0],n=e[3]-e[1];this.ctx.rect(e[0],e[1],i,n),this.current.updateRectMinMax(pe(this.ctx),e),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);let e=this.ctx;
13t.isolated||Yf("TODO: Support non-isolated groups."),t.knockout&&Tt("Knockout groups not supported.");let i=pe(e);if(t.matrix&&e.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let n=ot.getAxialAlignedBoundingBox(t.bbox,pe(e)),s=[0,0,e.canvas.width,e.canvas.height];n=ot.intersect(n,s)||[0,0,0,0];let o=Math.floor(n[0]),l=Math.floor(n[1]),c=Math.max(Math.ceil(n[2])-o,1),h=Math.max(Math.ceil(n[3])-l,1);this.current.startNewPathAndClipBox([0,0,c,h]);let d="groupAt"+this.groupLevel;t.smask&&(d+="_smask_"+this.smaskCounter++%2);let u=this.cachedCanvases.getCanvas(d,c,h),p=u.context;p.translate(-o,-l),p.transform(...i),t.smask?this.smaskStack.push({canvas:u.canvas,context:p,offsetX:o,offsetY:l,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(o,l),e.save()),Gc(e,p),this.ctx=p,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;let e=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();let n=pe(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...n);let s=ot.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],n);this.ctx.drawImage(e.canvas,0,0),this.ctx.restore(),this.compose(s)}}beginAnnotation(t,e,i,n,s){if(f(this,Io,E_).call(this),gp(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),e){let o=e[2]-e[0],l=e[3]-e[1];if(s&&this.annotationCanvasMap){i=i.slice(),i[4]-=e[0],i[5]-=e[1],e=e.slice(),e[0]=e[1]=0,e[2]=o,e[3]=l;let[c,h]=ot.singularValueDecompose2dScale(pe(this.ctx)),{viewportScale:d}=this,u=Math.ceil(o*this.outputScaleX*d),p=Math.ceil(l*this.outputScaleY*d);this.annotationCanvas=this.canvasFactory.create(u,p);let{canvas:g,context:_}=this.annotationCanvas;this.annotationCanvasMap.set(t,g),this.annotationCanvas.savedCtx=this.ctx,this.ctx=_,this.ctx.save(),this.ctx.setTransform(c,0,0,-h,0,l*h),gp(this.ctx)}else gp(this.ctx),this.endPath(),this.ctx.rect(e[0],e[1],o,l),this.ctx.clip(),this.ctx.beginPath()}this.current=new df(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...i),this.transform(...n)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),f(this,Io,S_).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;let e=t.count;t=this.getObject(t.data,t),t.count=e;let i=this.ctx,n=this.processingType3;if(n&&(n.compiled===void 0&&(n.compiled=JP(t)),n.compiled)){n.compiled(i);return}let s=this._createMaskCanvas(t),o=s.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(o,s.offsetX,s.offsetY),i.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e,i=0,n=0,s,o){if(!this.contentVisible)return;t=this.getObject(t.data,t);let l=this.ctx;l.save();let c=pe(l);l.transform(e,i,n,s,0,0);let h=this._createMaskCanvas(t);l.setTransform(1,0,0,1,h.offsetX-c[4],h.offsetY-c[5]);for(let d=0,u=o.length;d<u;d+=2){let p=ot.transform(c,[e,i,n,s,o[d],o[d+1]]),[g,_]=ot.applyTransform([0,0],p);l.drawImage(h.canvas,g,_)}l.restore(),this.compose()}paintImageMaskXObjectGroup(t){if(!this.contentVisible)return;let e=this.ctx,i=this.current.fillColor,n=this.current.patternFill;for(let s of t){let{data:o,width:l,height:c,transform:h}=s,d=this.cachedCanvases.getCanvas("maskCanvas",l,c),u=d.context;u.save();let p=this.getObject(o,s);_w(u,p),u.globalCompositeOperation="source-in",u.fillStyle=n?i.getPattern(u,this,ls(e),fi.FILL):i,u.fillRect(0,0,l,c),u.restore(),e.save(),e.transform(...h),e.scale(1,-1),mp(e,d.canvas,0,0,l,c,0,-1,1,1),e.restore()}this.compose()}paintImageXObject(t){if(!this.contentVisible)return;let e=this.getObject(t);if(!e){Tt("Dependent image isn't ready yet");return}this.paintInlineImageXObject(e)}paintImageXObjectRepeat(t,e,i,n){if(!this.contentVisible)return;let s=this.getObject(t);if(!s){Tt("Dependent image isn't ready yet");return}let o=s.width,l=s.height,c=[];for(let h=0,d=n.length;h<d;h+=2)c.push({transform:[e,0,0,i,n[h],n[h+1]],x:0,y:0,w:o,h:l});this.paintInlineImageXObjectGroup(s,c)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return t.bitmap;let{bitmap:e,width:i,height:n}=t,s=this.cachedCanvases.getCanvas("inlineImage",i,n),o=s.context;return o.filter=this.current.transferMaps,o.drawImage(e,0,0),o.filter="none",s.canvas}paintInlineImageXObject(t){if(!this.contentVisible)return;let e=t.width,i=t.height,n=this.ctx;if(this.save(),!di){let{filter:l}=n;l!=="none"&&l!==""&&(n.filter="none")}n.scale(1/e,-1/i);let s;if(t.bitmap)s=this.applyTransferMapsToBitmap(t);else if(typeof HTMLElement=="function"&&t instanceof HTMLElement||!t.data)s=t;else{let c=this.cachedCanvases.getCanvas("inlineImage",e,i).context;gw(c,t),s=this.applyTransferMapsToCanvas(c)}let o=this._scaleImage(s,ls(n));n.imageSmoothingEnabled=bw(pe(n),t.interpolate),mp(n,o.img,0,0,o.paintWidth,o.paintHeight,0,-i,e,i),this.compose(),this.restore(
13)}paintInlineImageXObjectGroup(t,e){if(!this.contentVisible)return;let i=this.ctx,n;if(t.bitmap)n=t.bitmap;else{let s=t.width,o=t.height,c=this.cachedCanvases.getCanvas("inlineImage",s,o).context;gw(c,t),n=this.applyTransferMapsToCanvas(c)}for(let s of e)i.save(),i.transform(...s.transform),i.scale(1,-1),mp(i,n,s.x,s.y,s.w,s.h,0,-1,1,1),i.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t){}markPointProps(t,e){}beginMarkedContent(t){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,e){t==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(e)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(t){let e=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(t);let i=this.ctx;this.pendingClip&&(e||(this.pendingClip===yw?i.clip("evenodd"):i.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),i.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){let t=pe(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{let e=Math.abs(t[0]*t[3]-t[2]*t[1]),i=Math.hypot(t[0],t[2]),n=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(i,n)/e}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){let{lineWidth:t}=this.current,{a:e,b:i,c:n,d:s}=this.ctx.getTransform(),o,l;if(i===0&&n===0){let c=Math.abs(e),h=Math.abs(s);if(c===h)if(t===0)o=l=1/c;else{let d=c*t;o=l=d<1?1/d:1}else if(t===0)o=1/c,l=1/h;else{let d=c*t,u=h*t;o=d<1?1/d:1,l=u<1?1/u:1}}else{let c=Math.abs(e*s-i*n),h=Math.hypot(e,i),d=Math.hypot(n,s);if(t===0)o=d/c,l=h/c;else{let u=t*c;o=d>u?d/u:1,l=h>u?h/u:1}}this._cachedScaleForStroking[0]=o,this._cachedScaleForStroking[1]=l}return this._cachedScaleForStroking}rescaleAndStroke(t){let{ctx:e}=this,{lineWidth:i}=this.current,[n,s]=this.getScaleForStroking();if(e.lineWidth=i||1,n===1&&s===1){e.stroke();return}let o=e.getLineDash();if(t&&e.save(),e.scale(n,s),o.length>0){let l=Math.max(n,s);e.setLineDash(o.map(c=>c/l)),e.lineDashOffset/=l}e.stroke(),t&&e.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};Io=new WeakSet,E_=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},S_=function(){if(this.pageColors){let t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){let e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}};var ol=hy;for(let r in cn)ol.prototype[r]!==void 0&&(ol.prototype[cn[r]]=ol.prototype[r]);var Nd,Fd,vn=class{static get workerPort(){return a(this,Nd)}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");m(this,Nd,t)}static get workerSrc(){return a(this,Fd)}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");m(this,Fd,t)}};Nd=new WeakMap,Fd=new WeakMap,b(vn,Nd,null),b(vn,Fd,"");var _p={UNKNOWN:0,DATA:1,ERROR:2},Pe={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function Di(r){switch(r instanceof Error||typeof r=="object"&&r!==null||re('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),r.name){case"AbortException":return new Ls(r.message);case"MissingPDFException":return new Rs(r.message);case"PasswordException":return new dd(r.message,r.code);case"UnexpectedResponseException":return new Xl(r.message,r.status);case"UnknownErrorException":return new hd(r.message,r.details);default:return new hd(r.message,r.toString())}}var pl,sn,Qw,Jw,tA,kp,cr=class{constructor(t,e,i){b(this,sn);b(this,pl,new AbortController);this.sourceName=t,this.targetName=e,this.comObj=i,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),i.addEventListener("message",f(this,sn,Qw).bind(this),{signal:a(this,pl).signal})}on(t,e){let i=this.actionHandler;if(i[t])throw new Error(`There is already an actionName called "${t}"`);i[t]=e}send(t,e,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},i)}
13sendWithPromise(t,e,i){let n=this.callbackId++,s=Promise.withResolvers();this.callbackCapabilities[n]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:n,data:e},i)}catch(o){s.reject(o)}return s.promise}sendWithStream(t,e,i,n){let s=this.streamId++,o=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:h=>{let d=Promise.withResolvers();return this.streamControllers[s]={controller:h,startCall:d,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:o,targetName:l,action:t,streamId:s,data:e,desiredSize:h.desiredSize},n),d.promise},pull:h=>{let d=Promise.withResolvers();return this.streamControllers[s].pullCall=d,c.postMessage({sourceName:o,targetName:l,stream:Pe.PULL,streamId:s,desiredSize:h.desiredSize}),d.promise},cancel:h=>{Be(h instanceof Error,"cancel must have a valid reason");let d=Promise.withResolvers();return this.streamControllers[s].cancelCall=d,this.streamControllers[s].isClosed=!0,c.postMessage({sourceName:o,targetName:l,stream:Pe.CANCEL,streamId:s,reason:Di(h)}),d.promise}},i)}destroy(){var t;(t=a(this,pl))==null||t.abort(),m(this,pl,null)}};pl=new WeakMap,sn=new WeakSet,Qw=function({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){f(this,sn,tA).call(this,t);return}if(t.callback){let i=t.callbackId,n=this.callbackCapabilities[i];if(!n)throw new Error(`Cannot resolve callback ${i}`);if(delete this.callbackCapabilities[i],t.callback===_p.DATA)n.resolve(t.data);else if(t.callback===_p.ERROR)n.reject(Di(t.reason));else throw new Error("Unexpected callback case");return}let e=this.actionHandler[t.action];if(!e)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){let i=this.sourceName,n=t.sourceName,s=this.comObj;new Promise(function(o){o(e(t.data))}).then(function(o){s.postMessage({sourceName:i,targetName:n,callback:_p.DATA,callbackId:t.callbackId,data:o})},function(o){s.postMessage({sourceName:i,targetName:n,callback:_p.ERROR,callbackId:t.callbackId,reason:Di(o)})});return}if(t.streamId){f(this,sn,Jw).call(this,t);return}e(t.data)},Jw=function(t){let e=t.streamId,i=this.sourceName,n=t.sourceName,s=this.comObj,o=this,l=this.actionHandler[t.action],c={enqueue(h,d=1,u){if(this.isCancelled)return;let p=this.desiredSize;this.desiredSize-=d,p>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),s.postMessage({sourceName:i,targetName:n,stream:Pe.ENQUEUE,streamId:e,chunk:h},u)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:n,stream:Pe.CLOSE,streamId:e}),delete o.streamSinks[e])},error(h){Be(h instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:n,stream:Pe.ERROR,streamId:e,reason:Di(h)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[e]=c,new Promise(function(h){h(l(t.data,c))}).then(function(){s.postMessage({sourceName:i,targetName:n,stream:Pe.START_COMPLETE,streamId:e,success:!0})},function(h){s.postMessage({sourceName:i,targetName:n,stream:Pe.START_COMPLETE,streamId:e,reason:Di(h)})})},tA=function(t){let e=t.streamId,i=this.sourceName,n=t.sourceName,s=this.comObj,o=this.streamControllers[e],l=this.streamSinks[e];switch(t.stream){case Pe.START_COMPLETE:t.success?o.startCall.resolve():o.startCall.reject(Di(t.reason));break;case Pe.PULL_COMPLETE:t.success?o.pullCall.resolve():o.pullCall.reject(Di(t.reason));break;case Pe.PULL:if(!l){s.postMessage({sourceName:i,targetName:n,stream:Pe.PULL_COMPLETE,streamId:e,success:!0});break}l.desiredSize<=0&&t.desiredSize>0&&l.sinkCapability.resolve(),l.desiredSize=t.desiredSize,new Promise(function(c){var h;c((h=l.onPull)==null?void 0:h.call(l))}).then(function(){s.postMessage({sourceName:i,targetName:n,stream:Pe.PULL_COMPLETE,streamId:e,success:!0})},function(c){s.postMessage({sourceName:i,targetName:n,stream:Pe.PULL_COMPLETE,streamId:e,reason:Di(c)})});break;case Pe.ENQUEUE:if(Be(o,"enqueue should have stream controller"),o.isClosed)break;o.controller.enqueue(t.chunk);break;case Pe.CLOSE:if(Be(o,"close should have stream controller"),o.isClosed)break;o.isClosed=!0,o.controller.close(),f(this,sn,kp).call(this,o,e);break;
13case Pe.ERROR:Be(o,"error should have stream controller"),o.controller.error(Di(t.reason)),f(this,sn,kp).call(this,o,e);break;case Pe.CANCEL_COMPLETE:t.success?o.cancelCall.resolve():o.cancelCall.reject(Di(t.reason)),f(this,sn,kp).call(this,o,e);break;case Pe.CANCEL:if(!l)break;new Promise(function(c){var h;c((h=l.onCancel)==null?void 0:h.call(l,Di(t.reason)))}).then(function(){s.postMessage({sourceName:i,targetName:n,stream:Pe.CANCEL_COMPLETE,streamId:e,success:!0})},function(c){s.postMessage({sourceName:i,targetName:n,stream:Pe.CANCEL_COMPLETE,streamId:e,reason:Di(c)})}),l.sinkCapability.reject(Di(t.reason)),l.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}},kp=function(t,e){return O(this,null,function*(){var i,n,s;yield Promise.allSettled([(i=t.startCall)==null?void 0:i.promise,(n=t.pullCall)==null?void 0:n.promise,(s=t.cancelCall)==null?void 0:s.promise]),delete this.streamControllers[e]})};var Cr,Bd,P_=class{constructor({parsedData:t,rawData:e}){b(this,Cr);b(this,Bd);m(this,Cr,t),m(this,Bd,e)}getRaw(){return a(this,Bd)}get(t){var e;return(e=a(this,Cr).get(t))!=null?e:null}getAll(){return Jb(a(this,Cr))}has(t){return a(this,Cr).has(t)}};Cr=new WeakMap,Bd=new WeakMap;var Ja=Symbol("INTERNAL"),zd,Vd,jd,fl,T_=class{constructor(t,{name:e,intent:i,usage:n,rbGroups:s}){b(this,zd,!1);b(this,Vd,!1);b(this,jd,!1);b(this,fl,!0);m(this,zd,!!(t&Bi.DISPLAY)),m(this,Vd,!!(t&Bi.PRINT)),this.name=e,this.intent=i,this.usage=n,this.rbGroups=s}get visible(){if(a(this,jd))return a(this,fl);if(!a(this,fl))return!1;let{print:t,view:e}=this.usage;return a(this,zd)?(e==null?void 0:e.viewState)!=="OFF":a(this,Vd)?(t==null?void 0:t.printState)!=="OFF":!0}_setVisible(t,e,i=!1){t!==Ja&&re("Internal method `_setVisible` called."),m(this,jd,i),m(this,fl,e)}};zd=new WeakMap,Vd=new WeakMap,jd=new WeakMap,fl=new WeakMap;
13var fo,$t,ml,gl,Hd,k_,I_=class{constructor(t,e=Bi.DISPLAY){b(this,Hd);b(this,fo,null);b(this,$t,new Map);b(this,ml,null);b(this,gl,null);if(this.renderingIntent=e,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,m(this,gl,t.order);for(let i of t.groups)a(this,$t).set(i.id,new T_(e,i));if(t.baseState==="OFF")for(let i of a(this,$t).values())i._setVisible(Ja,!1);for(let i of t.on)a(this,$t).get(i)._setVisible(Ja,!0);for(let i of t.off)a(this,$t).get(i)._setVisible(Ja,!1);m(this,ml,this.getHash())}}isVisible(t){if(a(this,$t).size===0)return!0;if(!t)return Yf("Optional content group not defined."),!0;if(t.type==="OCG")return a(this,$t).has(t.id)?a(this,$t).get(t.id).visible:(Tt(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return f(this,Hd,k_).call(this,t.expression);if(!t.policy||t.policy==="AnyOn"){for(let e of t.ids){if(!a(this,$t).has(e))return Tt(`Optional content group not found: ${e}`),!0;if(a(this,$t).get(e).visible)return!0}return!1}else if(t.policy==="AllOn"){for(let e of t.ids){if(!a(this,$t).has(e))return Tt(`Optional content group not found: ${e}`),!0;if(!a(this,$t).get(e).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(let e of t.ids){if(!a(this,$t).has(e))return Tt(`Optional content group not found: ${e}`),!0;if(!a(this,$t).get(e).visible)return!0}return!1}else if(t.policy==="AllOff"){for(let e of t.ids){if(!a(this,$t).has(e))return Tt(`Optional content group not found: ${e}`),!0;if(a(this,$t).get(e).visible)return!1}return!0}return Tt(`Unknown optional content policy ${t.policy}.`),!0}return Tt(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0,i=!0){var s;let n=a(this,$t).get(t);if(!n){Tt(`Optional content group not found: ${t}`);return}if(i&&e&&n.rbGroups.length)for(let o of n.rbGroups)for(let l of o)l!==t&&((s=a(this,$t).get(l))==null||s._setVisible(Ja,!1,!0));n._setVisible(Ja,!!e,!0),m(this,fo,null)}setOCGState({state:t,preserveRB:e}){let i;for(let n of t){switch(n){case"ON":case"OFF":case"Toggle":i=n;continue}let s=a(this,$t).get(n);if(s)switch(i){case"ON":this.setVisibility(n,!0,e);break;case"OFF":this.setVisibility(n,!1,e);break;case"Toggle":this.setVisibility(n,!s.visible,e);break}}m(this,fo,null)}get hasInitialVisibility(){return a(this,ml)===null||this.getHash()===a(this,ml)}getOrder(){return a(this,$t).size?a(this,gl)?a(this,gl).slice():[...a(this,$t).keys()]:null}getGroups(){return a(this,$t).size>0?Jb(a(this,$t)):null}getGroup(t){return a(this,$t).get(t)||null}getHash(){if(a(this,fo)!==null)return a(this,fo);let t=new ef;for(let[e,i]of a(this,$t))t.update(`${e}:${i.visible}`);return m(this,fo,t.hexdigest())}};fo=new WeakMap,$t=new WeakMap,ml=new WeakMap,gl=new WeakMap,Hd=new WeakSet,k_=function(t){let e=t.length;if(e<2)return!0;let i=t[0];for(let n=1;n<e;n++){let s=t[n],o;if(Array.isArray(s))o=f(this,Hd,k_).call(this,s);else if(a(this,$t).has(s))o=a(this,$t).get(s).visible;else return Tt(`Optional content group not found: ${s}`),!0;switch(i){case"And":if(!o)return!1;break;case"Or":if(o)return!0;break;case"Not":return!o;default:return!0}}return i==="And"};var M_=class{constructor(t,{disableRange:e=!1,disableStream:i=!1}){Be(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');let{length:n,initialData:s,progressiveDone:o,contentDispositionFilename:l}=t;if(this._queuedChunks=[],this._progressiveDone=o,this._contentDispositionFilename=l,(s==null?void 0:s.length)>0){let c=s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer;this._queuedChunks.push(c)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!i,this._isRangeSupported=!e,this._contentLength=n,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((c,h)=>{this._onReceiveData({begin:c,chunk:h})}),t.addProgressListener((c,h)=>{this._onProgress({loaded:c,total:h})}),t.addProgressiveReadListener(c=>{this._onReceiveData({chunk:c})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:e}){let i=e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(i):this._queuedChunks.push(i);else{let n=this._rangeReaders.some(function(s){return s._begin!==t?!1:(s._enqueue(i),!0)});Be(n,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var t,e;return(e=(t=this._fullRequestReader)==null?void 0:t._loaded)!=null?e:0}_onProgress(t){var e,i,n,s;t.total===void 0?(i=(e=this._rangeReaders[0])==null?void 0:e.onProgress)==null||i.call(e,{loaded:t.loaded}):(s=(n=this._fullRequestReader)==null?void 0:n.onProgress)==null||s.call(n,{loaded:t.loaded,total:t.total})}_onProgressiveDone(){var t;(t=this._fullRequestReader)==null||t.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){let e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){Be(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");let t=this._queuedChunks;return this._queuedChunks=null,new D_(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;let i=new R_(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(i),i}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(let i of this._rangeReaders.slice(0))i.cancel(t);this._pdfDataRangeTransport.abort()}},D_=class{constructor(t,e,i=!1,n=null){this._stream=t,this._done=i||!1,this._filename=ey(n)?n:null,this._queuedChunks=e||[],this._loaded=0;for(let s of this._queuedChunks)this._loaded+=s.byteLength;
13this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}read(){return O(this,null,function*(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}},R_=class{constructor(t,e,i){this._stream=t,this._begin=e,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(let i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}read(){return O(this,null,function*(){if(this._queuedChunk){let e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};let t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}};function nT(r){let t=!0,e=i("filename\\*","i").exec(r);if(e){e=e[1];let d=l(e);return d=unescape(d),d=c(d),d=h(d),s(d)}if(e=o(r),e){let d=h(e);return s(d)}if(e=i("filename","i").exec(r),e){e=e[1];let d=l(e);return d=h(d),s(d)}function i(d,u){return new RegExp("(?:^|;)\\s*"+d+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',u)}function n(d,u){if(d){if(!/^[\x00-\xFF]+$/.test(u))return u;try{let p=new TextDecoder(d,{fatal:!0}),g=Xf(u);u=p.decode(g),t=!1}catch{}}return u}function s(d){return t&&/[\x80-\xff]/.test(d)&&(d=n("utf-8",d),t&&(d=n("iso-8859-1",d))),d}function o(d){let u=[],p,g=i("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(p=g.exec(d))!==null;){let[,y,C,x]=p;if(y=parseInt(y,10),y in u){if(y===0)break;continue}u[y]=[C,x]}let _=[];for(let y=0;y<u.length&&y in u;++y){let[C,x]=u[y];x=l(x),C&&(x=unescape(x),y===0&&(x=c(x))),_.push(x)}return _.join("")}function l(d){if(d.startsWith('"')){let u=d.slice(1).split('\\"');for(let p=0;p<u.length;++p){let g=u[p].indexOf('"');g!==-1&&(u[p]=u[p].slice(0,g),u.length=p+1),u[p]=u[p].replaceAll(/\\(.)/g,"$1")}d=u.join('"')}return d}function c(d){let u=d.indexOf("'");if(u===-1)return d;let p=d.slice(0,u),_=d.slice(u+1).replace(/^[^']*'/,"");return n(p,_)}function h(d){return!d.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(d)?d:d.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(u,p,g,_){if(g==="q"||g==="Q")return _=_.replaceAll("_"," "),_=_.replaceAll(/=([0-9a-fA-F]{2})/g,function(y,C){return String.fromCharCode(parseInt(C,16))}),n(p,_);try{_=atob(_)}catch{}return n(p,_)})}return""}function ny(r,t){let e=new Headers;if(!r||!t||typeof t!="object")return e;for(let i in t){let n=t[i];n!==void 0&&e.append(i,n)}return e}function sy({responseHeaders:r,isHttp:t,rangeChunkSize:e,disableRange:i}){let n={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(r.get("Content-Length"),10);return!Number.isInteger(s)||(n.suggestedLength=s,s<=2*e)||i||!t||r.get("Accept-Ranges")!=="bytes"||(r.get("Content-Encoding")||"identity")!=="identity"||(n.allowRangeRequests=!0),n}function oy(r){let t=r.get("Content-Disposition");if(t){let e=nT(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(ey(e))return e}return null}function Zf(r,t){return r===404||r===0&&t.startsWith("file:")?new Rs('Missing PDF "'+t+'".'):new Xl(`Unexpected server response (${r}) while retrieving PDF "${t}".`,r)}function eA(r){return r===200||r===206}function iA(r,t,e){return{method:"GET",headers:r,signal:e.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function nA(r){return r instanceof Uint8Array?r.buffer:r instanceof ArrayBuffer?r:(Tt(`getArrayBuffer - unexpected data format: ${r}`),new Uint8Array(r).buffer)}var hf=class{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.headers=ny(this.isHttp,t.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var t,e;return(e=(t=this._fullRequestReader)==null?void 0:t._loaded)!=null?e:0}getFullReader(){return Be(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new L_(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;let i=new O_(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(let i of this._rangeRequestReaders.slice(0))i.cancel(t)}},L_=class{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;let e=t.source;this._withCredentials=e.withCredentials||!1,this._contentLength=e.length,this._headersCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange;let i=new Headers(t.headers),n=e.url;fetch(n,iA(i,this._withCredentials,this._abortController)).then(s=>{if(!eA(s.status))throw Zf(s.status,n);this._reader=s.body.getReader(),this._headersCapability.resolve();let o=s.headers,{allowRangeRequests:l,suggestedLength:c}=sy({responseHeaders:o,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=l,this._contentLength=c||this._contentLength,this._filename=oy(o),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Ls("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){return O(this,null,function*(){var i;yield this._headersCapability.promise;let{value:t,done:e}=yield this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(i=this.onProgress)==null||i.call(this,{loaded:this._loaded,total:this._contentLength}),{value:nA(t),done:!1})})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}},O_=class{constructor(t,e,i){this._stream=t,this._reader=null,this._loaded=0;let n=t.source;this._withCredentials=n.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!n.disableStream,this._abortController=new AbortController;let s=new Headers(t.headers);s.append("Range",`bytes=${e}-${i-1}`);let o=n.url;fetch(o,iA(s,this._withCredentials,this._abortController)).then(l=>{if(!eA(l.status))throw Zf(l.status,o);this._readCapability.resolve(),this._reader=l.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}read(){return O(this,null,function*(){var i;yield this._readCapability.promise;let{value:t,done:e}=yield this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(i=this.onProgress)==null||i.call(this,{loaded:this._loaded}),{value:nA(t),done:!1})})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}},Ng=200,Fg=206;function sT(r){let t=r.response;return typeof t!="string"?t:Xf(t).buffer}var N_=class{constructor({url:t,httpHeaders:e,withCredentials:i}){this.url=t,this.isHttp=/^https?:/i.test(t),this.headers=ny(this.isHttp,e),this.withCredentials=i||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,e,i){let n={begin:t,end:e};for(let s in i)n[s]=i[s];return this.request(n)}requestFull(t){return this.request(t)}request(t){let e=new XMLHttpRequest,i=this.currXhrId++,n=this.pendingRequests[i]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(let[s,o]of this.headers)e.setRequestHeader(s,o);return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),n.expectedStatus=Fg):n.expectedStatus=Ng,e.responseType="arraybuffer",t.onError&&(e.onerror=function(s){t.onError(e.status)}),e.onreadystatechange=this.onStateChange.bind(this,i),e.onprogress=this.onProgress.bind(this,i),n.onHeadersReceived=t.onHeadersReceived,n.onDone=t.onDone,n.onError=t.onError,n.onProgress=t.onProgress,e.send(null),i}onProgress(t,e){var n;let i=this.pendingRequests[t];i&&((n=i.onProgress)==null||n.call(i,e))}onStateChange(t,e){var c,h,d;let i=this.pendingRequests[t];if(!i)return;let n=i.xhr;if(n.readyState>
13=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),n.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],n.status===0&&this.isHttp){(c=i.onError)==null||c.call(i,n.status);return}let s=n.status||Ng;if(!(s===Ng&&i.expectedStatus===Fg)&&s!==i.expectedStatus){(h=i.onError)==null||h.call(i,n.status);return}let l=sT(n);if(s===Fg){let u=n.getResponseHeader("Content-Range"),p=/bytes (\d+)-(\d+)\/(\d+)/.exec(u);i.onDone({begin:parseInt(p[1],10),chunk:l})}else l?i.onDone({begin:0,chunk:l}):(d=i.onError)==null||d.call(i,n.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){let e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}},F_=class{constructor(t){this._source=t,this._manager=new N_(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){let e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return Be(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new B_(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){let i=new z_(this._manager,t,e);return i.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(i),i}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(let i of this._rangeRequestReaders.slice(0))i.cancel(t)}},B_=class{constructor(t,e){this._manager=t;let i={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._fullRequestId=t.requestFull(i),this._headersCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){let t=this._fullRequestId,e=this._manager.getRequestXhr(t),i=new Headers(e.getAllResponseHeaders().trim().split(/[\r\n]+/).map(o=>{let[l,...c]=o.split(": ");return[l,c.join(": ")]})),{allowRangeRequests:n,suggestedLength:s}=sy({responseHeaders:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=oy(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=Zf(t,this._url),this._headersCapability.reject(this._storedError);for(let e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){var e;(e=this.onProgress)==null||e.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}read(){return O(this,null,function*(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0,this._headersCapability.reject(t);for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest
13(this._fullRequestId),this._fullRequestReader=null}},z_=class{constructor(t,e,i){this._manager=t;let n={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(e,i,n),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var t;(t=this.onClosed)==null||t.call(this,this)}_onDone(t){let e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;for(let i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError=Zf(t,this._url);for(let e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){var e;this.isStreamingSupported||(e=this.onProgress)==null||e.call(this,{loaded:t.loaded})}get isStreamingSupported(){return!1}read(){return O(this,null,function*(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){let e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};let t=Promise.withResolvers();return this._requests.push(t),t.promise})}cancel(t){this._done=!0;for(let e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}},oT=/^[a-z][a-z0-9\-+.]+:/i;function rT(r){if(oT.test(r))return new URL(r);let t=Xn.get("url");return new URL(t.pathToFileURL(r))}function sA(r,t,e){return r.protocol==="http:"?Xn.get("http").request(r,{headers:t},e):Xn.get("https").request(r,{headers:t},e)}var V_=class{constructor(t){this.source=t,this.url=rT(t.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.headers=ny(this.isHttp,t.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var t,e;return(e=(t=this._fullRequestReader)==null?void 0:t._loaded)!=null?e:0}getFullReader(){return Be(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new U_(this):new j_(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;let i=this.isFsUrl?new W_(this,t,e):new H_(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(let i of this._rangeRequestReaders.slice(0))i.cancel(t)}},uf=class{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;let e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){return O(this,null,function*(){var i;if(yield this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(i=this.onProgress)==null||i.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Ls("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}},pf=class{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();let e=t.source;this._isStreamingSupported=!e.disableStream}get isStreamingSupported(){return this._isStreamingSupported}read(){return O(this,null,function*(){var i;if(yield this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(i=this.onProgress)==null||i.call(this,{loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}},j_=class extends uf{constructor(t){super(t);let e=Object.fromEntries(t.headers),i=n=>{if(n.statusCode===404){let c=new Rs(`Missing PDF "${this._url}".`);this._storedError=c,this._headersCapability.reject(c);return}this._headersCapability.resolve(),this._setReadableStream(n);let s=new Headers(this._readableStream.headers),{allowRangeRequests:o,suggestedLength:l}=sy({responseHeaders:s,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=l||this._contentLength,this._filename=oy(s)};this._request=sA(this._url,e,i),this._request.on("error",n=>{this._storedError=n,this._headersCapability.reject(n)}),this._request.end()}},H_=class extends pf{constructor(t,e,i){super(t);let n=Object.fromEntries(t.headers);n.Range=`bytes=${e}-${i-1}`;let s=o=>
13{if(o.statusCode===404){let l=new Rs(`Missing PDF "${this._url}".`);this._storedError=l;return}this._setReadableStream(o)};this._request=sA(this._url,n,s),this._request.on("error",o=>{this._storedError=o}),this._request.end()}},U_=class extends uf{constructor(t){super(t);let e=Xn.get("fs");e.promises.lstat(this._url).then(i=>{this._contentLength=i.size,this._setReadableStream(e.createReadStream(this._url)),this._headersCapability.resolve()},i=>{i.code==="ENOENT"&&(i=new Rs(`Missing PDF "${this._url}".`)),this._storedError=i,this._headersCapability.reject(i)})}},W_=class extends pf{constructor(t,e,i){super(t);let n=Xn.get("fs");this._setReadableStream(n.createReadStream(this._url,{start:e,end:i-1}))}},aT=1e5,yi=30,lT=.8,ww,mo,xi,Ud,Wd,Er,fs,Gd,$d,Sr,_l,bl,go,yl,Yd,vl,Pr,Xd,Kd,Tr,Ir,qd,_o,xl,Ns,oA,rA,G_,Vi,Mp,$_,aA,lA,Oe=class Oe{constructor({textContentSource:t,container:e,viewport:i}){b(this,Ns);b(this,mo,Promise.withResolvers());b(this,xi,null);b(this,Ud,!1);b(this,Wd,!!((ww=globalThis.FontInspector)!=null&&ww.enabled));b(this,Er,null);b(this,fs,null);b(this,Gd,0);b(this,$d,0);b(this,Sr,null);b(this,_l,null);b(this,bl,0);b(this,go,0);b(this,yl,Object.create(null));b(this,Yd,[]);b(this,vl,null);b(this,Pr,[]);b(this,Xd,new WeakMap);b(this,Kd,null);var c;if(t instanceof ReadableStream)m(this,vl,t);else if(typeof t=="object")m(this,vl,new ReadableStream({start(h){h.enqueue(t),h.close()}}));else throw new Error('No "textContentSource" parameter specified.');m(this,xi,m(this,_l,e)),m(this,go,i.scale*(globalThis.devicePixelRatio||1)),m(this,bl,i.rotation),m(this,fs,{div:null,properties:null,ctx:null});let{pageWidth:n,pageHeight:s,pageX:o,pageY:l}=i.rawDims;m(this,Kd,[1,0,0,-1,-o,l+s]),m(this,$d,n),m(this,Gd,s),f(c=Oe,Vi,aA).call(c),ta(e,i),a(this,mo).promise.finally(()=>{a(Oe,xl).delete(this),m(this,fs,null),m(this,yl,null)}).catch(()=>{})}static get fontFamilyMap(){let{isWindows:t,isFirefox:e}=ei.platform;return Ot(this,"fontFamilyMap",new Map([["sans-serif",`${t&&e?"Calibri, ":""}sans-serif`],["monospace",`${t&&e?"Lucida Console, ":""}monospace`]]))}render(){let t=()=>{a(this,Sr).read().then(({value:e,done:i})=>{var n;if(i){a(this,mo).resolve();return}(n=a(this,Er))!=null||m(this,Er,e.lang),Object.assign(a(this,yl),e.styles),f(this,Ns,oA).call(this,e.items),t()},a(this,mo).reject)};return m(this,Sr,a(this,vl).getReader()),a(Oe,xl).add(this),t(),a(this,mo).promise}update({viewport:t,onBefore:e=null}){var s;let i=t.scale*(globalThis.devicePixelRatio||1),n=t.rotation;if(n!==a(this,bl)&&(e==null||e(),m(this,bl,n),ta(a(this,_l),{rotation:n})),i!==a(this,go)){e==null||e(),m(this,go,i);let o={div:null,properties:null,ctx:f(s=Oe,Vi,Mp).call(s,a(this,Er))};for(let l of a(this,Pr))o.properties=a(this,Xd).get(l),o.div=l,f(this,Ns,G_).call(this,o)}}cancel(){var e;let t=new Ls("TextLayer task cancelled.");(e=a(this,Sr))==null||e.cancel(t).catch(()=>{}),m(this,Sr,null),a(this,mo).reject(t)}get textDivs(){return a(this,Pr)}get textContentItemsStr(){return a(this,Yd)}static cleanup(){if(!(a(this,xl).size>0)){a(this,Tr).clear();for(let{canvas:t}of a(this,Ir).values())t.remove();a(this,Ir).clear()}}};mo=new WeakMap,xi=new WeakMap,Ud=new WeakMap,Wd=new WeakMap,Er=new WeakMap,fs=new WeakMap,Gd=new WeakMap,$d=new WeakMap,Sr=new WeakMap,_l=new WeakMap,bl=new WeakMap,go=new WeakMap,yl=new WeakMap,Yd=new WeakMap,vl=new WeakMap,Pr=new WeakMap,Xd=new WeakMap,Kd=new WeakMap,Tr=new WeakMap,Ir=new WeakMap,qd=new WeakMap,_o=new WeakMap,xl=new WeakMap,Ns=new WeakSet,oA=function(t){var n,s,o;if(a(this,Ud))return;(o=(s=a(this,fs)).ctx)!=null||(s.ctx=f(n=Oe,Vi,Mp).call(n,a(this,Er)));let e=a(this,Pr),i=a(this,Yd);for(let l of t){if(e.length>aT){Tt("Ignoring additional textDivs for performance reasons."),m(this,Ud,!0);return}if(l.str===void 0){if(l.type==="beginMarkedContentProps"||l.type==="beginMarkedContent"){let c=a(this,xi);m(this,xi,document.createElement("span")),a(this,xi).classList.add("markedContent"),l.id!==null&&a(this,xi).setAttribute("id",`${l.id}`),c.append(a(this,xi))}else l.type==="endMarkedContent"&&m(this,xi,a(this,xi).parentNode);continue}i.push(l.str),f(this,Ns,rA).call(this,l)}},rA=function(t){var y;let e=document.createElement("span"),i={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};a(this,Pr).push(e);let n=ot.transform(a(this,Kd),t.transform),s=Math.atan2(n[1],n[0]),o=a(this,yl)[t.fontName];o.vertical&&(s+=Math.PI/2);let l=a(this,Wd)&&o.fontSubstitution||o.fontFamily;l=Oe.fontFamilyMap.get(l)||l;
13let c=Math.hypot(n[2],n[3]),h=c*f(y=Oe,Vi,lA).call(y,l,a(this,Er)),d,u;s===0?(d=n[4],u=n[5]-h):(d=n[4]+h*Math.sin(s),u=n[5]-h*Math.cos(s));let p="calc(var(--scale-factor)*",g=e.style;a(this,xi)===a(this,_l)?(g.left=`${(100*d/a(this,$d)).toFixed(2)}%`,g.top=`${(100*u/a(this,Gd)).toFixed(2)}%`):(g.left=`${p}${d.toFixed(2)}px)`,g.top=`${p}${u.toFixed(2)}px)`),g.fontSize=`${p}${(a(Oe,_o)*c).toFixed(2)}px)`,g.fontFamily=l,i.fontSize=c,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,a(this,Wd)&&(e.dataset.fontName=o.fontSubstitutionLoadedName||t.fontName),s!==0&&(i.angle=s*(180/Math.PI));let _=!1;if(t.str.length>1)_=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){let C=Math.abs(t.transform[0]),x=Math.abs(t.transform[3]);C!==x&&Math.max(C,x)/Math.min(C,x)>1.5&&(_=!0)}if(_&&(i.canvasWidth=o.vertical?t.height:t.width),a(this,Xd).set(e,i),a(this,fs).div=e,a(this,fs).properties=i,f(this,Ns,G_).call(this,a(this,fs)),i.hasText&&a(this,xi).append(e),i.hasEOL){let C=document.createElement("br");C.setAttribute("role","presentation"),a(this,xi).append(C)}},G_=function(t){var l;let{div:e,properties:i,ctx:n}=t,{style:s}=e,o="";if(a(Oe,_o)>1&&(o=`scale(${1/a(Oe,_o)})`),i.canvasWidth!==0&&i.hasText){let{fontFamily:c}=s,{canvasWidth:h,fontSize:d}=i;f(l=Oe,Vi,$_).call(l,n,d*a(this,go),c);let{width:u}=n.measureText(e.textContent);u>0&&(o=`scaleX(${h*a(this,go)/u}) ${o}`)}i.angle!==0&&(o=`rotate(${i.angle}deg) ${o}`),o.length>0&&(s.transform=o)},Vi=new WeakSet,Mp=function(t=null){let e=a(this,Ir).get(t||(t=""));if(!e){let i=document.createElement("canvas");i.className="hiddenCanvasElement",i.lang=t,document.body.append(i),e=i.getContext("2d",{alpha:!1,willReadFrequently:!0}),a(this,Ir).set(t,e),a(this,qd).set(e,{size:0,family:""})}return e},$_=function(t,e,i){let n=a(this,qd).get(t);e===n.size&&i===n.family||(t.font=`${e}px ${i}`,n.size=e,n.family=i)},aA=function(){if(a(this,_o)!==null)return;let t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),m(this,_o,t.getBoundingClientRect().height),t.remove()},lA=function(t,e){let i=a(this,Tr).get(t);if(i)return i;let n=f(this,Vi,Mp).call(this,e);n.canvas.width=n.canvas.height=yi,f(this,Vi,$_).call(this,n,yi,t);let s=n.measureText(""),o=s.fontBoundingBoxAscent,l=Math.abs(s.fontBoundingBoxDescent);if(o){let d=o/(o+l);return a(this,Tr).set(t,d),n.canvas.width=n.canvas.height=0,d}n.strokeStyle="red",n.clearRect(0,0,yi,yi),n.strokeText("g",0,0);let c=n.getImageData(0,0,yi,yi).data;l=0;for(let d=c.length-1-3;d>=0;d-=4)if(c[d]>0){l=Math.ceil(d/4/yi);break}n.clearRect(0,0,yi,yi),n.strokeText("A",0,yi),c=n.getImageData(0,0,yi,yi).data,o=0;for(let d=0,u=c.length;d<u;d+=4)if(c[d]>0){o=yi-Math.floor(d/4/yi);break}n.canvas.width=n.canvas.height=0;let h=o?o/(o+l):lT;return a(this,Tr).set(t,h),h},b(Oe,Vi),b(Oe,Tr,new Map),b(Oe,Ir,new Map),b(Oe,qd,new WeakMap),b(Oe,_o,null),b(Oe,xl,new Set);var bd=Oe,yd=class r{static textContent(t){let e=[],i={items:e,styles:Object.create(null)};function n(s){var c;if(!s)return;let o=null,l=s.name;if(l==="#text")o=s.value;else if(r.shouldBuildText(l))(c=s==null?void 0:s.attributes)!=null&&c.textContent?o=s.attributes.textContent:s.value&&(o=s.value);else return;if(o!==null&&e.push({str:o}),!!s.children)for(let h of s.children)n(h)}return n(t),i}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}},cT=65536,dT=100,hT=5e3,uT=di?__:u_,pT=di?b_:rf,fT=di?g_:p_,mT=di?y_:cf;function gT(r={}){var U,Xt;typeof r=="string"||r instanceof URL?r={url:r}:(r instanceof ArrayBuffer||ArrayBuffer.isView(r))&&(r={data:r});let t=new Y_,{docId:e}=t,i=r.url?_T(r.url):null,n=r.data?bT(r.data):null,s=r.httpHeaders||null,o=r.withCredentials===!0,l=(U=r.password)!=null?U:null,c=r.range instanceof ff?r.range:null,h=Number.isInteger(r.rangeChunkSize)&&r.rangeChunkSize>0?r.rangeChunkSize:cT,d=r.worker instanceof rl?r.worker:null,u=r.verbosity,p=typeof r.docBaseUrl=="string"&&!qf(r.docBaseUrl)?r.docBaseUrl:null,g=typeof r.cMapUrl=="string"?r.cMapUrl:null,_=r.cMapPacked!==!1,y=r.CMapReaderFactory||pT,C=typeof r.standardFontDataUrl=="string"?r.standardFontDataUrl:null,x=r.StandardFontDataFactory||mT,I=r.stopAtErrors!==!0,A=Number.isInteger(r.maxImageSize)&&r.maxImageSize>-1?r.maxImageSize:-1,E=r.isEvalSupported!==!1,L=typeof r.isOffscreenCanvasSupported=="boolean"?r.isOffscreenCanvasSupported:!di,v=typeof r.isChrome=="boolean"?r.isChrome:!ei.platform.isFirefox&&typeof window<"u"&&!!(window!=null&&window.chrome),S=Number.isInteger(r.canvasMaxAreaInBytes)?r.canvasMaxAreaInBytes:-1,M=typeof r.disableFontFace=="boolean"?r.disableFontFace:di,T=r.fontE
13xtraProperties===!0,N=r.enableXfa===!0,B=r.ownerDocument||globalThis.document,W=r.disableRange===!0,$=r.disableStream===!0,X=r.disableAutoFetch===!0,et=r.pdfBug===!0,rt=r.CanvasFactory||uT,it=r.FilterFactory||fT,at=r.enableHWA===!0,ii=c?c.length:(Xt=r.length)!=null?Xt:NaN,ni=typeof r.useSystemFonts=="boolean"?r.useSystemFonts:!di&&!M,me=typeof r.useWorkerFetch=="boolean"?r.useWorkerFetch:y===rf&&x===cf&&g&&C&&Yc(g,document.baseURI)&&Yc(C,document.baseURI);r.canvasFactory&&lw("`canvasFactory`-instance option, please use `CanvasFactory` instead."),r.filterFactory&&lw("`filterFactory`-instance option, please use `FilterFactory` instead.");let zt=null;MP(u);let Lt={canvasFactory:new rt({ownerDocument:B,enableHWA:at}),filterFactory:new it({docId:e,ownerDocument:B}),cMapReaderFactory:me?null:new y({baseUrl:g,isCompressed:_}),standardFontDataFactory:me?null:new x({baseUrl:C})};if(!d){let ln={verbosity:u,port:vn.workerPort};d=ln.port?rl.fromPort(ln):new rl(ln),t._worker=d}let si={docId:e,apiVersion:"4.8.69",data:n,password:l,disableAutoFetch:X,rangeChunkSize:h,length:ii,docBaseUrl:p,enableXfa:N,evaluatorOptions:{maxImageSize:A,disableFontFace:M,ignoreErrors:I,isEvalSupported:E,isOffscreenCanvasSupported:L,isChrome:v,canvasMaxAreaInBytes:S,fontExtraProperties:T,useSystemFonts:ni,cMapUrl:me?g:null,standardFontDataUrl:me?C:null}},ye={disableFontFace:M,fontExtraProperties:T,ownerDocument:B,pdfBug:et,styleElement:zt,loadingParams:{disableAutoFetch:X,enableXfa:N}};return d.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");let ln=d.messageHandler.sendWithPromise("GetDocRequest",si,n?[n.buffer]:null),Zo;if(c)Zo=new M_(c,{disableRange:W,disableStream:$});else if(!n){if(!i)throw new Error("getDocument - no `url` parameter provided.");let Ac;di?Ac=typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype&&Yc(i)?hf:V_:Ac=Yc(i)?hf:F_,Zo=new Ac({url:i,length:ii,httpHeaders:s,withCredentials:o,rangeChunkSize:h,disableRange:W,disableStream:$})}return ln.then(Ac=>{if(t.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");let Mm=new cr(e,Ac,d.port),NE=new Z_(Mm,t,Zo,ye,Lt);t._transport=NE,Mm.send("Ready",null)})}).catch(t._capability.reject),t}function _T(r){if(r instanceof URL)return r.href;try{return new URL(r,window.location).href}catch{if(di&&typeof r=="string")return r}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function bT(r){if(di&&typeof Buffer<"u"&&r instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength)return r;if(typeof r=="string")return Xf(r);if(r instanceof ArrayBuffer||ArrayBuffer.isView(r)||typeof r=="object"&&!isNaN(r==null?void 0:r.length))return new Uint8Array(r);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function vw(r){return typeof r=="object"&&Number.isInteger(r==null?void 0:r.num)&&r.num>=0&&Number.isInteger(r==null?void 0:r.gen)&&r.gen>=0}var Ff,Bf=class Bf{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${Ze(Bf,Ff)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}destroy(){return O(this,null,function*(){var t,e,i;this.destroyed=!0;try{(t=this._worker)!=null&&t.port&&(this._worker._pendingDestroy=!0),yield(e=this._transport)==null?void 0:e.destroy()}catch(n){throw(i=this._worker)!=null&&i.port&&delete this._worker._pendingDestroy,n}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)})}};Ff=new WeakMap,b(Bf,Ff,0);var Y_=Bf,ff=class{constructor(t,e,i=!1,n=null){this.length=t,this.initialData=e,this.progressiveDone=i,this.contentDispositionFilename=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(let i of this._rangeListeners)i(t,e)}onDataProgress(t,e){this._readyCapability.promise.then(()=>{for(let i of this._progressListeners)i(t,e)})}onDataProgressiveRead(t){this._readyCapability.promise.then(()=>{for(let e of this._progressiveReadListeners)e(t)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(let t of this._progressiveDoneListeners)t()})}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){re("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}},X_=class{constructor(t,e){this._pdfInfo=t,this._transport=e}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Ot(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){let{renderingIntent:e}
13=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}},bo,ms,en,tl,Dp,K_=class{constructor(t,e,i,n=!1){b(this,en);b(this,bo,null);b(this,ms,!1);this._pageIndex=t,this._pageInfo=e,this._transport=i,this._stats=n?new Jp:null,this._pdfBug=n,this.commonObjs=i.commonObjs,this.objs=new mf,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:i=0,offsetY:n=0,dontFlip:s=!1}={}){return new ud({viewBox:this.view,scale:t,rotation:e,offsetX:i,offsetY:n,dontFlip:s})}getAnnotations({intent:t="display"}={}){let{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Ot(this,"isPureXfa",!!this._transport._htmlForXfa)}getXfa(){return O(this,null,function*(){var t;return((t=this._transport._htmlForXfa)==null?void 0:t.children[this._pageIndex])||null})}render({canvasContext:t,viewport:e,intent:i="display",annotationMode:n=lo.ENABLE,transform:s=null,background:o=null,optionalContentConfigPromise:l=null,annotationCanvasMap:c=null,pageColors:h=null,printAnnotationStorage:d=null,isEditing:u=!1}){var E,L;(E=this._stats)==null||E.time("Overall");let p=this._transport.getRenderingIntent(i,n,d,u),{renderingIntent:g,cacheKey:_}=p;m(this,ms,!1),f(this,en,Dp).call(this),l||(l=this._transport.getOptionalContentConfig(g));let y=this._intentStates.get(_);y||(y=Object.create(null),this._intentStates.set(_,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);let C=!!(g&Bi.PRINT);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(L=this._stats)==null||L.time("Page Request"),this._pumpOperatorList(p));let x=v=>{var S;y.renderTasks.delete(I),(this._maybeCleanupAfterRender||C)&&m(this,ms,!0),f(this,en,tl).call(this,!C),v?(I.capability.reject(v),this._abortOperatorList({intentState:y,reason:v instanceof Error?v:new Error(v)})):I.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(S=globalThis.Stats)!=null&&S.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},I=new tb({callback:x,params:{canvasContext:t,viewport:e,transform:s,background:o},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:c,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!C,pdfBug:this._pdfBug,pageColors:h});(y.renderTasks||(y.renderTasks=new Set)).add(I);let A=I.task;return Promise.all([y.displayReadyCapability.promise,l]).then(([v,S])=>{var M;if(this.destroyed){x();return}if((M=this._stats)==null||M.time("Rendering"),!(S.renderingIntent&g))throw new Error("Mu
13st use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");I.initializeGraphics({transparency:v,optionalContentConfig:S}),I.operatorListChanged()}).catch(x),A}getOperatorList({intent:t="display",annotationMode:e=lo.ENABLE,printAnnotationStorage:i=null,isEditing:n=!1}={}){var h;function s(){l.operatorList.lastChunk&&(l.opListReadCapability.resolve(l.operatorList),l.renderTasks.delete(c))}let o=this._transport.getRenderingIntent(t,e,i,n,!0),l=this._intentStates.get(o.cacheKey);l||(l=Object.create(null),this._intentStates.set(o.cacheKey,l));let c;return l.opListReadCapability||(c=Object.create(null),c.operatorListChanged=s,l.opListReadCapability=Promise.withResolvers(),(l.renderTasks||(l.renderTasks=new Set)).add(c),l.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(h=this._stats)==null||h.time("Page Request"),this._pumpOperatorList(o)),l.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:e===!0},{highWaterMark:100,size(n){return n.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(i=>yd.textContent(i));let e=this.streamTextContent(t);return new Promise(function(i,n){function s(){o.read().then(function({value:c,done:h}){var d;if(h){i(l);return}(d=l.lang)!=null||(l.lang=c.lang),Object.assign(l.styles,c.styles),l.items.push(...c.items),s()},n)}let o=e.getReader(),l={items:[],styles:Object.create(null),lang:null};s()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;let t=[];for(let e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(let i of e.renderTasks)t.push(i.completed),i.cancel();return this.objs.clear(),m(this,ms,!1),f(this,en,Dp).call(this),Promise.all(t)}cleanup(t=!1){m(this,ms,!0);let e=f(this,en,tl).call(this,!1);return t&&e&&this._stats&&(this._stats=new Jp),e}_startRenderPage(t,e){var n,s;let i=this._intentStates.get(e);i&&((n=this._stats)==null||n.timeEnd("Page Request"),(s=i.displayReadyCapability)==null||s.resolve(t))}_renderPageChunk(t,e){for(let i=0,n=t.length;i<n;i++)e.operatorList.fnArray.push(t.fnArray[i]),e.operatorList.argsArray.push(t.argsArray[i]);e.operatorList.lastChunk=t.lastChunk,e.operatorList.separateAnnots=t.separateAnnots;for(let i of e.renderTasks)i.operatorListChanged();t.lastChunk&&f(this,en,tl).call(this,!0)}_pumpOperatorList({renderingIntent:t,cacheKey:e,annotationStorageSerializable:i,modifiedIds:n}){let{map:s,transfer:o}=i,c=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:e,annotationStorage:s,modifiedIds:n},o).getReader(),h=this._intentStates.get(e);h.streamReader=c;let d=()=>{c.read().then(({value:u,done:p})=>{if(p){h.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(u,h),d())},u=>{if(h.streamReader=null,!this._transport.destroyed){if(h.operatorList){h.operatorList.lastChunk=!0;for(let p of h.renderTasks)p.operatorListChanged();f(this,en,tl).call(this,!0)}if(h.displayReadyCapability)h.displayReadyCapability.reject(u);else if(h.opListReadCapability)h.opListReadCapability.reject(u);else throw u}})};d()}_abortOperatorList({intentState:t,reason:e,force:i=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!i){if(t.renderTasks.size>0)return;if(e instanceof pd){let n=dT;e.extraDelay>0&&e.extraDelay<1e3&&(n+=e.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})},n);return}}if(t.streamReader.cancel(new Ls(e.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(let[n,s]of this._intentStates)if(s===t){this._intentStates.delete(n);break}this.cleanup()}}}get stats(){return this._stats}};bo=new WeakMap,ms=new WeakMap,en=new WeakSet,tl=function(t=!1){if(f(this,en,Dp).call(this),!a(this,ms)||this.destroyed)return!1;if(t)return m(this,bo,setTimeout(()=>{m(this,bo,null),f(this,en,tl).call(this,!1)},hT)),!1;for(let{renderTasks:e,operatorList:i}of this._intentStates.values())if(e.size>0||!i.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),m(this,ms,!1),!0},Dp=function(){a(this,bo)&&(clearTimeout(a(this,bo)),m(this,bo,null))};var gs,zf,q_=class{constructor(){b(this,gs,new Map);b(this,zf,Promise.resolve())}postMessage(t,e){let i={data:structuredClone(t,e?{transfer:e}:null)};a(this,zf).then(()=>{for(let[n]of a(this,gs))n.call(this,i)})}addEventListener(t,e,i=null){let n=null;if((i==null?void 0:i.signal)instanceof AbortSignal){let{signal:s}=i;
13if(s.aborted){Tt("LoopbackPort - cannot use an `aborted` signal.");return}let o=()=>this.removeEventListener(t,e);n=()=>s.removeEventListener("abort",o),s.addEventListener("abort",o)}a(this,gs).set(e,n)}removeEventListener(t,e){let i=a(this,gs).get(e);i==null||i(),a(this,gs).delete(e)}terminate(){for(let[,t]of a(this,gs))t==null||t();a(this,gs).clear()}};gs=new WeakMap,zf=new WeakMap;var Vf,kr,Mr,wl,Rp,Al,Lp,le=class le{constructor({name:t=null,port:e=null,verbosity:i=DP()}={}){b(this,wl);var n;if(this.name=t,this.destroyed=!1,this.verbosity=i,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,e){if((n=a(le,Mr))!=null&&n.has(e))throw new Error("Cannot use more than one PDFWorker per port.");(a(le,Mr)||m(le,Mr,new WeakMap)).set(e,this),this._initializeFromPort(e);return}this._initialize()}get promise(){return di?Promise.all([Xn.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new cr("main","worker",t),this._messageHandler.on("ready",function(){}
13),f(this,wl,Rp).call(this)}_initialize(){if(a(le,kr)||a(le,Al,Lp)){this._setupFakeWorker();return}let{workerSrc:t}=le;try{le._isSameOrigin(window.location.href,t)||(t=le._createCDNWrapper(new URL(t,window.location).href));let e=new Worker(t,{type:"module"}),i=new cr("main","worker",e),n=()=>{s.abort(),i.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},s=new AbortController;e.addEventListener("error",()=>{this._webWorker||n()},{signal:s.signal}),i.on("test",l=>{if(s.abort(),this.destroyed||!l){n();return}this._messageHandler=i,this._port=e,this._webWorker=e,f(this,wl,Rp).call(this)}),i.on("ready",l=>{if(s.abort(),this.destroyed){n();return}try{o()}catch{this._setupFakeWorker()}});let o=()=>{let l=new Uint8Array;i.send("test",l,[l.buffer])};o();return}catch{Yf("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){a(le,kr)||(Tt("Setting up fake worker."),m(le,kr,!0)),le._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}let e=new q_;this._port=e;let i=`fake${Ze(le,Vf)._++}`,n=new cr(i+"_worker",i,e);t.setup(n,e),this._messageHandler=new cr(i,i+"_worker",e),f(this,wl,Rp).c
13all(this)}).catch(t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){var t;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(t=a(le,Mr))==null||t.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){var i;if(!(t!=null&&t.port))throw new Error("PDFWorker.fromPort - invalid method signature.");let e=(i=a(this,Mr))==null?void 0:i.get(t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new le(t)}static get workerSrc(){if(vn.workerSrc)return vn.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return Ot(this,"_setupFakeWorkerGlobal",O(this,null,function*(){return a(this,Al,Lp)?a(this,Al,Lp):(yield import(this.workerSrc)).WorkerMessageHandler}))}};Vf=new WeakMap,kr=new WeakMap,Mr=new WeakMap,wl=new WeakSet,Rp=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},Al=new WeakSet,Lp=function(){var t;try{return((t=globalThis.pdfjsWorker)==null?void 0:t.WorkerMessageHandler)||null}catch{return null}},b(le,Al),b(le,Vf,0),b(le,kr,!1),b(le,Mr),di&&(m(le,kr,!0),vn.workerSrc||(vn.workerSrc="./pdf.worker.mjs")),le._isSameOrigin=(t,e)=>{let i;try{if(i=new URL(t),!i.origin||i.origin==="null")return!1}catch{return!1}let n=new URL(e,i);return i.origin===n.origin},le._createCDNWrapper=t=>{let e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};var rl=le,_s,jn,Cl,El,Hn,Dr,td,Z_=class{constructor(t,e,i,n,s){b(this,Dr);b(this,_s,new Map);b(this,jn,new Map);b(this,Cl,new Map);b(this,El,new Map);b(this,Hn,null);this.messageHandler=t,this.loadingTask=e,this.commonObjs=new mf,this.fontLoader=new d_({ownerDocument:n.ownerDocument,styleElement:n.styleElement}),this.loadingParams=n.loadingParams,this._params=n,this.canvasFactory=s.canvasFactory,this.filterFactory=s.filterFactory,this.cMapReaderFactory=s.cMapReaderFactory,this.standardFontDataFactory=s.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return Ot(this,"annotationStorage",new gd)}getRenderingIntent(t,e=lo.ENABLE,i=null,n=!1,s=!1){let o=Bi.DISPLAY,l=c_;switch(t){case"any":o=Bi.ANY;break;case"display":break;case"print":o=Bi.PRINT;break;default:Tt(`getRenderingIntent - invalid intent: ${t}`)}let c=o&Bi.PRINT&&i instanceof nf?i:this.annotationStorage;switch(e){case lo.DISABLE:o+=Bi.ANNOTATIONS_DISABLE;break;case lo.ENABLE:break;case lo.ENABLE_FORMS:o+=Bi.ANNOTATIONS_FORMS;break;case lo.ENABLE_STORAGE:o+=Bi.ANNOTATIONS_STORAGE,l=c.serializable;break;default:Tt(`getRenderingIntent - invalid annotationMode: ${e}`)}n&&(o+=Bi.IS_EDITING),s&&(o+=Bi.OPLIST);let{ids:h,hash:d}=c.modifiedIds,u=[o,l.hash,d];return{renderingIntent:o,cacheKey:u.join("_"),annotationStorageSerializable:l,modifiedIds:h}}destroy(){var i;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(i=a(this,Hn))==null||i.reject(new Error("Worker was destroyed during onPassword callback"));let t=[];for(let n of a(this,jn).values())t.push(n._destroy());a(this,jn).clear(),a(this,Cl).clear(),a(this,El).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();let e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{var n;this.commonObjs.clear(),this.fontLoader.clear(),a(this,_s).clear(),this.filterFactory.destroy(),bd.cleanup(),(n=this._networkStream)==null||n.cancelAllRequests(new Ls("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(i,n)=>{Be(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=s=>{this._lastProgress={loaded:s.loaded,total:s.total}},n.onPull=()=>{this._fullReader.read().then(function({value:s,done:o}){if(o){n.close();return}Be(s instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),n.enqueue(new Uint8Array(s),1,[s])}).catch(s=>{n.error(s)})},n.onCancel=s=>{this._fullReader.cancel(s),n.ready.catch(o=>{if(!this.destroyed)throw o})}}),t.on("ReaderHeadersReady",i=>O(this,null,function*(){var l;yield this._fullReader.headersReady;let{isStreamingSupported:n,isRangeSupported:s,contentLength:o}=this._fullReader;return(!n||!s)&&(this._lastProgress&&((l=e.onProgress)==null||l.call(e,this._lastProgress)),this._fullReader.onProgress=c=>{var h;(h=e.onProgress)==null||h.call(e,{loaded:c.loaded,total:c.total})}),{isStreamingSupported:n,isRangeSupported:s,contentLength:o}})),t.on("GetRangeReader",(i,n)=>{Be(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let s=this._networkStream.getRangeReader(i.begin,i.end);if(!s){n.close();return}n.onPull=()=>{s.read().then(function({value:o,done:l}){if(l){n.close();return}Be(o instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),n.enqueue(new Uint8Array(o),1,[o])}).catch(o=>{n.error(o)})},n.onCancel=o=>{s.cancel(o),n.ready.catch(l=>{if(!this.destroyed)throw l})}}),t.on("GetDoc",({pdfInfo:i})=>{this._numPages=i.numPages,this._htmlForXfa=i.htmlForXfa,delete i.htmlForXfa,e._capability.resolve(new X_(i,this))}),t.on("DocException",function(i){let n;switch(i.name){case"PasswordException":n=new dd(i.message,i.code);break;case"InvalidPDFException":n=new Qp(i.message);break;case"MissingPDFException":n=new Rs(i.message);break;case"UnexpectedResponseException":n=new Xl(i.message,i.status);break;case"UnknownErrorException":n=new hd(i.message,i.details);break;default:re("DocException - expected a valid Error.")}e._capability.reject(n)}),t.on("PasswordRequest",i=>{if(m(this,Hn,Promise.withResolvers()),e.onPassword){let n=s=>{s instanceof Error?a(this,Hn).reject(s):a(this,Hn).resolve({password:s})};try{e.onPassword(n,i.code)}catch(s){a(this,Hn).reject(s)}}else a(this,Hn).reject(new dd(i.message,i.code));return a(this,Hn).promise}),t.on("DataLoaded",i=>{var n;(n=e.onProgress)==null||n.call(e,{loaded:i.length,total:i.length}),this.downloadInfoCapability.resolve(i)}),t.on("StartRenderPage",i=>{if(this.destroyed)return;a(this,jn).get(i.pageIndex)._startRenderPage(i.transparency,i.cacheKey)}),t.on("commonobj",([i,n,s])=>{var o;if(this.destroyed||this.commonObjs.has(i))return null;switch(n){case"Font":let{disableFontFace:l,fontExtraProperties:c,pdfBug:h}=this._params;if("error"in s){let g=s.error;Tt(`Error during font loading: ${g}`),this.commonObjs.resolve(i,g);break}let d=h&&((o=globalThis.FontInspector)!=null&&o.enabled)?(g,_)=>globalThis.FontInspector.fontAdded(g,_):null,u=new h_(s,{disableFontFace:l,inspectFont:d});this.fontLoader.bind(u).catch(()=>
13t.sendWithPromise("FontFallback",{id:i})).finally(()=>{!c&&u.data&&(u.data=null),this.commonObjs.resolve(i,u)});break;case"CopyLocalImage":let{imageRef:p}=s;Be(p,"The imageRef must be defined.");for(let g of a(this,jn).values())for(let[,_]of g.objs)if((_==null?void 0:_.ref)===p)return _.dataLen?(this.commonObjs.resolve(i,structuredClone(_)),_.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(i,s);break;default:throw new Error(`Got unknown common object type ${n}`)}return null}),t.on("obj",([i,n,s,o])=>{var c;if(this.destroyed)return;let l=a(this,jn).get(n);if(!l.objs.has(i)){if(l._intentStates.size===0){(c=o==null?void 0:o.bitmap)==null||c.close();return}switch(s){case"Image":l.objs.resolve(i,o),(o==null?void 0:o.dataLen)>SP&&(l._maybeCleanupAfterRender=!0);break;case"Pattern":l.objs.resolve(i,o);break;default:throw new Error(`Got unknown object type ${s}`)}}}),t.on("DocProgress",i=>{var n;this.destroyed||(n=e.onProgress)==null||n.call(e,{loaded:i.loaded,total:i.total})}),t.on("FetchBuiltInCMap",i=>O(this,null,function*(){if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(i)})),t.on("FetchStandardFontData",i=>O(this,null,function*(){if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(i)}))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var i,n;this.annotationStorage.size<=0&&Tt("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");let{map:t,transfer:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:(n=(i=this._fullReader)==null?void 0:i.filename)!=null?n:null},e).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));let e=t-1,i=a(this,Cl).get(e);if(i)return i;let n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(s=>{if(this.destroyed)throw new Error("Transport destroyed");s.refStr&&a(this,El).set(s.refStr,t);let o=new K_(e,s,this,this._params.pdfBug);return a(this,jn).set(e,o),o});return a(this,Cl).set(e,n),n}getPageIndex(t){return vw(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return f(this,Dr,td).call(this,"GetFieldObjects")}hasJSActions(){return f(this,Dr,td).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return f(this,Dr,td).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}
13getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return f(this,Dr,td).call(this,"GetOptionalContentConfig").then(e=>new I_(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){let t="GetMetadata",e=a(this,_s).get(t);if(e)return e;let i=this.messageHandler.sendWithPromise(t,null).then(n=>{var s,o,l,c;return{info:n[0],metadata:n[1]?new P_(n[1]):null,contentDispositionFilename:(o=(s=this._fullReader)==null?void 0:s.filename)!=null?o:null,contentLength:(c=(l=this._fullReader)==null?void 0:l.contentLength)!=null?c:null}});return a(this,_s).set(t,i),i}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}startCleanup(t=!1){return O(this,null,function*(){if(!this.destroyed){yield this.messageHandler.sendWithPromise("Cleanup",null);for(let e of a(this,jn).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),a(this,_s).clear(),this.filterFactory.destroy(!0),bd.cleanup()}})}cachedPageNumber(t){var i;if(!vw(t))return null;let e=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return(i=a(this,El).get(e))!=null?i:null}};_s=new WeakMap,jn=new WeakMap,Cl=new WeakMap,El=new WeakMap,Hn=new WeakMap,Dr=new WeakSet,td=function(t,e=null){let i=a(this,_s).get(t);if(i)return i;let n=this.messageHandler.sendWithPromise(t,e);return a(this,_s).set(t,n),n};var bp=Symbol("INITIAL_DATA"),un,Zd,Q_,mf=class{constructor(){b(this,Zd);b(this,un,Object.create(null))}get(t,e=null){if(e){let n=f(this,Zd,Q_).call(this,t);return n.promise.then(()=>e(n.data)),null}let i=a(this,un)[t];if(!i||i.data===bp)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return i.data}has(t){let e=a(this,un)[t];return!!e&&e.data!==bp}resolve(t,e=null){let i=f(this,Zd,Q_).call(this,t);i.data=e,i.resolve()}clear(){var t;for(let e in a(this,un)){let{data:i}=a(this,un)[e];(t=i==null?void 0:i.bitmap)==null||t.close()}m(this,un,Object.create(null))}*[Symbol.iterator](){for(let t in a(this,un)){let{data:e}=a(this,un)[t];e!==bp&&(yield[t,e])}}};un=new WeakMap,Zd=new WeakSet,Q_=function(t){var e;return(e=a(this,un))[t]||(e[t]=Pi(ft({},Promise.withResolvers()),{data:bp}))};var yo,J_=class{constructor(t){b(this,yo,null);m(this,yo,t),this.onContinue=null}get promise(){return a(this,yo).capability.promise}cancel(t=0){a(this,yo).cancel(null,t)}get separateAnnots(){let{separateAnnots:t}=a(this,yo).operatorList;if(!t)return!1;let{annotationCanvasMap:e}=a(this,yo);return t.form||t.canvas&&(e==null?void 0:e.size)>0}};yo=new WeakMap;var vo,Rr,lr=class lr{constructor({callback:t,params:e,objs:i,commonObjs:n,annotationCanvasMap:s,operatorList:o,pageIndex:l,canvasFactory:c,filterFactory:h,useRequestAnimationFrame:d=!1,pdfBug:u=!1,pageColors:p=null}){b(this,vo,null);this.callback=t,this.params=e,this.objs=i,this.commonObjs=n,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=l,this.canvasFactory=c,this.filterFactory=h,this._pdfBug=u,this.pageColors=p,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=d===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new J_(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){var l,c;if(this.cancelled)return;if(this._canvas){if(a(lr,Rr).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");a(lr,Rr).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());let{canvasContext:i,viewport:n,transform:s,background:o}=this.params;this.gfx=new ol(i,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:s,viewport:n,transparency:t,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,(c=this.graphicsReadyCallback)==null||c.call(this)}cancel(t=null,e=0){var i;this.running=!1,this.cancelled=!0,(i=this.gfx)==null||i.endDrawing(),a(this,vo)&&(window.cancelAnimationFrame(a(this,vo)),m(this,vo,null)),a(lr,Rr).delete(this._canvas),this.callback(t||new pd(`Rendering cancelled, page ${this._pageIndex+1}`,e))}operatorListChanged(){var t;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(t=this.stepper)==null||t.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?m(this,vo,window.requestAnimationFrame(()=>{m(this,vo,null),this._nextBound().catch(this._cancelBound)}
13)):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}_next(){return O(this,null,function*(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),a(lr,Rr).delete(this._canvas),this.callback())))})}};vo=new WeakMap,Rr=new WeakMap,b(lr,Rr,new WeakSet);var tb=lr,yT="4.8.69",vT="3634dab10";function xw(r){return Math.floor(Math.max(0,Math.min(1,r))*255).toString(16).padStart(2,"0")}function $c(r){return Math.max(0,Math.min(255,255*r))}var gf=class{static CMYK_G([t,e,i,n]){return["G",1-Math.min(1,.3*t+.59*i+.11*e+n)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=$c(t),[t,t,t]}static G_HTML([t]){let e=xw(t);return`#${e}${e}${e}`}static RGB_G([t,e,i]){return["G",.3*t+.59*e+.11*i]}static RGB_rgb(t){return t.map($c)}static RGB_HTML(t){return`#${t.map(xw).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,i,n]){return["RGB",1-Math.min(1,t+n),1-Math.min(1,i+n),1-Math.min(1,e+n)]}static CMYK_rgb([t,e,i,n]){return[$c(1-Math.min(1,t+n)),$c(1-Math.min(1,i+n)),$c(1-Math.min(1,e+n))]}static CMYK_HTML(t){let e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,i]){let n=1-t,s=1-e,o=1-i,l=Math.min(n,s,o);return["CMYK",n,s,o,l]}},eb=class{create(t,e,i=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");let n=this._createSVG("svg:svg");return n.setAttribute("version","1.1"),i||(n.setAttribute("width",`${t}px`),n.setAttribute("height",`${e}px`)),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox",`0 0 ${t} ${e}`),n}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){re("Abstract method `_createSVG` called.")}},vd=class extends eb{_createSVG(t){return document.createElementNS(cs,t)}},_f=class{static setupStorage(t,e,i,n,s){let o=n.getValue(e,{value:null});switch(i.name){case"textarea":if(o.value!==null&&(t.textContent=o.value),s==="print")break;t.addEventListener("input",l=>{n.setValue(e,{value:l.target.value})});break;case"input":if(i.attributes.type==="radio"||i.attributes.type==="checkbox"){if(o.value===i.attributes.xfaOn?t.setAttribute("checked",!0):o.value===i.attributes.xfaOff&&t.removeAttribute("checked"),s==="print")break;t.addEventListener("change",l=>{n.setValue(e,{value:l.target.checked?l.target.getAttribute("xfaOn"):l.target.getAttribute("xfaOff")})})}else{if(o.value!==null&&t.setAttribute("value",o.value),s==="print")break;t.addEventListener("input",l=>{n.setValue(e,{value:l.target.value})})}break;case"select":if(o.value!==null){t.setAttribute("value",o.value);for(let l of i.children)l.attributes.value===o.value?l.attributes.selected=!0:l.attributes.hasOwnProperty("selected")&&delete l.attributes.selected}t.addEventListener("input",l=>{let c=l.target.options,h=c.selectedIndex===-1?"":c[c.selectedIndex].value;n.setValue(e,{value:h})});break}}static setAttributes({html:t,element:e,storage:i=null,intent:n,linkService:s}){let{attributes:o}=e,l=t instanceof HTMLAnchorElement;o.type==="radio"&&(o.name=`${o.name}-${n}`);for(let[c,h]of Object.entries(o))if(h!=null)switch(c){case"class":h.length&&t.setAttribute(c,h.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",h);break;case"style":Object.assign(t.style,h);break;case"textContent":t.textContent=h;break;default:(!l||c!=="href"&&c!=="newWindow")&&t.setAttribute(c,h)}l&&s.addLinkAttributes(t,o.href,o.newWindow),i&&o.dataId&&this.setupStorage(t,o.dataId,e,i)}static render(t){var u,p;let e=t.annotationStorage,i=t.linkService,n=t.xfaHtml,s=t.intent||"display",o=document.createElement(n.name);n.attributes&&this.setAttributes({html:o,element:n,intent:s,linkService:i});let l=s!=="richText",c=t.div;if(c.append(o),t.viewport){let g=`matrix(${t.viewport.transform.join(",")})`;c.style.transform=g}l&&c.setAttribute("class","xfaLayer xfaFont");let h=[];if(n.children.length===0){if(n.value){let g=document.createTextNode(n.value);o.append(g),l&&yd.shouldBuildText(n.name)&&h.push(g)}return{textDivs:h}}let d=[[n,-1,o]];for(;d.length>0;){let[g,_,y]=d.at(-1);if(_+1===g.children.length){d.pop();continue}let C=g.children[++d.at(-1)[1]];if(C===null)continue;let{name:x}=C;if(x==="#text"){let A=document.createTextNode(C.value);h.push(A),y.append(A);continue}let I=(u=C==null?void 0:C.attributes)!=null&&u.xmlns?document.createElementNS(C.attributes.xmlns,x):document.createElement(x);if(y.append(I),C.attributes&&this.setAttributes({html:I,element:C,storage:e,intent:s,linkService:i}),((p=C.children)==null?void 0:p.length)>0)d.push([C,-1,I]);else if(C.value){let A=document.createTextNode(C.value);l&&yd.shouldBuildText(x)&&h.push(A),I.append(A)}}for(let g of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))g.setAttribute("readOnly",!0);return{textDivs:h}}static update(t){let e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}},kh=1e3,xT=9,ia=new WeakSet;function ks(r){return{width:r[2]-r[0],height:r[3]-r[1]}}var ib=class{static create(t){switch(t.data.annotationType){case Le.LINK:return new bf(t);case Le.TEXT:return new sb(t);case Le.WIDGET:switch(t.data.fieldType){case"Tx":return new ob(t);case"Btn":return t.data.radioButton?new yf(t):t.data.checkBox?new ab(t):new lb(t);case"Ch":return new cb(t);case"Sig":return new rb(t)}return new Os(t);case Le.POPUP:return new xd(t);case Le.FREETEXT:return new vf(t);case Le.LINE:return new pb(t);case Le.SQUARE:return new fb(t);case Le.CIRCLE:return new mb(t);case Le.POLYLINE:return new xf(t);case Le.CARET:return new _b(t);case Le.INK:return new wd(t);case Le.POLYGON:return new gb(t);case Le.HIGHLIGHT:return new wf(t);case Le.UNDERLINE:return new bb(t);case Le.SQUIGGLY:return new yb(t);case Le.STRIKEOUT:return new vb(t);case Le.STAMP:return new Af(t);case Le.FILEATTACHMENT:return new xb(t);default:return new Se(t)}}},Lr,Sl,Pl,Qd,nb,uy=class uy{constructor(t,{isRenderable:e=!1,ignoreBorder:i=!1,createQuadrilaterals:n=!1}={}){b(this,Qd);b(this,Lr,null);b(this,Sl,!1);b(this,Pl,null);this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(i)),n&&this._createQuadrilaterals()}static _hasPopupData({titleObj:t,contentsObj:e,richText:i}){return!!(t!=null&&t.str||e!=null&&e.str||i!=null&&i.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return uy._hasPopupData(this.data)}updateEdited(t){var i;if(!this.container)return;a(this,Lr)||m(this,Lr,{rect:this.data.rect.slice(0)});let{rect:e}=t;e&&f(this,Qd,nb).call(this,e),(i=a(this,Pl))==null||i.popup.updateEdited(t)}resetEdited(){var t;a(this,Lr)&&(f(this,Qd,nb).call(this,a(this,Lr).rect),(t=a(this,Pl))==null||t.popup.resetEdited(),m(this,Lr,null))}_createContainer(t){let{data:e,parent:{page:i,viewport:n}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",e.id),this instanceof Os||(s.tabIndex=kh);let{style:o}=s;
13if(o.zIndex=this.parent.zIndex++,e.alternativeText&&(s.title=e.alternativeText),e.noRotate&&s.classList.add("norotate"),!e.rect||this instanceof xd){let{rotation:y}=e;return!e.hasOwnCanvas&&y!==0&&this.setRotation(y,s),s}let{width:l,height:c}=ks(e.rect);if(!t&&e.borderStyle.width>0){o.borderWidth=`${e.borderStyle.width}px`;let y=e.borderStyle.horizontalCornerRadius,C=e.borderStyle.verticalCornerRadius;if(y>0||C>0){let I=`calc(${y}px * var(--scale-factor)) / calc(${C}px * var(--scale-factor))`;o.borderRadius=I}else if(this instanceof yf){let I=`calc(${l}px * var(--scale-factor)) / calc(${c}px * var(--scale-factor))`;o.borderRadius=I}switch(e.borderStyle.style){case Wc.SOLID:o.borderStyle="solid";break;case Wc.DASHED:o.borderStyle="dashed";break;case Wc.BEVELED:Tt("Unimplemented border style: beveled");break;case Wc.INSET:Tt("Unimplemented border style: inset");break;case Wc.UNDERLINE:o.borderBottomStyle="solid";break;default:break}let x=e.borderColor||null;x?(m(this,Sl,!0),o.borderColor=ot.makeHexColor(x[0]|0,x[1]|0,x[2]|0)):o.borderWidth=0}let h=ot.normalizeRect([e.rect[0],i.view[3]-e.rect[1]+i.view[1],e.rect[2],i.view[3]-e.rect[3]+i.view[1]]),{pageWidth:d,pageHeight:u,pageX:p,pageY:g}=n.rawDims;o.left=`${100*(h[0]-p)/d}%`,o.top=`${100*(h[1]-g)/u}%`;let{rotation:_}=e;return e.hasOwnCanvas||_===0?(o.width=`${100*l/d}%`,o.height=`${100*c/u}%`):this.setRotation(_,s),s}setRotation(t,e=this.container){if(!this.data.rect)return;let{pageWidth:i,pageHeight:n}=this.parent.viewport.rawDims,{width:s,height:o}=ks(this.data.rect),l,c;t%180===0?(l=100*s/i,c=100*o/n):(l=100*o/i,c=100*s/n),e.style.width=`${l}%`,e.style.height=`${c}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){let t=(e,i,n)=>{let s=n.detail[e],o=s[0],l=s.slice(1);n.target.style[i]=gf[`${o}_HTML`](l),this.annotationStorage.setValue(this.data.id,{[i]:gf[`${o}_rgb`](l)})};return Ot(this,"_commonActions",{display:e=>{let{display:i}=e.detail,n=i%2===1;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:n,noPrint:i===1||i===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{let{hidden:i}=e.detail;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:i,noView:i})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{let i=e.detail.rotation;this.setRotation(i),this.annotationStorage.setValue(this.data.id,{rotation:i})}})}_dispatchEventFromSandbox(t,e){let i=this._commonActions;for(let n of Object.keys(e.detail)){let s=t[n]||i[n];s==null||s(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;let e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;let i=this._commonActions;for(let[n,s]of Object.entries(e)){let o=i[n];if(o){let l={detail:{[n]:s},target:t};o(l),delete e[n]}}}
13_createQuadrilaterals(){if(!this.container)return;let{quadPoints:t}=this.data;if(!t)return;let[e,i,n,s]=this.data.rect.map(y=>Math.fround(y));if(t.length===8){let[y,C,x,I]=t.subarray(2,6);if(n===y&&s===C&&e===x&&i===I)return}let{style:o}=this.container,l;if(a(this,Sl)){let{borderColor:y,borderWidth:C}=o;o.borderWidth=0,l=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${y}" stroke-width="${C}">`],this.container.classList.add("hasBorder")}let c=n-e,h=s-i,{svgFactory:d}=this,u=d.createElement("svg");u.classList.add("quadrilateralsContainer"),u.setAttribute("width",0),u.setAttribute("height",0);let p=d.createElement("defs");u.append(p);let g=d.createElement("clipPath"),_=`clippath_${this.data.id}`;g.setAttribute("id",_),g.setAttribute("clipPathUnits","objectBoundingBox"),p.append(g);for(let y=2,C=t.length;y<C;y+=8){let x=t[y],I=t[y+1],A=t[y+2],E=t[y+3],L=d.createElement("rect"),v=(A-e)/c,S=(s-I)/h,M=(x-A)/c,T=(I-E)/h;L.setAttribute("x",v),L.setAttribute("y",S),L.setAttribute("width",M),L.setAttribute("height",T),g.append(L),l==null||l.push(`<rect vector-effect="non-scaling-stroke" x="${v}" y="${S}" width="${M}" height="${T}"/>`)}a(this,Sl)&&(l.push("</g></svg>')"),o.backgroundImage=l.join("")),this.container.append(u),this.container.style.clipPath=`url(#${_})`}_createPopup(){let{data:t}=this,e=m(this,Pl,new xd({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(e.render())}render(){re("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){let i=[];if(this._fieldObjects){let n=this._fieldObjects[t];if(n)for(let{page:s,id:o,exportValues:l}of n){if(s===-1||o===e)continue;let c=typeof l=="string"?l:null,h=document.querySelector(`[data-element-id="${o}"]`);if(h&&!ia.has(h)){Tt(`_getElementsByName - element not allowed: ${o}`);continue}i.push({id:o,exportValue:c,domElement:h})}return i}for(let n of document.getElementsByName(t)){let{exportValue:s}=n,o=n.getAttribute("data-element-id");o!==e&&ia.has(n)&&i.push({id:o,exportValue:s,domElement:n})}return i}show(){var t;this.container&&(this.container.hidden=!1),(t=this.popup)==null||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),(t=this.popup)==null||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){let t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(let e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;let{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{var i;(i=this.linkService.eventBus)==null||i.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e})})}};Lr=new WeakMap,Sl=new WeakMap,Pl=new WeakMap,Qd=new WeakSet,nb=function(t){let{container:{style:e},data:{rect:i,rotation:n},parent:{viewport:{rawDims:{pageWidth:s,pageHeight:o,pageX:l,pageY:c}}}}=this;i==null||i.splice(0,4,...t);let{width:h,height:d}=ks(t);e.left=`${100*(t[0]-l)/s}%`,e.top=`${100*(o-t[3]+c)/o}%`,n===0?(e.width=`${100*h/s}%`,e.height=`${100*d/o}%`):this.setRotation(n)};var Se=uy,zi,nr,cA,dA,bf=class extends Se{constructor(e,i=null){super(e,{isRenderable:!0,ignoreBorder:!!(i!=null&&i.ignoreBorder),createQuadrilaterals:!0});b(this,zi);this.isTooltipOnly=e.data.isTooltipOnly}render(){let{data:e,linkService:i}=this,n=document.createElement("a");n.setAttribute("data-element-id",e.id);let s=!1;return e.url?(i.addLinkAttributes(n,e.url,e.newWindow),s=!0):e.action?(this._bindNamedAction(n,e.action),s=!0):e.attachment?(f(this,zi,cA).call(this,n,e.attachment,e.attachmentDest),s=!0):e.setOCGState?(f(this,zi,dA).call(this,n,e.setOCGState),s=!0):e.dest?(this._bindLink(n,e.dest),s=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,e),s=!0),e.resetForm?(this._bindResetFormAction(n,e.resetForm),s=!0):this.isTooltipOnly&&!s&&(this._bindLink(n,""),s=!0)),this.container.classList.add("linkA
13nnotation"),s&&this.container.append(n),this.container}_bindLink(e,i){e.href=this.linkService.getDestinationHash(i),e.onclick=()=>(i&&this.linkService.goToDestination(i),!1),(i||i==="")&&f(this,zi,nr).call(this)}_bindNamedAction(e,i){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(i),!1),f(this,zi,nr).call(this)}_bindJSAction(e,i){e.href=this.linkService.getAnchorUrl("");let n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(let s of Object.keys(i.actions)){let o=n.get(s);o&&(e[o]=()=>{var l;return(l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i.id,name:s}}),!1})}e.onclick||(e.onclick=()=>!1),f(this,zi,nr).call(this)}_bindResetFormAction(e,i){let n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),f(this,zi,nr).call(this),!this._fieldObjects){Tt('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),n||(e.onclick=()=>!1);return}e.onclick=()=>{var u;n==null||n();let{fields:s,refs:o,include:l}=i,c=[];if(s.length!==0||o.length!==0){let p=new Set(o);for(let g of s){let _=this._fieldObjects[g]||[];for(let{id:y}of _)p.add(y)}for(let g of Object.values(this._fieldObjects))for(let _ of g)p.has(_.id)===l&&c.push(_)}else for(let p of Object.values(this._fieldObjects))c.push(...p);let h=this.annotationStorage,d=[];for(let p of c){let{id:g}=p;switch(d.push(g),p.type){case"text":{let y=p.defaultValue||"";h.setValue(g,{value:y});break}case"checkbox":case"radiobutton":{let y=p.defaultValue===p.exportValues;h.setValue(g,{value:y});break}case"combobox":case"listbox":{let y=p.defaultValue||"";h.setValue(g,{value:y});break}default:continue}let _=document.querySelector(`[data-element-id="${g}"]`);if(_){if(!ia.has(_)){Tt(`_bindResetFormAction - element not allowed: ${g}`);continue}}else continue;_.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((u=this.linkService.eventBus)==null||u.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:d,name:"ResetForm"}})),!1}}};zi=new WeakSet,nr=function(){this.container.setAttribute("data-internal-link","")},cA=function(e,i,n=null){e.href=this.linkService.getAnchorUrl(""),i.description&&(e.title=i.description),e.onclick=()=>{var s;return(s=this.downloadManager)==null||s.openOrDownloadData(i.content,i.filename,n),!1},f(this,zi,nr).call(this)},dA=function(e,i){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(i),!1),f(this,zi,nr).call(this)};var sb=class extends Se{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");let t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}},Os=class extends Se{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&(((e=t.previousSibling)==null?void 0:e.nodeName)==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return ei.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,i,n,s){i.includes("mouse")?t.addEventListener(i,o=>{var l;(l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:s(o),shift:o.shiftKey,modifier:this._getKeyModifier(o)}})}):t.addEventListener(i,o=>{var l;if(i==="blur"){if(!e.focused||!o.relatedTarget)return;e.focused=!1}else if(i==="focus"){if(e.focused)return;e.focused=!0}s&&((l=this.linkService.eventBus)==null||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:s(o)}}))})}_setEventListeners(t,e,i,n){var s,o,l;for(let[c,h]of i)(h==="Action"||(s=this.data.actions)!=null&&s[h])&&((h==="Focus"||h==="Blur")&&(e||(e={focused:!1})),this._setEventListener(t,e,c,h,n),h==="Focus"&&!((o=this.data.actions)!=null&&o.Blur)?this._setEventListener(t,e,"blur","Blur",null):h==="Blur"&&!((l=this.data.actions)!=null&&l.Focus)&&this._setEventListener(t,e,"focus","Focus",null))}
13_setBackgroundColor(t){let e=this.data.backgroundColor||null;t.style.backgroundColor=e===null?"transparent":ot.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){let e=["left","center","right"],{fontColor:i}=this.data.defaultAppearanceData,n=this.data.defaultAppearanceData.fontSize||xT,s=t.style,o,l=2,c=h=>Math.round(10*h)/10;if(this.data.multiLine){let h=Math.abs(this.data.rect[3]-this.data.rect[1]-l),d=Math.round(h/(vp*n))||1,u=h/d;o=Math.min(n,c(u/vp))}else{let h=Math.abs(this.data.rect[3]-this.data.rect[1]-l);o=Math.min(n,c(h/vp))}s.fontSize=`calc(${o}px * var(--scale-factor))`,s.color=ot.makeHexColor(i[0],i[1],i[2]),this.data.textAlignment!==null&&(s.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}},ob=class extends Os{constructor(t){let e=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:e})}setPropertyOnSiblings(t,e,i,n){let s=this.annotationStorage;for(let o of this._getElementsByName(t.name,t.id))o.domElement&&(o.domElement[e]=i),s.setValue(o.id,{[n]:i})}render(){var n,s;let t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let i=null;if(this.renderForms){let o=t.getValue(e,{value:this.data.fieldValue}),l=o.value||"",c=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;c&&l.length>c&&(l=l.slice(0,c));let h=o.formattedValue||((n=this.data.textContent)==null?void 0:n.join(`
14`))||null;h&&this.data.comb&&(h=h.replaceAll(/\s+/g,""));let d={userValue:l,formattedValue:h,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(i=document.createElement("textarea"),i.textContent=h!=null?h:l,this.data.doNotScroll&&(i.style.overflowY="hidden")):(i=document.createElement("input"),i.type="text",i.setAttribute("value",h!=null?h:l),this.data.doNotScroll&&(i.style.overflowX="hidden")),this.data.hasOwnCanvas&&(i.hidden=!0),ia.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,i.name=this.data.fieldName,i.tabIndex=kh,this._setRequired(i,this.data.required),c&&(i.maxLength=c),i.addEventListener("input",p=>{t.setValue(e,{value:p.target.value}),this.setPropertyOnSiblings(i,"value",p.target.value,"value"),d.formattedValue=null}),i.addEventListener("resetform",p=>{var _;let g=(_=this.data.defaultFieldValue)!=null?_:"";i.value=d.userValue=g,d.formattedValue=null});let u=p=>{let{formattedValue:g}=d;g!=null&&(p.target.value=g),p.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){i.addEventListener("focus",g=>{var y;if(d.focused)return;let{target:_}=g;d.userValue&&(_.value=d.userValue),d.lastCommittedValue=_.value,d.commitKey=1,(y=this.data.actions)!=null&&y.Focus||(d.focused=!0)}),i.addEventListener("updatefromsandbox",g=>{this.showElementAndHideCanvas(g.target);let _={value(y){var C;d.userValue=(C=y.detail.value)!=null?C:"",t.setValue(e,{value:d.userValue.toString()}),y.target.value=d.userValue},formattedValue(y){let{formattedValue:C}=y.detail;d.formattedValue=C,C!=null&&y.target!==document.activeElement&&(y.target.value=C),t.setValue(e,{formattedValue:C})},selRange(y){y.target.setSelectionRange(...y.detail.selRange)},charLimit:y=>{var A;let{charLimit:C}=y.detail,{target:x}=y;if(C===0){x.removeAttribute("maxLength");return}x.setAttribute("maxLength",C);let I=d.userValue;!I||I.length<=C||(I=I.slice(0,C),x.value=d.userValue=I,t.setValue(e,{value:I}),(A=this.linkService.eventBus)==null||A.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:I,willCommit:!0,commitKey:1,selStart:x.selectionStart,selEnd:x.selectionEnd}}))}};this._dispatchEventFromSandbox(_,g)}),i.addEventListener("keydown",g=>{var C;d.commitKey=1;let _=-1;if(g.key==="Escape"?_=0:g.key==="Enter"&&!this.data.multiLine?_=2:g.key==="Tab"&&(d.commitKey=3),_===-1)return;let{value:y}=g.target;d.lastCommittedValue!==y&&(d.lastCommittedValue=y,d.userValue=y,(C=this.linkService.eventBus)==null||C.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:y,willCommit:!0,commitKey:_,selStart:g.target.selectionStart,selEnd:g.target.selectionEnd}}))});let p=u;u=null,i.addEventListener("blur",g=>{var y,C;if(!d.focused||!g.relatedTarget)return;(y=this.data.actions)!=null&&y.Blur||(d.focused=!1);let{value:_}=g.target;d.userValue=_,d.lastCommittedValue!==_&&((C=this.linkService.eventBus)==null||C.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:_,willCommit:!0,
14commitKey:d.commitKey,selStart:g.target.selectionStart,selEnd:g.target.selectionEnd}})),p(g)}),(s=this.data.actions)!=null&&s.Keystroke&&i.addEventListener("beforeinput",g=>{var L;d.lastCommittedValue=null;let{data:_,target:y}=g,{value:C,selectionStart:x,selectionEnd:I}=y,A=x,E=I;switch(g.inputType){case"deleteWordBackward":{let v=C.substring(0,x).match(/\w*[^\w]*$/);v&&(A-=v[0].length);break}case"deleteWordForward":{let v=C.substring(x).match(/^[^\w]*\w*/);v&&(E+=v[0].length);break}case"deleteContentBackward":x===I&&(A-=1);break;case"deleteContentForward":x===I&&(E+=1);break}g.preventDefault(),(L=this.linkService.eventBus)==null||L.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:C,change:_||"",willCommit:!1,selStart:A,selEnd:E}})}),this._setEventListeners(i,d,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],g=>g.target.value)}if(u&&i.addEventListener("blur",u),this.data.comb){let g=(this.data.rect[2]-this.data.rect[0])/c;i.classList.add("comb"),i.style.letterSpacing=`calc(${g}px * var(--scale-factor) - 1ch)`}}else i=document.createElement("div"),i.textContent=this.data.fieldValue,i.style.verticalAlign="middle",i.style.display="table-cell",this.data.hasOwnCanvas&&(i.hidden=!0);return this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}},rb=class extends Os{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}},ab=class extends Os{constructor(t){super(t,{isRenderable:t.renderForms})}render(){let t=this.annotationStorage,e=this.data,i=e.id,n=t.getValue(i,{value:e.exportValue===e.fieldValue}).value;typeof n=="string"&&(n=n!=="Off",t.setValue(i,{value:n})),this.container.classList.add("buttonWidgetAnnotation","checkBox");let s=document.createElement("input");return ia.add(s),s.setAttribute("data-element-id",i),s.disabled=e.readOnly,this._setRequired(s,this.data.required),s.type="checkbox",s.name=e.fieldName,n&&s.setAttribute("checked",!0),s.setAttribute("exportValue",e.exportValue),s.tabIndex=kh,s.addEventListener("change",o=>{let{name:l,checked:c}=o.target;for(let h of this._getElementsByName(l,i)){let d=c&&h.exportValue===e.exportValue;h.domElement&&(h.domElement.checked=d),t.setValue(h.id,{value:d})}t.setValue(i,{value:c})}),s.addEventListener("resetform",o=>{let l=e.defaultFieldValue||"Off";o.target.checked=l===e.exportValue}),this.enableScripting&&this.hasJSActions&&(s.addEventListener("updatefromsandbox",o=>{let l={value(c){c.target.checked=c.detail.value!=="Off",t.setValue(i,{value:c.target.checked})}};this._dispatchEventFromSandbox(l,o)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}},yf=class extends Os{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");let t=this.annotationStorage,e=this.data,i=e.id,n=t.getValue(i,{value:e.fieldValue===e.buttonValue}).value;if(typeof n=="string"&&(n=n!==e.buttonValue,t.setValue(i,{value:n})),n)for(let o of this._getElementsByName(e.fieldName,i))t.setValue(o.id,{value:!1});let s=document.createElement("input");if(ia.add(s),s.setAttribute("data-element-id",i),s.disabled=e.readOnly,this._setRequired(s,this.data.required),s.type="radio",s.name=e.fieldName,n&&s.setAttribute("checked",!0),s.tabIndex=kh,s.addEventListener("change",o=>{let{name:l,checked:c}=o.target;for(let h of this._getElementsByName(l,i))t.setValue(h.id,{value:!1});t.setValue(i,{value:c})}),s.addEventListener("resetform",o=>{let l=e.defaultFieldValue;o.target.checked=l!=null&&l===e.buttonValue}),this.enableScripting&&this.hasJSActions){let o=e.buttonValue;s.addEventListener("updatefromsandbox",l=>{let c={value:h=>{let d=o===h.detail.value;for(let u of this._getElementsByName(h.target.name)){let p=d&&u.id===i;u.domElement&&(u.domElement.checked=p),t.setValue(u.id,{value:p})}}};this._dispatchEventFromSandbox(c,l)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],l=>l.target.checked)}
14return this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}},lb=class extends bf{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){let t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");let e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",i=>{this._dispatchEventFromSandbox({},i)})),t}},cb=class extends Os{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");let t=this.annotationStorage,e=this.data.id,i=t.getValue(e,{value:this.data.fieldValue}),n=document.createElement("select");ia.add(n),n.setAttribute("data-element-id",e),n.disabled=this.data.readOnly,this._setRequired(n,this.data.required),n.name=this.data.fieldName,n.tabIndex=kh;let s=this.data.combo&&this.data.options.length>0;this.data.combo||(n.size=this.data.options.length,this.data.multiSelect&&(n.multiple=!0)),n.addEventListener("resetform",d=>{let u=this.data.defaultFieldValue;for(let p of n.options)p.selected=p.value===u});for(let d of this.data.options){let u=document.createElement("option");u.textContent=d.displayValue,u.value=d.exportValue,i.value.includes(d.exportValue)&&(u.setAttribute("selected",!0),s=!1),n.append(u)}let o=null;if(s){let d=document.createElement("option");d.value=" ",d.setAttribute("hidden",!0),d.setAttribute("selected",!0),n.prepend(d),o=()=>{d.remove(),n.removeEventListener("input",o),o=null},n.addEventListener("input",o)}let l=d=>{let u=d?"value":"textContent",{options:p,multiple:g}=n;return g?Array.prototype.filter.call(p,_=>_.selected).map(_=>_[u]):p.selectedIndex===-1?null:p[p.selectedIndex][u]},c=l(!1),h=d=>{let u=d.target.options;return Array.prototype.map.call(u,p=>({displayValue:p.textContent,exportValue:p.value}))};return this.enableScripting&&this.hasJSActions?(n.addEventListener("updatefromsandbox",d=>{let u={value(p){o==null||o();let g=p.detail.value,_=new Set(Array.isArray(g)?g:[g]);for(let y of n.options)y.selected=_.has(y.value);t.setValue(e,{value:l(!0)}),c=l(!1)},multipleSelection(p){n.multiple=!0},remove(p){let g=n.options,_=p.detail.remove;g[_].selected=!1,n.remove(_),g.length>0&&Array.prototype.findIndex.call(g,C=>C.selected)===-1&&(g[0].selected=!0),t.setValue(e,{value:l(!0),items:h(p)}),c=l(!1)},clear(p){for(;n.length!==0;)n.remove(0);t.setValue(e,{value:null,items:[]}),c=l(!1)},insert(p){let{index:g,displayValue:_,exportValue:y}=p.detail.insert,C=n.children[g],x=document.createElement("option");x.textContent=_,x.value=y,C?C.before(x):n.append(x),t.setValue(e,{value:l(!0),items:h(p)}),c=l(!1)},items(p){let{items:g}=p.detail;for(;n.length!==0;)n.remove(0);for(let _ of g){let{displayValue:y,exportValue:C}=_,x=document.createElement("option");x.textContent=y,x.value=C,n.append(x)}n.options.length>0&&(n.options[0].selected=!0),t.setValue(e,{value:l(!0),items:h(p)}),c=l(!1)},indices(p){let g=new Set(p.detail.indices);for(let _ of p.target.options)_.selected=g.has(_.index);t.setValue(e,{value:l(!0)}),c=l(!1)},editable(p){p.target.disabled=!p.detail.editable}};this._dispatchEventFromSandbox(u,d)}),n.addEventListener("input",d=>{var g;let u=l(!0),p=l(!1);t.setValue(e,{value:u}),d.preventDefault(),(g=this.linkService.eventBus)==null||g.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:c,change:p,changeEx:u,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(n,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],d=>d.target.value)):n.addEventListener("input",function(d){t.setValue(e,{value:l(!0)})}),this.data.combo&&this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}},xd=class extends Se{constructor(t){let{data:e,elements:i}=t;super(t,{isRenderable:Se._hasPopupData(e)}),this.elements=i,this.popup=null}render(){this.container.classList.add("popupAnnotation");let t=this.popup=new db({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),e=[];for(let i of this.elements)i.popup=t,i.container.ariaHasPopup="dialog",e.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",e.map(i=>`${ty}${i}`).join(",")),this.container}}
14,Tl,jf,Hf,Il,Or,ge,bs,kl,Jd,th,Ml,ys,pn,vs,eh,xs,ih,Nr,Fr,Qt,Op,hb,hA,uA,pA,fA,Np,Fp,ub,db=class{constructor({container:t,color:e,elements:i,titleObj:n,modificationDate:s,contentsObj:o,richText:l,parent:c,rect:h,parentRect:d,open:u}){b(this,Qt);b(this,Tl,f(this,Qt,pA).bind(this));b(this,jf,f(this,Qt,ub).bind(this));b(this,Hf,f(this,Qt,Fp).bind(this));b(this,Il,f(this,Qt,Np).bind(this));b(this,Or,null);b(this,ge,null);b(this,bs,null);b(this,kl,null);b(this,Jd,null);b(this,th,null);b(this,Ml,null);b(this,ys,!1);b(this,pn,null);b(this,vs,null);b(this,eh,null);b(this,xs,null);b(this,ih,null);b(this,Nr,null);b(this,Fr,!1);var p;m(this,ge,t),m(this,ih,n),m(this,bs,o),m(this,xs,l),m(this,th,c),m(this,Or,e),m(this,eh,h),m(this,Ml,d),m(this,Jd,i),m(this,kl,cd.toDateObject(s)),this.trigger=i.flatMap(g=>g.getElementsToTriggerPopup());for(let g of this.trigger)g.addEventListener("click",a(this,Il)),g.addEventListener("mouseenter",a(this,Hf)),g.addEventListener("mouseleave",a(this,jf)),g.classList.add("popupTriggerArea");for(let g of i)(p=g.container)==null||p.addEventListener("keydown",a(this,Tl));a(this,ge).hidden=!0,u&&f(this,Qt,Np).call(this)}render(){if(a(this,pn))return;let t=m(this,pn,document.createElement("div"));if(t.className="popup",a(this,Or)){let s=t.style.outlineColor=ot.makeHexColor(...a(this,Or));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?t.style.backgroundColor=`color-mix(in srgb, ${s} 30%, white)`:t.style.backgroundColor=ot.makeHexColor(...a(this,Or).map(l=>Math.floor(.7*(255-l)+l)))}let e=document.createElement("span");e.className="header";let i=document.createElement("h1");if(e.append(i),{dir:i.dir,str:i.textContent}=a(this,ih),t.append(e),a(this,kl)){let s=document.createElement("span");s.classList.add("popupDate"),s.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),s.setAttribute("data-l10n-args",JSON.stringify({dateObj:a(this,kl).valueOf()})),e.append(s)}let n=a(this,Qt,Op);if(n)_f.render({xfaHtml:n,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{let s=this._formatContents(a(this,bs));t.append(s)}a(this,ge).append(t)}_formatContents({str:t,dir:e}){let i=document.createElement("p");i.classList.add("popupContent"),i.dir=e;let n=t.split(/(?:\r\n?|\n)/);for(let s=0,o=n.length;s<o;++s){let l=n[s];i.append(document.createTextNode(l)),s<o-1&&i.append(document.createElement("br"))}return i}updateEdited({rect:t,popupContent:e}){var i;a(this,Nr)||m(this,Nr,{contentsObj:a(this,bs),richText:a(this,xs)}),t&&m(this,vs,null),e&&(m(this,xs,f(this,Qt,uA).call(this,e)),m(this,bs,null)),(i=a(this,pn))==null||i.remove(),m(this,pn,null)}resetEdited(){var t;a(this,Nr)&&({contentsObj:Ze(this,bs)._,richText:Ze(this,xs)._}=a(this,Nr),m(this,Nr,null),(t=a(this,pn))==null||t.remove(),m(this,pn,null),m(this,vs,null))}forceHide(){m(this,Fr,this.isVisible),a(this,Fr)&&(a(this,ge).hidden=!0)}maybeShow(){a(this,Fr)&&(a(this,pn)||f(this,Qt,Fp).call(this),m(this,Fr,!1),a(this,ge).hidden=!1)}get isVisible(){return a(this,ge).hidden===!1}};Tl=new WeakMap,jf=new WeakMap,Hf=new WeakMap,Il=new WeakMap,Or=new WeakMap,ge=new WeakMap,bs=new WeakMap,kl=new WeakMap,Jd=new WeakMap,th=new WeakMap,Ml=new WeakMap,ys=new WeakMap,pn=new WeakMap,vs=new WeakMap,eh=new WeakMap,xs=new WeakMap,ih=new WeakMap,Nr=new WeakMap,Fr=new WeakMap,Qt=new WeakSet,Op=function(){let t=a(this,xs),e=a(this,bs);return t!=null&&t.str&&(!(e!=null&&e.str)||e.str===t.str)&&a(this,xs).html||null},hb=function(){var t,e,i;return((i=(e=(t=a(this,Qt,Op))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:i.fontSize)||0},hA=function(){var t,e,i;return((i=(e=(t=a(this,Qt,Op))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:i.color)||null},uA=function(t){let e=[],i={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:e}]}},n={style:{color:a(this,Qt,hA),fontSize:a(this,Qt,hb)?`calc(${a(this,Qt,hb)}px * var(--scale-factor))`:""}};for(let s of t.split(`
15`))e.push({name:"span",value:s,attributes:n});return i},pA=function(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&a(this,ys))&&f(this,Qt,Np).call(this)},fA=function(){if(a(this,vs)!==null)return;let{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:i,pageX:n,pageY:s}}}=a(this,th),o=!!a(this,Ml),l=o?a(this,Ml):a(this,eh);for(let _ of a(this,Jd))if(!l||ot.intersect(_.data.rect,l)!==null){l=_.data.rect,o=!0;break}let c=ot.normalizeRect([l[0],t[3]-l[1]+t[1],l[2],t[3]-l[3]+t[1]]),d=o?l[2]-l[0]+5:0,u=c[0]+d,p=c[1];m(this,vs,[100*(u-n)/e,100*(p-s)/i]);let{style:g}=a(this,ge);g.left=`${a(this,vs)[0]}%`,g.top=`${a(this,vs)[1]}%`},Np=function(){m(this,ys,!a(this,ys)),a(this,ys)?(f(this,Qt,Fp).call(this),a(this,ge).addEventListener("click",a(this,Il)),a(this,ge).addEventListener("keydown",a(this,Tl))):(f(this,Qt,ub).call(this),a(this,ge).removeEventListener("click",a(this,Il)),a(this,ge).removeEventListener("keydown",a(this,Tl)))},Fp=function(){a(this,pn)||this.render(),this.isVisible?a(this,ys)&&a(this,ge).classList.add("focused"):(f(this,Qt,fA).call(this),a(this,ge).hidden=!1,a(this,ge).style.zIndex=parseInt(a(this,ge).style.zIndex)+1e3)},ub=function(){a(this,ge).classList.remove("focused"),!(a(this,ys)||!this.isVisible)&&(a(this,ge).hidden=!0,a(this,ge).style.zIndex=parseInt(a(this,ge).style.zIndex)-1e3)};var vf=class extends Se{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=St.FREETEXT}
15render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){let t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(let e of this.textContent){let i=document.createElement("span");i.textContent=e,t.append(i)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}},nh,pb=class extends Se{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});b(this,nh,null)}render(){this.container.classList.add("lineAnnotation");let e=this.data,{width:i,height:n}=ks(e.rect),s=this.svgFactory.create(i,n,!0),o=m(this,nh,this.svgFactory.createElement("svg:line"));return o.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),o.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),o.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),o.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),o.setAttribute("stroke-width",e.borderStyle.width||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),s.append(o),this.container.append(s),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return a(this,nh)}addHighlightArea(){this.container.classList.add("highlightArea")}};nh=new WeakMap;var sh,fb=class extends Se{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});b(this,sh,null)}render(){this.container.classList.add("squareAnnotation");let e=this.data,{width:i,height:n}=ks(e.rect),s=this.svgFactory.create(i,n,!0),o=e.borderStyle.width,l=m(this,sh,this.svgFactory.createElement("svg:rect"));return l.setAttribute("x",o/2),l.setAttribute("y",o/2),l.setAttribute("width",i-o),l.setAttribute("height",n-o),l.setAttribute("stroke-width",o||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),s.append(l),this.container.append(s),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return a(this,sh)}addHighlightArea(){this.container.classList.add("highlightArea")}};sh=new WeakMap;var oh,mb=class extends Se{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});b(this,oh,null)}render(){this.container.classList.add("circleAnnotation");let e=this.data,{width:i,height:n}=ks(e.rect),s=this.svgFactory.create(i,n,!0),o=e.borderStyle.width,l=m(this,oh,this.svgFactory.createElement("svg:ellipse"));return l.setAttribute("cx",i/2),l.setAttribute("cy",n/2),l.setAttribute("rx",i/2-o/2),l.setAttribute("ry",n/2-o/2),l.setAttribute("stroke-width",o||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),s.append(l),this.container.append(s),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return a(this,oh)}addHighlightArea(){this.container.classList.add("highlightArea")}};oh=new WeakMap;var rh,xf=class extends Se{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});b(this,rh,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);let{data:{rect:e,vertices:i,borderStyle:n,popupRef:s}}=this;if(!i)return this.container;let{width:o,height:l}=ks(e),c=this.svgFactory.create(o,l,!0),h=[];for(let u=0,p=i.length;u<p;u+=2){let g=i[u]-e[0],_=e[3]-i[u+1];h.push(`${g},${_}`)}h=h.join(" ");let d=m(this,rh,this.svgFactory.createElement(this.svgElementName));return d.setAttribute("points",h),d.setAttribute("stroke-width",n.width||1),d.setAttribute("stroke","transparent"),d.setAttribute("fill","transparent"),c.append(d),this.container.append(c),!s&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return a(this,rh)}addHighlightArea(){this.container.classList.add("highlightArea")}};rh=new WeakMap;var gb=class extends xf{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}},_b=class extends Se{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}
15,ah,wd=class extends Se{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});b(this,ah,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?St.HIGHLIGHT:St.INK}render(){this.container.classList.add(this.containerClassName);let{data:{rect:e,inkLists:i,borderStyle:n,popupRef:s}}=this,{width:o,height:l}=ks(e),c=this.svgFactory.create(o,l,!0);for(let h of i){let d=[];for(let p=0,g=h.length;p<g;p+=2){let _=h[p]-e[0],y=e[3]-h[p+1];d.push(`${_},${y}`)}d=d.join(" ");let u=this.svgFactory.createElement(this.svgElementName);a(this,ah).push(u),u.setAttribute("points",d),u.setAttribute("stroke-width",n.width||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),c.append(u)}return!s&&this.hasPopupData&&this._createPopup(),this.container.append(c),this._editOnDoubleClick(),this.container}getElementsToTriggerPopup(){return a(this,ah)}addHighlightArea(){this.container.classList.add("highlightArea")}};ah=new WeakMap;var wf=class extends Se{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=St.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),this.container}},bb=class extends Se{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}},yb=class extends Se{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}},vb=class extends Se{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}},Af=class extends Se{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=St.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}},lh,ch,wb,xb=class extends Se{constructor(e){var n;super(e,{isRenderable:!0});b(this,ch);b(this,lh,null);let{file:i}=this.data;this.filename=i.filename,this.content=i.content,(n=this.linkService.eventBus)==null||n.dispatch("fileattachmentannotation",ft({source:this},i))}render(){this.container.classList.add("fileAttachmentAnnotation");let{container:e,data:i}=this,n;i.hasAppearance||i.fillAlpha===0?n=document.createElement("div"):(n=document.createElement("img"),n.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(i.name)?"paperclip":"pushpin"}.svg`,i.fillAlpha&&i.fillAlpha<1&&(n.style=`filter: opacity(${Math.round(i.fillAlpha*100)}%);`)),n.addEventListener("dblclick",f(this,ch,wb).bind(this)),m(this,lh,n);let{isMac:s}=ei.platform;return e.addEventListener("keydown",o=>{o.key==="Enter"&&(s?o.metaKey:o.ctrlKey)&&f(this,ch,wb).call(this)}),!i.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea"),e.append(n),e}getElementsToTriggerPopup(){return a(this,lh)}addHighlightArea(){this.container.classList.add("highlightArea")}};lh=new WeakMap,ch=new WeakSet,wb=function(){var e;(e=this.downloadManager)==null||e.openOrDownloadData(this.content,this.filename)};var dh,Br,zr,hh,na,mA,Cb,Ab=class{constructor({div:t,accessibilityManager:e,annotationCanvasMap:i,annotationEditorUIManager:n,page:s,viewport:o,structTreeLayer:l}){b(this,na);b(this,dh,null);b(this,Br,null);b(this,zr,new Map);b(this,hh,null);this.div=t,m(this,dh,e),m(this,Br,i),m(this,hh,l||null),this.page=s,this.viewport=o,this.zIndex=0,this._annotationEditorUIManager=n}hasEditableAnnotations(){return a(this,zr).size>0}render(t){return O(this,null,function*(){var o;let{annotations:e}=t,i=this.div;ta(i,this.viewport);let n=new Map,s={data:null,layer:i,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new vd,annotationStorage:t.annotationStorage||new gd,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(let l of e){if(l.noHTML)continue;let c=l.annotationType===Le.POPUP;if(c){let u=n.get(l.id);if(!u)continue;s.elements=u}else{let{width:u,height:p}=ks(l.rect);if(u<=0||p<=0)continue}s.data=l;let h=ib.create(s);if(!h.isRenderable)continue;if(!c&&l.popupRef){let u=n.get(l.popupRef);u?u.push(h):n.set(l.popupRef,[h])}let d=h.render();l.hidden&&(d.style.visibility="hidden"),yield f(this,na,mA).call(this,d,l.id),h._isEditable&&(a(this,zr).set(h.data.id,h),(o=this._annotationEditorUIManager)==null||o.renderAnnotationElement(h))}f(this,na,Cb).call(this)})}update({viewport:t}){let e=this.div;this.viewport=t,ta(e,{rotation:t.rotation}),f(this,na,Cb).call(this),e.hidden=!1}getEditableAnnotations(){return Array.from(a(this,zr).values())}getEditableAnnotation(t){return a(this,zr).get(t)}};dh=new WeakMap,Br=new WeakMap,zr=new WeakMap,hh=new WeakMap,na=new WeakSet,mA=function(t,e){return O(this,null,function*(){var o,l;let i=t.firstChild||t,n=i.id=`${ty}${e}`,s=yield(o=a(this,hh))==null?void 0:o.getAriaAttributes(n);if(s)for(let[c,h]of s)i.setAttribute(c,h);this.div.append(t),(l=a(this,dh))==null||l.moveElementInDOM(this.div,t,i,!1)})},Cb=function(){if(!a(this,Br))return;let t=this.div;for(let[e,i]of a(this,Br)){let n=t.querySelector(`[data-annotation-id="${e}"]`);if(!n)continue;i.className="annotationContent";let{firstChild:s}=n;s?s.nodeName==="CANVAS"?s.replaceWith(i):s.classList.contains("annotationContent")?s.after(i):s.before(i):n.append(i)}a(this,Br).clear()};
15var yp=/\r\n?|\n/g,fn,Ri,uh,Vr,Li,Ie,gA,_A,bA,Bp,Ds,zp,Vp,yA,Sb,vA,ee=class ee extends Yt{constructor(e){super(Pi(ft({},e),{name:"freeTextEditor"}));b(this,Ie);b(this,fn);b(this,Ri,"");b(this,uh,`${this.id}-editor`);b(this,Vr,null);b(this,Li);m(this,fn,e.color||ee._defaultColor||Yt._defaultLineColor),m(this,Li,e.fontSize||ee._defaultFontSize)}static get _keyboardManager(){let e=ee.prototype,i=o=>o.isEmpty(),n=md.TRANSLATE_SMALL,s=md.TRANSLATE_BIG;return Ot(this,"_keyboardManager",new ea([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-n,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-s,0],checker:i}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[n,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[s,0],checker:i}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-n],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-s],checker:i}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,n],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,s],checker:i}]]))}static initialize(e,i){Yt.initialize(e,i);let n=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(n.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,i){switch(e){case gt.FREETEXT_SIZE:ee._defaultFontSize=i;break;case gt.FREETEXT_COLOR:ee._defaultColor=i;break}}updateParams(e,i){switch(e){case gt.FREETEXT_SIZE:f(this,Ie,gA).call(this,i);break;case gt.FREETEXT_COLOR:f(this,Ie,_A).call(this,i);break}}static get defaultPropertiesToUpdate(){return[[gt.FREETEXT_SIZE,ee._defaultFontSize],[gt.FREETEXT_COLOR,ee._defaultColor||Yt._defaultLineColor]]}get propertiesToUpdate(){return[[gt.FREETEXT_SIZE,a(this,Li)],[gt.FREETEXT_COLOR,a(this,fn)]]}_translateEmpty(e,i){this._uiManager.translateSelectedEditors(e,i,!0)}getInitialTranslation(){let e=this.parentScale;return[-ee._internalPadding*e,-(ee._internalPadding+a(this,Li))*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(St.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),m(this,Vr,new AbortController);let e=this._uiManager.combinedSignal(a(this,Vr));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e})}disableEditMode(){var e;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",a(this,uh)),this._isDraggable=!0,(e=a(this,Vr))==null||e.abort(),m(this,Vr,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var e;this.width||(this.enableEditMode(),this.editorDiv.focus(),(e=this._initialOptions)!=null&&e.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();let e=a(this,Ri),i=m(this,Ri,f(this,Ie,bA).call(this).trimEnd());if(e===i)return;let n=s=>{if(m(this,Ri,s),!s){this.remove();return}f(this,Ie,Vp).call(this),this._uiManager.rebuild(this),f(this,Ie,Bp).call(this)};this.addCommands({cmd:()=>{n(i)},undo:()=>{n(e)},mustExec:!1}),f(this,Ie,Bp).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){ee._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}
15render(){if(this.div)return this.div;let e,i;this.width&&(e=this.x,i=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",a(this,uh)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;let{style:n}=this.editorDiv;if(n.fontSize=`calc(${a(this,Li)}px * var(--scale-factor))`,n.color=a(this,fn),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),tf(this,this.div,["dblclick","keydown"]),this.width){let[s,o]=this.parentDimensions;if(this.annotationElementId){let{position:l}=this._initialData,[c,h]=this.getInitialTranslation();[c,h]=this.pageTranslationToScreen(c,h);let[d,u]=this.pageDimensions,[p,g]=this.pageTranslation,_,y;switch(this.rotation){case 0:_=e+(l[0]-p)/d,y=i+this.height-(l[1]-g)/u;break;case 90:_=e+(l[0]-p)/d,y=i-(l[1]-g)/u,[c,h]=[h,-c];break;case 180:_=e-this.width+(l[0]-p)/d,y=i-(l[1]-g)/u,[c,h]=[-c,-h];break;case 270:_=e+(l[0]-p-this.height*u)/d,y=i+(l[1]-g-this.width*d)/u,[c,h]=[-h,c];break}this.setAt(_*s,y*o,c,h)}else this.setAt(e*s,i*o,this.width*s,this.height*o);f(this,Ie,Vp).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(e){var _,y,C;let i=e.clipboardData||window.clipboardData,{types:n}=i;
15if(n.length===1&&n[0]==="text/plain")return;e.preventDefault();let s=f(_=ee,Ds,Sb).call(_,i.getData("text")||"").replaceAll(yp,`
16`);if(!s)return;let o=window.getSelection();if(!o.rangeCount)return;this.editorDiv.normalize(),o.deleteFromDocument();let l=o.getRangeAt(0);if(!s.includes(`
17`)){l.insertNode(document.createTextNode(s)),this.editorDiv.normalize(),o.collapseToStart();return}let{startContainer:c,startOffset:h}=l,d=[],u=[];if(c.nodeType===Node.TEXT_NODE){let x=c.parentElement;if(u.push(c.nodeValue.slice(h).replaceAll(yp,"")),x!==this.editorDiv){let I=d;for(let A of this.editorDiv.childNodes){if(A===x){I=u;continue}I.push(f(y=ee,Ds,zp).call(y,A))}}d.push(c.nodeValue.slice(0,h).replaceAll(yp,""))}else if(c===this.editorDiv){let x=d,I=0;for(let A of this.editorDiv.childNodes)I++===h&&(x=u),x.push(f(C=ee,Ds,zp).call(C,A))}m(this,Ri,`${d.join(`
18`)}${s}${u.join(`
19`)}`),f(this,Ie,Vp).call(this);let p=new Range,g=d.reduce((x,I)=>x+I.length,0);for(let{firstChild:x}of this.editorDiv.childNodes)if(x.nodeType===Node.TEXT_NODE){let I=x.nodeValue.length;if(g<=I){p.setStart(x,g),p.setEnd(x,g);break}g-=I}o.removeAllRanges(),o.addRange(p)}get contentDiv(){return this.editorDiv}static deserialize(e,i,n){return O(this,null,function*(){var l;let s=null;if(e instanceof vf){let{data:{defaultAppearanceData:{fontSize:c,fontColor:h},rect:d,rotation:u,id:p,popupRef:g},textContent:_,textPosition:y,parent:{page:{pageNumber:C}}}=e;if(!_||_.length===0)return null;s=e={annotationType:St.FREETEXT,color:Array.from(h),fontSize:c,value:_.join(`
20`),position:y,pageIndex:C-1,rect:d.slice(0),rotation:u,id:p,deleted:!1,popupRef:g}}let o=yield Ia(ee,this,"deserialize").call(this,e,i,n);return m(o,Li,e.fontSize),m(o,fn,ot.makeHexColor(...e.color)),m(o,Ri,f(l=ee,Ds,Sb).call(l,e.value)),o.annotationElementId=e.id||null,o._initialData=s,o})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let i=ee._internalPadding*this.parentScale,n=this.getRect(i,i),s=Yt._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:a(this,fn)),o={annotationType:St.FREETEXT,color:s,fontSize:a(this,Li),value:f(this,Ie,yA).call(this),pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?o:this.annotationElementId&&!f(this,Ie,vA).call(this,o)?null:(o.id=this.annotationElementId,o)}renderAnnotationElement(e){let i=super.renderAnnotationElement(e);if(this.deleted)return i;let{style:n}=i;n.fontSize=`calc(${a(this,Li)}px * var(--scale-factor))`,n.color=a(this,fn),i.replaceChildren();for(let o of a(this,Ri).split(`
21`)){let l=document.createElement("div");l.append(o?document.createTextNode(o):document.createElement("br")),i.append(l)}let s=ee._internalPadding*this.parentScale;return e.updateEdited({rect:this.getRect(s,s),popupContent:a(this,Ri)}),i}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};fn=new WeakMap,Ri=new WeakMap,uh=new WeakMap,Vr=new WeakMap,Li=new WeakMap,Ie=new WeakSet,gA=function(e){let i=s=>{this.editorDiv.style.fontSize=`calc(${s}px * var(--scale-factor))`,this.translate(0,-(s-a(this,Li))*this.parentScale),m(this,Li,s),f(this,Ie,Bp).call(this)},n=a(this,Li);this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},_A=function(e){let i=s=>{m(this,fn,this.editorDiv.style.color=s)},n=a(this,fn);this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},bA=function(){var n;let e=[];this.editorDiv.normalize();let i=null;for(let s of this.editorDiv.childNodes)(i==null?void 0:i.nodeType)===Node.TEXT_NODE&&s.nodeName==="BR"||(e.push(f(n=ee,Ds,zp).call(n,s)),i=s);return e.join(`
22`)},Bp=function(){let[e,i]=this.parentDimensions,n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{let{currentLayer:s,div:o}=this,l=o.style.display,c=o.classList.contains("hidden");o.classList.remove("hidden"),o.style.display="hidden",s.div.append(this.div),n=o.getBoundingClientRect(),o.remove(),o.style.display=l,o.classList.toggle("hidden",c)}this.rotation%180===this.parentRotation%180?(this.width=n.width/e,this.height=n.height/i):(this.width=n.height/e,this.height=n.width/i),this.fixAndSetPosition()},Ds=new WeakSet,zp=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(yp,"")},Vp=function(){if(this.editorDiv.replaceChildren(),!!a(this,Ri))for(let e of a(this,Ri).split(`
23`)){let i=document.createElement("div");i.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(i)}},yA=function(){return a(this,Ri).replaceAll("\xA0"," ")},Sb=function(e){return e.replaceAll(" ","\xA0")},vA=function(e){let{value:i,fontSize:n,color:s,pageIndex:o}=this._initialData;return this._hasBeenMoved||e.value!==i||e.fontSize!==n||e.color.some((l,c)=>l!==s[c])||e.pageIndex!==o},b(ee,Ds),k(ee,"_freeTextDefaultContent",""),k(ee,"_internalPadding",0),k(ee,"_defaultColor",null),k(ee,"_defaultFontSize",10),k(ee,"_type","freetext"),k(ee,"_editorType",St.FREETEXT);var Eb=ee,Cf=class{toSVGPath(){re("Abstract method `toSVGPath` must be implemented.")}get box(){re("Abstract getter `box` must be implemented.")}serialize(t,e){re("Abstract method `serialize` must be implemented.")}get classNamesForDrawing(){re("Abstract getter `classNamesForDrawing` must be implemented.")}get classNamesForOutlining(){re("Abstract getter `classNamesForOutlining` must be implemented.")}get mustRemoveSelfIntersections(){return!1}},Oi,mn,Dl,Rl,Un,Mt,jr,Hr,ph,fh,Ll,Ol,xo,mh,Uf,Wf,ze,ed,xA,wA,AA,CA,EA,SA,hs=class hs{constructor({x:t,y:e},i,n,s,o,l=0){b(this,ze);b(this,Oi);b(this,mn,[]);b(this,Dl);b(this,Rl);b(this,Un,[]);b(this,Mt,new Float64Array(18));b(this,jr);b(this,Hr);b(this,ph);b(this,fh);b(this,Ll);b(this,Ol);b(this,xo,[]);m(this,Oi,i),m(this,Ol,s*n),m(this,Rl,o),a(this,Mt).set([NaN,NaN,NaN,NaN,t,e],6),m(this,Dl,l),m(this,fh,a(hs,mh)*n),m(this,ph,a(hs,Wf)*n),m(this,Ll,n),a(this,xo).push(t,e)}isEmpty(){return isNaN(a(this,Mt)[8])}add({x:t,y:e}){var T;m(this,jr,t),m(this,Hr,e);let[i,n,s,o]=a(this,Oi),[l,c,h,d]=a(this,Mt).subarray(8,12),u=t-h,p=e-d,g=Math.hypot(u,p);if(g<a(this,ph))return!1;let _=g-a(this,fh),y=_/g,C=y*u,x=y*p,I=l,A=c;l=h,c=d,h+=C,d+=x,(T=a(this,xo))==null||T.push(t,e);let E=-x/_,L=C/_,v=E*a(this,Ol),S=L*a(this,Ol);return a(this,Mt).set(a(this,Mt).subarray(2,8),0),a(this,Mt).set([h+v,d+S],4),a(this,Mt).set(a(this,Mt).subarray(14,18),12),a(this,Mt).set([h-v,d-S],16),isNaN(a(this,Mt)[6])?(a(this,Un).length===0&&(a(this,Mt).set([l+v,c+S],2),a(this,Un).push(NaN,NaN,NaN,NaN,(l+v-i)/s,(c+S-n)/o),a(this,Mt).set([l-v,c-S],14),a(this,mn).push(NaN,NaN,NaN,NaN,(l-v-i)/s,(c-S-n)/o)),a(this,Mt).set([I,A,l,c,h,d],6),!this.isEmpty()):(a(this,Mt).set([I,A,l,c,h,d],6),Math.abs(Math.atan2(A-c,I-l)-Math.atan2(x,C))<Math.PI/2?([l,c,h,d]=a(this,Mt).subarray(2,6),a(this,Un).push(NaN,NaN,NaN,NaN,((l+h)/2-i)/s,((c+d)/2-n)/o),[l,c,I,A]=a(this,Mt).subarray(14,18),a(this,mn).push(NaN,NaN,NaN,NaN,((I+l)/2-i)/s,((A+c)/2-n)/o),!0):([I,A,l,c,h,d]=a(this,Mt).subarray(0,6),a(this,Un).push(((I+5*l)/6-i)/s,((A+5*c)/6-n)/o,((5*l+h)/6-i)/s,((5*c+d)/6-n)/o,((l+h)/2-i)/s,((c+d)/2-n)/o),[h,d,l,c,I,A]=a(this,Mt).subarray(12,18),a(this,mn).push(((I+5*l)/6-i)/s,((A+5*c)/6-n)/o,((5*l+h)/6-i)/s,((5*c+d)/6-n)/o,((l+h)/2-i)/s,((c+d)/2-n)/o),!0))}toSVGPath(){if(this.isEmpty())return"";let t=a(this,Un),e=a(this,mn);if(isNaN(a(this,Mt)[6])&&!this.isEmpty())return f(this,ze,xA).call(this);let i=[];i.push(`M${t[4]} ${t[5]}`);for(let n=6;n<t.length;n+=6)isNaN(t[n])?i.push(`L${t[n+4]} ${t[n+5]}`):i.push(`C${t[n]} ${t[n+1]} ${t[n+2]} ${t[n+3]} ${t[n+4]} ${t[n+5]}`);f(this,ze,AA).call(this,i);for(let n=e.length-6;n>=6;n-=6)isNaN(e[n])?i.push(`L${e[n+4]} ${e[n+5]}`):i.push(`C${e[n]} ${e[n+1]} ${e[n+2]} ${e[n+3]} ${e[n+4]} ${e[n+5]}`);
23return f(this,ze,wA).call(this,i),i.join(" ")}newFreeDrawOutline(t,e,i,n,s,o){return new Sf(t,e,i,n,s,o)}getOutlines(){var u,p;let t=a(this,Un),e=a(this,mn),i=a(this,Mt),[n,s,o,l]=a(this,Oi),c=new Float64Array(((p=(u=a(this,xo))==null?void 0:u.length)!=null?p:0)+2);for(let g=0,_=c.length-2;g<_;g+=2)c[g]=(a(this,xo)[g]-n)/o,c[g+1]=(a(this,xo)[g+1]-s)/l;if(c[c.length-2]=(a(this,jr)-n)/o,c[c.length-1]=(a(this,Hr)-s)/l,isNaN(i[6])&&!this.isEmpty())return f(this,ze,CA).call(this,c);let h=new Float64Array(a(this,Un).length+24+a(this,mn).length),d=t.length;for(let g=0;g<d;g+=2){if(isNaN(t[g])){h[g]=h[g+1]=NaN;continue}h[g]=t[g],h[g+1]=t[g+1]}d=f(this,ze,SA).call(this,h,d);for(let g=e.length-6;g>=6;g-=6)for(let _=0;_<6;_+=2){if(isNaN(e[g+_])){h[d]=h[d+1]=NaN,d+=2;continue}h[d]=e[g+_],h[d+1]=e[g+_+1],d+=2}return f(this,ze,EA).call(this,h,d),this.newFreeDrawOutline(h,c,a(this,Oi),a(this,Ll),a(this,Dl),a(this,Rl))}};Oi=new WeakMap,mn=new WeakMap,Dl=new WeakMap,Rl=new WeakMap,Un=new WeakMap,Mt=new WeakMap,jr=new WeakMap,Hr=new WeakMap,ph=new WeakMap,fh=new WeakMap,Ll=new WeakMap,Ol=new WeakMap,xo=new WeakMap,mh=new WeakMap,Uf=new WeakMap,Wf=new WeakMap,ze=new WeakSet,ed=function(){let t=a(this,Mt).subarray(4,6),e=a(this,Mt).subarray(16,18),[i,n,s,o]=a(this,Oi);return[(a(this,jr)+(t[0]-e[0])/2-i)/s,(a(this,Hr)+(t[1]-e[1])/2-n)/o,(a(this,jr)+(e[0]-t[0])/2-i)/s,(a(this,Hr)+(e[1]-t[1])/2-n)/o]},xA=function(){let[t,e,i,n]=a(this,Oi),[s,o,l,c]=f(this,ze,ed).call(this);return`M${(a(this,Mt)[2]-t)/i} ${(a(this,Mt)[3]-e)/n} L${(a(this,Mt)[4]-t)/i} ${(a(this,Mt)[5]-e)/n} L${s} ${o} L${l} ${c} L${(a(this,Mt)[16]-t)/i} ${(a(this,Mt)[17]-e)/n} L${(a(this,Mt)[14]-t)/i} ${(a(this,Mt)[15]-e)/n} Z`},wA=function(t){let e=a(this,mn);t.push(`L${e[4]} ${e[5]} Z`)},AA=function(t){let[e,i,n,s]=a(this,Oi),o=a(this,Mt).subarray(4,6),l=a(this,Mt).subarray(16,18),[c,h,d,u]=f(this,ze,ed).call(this);t.push(`L${(o[0]-e)/n} ${(o[1]-i)/s} L${c} ${h} L${d} ${u} L${(l[0]-e)/n} ${(l[1]-i)/s}`)},CA=function(t){let e=a(this,Mt),[i,n,s,o]=a(this,Oi),[l,c,h,d]=f(this,ze,ed).call(this),u=new Float64Array(36);return u.set([NaN,NaN,NaN,NaN,(e[2]-i)/s,(e[3]-n)/o,NaN,NaN,NaN,NaN,(e[4]-i)/s,(e[5]-n)/
23o,NaN,NaN,NaN,NaN,l,c,NaN,NaN,NaN,NaN,h,d,NaN,NaN,NaN,NaN,(e[16]-i)/s,(e[17]-n)/o,NaN,NaN,NaN,NaN,(e[14]-i)/s,(e[15]-n)/o],0),this.newFreeDrawOutline(u,t,a(this,Oi),a(this,Ll),a(this,Dl),a(this,Rl))},EA=function(t,e){let i=a(this,mn);return t.set([NaN,NaN,NaN,NaN,i[4],i[5]],e),e+=6},SA=function(t,e){let i=a(this,Mt).subarray(4,6),n=a(this,Mt).subarray(16,18),[s,o,l,c]=a(this,Oi),[h,d,u,p]=f(this,ze,ed).call(this);return t.set([NaN,NaN,NaN,NaN,(i[0]-s)/l,(i[1]-o)/c,NaN,NaN,NaN,NaN,h,d,NaN,NaN,NaN,NaN,u,p,NaN,NaN,NaN,NaN,(n[0]-s)/l,(n[1]-o)/c],e),e+=24},b(hs,mh,8),b(hs,Uf,2),b(hs,Wf,a(hs,mh)+a(hs,Uf));var Ef=hs,Nl,Ur,ws,gh,Ni,_h,Ee,Ci,id,nd,PA,Sf=class extends Cf{constructor(e,i,n,s,o,l){super();b(this,Ci);b(this,Nl);b(this,Ur,null);b(this,ws);b(this,gh);b(this,Ni);b(this,_h);b(this,Ee);m(this,Ee,e),m(this,Ni,i),m(this,Nl,n),m(this,_h,s),m(this,ws,o),m(this,gh,l),f(this,Ci,PA).call(this,l);let{x:c,y:h,width:d,height:u}=a(this,Ur);for(let p=0,g=e.length;p<g;p+=2)e[p]=(e[p]-c)/d,e[p+1]=(e[p+1]-h)/u;for(let p=0,g=i.length;p<g;p+=2)i[p]=(i[p]-c)/d,i[p+1]=(i[p+1]-h)/u}toSVGPath(){let e=[`M${a(this,Ee)[4]} ${a(this,Ee)[5]}`];for(let i=6,n=a(this,Ee).length;i<n;i+=6){if(isNaN(a(this,Ee)[i])){e.push(`L${a(this,Ee)[i+4]} ${a(this,Ee)[i+5]}`);continue}e.push(`C${a(this,Ee)[i]} ${a(this,Ee)[i+1]} ${a(this,Ee)[i+2]} ${a(this,Ee)[i+3]} ${a(this,Ee)[i+4]} ${a(this,Ee)[i+5]}`)}return e.push("Z"),e.join(" ")}serialize([e,i,n,s],o){let l=n-e,c=s-i,h,d;switch(o){case 0:h=f(this,Ci,id).call(this,a(this,Ee),e,s,l,-c),d=f(this,Ci,id).call(this,a(this,Ni),e,s,l,-c);break;case 90:h=f(this,Ci,nd).call(this,a(this,Ee),e,i,l,c),d=f(this,Ci,nd).call(this,a(this,Ni),e,i,l,c);break;case 180:h=f(this,Ci,id).call(this,a(this,Ee),n,i,-l,c),d=f(this,Ci,id).call(this,a(this,Ni),n,i,-l,c);break;case 270:h=f(this,Ci,nd).call(this,a(this,Ee),n,s,-l,-c),d=f(this,Ci,nd).call(this,a(this,Ni),n,s,-l,-c);break}return{outline:Array.from(h),points:[Array.from(d)]}}get box(){return a(this,Ur)}newOutliner(e,i,n,s,o,l=0){return new Ef(e,i,n,s,o,l)}getNewOutline(e,i){let{x:n,y:s,width:o,height:l}=a(this,Ur),[c,h,d,u]=a(this,Nl),p=o*d,g=l*u,_=n*d+c,y=s*u+h,C=this.newOutliner({x:a(this,Ni)[0]*p+_,y:a(this,Ni)[1]*g+y},a(this,Nl),a(this,_h),e,a(this,gh),i!=null?i:a(this,ws));for(let x=2;x<a(this,Ni).length;x+=2)C.add({x:a(this,Ni)[x]*p+_,y:a(this,Ni)[x+1]*g+y});return C.getOutlines()}get mustRemoveSelfIntersections(){return!0}};Nl=new WeakMap,Ur=new WeakMap,ws=new WeakMap,gh=new WeakMap,Ni=new WeakMap,_h=new WeakMap,Ee=new WeakMap,Ci=new WeakSet,id=function(e,i,n,s,o){let l=new Float64Array(e.length);for(let c=0,h=e.length;c<h;c+=2)l[c]=i+e[c]*s,l[c+1]=n+e[c+1]*o;return l},nd=function(e,i,n,s,o){let l=new Float64Array(e.length);for(let c=0,h=e.length;c<h;c+=2)l[c]=i+e[c+1]*s,l[c+1]=n+e[c]*o;return l},PA=function(e){let i=a(this,Ee),n=i[4],s=i[5],o=n,l=s,c=n,h=s,d=n,u=s,p=e?Math.max:Math.min;for(let x=6,I=i.length;x<I;x+=6){if(isNaN(i[x]))o=Math.min(o,i[x+4]),l=Math.min(l,i[x+5]),c=Math.max(c,i[x+4]),h=Math.max(h,i[x+5]),u<i[x+5]?(d=i[x+4],u=i[x+5]):u===i[x+5]&&(d=p(d,i[x+4]));else{let A=ot.bezierBoundingBox(n,s,...i.slice(x,x+6));o=Math.min(o,A[0]),l=Math.min(l,A[1]),c=Math.max(c,A[2]),h=Math.max(h,A[3]),u<A[3]?(d=A[2],u=A[3]):u===A[3]&&(d=p(d,A[2]))}n=i[x+4],s=i[x+5]}let g=o-a(this,ws),_=l-a(this,ws),y=c-o+2*a(this,ws),C=h-l+2*a(this,ws);m(this,Ur,{x:g,y:_,width:y,height:C,lastPoint:[d,u]})};var bh,wo,gn,gi,TA,jp,IA,kA,Pb,Pf=class{constructor(t,e=0,i=0,n=!0){b(this,gi);b(this,bh);b(this,wo,[]);b(this,gn,[]);let s=1/0,o=-1/0,l=1/0,c=-1/0,d=10**-4;for(let{x,y:I,width:A,height:E}of t){let L=Math.floor((x-e)/d)*d,v=Math.ceil((x+A+e)/d)*d,S=Math.floor((I-e)/d)*d,M=Math.ceil((I+E+e)/d)*d,T=[L,S,M,!0],N=[v,S,M,!1];a(this,wo).push(T,N),s=Math.min(s,L),o=Math.max(o,v),l=Math.min(l,S),c=Math.max(c,M)}let u=o-s+2*i,p=c-l+2*i,g=s-i,_=l-i,y=a(this,wo).at(n?-1:-2),C=[y[0],y[2]];for(let x of a(this,wo)){let[I,A,E]=x;x[0]=(I-g)/u,x[1]=(A-_)/p,x[2]=(E-_)/p}m(this,bh,{x:g,y:_,width:u,height:p,lastPoint:C})}getOutlines(){a(this,wo).sort((e,i)=>e[0]-i[0]||e[1]-i[1]||e[2]-i[2]);let t=[];for(let e of a(this,wo))e[3]?(t.push(...f(this,gi,Pb).call(this,e)),f(this,gi,IA).call(this,e)):(f(this,gi,kA).call(this,e),t.push(...f(this,gi,Pb).call(this,e)));return f(this,gi,TA).call(this,t)}};bh=new WeakMap,wo=new WeakMap,gn=new WeakMap,gi=new WeakSet,TA=function(t){let e=[],i=new Set;for(let o of t){let[l,c,h]=o;e.push([l,c,o],[l,h,o])}e.sort((o,l)=>o[1]-l[1]||o[0]-l[0]);for(let o=0,l=e.length;o<l;o+=2){let c=e[o][2],h=e[o+1][2];c.push(h),h.push(c),i.add(c),i.add(h)}let n=[],s;for(;i.size>0;){let o=i.values().next().value,[l,c,h,d,u]=o;i.delete(o);let p=l,g=c;for(s=[l,h],n.push(s);;){let _;if(i.has(d))_=d;else if(i.has(u))_=u;else break;i.delete(_),[l,c,h,d,u]=_,p!==l&&(s.push(p,g,l,g===c?c:h),p=l),g=g===c?h:c}s.push(p,g)}return new Tb(n,a(this,bh))},jp=function(t){let e=a(this,gn),i=0,n=e.length-1;for(;i<=n;){let s=i+n>>1,o=e[s][0];if(o===t)return s;o<t?i=s+1:n=s-1}return n+1},IA=function([,t,e]){let i=f(this,gi,jp).call(this,t);a(this,gn).splice(i,0,[t,e])},kA=function([,t,e]){let i=f(this,gi,jp).call(this,t);for(let n=i;n<a(this,gn).length;n++){let[s,o]=a(this,gn)[n];if(s!==t)break;
23if(s===t&&o===e){a(this,gn).splice(n,1);return}}for(let n=i-1;n>=0;n--){let[s,o]=a(this,gn)[n];if(s!==t)break;if(s===t&&o===e){a(this,gn).splice(n,1);return}}},Pb=function(t){let[e,i,n]=t,s=[[e,i,n]],o=f(this,gi,jp).call(this,n);for(let l=0;l<o;l++){let[c,h]=a(this,gn)[l];for(let d=0,u=s.length;d<u;d++){let[,p,g]=s[d];if(!(h<=p||g<=c)){if(p>=c){if(g>h)s[d][1]=h;else{if(u===1)return[];s.splice(d,1),d--,u--}continue}s[d][2]=c,g>h&&s.push([e,h,g])}}}return s};var yh,Fl,Tb=class extends Cf{constructor(e,i){super();b(this,yh);b(this,Fl);m(this,Fl,e),m(this,yh,i)}toSVGPath(){let e=[];for(let i of a(this,Fl)){let[n,s]=i;e.push(`M${n} ${s}`);for(let o=2;o<i.length;o+=2){let l=i[o],c=i[o+1];l===n?(e.push(`V${c}`),s=c):c===s&&(e.push(`H${l}`),n=l)}e.push("Z")}return e.join(" ")}serialize([e,i,n,s],o){let l=[],c=n-e,h=s-i;for(let d of a(this,Fl)){let u=new Array(d.length);for(let p=0;p<d.length;p+=2)u[p]=e+d[p]*c,u[p+1]=s-d[p+1]*h;l.push(u)}return l}get box(){return a(this,yh)}get classNamesForDrawing(){return["highlight"]}get classNamesForOutlining(){return["highlightOutline"]}};yh=new WeakMap,Fl=new WeakMap;var Ad=class extends Ef{newFreeDrawOutline(t,e,i,n,s,o){return new Ib(t,e,i,n,s,o)}get classNamesForDrawing(){return["highlight","free"]}},Ib=class extends Sf{get classNamesForDrawing(){return["highlight","free"]}get classNamesForOutlining(){return["highlightOutline","free"]}newOutliner(t,e,i,n,s,o=0){return new Ad(t,e,i,n,s,o)}},_n,Wr,Bl,Ne,vh,zl,xh,wh,Ao,bn,Vl,Ah,Zt,kb,Mb,Db,sr,MA,ao,vi=class vi{constructor({editor:t=null,uiManager:e=null}){b(this,Zt);b(this,_n,null);b(this,Wr,null);b(this,Bl);b(this,Ne,null);b(this,vh,!1);b(this,zl,!1);b(this,xh,null);b(this,wh);b(this,Ao,null);b(this,bn,null);b(this,Vl);var i;t?(m(this,zl,!1),m(this,Vl,gt.HIGHLIGHT_COLOR),m(this,xh,t)):(m(this,zl,!0),m(this,Vl,gt.HIGHLIGHT_DEFAULT_COLOR)),m(this,bn,(t==null?void 0:t._uiManager)||e),m(this,wh,a(this,bn)._eventBus),m(this,Bl,(t==null?void 0:t.color)||((i=a(this,bn))==null?void 0:i.highlightColors.values().next().value)||"#FFFF98"),a(vi,Ah)||m(vi,Ah,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return Ot(this,"_keyboardManager",new ea([[["Escape","mac+Escape"],vi.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],vi.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],vi.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],vi.prototype._moveToPrevious],[["Home","mac+Home"],vi.prototype._moveToBeginning],[["End","mac+End"],vi.prototype._moveToEnd]]))}renderButton(){let t=m(this,_n,document.createElement("button"));t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.setAttribute("aria-haspopup",!0);let e=a(this,bn)._signal;t.addEventListener("click",f(this,Zt,sr).bind(this),{signal:e}),t.addEventListener("keydown",f(this,Zt,Db).bind(this),{signal:e});let i=m(this,Wr,document.createElement("span"));return i.className="swatch",i.setAttribute("aria-hidden",!0),i.style.backgroundColor=a(this,Bl),t.append(i),t}renderMainDropdown(){let t=m(this,Ne,f(this,Zt,kb).call(this));return t.setAttribute("aria-orientation","horizontal"),t.setAttribute("aria-labelledby","highlightColorPickerLabel"),t}_colorSelectFromKeyboard(t){if(t.target===a(this,_n)){f(this,Zt,sr).call(this,t);return}let e=t.target.getAttribute("data-color");e&&f(this,Zt,Mb).call(this,e,t)}_moveToNext(t){var e,i;if(!a(this,Zt,ao)){f(this,Zt,sr).call(this,t);return}if(t.target===a(this,_n)){(e=a(this,Ne).firstChild)==null||e.focus();return}(i=t.target.nextSibling)==null||i.focus()}_moveToPrevious(t){var e,i;if(t.target===((e=a(this,Ne))==null?void 0:e.firstChild)||t.target===a(this,_n)){a(this,Zt,ao)&&this._hideDropdownFromKeyboard();return}a(this,Zt,ao)||f(this,Zt,sr).call(this,t),(i=t.target.previousSibling)==null||i.focus()}_moveToBeginning(t){var e;if(!a(this,Zt,ao)){f(this,Zt,sr).call(this,t);return}(e=a(this,Ne).firstChild)==null||e.focus()}_moveToEnd(t){var e;if(!a(this,Zt,ao)){f(this,Zt,sr).call(this,t);return}(e=a(this,Ne).lastChild)==null||e.focus()}hideDropdown(){var t,e;(t=a(this,Ne))==null||t.classList.add("hidden"),(e=a(this,Ao))==null||e.abort(),m(this,Ao,null)}_hideDropdownFromKeyboard(){var t;if(!a(this,zl)){if(!a(this,Zt,ao)){(t=a(this,xh))==null||t.unselect();return}this.hideDropdown(),a(this,_n).focus({preventScroll:!0,focusVisible:a(this,vh)})}}updateColor(t){if(a(this,Wr)&&(a(this,Wr).style.backgroundColor=t),!a(this,Ne))return;let e=a(this,bn).highlightColors.values();for(let i of a(this,Ne).children)i.setAttribute("aria-selected",e.next().value===t)}destroy(){var t,e;(t=a(this,_n))==null||t.remove(),m(this,_n,null),m(this,Wr,null),(e=a(this,Ne))==null||e.remove(),m(this,Ne,null)}};_n=new WeakMap,Wr=new WeakMap,Bl=new WeakMap,Ne=new WeakMap,vh=new WeakMap,zl=new WeakMap,xh=new WeakMap,wh=new WeakMap,Ao=new WeakMap,bn=new WeakMap,Vl=new WeakMap,Ah=new WeakMap,Zt=new WeakSet,kb=function(){let t=document.createElement("div"),e=a(this,bn)._signal;t.addEventListener("contextmenu",on,{signal:e}),t.className="dropdown",t.role="listbox",t.setAttribute("aria-multiselectable",!1),t.setAttribute("aria-orientation","vertical"),t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown");for(let[i,n]of a(this,bn).highlightColors){let s=document.createElement("button");s.tabIndex="0",s.role="option",s.setAttribute("data-color",n),s.title=i,s.setAttribute("data-l10n-id",a(vi,Ah)[i]);let o=document.createElement("span");s.append(o),o.className="swatch",o.style.backgroundColor=n,s.setAttribute("aria-selected",n===a(this,Bl)),s.addEventListener("click",f(this,Zt,Mb).bind(this,n),{signal:e}),t.append(s)}return t.addEventListener("keydown",f(this,Zt,Db).bind(this),{signal:e}),t},Mb=function(t,e){e.stopPropagation(),a(this,wh).dispatch("switchannotationeditorparams",{source:this,type:a(this,Vl),value:t})},Db=function(t){vi._keyboardManager.exec(this,t)},sr=function(t){if(a(this,Zt,ao)){this.hideDropdown();return}if(m(this,vh,t.detail===0),a(this,Ao)||(m(this,Ao,new AbortController),window.addEventListener("pointerdown",f(this,Zt,MA).bind(this),{signal:a(this,bn).combinedSignal(a(this,Ao))})),a(this,Ne)){a(this,Ne).classList.remove("hidden");return}let e=m(this,Ne,f(this,Zt,kb).call(this));a(this,_n).append(e)},MA=function(t){var e;(e=a(this,Ne))!=null&&e.contains(t.target)||this.hideDropdown()},ao=function(){return a(this,Ne)&&!a(this,Ne).classList.contains("hidden")},b(vi,Ah,null);var Tf=vi,jl,Ch,As,Gr,Hl,Qi,Eh,Sh,$r,yn,ci,wi,Ul,Cs,Fe,Wl,Ji,Ph,xt,Rb,Hp,DA,RA,LA,Lb,or,nn,el,OA,Up,sd,NA,FA,BA,zA,VA,Bt=class Bt extends Yt{constructor(e){super(Pi(ft({},e),{name:"highlightEditor"}));b(this,xt);b(this,jl,null);b(this,Ch,0);b(this,As);b(this,Gr,null);b(this,Hl,null);b(this,Qi,null);b(this,Eh,null);b(this,Sh,0);b(this,$r,null);b(this,yn,null);b(this,ci,null);b(this,wi,!1);b(this,Ul,null);b(this,Cs);b(this,Fe,null);b(this,Wl,"");b(this,Ji);b(this,Ph,"");this.color=e.color||Bt._defaultColor,m(this,Ji,e.thickness||Bt._defaultThickness),m(this,Cs,e.opacity||Bt._defaultOpacity),m(this,As,e.boxes||null),m(this,Ph,e.methodOfCreation||""),m(this,Wl,e.text||""),this._isDraggable=!1,e.highlightId>-1?(m(this,wi,!0),f(this,xt,Hp).call(this,e),f(this,xt,or).call(this)):a(this,As)&&(m(this,jl,e.anchorNode),m(this,Ch,e.anchorOffset),m(this,Eh,e.focusNode),m(this,Sh,e.focusOffset),f(this,xt,Rb).call(this),f(this,xt,or).call(this),this.rotate(this.rotation))}static get _keyboardManager(){let e=Bt.prototype;return Ot(this,"_keyboardManager",new ea([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:a(this,wi)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:a(this,Ji),methodOfCreation:a(this,Ph)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("
23color").size}}static initialize(e,i){var n;Yt.initialize(e,i),Bt._defaultColor||(Bt._defaultColor=((n=i.highlightColors)==null?void 0:n.values().next().value)||"#fff066")}static updateDefaultParams(e,i){switch(e){case gt.HIGHLIGHT_DEFAULT_COLOR:Bt._defaultColor=i;break;case gt.HIGHLIGHT_THICKNESS:Bt._defaultThickness=i;break}}translateInPage(e,i){}get toolbarPosition(){return a(this,Ul)}updateParams(e,i){switch(e){case gt.HIGHLIGHT_COLOR:f(this,xt,DA).call(this,i);break;case gt.HIGHLIGHT_THICKNESS:f(this,xt,RA).call(this,i);break}}static get defaultPropertiesToUpdate(){return[[gt.HIGHLIGHT_DEFAULT_COLOR,Bt._defaultColor],[gt.HIGHLIGHT_THICKNESS,Bt._defaultThickness]]}get propertiesToUpdate(){return[[gt.HIGHLIGHT_COLOR,this.color||Bt._defaultColor],[gt.HIGHLIGHT_THICKNESS,a(this,Ji)||Bt._defaultThickness],[gt.HIGHLIGHT_FREE,a(this,wi)]]}addEditToolbar(){return O(this,null,function*(){let e=yield Ia(Bt.prototype,this,"addEditToolbar").call(this);return e?(this._uiManager.highlightColors&&(m(this,Hl,new Tf({editor:this})),e.addColorPicker(a(this,Hl))),e):null})}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(f(this,xt,sd).call(this))}getBaseTranslation(){return[0,0]}getRect(e,i){return super.getRect(e,i,f(this,xt,sd).call(this))}onceAdded(){this.annotationElementId||this.parent.addUndoableEditor(this),this.div.focus()}remove(){f(this,xt,Lb).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(f(this,xt,or).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var n;let i=!1;this.parent&&!e?f(this,xt,Lb).call(this):e&&(f(this,xt,or).call(this,e),i=!this.parent&&((n=this.div)==null?void 0:n.classList.contains("selectedEditor"))),super.setParent(e),this.show(this._isVisible),i&&this.select()}rotate(e){var s,o,l;let{drawLayer:i}=this.parent,n;a(this,wi)?(e=(e-this.rotation+360)%360,n=f(s=Bt,nn,el).call(s,a(this,yn).box,e)):n=f(o=Bt,nn,el).call(o,this,e),i.rotate(a(this,ci),e),i.rotate(a(this,Fe),e),i.updateBox(a(this,ci),n),i.updateBox(a(this,Fe),f(l=Bt,nn,el).call(l,a(this,Qi).box,e))}render(){if(this.div)return this.div;let e=super.render();a(this,Wl)&&(e.setAttribute("aria-label",a(this,Wl)),e.setAttribute("role","mark")),a(this,wi)?e.classList.add("free"):this.div.addEventListener("keydown",f(this,xt,OA).bind(this),{signal:this._uiManager._signal});let i=m(this,$r,document.createElement("div"));e.append(i),i.setAttribute("aria-hidden","true"),i.className="internal",i.style.clipPath=a(this,Gr);let[n,s]=this.parentDimensions;return this.setDims(this.width*n,this.height*s),tf(this,a(this,$r),["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.isSelected||this.parent.drawLayer.addClass(a(this,Fe),"hovered")}pointerleave(){this.isSelected||this.parent.drawLayer.removeClass(a(this,Fe),"hovered")}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:f(this,xt,Up).call(this,!0);break;case 1:case 3:f(this,xt,Up).call(this,!1);break}}select(){var e,i;super.select(),a(this,Fe)&&((e=this.parent)==null||e.drawLayer.removeClass(a(this,Fe),"hovered"),(i=this.parent)==null||i.drawLayer.addClass(a(this,Fe),"selected"))}unselect(){var e;super.unselect(),a(this,Fe)&&((e=this.parent)==null||e.drawLayer.removeClass(a(this,Fe),"selected"),a(this,wi)||f(this,xt,Up).call(this,!1))}get _mustFixPosition(){return!a(this,wi)}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.show(a(this,ci),e),this.parent.drawLayer.show(a(this,Fe),e))}static startHighlighting(e,i,{target:n,x:s,y:o}){let{x:l,y:c,width:h,height:d}=n.getBoundingClientRect(),u=new AbortController,p=e.combinedSignal(u),g=y=>{y.preventDefault(),y.stopPropagation()},_=y=>{u.abort(),f(this,nn,zA).call(this,e,y)};window.addEventListener("blur",_,{signal:p}),window.addEventListener("pointerup",_,{signal:p}),window.addEventListener("pointerdown",g,{capture:!0,passive:!1,signal:p}),window.addEventListener("contextmenu",on,{signal:p}),n.addEventListener("pointermove",f(this,nn,BA).bind(this,e),{signal:p}),this._freeHighlight=new Ad({x:s,y:o},[l,c,h,d],e.scale,this._defaultThickness/2,i,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0)}static deserialize(e,i,n){return O(this,null,function*(){var y,C,x,I;let s=null;if(e instanceof wf){let{data:{quadPoints:A,rect:E,rotation:L,id:v,color:S,opacity:M,popupRef:T},parent:{page:{pageNumber:N}}}=e;s=e={annotationType:St.HIGHLIGHT,color:Array.from(S),opacity:M,quadPoints:A,boxes:null,pageIndex:N-1,rect:E.slice(0),rotation:L,id:v,deleted:!1,popupRef:T}}else if(e instanceof wd){let{data:{inkLists:A,rect:E,rotation:L,id:v,color:S,borderStyle:{rawWidth:M},popupRef:T},parent:{page:{pageNumber:N}}}=e;s=e={annotationType:St.HIGHLIGHT,color:Array.from(S),thickness:M,inkLists:A,boxes:null,pageIndex:N-1,rect:E.slice(0),rotation:L,id:v,deleted:!1,popupRef:T}}let{color:o,quadPoints:l,inkLists:c,opacity:h}=e,d=yield Ia(Bt,this,"deserialize").call(this,e,i,n);d.color=ot.makeHexColor(...o),m(d,Cs,h||1),c&&m(d,Ji,e.thickness),d.annotationElementId=e.id||null,d._initialData=s;let[u,p]=d.pageDimensions,[g,_]=d.pageTranslation;if(l){let A=m(d,As,[]);for(let E=0;E<l.length;E+=8)A.push({x:(l[E]-g)/u,y:1-(l[E+1]-_)/p,width:(l[E+2]-l[E])/u,height:(l[E+1]-l[E+5])/p});f(y=d,xt,Rb).call(y),f(C=d,xt,or).call(C),d.rotate(d.rotation)}else if(c){m(d,wi,!0);let A=c[0],E={x:A[0]-g,y:p-(A[1]-_)},L=new Ad(E,[0,0,u,p],1,a(d,Ji)/2,!0,.001);for(let M=0,T=A.length;M<T;M+=2)E.x=A[M]-g,E.y=p-(A[M+1]-_),L.add(E);let{id:v,clipPathId:S}=i.drawLayer.draw(L,d.color,d._defaultOpacity,!0);f(x=d,xt,Hp).call(x,{highlightOutlines:L.getOutlines(),highlightId:v,clipPathId:S}),f(I=d,xt,or).call(I)}return d})}serialize(e=!1){if(this.isEmpty()||e)return null;if(this.deleted)return this.serializeDeleted();let i=this.getRect(0,0),n=Yt._colorManager.convert(this.color),s={annotationType:St.HIGHLIGHT,color:n,opacity:a(this,Cs),thickness:a(this,Ji),quadPoints:f(this,xt,NA).call(this),outlines:f(this,xt,FA).call(this,i),pageIndex:this.pageIndex,rect:i,rotation:f(this,xt,sd).call(this),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!f(this,xt,VA).call(this,s)?null:(s.id=this.annotationElementId,s)}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}};
23jl=new WeakMap,Ch=new WeakMap,As=new WeakMap,Gr=new WeakMap,Hl=new WeakMap,Qi=new WeakMap,Eh=new WeakMap,Sh=new WeakMap,$r=new WeakMap,yn=new WeakMap,ci=new WeakMap,wi=new WeakMap,Ul=new WeakMap,Cs=new WeakMap,Fe=new WeakMap,Wl=new WeakMap,Ji=new WeakMap,Ph=new WeakMap,xt=new WeakSet,Rb=function(){let e=new Pf(a(this,As),.001);m(this,yn,e.getOutlines()),{x:this.x,y:this.y,width:this.width,height:this.height}=a(this,yn).box;let i=new Pf(a(this,As),.0025,.001,this._uiManager.direction==="ltr");m(this,Qi,i.getOutlines());let{lastPoint:n}=a(this,Qi).box;m(this,Ul,[(n[0]-this.x)/this.width,(n[1]-this.y)/this.height])},Hp=function({highlightOutlines:e,highlightId:i,clipPathId:n}){var u,p;if(m(this,yn,e),m(this,Qi,e.getNewOutline(a(this,Ji)/2+1.5,.0025)),i>=0)m(this,ci,i),m(this,Gr,n),this.parent.drawLayer.finalizeLine(i,e),m(this,Fe,this.parent.drawLayer.drawOutline(a(this,Qi)));else if(this.parent){let g=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(a(this,ci),e),this.parent.drawLayer.updateBox(a(this,ci),f(u=Bt,nn,el).call(u,a(this,yn).box,(g-this.rotation+360)%360)),this.parent.drawLayer.updateLine(a(this,Fe),a(this,Qi)),this.parent.drawLayer.updateBox(a(this,Fe),f(p=Bt,nn,el).call(p,a(this,Qi).box,g))}let{x:o,y:l,width:c,height:h}=e.box;switch(this.rotation){case 0:this.x=o,this.y=l,this.width=c,this.height=h;break;case 90:{let[g,_]=this.parentDimensions;this.x=l,this.y=1-o,this.width=c*_/g,this.height=h*g/_;break}case 180:this.x=1-o,this.y=1-l,this.width=c,this.height=h;break;case 270:{let[g,_]=this.parentDimensions;this.x=1-l,this.y=o,this.width=c*_/g,this.height=h*g/_;break}}let{lastPoint:d}=a(this,Qi).box;m(this,Ul,[(d[0]-o)/c,(d[1]-l)/h])},DA=function(e){let i=(o,l)=>{var c,h,d;this.color=o,(c=this.parent)==null||c.drawLayer.changeColor(a(this,ci),o),(h=a(this,Hl))==null||h.updateColor(o),m(this,Cs,l),(d=this.parent)==null||d.drawLayer.changeOpacity(a(this,ci),l)},n=this.color,s=a(this,Cs);this.addCommands({cmd:i.bind(this,e,Bt._defaultOpacity),undo:i.bind(this,n,s),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)},RA=function(e){let i=a(this,Ji),n=s=>{m(this,Ji,s),f(this,xt,LA).call(this,s)};this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)},LA=function(e){if(!a(this,wi))return;f(this,xt,Hp).call(this,{highlightOutlines:a(this,yn).getNewOutline(e/2)}),this.fixAndSetPosition();let[i,n]=this.parentDimensions;this.setDims(this.width*i,this.height*n)},Lb=function(){a(this,ci)===null||!this.parent||(this.parent.drawLayer.remove(a(this,ci)),m(this,ci,null),this.parent.drawLayer.remove(a(this,Fe)),m(this,Fe,null))},or=function(e=this.parent){a(this,ci)===null&&({id:Ze(this,ci)._,clipPathId:Ze(this,Gr)._}=e.drawLayer.draw(a(this,yn),this.color,a(this,Cs)),m(this,Fe,e.drawLayer.drawOutline(a(this,Qi))),a(this,$r)&&(a(this,$r).style.clipPath=a(this,Gr)))},nn=new WeakSet,el=function({x:e,y:i,width:n,height:s},o){switch(o){case 90:return{x:1-i-s,y:e,width:s,height:n};case 180:return{x:1-e-n,y:1-i-s,width:n,height:s};case 270:return{x:i,y:1-e-n,width:s,height:n}}return{x:e,y:i,width:n,height:s}},OA=function(e){Bt._keyboardManager.exec(this,e)},Up=function(e){if(!a(this,jl))return;let i=window.getSelection();e?i.setPosition(a(this,jl),a(this,Ch)):i.setPosition(a(this,Eh),a(this,Sh))},sd=function(){return a(this,wi)?this.rotation:0},NA=function(){if(a(this,wi))return null;let[e,i]=this.pageDimensions,[n,s]=this.pageTranslation,o=a(this,As),l=new Float32Array(o.length*8),c=0;for(let{x:h,y:d,width:u,height:p}of o){let g=h*e+n,_=(1-d-p)*i+s;l[c]=l[c+4]=g,l[c+1]=l[c+3]=_,l[c+2]=l[c+6]=g+u*e,l[c+5]=l[c+7]=_+p*i,c+=8}return l},FA=function(e){return a(this,yn).serialize(e,f(this,xt,sd).call(this))},BA=function(e,i){this._freeHighlight.add(i)&&e.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)},zA=function(e,i){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(i,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}
23,VA=function(e){let{color:i}=this._initialData;return e.color.some((n,s)=>n!==i[s])},b(Bt,nn),k(Bt,"_defaultColor",null),k(Bt,"_defaultOpacity",1),k(Bt,"_defaultThickness",12),k(Bt,"_type","highlight"),k(Bt,"_editorType",St.HIGHLIGHT),k(Bt,"_freeHighlightId",-1),k(Bt,"_freeHighlight",null),k(Bt,"_freeHighlightClipId","");var If=Bt,Yr,Xr,Wn,Es,tn,Kr,qr,Zr,Ss,Gl,Qr,Jr,Co,Y,jA,HA,UA,WA,Nb,GA,Fb,$A,YA,XA,KA,qA,rr,Bb,zb,Vb,Wp,Gp,il,jb,$p,Fs,ZA,Hb,QA,JA,Ub,Yp,od,ce=class ce extends Yt{constructor(e){super(Pi(ft({},e),{name:"inkEditor"}));b(this,Y);b(this,Yr,0);b(this,Xr,0);b(this,Wn,null);b(this,Es,new Path2D);b(this,tn,!1);b(this,Kr,null);b(this,qr,!1);b(this,Zr,!1);b(this,Ss,null);b(this,Gl,null);b(this,Qr,0);b(this,Jr,0);b(this,Co,null);this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e,i){Yt.initialize(e,i)}static updateDefaultParams(e,i){switch(e){case gt.INK_THICKNESS:ce._defaultThickness=i;break;case gt.INK_COLOR:ce._defaultColor=i;break;case gt.INK_OPACITY:ce._defaultOpacity=i/100;break}}updateParams(e,i){switch(e){case gt.INK_THICKNESS:f(this,Y,jA).call(this,i);break;case gt.INK_COLOR:f(this,Y,HA).call(this,i);break;case gt.INK_OPACITY:f(this,Y,UA).call(this,i);break}}static get defaultPropertiesToUpdate(){return[[gt.INK_THICKNESS,ce._defaultThickness],[gt.INK_COLOR,ce._defaultColor||Yt._defaultLineColor],[gt.INK_OPACITY,Math.round(ce._defaultOpacity*100)]]}get propertiesToUpdate(){var e;return[[gt.INK_THICKNESS,this.thickness||ce._defaultThickness],[gt.INK_COLOR,this.color||ce._defaultColor||Yt._defaultLineColor],[gt.INK_OPACITY,Math.round(100*((e=this.opacity)!=null?e:ce._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(f(this,Y,Wp).call(this),f(this,Y,Gp).call(this)),this.isAttachedToDOM||(this.parent.add(this),f(this,Y,il).call(this)),f(this,Y,od).call(this)))}remove(){var e;this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,a(this,Wn)&&(clearTimeout(a(this,Wn)),m(this,Wn,null)),(e=a(this,Ss))==null||e.disconnect(),m(this,Ss,null),super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&e===null&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){let[e,i]=this.parentDimensions,n=this.width*e,s=this.height*i;this.setDimensions(n,s)}enableEditMode(){a(this,tn)||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,f(this,Y,Bb).call(this))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),f(this,Y,zb).call(this))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){a(this,tn)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),m(this,tn,!0),this.div.classList.add("disabled"),f(this,Y,od).call(this,!0),this.select(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){e.button!==0||!this.isInEditMode()||a(this,tn)||(this.setInForeground(),e.preventDefault(),this.div.contains(document.activeElement)||this.div.focus({preventScroll:!0}),f(this,Y,GA).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),f(this,Y,Fb).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),f(this,Y,Vb).call(this,e)}canvasPointerleave(e){f(this,Y,Vb).call(this,e)}get isResizable(){return!this.isEmpty()&&a(this,tn)}render(){if(this.div)return this.div;let e,i;this.width&&(e=this.x,i=this.y),super.render(),this.div.setAttribute("data-l10n-id","pdfjs-ink");let[n,s,o,l]=f(this,Y,WA).call(this);if(this.setAt(n,s,0,0),this.setDims(o,l),f(this,Y,Wp).call(this),this.width){let[c,h]=this.parentDimensions;this.setAspectRatio(this.width*c,this.height*h),this.setAt(e*c,i*h,this.width*c,this.height*h),m(this,Zr,!0),f(this,Y,il).call(this),this.setDims(this.width*c,this.height*h),f(this,Y,rr).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return f(this,Y,Gp).call(this),this.div}setDimensions(e,i){let n=Math.round(e),s=Math.round(i);if(a(this,Qr)===n&&a(this,Jr)===s)return;m(this,Qr,n),m(this,Jr,s),this.canvas.style.visibility="hidden";let[o,l]=this.parentDimensions;this.width=e/o,this.height=i/l,this.fixAndSetPosition(),a(this,tn)&&f(this,Y,jb).call(this,e,i),f(this,Y,il).call(this),f(this,Y,rr).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(e,i,n){return O(this,null,function*(){var C,x,I;if(e instanceof wd)return null;let s=yield Ia(ce,this,"deserialize").call(this,e,i,n);s.thickness=e.thickness,s.color=ot.makeHexColor(...e.color),s.opacity=e.opacity;let[o,l]=s.pageDimensions,c=s.width*o,h=s.height*l,d=s.parentScale,u=e.thickness/2;m(s,tn,!0),m(s,Qr,Math.round(c)),m(s,Jr,Math.round(h));let{paths:p,rect:g,rotation:_}=e;for(let{bezier:A}of p){A=f(C=ce,Fs,QA).call(C,A,g,_);let E=[];s.paths.push(E);let L=d*(A[0]-u),v=d*(A[1]-u);for(let M=2,T=A.length;M<T;M+=6){let N=d*(A[M]-u),B=d*(A[M+1]-u),W=d*(A[M+2]-u),$=d*(A[M+3]-u),X=d*(A[M+4]-u),et=d*(A[M+5]-u);E.push([[L,v],[N,B],[W,$],[X,et]]),L=X,v=et}let S=f(this,Fs,ZA).call(this,E);s.bezierPath2D.push(S)}let y=f(x=s,Y,Ub).call(x);return m(s,Xr,Math.max(Yt.MIN_SIZE,y[2]-y[0])),m(s,Yr,Math.max(Yt.MIN_SIZE,y[3]-y[1])),f(I=s,Y,jb).call(I,c,h),s})}serialize(){if(this.isEmpty())return null;let e=this.getRect(0,0),i=Yt._colorManager.convert(this.ctx.strokeStyle);return{annotationType:St.INK,color:i,thickness:this.thickness,opacity:this.opacity,paths:f(this,Y,JA).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,e),pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};Yr=new WeakMap,Xr=new WeakMap,Wn=new WeakMap,Es=new WeakMap,tn=new WeakMap,Kr=new WeakMap,qr=new WeakMap,Zr=ne
23w WeakMap,Ss=new WeakMap,Gl=new WeakMap,Qr=new WeakMap,Jr=new WeakMap,Co=new WeakMap,Y=new WeakSet,jA=function(e){let i=s=>{this.thickness=s,f(this,Y,od).call(this)},n=this.thickness;this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},HA=function(e){let i=s=>{this.color=s,f(this,Y,rr).call(this)},n=this.color;this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},UA=function(e){let i=s=>{this.opacity=s,f(this,Y,rr).call(this)};e/=100;let n=this.opacity;this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},WA=function(){let{parentRotation:e,parentDimensions:[i,n]}=this;switch(e){case 90:return[0,n,n,i];case 180:return[i,n,i,n];case 270:return[i,0,n,i];default:return[0,0,i,n]}},Nb=function(){let{ctx:e,color:i,opacity:n,thickness:s,parentScale:o,scaleFactor:l}=this;e.lineWidth=s*o/l,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=`${i}${$P(n)}`},GA=function(e,i){var s;this.canvas.addEventListener("contextmenu",on,{signal:this._uiManager._signal}),f(this,Y,zb).call(this),m(this,Kr,new AbortController);let n=this._uiManager.combinedSignal(a(this,Kr));this.canvas.addEventListener("pointerleave",this.canvasPointerleave.bind(this),{signal:n}),this.canvas.addEventListener("pointermove",this.canvasPointermove.bind(this),{signal:n}),this.canvas.addEventListener("pointerup",this.canvasPointerup.bind(this),{signal:n}),this.isEditing=!0,a(this,Zr)||(m(this,Zr,!0),f(this,Y,il).call(this),this.thickness||(this.thickness=ce._defaultThickness),this.color||(this.color=ce._defaultColor||Yt._defaultLineColor),(s=this.opacity)!=null||(this.opacity=ce._defaultOpacity)),this.currentPath.push([e,i]),m(this,qr,!1),f(this,Y,Nb).call(this),m(this,Co,()=>{f(this,Y,XA).call(this),a(this,Co)&&window.requestAnimationFrame(a(this,C
23o))}),window.requestAnimationFrame(a(this,Co))},Fb=function(e,i){let[n,s]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===n&&i===s)return;let o=this.currentPath,l=a(this,Es);if(o.push([e,i]),m(this,qr,!0),o.length<=2){l.moveTo(...o[0]),l.lineTo(e,i);return}o.length===3&&(m(this,Es,l=new Path2D),l.moveTo(...o[0])),f(this,Y,KA).call(this,l,...o.at(-3),...o.at(-2),e,i)},$A=function(){if(this.currentPath.length===0)return;let e=this.currentPath.at(-1);a(this,Es).lineTo(...e)},YA=function(e,i){m(this,Co,null),e=Math.min(Math.max(e,0),this.canvas.width),i=Math.min(Math.max(i,0),this.canvas.height),f(this,Y,Fb).call(this,e,i),f(this,Y,$A).call(this);let n;if(this.currentPath.length!==1)n=f(this,Y,qA).call(this);else{let h=[e,i];n=[[h,h.slice(),h.slice(),h]]}let s=a(this,Es),o=this.currentPath;this.currentPath=[],m(this,Es,new Path2D);let l=()=>{this.allRawPaths.push(o),this.paths.push(n),this.bezierPath2D.push(s),this._uiManager.rebuild(this)},c=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(f(this,Y,Wp).call(this),f(this,Y,Gp).call(this)),f(this,Y,od).call(this))};this.addCommands({cmd:l,undo:c,mustExec:!0})},XA=function(){if(!a(this,qr))return;m(this,qr,!1);let e=Math.ceil(this.thickness*this.parentScale),i=this.currentPath.slice(-3),n=i.map(u=>u[0]),s=i.map(u=>u[1]),o=Math.min(...n)-e,l=Math.max(...n)+e,c=Math.min(...s)-e,h=Math.max(...s)+e,{ctx:d}=this;d.save(),d.clearRect(0,0,this.canvas.width,this.canvas.height);for(let u of this.bezierPath2D)d.stroke(u);d.stroke(a(this,Es)),d.restore()},KA=function(e,i,n,s,o,l,c){let h=(i+s)/2,d=(n+o)/2,u=(s+l)/2,p=(o+c)/2;e.bezierCurveTo(h+2*(s-h)/3,d+2*(o-d)/3,u+2*(s-u)/3,p+2*(o-p)/3,u,p)},qA=function(){let e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];let i=[],n,[s,o]=e[0];for(n=1;n<e.length-2;n++){let[g,_]=e[n],[y,C]=e[n+1],x=(g+y)/2,I=(_+C)/2,A=[s+2*(g-s)/3,o+2*(_-o)/3],E=[x+2*(g-x)/3,I+2*(_-I)/3];i.push([[s,o],A,E,[x,I]]),[s,o]=[x,I]}let[l,c]=e[n],[h,d]=e[n+1],u=[s+2*(l-s)/3,o+2*(c-o)/3],p=[h+2*(l-h)/3,d+2*(c-d)/3];return i.push([[s,o],u,p,[h,d]]),i},rr=function(){if(this.isEmpty()){f(this,Y,$p).call(this);return}f(this,Y,Nb).call(this);let{canvas:e,ctx:i}=this;i.setTransform(1,0,0,1,0,0),i.clearRect(0,0,e.width,e.height),f(this,Y,$p).call(this);for(let n of this.bezierPath2D)i.stroke(n)},Bb=function(){if(a(this,Gl))return;m(this,Gl,new AbortController);let e=this._uiManager.combinedSignal(a(this,Gl));this.canvas.addEventListener("pointerdown",this.canvasPointerdown.bind(this),{signal:e})},zb=function(){var e;(e=this.pointerdownAC)==null||e.abort(),this.pointerdownAC=null},Vb=function(e){var i;(i=a(this,Kr))==null||i.abort(),m(this,Kr,null),f(this,Y,Bb).call(this),a(this,Wn)&&clearTimeout(a(this,Wn)),m(this,Wn,setTimeout(()=>{m(this,Wn,null),this.canvas.removeEventListener("contextmenu",on)},10)),f(this,Y,YA).call(this,e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()},Wp=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas"),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},Gp=function(){m(this,Ss,new ResizeObserver(e=>{let i=e[0].contentRect;i.width&&i.height&&this.setDimensions(i.width,i.height)})),a(this,Ss).observe(this.div),this._uiManager._signal.addEventListener("abort",()=>{var e;(e=a(this,Ss))==null||e.disconnect(),m(this,Ss,null)},{once:!0})},il=function(){if(!a(this,Zr))return;let[e,i]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*i),f(this,Y,$p).call(this)},jb=function(e,i){let n=f(this,Y,Yp).call(this),s=(e-n)/a(this,Xr),o=(i-n)/a(this,Yr);this.scaleFactor=Math.min(s,o)},$p=function(){let e=f(this,Y,Yp).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)},Fs=new WeakSet,ZA=function(e){let i=new Path2D;for(let n=0,s=e.length;n<s;n++){let[o,l,c,h]=e[n];
23n===0&&i.moveTo(...o),i.bezierCurveTo(l[0],l[1],c[0],c[1],h[0],h[1])}return i},Hb=function(e,i,n){let[s,o,l,c]=i;switch(n){case 0:for(let h=0,d=e.length;h<d;h+=2)e[h]+=s,e[h+1]=c-e[h+1];break;case 90:for(let h=0,d=e.length;h<d;h+=2){let u=e[h];e[h]=e[h+1]+s,e[h+1]=u+o}break;case 180:for(let h=0,d=e.length;h<d;h+=2)e[h]=l-e[h],e[h+1]+=o;break;case 270:for(let h=0,d=e.length;h<d;h+=2){let u=e[h];e[h]=l-e[h+1],e[h+1]=c-u}break;default:throw new Error("Invalid rotation")}return e},QA=function(e,i,n){let[s,o,l,c]=i;switch(n){case 0:for(let h=0,d=e.length;h<d;h+=2)e[h]-=s,e[h+1]=c-e[h+1];break;case 90:for(let h=0,d=e.length;h<d;h+=2){let u=e[h];e[h]=e[h+1]-o,e[h+1]=u-s}break;case 180:for(let h=0,d=e.length;h<d;h+=2)e[h]=l-e[h],e[h+1]-=o;break;case 270:for(let h=0,d=e.length;h<d;h+=2){let u=e[h];e[h]=c-e[h+1],e[h+1]=l-u}break;default:throw new Error("Invalid rotation")}return e},JA=function(e,i,n,s){var d,u;let o=[],l=this.thickness/2,c=e*i+l,h=e*n+l;for(let p of this.paths){let g=[],_=[];for(let y=0,C=p.length;y<C;y++){let[x,I,A,E]=p[y];if(x[0]===E[0]&&x[1]===E[1]&&C===1){let $=e*x[0]+c,X=e*x[1]+h;g.push($,X),_.push($,X);break}let L=e*x[0]+c,v=e*x[1]+h,S=e*I[0]+c,M=e*I[1]+h,T=e*A[0]+c,N=e*A[1]+h,B=e*E[0]+c,W=e*E[1]+h;y===0&&(g.push(L,v),_.push(L,v)),g.push(S,M,T,N,B,W),_.push(S,M),y===C-1&&_.push(B,W)}o.push({bezier:f(d=ce,Fs,Hb).call(d,g,s,this.rotation),points:f(u=ce,Fs,Hb).call(u,_,s,this.rotation)})}return o},Ub=function(){let e=1/0,i=-1/0,n=1/0,s=-1/0;for(let o of this.paths)for(let[l,c,h,d]of o){let u=ot.bezierBoundingBox(...l,...c,...h,...d);e=Math.min(e,u[0]),n=Math.min(n,u[1]),i=Math.max(i,u[2]),s=Math.max(s,u[3])}return[e,n,i,s]},Yp=function(){return a(this,tn)?Math.ceil(this.thickness*this.parentScale):0},od=function(e=!1){if(this.isEmpty())return;if(!a(this,tn)){f(this,Y,rr).call(this);return}let i=f(this,Y,Ub).call(this),n=f(this,Y,Yp).call(this);m(this,Xr,Math.max(Yt.MIN_SIZE,i[2]-i[0])),m(this,Yr,Math.max(Yt.MIN_SIZE,i[3]-i[1]));let s=Math.ceil(n+a(this,Xr)*this.scaleFactor),o=Math.ceil(n+a(this,Yr)*this.scaleFactor),[l,c]=this.parentDimensions;this.width=s/l,this.height=o/c,this.setAspectRatio(s,o);let h=this.translationX,d=this.translationY;this.translationX=-i[0],this.translationY=-i[1],f(this,Y,il).call(this),f(this,Y,rr).call(this),m(this,Qr,s),m(this,Jr,o),this.setDims(s,o);let u=e?n/this.scaleFactor/2:0;this.translate(h-this.translationX-u,d-this.translationY-u)},b(ce,Fs),k(ce,"_defaultColor",null),k(ce,"_defaultOpacity",1),k(ce,"_defaultThickness",1),k(ce,"_type","ink"),k(ce,"_editorType",St.INK);var Ob=ce,ue,ti,Eo,Ps,So,$l,Gn,Ts,$n,Fi,Yl,Rt,rd,ad,Xp,Gb,tC,Kp,$b,qp,eC,iC,nl=class nl extends Yt{constructor(e){super(Pi(ft({},e),{name:"stampEditor"}));b(this,Rt);b(this,ue,null);b(this,ti,null);b(this,Eo,null);b(this,Ps,null);b(this,So,null);b(this,$l,"");b(this,Gn,null);b(this,Ts,null);b(this,$n,null);b(this,Fi,!1);b(this,Yl,!1);m(this,Ps,e.bitmapUrl),m(this,So,e.bitmapFile)}static initialize(e,i){Yt.initialize(e,i)}static get supportedTypes(){return Ot(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(i=>`image/${i}`))}static get supportedTypesStr(){return Ot(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,i){i.pasteEditor(St.STAMP,{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var e;return{type:"stamp",hasAltText:!!((e=this.altTextData)!=null&&e.altText)}}static computeTelemetryFinalData(e){var n,s;let i=e.get("hasAltText");return{hasAltText:(n=i.get(!0))!=null?n:0,hasNoAltText:(s=i.get(!1))!=null?s:0}}mlGuessAltText(e=null,i=!0){return O(this,null,function*(){if(this.hasAltTextData())return null;let{mlManager:n}=this._uiManager;if(!n)throw new Error("No ML.");if(!(yield n.isEnabledFor("altText")))throw new Error("ML isn't enabled for alt text.");let{data:s,width:o,height:l}=e||this.copyCanvas(null,null,!0).imageData,c=yield n.guess({name:"altText",request:{data:s,width:o,height:l,channels:s.length/(o*l)}});if(!c)throw new Error("No response from the AI service.");if(c.error)throw new Error("Error from the AI service.");if(c.cancel)return null;if(!c.output)throw new Error("No valid response from the AI service.");let h=c.output;return yield this.setGuessedAltText(h),i&&!this.hasAltTextData()&&(this.altTextData={alt:h,decorative:!1}),h})}remove(){var e,i;a(this,ti)&&(m(this,ue,null),this._uiManager.imageManager.deleteId(a(this,ti)),(e=a(this,Gn))==null||e.remove(),m(this,Gn,null),(i=a(this,Ts))==null||i.disconnect(),m(this,Ts,null),a(this,$n)&&(clearTimeout(a(this,$n)),m(this,$n,null))),super.remove()}rebuild(){if(!this.parent){a(this,ti)&&f(this,Rt,Xp).call(this);return}super.rebuild(),this.div!==null&&(a(this,ti)&&a(this,Gn)===null&&f(this,Rt,Xp).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(a(this,Eo)||a(this,ue)||a(this,Ps)||a(this,So)||a(this,ti))}get isResizable(){return!0}
23render(){if(this.div)return this.div;let e,i;if(this.width&&(e=this.x,i=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),a(this,ue)?f(this,Rt,Gb).call(this):f(this,Rt,Xp).call(this),this.width&&!this.annotationElementId){let[n,s]=this.parentDimensions;this.setAt(e*n,i*s,this.width*n,this.height*s)}return this.div}copyCanvas(e,i,n=!1){var g;e||(e=224);let{width:s,height:o}=a(this,ue),l=new fd,c=a(this,ue),h=s,d=o,u=null;if(i){if(s>i||o>i){let M=Math.min(i/s,i/o);h=Math.floor(s*M),d=Math.floor(o*M)}u=document.createElement("canvas");let _=u.width=Math.ceil(h*l.sx),y=u.height=Math.ceil(d*l.sy);a(this,Fi)||(c=f(this,Rt,Kp).call(this,_,y));let C=u.getContext("2d");C.filter=this._uiManager.hcmFilter;let x="white",I="#cfcfd8";this._uiManager.hcmFilter!=="none"?I="black":(g=window.matchMedia)!=null&&g.call(window,"(prefers-color-scheme: dark)").matches&&(x="#8f8f9d",I="#42414d");let A=15,E=A*l.sx,L=A*l.sy,v=new OffscreenCanvas(E*2,L*2),S=v.getContext("2d");S.fillStyle=x,S.fillRect(0,0,E*2,L*2),S.fillStyle=I,S.fillRect(0,0,E,L),S.fillRect(E,L,E,L),C.fillStyle=C.createPattern(v,"repeat"),C.fillRect(0,0,_,y),C.drawImage(c,0,0,c.width,c.height,0,0,_,y)}let p=null;if(n){let _,y;if(l.symmetric&&c.width<e&&c.height<e)_=c.width,y=c.height;else if(c=a(this,ue),s>e||o>e){let I=Math.min(e/s,e/o);_=Math.floor(s*I),y=Math.floor(o*I),a(this,Fi)||(c=f(this,Rt,Kp).call(this,_,y))}let x=new OffscreenCanvas(_,y).getContext("2d",{willReadFrequently:!0});x.drawImage(c,0,0,c.width,c.height,0,0,_,y),p={width:_,height:y,data:x.getImageData(0,0,_,y).data}}return{canvas:u,width:h,height:d,imageData:p}}getImageForAltText(){return a(this,Gn)}static deserialize(e,i,n){return O(this,null,function*(){var y;let s=null;if(e instanceof Af){let{data:{rect:C,rotation:x,id:I,structParent:A,popupRef:E},container:L,parent:{page:{pageNumber:v}}}=e,S=L.querySelector("canvas"),M=n.imageManager.getFromCanvas(L.id,S);S.remove();let T=((y=yield i._structTree.getAriaAttributes(`${ty}${I}`))==null?void 0:y.get("aria-label"))||"";s=e={annotationType:St.STAMP,bitmapId:M.id,bitmap:M.bitmap,pageIndex:v-1,rect:C.slice(0),rotation:x,id:I,deleted:!1,accessibilityData:{decorative:!1,altText:T},isSvg:!1,structParent:A,popupRef:E}}let o=yield Ia(nl,this,"deserialize").call(this,e,i,n),{rect:l,bitmap:c,bitmapUrl:h,bitmapId:d,isSvg:u,accessibilityData:p}=e;d&&n.imageManager.isValidId(d)?(m(o,ti,d),c&&m(o,ue,c)):m(o,Ps,h),m(o,Fi,u);let[g,_]=o.pageDimensions;return o.width=(l[2]-l[0])/g,o.height=(l[3]-l[1])/_,o.annotationElementId=e.id||null,p&&(o.altTextData=p),o._initialData=s,m(o,Yl,!!s),o})}serialize(e=!1,i=null){var c;if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let n={annotationType:St.STAMP,bitmapId:a(this,ti),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:a(this,Fi),structTreeParentId:this._structTreeParentId};if(e)return n.bitmapUrl=f(this,Rt,qp).call(this,!0),n.accessibilityData=this.serializeAltText(!0),n;let{decorative:s,altText:o}=this.serializeAltText(!1);if(!s&&o&&(n.accessibilityData={type:"Figure",alt:o}),this.annotationElementId){let h=f(this,Rt,iC).call(this,n);if(h.isSame)return null;h.isSameAltText?delete n.accessibilityData:n.accessibilityData.structParent=(c=this._initialData.structParent)!=null?c:-1}if(n.id=this.annotationElementId,i===null)return n;i.stamps||(i.stamps=new Map);let l=a(this,Fi)?(n.rect[2]-n.rect[0])*(n.rect[3]-n.rect[1]):null;if(!i.stamps.has(a(this,ti)))i.stamps.set(a(this,ti),{area:l,serialized:n}),n.bitmap=f(this,Rt,qp).call(this,!1);else if(a(this,Fi)){let h=i.stamps.get(a(this,ti));l>h.area&&(h.area=l,h.serialized.bitmap.close(),h.serialized.bitmap=f(this,Rt,qp).call(this,!1))}return n}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}};ue=new WeakMap,ti=new WeakMap,Eo=new WeakMap,Ps=new WeakMap,So=new WeakMap,$l=new WeakMap,Gn=new WeakMap,Ts=new WeakMap,$n=new WeakMap,Fi=new WeakMap,Yl=new WeakMap,Rt=new WeakSet,rd=function(e,i=!1){if(!e){this.remove();return}m(this,ue,e.bitmap),i||(m(this,ti,e.id),m(this,Fi,e.isSvg)),e.file&&m(this,$l,e.file.name),f(this,Rt,Gb).call(this)},ad=function(){if(m(this,Eo,null),this._uiManager.enableWaiting(!1),!!a(this,Gn)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&a(this,ue)){this._editToolbar.hide(),this._uiManager.editAltText(this,!0);return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&a(this,ue)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},Xp=function(){if(a(this,ti)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(a(this,ti)).then(n=>f(this,Rt,rd).call(this,n,!0)).finally(()=>f(this,Rt,ad).call(this));return}if(a(this,Ps)){let n=a(this,Ps);m(this,Ps,null),this._uiManager.enableWaiting(!0),m(this,Eo,this._uiManager.imageManager.getFromUrl(n).then(s=>f(this,Rt,rd).call(this,s)).finally(()=>f(this,Rt,ad).call(this)));return}if(a(this,So)){let n=a(this,So);m(this,So,null),this._uiManager.enableWaiting(!0),m(this,Eo,this._uiManager.imageManager.getFromFile(n).then(s=>f(this,Rt,rd).call(this,s)).finally(()=>f(this,Rt,ad).call(this)));return}
23let e=document.createElement("input");e.type="file",e.accept=nl.supportedTypesStr;let i=this._uiManager._signal;m(this,Eo,new Promise(n=>{e.addEventListener("change",()=>O(this,null,function*(){if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);let s=yield this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),f(this,Rt,rd).call(this,s)}n()}),{signal:i}),e.addEventListener("cancel",()=>{this.remove(),n()},{signal:i})}).finally(()=>f(this,Rt,ad).call(this))),e.click()},Gb=function(){let{div:e}=this,{width:i,height:n}=a(this,ue),[s,o]=this.pageDimensions,l=.75;if(this.width)i=this.width*s,n=this.height*o;else if(i>l*s||n>l*o){let u=Math.min(l*s/i,l*o/n);i*=u,n*=u}let[c,h]=this.parentDimensions;this.setDims(i*c/s,n*h/o),this._uiManager.enableWaiting(!1);let d=m(this,Gn,document.createElement("canvas"));d.setAttribute("role","img"),this.addContainer(d),(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(e.hidden=!1),f(this,Rt,$b).call(this,i,n),f(this,Rt,eC).call(this),a(this,Yl)||(this.parent.addUndoableEditor(this),m(this,Yl,!0)),this._reportTelemetry({action:"inserted_image"}),a(this,$l)&&d.setAttribute("aria-label",a(this,$l))},tC=function(e,i){var l;let[n,s]=this.parentDimensions;this.width=e/n,this.height=i/s,(l=this._initialOptions)!=null&&l.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,a(this,$n)!==null&&clearTimeout(a(this,$n)),m(this,$n,setTimeout(()=>{m(this,$n,null),f(this,Rt,$b).call(this,e,i)},200))},Kp=function(e,i){let{width:n,height:s}=a(this,ue),o=n,l=s,c=a(this,ue);for(;o>2*e||l>2*i;){let h=o,d=l;o>2*e&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2)),l>2*i&&(l=l>=16384?Math.floor(l/2)-1:Math.ceil(l/2));let u=new OffscreenCanvas(o,l);u.getContext("2d").drawImage(c,0,0,h,d,0,0,o,l),c=u.transferToImageBitmap()}return c},$b=function(e,i){let n=new fd,s=Math.ceil(e*n.sx),o=Math.ceil(i*n.sy),l=a(this,Gn);if(!l||l.width===s&&l.height===o)return;l.width=s,l.height=o;let c=a(this,Fi)?a(this,ue):f(this,Rt,Kp).call(this,s,o),h=l.getContext("2d");h.filter=this._uiManager.hcmFilter,h.drawImage(c,0,0,c.width,c.height,0,0,s,o)},qp=function(e){if(e){if(a(this,Fi)){let s=this._uiManager.imageManager.getSvgUrl(a(this,ti));if(s)return s}let i=document.createElement("canvas");return{width:i.width,height:i.height}=a(this,ue),i.getContext("2d").drawImage(a(this,ue),0,0),i.toDataURL()}if(a(this,Fi)){let[i,n]=this.pageDimensions,s=Math.round(this.width*i*Po.PDF_TO_CSS_UNITS),o=Math.round(this.height*n*Po.PDF_TO_CSS_UNITS),l=new OffscreenCanvas(s,o);return l.getContext("2d").drawImage(a(this,ue),0,0,a(this,ue).width,a(this,ue).height,0,0,s,o),l.transferToImageBitmap()}return structuredClone(a(this,ue))},eC=function(){this._uiManager._signal&&(m(this,Ts,new ResizeObserver(e=>{let i=e[0].contentRect;i.width&&i.height&&f(this,Rt,tC).call(this,i.width,i.height)})),a(this,Ts).observe(this.div),this._uiManager._signal.addEventListener("abort",()=>{var e;(e=a(this,Ts))==null||e.disconnect(),m(this,Ts,null)},{once:!0}))},iC=function(e){var h;let{rect:i,pageIndex:n,accessibilityData:{altText:s}}=this._initialData,o=e.rect.every((d,u)=>Math.abs(d-i[u])<1),l=e.pageIndex===n,c=(((h=e.accessibilityData)==null?void 0:h.alt)||"")===s;return{isSame:o&&l&&c,isSameAltText:c}},k(nl,"_type","stamp"),k(nl,"_editorType",St.STAMP);var Wb=nl,wT=(()=>{var t,e,i,n,s,o,l,c,h,d,u,p,g,_,nC,Yb,Xb,Kb,Zp;let E=class E{constructor({uiManager:v,pageIndex:S,div:M,structTreeLayer:T,accessibilityManager:N,annotationLayer:B,drawLayer:W,textLayer:$,viewport:X,l10n:et}){b(this,_);b(this,t);b(this,e,!1);b(this,i,null);b(this,n,null);b(this,s,null);b(this,o,new Map);b(this,l,!1);b(this,c,!1);b(this,h,!1);b(this,d,null);b(this,u,null);b(this,p);let rt=[...a(E,g).values()];if(!E._initialized){E._initialized=!0;for(let it of rt)it.initialize(et,v)}v.registerEditorTypes(rt),m(this,p,v),this.pageIndex=S,this.div=M,m(this,t,N),m(this,i,B),this.viewport=X,m(this,d,$),this.drawLayer=W,this._structTree=T,a(this,p).addLayer(this)}get isEmpty(){return a(this,o).size===0}get isInvisible(){return this.isEmpty&&a(this,p).getMode()===St.NONE}updateToolbar(v){a(this,p).updateToolbar(v)}updateMode(v=a(this,p).getMode()){switch(f(this,_,Zp).call(this),v){case St.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case St.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case St.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);let{classList:S}=this.div;for(let M of a(E,g).values())S.toggle(`${M._type}Editing`,v===M._editorType);this.div.hidden=!1}hasTextLayer(v){var S;return v===((S=a(this,d))==null?void 0:S.div)}addInkEditorIfNeeded(v){if(a(this,p).getMode()!==St.INK)return;if(!v){for(let M of a(this,o).values())if(M.isEmpty()){M.setInBackgroun
23d();return}}this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(v){a(this,p).setEditingState(v)}addCommands(v){a(this,p).addCommands(v)}toggleDrawing(v=!1){this.div.classList.toggle("drawing",!v)}togglePointerEvents(v=!1){this.div.classList.toggle("disabled",!v)}toggleAnnotationLayerPointerEvents(v=!1){var S;(S=a(this,i))==null||S.div.classList.toggle("disabled",!v)}enable(){return O(this,null,function*(){this.div.tabIndex=0,this.togglePointerEvents(!0);let v=new Set;for(let M of a(this,o).values())M.enableEditing(),M.show(!0),M.annotationElementId&&(a(this,p).removeChangedExistingAnnotation(M),v.add(M.annotationElementId));if(!a(this,i))return;let S=a(this,i).getEditableAnnotations();for(let M of S){if(M.hide(),a(this,p).isDeletedAnnotationElement(M.data.id)||v.has(M.data.id))continue;let T=yield this.deserialize(M);T&&(this.addOrRebuild(T),T.enableEditing())}})}disable(){var T;m(this,h,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);let v=new Map,S=new Map;for(let N of a(this,o).values())if(N.disableEditing(),!!N.annotationElementId){if(N.serialize()!==null){v.set(N.annotationElementId,N);continue}else S.set(N.annotationElementId,N);(T=this.getEditableAnnotation(N.annotationElementId))==null||T.show(),N.remove()}if(a(this,i)){let N=a(this,i).getEditableAnnotations();for(let B of N){let{id:W}=B.data;if(a(this,p).isDeletedAnnotationElement(W))continue;let $=S.get(W);if($){$.resetAnnotationElement(B),$.show(!1),B.show();continue}$=v.get(W),$&&(a(this,p).addChangedExistingAnnotation($),$.renderAnnotationElement(B)&&$.show(!1)),B.show()}}f(this,_,Zp).call(this),this.isEmpty&&(this.div.hidden=!0);let{classList:M}=this.div;for(let N of a(E,g).values())M.remove(`${N._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),m(this,h,!1)}getEditableAnnotation(v){var S;return((S=a(this,i))==null?void 0:S.getEditableAnnotation(v))||null}setActiveEditor(v){a(this,p).getActive()!==v&&a(this,p).setActiveEditor(v)}enableTextSelection(){var v;if(this.div.tabIndex=-1,(v=a(this,d))!=null&&v.div&&!a(this,u)){m(this,u,new AbortController);let S=a(this,p).combinedSignal(a(this,u));a(this,d).div.addEventListener("pointerdown",f(this,_,nC).bind(this),{signal:S}),a(this,d).div.classList.add("highlighting")}}disableTextSelection(){var v;this.div.tabIndex=0,(v=a(this,d))!=null&&v.div&&a(this,u)&&(a(this,u).abort(),m(this,u,null),a(this,d).div.classList.remove("highlighting"))}enableClick(){if(a(this,n))return;m(this,n,new AbortController);let v=a(this,p).combinedSignal(a(this,n));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:v}),this.div.addEventListener("pointerup",this.pointerup.bind(this),{signal:v})}disableClick(){var v;(v=a(this,n))==null||v.abort(),m(this,n,null)}attach(v){a(this,o).set(v.id,v);let{annotationElementId:S}=v;S&&a(this,p).isDeletedAnnotationElement(S)&&a(this,p).removeDeletedAnnotationElement(v)}detach(v){var S;a(this,o).delete(v.id),(S=a(this,t))==null||S.removePointerInTextLayer(v.contentDiv),!a(this,h)&&v.annotationElementId&&a(this,p).addDeletedAnnotationElement(v)}remove(v){this.detach(v),a(this,p).removeEditor(v),v.div.remove(),v.isAttachedToDOM=!1,a(this,c)||this.addInkEditorIfNeeded(!1)}changeParent(v){var S;v.parent!==this&&(v.parent&&v.annotationElementId&&(a(this,p).addDeletedAnnotationElement(v.annotationElementId),Yt.deleteAnnotationElement(v),v.annotationElementId=null),this.attach(v),(S=v.parent)==null||S.detach(v),v.setParent(this),v.div&&v.isAttachedToDOM&&(v.div.remove(),this.div.append(v.div)))}add(v){if(!(v.parent===this&&v.isAttachedToDOM)){if(this.changeParent(v),a(this,p).addEditor(v),this.attach(v),!v.isAttachedToDOM){let S=v.render();this.div.append(S),v.isAttachedToDOM=!0}v.fixAndSetPosition(),v.onceAdded(),a(this,p).addToAnnotationStorage(v),v._reportTelemetry(v.telemetryInitialData)}}moveEditorInDOM(v){var M;if(!v.isAttachedToDOM)return;let{activeElement:S}=document;v.div.contains(S)&&!a(this,s)&&(v._focusEventsAllowed=!1,m(this,s,setTimeout(()=>{m(this,s,null),v.div.contains(document.activeElement)?v._focusEventsAllowed=!0:(v.div.addEventListener("focusin",()=>{v._focusEventsAllowed=!0},{once:!0,signal:a(this,p)._signal}),S.focus())},0))),v._structTreeParentId=(M=a(this,t))==null?void 0:M.moveElementInDOM(this.div,v.div,v.contentDiv,!0)}addOrRebuild(v){v.needsToBeRebuilt()?(v.parent||(v.parent=this),v.rebuild(),v.show()):this.add(v)}addUndoableEditor(v){let S=()=>v._uiManager.rebuild(v),M=()=>{v.remove()};this.addCommands({cmd:S,undo:M,mustExec:!1})}getNextId(){return a(this,p).getId()}combinedSignal(v){return a(this,p).combinedSignal(v)}canCreateNewEmptyEditor(){var v;return(v=a(this,_,Yb))==null?void 0:v.canCreateNewEmptyEditor()}pasteEditor(v,S){a(this,p).updateToolbar(v),a(this,p).updateMode(v);let{offsetX:M,offsetY:T}=f(this,_,Kb).call(this),N=this.getNextId(),B=f(this,_,Xb).call(this,ft({parent:this,id:N,x:M,y:T,uiManager:a(this,p),isCentered:!0},S));B&&this.add(B)}deserialize(v){return O(this,null,function*(){var S,M;return(yield(M=a(E,g).get((S=v.annotationType)!=null?S:v.annotationEditorType))==null?void 0:M.deserialize(v,this,a(this,p)))||null})}createAndAddNewEditor(v,S,M={}){let T=this.getNextId(),N=f(this,_,Xb).call(this,ft({parent:this,id:T,x:v.offsetX,y:v.offsetY,uiManager:a(this,p),isCentered:S},M));return N&&this.add(N),N}addNewEditor(){this.createAndAddNewEditor(f(this,_,Kb).call(this),!0)}setSelected(v){a(this,p).setSelected(v)}toggleSelected(v){a(this,p).toggleSelected(v)}unselect(v){a(this,p).unselect(v)}pointerup(v){let{isMac:S}=ei.platform;if(!(v.button!==0||v.ctrlKey&&S)&&v.target===this.div&&a(this,l)){if(m(this,l,!1),!a(this,e)){m(this,e,!0);return}if(a(this,p).getMode()===St.STAMP){a(this,p).unselectAll();return}this.createAndAddNewEditor(v,!1)}}pointerdown(v){if(a(this,p).getMode()===St.HIGHLIGHT&&this.enableTextSelection(),a(this,l)){m(this,l,!1);return}let{isMac:S}=ei.platform;if(v.button!==0||v.ctrlKey&&S||v.target!==this.div)return;m(this,l,!0);let M=a(this,p).getActive();m(this,e,!M||M.isEmpty())}findNewParent(v,S,M){let T=a(this,p).findParent(S,M);return T===null||T===this?!1:(T.changeParent(v),!0)}destroy(){var v,S;((v=a(this,p).getActive())==null?void 0:v.parent)===this&&(a(this,p).commitOrRemove(),a(this,p).setActiveEditor(null)),a(this,s)&&(clearTimeout(a(this,s)),m(this,s,null));for(let M of a(this,o).values())(S=a(this,t))==null||S.removePointerInTextLayer(M.contentDiv),M.setParent(null),M.isAttachedToDOM=!1,M.div.remove();this.div=null,a(this,o).clear(),a(this,p).removeLayer(this)}render({viewport:v}){this.viewport=v,ta(this.div,v);for(let S of a(this,p).getEditors(this.pageIndex))this.add(S),S.rebuild();this.updateMode()}update({viewport:v}){a(this,p).commitOrRemove(),f(this,_,Zp).call(this);let S=this.viewport.rotation,M=v.rotation;if(this.viewport=v,ta(this.div,{rotation:M}),S!==M)for(let T of a(this,o).values())T.rotate(M);this.addInkEditorIfNeeded(!1)}get pageDimensions(){let{pageWidth:v,pageHeight:S}=this.viewport.rawDims;return[v,S]}get scale(){return a(this,p).viewParameters.realScale}};t=new WeakMap,e=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,g=new WeakMap,_=new WeakSet,nC=function(v){a(this,p).unselectAll();let{target:S}=v;if(S===a(this,d).div||(S.getAttribute("role")==="img"||S.classList.contains("endOfContent"))&&a(this,d).div.contains(S)){let{isMac:M}=ei.platform;if(v.button!==0||v.ctrlKey&&M)return;a(this,p).showAllEditors("highlight",!0,!0),a(this,d).div.classList.add("free"),this.toggleDrawing(),If.startHighlighting(this,a(this,p).direction==="ltr",{target:a(this,d).div,x:v.x,y:v.y}),a(this,d).div.addEventListener("pointerup",()=>{a(this,d).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:a(this,p)._signal}),v.preventDefault()}},Yb=function(){return a(E,g).get(a(this,p).getMode())},Xb=function(v){let S=a(this,_,Yb);return S?new S.prototype.constructor(v):null},Kb=function(){let{x:v,y:S,width:M,height:T}=this.div.getBoundingClientRect(),N=Math.max(0,v),B=Math.max(0,S),W=Math.min(window.innerWidth,v+M),$=Math.min(window.innerHeight,S+T),X=(N+W)/2-v,et=(B+$)/2-S,[rt,it]=this.viewport.rotation%180===0?[X,et]:[et,X];return{offsetX:rt,offsetY:it}},Zp=function(){m(this,c,!0);for(let v of a(this,o).values())v.isEmpty()&&v.remove();m(this,c,!1)},k(E,"_initialized",!1),b(E,g,new Map([Eb,Ob,Wb,If].map(v=>[v._editorType,v])));let r=E;return r})(),Yn,Th,Te,Is,Ih,Zb,sa,Qb,sC,Qe=class Qe{constructor({pageIndex:t}){b(this,sa);b(this,Yn,null);b(this,Th,0);b(this,Te,new Map);b(this,Is,new Map);this.pageIndex=t}setParent(t){if(!a(this,Yn)){m(this,Yn,t);return}if(a(this,Yn)!==t){if(a(this,Te).size>0)for(let e of a(this,Te).values())e.remove(),t.append(e);m(this,Yn,t)}}static get _svgFactory(){return Ot(this,"_svgFactory",new vd)}draw(t,e,i,n=!1){let s=Ze(this,Th)._++,o=f(this,sa,Qb).call(this,t.box);o.classList.add(...t.classNamesForDrawing);let l=Qe._svgFactory.createElement("defs");o.append(l);let c=Qe._svgFactory.createElement("path");l.append(c);let h=`path_p${this.pageIndex}_${s}`;c.setAttribute("id",h),c.setAttribute("d",t.toSVGPath()),n&&a(this,Is).set(s,c);let d=f(this,sa,sC).call(this,l,h),u=Qe._svgFactory.createElement("use");return o.append(u),o.setAttribute("fill",e),o.setAttribute("fill-opacity",i),u.setAttribute("href",`#${h}`),a(this,Te).set(s,o),{id:s,clipPathId:`url(#${d})`}}drawOutline(t){let e=Ze(this,Th)._++,i=f(this,sa,Qb).call(this,t.box);i.classList.add(...t.classNamesForOutlining);let n=Qe._svgFactory.createElement("defs");i.append(n);let s=Qe._svgFactory.createElement("path");n.append(s);let o=`path_p${this.pageIndex}_${e}`;s.setAttribute("id",o),s.setAttribute("d",t.toSVGPath()),s.setAttribute("vector-effect","non-scaling-stroke");let l;if(t.mustRemoveSelfIntersections){let d=Qe._svgFactory.createElement("mask");n.append(d),l=`mask_p${this.pageIndex}_${e}`,d.setAttribute("id",l),d.setAttribute("maskUnits","objectBoundingBox");let u=Qe._svgFactory.createElement("rect");d.append(u),u.setAttribute("width","1"),u.setAttribute("height","1"),u.setAttribute("fill","white");let p=Qe._svgFactory.createElement("use");d.append(p),p.setAttribute("href",`#${o}`),p.setAttribute("stroke","none"),p.setAttribute("fill","black"),p.setAttribute("fill-rule","nonzero"),p.classList.add("mask")}let c=Qe._svgFactory.createElement("use");i.append(c),c.setAttribute("href",`#${o}`),l&&c.setAttribute("mask",`url(#${l})`);let h=c.cloneNode();return i.append(h),c.classList.add("mainOutline"),h.classList.add("secondaryOutline"),a(this,Te).set(e,i),e}finalizeLine(t,e){let i=a(this,Is).get(t);a(this,Is).delete(t),this.updateBox(t,e.box),i.setAttribute("d",e.toSVGPath())}updateLine(t,e){a(this,Te).get(t).firstChild.firstChild.setAttribute("d",e.toSVGPath())}updatePath(t,e){a(this,Is).get(t).setAttribute("d",e.toSVGPath())}updateBox(t,e){var i;f(i=Qe,Ih,Zb).call(i,a(this,Te).get(t),e)}show(t,e){a(this,Te).get(t).classList.toggle("hidden",!e)}rotate(t,e){a(this,Te).get(t).setAttribute("data-main-rotation",e)}changeColor(t,e){a(this,Te).get(t).setAttribute("fill",e)}
23changeOpacity(t,e){a(this,Te).get(t).setAttribute("fill-opacity",e)}addClass(t,e){a(this,Te).get(t).classList.add(e)}removeClass(t,e){a(this,Te).get(t).classList.remove(e)}getSVGRoot(t){return a(this,Te).get(t)}remove(t){a(this,Is).delete(t),a(this,Yn)!==null&&(a(this,Te).get(t).remove(),a(this,Te).delete(t))}destroy(){m(this,Yn,null);for(let t of a(this,Te).values())t.remove();a(this,Te).clear(),a(this,Is).clear()}};Yn=new WeakMap,Th=new WeakMap,Te=new WeakMap,Is=new WeakMap,Ih=new WeakSet,Zb=function(t,{x:e=0,y:i=0,width:n=1,height:s=1}={}){let{style:o}=t;o.top=`${100*i}%`,o.left=`${100*e}%`,o.width=`${100*n}%`,o.height=`${100*s}%`},sa=new WeakSet,Qb=function(t){var i;let e=Qe._svgFactory.create(1,1,!0);return a(this,Yn).append(e),e.setAttribute("aria-hidden",!0),f(i=Qe,Ih,Zb).call(i,e,t),e},sC=function(t,e){let i=Qe._svgFactory.createElement("clipPath");t.append(i);let n=`clip_${e}`;i.setAttribute("id",n),i.setAttribute("clipPathUnits","objectBoundingBox");let s=Qe._svgFactory.createElement("use");return i.append(s),s.setAttribute("href",`#${e}`),s.classList.add("clip"),n},b(Qe,Ih);var qb=Qe;var AT=_t.AbortException,CT=_t.AnnotationEditorLayer,ET=_t.AnnotationEditorParamsType,ry=_t.AnnotationEditorType,ST=_t.AnnotationEditorUIManager,PT=_t.AnnotationLayer,TT=_t.AnnotationMode,IT=_t.ColorPicker,kT=_t.DOMSVGFactory,MT=_t.DrawLayer,DT=_t.FeatureTest,ay=_t.GlobalWorkerOptions,RT=_t.ImageKind,LT=_t.InvalidPDFException,OT=_t.MissingPDFException,NT=_t.OPS,FT=_t.OutputScale,BT=_t.PDFDataRangeTransport,zT=_t.PDFDateString,VT=_t.PDFWorker,jT=_t.PasswordResponses,HT=_t.PermissionFlag,UT=_t.PixelsPerInch,WT=_t.RenderingCancelledException,GT=_t.TextLayer,$T=_t.UnexpectedResponseException,YT=_t.Util,ly=_t.VerbosityLevel,XT=_t.XfaLayer,KT=_t.build,qT=_t.createValidAbsoluteUrl,ZT=_t.fetchData,cy=_t.getDocument,QT=_t.getFilenameFromUrl,JT=_t.getPdfFilenameFromUrl,tI=_t.getXfaPageViewport,eI=_t.isDataScheme,iI=_t.isPdfFile,nI=_t.noContextMenu,sI=_t.normalizeUnicode,oI=_t.setLayerDimensions,rI=_t.shadow,Mh=_t.version;var S0={};O0(S0,{AnnotationLayerBuilder:()=>Yk,DownloadManager:()=>Xk,EventBus:()=>Kk,FindState:()=>qk,GenericL10n:()=>x0,LinkTarget:()=>Sa,PDFFindController:()=>w0,PDFHistory:()=>Zk,PDFLinkService:()=>A0,PDFPageView:()=>Qk,PDFScriptingManager:()=>Jk,PDFSinglePageViewer:()=>C0,PDFViewer:()=>E0,ProgressBar:()=>t1,RenderingStates:()=>e1,ScrollMode:()=>i1,SimpleLinkService:()=>n1,SpreadMode:()=>s1,StructTreeLayerBuilder:()=>o1,TextLayerBuilder:()=>r1,XfaLayerBuilder:()=>a1,parseQueryString:()=>l1});var zh={};zh.d=(r,t)=>{for(var e in t)zh.o(t,e)&&!zh.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})};zh.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t);var fe=globalThis.pdfjsViewer={};zh.d(fe,{AnnotationLayerBuilder:()=>_m,DownloadManager:()=>Ry,EventBus:()=>bm,FindState:()=>Mo,GenericL10n:()=>yc,LinkTarget:()=>oa,PDFFindController:()=>Ay,PDFHistory:()=>Gy,PDFLinkService:()=>mm,PDFPageView:()=>Cm,PDFScriptingManager:()=>u0,PDFSinglePageViewer:()=>y0,PDFViewer:()=>Em,ProgressBar:()=>wy,RenderingStates:()=>_e,ScrollMode:()=>Nt,SimpleLinkService:()=>Uh,SpreadMode:()=>hi,StructTreeLayerBuilder:()=>xm,TextLayerBuilder:()=>wm,XfaLayerBuilder:()=>Am,parseQueryString:()=>Im});var aI="auto",BC=1,oC=1.1,lI=.1,cI=10,py=0,dI=1.25,rC=40,aC=5,_e={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},Jl={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};var ts={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2},Nt={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3},hi={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};function zC(r,t,e=!1){let i=r.offsetParent;if(!i){console.error("offsetParent is not set -- cannot scroll");return}let n=r.offsetTop+r.clientTop,s=r.offsetLeft+r.clientLeft;for(;i.clientHeight===i.scrollHeight&&i.clientWidth===i.scrollWidth||e&&(i.classList.contains("markedContent")||getComputedStyle(i).overflow==="hidden");)if(n+=i.offsetTop,s+=i.offsetLeft,i=i.offsetParent,!i)return;t&&(t.top!==void 0&&(n+=t.top),t.left!==void 0&&(s+=t.left,i.scrollLeft=s)),i.scrollTop=n}function hI(r,t,e=void 0){let i=function(o){s||(s=window.requestAnimationFrame(function(){s=null;
23let c=r.scrollLeft,h=n.lastX;c!==h&&(n.right=c>h),n.lastX=c;let d=r.scrollTop,u=n.lastY;d!==u&&(n.down=d>u),n.lastY=d,t(n)}))},n={right:!0,down:!0,lastX:r.scrollLeft,lastY:r.scrollTop,_eventHandler:i},s=null;return r.addEventListener("scroll",i,{useCapture:!0,signal:e}),e==null||e.addEventListener("abort",()=>window.cancelAnimationFrame(s),{once:!0}),n}function Im(r){let t=new Map;for(let[e,i]of new URLSearchParams(r))t.set(e.toLowerCase(),i);return t}var lC=/[\x00-\x1F]/g;function Vh(r,t=!1){return lC.test(r)?t?r.replaceAll(lC,e=>e==="\0"?"":" "):r.replaceAll("\0",""):r}function Hh(r,t,e=0){let i=e,n=r.length-1;if(n<0||!t(r[n]))return r.length;if(t(r[i]))return i;for(;i<n;){let s=i+n>>1,o=r[s];t(o)?n=s:i=s+1}return i}function cC(r){if(Math.floor(r)===r)return[r,1];let t=1/r,e=8;if(t>e)return[1,e];if(Math.floor(t)===t)return[1,t];let i=r>1?t:r,n=0,s=1,o=1,l=1;for(;;){let h=n+o,d=s+l;if(d>e)break;i<=h/d?(o=h,l=d):(n=h,s=d)}let c;return i-n/s<o/l-i?c=i===r?[n,s]:[s,n]:c=i===r?[o,l]:[l,o],c}function Qf(r,t){return r-r%t}function uI(r,t,e){if(r<2)return r;let i=t[r].div,n=i.offsetTop+i.clientTop;n>=e&&(i=t[r-1].div,n=i.offsetTop+i.clientTop);for(let s=r-2;s>=0&&(i=t[s].div,!(i.offsetTop+i.clientTop+i.clientHeight<=n));--s)r=s;return r}function pI({scrollEl:r,views:t,sortByVisibility:e=!1,horizontal:i=!1,rtl:n=!1}){let s=r.scrollTop,o=s+r.clientHeight,l=r.scrollLeft,c=l+r.clientWidth;function h(I){let A=I.div;return A.offsetTop+A.clientTop+A.clientHeight>s}function d(I){let A=I.div,E=A.offsetLeft+A.clientLeft,L=E+A.clientWidth;return n?E<c:L>l}let u=[],p=new Set,g=t.length,_=Hh(t,i?d:h);_>0&&_<g&&!i&&(_=uI(_,t,s));let y=i?c:-1;for(let I=_;I<g;I++){let A=t[I],E=A.div,L=E.offsetLeft+E.clientLeft,v=E.offsetTop+E.clientTop,S=E.clientWidth,M=E.clientHeight,T=L+S,N=v+M;if(y===-1)N>=o&&(y=N);else if((i?L:v)>y)break;if(N<=s||v>=o||T<=l||L>=c)continue;let B=Math.max(0,s-v)+Math.max(0,N-o),W=Math.max(0,l-L)+Math.max(0,T-c),$=(M-B)/M,X=(S-W)/S,et=$*X*100|0;u.push({id:A.id,x:L,y:v,view:A,percent:et,widthPercent:X*100|0}),p.add(A.id)}let C=u[0],x=u.at(-1);return e&&u.sort(function(I,A){let E=I.percent-A.percent;return Math.abs(E)>.001?-E:I.id-A.id}),{first:C,last:x,views:u,ids:p}}function VC(r){return Number.isInteger(r)&&r%90===0}function fI(r){return Number.isInteger(r)&&Object.values(Nt).includes(r)&&r!==Nt.UNKNOWN}function mI(r){return Number.isInteger(r)&&Object.values(hi).includes(r)&&r!==hi.UNKNOWN}function dC(r){return r.width<=r.height}var A2=new Promise(function(r){window.requestAnimationFrame(r)}),gI=document.documentElement.style;function _I(r,t,e){return Math.min(Math.max(r,t),e)}var Lo,la,Oo,tc,ca,wy=class{constructor(t){b(this,Lo,null);b(this,la,null);b(this,Oo,0);b(this,tc,null);b(this,ca,!0);m(this,Lo,t.classList),m(this,tc,t.style)}get percent(){return a(this,Oo)}set percent(t){if(m(this,Oo,_I(t,0,100)),isNaN(t)){a(this,Lo).add("indeterminate");return}a(this,Lo).remove("indeterminate"),a(this,tc).setProperty("--progressBar-percent",`${a(this,Oo)}%`)}setWidth(t){if(!t)return;let i=t.parentNode.offsetWidth-t.offsetWidth;i>0&&a(this,tc).setProperty("--progressBar-end-offset",`${i}px`)}setDisableAutoFetch(t=5e3){a(this,Oo)===100||isNaN(a(this,Oo))||(a(this,la)&&clearTimeout(a(this,la)),this.show(),m(this,la,setTimeout(()=>{m(this,la,null),this.hide()},t)))}hide(){a(this,ca)&&(m(this,ca,!1),a(this,Lo).add("hidden"))}show(){a(this,ca)||(m(this,ca,!0),a(this,Lo).remove("hidden"))}};Lo=new WeakMap,la=new WeakMap,Oo=new WeakMap,tc=new WeakMap,ca=new WeakMap;function bI(r){let t=Nt.VERTICAL,e=hi.NONE;switch(r){case"SinglePage":t=Nt.PAGE;break;case"OneColumn":break;case"TwoPageLeft":t=Nt.PAGE;case"TwoColumnLeft":e=hi.ODD;break;case"TwoPageRight":t=Nt.PAGE;case"TwoColumnRight":e=hi.EVEN;break}return{scrollMode:t,spreadMode:e}}var Jf=function(){let r=document.createElement("div");return r.style.width="round(down, calc(1.6666666666666665 * 792px), 1px)",r.style.width==="calc(1320px)"?Math.fround:t=>t}(),xn={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};function yI(r){return r<11904}function vI(r){return(r&65408)===0}function xI(r){return r>=97&&r<=122||r>=65&&r<=90}function wI(r){return r>=48&&r<=57}function AI(r){return r===32||r===9||r===13||r===10}function CI(r){return r>=13312&&r<=40959||r>=63744&&r<=64255}function EI(r){return r>=12448&&r<=12543}function SI(r){return r>=12352&&r<=12447}function PI(r){return r>=65376&&r<=65439}function TI(r){return(r&65408)===3584}function tm(r){return yI(r)?vI(r)?AI(r)?xn.SPACE:xI(r)||wI(r)||r===95?xn.ALPHA_LETTER:xn.PUNCT
23:TI(r)?xn.THAI_LETTER:r===160?xn.SPACE:xn.ALPHA_LETTER:CI(r)?xn.HAN_LETTER:EI(r)?xn.KATAKANA_LETTER:SI(r)?xn.HIRAGANA_LETTER:PI(r)?xn.HALFWIDTH_KATAKANA_LETTER:xn.ALPHA_LETTER}var hC;function II(){return hC||(hC="\xA0\xA8\xAA\xAF\xB2-\xB5\xB8-\xBA\xBC-\xBE\u0132-\u0133\u013F-\u0140\u0149\u017F\u01C4-\u01CC\u01F1-\u01F3\u02B0-\u02B8\u02D8-\u02DD\u02E0-\u02E4\u0374\u037A\u037E\u0384-\u0385\u0387\u03D0-\u03D6\u03F0-\u03F2\u03F4-\u03F5\u03F9\u0587\u0675-\u0678\u0958-\u095F\u09DC-\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B5C-\u0B5D\u0E33\u0EB3\u0EDC-\u0EDD\u0F0C\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u10FC\u1D2C-\u1D2E\u1D30-\u1D3A\u1D3C-\u1D4D\u1D4F-\u1D6A\u1D78\u1D9B-\u1DBF\u1E9A-\u1E9B\u1F71\u1F73\u1F75\u1F77\u1F79\u1F7B\u1F7D\u1FBB\u1FBD-\u1FC1\u1FC9\u1FCB\u1FCD-\u1FCF\u1FD3\u1FDB\u1FDD-\u1FDF\u1FE3\u1FEB\u1FED-\u1FEF\u1FF9\u1FFB\u1FFD-\u1FFE\u2000-\u200A\u2011\u2017\u2024-\u2026\u202F\u2033-\u2034\u2036-\u2037\u203C\u203E\u2047-\u2049\u2057\u205F\u2070-\u2071\u2074-\u208E\u2090-\u209C\u20A8\u2100-\u2103\u2105-\u2107\u2109-\u2113\u2115-\u2116\u2119-\u211D\u2120-\u2122\u2124\u2126\u2128\u212A-\u212D\u212F-\u2131\u2133-\u2139\u213B-\u2140\u2145-\u2149\u2150-\u217F\u2189\u222C-\u222D\u222F-\u2230\u2329-\u232A\u2460-\u24EA\u2A0C\u2A74-\u2A76\u2ADC\u2C7C-\u2C7D\u2D6F\u2E9F\u2EF3\u2F00-\u2FD5\u3000\u3036\u3038-\u303A\u309B-\u309C\u309F\u30FF\u3131-\u318E\u3192-\u319F\u3200-\u321E\u3220-\u3247\u3250-\u327E\u3280-\u33FF\uA69C-\uA69D\uA770\uA7F2-\uA7F4\uA7F8-\uA7F9\uAB5C-\uAB5F\uAB69\uF900-\uFA0D\uFA10\uFA12\uFA15-\uFA1E\uFA20\uFA22\uFA25-\uFA26\uFA2A-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE10-\uFE19\uFE30-\uFE44\uFE47-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE72\uFE74\uFE76-\uFEFC\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6"),hC}var Mo={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3},kI=250,MI=-50,DI=-400,uC={"\u2010":"-","\u2018":"'","\u2019":"'","\u201A":"'","\u201B":"'","\u201C":'"',"\u201D":'"',"\u201E":'"',"\u201F":'"',"\xBC":"1/4","\xBD":"1/2","\xBE":"3/4"},pC=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]),fC,RI=new RegExp("\\p{M}+","gu"),LI=new RegExp("([.*+?^${}()|[\\]\\\\])|(\\p{P})|(\\s+)|(\\p{M})|(\\p{L})","gu"),OI=new RegExp("([^\\p{M}])\\p{M}*$","u"),NI=new RegExp("^\\p{M}*([^\\p{M}])","u"),FI=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,mC=new Map,BI="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",gC=new Map,fy=null,my=null;function gy(r){let t=[],e;for(;(e=FI.exec(r))!==null;){let{index:g}=e;for(let _ of e[0]){let y=mC.get(_);y||(y=_.normalize("NFD").length,mC.set(_,y)),t.push([y,g++])}}let i;if(t.length===0&&fy)i=fy;else if(t.length>0&&my)i=my;else{let g=Object.keys(uC).join(""),_=II(),I=`([${g}])|([${_}])|((?:\u3099|\u309A)\\n)|(\\p{M}+(?:-\\n)?)|(\\p{Ll}-\\n\\p{Lu})|(\\S-\\n)|((?:\\p{Ideographic}|[\u3040-\u30FF])\\n)|(\\n)`;t.length===0?i=fy=new RegExp(I+"|(\\u0000)","gum"):i=my=new RegExp(I+`|(${BI})`,"gum")}let n=[];for(;(e=RI.exec(r))!==null;)n.push([e[0].length,e.index]);let s=r.normalize("NFD"),o=[[0,0]],l=0,c=0,h=0,d=0,u=0,p=!1;return s=s.replace(i,(g,_,y,C,x,I,A,E,L,v,S)=>{var M,T,N;if(S-=d,_){let B=uC[_],W=B.length;for(let $=1;$<W;$++)o.push([S-h+$,h-$]);return h-=W-1,B}if(y){let B=gC.get(y);B||(B=y.normalize("NFKC"),gC.set(y,B));let W=B.length;for(let $=1;$<W;$++)o.push([S-h+$,h-$]);return h-=W-1,B}if(C)return p=!0,S+u===((M=n[l])==null?void 0:M[1])?++l:(o.push([S-1-h+1,h-1]),h-=1,d+=1),o.push([S-h+1,h]),d+=1,u+=1,C.charAt(0);if(x){let B=x.endsWith(`
24`),W=B?x.length-2:x.length;p=!0;let $=W;S+u===((T=n[l])==null?void 0:T[1])&&($-=n[l][0],++l);for(let X=1;X<=$;X++)o.push([S-1-h+X,h-X]);return h-=$,d+=$,B?(S+=W-1,o.push([S-h+1,1+h]),h+=1,d+=1,u+=1,x.slice(0,W)):x}if(I)return o.push([S-h+3,1+h]),h+=1,d+=1,u+=1,I.replace(`
25`,"");if(A){let B=A.length-2;return o.push([S-h+B,1+h]),h+=1,d+=1,u+=1,A.slice(0,-2)}if(E){let B=E.length-1;return o.push([S-h+B,h]),d+=1,u+=1,E.slice(0,-1)}if(L)return o.push([S-h+1,h-1]),h-=1,d+=1,u+=1," ";if(S+u===((N=t[c])==null?void 0:N[1])){let B=t[c][0]-1;++c;for(let W=1;W<=B;W++)o.push([S-(h-W),h-W]);h-=B,d+=B}return v}),o.push([s.length,h]),[s,o,p]}function zI(r,t,e){if(!r)return[t,e];let i=t,n=t+e-1,s=Hh(r,d=>d[0]>=i);r[s][0]>i&&--s;let o=Hh(r,d=>d[0]>=n,s);r[o][0]>n&&--o;let l=i+r[s][1],h=n+r[o][1]+1-l;return[l,h]}var Ke,ec,da,st,jC,Cy,Ey,HC,UC,Sy,WC,GC,sm,Rh,ql,$C,Py,Ty,om,YC,Iy,ky,Lh,Ay=class{constructor({linkService:t,eventBus:e,updateMatchesCountOnProgress:i=!0}){b(this,st);b(this,Ke,null);b(this,ec,!0);b(this,da,0);this._linkService=t,this._eventBus=e,m(this,ec,i),this.onIsPageVisible=null,f(this,st,Cy).call(this),e._on("find",f(this,st,jC).bind(this)),e._on("findbarclose",f(this,st,YC).bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return a(this,Ke)}setDocument(t){this._pdfDocument&&f(this,st,Cy).call(this),t&&(this._pdfDocument=t,this._firstPageCapability.resolve())}scrollMatchIntoView({element:t=null,selectedLeft:e=0,pageIndex:i=-1,matchIndex:n=-1}){if(!this._scrollMatches||!t)return;if(n===-1||n!==this._selected.matchIdx)return;if(i===-1||i!==this._selected.pageIdx)return;this._scrollMatches=!1;
25let s={top:MI,left:e+DI};zC(t,s,!0)}match(t,e,i){let n=this._hasDiacritics[i],s=!1;if(typeof t=="string"?[s,t]=f(this,st,Sy).call(this,t,n):t=t.sort().reverse().map(u=>{let[p,g]=f(this,st,Sy).call(this,u,n);return s||(s=p),`(${g})`}).join("|"),!t)return;let{caseSensitive:o,entireWord:l}=a(this,Ke),c=`g${s?"u":""}${o?"":"i"}`;t=new RegExp(t,c);let h=[],d;for(;(d=t.exec(e))!==null;)l&&!f(this,st,UC).call(this,e,d.index,d[0].length)||h.push({index:d.index,length:d[0].length});return h}};Ke=new WeakMap,ec=new WeakMap,da=new WeakMap,st=new WeakSet,jC=function(t){if(!t)return;let e=this._pdfDocument,{type:i}=t;(a(this,Ke)===null||f(this,st,HC).call(this,t))&&(this._dirtyMatch=!0),m(this,Ke,t),i!=="highlightallchange"&&f(this,st,Lh).call(this,Mo.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||e&&this._pdfDocument!==e)return;f(this,st,GC).call(this);let n=!this._highlightMatches,s=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),i?this._dirtyMatch?f(this,st,ql).call(this):i==="again"?(f(this,st,ql).call(this),n&&a(this,Ke).highlightAll&&f(this,st,Rh).call(this)):i==="highlightallchange"?(s?f(this,st,ql).call(this):this._highlightMatches=!0,f(this,st,Rh).call(this)):f(this,st,ql).call(this):this._findTimeout=setTimeout(()=>{f(this,st,ql).call(this),this._findTimeout=null},kI)})},Cy=function(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],m(this,da,0),m(this,Ke,null),this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=Promise.withResolvers()},Ey=function(){let{query:t}=a(this,Ke);return typeof t=="string"?(t!==this._rawQuery&&(this._rawQuery=t,[this._normalizedQuery]=gy(t)),this._normalizedQuery):(t||[]).filter(e=>!!e).map(e=>gy(e)[0])},HC=function(t){var o,l;let e=t.query,i=a(this,Ke).query,n=typeof e;if(n!==typeof i)return!0;if(n==="string"){if(e!==i)return!0}else if(JSON.stringify(e)!==JSON.stringify(i))return!0;switch(t.type){case"again":let c=this._selected.pageIdx+1,h=this._linkService;return c>=1&&c<=h.pagesCount&&c!==h.page&&!((l=(o=this.onIsPageVisible)==null?void 0:o.call(this,c))==null||l);case"highlightallchange":return!1}return!0},UC=function(t,e,i){let n=t.slice(0,e).match(OI);if(n){let s=t.charCodeAt(e),o=n[1].charCodeAt(0);if(tm(s)===tm(o))return!1}if(n=t.slice(e+i).match(NI),n){let s=t.charCodeAt(e+i-1),o=n[1].charCodeAt(0);if(tm(s)===tm(o))return!1}return!0},Sy=function(t,e){let{matchDiacritics:i}=a(this,Ke),n=!1;t=t.replaceAll(LI,(o,l,c,h,d,u)=>l?`[ ]*\\${l}[ ]*`:c?`[ ]*${c}[ ]*`:h?"[ ]+":i?d||u:d?pC.has(d.charCodeAt(0))?d:"":e?(n=!0,`${u}\\p{M}*`):u);let s="[ ]*";return t.endsWith(s)&&(t=t.slice(0,t.length-s.length)),i&&e&&(fC||(fC=String.fromCharCode(...pC)),n=!0,t=`${t}(?=[${fC}]|[^\\p{M}]|$)`),[n,t]},WC=function(t){let e=a(this,st,Ey);if(e.length===0)return;let i=this._pageContents[t],n=this.match(e,i,t),s=this._pageMatches[t]=[],o=this._pageMatchesLength[t]=[],l=this._pageDiffs[t];n==null||n.forEach(({index:h,length:d})=>{let[u,p]=zI(l,h,d);p&&(s.push(u),o.push(p))}),a(this,Ke).highlightAll&&f(this,st,sm).call(this,t),this._resumePageIdx===t&&(this._resumePageIdx=null,f(this,st,Py).call(this));let c=s.length;this._matchesCountTotal+=c,a(this,ec)?c>0&&f(this,st,ky).call(this):++Ze(this,da)._===this._linkService.pagesCount&&f(this,st,ky).call(this)},GC=function(){if(this._extractTextPromises.length>0)return;let t=Promise.resolve(),e={disableNormalization:!0};for(let i=0,n=this._linkService.pagesCount;i<n;i++){let{promise:s,resolve:o}=Promise.withResolvers();this._extractTextPromises[i]=s,t=t.then(()=>this._pdfDocument.getPage(i+1).then(l=>l.getTextContent(e)).then(l=>{let c=[];for(let h of l.items)c.push(h.str),h.hasEOL&&c.push(`
26`);[this._pageContents[i],this._pageDiffs[i],this._hasDiacritics[i]]=gy(c.join("")),o()},l=>{console.error(`Unable to get text content for page ${i+1}`,l),this._pageContents[i]="",this._pageDiffs[i]=null,this._hasDiacritics[i]=!1,o()}))}},sm=function(t){this._scrollMatches&&this._selected.pageIdx===t&&(this._linkService.page=t+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:t})},Rh=function(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})},ql=function(){let t=a(this,Ke).findPrevious,e=this._linkService.page-1,i=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=e,this._offset.matchI
26dx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,m(this,da,0),this._matchesCountTotal=0,f(this,st,Rh).call(this);for(let o=0;o<i;o++)this._pendingFindMatches.has(o)||(this._pendingFindMatches.add(o),this._extractTextPromises[o].then(()=>{this._pendingFindMatches.delete(o),f(this,st,WC).call(this,o)}))}if(a(this,st,Ey).length===0){f(this,st,Lh).call(this,Mo.FOUND);return}if(this._resumePageIdx)return;let s=this._offset;if(this._pagesToSearch=i,s.matchIdx!==null){let o=this._pageMatches[s.pageIdx].length;if(!t&&s.matchIdx+1<o||t&&s.matchIdx>0){s.matchIdx=t?s.matchIdx-1:s.matchIdx+1,f(this,st,om).call(this,!0);return}f(this,st,Ty).call(this,t)}f(this,st,Py).call(this)},$C=function(t){let e=this._offset,i=t.length,n=a(this,Ke).findPrevious;return i?(e.matchIdx=n?i-1:0,f(this,st,om).call(this,!0),!0):(f(this,st,Ty).call(this,n),e.wrapped&&(e.matchIdx=null,this._pagesToSearch<0)?(f(this,st,om).call(this,!1),!0):!1)},Py=function(){this._resumePageIdx!==null&&console.error("There can only be one pending page.");let t=null;do{let e=this._offset.pageIdx;if(t=this._pageMatches[e],!t){this._resumePageIdx=e;break}}while(!f(this,st,$C).call(this,t))},Ty=function(t){let e=this._offset,i=this._linkService.pagesCount;e.pageIdx=t?e.pageIdx-1:e.pageIdx+1,e.matchIdx=null,this._pagesToSearch--,(e.pageIdx>=i||e.pageIdx<0)&&(e.pageIdx=t?i-1:0,e.wrapped=!0)},om=function(t=!1){let e=Mo.NOT_FOUND,i=this._offset.wrapped;if(this._offset.wrapped=!1,t){let n=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,e=i?Mo.WRAPPED:Mo.FOUND,n!==-1&&n!==this._selected.pageIdx&&f(this,st,sm).call(this,n)}f(this,st,Lh).call(this,e,a(this,Ke).findPrevious),this._selected.pageIdx!==-1&&(this._scrollMatches=!0,f(this,st,sm).call(this,this._selected.pageIdx))},YC=function(t){let e=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||e&&this._pdfDocument!==e||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),f(this,st,Lh).call(this,Mo.FOUND),this._highlightMatches=!1,f(this,st,Rh).call(this))})},Iy=function(){var s;let{pageIdx:t,matchIdx:e}=this._selected,i=0,n=this._matchesCountTotal;if(e!==-1){for(let o=0;o<t;o++)i+=((s=this._pageMatches[o])==null?void 0:s.length)||0;i+=e+1}return(i<1||i>n)&&(i=n=0),{current:i,total:n}},ky=function(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:f(this,st,Iy).call(this)})},Lh=function(t,e=!1){var i,n,s,o;!a(this,ec)&&(a(this,da)!==this._linkService.pagesCount||t===Mo.PENDING)||this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:t,previous:e,entireWord:(n=(i=a(this,Ke))==null?void 0:i.entireWord)!=null?n:null,matchesCount:f(this,st,Iy).call(this),rawQuery:(o=(s=a(this,Ke))==null?void 0:s.query)!=null?o:null})};var VI="noopener noreferrer nofollow",oa={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},Sm,XC,Pm=class Pm{externalLinkEnabled=!0;constructor({eventBus:t,externalLinkTarget:e=null,externalLinkRel:i=null,ignoreDestinationZoom:n=!1}={}){this.eventBus=t,this.externalLinkTarget=e,this.externalLinkRel=i,this._ignoreDestinationZoom=n,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}setDocument(t,e=null){this.baseUrl=e,this.pdfDocument=t}setViewer(t){this.pdfViewer=t}setHistory(t){this.pdfHistory=t}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfDocument?this.pdfViewer.currentPageNumber:1}set page(t){this.pdfDocument&&(this.pdfViewer.currentPageNumber=t)}get rotation(){return this.pdfDocument?this.pdfViewer.pagesRotation:0}set rotation(t){this.pdfDocument&&(this.pdfViewer.pagesRotation=t)}get isInPresentationMode(){return this.pdfDocument?this.pdfViewer.isInPresentationMode:!1}goToDestination(t){return O(this,null,function*(){if(!this.pdfDocument)return;let e,i,n;if(typeof t=="string"?(e=t,i=yield this.pdfDocument.getDestination(t)):(e=null,i=yield t),!Array.isArray(i)){console.error(`goToDestination: "${i}" is not a valid destination array, for dest="${t}".`);return}let[s]=i;if(s&&typeof s=="object"){if(n=this.pdfDocument.cachedPageNumber(s),!n)try{n=(yield this.pdfDocument.getPageIndex(s))+1}catch{console.error(`goToDestination: "${s}" is not a valid page reference, for dest="${t}".`);return}}else Number.isInteger(s)&&(n=s+1);if(!n||n<1||n>this.pagesCount){console.error(`goToDestination: "${n}" is not a valid page number, for dest="${t}".`);return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:e,explicitDest:i,pageNumber:n})),this.pdfViewer.scrollPageIntoView({pageNumber:n,destArray:i,ignoreDestinationZoom:this._ignoreDestinationZoom})})}goToPage(t){if(!this.pdfDocument)return;let e=typeof t=="string"&&this.pdfViewer.pageLabelToPageNumber(t)||t|0;if(!(Number.isInteger(e)&&e>0&&e<=this.pagesCount)){console.error(`PDFLinkService.goToPage: "${t}" is not a valid page.`);return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(e)),this.pdfViewer.scrollPageIntoView({pageNumber:e})}addLinkAttributes(t,e,i=!1){if(!e||typeof e!="string")throw new Error('A valid "url" parameter must provided.');let n=i?oa.BLANK:this.externalLinkTarget,s=this.externalLinkRel;this.externalLinkEnabled?t.href=t.title=e:(t.href="",t.title=`Disabled: ${e}`,t.onclick=()=>!1);let o="";switch(n){case oa.NONE:break;case oa.SELF:o="_self";break;case oa.BLANK:o="_blank";break;case oa.PARENT:o="_parent";break;case oa.TOP:o="_top";break}
26t.target=o,t.rel=typeof s=="string"?s:VI}getDestinationHash(t){if(typeof t=="string"){if(t.length>0)return this.getAnchorUrl("#"+escape(t))}else if(Array.isArray(t)){let e=JSON.stringify(t);if(e.length>0)return this.getAnchorUrl("#"+escape(e))}return this.getAnchorUrl("")}getAnchorUrl(t){return this.baseUrl?this.baseUrl+t:t}setHash(t){var n;if(!this.pdfDocument)return;let e,i;if(t.includes("=")){let s=Im(t);if(s.has("search")){let o=s.get("search").replaceAll('"',""),l=s.get("phrase")==="true";this.eventBus.dispatch("findfromurlhash",{source:this,query:l?o:o.match(/\S+/g)})}if(s.has("page")&&(e=s.get("page")|0||1),s.has("zoom")){let o=s.get("zoom").split(","),l=o[0],c=parseFloat(l);l.includes("Fit")?l==="Fit"||l==="FitB"?i=[null,{name:l}]:l==="FitH"||l==="FitBH"||l==="FitV"||l==="FitBV"?i=[null,{name:l},o.length>1?o[1]|0:null]:l==="FitR"?o.length!==5?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):i=[null,{name:l},o[1]|0,o[2]|0,o[3]|0,o[4]|0]:console.error(`PDFLinkService.setHash: "${l}" is not a valid zoom value.`):i=[null,{name:"XYZ"},o.length>1?o[1]|0:null,o.length>2?o[2]|0:null,c?c/100:l]}i?this.pdfViewer.scrollPageIntoView({pageNumber:e||this.page,destArray:i,allowNegativeOffset:!0}):e&&(this.page=e),s.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:s.get("pagemode")}),s.has("nameddest")&&this.goToDestination(s.get("nameddest"));return}i=unescape(t);try{i=JSON.parse(i),Array.isArray(i)||(i=i.toString())}catch{}if(typeof i=="string"||f(n=Pm,Sm,XC).call(n,i)){this.goToDestination(i);return}console.error(`PDFLinkService.setHash: "${unescape(t)}" is not a valid destination.`)}executeNamedAction(t){var e,i;if(this.pdfDocument){switch(t){case"GoBack":(e=this.pdfHistory)==null||e.back();break;case"GoForward":(i=this.pdfHistory)==null||i.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break;default:break}this.eventBus.dispatch("namedaction",{source:this,action:t})}}executeSetOCGState(t){return O(this,null,function*(){if(!this.pdfDocument)return;let e=this.pdfDocument,i=yield this.pdfViewer.optionalContentConfigPromise;e===this.pdfDocument&&(i.setOCGState(t),this.pdfViewer.optionalContentConfigPromise=Promise.resolve(i))})}};Sm=new WeakSet,XC=function(t){if(!Array.isArray(t)||t.length<2)return!1;let[e,i,...n]=t;if(!(typeof e=="object"&&Number.isInteger(e==null?void 0:e.num)&&Number.isInteger(e==null?void 0:e.gen))&&!Number.isInteger(e)||!(typeof i=="object"&&typeof(i==null?void 0:i.name)=="string"))return!1;let s=n.length,o=!0;switch(i.name){case"XYZ":if(s<2||s>3)return!1;break;case"Fit":case"FitB":return s===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(s>1)return!1;break;case"FitR":if(s!==4)return!1;o=!1;break;default:return!1}for(let l of n)if(!(typeof l=="number"||o&&l===null))return!1;return!0},b(Pm,Sm);var mm=Pm,Uh=class extends mm{setDocument(t,e=null){}},{AbortException:jI,AnnotationEditorLayer:HI,AnnotationEditorParamsType:C2,AnnotationEditorType:ji,AnnotationEditorUIManager:UI,AnnotationLayer:WI,AnnotationMode:Gs,build:E2,ColorPicker:S2,createValidAbsoluteUrl:GI,DOMSVGFactory:P2,DrawLayer:$I,FeatureTest:T2,fetchData:_C,getDocument:I2,getFilenameFromUrl:k2,getPdfFilenameFromUrl:YI,getXfaPageViewport:M2,GlobalWorkerOptions:D2,ImageKind:R2,InvalidPDFException:L2,isDataScheme:O2,isPdfFile:XI,MissingPDFException:N2,noContextMenu:F2,normalizeUnicode:KI,OPS:B2,OutputScale:qI,PasswordResponses:z2,PDFDataRangeTransport:V2,PDFDateString:j2,PDFWorker:H2,PermissionFlag:em,PixelsPerInch:zs,RenderingCancelledException:My,setLayerDimensions:ZI,shadow:gm,TextLayer:QI,UnexpectedResponseException:U2,Util:W2,VerbosityLevel:G2,version:bC,XfaLayer:_y}=globalThis.pdfjsLib,Gh,No,$h,Dy,_m=class{constructor({pdfPage:t,linkService:e,downloadManager:i,annotationStorage:n=null,imageResourcesPath:s="",renderForms:o=!0,enableScripting:l=!1,hasJSActionsPromise:c=null,fieldObjectsPromise:h=null,annotationCanvasMap:d=null,accessibilityManager:u=null,annotationEditorUIManager:p=null,onAppend:g=null}){b(this,$h);b(this,Gh,null);b(this,No,null);this.pdfPage=t,this.linkService=e,this.downloadManager=i,this.imageResourcesPath=s,this.renderForms=o,this.annotationStorage=n,this.enableScripting=l,this._hasJSActionsProm
26ise=c||Promise.resolve(!1),this._fieldObjectsPromise=h||Promise.resolve(null),this._annotationCanvasMap=d,this._accessibilityManager=u,this._annotationEditorUIManager=p,m(this,Gh,g),this.annotationLayer=null,this.div=null,this._cancelled=!1,this._eventBus=e.eventBus}render(t,e,i="display"){return O(this,null,function*(){var c,h;if(this.div){if(this._cancelled||!this.annotationLayer)return;this.annotationLayer.update({viewport:t.clone({dontFlip:!0})});return}let[n,s,o]=yield Promise.all([this.pdfPage.getAnnotations({intent:i}),this._hasJSActionsPromise,this._fieldObjectsPromise]);if(this._cancelled)return;let l=this.div=document.createElement("div");if(l.className="annotationLayer",(c=a(this,Gh))==null||c.call(this,l),n.length===0){this.hide();return}this.annotationLayer=new WI({div:l,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,annotationEditorUIManager:this._annotationEditorUIManager,page:this.pdfPage,viewport:t.clone({dontFlip:!0}),structTreeLayer:(e==null?void 0:e.structTreeLayer)||null}),yield this.annotationLayer.render({annotations:n,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:s,fieldObjects:o}),this.linkService.isInPresentationMode&&f(this,$h,Dy).call(this,Jl.FULLSCREEN),a(this,No)||(m(this,No,new AbortController),(h=this._eventBus)==null||h._on("presentationmodechanged",d=>{f(this,$h,Dy).call(this,d.state)},{signal:a(this,No).signal}))})}cancel(){var t;this._cancelled=!0,(t=a(this,No))==null||t.abort(),m(this,No,null)}hide(){this.div&&(this.div.hidden=!0)}hasEditableAnnotations(){var t;return!!((t=this.annotationLayer)!=null&&t.hasEditableAnnotations())}};Gh=new WeakMap,No=new WeakMap,$h=new WeakSet,Dy=function(t){if(!this.div)return;let e=!1;switch(t){case Jl.FULLSCREEN:e=!0;break;case Jl.NORMAL:break;default:return}for(let i of this.div.childNodes)i.hasAttribute("data-internal-link")||(i.inert=e)};function yC(r,t){let e=document.createElement("a");if(!e.click)throw new Error('DownloadManager: "a.click()" is not supported.');e.href=r,e.target="_parent","download"in e&&(e.download=t),(document.body||document.documentElement).append(e),e.click(),e.remove()}var v0,Ry=class{constructor(){b(this,v0,new WeakMap)}downloadData(t,e,i){let n=URL.createObjectURL(new Blob([t],{type:i}));yC(n,e)}openOrDownloadData(t,e,i=null){let s=XI(e)?"application/pdf":"";return this.downloadData(t,e,s),!1}download(t,e,i){let n;if(t)n=URL.createObjectURL(new Blob([t],{type:"application/pdf"}));else{if(!GI(e,"http://example.com")){console.error(`download - not a valid URL: ${e}`);return}n=e+"#pdfjs.action=download"}yC(n,i)}};v0=new WeakMap;var vC={EVENT:"event",TIMEOUT:"timeout"};function JI(i){return O(this,arguments,function*({target:r,name:t,delay:e=0}){if(typeof r!="object"||!(t&&typeof t=="string")||!(Number.isInteger(e)&&e>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");let{promise:n,resolve:s}=Promise.withResolvers(),o=new AbortController;function l(d){o.abort(),clearTimeout(h),s(d)}let c=r instanceof bm?"_on":"addEventListener";r[c](t,l.bind(null,vC.EVENT),{signal:o.signal});let h=setTimeout(l.bind(null,vC.TIMEOUT),e);return n})}var ic,bm=class{constructor(){b(this,ic,Object.create(null))}on(t,e,i=null){this._on(t,e,{external:!0,once:i==null?void 0:i.once,signal:i==null?void 0:i.signal})}off(t,e,i=null){this._off(t,e)}dispatch(t,e){let i=a(this,ic)[t];if(!i||i.length===0)return;let n;for(let{listener:s,external:o,once:l}of i.slice(0)){if(l&&this._off(t,s),o){(n||(n=[])).push(s);continue}s(e)}if(n){for(let s of n)s(e);n=null}}_on(t,e,i=null){var o;let n=null;if((i==null?void 0:i.signal)instanceof AbortSignal){let{signal:l}=i;if(l.aborted){console.error("Cannot use an `aborted` signal.");return}let c=()=>this._off(t,e);n=()=>l.removeEventListener("abort",c),l.addEventListener("abort",c)}((o=a(this,ic))[t]||(o[t]=[])).push({listener:e,external:(i==null?void 0:i.external)===!0,once:(i==null?void 0:i.once)===!0,rmAbort:n})}_off(t,e,i=null){var s;let n=a(this,ic)[t];if(n)for(let o=0,l=n.length;o<l;o++){let c=n[o];if(c.listener===e){(s=c.rmAbort)==null||s.call(c),n.splice(o,1);return}}}};ic=new WeakMap;var _c=class{constructor(t){this.value=t}valueOf(){return this.value}},be=class extends _c{constructor(t="???"){super(t)}toString(t){return`{${this.value}}`}},An=class extends _c{constructor(t,e={}){super(t),this.opts=e}
26toString(t){try{return t.memoizeIntlObject(Intl.NumberFormat,this.opts).format(this.value)}catch(e){return t.reportError(e),this.value.toString(10)}}},Ea=class extends _c{constructor(t,e={}){super(t),this.opts=e}toString(t){try{return t.memoizeIntlObject(Intl.DateTimeFormat,this.opts).format(this.value)}catch(e){return t.reportError(e),new Date(this.value).toISOString()}}},xC=100,tk="\u2068",ek="\u2069";function ik(r,t,e){if(e===t||e instanceof An&&t instanceof An&&e.value===t.value)return!0;if(t instanceof An&&typeof e=="string"){let i=r.memoizeIntlObject(Intl.PluralRules,t.opts).select(t.value);if(e===i)return!0}return!1}function wC(r,t,e){return t[e]?bc(r,t[e].value):(r.reportError(new RangeError("No default")),new be)}function Ly(r,t){let e=[],i=Object.create(null);for(let n of t)n.type==="narg"?i[n.name]=Wh(r,n.value):e.push(Wh(r,n));return{positional:e,named:i}}function Wh(r,t){switch(t.type){case"str":return t.value;case"num":return new An(t.value,{minimumFractionDigits:t.precision});case"var":return nk(r,t);case"mesg":return sk(r,t);case"term":return ok(r,t);case"func":return rk(r,t);case"select":return ak(r,t);default:return new be}}function nk(r,{name:t}){let e;if(r.params)if(Object.prototype.hasOwnProperty.call(r.params,t))e=r.params[t];else return new be(`$${t}`);else if(r.args&&Object.prototype.hasOwnProperty.call(r.args,t))e=r.args[t];else return r.reportError(new ReferenceError(`Unknown variable: $${t}`)),new be(`$${t}`);if(e instanceof _c)return e;switch(typeof e){case"string":return e;case"number":return new An(e);case"object":if(e instanceof Date)return new Ea(e.getTime());default:return r.reportError(new TypeError(`Variable type not supported: $${t}, ${typeof e}`)),new be(`$${t}`)}}function sk(r,{name:t,attr:e}){let i=r.bundle._messages.get(t);if(!i)return r.reportError(new ReferenceError(`Unknown message: ${t}`)),new be(t);if(e){let n=i.attributes[e];return n?bc(r,n):(r.reportError(new ReferenceError(`Unknown attribute: ${e}`)),new be(`${t}.${e}`))}return i.value?bc(r,i.value):(r.reportError(new ReferenceError(`No value: ${t}`)),new be(t))}function ok(r,{name:t,attr:e,args:i}){let n=`-${t}`,s=r.bundle._terms.get(n);if(!s)return r.reportError(new ReferenceError(`Unknown term: ${n}`)),new be(n);if(e){let l=s.attributes[e];if(l){r.params=Ly(r,i).named;let c=bc(r,l);return r.params=null,c}return r.reportError(new ReferenceError(`Unknown attribute: ${e}`)),new be(`${n}.${e}`)}r.params=Ly(r,i).named;let o=bc(r,s.value);return r.params=null,o}function rk(r,{name:t,args:e}){let i=r.bundle._functions[t];if(!i)return r.reportError(new ReferenceError(`Unknown function: ${t}()`)),new be(`${t}()`);if(typeof i!="function")return r.reportError(new TypeError(`Function ${t}() is not callable`)),new be(`${t}()`);try{let n=Ly(r,e);return i(n.positional,n.named)}catch(n){return r.reportError(n),new be(`${t}()`)}}function ak(r,{selector:t,variants:e,star:i}){let n=Wh(r,t);if(n instanceof be)return wC(r,e,i);for(let s of e){let o=Wh(r,s.key);if(ik(r,n,o))return bc(r,s.value)}return wC(r,e,i)}function KC(r,t){if(r.dirty.has(t))return r.reportError(new RangeError("Cyclic reference")),new be;r.dirty.add(t);let e=[],i=r.bundle._useIsolating&&t.length>1;for(let n of t){if(typeof n=="string"){e.push(r.bundle._transform(n));continue}if(r.placeables++,r.placeables>xC)throw r.dirty.delete(t),new RangeError(`Too many placeables expanded: ${r.placeables}, max allowed is ${xC}`);i&&e.push(tk),e.push(Wh(r,n).toString(r)),i&&e.push(ek)}return r.dirty.delete(t),e.join("")}function bc(r,t){return typeof t=="string"?r.bundle._transform(t):KC(r,t)}var Oy=class{constructor(t,e,i){this.dirty=new WeakSet,this.params=null,this.placeables=0,this.bundle=t,this.errors=e,this.args=i}reportError(t){if(!this.errors||!(t instanceof Error))throw t;this.errors.push(t)}memoizeIntlObject(t,e){let i=this.bundle._intls.get(t);i||(i={},this.bundle._intls.set(t,i));let n=JSON.stringify(e);return i[n]||(i[n]=new t(this.bundle.locales,e)),i[n]}};function ym(r,t){let e=Object.create(null);for(let[i,n]of Object.entries(r))t.includes(i)&&(e[i]=n.valueOf());return e}var AC=["unitDisplay","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function lk(r,t){let e=r[0];if(e instanceof be)return new be(`NUMBER(${e.valueOf()})`);
26if(e instanceof An)return new An(e.valueOf(),ft(ft({},e.opts),ym(t,AC)));if(e instanceof Ea)return new An(e.valueOf(),ft({},ym(t,AC)));throw new TypeError("Invalid argument to NUMBER")}var CC=["dateStyle","timeStyle","fractionalSecondDigits","dayPeriod","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function ck(r,t){let e=r[0];if(e instanceof be)return new be(`DATETIME(${e.valueOf()})`);if(e instanceof Ea)return new Ea(e.valueOf(),ft(ft({},e.opts),ym(t,CC)));if(e instanceof An)return new Ea(e.valueOf(),ft({},ym(t,CC)));throw new TypeError("Invalid argument to DATETIME")}var EC=new Map;function dk(r){let t=Array.isArray(r)?r.join(" "):r,e=EC.get(t);return e===void 0&&(e=new Map,EC.set(t,e)),e}var Ny=class{constructor(t,{functions:e,useIsolating:i=!0,transform:n=s=>s}={}){this._terms=new Map,this._messages=new Map,this.locales=Array.isArray(t)?t:[t],this._functions=ft({NUMBER:lk,DATETIME:ck},e),this._useIsolating=i,this._transform=n,this._intls=dk(t)}hasMessage(t){return this._messages.has(t)}getMessage(t){return this._messages.get(t)}addResource(t,{allowOverrides:e=!1}={}){let i=[];for(let n=0;n<t.body.length;n++){let s=t.body[n];if(s.id.startsWith("-")){if(e===!1&&this._terms.has(s.id)){i.push(new Error(`Attempt to override an existing term: "${s.id}"`));continue}this._terms.set(s.id,s)}else{if(e===!1&&this._messages.has(s.id)){i.push(new Error(`Attempt to override an existing message: "${s.id}"`));continue}this._messages.set(s.id,s)}}return i}formatPattern(t,e=null,i=null){if(typeof t=="string")return this._transform(t);let n=new Oy(this,i,e);try{return KC(n,t).toString(n)}catch(s){if(n.errors&&s instanceof Error)return n.errors.push(s),new be().toString(n);throw s}}}
vendor: 4,617 bytes, lines 26-27
26,by=/^(-?[a-zA-Z][\w-]*) *= */gm,SC=/\.([a-zA-Z][\w-]*) *= */y,hk=/\*?\[/y,yy=/(-?[0-9]+(?:\.([0-9]+))?)/y,uk=/([a-zA-Z][\w-]*)/y,PC=/([$-])?([a-zA-Z][\w-]*)(?:\.([a-zA-Z][\w-]*))?/y,pk=/^[A-Z][A-Z0-9_-]*$/,im=/([^{}\n\r]+)/y,fk=/([^\\"\n\r]*)/y,TC=/\\([\\"])/y,IC=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{6})/y,mk=/^\n+/,kC=/ +$/,gk=/ *\r?\n/g,_k=/( *)$/,bk=/{\s*/y,MC=/\s*}/y,yk=/\[\s*/y,vk=/\s*] */y,xk=/\s*\(\s*/y,wk=/\s*->\s*/y,Ak=/\s*:\s*/y,Ck=/\s*,?\s*/y,Ek=/\s+/y,Fy=class{constructor(t){this.body=[],by.lastIndex=0;let e=0;for(;;){let T=by.exec(t);if(T===null)break;e=by.lastIndex;try{this.body.push(c(T[1]))}catch(N){if(N instanceof SyntaxError)continue;throw N}}function i(T){return T.lastIndex=e,T.test(t)}function n(T,N){if(t[e]===T)return e++,!0;if(N)throw new N(`Expected ${T}`);return!1}function s(T,N){if(i(T))return e=T.lastIndex,!0;if(N)throw new N(`Expected ${T.toString()}`);return!1}function o(T){T.lastIndex=e;let N=T.exec(t);if(N===null)throw new SyntaxError(`Expected ${T.toString()}`);return e=T.lastIndex,N}function l(T){return o(T)[1]}function c(T){let N=d(),B=h();if(N===null&&Object.keys(B).length===0)throw new SyntaxError("Expected message value or attributes");return{id:T,value:N,attributes:B}}function h(){let T=Object.create(null);for(;i(SC);){let N=l(SC),B=d();if(B===null)throw new SyntaxError("Expected attribute value");T[N]=B}return T}function d(){let T;if(i(im)&&(T=l(im)),t[e]==="{"||t[e]==="}")return u(T?[T]:[],1/0);let N=v();return N?T?u([T,N],N.length):(N.value=S(N.value,mk),u([N],N.length)):T?S(T,kC):null}function u(T=[],N){for(;;){if(i(im)){T.push(l(im));continue}if(t[e]==="{"){T.push(p());continue}if(t[e]==="}")throw new SyntaxError("Unbalanced closing brace");let X=v();if(X){T.push(X),N=Math.min(N,X.length);continue}break}let B=T.length-1,W=T[B];typeof W=="string"&&(T[B]=S(W,kC));let $=[];for(let X of T)X instanceof vm&&(X=X.value.slice(0,X.value.length-N)),X&&$.push(X);return $}function p(){s(bk,SyntaxError);let T=g();if(s(MC))return T;if(s(wk)){let N=C();return s(MC,SyntaxError),ft({type:"select",selector:T},N)}throw new SyntaxError("Unclosed placeable")}function g(){if(t[e]==="{")return p();if(i(PC)){let[,T,N,B=null]=o(PC);if(T==="$")return{type:"var",name:N};if(s(xk)){let W=_();if(T==="-")return{type:"term",name:N,attr:B,args:W};if(pk.test(N))return{type:"func",name:N,args:W};throw new SyntaxError("Function names must be all upper-case")}return T==="-"?{type:"term",name:N,attr:B,args:[]}:{type:"mesg",name:N,attr:B}}return I()}function _(){let T=[];for(;;){switch(t[e]){case")":return e++,T;case void 0:throw new SyntaxError("Unclosed argument list")}T.push(y()),s(Ck)}}function y(){let T=g();return T.type!=="mesg"?T:s(Ak)?{type:"narg",name:T.name,value:I()}:T}function C(){let T=[],N=0,B;for(;i(hk);){n("*")&&(B=N);let W=x(),$=d();if($===null)throw new SyntaxError("Expected variant value");T[N++]={key:W,value:$}}if(N===0)return null;if(B===void 0)throw new SyntaxError("Expected default variant");return{variants:T,star:B}}function x(){s(yk,SyntaxError);let T;return i(yy)?T=A():T={type:"str",value:l(uk)},s(vk,SyntaxError),T}function I(){if(i(yy))return A();if(t[e]==='"')return E();throw new SyntaxError("Invalid expression")}function A(){let[,T,N=""]=o(yy),B=N.length;return{type:"num",value:parseFloat(T),precision:B}}function E(){n('"',SyntaxError);let T="";for(;;){if(T+=l(fk),t[e]==="\\"){T+=L();continue}if(n('"'))return{type:"str",value:T};throw new SyntaxError("Unclosed string literal")}}function L(){if(i(TC))return l(TC);if(i(IC)){let[,T,N]=o(IC),B=parseInt(T||N,16);return B<=55295||57344<=B?String.fromCodePoint(B):"\uFFFD"}throw new SyntaxError("Unknown escape sequence")}function v(){let T=e;switch(s(Ek),t[e]){case".":case"[":case"*":case"}":case void 0:return!1;case"{":return M(t.slice(T,e))}return t[e-1]===" "?M(t.slice(T,e)):!1}function S(T,N){return T.replace(N,"")}function M(T){let N=T.replace(gk,`
27`),B=_k.exec(T)[1].length;return new vm(N,B)}}},vm=class{constructor(t,e){this.value=t,this.length=e}},Sk=/<|&#?\w+;/,Pk={"http://www.w3.org/1999/xhtml":["em","strong","small","s","cite","q","dfn","abbr","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","bdi","bdo","span","br","wbr"]},Tk={"http://www.w3.org/1999/xhtml":{global:["title","aria-label","aria-valuetext"],a:["download"],area:["download","alt"],input:["alt","placeholder"],menuitem:["label"],menu:["label"],optgroup:["label"],option:["label"],track:["label"],img:["alt"],textarea:["placeholder"],th:["abbr"]},"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul":{global:["accesskey","aria-label","aria-valuetext","label","t
27itle","tooltiptext"],description:["value"],key:["key","keycode"],label:["value"],textbox:["placeholder","value"]}};function Ik(r,t){let{value:e}=t;if(typeof e=="string")if(r.localName==="title"&&r.namespaceURI==="http://www.w3.org/1999/xhtml")r.textContent=e;else if(!Sk.test(e))r.textContent=e;else{let i=r.ownerDocument.createElementNS("http://www.w3.org/1999/xhtml","template");i.innerHTML=e,kk(i.content,r)}qC(t,r)}function kk(r,t){for(let e of r.childNodes)if(e.nodeType!==e.TEXT_NODE){if(e.hasAttribute("data-l10n-name")){let i=Dk(t,e);r.replaceChild(i,e);continue}if(Lk(e)){let i=Rk(e);r.replaceChild(i,e);continue}console.warn(`An element of forbidden type "${e.localName}" was found in the translation. Only safe text-level elements and elements with data-l10n-name are allowed.`),r.replaceChild(By(e),e)}t.textContent="",t.appendChild(r)}function Mk(r,t){if(!r)return!1;for(let e of r)if(e.name===t)return!0;return!1}function qC(r,t){let e=t.hasAttribute("data-l10n-attrs")?t.getAttribute("data-l10n-attrs").split(",").map(i=>i.trim()):null;for(let i of Array.from(t.attributes))DC(i.name,t,e)&&!Mk(r.attributes,i.name)&&t.removeAttribute(i.name);if(r.attributes)for(let i of Array.from(r.attributes))DC(i.name,t,e)&&t.getAttribute(i.name)!==i.value&&t.setAttribute(i.name,i.value)}function Dk(r,t){let e=t.getAttribute("data-l10n-name"),i=r.querySelector(`[data-l10n-name="${e}"]`);if(!i)return console.warn(`An element named "${e}" wasn't found in the source.`),By(t);if(i.localName!==t.localName)return console.warn(`An element named "${e}" was found in the translation but its type ${t.localName} didn't match the element found in the source (${i.localName}).`),By(t);r.removeChild(i);let n=i.cloneNode(!1);return ZC(t,n)}function Rk(r){let t=r.ownerDocument.createElement(r.localName);return ZC(r,t)}function By(r){return r.ownerDocument.createTextNode(r.textContent)}function Lk(r){let t=Pk[r.namespaceURI];return t&&t.includes(r.localName)}function DC(r,t,e=null){if(e&&e.includes(r))return!0;let i=Tk[t.namespaceURI];if(!i)return!1;let n=r.toLowerCase(),s=t.localName;if(i.global.includes(n))return!0;if(!i[s])return!1;if(i[s].includes(n))return!0;if(t.namespaceURI==="http://www.w3.org/1999/xhtml"&&s==="input"&&n==="value"){let o=t.type.toLowerCase();if(o==="submit"||o==="button"||o==="reset")return!0}return!1}function ZC(r,t){return t.textContent=r.textContent,qC(r,t),t}var zy=class extends Array{static from(t){return t instanceof this?t:new this(t)}};var Vy=class extends zy{constructor(t){if(super(),Symbol.asyncIterator in Object(t))this.iterator=t[Symbol.asyncIterator]();else if(Symbol.iterator in Object(t))this.iterator=t[Symbol.iterator]();else throw new TypeError("Argument must implement the iteration protocol.")}[Symbol.asyncIterator](){let t=this,e=0;return{next(){return O(this,null,function*(){return t.length<=e&&t.push(t.iterator.next()),t[e++]})}}}touchNext(t=1){return O(this,null,function*(){let e=0;for(;e++<t;){let i=this[this.length-1];if(i&&(yield i).done)break;this.push(this.iterator.next())}return this[this.length-1]})}},jy=class{constructor(t=[],e){this.resourceIds=t,this.generateBundles=e,this.onChange(!0)}addResourceIds(t,e=!1){return this.resourceIds.push(...t),this.onChange(e),this.resourceIds.length}removeResourceIds(t){return this.resourceIds=this.resourceIds.filter(e=>!t.includes(e)),this.onChange(),this.resourceIds.length}formatWithFallback(t,e){return O(this,null,function*(){let i=[],n=!1;try{for(var s=N0(this.bundles),o,l,c;o=!(l=yield s.next()).done;o=!1){let h=l.value;n=!0;let d=Fk(e,h,t,i);if(d.size===0)break;if(typeof console<"u"){let u=h.locales[0],p=Array.from(d).join(", ");console.warn(`[fluent] Missing translations in ${u}: ${p}`)}}}catch{c=[l]}finally{try{o&&(l=s.return)&&(yield l.call(s))}finally{if(c)throw c[0]}}return!n&&typeof console<"u"&&console.warn(`[fluent] Request for keys failed because no resource bundles got generated.
28  keys: ${JSON.stringify(t)}.
29  resourceIds: ${JSON.stringify(this.resourceIds)}.`),i})}formatMessages(t){return this.formatWithFallback(t,Nk)}formatValues(t){return this.formatWithFallback(t,Ok)}formatValue(t,e){return O(this,null,function*(){let[i]=yield this.formatValues([{id:t,args:e}]);return i})}handleEvent(){this.onChange()}onChange(t=!1){this.bundles=Vy.from(this.generateBundles(this.resourceIds)),t&&this.bundles.touchNext(2)}};function Ok(r,t,e,i){return e.value?r.formatPattern(e.value,i,t):null}function Nk(r,t,e,i){let n={value:null,attributes:null};e.value&&(n.value=r.formatPattern(e.value,i,t));let s=Object.keys(e.attributes);if(s.length>0){n.attributes=new Array(s.length);for(let[o,l]of s.entries()){let c=r.formatPattern(e.attributes[l],i,t);n.attributes[o]={name:l,value:c}}}return n}function Fk(r,t,e,i){let n=[],s=new Set;return e.forEach(({id:o,args:l},c)=>{if(i[c]!==void 0)return;
29let h=t.getMessage(o);if(h){if(n.length=0,i[c]=r(t,n,h,l),n.length>0&&typeof console<"u"){let d=t.locales[0],u=n.join(", ");console.warn(`[fluent][resolver] errors in ${d}/${o}: ${u}.`)}}else s.add(o)}),s}var ra="data-l10n-id",Dh="data-l10n-args",Bk=`[${ra}]`,Hy=class extends jy{constructor(t,e){super(t,e),this.roots=new Set,this.pendingrAF=null,this.pendingElements=new Set,this.windowElement=null,this.mutationObserver=null,this.observerConfig={attributes:!0,characterData:!1,childList:!0,subtree:!0,attributeFilter:[ra,Dh]}}onChange(t=!1){super.onChange(t),this.roots&&this.translateRoots()}setAttributes(t,e,i){return t.setAttribute(ra,e),i?t.setAttribute(Dh,JSON.stringify(i)):t.removeAttribute(Dh),t}getAttributes(t){return{id:t.getAttribute(ra),args:JSON.parse(t.getAttribute(Dh)||null)}}connectRoot(t){for(let e of this.roots)if(e===t||e.contains(t)||t.contains(e))throw new Error("Cannot add a root that overlaps with existing root.");if(this.windowElement){if(this.windowElement!==t.ownerDocument.defaultView)throw new Error(`Cannot connect a root:
30          DOMLocalization already has a root from a different window.`)}else this.windowElement=t.ownerDocument.defaultView,this.mutationObserver=new this.windowElement.MutationObserver(e=>this.translateMutations(e));this.roots.add(t),this.mutationObserver.observe(t,this.observerConfig)}disconnectRoot(t){return this.roots.delete(t),this.pauseObserving(),this.roots.size===0?(this.mutationObserver=null,this.windowElement&&this.pendingrAF&&this.windowElement.cancelAnimationFrame(this.pendingrAF),this.windowElement=null,this.pendingrAF=null,this.pendingElements.clear(),!0):(this.resumeObserving(),!1)}translateRoots(){let t=Array.from(this.roots);return Promise.all(t.map(e=>this.translateFragment(e)))}pauseObserving(){this.mutationObserver&&(this.translateMutations(this.mutationObserver.takeRecords()),this.mutationObserver.disconnect())}resumeObserving(){if(this.mutationObserver)for(let t of this.roots)this.mutationObserver.observe(t,this.observerConfig)}translateMutations(t){for(let e of t)switch(e.type){case"attributes":e.target.hasAttribute("data-l10n-id")&&this.pendingElements.add(e.target);break;case"childList":for(let i of e.addedNodes)if(i.nodeType===i.ELEMENT_NODE)if(i.childElementCount)for(let n of this.getTranslatables(i))this.pendingElements.add(n);else i.hasAttribute(ra)&&this.pendingElements.add(i);break}this.pendingElements.size>0&&this.pendingrAF===null&&(this.pendingrAF=this.windowElement.requestAnimationFrame(()=>{this.translateElements(Array.from(this.pendingElements)),this.pendingElements.clear(),this.pendingrAF=null}))}translateFragment(t){return this.translateElements(this.getTranslatables(t))}translateElements(t){return O(this,null,function*(){if(!t.length)return;let e=t.map(this.getKeysForElement),i=yield this.formatMessages(e);return this.applyTranslations(t,i)})}applyTranslations(t,e){this.pauseObserving();for(let i=0;i<t.length;i++)e[i]!==void 0&&Ik(t[i],e[i]);this.resumeObserving()}getTranslatables(t){let e=Array.from(t.querySelectorAll(Bk));return typeof t.hasAttribute=="function"&&t.hasAttribute(ra)&&e.push(t),e}getKeysForElement(t){return{id:t.getAttribute(ra),args:JSON.parse(t.getAttribute(Dh)||null)}}},Yh,Fo,nc,Ei,vc,QC,JC,jh=class jh{constructor({lang:t,isRTL:e},i=null){b(this,Yh);b(this,Fo);b(this,nc);b(this,Ei);var n,s;m(this,nc,f(n=jh,vc,QC).call(n,t)),m(this,Ei,i),m(this,Yh,(e!=null?e:f(s=jh,vc,JC).call(s,a(this,nc)))?"rtl":"ltr")}_setL10n(t){m(this,Ei,t)}getLanguage(){return a(this,nc)}getDirection(){return a(this,Yh)}get(t,e=null,i){return O(this,null,function*(){var s;return Array.isArray(t)?(t=t.map(l=>({id:l})),(yield a(this,Ei).formatMessages(t)).map(l=>l.value)):((s=(yield a(this,Ei).formatMessages([{id:t,args:e}]))[0])==null?void 0:s.value)||i})}translate(t){return O(this,null,function*(){(a(this,Fo)||m(this,Fo,new Set)).add(t);try{a(this,Ei).connectRoot(t),yield a(this,Ei).translateRoots()}catch{}})}translateOnce(t){return O(this,null,function*(){try{yield a(this,Ei).translateElements([t])}catch(e){console.error(`translateOnce: "${e}".`)}})}destroy(){return O(this,null,function*(){if(a(this,Fo)){for(let t of a(this,Fo))a(this,Ei).disconnectRoot(t);a(this,Fo).clear(),m(this,Fo,null)}a(this,Ei).pauseObserving()})}pause(){a(this,Ei).pauseObserving()}resume(){a(this,Ei).resumeObserving()}};Yh=new WeakMap,Fo=new WeakMap,nc=new WeakMap,Ei=new WeakMap,vc=new WeakSet,QC=function(t){return t=(t==null?void 0:t.toLowerCase())||"en-us",{en:"en-us",es:"es-es",fy:"fy-nl",ga:"ga-ie",gu:"gu-in",hi:"hi-in",hy:"hy-am",nb:"nb-no",ne:"ne-np",nn:"nn-no",pa:"pa-in",pt:"pt-pt",sv:"sv-se",zh:"zh-cn"}[t]||t},JC=function(t){let e=t.split("-",1)[0];return["ar","he","fa","ps","ur"].includes(e)},b(jh,vc);var Uy=jh;function RC(r,t){let e=new Fy(t),i=new Ny(r),n=i.addResource(e);return n.length&&console.error("L10n errors",n),i}var Ui,tE,eE,iE,nE,Wy,aa=class aa extends Uy{constructor(t){super({lang:t});let e=t?f(aa,Ui,tE).bind(aa,"en-us",this.getLanguage()):f(aa,Ui,nE).bind(aa,this.getLanguage());this._setL10n(new Hy([],e))}};Ui=new WeakSet,tE=function(t,e){return Rm(this,null,function*(){let{baseURL:i,paths:n}=yield new Dm(f(this,Ui,iE).call(this)),s=[e];if(t!==e){let o=e.split("-",1)[0];o!==e&&s.push(o),s.push(t)}for(let o of s){let l=yield new Dm(f(this,Ui,eE).call(this,o,i,n));
30l?yield l:o==="en-us"&&(yield f(this,Ui,Wy).call(this,o))}})},eE=function(t,e,i){return O(this,null,function*(){let n=i[t];if(!n)return null;let s=new URL(n,e),o=yield _C(s,"text");return RC(t,o)})},iE=function(){return O(this,null,function*(){try{let{href:t}=document.querySelector('link[type="application/l10n"]'),e=yield _C(t,"json");return{baseURL:t.replace(/[^/]*$/,"")||"./",paths:e}}catch{}return{baseURL:"./",paths:Object.create(null)}})},nE=function(t){return Rm(this,null,function*(){yield f(this,Ui,Wy).call(this,t)})},Wy=function(t){return O(this,null,function*(){return RC(t,`pdfjs-previous-button =
31    .title = Previous Page
32pdfjs-previous-button-label = Previous
33pdfjs-next-button =
34    .title = Next Page
35pdfjs-next-button-label = Next
36pdfjs-page-input =
37    .title = Page
38pdfjs-of-pages = of { $pagesCount }
39pdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })
40pdfjs-zoom-out-button =
41    .title = Zoom Out
42pdfjs-zoom-out-button-label = Zoom Out
43pdfjs-zoom-in-button =
44    .title = Zoom In
45pdfjs-zoom-in-button-label = Zoom In
46pdfjs-zoom-select =
47    .title = Zoom
48pdfjs-presentation-mode-button =
49    .title = Switch to Presentation Mode
50pdfjs-presentation-mode-button-label = Presentation Mode
51pdfjs-open-file-button =
52    .title = Open File
53pdfjs-open-file-button-label = Open
54pdfjs-print-button =
55    .title = Print
56pdfjs-print-button-label = Print
57pdfjs-save-button =
58    .title = Save
59pdfjs-save-button-label = Save
60pdfjs-download-button =
61    .title = Download
62pdfjs-download-button-label = Download
63pdfjs-bookmark-button =
64    .title = Current Page (View URL from Current Page)
65pdfjs-bookmark-button-label = Current Page
66pdfjs-tools-button =
67    .title = Tools
68pdfjs-tools-button-label = Tools
69pdfjs-first-page-button =
70    .title = Go to First Page
71pdfjs-first-page-button-label = Go to First Page
72pdfjs-last-page-button =
73    .title = Go to Last Page
74pdfjs-last-page-button-label = Go to Last Page
75pdfjs-page-rotate-cw-button =
76    .title = Rotate Clockwise
77pdfjs-page-rotate-cw-button-label = Rotate Clockwise
78pdfjs-page-rotate-ccw-button =
79    .title = Rotate Counterclockwise
80pdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise
81pdfjs-cursor-text-select-tool-button =
82    .title = Enable Text Selection Tool
83pdfjs-cursor-text-select-tool-button-label = Text Selection Tool
84pdfjs-cursor-hand-tool-button =
85    .title = Enable Hand Tool
86pdfjs-cursor-hand-tool-button-label = Hand Tool
87pdfjs-scroll-page-button =
88    .title = Use Page Scrolling
89pdfjs-scroll-page-button-label = Page Scrolling
90pdfjs-scroll-vertical-button =
91    .title = Use Vertical Scrolling
92pdfjs-scroll-vertical-button-label = Vertical Scrolling
93pdfjs-scroll-horizontal-button =
94    .title = Use Horizontal Scrolling
95pdfjs-scroll-horizontal-button-label = Horizontal Scrolling
96pdfjs-scroll-wrapped-button =
97    .title = Use Wrapped Scrolling
98pdfjs-scroll-wrapped-button-label = Wrapped Scrolling
99pdfjs-spread-none-button =
100    .title = Do not join page spreads
101pdfjs-spread-none-button-label = No Spreads
102pdfjs-spread-odd-button =
103    .title = Join page spreads starting with odd-numbered pages
104pdfjs-spread-odd-button-label = Odd Spreads
105pdfjs-spread-even-button =
106    .title = Join page spreads starting with even-numbered pages
107pdfjs-spread-even-button-label = Even Spreads
108pdfjs-document-properties-button =
109    .title = Document Properties\u2026
110pdfjs-document-properties-button-label = Document Properties\u2026
111pdfjs-document-properties-file-name = File name:
112pdfjs-document-properties-file-size = File size:
113pdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) } KB ({ $b } bytes)
114pdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } MB ({ $b } bytes)
115pdfjs-document-properties-title = Title:
116pdfjs-document-properties-author = Author:
117pdfjs-document-properties-subject = Subject:
118pdfjs-document-properties-keywords = Keywords:
119pdfjs-document-properties-creation-date = Creation Date:
120pdfjs-document-properties-modification-date = Modification Date:
121pdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
122pdfjs-document-properties-creator = Creator:
123pdfjs-document-properties-producer = PDF Producer:
124pdfjs-document-properties-version = PDF Version:
125pdfjs-document-properties-page-count = Page Count:
126pdfjs-document-properties-page-size = Page Size:
127pdfjs-document-properties-page-size-unit-inches = in
128pdfjs-document-properties-page-size-unit-millimeters = mm
129pdfjs-document-properties-page-size-orientation-portrait = portrait
130pdfjs-document-properties-page-size-orientation-landscape = landscape
131pdfjs-document-properties-page-size-name-a-three = A3
132pdfjs-document-properties-page-size-name-a-four = A4
133pdfjs-document-properties-page-size-name-letter = Letter
134pdfjs-document-properties-page-size-name-legal = Legal
135pdfjs-document-properties-page-size-dimension-string = { $width } \xD7 { $height } { $unit } ({ $orientation })
136pdfjs-document-properties-page-size-dimension-name-string = { $width } \xD7 { $height } { $unit } ({ $name }, { $orientation })
137pdfjs-document-properties-linearized = Fast Web View:
138pdfjs-document-properties-linearized-yes = Yes
139pdfjs-document-properties-linearized-no = No
140pdfjs-document-properties-close-button = Close
141pdfjs-print-progress-message = Preparing document for printing\u2026
142pdfjs-print-progress-percent = { $progress }%
143pdfjs-print-progress-close-button = Cancel
144pdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.
145pdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.
146pdfjs-toggle-sidebar-button =
147    .title = Toggle Sidebar
148pdfjs-toggle-sidebar-notification-button =
149    .title = Toggle Sidebar (document contains outline/attachments/layers)
150pdfjs-toggle-sidebar-button-label = Toggle Sidebar
151pdfjs-document-outline-button =
152    .title = Show Document Outline (double-click to expand/collapse all items)
153pdfjs-document-outline-button-label = Document Outline
154pdfjs-attachments-button =
155    .title = Show Attachments
156pdfjs-attachments-button-label = Attachments
157pdfjs-layers-button =
158    .title = Show Layers (double-click to reset all layers to the default state)
159pdfjs-layers-button-label = Layers
160pdfjs-thumbs-button =
161    .title = Show Thumbnails
162pdfjs-thumbs-button-label = Thumbnails
163pdfjs-current-outline-item-button =
164    .title = Find Current Outline Item
165pdfjs-current-outline-item-button-label = Current Outline Item
166pdfjs-findbar-button =
167    .title = Find in Document
168pdfjs-findbar-button-label = Find
169pdfjs-additional-layers = Additional Layers
170pdfjs-thumb-page-title =
171    .title = Page { $page }
172pdfjs-thumb-page-canvas =
173    .aria-label = Thumbnail of Page { $page }
174pdfjs-find-input =
175    .title = Find
176    .placeholder = Find in document\u2026
177pdfjs-find-previous-button =
178    .title = Find the previous occurrence of the phrase
179pdfjs-find-previous-button-label = Previous
180pdfjs-find-next-button =
181    .title = Find the next occurrence of the phrase
182pdfjs-find-next-button-label = Next
183pdfjs-find-highlight-checkbox = Highlight All
184pdfjs-find-match-case-checkbox-label = Match Case
185pdfjs-find-match-diacritics-checkbox-label = Match Diacritics
186pdfjs-find-entire-word-checkbox-label = Whole Words
187pdfjs-find-reached-top = Reached top of document, continued from bottom
188pdfjs-find-reached-bottom = Reached end of document, continued from top
189pdfjs-find-match-count =
190    { $total ->
191        [one] { $current } of { $total } match
192       *[other] { $current } of { $total } matches
193    }
194pdfjs-find-match-count-limit =
195    { $limit ->
196        [one] More than { $limit } match
197       *[other] More than { $limit } matches
198    }
199pdfjs-find-not-found = Phrase not found
200pdfjs-page-scale-width = Page Width
201pdfjs-page-scale-fit = Page Fit
202pdfjs-page-scale-auto = Automatic Zoom
203pdfjs-page-scale-actual = Actual Size
204pdfjs-page-scale-percent = { $scale }%
205pdfjs-page-landmark =
206    .aria-label = Page { $page }
207pdfjs-loading-error = An error occurred while loading the PDF.
208pdfjs-invalid-file-error = Invalid or corrupted PDF file.
209pdfjs-missing-file-error = Missing PDF file.
210pdfjs-unexpected-response-error = Unexpected server response.
211pdfjs-rendering-error = An error occurred while rendering the page.
212pdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
213pdfjs-text-annotation-type =
214    .alt = [{ $type } Annotation]
215pdfjs-password-label = Enter the password to open this PDF file.
216pdfjs-password-invalid = Invalid password. Please try again.
217pdfjs-password-ok-button = OK
218pdfjs-password-cancel-button = Cancel
219pdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.
220pdfjs-editor-free-text-button =
221    .title = Text
222pdfjs-editor-free-text-button-label = Text
223pdfjs-editor-ink-button =
224    .title = Draw
225pdfjs-editor-ink-button-label = Draw
226pdfjs-editor-stamp-button =
227    .title = Add or edit images
228pdfjs-editor-stamp-button-label = Add or edit images
229pdfjs-editor-highlight-button =
230    .title = Highlight
231pdfjs-editor-highlight-button-label = Highlight
232pdfjs-highlight-floating-button1 =
233    .title = Highlight
234    .aria-label = Highlight
235pdfjs-highlight-floating-button-label = Highlight
236pdfjs-editor-remove-ink-button =
237    .title = Remove drawing
238pdfjs-editor-remove-freetext-button =
239    .title = Remove text
240pdfjs-editor-remove-stamp-button =
241    .title = Remove image
242pdfjs-editor-remove-highlight-button =
243    .title = Remove highlight
244pdfjs-editor-free-text-color-input = Color
245pdfjs-editor-free-text-size-input = Size
246pdfjs-editor-ink-color-input = Color
247pdfjs-editor-ink-thickness-input = Thickness
248pdfjs-editor-ink-opacity-input = Opacity
249pdfjs-editor-stamp-add-image-button =
250    .title = Add image
251pdfjs-editor-stamp-add-image-button-label = Add image
252pdfjs-editor-free-highlight-thickness-input = Thickness
253pdfjs-editor-free-highlight-thickness-title =
254    .title = Change thickness when highlighting items other than text
255pdfjs-free-text2 =
256    .aria-label = Text Editor
257    .default-content = Start typing\u2026
258pdfjs-ink =
259    .aria-label = Draw Editor
260pdfjs-ink-canvas =
261    .aria-label = User-created image
262pdfjs-editor-alt-text-button =
263    .aria-label = Alt text
264pdfjs-editor-alt-text-button-label = Alt text
265pdfjs-editor-alt-text-edit-button =
266    .aria-label = Edit alt text
267pdfjs-editor-alt-text-dialog-label = Choose an option
268pdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can\u2019t see the image or when it doesn\u2019t load.
269pdfjs-editor-alt-text-add-description-label = Add a description
270pdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.
271pdfjs-editor-alt-text-mark-decorative-label = Mark as decorative
272pdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.
273pdfjs-editor-alt-text-cancel-button = Cancel
274pdfjs-editor-alt-text-save-button = Save
275pdfjs-editor-alt-text-decorative-tooltip = Marked as decorative
276pdfjs-editor-alt-text-textarea =
277    .placeholder = For example, \u201CA young man sits down at a table to eat a meal\u201D
278pdfjs-editor-resizer-top-left =
279    .aria-label = Top left corner \u2014 resize
280pdfjs-editor-resizer-top-middle =
281    .aria-label = Top middle \u2014 resize
282pdfjs-editor-resizer-top-right =
283    .aria-label = Top right corner \u2014 resize
284pdfjs-editor-resizer-middle-right =
285    .aria-label = Middle right \u2014 resize
286pdfjs-editor-resizer-bottom-right =
287    .aria-label = Bottom right corner \u2014 resize
288pdfjs-editor-resizer-bottom-middle =
289    .aria-label = Bottom middle \u2014 resize
290pdfjs-editor-resizer-bottom-left =
291    .aria-label = Bottom left corner \u2014 resize
292pdfjs-editor-resizer-middle-left =
293    .aria-label = Middle left \u2014 resize
294pdfjs-editor-highlight-colorpicker-label = Highlight color
295pdfjs-editor-colorpicker-button =
296    .title = Change color
297pdfjs-editor-colorpicker-dropdown =
298    .aria-label = Color choices
299pdfjs-editor-colorpicker-yellow =
300    .title = Yellow
301pdfjs-editor-colorpicker-green =
302    .title = Green
303pdfjs-editor-colorpicker-blue =
304    .title = Blue
305pdfjs-editor-colorpicker-pink =
306    .title = Pink
307pdfjs-editor-colorpicker-red =
308    .title = Red
309pdfjs-editor-highlight-show-all-button-label = Show all
310pdfjs-editor-highlight-show-all-button =
311    .title = Show all
312pdfjs-editor-new-alt-text-dialog-edit-label = Edit alt text (image description)
313pdfjs-editor-new-alt-text-dialog-add-label = Add alt text (image description)
314pdfjs-editor-new-alt-text-textarea =
315    .placeholder = Write your description here\u2026
316pdfjs-editor-new-alt-text-description = Short description for people who can\u2019t see the image or when the image doesn\u2019t load.
317pdfjs-editor-new-alt-text-disclaimer1 = This alt text was created automatically and may be inaccurate.
318pdfjs-editor-new-alt-text-disclaimer-learn-more-url = Learn more
319pdfjs-editor-new-alt-text-create-automatically-button-label = Create alt text automatically
320pdfjs-editor-new-alt-text-not-now-button = Not now
321pdfjs-editor-new-alt-text-error-title = Couldn\u2019t create alt text automatically
322pdfjs-editor-new-alt-text-error-description = Please write your own alt text or try again later.
323pdfjs-editor-new-alt-text-error-close-button = Close
324pdfjs-editor-new-alt-text-ai-model-downloading-progress = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)
325    .aria-valuetext = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)
326pdfjs-editor-new-alt-text-added-button =
327    .aria-label = Alt text added
328pdfjs-editor-new-alt-text-added-button-label = Alt text added
329pdfjs-editor-new-alt-text-missing-button =
330    .aria-label = Missing alt text
331pdfjs-editor-new-alt-text-missing-button-label = Missing alt text
332pdfjs-editor-new-alt-text-to-review-button =
333    .aria-label = Review alt text
334pdfjs-editor-new-alt-text-to-review-button-label = Review alt text
335pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer = Created automatically: { $generatedAltText }
336pdfjs-image-alt-text-settings-button =
337    .title = Image alt text settings
338pdfjs-image-alt-text-settings-button-label = Image alt text settings
339pdfjs-editor-alt-text-settings-dialog-label = Image alt text settings
340pdfjs-editor-alt-text-settings-automatic-title = Automatic alt text
341pdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically
342pdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who can\u2019t see the image or when the image doesn\u2019t load.
343pdfjs-editor-alt-text-settings-download-model-label = Alt text AI model ({ $totalSize } MB)
344pdfjs-editor-alt-text-settings-ai-model-description = Runs locally on your device so your data stays private. Required for automatic alt text.
345pdfjs-editor-alt-text-settings-delete-model-button = Delete
346pdfjs-editor-alt-text-settings-download-model-button = Download
347pdfjs-editor-alt-text-settings-downloading-model-button = Downloading\u2026
348pdfjs-editor-alt-text-settings-editor-title = Alt text editor
349pdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image
350pdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text.
351pdfjs-editor-alt-text-settings-close-button = Close`)})},b(aa,Ui);var yc=aa,zk=1e3,vy=50,LC=1e3;function xy(){return document.location.hash}var Bo,wt,Bs,rm,am,Oh,lm,$y,sE,oE,Yy,rE,aE,Gy=class{constructor({linkService:t,eventBus:e}){b(this,wt);b(this,Bo,null);this.linkService=t,this.eventBus=e,this._initialized=!1,this._fingerprint="",this.reset(),this.eventBus._on("pagesinit",()=>{this._isPagesLoaded=!1,this.eventBus._on("pagesloaded",i=>{this._isPagesLoaded=!!i.pagesCount},{once:!0})})}initialize({fingerprint:t,resetHistory:e=!1,updateUrl:i=!1}){if(!t||typeof t!="string"){console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');return}this._initialized&&this.reset();let n=this._fingerprint!==""&&this._fingerprint!==t;this._fingerprint=t,this._updateUrl=i===!0,this._initialized=!0,f(this,wt,rE).call(this);let s=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=xy(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!f(this,wt,Oh).call(this,s,!0)||e){let{hash:l,page:c,rotation:h}=f(this,wt,$y).call(this,!0);if(!l||n||e){f(this,wt,Bs).call(this,null,!0);return}f(this,wt,Bs).call(this,{hash:l,page:c,rotation:h},!0);return}let o=s.destination;f(this,wt,lm).call(this,o,s.uid,!0),o.rotation!==void 0&&(this._initialRotation=o.rotation),o.dest?(this._initialBookmark=JSON.stringify(o.dest),this._destination.page=null):o.hash?this._initialBookmark=o.hash:o.page&&(this._initialBookmark=`page=${o.page}`)}reset(){this._initialized&&(f(this,wt,Yy).call(this),this._initialized=!1,f(this,wt,aE).call(this)),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push({namedDest:t=null,explicitDest:e,pageNumber:i}){if(!this._initialized)return;if(t&&typeof t!="string"){console.error(`PDFHistory.push: "${t}" is not a valid namedDest parameter.`);return}else if(Array.isArray(e)){if(!f(this,wt,am).call(this,i)&&(i!==null||this._destination)){console.error(`PDFHistory.push: "${i}" is not a valid pageNumber parameter.`);return}}else{console.error(`PDFHistory.push: "${e}" is not a valid explicitDest parameter.`);return}let n=t||JSON.stringify(e);if(!n)return;let s=!1;if(this._destination&&(Vk(this._destination.hash,n)||jk(this._destination.dest,e))){if
351(this._destination.page)return;s=!0}this._popStateInProgress&&!s||(f(this,wt,Bs).call(this,{dest:e,hash:n,page:i,rotation:this.linkService.rotation},s),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})))}pushPage(t){var e;if(this._initialized){if(!f(this,wt,am).call(this,t)){console.error(`PDFHistory.pushPage: "${t}" is not a valid page number.`);return}((e=this._destination)==null?void 0:e.page)!==t&&(this._popStateInProgress||(f(this,wt,Bs).call(this,{dest:null,hash:`page=${t}`,page:t,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1}))))}}pushCurrentPosition(){!this._initialized||this._popStateInProgress||f(this,wt,rm).call(this)}back(){if(!this._initialized||this._popStateInProgress)return;let t=window.history.state;f(this,wt,Oh).call(this,t)&&t.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;let t=window.history.state;f(this,wt,Oh).call(this,t)&&t.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}};Bo=new WeakMap,wt=new WeakSet,Bs=function(t,e=!1){let i=e||!this._destination,n={fingerprint:this._fingerprint,uid:i?this._uid:this._uid+1,destination:t};f(this,wt,lm).call(this,t,n.uid);let s;if(this._updateUrl&&(t!=null&&t.hash)){let o=document.location.href.split("#",1)[0];o.startsWith("file://")||(s=`${o}#${t.hash}`)}i?window.history.replaceState(n,"",s):window.history.pushState(n,"",s)},rm=function(t=!1){if(!this._position)return;let e=this._position;if(t&&(e=Object.assign(Object.create(null),this._position),e.temporary=!0),!this._destination){f(this,wt,Bs).call(this,e);return}if(this._destination.temporary){f(this,wt,Bs).call(this,e,!0);return}if(this._destination.hash===e.hash||!this._destination.page&&(vy<=0||this._numPositionUpdates<=vy))return;let i=!1;if(this._destination.page>=e.first&&this._destination.page<=e.page){if(this._destination.dest!==void 0||!this._destination.first)return;i=!0}f(this,wt,Bs).call(this,e,i)},am=function(t){return Number.isInteger(t)&&t>0&&t<=this.linkService.pagesCount},Oh=function(t,e=!1){if(!t)return!1;if(t.fingerprint!==this._fingerprint)if(e){if(typeof t.fingerprint!="string"||t.fingerprint.length!==this._fingerprint.length)return!1;let[i]=performance.getEntriesByType("navigation");if((i==null?void 0:i.type)!=="reload")return!1}else return!1;return!(!Number.isInteger(t.uid)||t.uid<0||t.destination===null||typeof t.destination!="object")},lm=function(t,e,i=!1){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),i&&(t!=null&&t.temporary)&&delete t.temporary,this._destination=t,this._uid=e,this._maxUid=Math.max(this._maxUid,e),this._numPositionUpdates=0},$y=function(t=!1){let e=unescape(xy()).substring(1),i=Im(e),n=i.get("nameddest")||"",s=i.get("page")|0;return(!f(this,wt,am).call(this,s)||t&&n.length>0)&&(s=null),{hash:e,page:s,rotation:this.linkService.rotation}},sE=function({location:t}){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:t.pdfOpenParams.substring(1),page:this.linkService.page,first:t.pageNumber,rotation:t.rotation},!this._popStateInProgress&&(vy>0&&this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,LC>0&&(this._updateViewareaTimeout=setTimeout(()=>{this._popStateInProgress||f(this,wt,rm).call(this,!0),this._updateViewareaTimeout=null},LC)))},oE=function({state:t}){let e=xy(),i=this._currentHash!==e;if(this._currentHash=e,!t){this._uid++;let{hash:s,page:o,rotation:l}=f(this,wt,$y).call(this);f(this,wt,Bs).call(this,{hash:s,page:o,rotation:l},!0);return}if(!f(this,wt,Oh).call(this,t))return;this._popStateInProgress=!0,i&&(this._blockHashChange++,JI({target:window,name:"hashchange",delay:zk}).then(()=>{this._blockHashChange--}));let n=t.destination;f(this,wt,lm).call(this,n,t.uid,!0),VC(n.rotation)&&(this.linkService.rotation=n.rotation),n.dest?this.linkService.goToDestination(n.dest):n.hash?this.linkService.setHash(n.hash):n.page&&(this.linkService.page=n.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})},Yy=function(){(!this._destination||this._destination.temporary)&&f(this,wt,rm).call(this)},rE=function(){if(a(this,Bo))return;m(this,Bo,new AbortController);let{signal:t}=a(this,Bo);this.eventBus._on("updateviewarea",f(this,wt,sE).bind(this),{signal:t}),window.addEventListener("popstate",f(this,wt,oE).bind(this),{signal:t}),window.addEventListener("pagehide",f(this,wt,Yy).bind(this),{signal:t})},aE=function(){var t;(t=a(this,Bo))==null||t.abort(),m(this,Bo,null)};function Vk(r,t){return typeof r!="string"||typeof t!="string"?!1:r===t||Im(r).get("nameddest")===t}
351function jk(r,t){function e(i,n){if(typeof i!=typeof n||Array.isArray(i)||Array.isArray(n))return!1;if(i!==null&&typeof i=="object"&&n!==null){if(Object.keys(i).length!==Object.keys(n).length)return!1;for(let s in i)if(!e(i[s],n[s]))return!1;return!0}return i===n||Number.isNaN(i)&&Number.isNaN(n)}if(!(Array.isArray(r)&&Array.isArray(t))||r.length!==t.length)return!1;for(let i=0,n=r.length;i<n;i++)if(!e(r[i],t[i]))return!1;return!0}var Xh,Kh,qh,Zh,Qh,sc,Xy=class{constructor(t){b(this,Xh,null);b(this,Kh,null);b(this,qh,null);b(this,Zh,null);b(this,Qh,null);b(this,sc);this.pdfPage=t.pdfPage,this.accessibilityManager=t.accessibilityManager,this.l10n=t.l10n,this.l10n||(this.l10n=new yc),this.annotationEditorLayer=null,this.div=null,this._cancelled=!1,m(this,sc,t.uiManager),m(this,Xh,t.annotationLayer||null),m(this,Qh,t.textLayer||null),m(this,Kh,t.drawLayer||null),m(this,qh,t.onAppend||null),m(this,Zh,t.structTreeLayer||null)}render(t,e="display"){return O(this,null,function*(){var o;if(e!=="display"||this._cancelled)return;let i=t.clone({dontFlip:!0});if(this.div){this.annotationEditorLayer.update({viewport:i}),this.show();return}let n=this.div=document.createElement("div");n.className="annotationEditorLayer",n.hidden=!0,n.dir=a(this,sc).direction,(o=a(this,qh))==null||o.call(this,n),this.annotationEditorLayer=new HI({uiManager:a(this,sc),div:n,structTreeLayer:a(this,Zh),accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage.pageNumber-1,l10n:this.l10n,viewport:i,annotationLayer:a(this,Xh),textLayer:a(this,Qh),drawLayer:a(this,Kh)});let s={viewport:i,div:n,annotations:null,intent:e};this.annotationEditorLayer.render(s),this.show()})}cancel(){this._cancelled=!0,this.div&&this.annotationEditorLayer.destroy()}hide(){this.div&&(this.div.hidden=!0)}show(){!this.div||this.annotationEditorLayer.isInvisible||(this.div.hidden=!1)}};Xh=new WeakMap,Kh=new WeakMap,qh=new WeakMap,Zh=new WeakMap,Qh=new WeakMap,sc=new WeakMap;{cm=new Map;let r=navigator.userAgent||"",t=navigator.platform||"",e=navigator.maxTouchPoints||1,i=/Android/.test(r),n=/\b(iPad|iPhone|iPod)(?=;)/.test(r)||t==="MacIntel"&&e>1;(function(){(n||i)&&cm.set("maxCanvasPixels",5242880)})(),function(){i&&cm.set("useSystemFonts",!1)}()}var cm,H={BROWSER:1,VIEWER:2,API:4,WORKER:8,EVENT_DISPATCH:16,PREFERENCE:128},Ky={BOOLEAN:1,NUMBER:2,OBJECT:4,STRING:8,UNDEFINED:16},es={allowedGlobalEvents:{value:null,kind:H.BROWSER},canvasMaxAreaInBytes:{value:-1,kind:H.BROWSER+H.API},isInAutomation:{value:!1,kind:H.BROWSER},localeProperties:{value:{lang:navigator.language||"en-US"},kind:H.BROWSER},nimbusDataStr:{value:"",kind:H.BROWSER},supportsCaretBrowsingMode:{value:!1,kind:H.BROWSER},supportsDocumentFonts:{value:!0,kind:H.BROWSER},supportsIntegratedFind:{value:!1,kind:H.BROWSER},supportsMouseWheelZoomCtrlKey:{value:!0,kind:H.BROWSER},supportsMouseWheelZoomMetaKey:{value:!0,kind:H.BROWSER},supportsPinchToZoom:{value:!0,kind:H.BROWSER},toolbarDensity:{value:0,kind:H.BROWSER+H.EVENT_DISPATCH},altTextLearnMoreUrl:{value:"",kind:H.VIEWER+H.PREFERENCE},annotationEditorMode:{value:0,kind:H.VIEWER+H.PREFERENCE},annotationMode:{value:2,kind:H.VIEWER+H.PREFERENCE},cursorToolOnLoad:{value:0,kind:H.VIEWER+H.PREFERENCE},debuggerSrc:{value:"./debugger.mjs",kind:H.VIEWER},defaultZoomDelay:{value:400,kind:H.VIEWER+H.PREFERENCE},defaultZoomValue:{value:"",kind:H.VIEWER+H.PREFERENCE},disableHistory:{value:!1,kind:H.VIEWER},disablePageLabels:{value:!1,kind:H.VIEWER+H.PREFERENCE},enableAltText:{value:!1,kind:H.VIEWER+H.PREFERENCE},enableAltTextModelDownload:{value:!0,kind:H.VIEWER+H.PREFERENCE+H.EVENT_DISPATCH},enableGuessAltText:{value:!0,kind:H.VIEWER+H.PREFERENCE+H.EVENT_DISPATCH},enableHighlightFloatingButton:{value:!1,kind:H.VIEWER+H.PREFERENCE},enableNewAltTextWhenAddingImage:{value:!0,kind:H.VIEWER+H.PREFERENCE},enablePermissions:{value:!1,kind:H.VIEWER+H.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:H.VIEWER+H.PREFERENCE},enableScripting:{value:!0,kind:H.VIEWER+H.PREFERENCE},enableUpdatedAddImage:{value:!1,kind:H.VIEWER+H.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:H.VIEWER},externalLinkTarget:{value:0,kind:H.VIEWER+H.PREFERENCE},highlightEditorColors:{value:"yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F",kind:H.VIEWER+H.PREFERENCE},historyUpdateUrl:{value:!1,kind:H.VIEWER+H.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:H.VIEWER+H.PREFERENCE},imageResourcesPath:{value:"./images/",kind:H.VIEWER},maxCanvasPixels:{value:2**25,kind:H.VIEWER},forcePageColors:{value:!1,kind:H.VIEWER+H.PREFERENCE}
351,pageColorsBackground:{value:"Canvas",kind:H.VIEWER+H.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:H.VIEWER+H.PREFERENCE},pdfBugEnabled:{value:!1,kind:H.VIEWER+H.PREFERENCE},printResolution:{value:150,kind:H.VIEWER},sidebarViewOnLoad:{value:-1,kind:H.VIEWER+H.PREFERENCE},scrollModeOnLoad:{value:-1,kind:H.VIEWER+H.PREFERENCE},spreadModeOnLoad:{value:-1,kind:H.VIEWER+H.PREFERENCE},textLayerMode:{value:1,kind:H.VIEWER+H.PREFERENCE},viewOnLoad:{value:0,kind:H.VIEWER+H.PREFERENCE},cMapPacked:{value:!0,kind:H.API},cMapUrl:{value:"../web/cmaps/",kind:H.API},disableAutoFetch:{value:!1,kind:H.API+H.PREFERENCE},disableFontFace:{value:!1,kind:H.API+H.PREFERENCE},disableRange:{value:!1,kind:H.API+H.PREFERENCE},disableStream:{value:!1,kind:H.API+H.PREFERENCE},docBaseUrl:{value:"",kind:H.API},enableHWA:{value:!0,kind:H.API+H.VIEWER+H.PREFERENCE},enableXfa:{value:!0,kind:H.API+H.PREFERENCE},fontExtraProperties:{value:!1,kind:H.API},isEvalSupported:{value:!0,kind:H.API},isOffscreenCanvasSupported:{value:!0,kind:H.API},maxImageSize:{value:-1,kind:H.API},pdfBug:{value:!1,kind:H.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:H.API},useSystemFonts:{value:void 0,kind:H.API,type:Ky.BOOLEAN+Ky.UNDEFINED},verbosity:{value:1,kind:H.API},workerPort:{value:null,kind:H.WORKER},workerSrc:{value:"../build/pdf.worker.mjs",kind:H.WORKER}};es.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:H.VIEWER},es.sandboxBundleSrc={value:"../build/pdf.sandbox.mjs",kind:H.VIEWER},es.viewerCssTheme={value:0,kind:H.VIEWER+H.PREFERENCE},es.enableFakeMLManager={value:!0,kind:H.VIEWER};es.disablePreferences={value:!1,kind:H.VIEWER};var zo,Kn=class Kn{static get(t){return a(this,zo).get(t)}static getAll(t=null,e=!1){let i=Object.create(null);for(let n in es){let s=es[n];t&&!(t&s.kind)||(i[n]=e?s.value:a(this,zo).get(n))}return i}static set(t,e){this.setAll({[t]:e})}static setAll(t,e=!1){this._hasInvokedSet||(this._hasInvokedSet=!0);let i;for(let n in t){let s=es[n],o=t[n];if(!s||!(typeof o==typeof s.value||Ky[(typeof o).toUpperCase()]&s.type))continue;let{kind:l}=s;e&&!(l&H.BROWSER||l&H.PREFERENCE)||(this.eventBus&&l&H.EVENT_DISPATCH&&(i||(i=new Map)).set(n,o),a(this,zo).set(n,o))}if(i)for(let[n,s]of i)this.eventBus.dispatch(n.toLowerCase(),{source:this,value:s})}};zo=new WeakMap,k(Kn,"eventBus"),b(Kn,zo,new Map),(()=>{for(let t in es)a(Kn,zo).set(t,es[t].value);for(let[t,e]of cm)a(Kn,zo).set(t,e);Kn._hasInvokedSet=!1,Kn._checkDisablePreferences=()=>Kn.get("disablePreferences")?!0:(Kn._hasInvokedSet&&console.warn('The Preferences may override manually set AppOptions; please use the "disablePreferences"-option to prevent that.'),!1)})();var qy=Kn,qn,Zy=class{constructor(t){b(this,qn,null);this.pageIndex=t.pageIndex}render(t="display"){return O(this,null,function*(){t!=="display"||a(this,qn)||this._cancelled||m(this,qn,new $I({pageIndex:this.pageIndex}))})}cancel(){this._cancelled=!0,a(this,qn)&&(a(this,qn).destroy(),m(this,qn,null))}setParent(t){var e;(e=a(this,qn))==null||e.setParent(t)}getDrawLayer(){return a(this,qn)}};qn=new WeakMap;var OC={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},Hk=/^H(\d+)$/,oc,wn,rc,ac,lc,Vo,is,Qy,lE,Jy,xm=class{constructor(t,e){b(this,is);b(this,oc);b(this,wn,null);b(this,rc);b(this,ac,new Map);b(this,lc);b(this,Vo,null);m(this,oc,t.getStructTree()),m(this,lc,e)}render(){return O(this,null,function*(){var n;if(a(this,rc))return a(this,rc);let{promise:t,resolve:e,reject:i}=Promise.withResolvers();m(this,rc,t);try{m(this,wn,f(this,is,Jy).call(this,yield a(this,oc)))}catch(s){i(s)}return m(this,oc,null),(n=a(this,wn))==null||n.classList.add("structTree"),e(a(this,wn)),t})}getAriaAttributes(t){return O(this,null,function*(){try{return yield this.render(),a(this,ac).get(t)}catch{}return null})}hide(){a(this,wn)&&!a(this,wn).hidden&&(a(this,wn).hidden=!0)}show(){var t;(t=a(this,wn))!=null&&t.hidden&&(a(this,wn).hidden=!1)}addElementsToTextLayer(){var t;if(a(this,Vo)){for(let[e,i]of a(this,Vo))(t=document.getElementById(e))==null||t.append(i);a(this,Vo).clear(),m(this,Vo,null)}}};oc=new WeakMap,wn=new WeakMap,rc=new WeakMap,ac=new WeakMap,lc=new WeakMap,Vo=new WeakMap,is=new WeakSet,Qy=function(t,e){let{alt:i,id:n,lang:s}=t;if(i!==void 0){let o=!1,l=Vh(i);for(let c of t.children)if(c.type==="annotation"){let h=a(this,ac).get(c.id);h||(h=new Map,a(this,ac).set(c.id,h)),h.set("aria-label",l),o=!0}o||e.setAttribute("aria-label",l)}n!==void 0&&e.setAttribute("aria-owns",n),s!==void 0&&e.setAttribute("lang",Vh(s,!0))},lE=function(t,e){let{alt:i,bbox:n,children:s}=t,o=s==null?void 0:s[0];if(!a(this,lc)||!i||!n||(o==null?void 0:o.type)!=="content")return!1;let{id:l}=o;if(!l)return!1;e.setAttribute("aria-owns",l);let c=document.createElement("span");(a(this,Vo)||m(this,Vo,new Map)).set(l,c),c.setAttribute("role","img"),c.setAttribute("aria-label",Vh(i));let{pageHeight:h,pageX:d,pageY:u}
351=a(this,lc),p="calc(var(--scale-factor)*",{style:g}=c;return g.width=`${p}${n[2]-n[0]}px)`,g.height=`${p}${n[3]-n[1]}px)`,g.left=`${p}${n[0]-d}px)`,g.top=`${p}${h-n[3]+u}px)`,!0},Jy=function(t){if(!t)return null;let e=document.createElement("span");if("role"in t){let{role:i}=t,n=i.match(Hk);if(n?(e.setAttribute("role","heading"),e.setAttribute("aria-level",n[1])):OC[i]&&e.setAttribute("role",OC[i]),i==="Figure"&&f(this,is,lE).call(this,t,e))return e}if(f(this,is,Qy).call(this,t,e),t.children)if(t.children.length===1&&"id"in t.children[0])f(this,is,Qy).call(this,t.children[0],e);else for(let i of t.children)e.append(f(this,is,Jy).call(this,i));return e};var Vs,rn,js,jo,cc,dm,Jh,e0,Ql=class Ql{constructor(){b(this,Jh);b(this,Vs,!1);b(this,rn,null);b(this,js,new Map);b(this,jo,new Map)}setTextMapping(t){m(this,rn,t)}enable(){if(a(this,Vs))throw new Error("TextAccessibilityManager is already enabled.");if(!a(this,rn))throw new Error("Text divs and strings have not been set.");if(m(this,Vs,!0),m(this,rn,a(this,rn).slice()),a(this,rn).sort(f(Ql,cc,dm)),a(this,js).size>0){let t=a(this,rn);for(let[e,i]of a(this,js)){if(!document.getElementById(e)){a(this,js).delete(e);continue}f(this,Jh,e0).call(this,e,t[i])}}for(let[t,e]of a(this,jo))this.addPointerInTextLayer(t,e);a(this,jo).clear()}disable(){a(this,Vs)&&(a(this,jo).clear(),m(this,rn,null),m(this,Vs,!1))}removePointerInTextLayer(t){if(!a(this,Vs)){a(this,jo).delete(t);return}let e=a(this,rn);if(!e||e.length===0)return;let{id:i}=t,n=a(this,js).get(i);if(n===void 0)return;let s=e[n];a(this,js).delete(i);let o=s.getAttribute("aria-owns");o!=null&&o.includes(i)&&(o=o.split(" ").filter(l=>l!==i).join(" "),o?s.setAttribute("aria-owns",o):(s.removeAttribute("aria-owns"),s.setAttribute("role","presentation")))}addPointerInTextLayer(t,e){let{id:i}=t;if(!i)return null;if(!a(this,Vs))return a(this,jo).set(t,e),null;e&&this.removePointerInTextLayer(t);let n=a(this,rn);if(!n||n.length===0)return null;let s=Hh(n,h=>{var d;return f(d=Ql,cc,dm).call(d,t,h)<0}),o=Math.max(0,s-1),l=n[o];f(this,Jh,e0).call(this,i,l),a(this,js).set(i,o);let c=l.parentNode;return c!=null&&c.classList.contains("markedContent")?c.id:null}moveElementInDOM(t,e,i,n){let s=this.addPointerInTextLayer(i,n);if(!t.hasChildNodes())return t.append(e),s;let o=Array.from(t.childNodes).filter(h=>h!==e);if(o.length===0)return s;let l=i||e,c=Hh(o,h=>{var d;return f(d=Ql,cc,dm).call(d,l,h)<0});return c===0?o[0].before(e):o[c-1].after(e),s}};Vs=new WeakMap,rn=new WeakMap,js=new WeakMap,jo=new WeakMap,cc=new WeakSet,dm=function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect();if(i.width===0&&i.height===0)return 1;if(n.width===0&&n.height===0)return-1;let s=i.y,o=i.y+i.height,l=i.y+i.height/2,c=n.y,h=n.y+n.height,d=n.y+n.height/2;if(l<=c&&d>=o)return-1;if(d<=s&&l>=h)return 1;let u=i.x+i.width/2,p=n.x+n.width/2;return u-p},Jh=new WeakSet,e0=function(t,e){let i=e.getAttribute("aria-owns");i!=null&&i.includes(t)||e.setAttribute("aria-owns",i?`${i} ${t}`:t),e.removeAttribute("role")},b(Ql,cc);var t0=Ql,Ho,i0=class{constructor({findController:t,eventBus:e,pageIndex:i}){b(this,Ho,null);this.findController=t,this.matches=[],this.eventBus=e,this.pageIdx=i,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}setTextMapping(t,e){this.textDivs=t,this.textContentItemsStr=e}enable(){if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,a(this,Ho)||(m(this,Ho,new AbortController),this.eventBus._on("updatetextlayermatches",t=>{(t.pageIndex===this.pageIdx||t.pageIndex===-1)&&this._updateMatches()},{signal:a(this,Ho).signal})),this._updateMatches()}disable(){var t;this.enabled&&(this.enabled=!1,(t=a(this,Ho))==null||t.abort(),m(this,Ho,null),this._updateMatches(!0))}_convertMatches(t,e){if(!t)return[];let{textContentItemsStr:i}=this,n=0,s=0,o=i.length-1,l=[];for(let c=0,h=t.length;c<h;c++){let d=t[c];for(;n!==o&&d>=s+i[n].length;)s+=i[n].length,n++;n===i.length&&console.error("Could not find a matching mapping");let u={begin:{divIdx:n,offset:d-s}};for(d+=e[c];n!==o&&d>s+i[n].length;)s+=i[n].length,n++;u.end={divIdx:n,offset:d-s},l.push(u)}return l}_renderMatches(t){if(t.length===0)return;let{findController:e,pageIdx:i}=this,{textContentItemsStr:n,textDivs:s}=this,o=i===e.selected.pageIdx,l=e.selected.matchIdx,c=e.state.highlightAll,h=null,d={divIdx:-1,offset:void 0};
351function u(x,I){let A=x.divIdx;return s[A].textContent="",p(A,0,x.offset,I)}function p(x,I,A,E){let L=s[x];if(L.nodeType===Node.TEXT_NODE){let M=document.createElement("span");L.before(M),M.append(L),s[x]=M,L=M}let v=n[x].substring(I,A),S=document.createTextNode(v);if(E){let M=document.createElement("span");return M.className=`${E} appended`,M.append(S),L.append(M),E.includes("selected")?M.offsetLeft:0}return L.append(S),0}let g=l,_=g+1;if(c)g=0,_=t.length;else if(!o)return;let y=-1,C=-1;for(let x=g;x<_;x++){let I=t[x],A=I.begin;if(A.divIdx===y&&A.offset===C)continue;y=A.divIdx,C=A.offset;let E=I.end,L=o&&x===l,v=L?" selected":"",S=0;if(!h||A.divIdx!==h.divIdx?(h!==null&&p(h.divIdx,h.offset,d.offset),u(A)):p(h.divIdx,h.offset,A.offset),A.divIdx===E.divIdx)S=p(A.divIdx,A.offset,E.offset,"highlight"+v);else{S=p(A.divIdx,A.offset,d.offset,"highlight begin"+v);for(let M=A.divIdx+1,T=E.divIdx;M<T;M++)s[M].className="highlight middle"+v;u(E,"highlight end"+v)}h=E,L&&e.scrollMatchIntoView({element:s[A.divIdx],selectedLeft:S,pageIndex:i,matchIndex:l})}h&&p(h.divIdx,h.offset,d.offset)}_updateMatches(t=!1){if(!this.enabled&&!t)return;let{findController:e,matches:i,pageIdx:n}=this,{textContentItemsStr:s,textDivs:o}=this,l=-1;for(let d of i){let u=Math.max(l,d.begin.divIdx);for(let p=u,g=d.end.divIdx;p<=g;p++){let _=o[p];_.textContent=s[p],_.className=""}l=d.end.divIdx+1}if(!(e!=null&&e.highlightMatches)||t)return;let c=e.pageMatches[n]||null,h=e.pageMatchesLength[n]||null;this.matches=this._convertMatches(c,h),this._renderMatches(this.matches)}};Ho=new WeakMap;var tu,eu,ha,Zn,Si,Uo,Tm,cE,xc,dE,hE,Ro=class Ro{constructor({pdfPage:t,highlighter:e=null,accessibilityManager:i=null,enablePermissions:n=!1,onAppend:s=null}){b(this,Tm);b(this,tu,!1);b(this,eu,null);b(this,ha,!1);b(this,Zn,null);this.pdfPage=t,this.highlighter=e,this.accessibilityManager=i,m(this,tu,n===!0),m(this,eu,s),this.div=document.createElement("div"),this.div.tabIndex=0,this.div.className="textLayer"}render(t,e=null){return O(this,null,function*(){var o,l,c,h,d;if(a(this,ha)&&a(this,Zn)){a(this,Zn).update({viewport:t,onBefore:this.hide.bind(this)}),this.show();return}this.cancel(),m(this,Zn,new QI({textContentSource:this.pdfPage.streamTextContent(e||{includeMarkedContent:!0,disableNormalization:!0}),container:this.div,viewport:t}));let{textDivs:i,textContentItemsStr:n}=a(this,Zn);(o=this.highlighter)==null||o.setTextMapping(i,n),(l=this.accessibilityManager)==null||l.setTextMapping(i),yield a(this,Zn).render(),m(this,ha,!0);let s=document.createElement("div");s.className="endOfContent",this.div.append(s),f(this,Tm,cE).call(this,s),(c=a(this,eu))==null||c.call(this,this.div),(h=this.highlighter)==null||h.enable(),(d=this.accessibilityManager)==null||d.enable()})}hide(){var t;!this.div.hidden&&a(this,ha)&&((t=this.highlighter)==null||t.disable(),this.div.hidden=!0)}show(){var t;this.div.hidden&&a(this,ha)&&(this.div.hidden=!1,(t=this.highlighter)==null||t.enable())}cancel(){var t,e,i,n;(t=a(this,Zn))==null||t.cancel(),m(this,Zn,null),(e=this.highlighter)==null||e.disable(),(i=this.accessibilityManager)==null||i.disable(),f(n=Ro,xc,dE).call(n,this.div)}};tu=new WeakMap,eu=new WeakMap,ha=new WeakMap,Zn=new WeakMap,Si=new WeakMap,Uo=new WeakMap,Tm=new WeakSet,cE=function(t){var i;let{div:e}=this;e.addEventListener("mousedown",()=>{e.classList.add("selecting")}),e.addEventListener("copy",n=>{if(!a(this,tu)){let s=document.getSelection();n.clipboardData.setData("text/plain",Vh(KI(s.toString())))}n.preventDefault(),n.stopPropagation()}),a(Ro,Si).set(e,t),f(i=Ro,xc,hE).call(i)},xc=new WeakSet,dE=function(t){var e;a(this,Si).delete(t),a(this,Si).size===0&&((e=a(this,Uo))==null||e.abort(),m(this,Uo,null))},hE=function(){if(a(this,Uo))return;m(this,Uo,new AbortController);let{signal:t}=a(this,Uo),e=(o,l)=>{l.append(o),o.style.width="",o.style.height="",l.classList.remove("selecting")},i=!1;document.addEventListener("pointerdown",()=>{i=!0},{signal:t}),document.addEventListener("pointerup",()=>{i=!1,a(this,Si).forEach(e)},{signal:t}),window.addEventListener("blur",()=>
351{i=!1,a(this,Si).forEach(e)},{signal:t}),document.addEventListener("keyup",()=>{i||a(this,Si).forEach(e)},{signal:t});var n,s;document.addEventListener("selectionchange",()=>{var g;let o=document.getSelection();if(o.rangeCount===0){a(this,Si).forEach(e);return}let l=new Set;for(let _=0;_<o.rangeCount;_++){let y=o.getRangeAt(_);for(let C of a(this,Si).keys())!l.has(C)&&y.intersectsNode(C)&&l.add(C)}for(let[_,y]of a(this,Si))l.has(_)?_.classList.add("selecting"):e(y,_);if(n!=null||(n=getComputedStyle(a(this,Si).values().next().value).getPropertyValue("-moz-user-select")==="none"),n)return;let c=o.getRangeAt(0),h=s&&(c.compareBoundaryPoints(Range.END_TO_END,s)===0||c.compareBoundaryPoints(Range.START_TO_END,s)===0),d=h?c.startContainer:c.endContainer;d.nodeType===Node.TEXT_NODE&&(d=d.parentNode);let u=(g=d.parentElement)==null?void 0:g.closest(".textLayer"),p=a(this,Si).get(u);p&&(p.style.width=u.style.width,p.style.height=u.style.height,d.parentElement.insertBefore(p,h?d:d.nextSibling)),s=c.cloneRange()},{signal:t})},b(Ro,xc),b(Ro,Si,new Map),b(Ro,Uo,null);var wm=Ro,Am=class{constructor({pdfPage:t,annotationStorage:e=null,linkService:i,xfaHtml:n=null}){this.pdfPage=t,this.annotationStorage=e,this.linkService=i,this.xfaHtml=n,this.div=null,this._cancelled=!1}render(t,e="display"){return O(this,null,function*(){if(e==="print"){let s={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:e};return this.div=document.createElement("div"),s.div=this.div,_y.render(s)}let i=yield this.pdfPage.getXfa();if(this._cancelled||!i)return{textDivs:[]};let n={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:i,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:e};return this.div?_y.update(n):(this.div=document.createElement("div"),n.div=this.div,_y.render(n))})}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}},Uk={annotationEditorUIManager:null,annotationStorage:null,downloadManager:null,enableScripting:!1,fieldObjectsPromise:null,findController:null,hasJSActionsPromise:null,get linkService(){return new Uh}},Wk=new Map([["canvasWrapper",0],["textLayer",1],["annotationLayer",2],["annotationEditorLayer",3],["xfaLayer",3]]),ua,iu,pa,nu,Wo,Go,su,ou,ru,fa,dc,hc,Hs,ma,$o,It,Zl,hm,Nh,n0,s0,o0,r0,a0,uE,pE,l0,Cm=class{constructor(t){b(this,It);b(this,ua,Gs.ENABLE_FORMS);b(this,iu,!1);b(this,pa,!1);b(this,nu,!1);b(this,Wo,null);b(this,Go,null);b(this,su,null);b(this,ou,1);b(this,ru,1);b(this,fa,null);b(this,dc,_e.INITIAL);b(this,hc,ts.ENABLE);b(this,Hs,{directDrawing:!0,initialOptionalContent:!0,regularAnnotations:!0});b(this,ma,new WeakMap);b(this,$o,[null,null,null,null]);var s,o,l,c,h;let e=t.container,i=t.defaultViewport;this.id=t.id,this.renderingId="page"+this.id,m(this,Wo,t.layerProperties||Uk),this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=t.scale||BC,this.viewport=i,this.pdfPageRotate=i.rotation,this._optionalContentConfigPromise=t.optionalContentConfigPromise||null,m(this,hc,(s=t.textLayerMode)!=null?s:ts.ENABLE),m(this,ua,(o=t.annotationMode)!=null?o:Gs.ENABLE_FORMS),this.imageResourcesPath=t.imageResourcesPath||"",this.maxCanvasPixels=(l=t.maxCanvasPixels)!=null?l:qy.get("maxCanvasPixels"),this.pageColors=t.pageColors||null,m(this,iu,t.enableHWA||!1),this.eventBus=t.eventBus,this.renderingQueue=t.renderingQueue,this.l10n=t.l10n,this.l10n||(this.l10n=new yc),this.renderTask=null,this.resume=null,this._isStandalone=!((c=this.renderingQueue)!=null&&c.hasViewer()),this._container=e,this._annotationCanvasMap=null,this.annotationLayer=null,this.annotationEditorLayer=null,this.textLayer=null,this.zoomLayer=null,this.xfaLayer=null,this.structTreeLayer=null,this.drawLayer=null;let n=document.createElement("div");if(n.className="page",n.setAttribute("data-page-number",this.id),n.setAttribute("role","region"),n.setAttribute("data-l10n-id","pdfjs-page-landmark"),n.setAttribute("data-l10n-args",JSON.stringify({page:this.id})),this.div=n,f(this,It,hm).call(this),e==null||e.append(n),this._isStandalone){e==null||e.style.setProperty("--scale-factor",this.scale*zs.PDF_TO_CSS_UNITS),(h=this.pageColors)!=null&&h.background&&(e==null||e.style.setProperty("--page-bg-color",this.pageColors.background));let{optionalContentConfigPromise:d}=t;d&&d.then(u=>{d===this._optionalContentConfigPromise&&(a(this,Hs).initialOptionalContent=u.hasInitialVisibility)}),t.l10n||this.l10n.translate(this.div)}}get renderingState(){return a(this,dc)}set renderingState(t){if(t!==a(this,dc))switch(m(this,dc,t),a(this,Go)&&(clearTimeout(a(this,Go)),m(this,Go,null)),t){case _e.PAUSED:this.div.classList.remove("loading");break;case _e.RUNNING:this.div.classList.add("loadingIcon"),m(this,Go,setTimeout(()=>{this.div.classList.add("loading"),m(this,Go,null)},0));break;case _e.INITIAL:case _e.FINISHED:this.div.classList.remove("loadingIcon","loading");break}}setPdfPage(t){var i,n,s,o;this._isStandalone&&(((i=this.pageColors)==null?void 0:i.foreground)==="CanvasText"||((n=this.pageColors)==null?void 0:n.background)==="Canvas")&&((s=this._container)==null||s.style.setProperty("--hcm-highlight-filter",t.filterFactory.addHighlightHCMFilter("highlight","CanvasText","Canvas","HighlightText","Highlight")),(o=this._container)==null||o.style.setProperty("--hcm-highlight-selected-filter",t.filterFactory.addHighlightHCMFilter("highlight_selected","CanvasText","Canvas","HighlightText","Highlight"))),this.pdfPage=t,this.pdfPageRotate=t.rotate;let e=(this.rotation+this.pdfPageRotate)%360;this.viewport=t.getViewport({scale:this.scale*zs.PDF_TO_CSS_UNITS,rotation:e}),f(this,It,hm).call(this),this.reset()}destroy(){var t;this.reset(),(t=this.pdfPage)==null||t.cleanup()}hasEditableAnnotations(){var t;return!!((t=this.annotationLayer)!=null&&t.hasEditableAnnotations())}get _textHighlighter(){return gm(this,"_textHighlighter",new i0({pageIndex:this.id-1,eventBus:this.eventBus,findController:a(this,Wo).findController}))}
351_resetZoomLayer(t=!1){if(!this.zoomLayer)return;let e=this.zoomLayer.firstChild;a(this,ma).delete(e),e.width=0,e.height=0,t&&this.zoomLayer.remove(),this.zoomLayer=null}reset({keepZoomLayer:t=!1,keepAnnotationLayer:e=!1,keepAnnotationEditorLayer:i=!1,keepXfaLayer:n=!1,keepTextLayer:s=!1}={}){var g,_,y,C,x;this.cancelRendering({keepAnnotationLayer:e,keepAnnotationEditorLayer:i,keepXfaLayer:n,keepTextLayer:s}),this.renderingState=_e.INITIAL;let o=this.div,l=o.childNodes,c=t&&this.zoomLayer||null,h=e&&((g=this.annotationLayer)==null?void 0:g.div)||null,d=i&&((_=this.annotationEditorLayer)==null?void 0:_.div)||null,u=n&&((y=this.xfaLayer)==null?void 0:y.div)||null,p=s&&((C=this.textLayer)==null?void 0:C.div)||null;for(let I=l.length-1;I>=0;I--){let A=l[I];switch(A){case c:case h:case d:case u:case p:continue}A.remove();let E=a(this,$o).indexOf(A);E>=0&&(a(this,$o)[E]=null)}o.removeAttribute("data-loaded"),h&&this.annotationLayer.hide(),d&&this.annotationEditorLayer.hide(),u&&this.xfaLayer.hide(),p&&this.textLayer.hide(),(x=this.structTreeLayer)==null||x.hide(),c||(this.canvas&&(a(this,ma).delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer())}toggleEditingMode(t){this.hasEditableAnnotations()&&(m(this,nu,t),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0}))}update({scale:t=0,rotation:e=null,optionalContentConfigPromise:i=null,drawingDelay:n=-1}){var o;this.scale=t||this.scale,typeof e=="number"&&(this.rotation=e),i instanceof Promise&&(this._optionalContentConfigPromise=i,i.then(l=>{i===this._optionalContentConfigPromise&&(a(this,Hs).initialOptionalContent=l.hasInitialVisibility)})),a(this,Hs).directDrawing=!0;let s=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*zs.PDF_TO_CSS_UNITS,rotation:s}),f(this,It,hm).call(this),this._isStandalone&&((o=this._container)==null||o.style.setProperty("--scale-factor",this.viewport.scale)),this.canvas){let l=!1;if(a(this,pa)){if(this.maxCanvasPixels===0)l=!0;else if(this.maxCanvasPixels>0){let{width:h,height:d}=this.viewport,{sx:u,sy:p}=this.outputScale;l=(Math.floor(h)*u|0)*(Math.floor(d)*p|0)>this.maxCanvasPixels}}let c=n>=0&&n<1e3;if(c||l){if(c&&!l&&this.renderingState!==_e.FINISHED&&(this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:n}),this.renderingState=_e.FINISHED,a(this,Hs).directDrawing=!1),this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!c,hideTextLayer:c}),c)return;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:a(this,fa)});return}!this.zoomLayer&&!this.canvas.hidden&&(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0})}cancelRendering({keepAnnotationLayer:t=!1,keepAnnotationEditorLayer:e=!1,keepXfaLayer:i=!1,keepTextLayer:n=!1,cancelExtraDelay:s=0}={}){var o;this.renderTask&&(this.renderTask.cancel(s),this.renderTask=null),this.resume=null,this.textLayer&&(!n||!this.textLayer.div)&&(this.textLayer.cancel(),this.textLayer=null),this.annotationLayer&&(!t||!this.annotationLayer.div)&&(this.annotationLayer.cancel(),this.annotationLayer=null,this._annotationCanvasMap=null),this.structTreeLayer&&!this.textLayer&&(this.structTreeLayer=null),this.annotationEditorLayer&&(!e||!this.annotationEditorLayer.div)&&(this.drawLayer&&(this.drawLayer.cancel(),this.drawLayer=null),this.annotationEditorLayer.cancel(),this.annotationEditorLayer=null),this.xfaLayer&&(!i||!this.xfaLayer.div)&&(this.xfaLayer.cancel(),this.xfaLayer=null,(o=this._textHighlighter)==null||o.disable())}cssTransform({target:t,redrawAnnotationLayer:e=!1,redrawAnnotationEditorLayer:i=!1,redrawXfaLayer:n=!1,redrawTextLayer:s=!1,hideTextLayer:o=!1}){var c;if(!t.hasAttribute("zooming")){t.setAttribute("zooming",!0);let{style:h}=t;h.width=h.height=""}let l=a(this,ma).get(t);if(this.viewport!==l){let h=this.viewport.rotation-l.rotation,d=Math.abs(h),u=1,p=1;if(d===90||d===270){let{width:g,height:_}=this.viewport;u=_/g,p=g/_}t.style.transform=`rotate(${h}deg) scale(${u}, ${p})`}e&&this.annotationLayer&&f(this,It,n0).call(this),i&&this.annotationEditorLayer&&(this.drawLayer&&f(this,It,o0).call(this),f(this,It,s0).call(this)),n&&this.xfaLayer&&f(this,It,r0).call(this),this.textLayer&&(o?(this.textLayer.hide(),(c=this.structTreeLayer)==null||c.hide()):s&&f(this,It,a0).call(this))}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(t,e){return this.viewport.convertToPdfPoint(t,e)}draw(){return O(this,null,function*(){this.renderingState!==_e.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());
351let{div:t,l10n:e,pageColors:i,pdfPage:n,viewport:s}=this;if(!n)throw this.renderingState=_e.FINISHED,new Error("pdfPage is not loaded");this.renderingState=_e.RUNNING;let o=document.createElement("div");if(o.classList.add("canvasWrapper"),f(this,It,Zl).call(this,o,"canvasWrapper"),!this.textLayer&&a(this,hc)!==ts.DISABLE&&!n.isPureXfa&&(this._accessibilityManager||(this._accessibilityManager=new t0),this.textLayer=new wm({pdfPage:n,highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,enablePermissions:a(this,hc)===ts.ENABLE_PERMISSIONS,onAppend:T=>{this.l10n.pause(),f(this,It,Zl).call(this,T,"textLayer"),this.l10n.resume()}})),!this.annotationLayer&&a(this,ua)!==Gs.DISABLE){let{annotationStorage:T,annotationEditorUIManager:N,downloadManager:B,enableScripting:W,fieldObjectsPromise:$,hasJSActionsPromise:X,linkService:et}=a(this,Wo);this._annotationCanvasMap||(this._annotationCanvasMap=new Map),this.annotationLayer=new _m({pdfPage:n,annotationStorage:T,imageResourcesPath:this.imageResourcesPath,renderForms:a(this,ua)===Gs.ENABLE_FORMS,linkService:et,downloadManager:B,enableScripting:W,hasJSActionsPromise:X,fieldObjectsPromise:$,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager,annotationEditorUIManager:N,onAppend:rt=>{f(this,It,Zl).call(this,rt,"annotationLayer")}})}let l=T=>{if(p==null||p(!1),this.renderingQueue&&!this.renderingQueue.isHighestPriority(this)){this.renderingState=_e.PAUSED,this.resume=()=>{this.renderingState=_e.RUNNING,T()};return}T()},{width:c,height:h}=s,d=document.createElement("canvas");d.setAttribute("role","presentation"),d.hidden=!0;let u=!!(i!=null&&i.background&&(i!=null&&i.foreground)),p=T=>{(!u||T)&&(d.hidden=!1,p=null)};o.append(d),this.canvas=d;let g=d.getContext("2d",{alpha:!1,willReadFrequently:!a(this,iu)}),_=this.outputScale=new qI;if(this.maxCanvasPixels===0){let T=1/this.scale;_.sx*=T,_.sy*=T,m(this,pa,!0)}else if(this.maxCanvasPixels>0){let T=c*h,N=Math.sqrt(this.maxCanvasPixels/T);_.sx>N||_.sy>N?(_.sx=N,_.sy=N,m(this,pa,!0)):m(this,pa,!1)}let y=cC(_.sx),C=cC(_.sy),x=d.width=Qf(Jf(c*_.sx),y[0]),I=d.height=Qf(Jf(h*_.sy),C[0]),A=Qf(Jf(c),y[1]),E=Qf(Jf(h),C[1]);_.sx=x/A,_.sy=I/E,a(this,ou)!==y[1]&&(t.style.setProperty("--scale-round-x",`${y[1]}px`),m(this,ou,y[1])),a(this,ru)!==C[1]&&(t.style.setProperty("--scale-round-y",`${C[1]}px`),m(this,ru,C[1])),a(this,ma).set(d,s);let L=_.scaled?[_.sx,0,0,_.sy,0,0]:null,v={canvasContext:g,transform:L,viewport:s,annotationMode:a(this,ua),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:i,isEditing:a(this,nu)},S=this.renderTask=n.render(v);S.onContinue=l;let M=S.promise.then(()=>O(this,null,function*(){var N;p==null||p(!0),yield f(this,It,l0).call(this,S),this.structTreeLayer||(this.structTreeLayer=new xm(n,s.rawDims)),f(this,It,a0).call(this),this.annotationLayer&&(yield f(this,It,n0).call(this));let{annotationEditorUIManager:T}=a(this,Wo);T&&(this.drawLayer||(this.drawLayer=new Zy({pageIndex:this.id})),yield f(this,It,o0).call(this),this.drawLayer.setParent(o),this.annotationEditorLayer||(this.annotationEditorLayer=new Xy({uiManager:T,pdfPage:n,l10n:e,structTreeLayer:this.structTreeLayer,accessibilityManager:this._accessibilityManager,annotationLayer:(N=this.annotationLayer)==null?void 0:N.annotationLayer,textLayer:this.textLayer,drawLayer:this.drawLayer.getDrawLayer(),onAppend:B=>{f(this,It,Zl).call(this,B,"annotationEditorLayer")}})),f(this,It,s0).call(this))}),T=>(T instanceof My||p==null||p(!0),f(this,It,l0).call(this,S,T)));if(n.isPureXfa){if(!this.xfaLayer){let{annotationStorage:T,linkService:N}=a(this,Wo);this.xfaLayer=new Am({pdfPage:n,annotationStorage:T,linkService:N})}f(this,It,r0).call(this)}return t.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),M})}setPageLabel(t){var e;this.pageLabel=typeof t=="string"?t:null,this.div.setAttribute("data-l10n-args",JSON.stringify({page:(e=this.pageLabel)!=null?e:this.id})),this.pageLabel!==null?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}get thumbnailCanvas(){let{directDrawing:t,initialOptionalContent:e,regularAnnotations:i}=a(this,Hs);return t&&e&&i?this.canvas:null}};ua=new WeakMap,iu=new WeakMap,pa=new WeakMap,nu=new WeakMap,Wo=new WeakMap,Go=new WeakMap,su=new WeakMap,ou=new WeakMap,ru=new WeakMap,fa=new WeakMap,dc=new WeakMap,hc=new WeakMap,Hs=new WeakMap,ma=new WeakMap,$o=new WeakMap,It=new WeakSet,Zl=function(t,e){let i=Wk.get(e),n=a(this,$o)[i];if(a(this,$o)[i]=t,n){n.replaceWith(t);return}for(let s=i-1;s>=0;s--){let o=a(this,$o)[s];if(o){o.after(t);return}}this.div.prepend(t)},hm=function(){let{viewport:t}=this;if(this.pdfPage){if(a(this,su)===t.rotation)return;m(this,su,t.rotation)}ZI(this.div,t,!0,!1)},Nh=function(t,e){this.eventBus.dispatch(t,{source:this,pageNumber:this.id,error:e})},n0=function(){return O(this,null,function*(){let t=null;try{yield this.annotationLayer.render(this.viewport,{structTreeLayer:this.structTreeLayer},"display")}catch(e){console.error(`#renderAnnotationLayer: "${e}".`),t=e}finally{f(this,It,Nh).call(this,"annotationlayerrendered",t)}})},s0=function(){return O(this,null,function*(){let t=null;try{yield this.annotationEditorLayer.render(this.viewport,"display")}catch(e){console.error(`#renderAnnotationEditorLayer: "${e}".`),t=e}finally{f(this,It,Nh).call(this,"annotationeditorlayerrendered",t)}})},o0=function(){return O(this,null,function*(){try{yield this.drawLayer.render("display")}catch(t){console.error(`#renderDrawLayer: "${t}".`)}})},r0=function(){return O(this,null,function*(){var e;let t=null;try{let i=yield this.xfaLayer.render(this.viewport,"display");i!=null&&i.textDivs&&this._textHighlighter&&f(this,It,pE).call(this,i.textDivs)}catch(i){console.error(`#renderXfaLayer: "${i}".`),t=i}finally{(e=this.xfaLayer)!=null&&e.div&&(this.l10n.pause(),f(this,It,Zl).call(this,this.xfaLayer.div,"xfaLayer"),this.l10n.resume()),f(this,It,Nh).call(this,"xfalayerrendered",t)}})},a0=function(){return O(this,null,function*(){if(!this.textLayer)return;let t=null;try{yield this.textLayer.render(this.viewport)}catch(e){if(e instanceof jI)return;console.error(`#renderTextLayer: "${e}".`),t=e}f(this,It,Nh).call(this,"textlayerrendered",t),f(this,It,uE).call(this)})},uE=function(){return O(this,null,function*(){var e,i,n;if(!this.textLayer)return;let t=yield(e=this.structTreeLayer)==null?void 0:e.render();t&&(this.l10n.pause(),(i=this.structTreeLayer)==null||i.addElementsToTextLayer(),this.canvas&&t.parentNode!==this.canvas&&this.canvas.append(t),this.l10n.resume()),(n=this.structTreeLayer)==null||n.show()})},pE=function(t){return O(this,null,function*(){let e=yield this.pdfPage.getTextContent(),i=[];for(let n of e.items)i.push(n.str);this._textHighlighter.setTextMapping(t,i),this._textHighlighter.enable()})},l0=function(t,e=null){return O(this,null,function*(){if(t===this.renderTask&&(this.renderTask=null),e instanceof My){m(this,fa,null);return}if(m(this,fa,e),this.renderingState=_e.FINISHED,this._resetZoomLayer(!0),a(this,Hs).regularAnnotations=!t.separateAnnots,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:a(this,fa)}),e)throw e})};function Gk(r){return O(this,null,function*(){let t="",e=t.split("#",1)[0],{info:i,metadata:n,contentDispositionFilename:s,contentLength:o}=yield r.getMetadata();if(!o){let{length:l}=yield r.getDownloadInfo();o=l}return Pi(ft({},i),{baseURL:e,filesize:o,filename:s||YI(t),metadata:n==null?void 0:n.getRaw(),authors:n==null?void 0:n.get("dc:creator"),numPages:r.numPages,URL:t})})}var c0=class{constructor(t){this._ready=new Promise((e,i)=>{import(t).then(s=>{e(s.QuickJSSandbox())}).catch(i)})}createSandbox(t){return O(this,null,function*(){(yield this._ready).create(t)})}dispatchEventInSandbox(t){return O(this,null,function*(){let e=yield this._ready;setTimeout(()=>
351e.dispatchEvent(t),0)})}destroySandbox(){return O(this,null,function*(){(yield this._ready).nukeSandbox()})}},Qn,ga,au,_a,ba,lu,_i,Us,uc,Ve,an,qe,fE,um,h0,mE,Fh,d0=class{constructor({eventBus:t,externalServices:e=null,docProperties:i=null}){b(this,qe);b(this,Qn,null);b(this,ga,null);b(this,au,null);b(this,_a,null);b(this,ba,null);b(this,lu,null);b(this,_i,null);b(this,Us,null);b(this,uc,!1);b(this,Ve,null);b(this,an,null);m(this,ba,t),m(this,lu,e),m(this,au,i)}setViewer(t){m(this,Us,t)}setDocument(t){return O(this,null,function*(){var l;if(a(this,_i)&&(yield f(this,qe,Fh).call(this)),m(this,_i,t),!t)return;let[e,i,n]=yield Promise.all([t.getFieldObjects(),t.getCalculationOrderIds(),t.getJSActions()]);if(!e&&!n){yield f(this,qe,Fh).call(this);return}if(t!==a(this,_i))return;try{m(this,Ve,f(this,qe,mE).call(this))}catch(c){console.error(`setDocument: "${c.message}".`),yield f(this,qe,Fh).call(this);return}let s=a(this,ba);m(this,_a,new AbortController);let{signal:o}=a(this,_a);s._on("updatefromsandbox",c=>{(c==null?void 0:c.source)===window&&f(this,qe,fE).call(this,c.detail)},{signal:o}),s._on("dispatcheventinsandbox",c=>{var h;(h=a(this,Ve))==null||h.dispatchEventInSandbox(c.detail)},{signal:o}),s._on("pagechanging",({pageNumber:c,previous:h})=>{c!==h&&(f(this,qe,h0).call(this,h),f(this,qe,um).call(this,c))},{signal:o}),s._on("pagerendered",({pageNumber:c})=>{this._pageOpenPending.has(c)&&c===a(this,Us).currentPageNumber&&f(this,qe,um).call(this,c)},{signal:o}),s._on("pagesdestroy",()=>O(this,null,function*(){var c,h;yield f(this,qe,h0).call(this,a(this,Us).currentPageNumber),yield(c=a(this,Ve))==null?void 0:c.dispatchEventInSandbox({id:"doc",name:"WillClose"}),(h=a(this,Qn))==null||h.resolve()}),{signal:o});try{let c=yield a(this,au).call(this,t);if(t!==a(this,_i))return;yield a(this,Ve).createSandbox({objects:e,calculationOrder:i,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:Pi(ft({},c),{actions:n})}),s.dispatch("sandboxcreated",{source:this})}catch(c){console.error(`setDocument: "${c.message}".`),yield f(this,qe,Fh).call(this);return}yield(l=a(this,Ve))==null?void 0:l.dispatchEventInSandbox({id:"doc",name:"Open"}),yield f(this,qe,um).call(this,a(this,Us).currentPageNumber,!0),Promise.resolve().then(()=>{t===a(this,_i)&&m(this,uc,!0)})})}dispatchWillSave(){return O(this,null,function*(){var t;return(t=a(this,Ve))==null?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillSave"})})}dispatchDidSave(){return O(this,null,function*(){var t;return(t=a(this,Ve))==null?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidSave"})})}dispatchWillPrint(){return O(this,null,function*(){var t;if(a(this,Ve)){yield(t=a(this,an))==null?void 0:t.promise,m(this,an,Promise.withResolvers());try{yield a(this,Ve).dispatchEventInSandbox({id:"doc",name:"WillPrint"})}catch(e){throw a(this,an).resolve(),m(this,an,null),e}yield a(this,an).promise}})}dispatchDidPrint(){return O(this,null,function*(){var t;return(t=a(this,Ve))==null?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidPrint"})})}get destroyPromise(){var t;return((t=a(this,ga))==null?void 0:t.promise)||null}get ready(){return a(this,uc)}get _pageOpenPending(){return gm(this,"_pageOpenPending",new Set)}get _visitedPages(){return gm(this,"_visitedPages",new Map)}};Qn=new WeakMap,ga=new WeakMap,au=new WeakMap,_a=new WeakMap,ba=new WeakMap,lu=new WeakMap,_i=new WeakMap,Us=new WeakMap,uc=new WeakMap,Ve=new WeakMap,an=new WeakMap,qe=new WeakSet,fE=function(t){return O(this,null,function*(){var h,d;let e=a(this,Us),i=e.isInPresentationMode||e.isChangingPresentationMode,{id:n,siblings:s,command:o,value:l}=t;if(!n){switch(o){case"clear":console.clear();break;case"error":console.error(l);break;case"layout":if(!i){let u=bI(l);e.spreadMode=u.spreadMode}break;case"page-num":e.currentPageNumber=l+1;break;case"print":yield e.pagesPromise,a(this,ba).dispatch("print",{source:this});break;case"println":console.log(l);break;case"zoom":i||(e.currentScaleValue=l);break;case"SaveAs":a(this,ba).dispatch("download",{source:this});break;case"FirstPage":e.currentPageNumber=1;break;case"LastPage":e.currentPageNumber=e.pagesCount;break;case"NextPage":e.nextPage();break;case"PrevPage":e.previousPage();break;case"ZoomViewIn":i||e.increaseScale();break;case"ZoomViewOut":i||e.decreaseScale();break;case"WillPrintFinished":(h=a(this,an))==null||h.resolve(),m(this,an,null);break}return}
351if(i&&t.focus)return;delete t.id,delete t.siblings;let c=s?[n,...s]:[n];for(let u of c){let p=document.querySelector(`[data-element-id="${u}"]`);p?p.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:t})):(d=a(this,_i))==null||d.annotationStorage.setValue(u,t)}})},um=function(t,e=!1){return O(this,null,function*(){let i=a(this,_i),n=this._visitedPages;if(e&&m(this,Qn,Promise.withResolvers()),!a(this,Qn))return;let s=a(this,Us).getPageView(t-1);if((s==null?void 0:s.renderingState)!==_e.FINISHED){this._pageOpenPending.add(t);return}this._pageOpenPending.delete(t);let o=O(this,null,function*(){var c,h;let l=yield n.has(t)?null:(c=s.pdfPage)==null?void 0:c.getJSActions();i===a(this,_i)&&(yield(h=a(this,Ve))==null?void 0:h.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:t,actions:l}))});n.set(t,o)})},h0=function(t){return O(this,null,function*(){var s;let e=a(this,_i),i=this._visitedPages;if(!a(this,Qn)||this._pageOpenPending.has(t))return;let n=i.get(t);n&&(i.set(t,null),yield n,e===a(this,_i)&&(yield(s=a(this,Ve))==null?void 0:s.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:t})))})},mE=function(){if(m(this,ga,Promise.withResolvers()),a(this,Ve))throw new Error("#initScripting: Scripting already exists.");return a(this,lu).createScripting()},Fh=function(){return O(this,null,function*(){var t,e,i,n;if(!a(this,Ve)){m(this,_i,null),(t=a(this,ga))==null||t.resolve();return}a(this,Qn)&&(yield Promise.race([a(this,Qn).promise,new Promise(s=>{setTimeout(s,1e3)})]).catch(()=>{}),m(this,Qn,null)),m(this,_i,null);try{yield a(this,Ve).destroySandbox()}catch{}(e=a(this,an))==null||e.reject(new Error("Scripting destroyed.")),m(this,an,null),(i=a(this,_a))==null||i.abort(),m(this,_a,null),this._pageOpenPending.clear(),this._visitedPages.clear(),m(this,Ve,null),m(this,uc,!1),(n=a(this,ga))==null||n.resolve()})};var u0=class extends d0{constructor(t){t.externalServices||window.addEventListener("updatefromsandbox",e=>{t.eventBus.dispatch("updatefromsandbox",{source:window,detail:e.detail})}),t.externalServices||(t.externalServices={createScripting:()=>new c0(t.sandboxBundleSrc)}),t.docProperties||(t.docProperties=e=>Gk(e)),super(t)}},$k=3e4,p0=class{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1,Object.defineProperty(this,"hasViewer",{value:()=>!!this.pdfViewer})}setViewer(t){this.pdfViewer=t}setThumbnailViewer(t){this.pdfThumbnailViewer=t}isHighestPriority(t){return this.highestPriorityPage===t.renderingId}renderHighestPriority(t){var e;this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),!this.pdfViewer.forceRendering(t)&&(this.isThumbnailViewEnabled&&((e=this.pdfThumbnailViewer)!=null&&e.forceRendering())||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),$k)))}getHighestPriority(t,e,i,n=!1){let s=t.views,o=s.length;if(o===0)return null;for(let u=0;u<o;u++){let p=s[u].view;if(!this.isViewFinished(p))return p}let l=t.first.id,c=t.last.id;if(c-l+1>o){let u=t.ids;for(let p=1,g=c-l;p<g;p++){let _=i?l+p:c-p;if(u.has(_))continue;let y=e[_-1];if(!this.isViewFinished(y))return y}}let h=i?c:l-2,d=e[h];return d&&!this.isViewFinished(d)||n&&(h+=i?1:-1,d=e[h],d&&!this.isViewFinished(d))?d:null}isViewFinished(t){return t.renderingState===_e.FINISHED}renderView(t){switch(t.renderingState){case _e.FINISHED:return!1;case _e.PAUSED:this.highestPriorityPage=t.renderingId,t.resume();break;case _e.RUNNING:this.highestPriorityPage=t.renderingId;break;case _e.INITIAL:this.highestPriorityPage=t.renderingId,t.draw().finally(()=>{this.renderHighestPriority()}).catch(e=>{e instanceof My||console.error(`renderView: "${e}"`)});break}return!0}},NC=10,nm={FORCE_SCROLL_MODE_PAGE:1e4,FORCE_LAZY_PAGE_INIT:5e3,PAUSE_EAGER_PAGE_INIT:250};function FC(r){return Object.values(ji).includes(r)&&r!==ji.DISABLE}var Ws,ya,cu,m0,f0=class{constructor(t){b(this,cu);b(this,Ws,new Set);b(this,ya,0);m(this,ya,t)}push(t){let e=a(this,Ws);e.has(t)&&e.delete(t),e.add(t),e.size>
351a(this,ya)&&f(this,cu,m0).call(this)}resize(t,e=null){m(this,ya,t);let i=a(this,Ws);if(e){let n=i.size,s=1;for(let o of i)if(e.has(o.id)&&(i.delete(o),i.add(o)),++s>n)break}for(;i.size>a(this,ya);)f(this,cu,m0).call(this)}has(t){return a(this,Ws).has(t)}[Symbol.iterator](){return a(this,Ws).keys()}};Ws=new WeakMap,ya=new WeakMap,cu=new WeakSet,m0=function(){let t=a(this,Ws).keys().next().value;t==null||t.destroy(),a(this,Ws).delete(t)};var Yo,du,hu,Jn,Hi,va,uu,pu,fu,mu,gu,_u,Xo,xa,wa,Aa,pc,Ko,fc,bu,mc,Ca,qo,gc,ht,gE,_E,bE,Bh,pm,yE,g0,vE,Do,_0,xE,wE,AE,b0,CE,fm,Em=class{constructor(t){b(this,ht);b(this,Yo,null);b(this,du,null);b(this,hu,null);b(this,Jn,ji.NONE);b(this,Hi,null);b(this,va,Gs.ENABLE_FORMS);b(this,uu,null);b(this,pu,!1);b(this,fu,!1);b(this,mu,!1);b(this,gu,!1);b(this,_u,!1);b(this,Xo,null);b(this,xa,null);b(this,wa,null);b(this,Aa,null);b(this,pc,!1);b(this,Ko,null);b(this,fc,!1);b(this,bu,0);b(this,mc,new ResizeObserver(f(this,ht,CE).bind(this)));b(this,Ca,null);b(this,qo,null);b(this,gc,ts.ENABLE);var n,s,o,l,c;let e="4.8.69";if(bC!==e)throw new Error(`The API version "${bC}" does not match the Viewer version "${e}".`);if(this.container=t.container,this.viewer=t.viewer||t.container.firstElementChild,((n=this.container)==null?void 0:n.tagName)!=="DIV"||((s=this.viewer)==null?void 0:s.tagName)!=="DIV")throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&getComputedStyle(this.container).position!=="absolute")throw new Error("The `container` must be absolutely positioned.");a(this,mc).observe(this.container),this.eventBus=t.eventBus,this.linkService=t.linkService||new Uh,this.downloadManager=t.downloadManager||null,this.findController=t.findController||null,m(this,du,t.altTextManager||null),this.findController&&(this.findController.onIsPageVisible=h=>this._getVisiblePages().ids.has(h)),this._scriptingManager=t.scriptingManager||null,m(this,gc,(o=t.textLayerMode)!=null?o:ts.ENABLE),m(this,va,(l=t.annotationMode)!=null?l:Gs.ENABLE_FORMS),m(this,Jn,(c=t.annotationEditorMode)!=null?c:ji.NONE),m(this,hu,t.annotationEditorHighlightColors||null),m(this,fu,t.enableHighlightFloatingButton===!0),m(this,gu,t.enableUpdatedAddImage===!0),m(this,_u,t.enableNewAltTextWhenAddingImage===!0),this.imageResourcesPath=t.imageResourcesPath||"",this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1,this.removePageBorders=t.removePageBorders||!1,this.maxCanvasPixels=t.maxCanvasPixels,this.l10n=t.l10n,this.l10n||(this.l10n=new yc),m(this,mu,t.enablePermissions||!1),this.pageColors=t.pageColors||null,m(this,xa,t.mlManager||null),m(this,pu,t.enableHWA||!1),this.defaultRenderingQueue=!t.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new p0,this.renderingQueue.setViewer(this)):this.renderingQueue=t.renderingQueue;let{abortSignal:i}=t;i==null||i.addEventListener("abort",()=>{a(this,mc).disconnect(),m(this,mc,null)},{once:!0}),this.scroll=hI(this.container,this._scrollUpdate.bind(this),i),this.presentationModeState=Jl.UNKNOWN,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),f(this,ht,b0).call(this),this.eventBus._on("thumbnailrendered",({pageNumber:h,pdfPage:d})=>{let u=this._pages[h-1];a(this,Yo).has(u)||d==null||d.cleanup()}),t.l10n||this.l10n.translate(this.container)}get pagesCount(){return this._pages.length}getPageView(t){return this._pages[t]}getCachedPageViews(){return new Set(a(this,Yo))}get pageViewsReady(){return this._pages.every(t=>t==null?void 0:t.pdfPage)}get renderForms(){return a(this,va)===Gs.ENABLE_FORMS}get enableScripting(){return!!this._scriptingManager}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(t){if(!Number.isInteger(t))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(t,!0)||console.error(`currentPageNumber: "${t}" is not a valid page.`))}_setCurrentPageNumber(t,e=!1){var n,s;if(this._currentPageNumber===t)return e&&f(this,ht,_0).call(this),!0;if(!(0<t&&t<=this.pagesCount))return!1;let i=this._currentPageNumber;return this._currentPageNumber=t,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:t,pageLabel:(s=(n=this._pageLabels)==null?void 0:n[t-1])!=null?s:null,previous:i}),e&&f(this,ht,_0).call(this),!0}get currentPageLabel(){var t,e;return(e=(t=this._pageLabels)==null?void 0:t[this._currentPageNumber-1])!=null?e:null}set currentPageLabel(t){if(!this.pdfDocument)return;let e=t|0;if(this._pageLabels){let i=this._pageLabels.indexOf(t);i>=0&&(e=i+1)}this._setCurrentPageNumber(e,!0)||console.error(`currentPageLabel: "${t}" is not a valid page.`)}get currentScale(){return this._currentScale!==py?this._currentScale:BC}set currentScale(t){if(isNaN(t))throw new Error("Invalid numeric scale.");this.pdfDocument&&f(this,ht,Do).call(this,t,{noScroll:!1})}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(t){this.pdfDocument&&f(this,ht,Do).call(this,t,{noScroll:!1})}get pagesRotation(){return this._pagesRotation}set pagesRotation(t){if(!VC(t))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument||(t%=360,t<0&&(t+=360),this._pagesRotation===t))return;this._pagesRotation=t;let e=this._currentPageNumber;this.refresh(!0,{rotation:t}),this._currentScaleValue&&f(this,ht,Do).call(this,this._currentScaleValue,{noScroll:!0}),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:t,pageNumber:e}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}get _layerProperties(){let t=this;return gm(this,"_layerProperties",{get annotationEditorUIManager(){return a(t,Hi)},get annotationStorage(){var e;return(e=t.pdfDocument)==null?void 0:e.annotationStorage},get downloadManager(){return t.downloadManager},get enableScripting(){return!!t._scriptingManager},get fieldObjectsPromise(){var e;return(e=t.pdfDocument)==null?void 0:e.getFieldObjects()},get findController(){return t.findController}
351,get hasJSActionsPromise(){var e;return(e=t.pdfDocument)==null?void 0:e.hasJSActions()},get linkService(){return t.linkService}})}getAllText(){return O(this,null,function*(){let t=[],e=[];for(let i=1,n=this.pdfDocument.numPages;i<=n;++i){if(a(this,fc))return null;e.length=0;let s=yield this.pdfDocument.getPage(i),{items:o}=yield s.getTextContent();for(let l of o)l.str&&e.push(l.str),l.hasEOL&&e.push(`
352`);t.push(Vh(e.join("")))}return t.join(`
353`)})}setDocument(t){var p,g,_;if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),(p=this.findController)==null||p.setDocument(null),(g=this._scriptingManager)==null||g.setDocument(null),(_=a(this,Hi))==null||_.destroy(),m(this,Hi,null)),this.pdfDocument=t,!t)return;let e=t.numPages,i=t.getPage(1),n=t.getOptionalContentConfig({intent:"display"}),s=a(this,mu)?t.getPermissions():Promise.resolve(),{eventBus:o,pageColors:l,viewer:c}=this;m(this,Xo,new AbortController);let{signal:h}=a(this,Xo);if(e>nm.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");let y=this._scrollMode=Nt.PAGE;o.dispatch("scrollmodechanged",{source:this,mode:y})}this._pagesCapability.promise.then(()=>{o.dispatch("pagesloaded",{source:this,pagesCount:e})},()=>{});let d=y=>{let C=this._pages[y.pageNumber-1];C&&a(this,Yo).push(C)};o._on("pagerender",d,{signal:h});let u=y=>{y.cssTransform||(this._onePageRenderedCapability.resolve({timestamp:y.timestamp}),o._off("pagerendered",u))};o._on("pagerendered",u,{signal:h}),Promise.all([i,s]).then(([y,C])=>{var S,M;if(t!==this.pdfDocument)return;this._firstPageCapability.resolve(y),this._optionalContentConfigPromise=n;let{annotationEditorMode:x,annotationMode:I,textLayerMode:A}=f(this,ht,gE).call(this,C);if(A!==ts.DISABLE){let T=m(this,Ko,document.createElement("div"));T.id="hiddenCopyElement",c.before(T)}if(typeof AbortSignal.any=="function"&&x!==ji.DISABLE){let T=x;t.isPureXfa?console.warn("Warning: XFA-editing is not implemented."):FC(T)?(m(this,Hi,new UI(this.container,c,a(this,du),o,t,l,a(this,hu),a(this,fu),a(this,gu),a(this,_u),a(this,xa))),o.dispatch("annotationeditoruimanager",{source:this,uiManager:a(this,Hi)}),T!==ji.NONE&&(T===ji.STAMP&&((S=a(this,xa))==null||S.loadModel("altText")),a(this,Hi).updateMode(T))):console.error(`Invalid AnnotationEditor mode: ${T}`)}let E=this._scrollMode===Nt.PAGE?null:c,L=this.currentScale,v=y.getViewport({scale:L*zs.PDF_TO_CSS_UNITS});c.style.setProperty("--scale-factor",v.scale),l!=null&&l.background&&c.style.setProperty("--page-bg-color",l.background),((l==null?void 0:l.foreground)==="CanvasText"||(l==null?void 0:l.background)==="Canvas")&&(c.style.setProperty("--hcm-highlight-filter",t.filterFactory.addHighlightHCMFilter("highlight","CanvasText","Canvas","HighlightText","Highlight")),c.style.setProperty("--hcm-highlight-selected-filter",t.filterFactory.addHighlightHCMFilter("highlight_selected","CanvasText","Canvas","HighlightText","ButtonText")));for(let T=1;T<=e;++T){let N=new Cm({container:E,eventBus:o,id:T,scale:L,defaultViewport:v.clone(),optionalContentConfigPromise:n,renderingQueue:this.renderingQueue,textLayerMode:A,annotationMode:I,imageResourcesPath:this.imageResourcesPath,maxCanvasPixels:this.maxCanvasPixels,pageColors:l,l10n:this.l10n,layerProperties:this._layerProperties,enableHWA:a(this,pu)});this._pages.push(N)}(M=this._pages[0])==null||M.setPdfPage(y),this._scrollMode===Nt.PAGE?f(this,ht,Bh).call(this):this._spreadMode!==hi.NONE&&this._updateSpreadMode(),f(this,ht,_E).call(this,h).then(()=>O(this,null,function*(){var N,B;if(t!==this.pdfDocument)return;if((N=this.findController)==null||N.setDocument(t),(B=this._scriptingManager)==null||B.setDocument(t),a(this,Ko)&&document.addEventListener("copy",f(this,ht,bE).bind(this,A),{signal:h}),a(this,Hi)&&o.dispatch("annotationeditormodechanged",{source:this,mode:a(this,Jn)}),t.loadingParams.disableAutoFetch||e>nm.FORCE_LAZY_PAGE_INIT){this._pagesCapability.resolve();return}let T=e-1;if(T<=0){this._pagesCapability.resolve();return}for(let W=2;W<=e;++W){let $=t.getPage(W).then(X=>{let et=this._pages[W-1];et.pdfPage||et.setPdfPage(X),--T===0&&this._pagesCapability.resolve()},X=>{console.error(`Unable to get page ${W} to initialize viewer`,X),--T===0&&this._pagesCapability.resolve()});W%nm.PAUSE_EAGER_PAGE_INIT===0&&(yield $)}})),o.dispatch("pagesinit",{source:this}),t.getMetadata().then(({info:T})=>{t===this.pdfDocument&&T.Language&&(c.lang=T.Language)}),this.defaultRenderingQueue&&this.update()}).catch(y=>{console.error("Unable to initialize viewer",y),this._pagesCapability.reject(y)})}setPageLabels(t){var e,i;if(this.pdfDocument){t?Array.isArray(t)&&this.pdfDocument.numPages===t.length?this._pageLabels=t:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let n=0,s=this._pages.length;n<s;n++)this._pages[n].setPageLabel((i=(e=this._pageLabels)==null?void 0:e[n])!=null?i:null)}}_resetView(){var t,e;this._pages=[],this._currentPageNumber=1,this._currentScale=py,this._currentScaleValue=null,this._pageLabels=null,m(this,Yo,new f0(NC)),this._location=null,this._pagesRotation=0,this._optionalContentConfigPromise=null,this._firstPageCapability=Promise.withResolvers(),this._onePageRenderedCapability=Promise.withResolvers(),this._pagesCapability=Promise.withResolvers(),this._scrollMode=Nt.VERTICAL,this._previousScrollMode=Nt.UNKNOWN,this._spreadMode=hi.NONE,m(this,Ca,{previousPageNumber:1,scrollDown:!0,pages:[]}),(t=a(this,Xo))==null||t.abort(),m(this,Xo,null),this.viewer.textContent="",this._updateScrollMode(),this.viewer.removeAttribute("lang"),
353(e=a(this,Ko))==null||e.remove(),m(this,Ko,null),f(this,ht,fm).call(this)}_scrollUpdate(){this.pagesCount!==0&&this.update()}pageLabelToPageNumber(t){if(!this._pageLabels)return null;let e=this._pageLabels.indexOf(t);return e<0?null:e+1}scrollPageIntoView({pageNumber:t,destArray:e=null,allowNegativeOffset:i=!1,ignoreDestinationZoom:n=!1}){if(!this.pdfDocument)return;let s=Number.isInteger(t)&&this._pages[t-1];if(!s){console.error(`scrollPageIntoView: "${t}" is not a valid pageNumber parameter.`);return}if(this.isInPresentationMode||!e){this._setCurrentPageNumber(t,!0);return}let o=0,l=0,c=0,h=0,d,u,p=s.rotation%180!==0,g=(p?s.height:s.width)/s.scale/zs.PDF_TO_CSS_UNITS,_=(p?s.width:s.height)/s.scale/zs.PDF_TO_CSS_UNITS,y=0;switch(e[1].name){case"XYZ":o=e[2],l=e[3],y=e[4],o=o!==null?o:0,l=l!==null?l:_;break;case"Fit":case"FitB":y="page-fit";break;case"FitH":case"FitBH":l=e[2],y="page-width",l===null&&this._location?(o=this._location.left,l=this._location.top):(typeof l!="number"||l<0)&&(l=_);break;case"FitV":case"FitBV":o=e[2],c=g,h=_,y="page-height";break;case"FitR":o=e[2],l=e[3],c=e[4]-o,h=e[5]-l;let A=rC,E=aC;this.removePageBorders&&(A=E=0),d=(this.container.clientWidth-A)/c/zs.PDF_TO_CSS_UNITS,u=(this.container.clientHeight-E)/h/zs.PDF_TO_CSS_UNITS,y=Math.min(Math.abs(d),Math.abs(u));break;default:console.error(`scrollPageIntoView: "${e[1].name}" is not a valid destination type.`);return}if(n||(y&&y!==this._currentScale?this.currentScaleValue=y:this._currentScale===py&&(this.currentScaleValue=aI)),y==="page-fit"&&!e[4]){f(this,ht,pm).call(this,s);return}let C=[s.viewport.convertToViewportPoint(o,l),s.viewport.convertToViewportPoint(o+c,l+h)],x=Math.min(C[0][0],C[1][0]),I=Math.min(C[0][1],C[1][1]);i||(x=Math.max(x,0),I=Math.max(I,0)),f(this,ht,pm).call(this,s,{left:x,top:I})}_updateLocation(t){let e=this._currentScale,i=this._currentScaleValue,n=parseFloat(i)===e?Math.round(e*1e4)/100:i,s=t.id,o=this._pages[s-1],l=this.container,c=o.getPagePoint(l.scrollLeft-t.x,l.scrollTop-t.y),h=Math.round(c[0]),d=Math.round(c[1]),u=`#page=${s}`;this.isInPresentationMode||(u+=`&zoom=${n},${h},${d}`),this._location={pageNumber:s,scale:n,top:d,left:h,rotation:this._pagesRotation,pdfOpenParams:u}}update(){let t=this._getVisiblePages(),e=t.views,i=e.length;if(i===0)return;let n=Math.max(NC,2*i+1);a(this,Yo).resize(n,t.ids),this.renderingQueue.renderHighestPriority(t);let s=this._spreadMode===hi.NONE&&(this._scrollMode===Nt.PAGE||this._scrollMode===Nt.VERTICAL),o=this._currentPageNumber,l=!1;for(let c of e){if(c.percent<100)break;if(c.id===o&&s){l=!0;break}}this._setCurrentPageNumber(l?o:e[0].id),this._updateLocation(t.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(t){return this.container.contains(t)}focus(){this.container.focus()}get _isContainerRtl(){return getComputedStyle(this.container).direction==="rtl"}get isInPresentationMode(){return this.presentationModeState===Jl.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===Jl.CHANGING}get isHorizontalScrollbarEnabled(){return this.isInPresentationMode?!1:this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return this.isInPresentationMode?!1:this.container.scrollHeight>this.container.clientHeight}_getVisiblePages(){let t=this._scrollMode===Nt.PAGE?a(this,Ca).pages:this._pages,e=this._scrollMode===Nt.HORIZONTAL,i=e&&this._isContainerRtl;return pI({scrollEl:this.container,views:t,sortByVisibility:!0,horizontal:e,rtl:i})}cleanup(){for(let t of this._pages)t.renderingState!==_e.FINISHED&&t.reset()}_cancelRendering(){for(let t of this._pages)t.cancelRendering()}forceRendering(t){let e=t||this._getVisiblePages(),i=f(this,ht,AE).call(this,e),n=this._spreadMode!==hi.NONE&&this._scrollMode!==Nt.HORIZONTAL,s=this.renderingQueue.getHighestPriority(e,this._pages,i,n);return s?(f(this,ht,wE).call(this,s).then(()=>{this.renderingQueue.renderView(s)}),!0):!1}get hasEqualPageSizes(){let t=this._pages[0];for(let e=1,i=this._pages.length;e<i;++e){let n=this._pages[e];if(n.width!==t.width||n.height!==t.height)return!1}return!0}getPagesOverview(){let t;return this._pages.map(e=>{let i=e.pdfPage.getViewport({scale:1}),n=dC(i);if(t===void 0)t=n;else if(this.enablePrintAutoRotate&&n!==t)return{width:i.height,height:i.width,rotation:(i.rotation-90)%360};return{width:i.width,height:i.height,rotation:i.rotation}})}get optionalContentConfigPromise(){return this.pdfDocument?this._optionalContentConfigPromise?this._optionalContentConfigPromise:(console.error("optionalContentConfigPromise: Not initialized yet."),this.pdfDocument.getOptionalContentConfig({intent:"display"})):Promise.resolve(null)}set optionalContentConfigPromise(t){if(!(t instanceof Promise))throw new Error(`Invalid optionalContentConfigPromise: ${t}`);this.pdfDocument&&this._optionalContentConfigPromise&&(this._optionalContentConfigPromise=t,this.refresh(!1,{optionalContentConfigPromise:t}),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:t}))}get scrollMode(){return this._scrollMode}set scrollMode(t){if(this._scrollMode!==t){if(!fI(t))throw new Error(`Invalid scroll mode: ${t}`);this.pagesCount>nm.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=t,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:t}),this._updateScrollMode(this._currentPageNumber))}}_updateScrollMode(t=null){let e=this._scrollMode,i=this.viewer;i.classList.toggle("scrollHorizontal",e===Nt.HORIZONTAL),i.classList.toggle("scrollWrapped",e===Nt.WRAPPED),!(!this.pdfDocument||!t)&&(e===Nt.PAGE?f(this,ht,Bh).call(this):this._previousScrollMode===Nt.PAGE&&this._updateSpreadMode(),this._currentScaleValue&&isNaN(this._currentScaleValue)&&f(this,ht,Do).call(this,this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(t,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(t){if(this._spreadMode!==t){if(!mI(t))throw new Error(`Invalid spread mode: ${t}`);this._spreadMode=t,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:t}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(t=null){if(!this.pdfDocument)return;let e=this.viewer,i=this._pages;if(this._scrollMode===Nt.PAGE)f(this,ht,Bh).call(this);else if(e.textContent="",this._spreadMode===hi.NONE)for(let n of this._pages)e.append(n.div);else{let n=this._spreadMode-1,s=null;for(let o=0,l=i.length;o<l;++o)s===null?(s=document.createElement("div"),s.className="spread",e.append(s)):o%2===n&&(s=s.cloneNode(!1),e.append(s)),s.append(i[o].div)}t&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&f(this,ht,Do).call(this,this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(t,!0),this.update())}_getPageAdvance(t,e=!1){switch(this._scrollMode){case Nt.WRAPPED:{let{views:i}=this._getVisiblePages(),n=new Map;for(let{id:s,y:o,percent:l,widthPercent:c}of i){if(l===0||c<100)continue;let h=n.get(o);h||n.set(o,h||(h=[])),h.push(s)}for(let s of n.values()){let o=s.indexOf(t);if(o===-1)continue;let l=s.length;if(l===1)break;if(e)for(let c=o-1,h=0;c>=h;c--){let d=s[c],u=s[c+1]-1;if(d<u)return t-u}else for(let c=o+1,h=l;c<h;c++){let d=s[c],u=s[c-1]+1;if(d>u)return u-t}if(e){let c=s[0];if(c<t)return t-c+1}else{let c=s[l-1];if(c>t)return c-t+1}break}break}case Nt.HORIZONTAL:break;case Nt.PAGE:case Nt.VERTICAL:{if(this._spreadMode===hi.NONE)break;let i=this._spreadMode-1;if(e&&t%2!==i)break;if(!e&&t%2===i)break;let{views:n}=this._getVisiblePages(),s=e?t-1:t+1;for(let{id:o,percent:l,widthPercent:c}of n)if(o===s){if(l>0&&c===100)return 2;break}break}}return 1}nextPage(){let t=this._currentPageNumber,e=this.pagesCount;if(t>=e)return!1;let i=this._getPageAdvance(t,!1)||1;return this.currentPageNumber=Math.min(t+i,e),!0}previousPage(){let t=this._currentPageNumber;if(t<=1)return!1;let e=this._getPageAdvance(t,!0)||1;return this.currentPageNumber=Math.max(t-e,1),!0}updateScale({drawingDelay:t,scaleFactor:e=null,steps:i=null,origin:n}){if(i===null&&e===null)throw new Error("Invalid updateScale options: either `steps` or `scaleFactor` must be provided.");if(!this.pdfDocument)return;let s=this._currentScale;if(e>0&&e!==1)s=Math.round(s*e*100)/100;else if(i){let o=i>
3530?oC:1/oC,l=i>0?Math.ceil:Math.floor;i=Math.abs(i);do s=l((s*o).toFixed(2)*10)/10;while(--i>0)}s=Math.max(lI,Math.min(cI,s)),f(this,ht,Do).call(this,s,{noScroll:!1,drawingDelay:t,origin:n})}increaseScale(t={}){var e;this.updateScale(Pi(ft({},t),{steps:(e=t.steps)!=null?e:1}))}decreaseScale(t={}){var e;this.updateScale(Pi(ft({},t),{steps:-((e=t.steps)!=null?e:1)}))}get containerTopLeft(){return a(this,uu)||m(this,uu,[this.container.offsetTop,this.container.offsetLeft])}get annotationEditorMode(){return a(this,Hi)?a(this,Jn):ji.DISABLE}set annotationEditorMode({mode:t,editId:e=null,isFromKeyboard:i=!1}){var o;if(!a(this,Hi))throw new Error("The AnnotationEditor is not enabled.");if(a(this,Jn)===t)return;if(!FC(t))throw new Error(`Invalid AnnotationEditor mode: ${t}`);if(!this.pdfDocument)return;t===ji.STAMP&&((o=a(this,xa))==null||o.loadModel("altText"));let{eventBus:n}=this,s=()=>{f(this,ht,fm).call(this),m(this,Jn,t),a(this,Hi).updateMode(t,e,i),n.dispatch("annotationeditormodechanged",{source:this,mode:t})};if(t===ji.NONE||a(this,Jn)===ji.NONE){let l=t!==ji.NONE;l||this.pdfDocument.annotationStorage.resetModifiedIds();for(let h of this._pages)h.toggleEditingMode(l);let c=f(this,ht,xE).call(this);if(l&&c){f(this,ht,fm).call(this),m(this,wa,new AbortController);let h=AbortSignal.any([a(this,Xo).signal,a(this,wa).signal]);n._on("pagerendered",({pageNumber:d})=>{c.delete(d),c.size===0&&m(this,Aa,setTimeout(s,0))},{signal:h});return}}s()}refresh(t=!1,e=Object.create(null)){if(this.pdfDocument){for(let i of this._pages)i.update(e);a(this,qo)!==null&&(clearTimeout(a(this,qo)),m(this,qo,null)),t||this.update()}}};Yo=new WeakMap,du=new WeakMap,hu=new WeakMap,Jn=new WeakMap,Hi=new WeakMap,va=new WeakMap,uu=new WeakMap,pu=new WeakMap,fu=new WeakMap,mu=new WeakMap,gu=new WeakMap,_u=new WeakMap,Xo=new WeakMap,xa=new WeakMap,wa=new WeakMap,Aa=new WeakMap,pc=new WeakMap,Ko=new WeakMap,fc=new WeakMap,bu=new WeakMap,mc=new WeakMap,Ca=new WeakMap,qo=new WeakMap,gc=new WeakMap,ht=new WeakSet,gE=function(t){let e={annotationEditorMode:a(this,Jn),annotationMode:a(this,va),textLayerMode:a(this,gc)};return t&&(!t.includes(em.COPY)&&a(this,gc)===ts.ENABLE&&(e.textLayerMode=ts.ENABLE_PERMISSIONS),t.includes(em.MODIFY_CONTENTS)||(e.annotationEditorMode=ji.DISABLE),!t.includes(em.MODIFY_ANNOTATIONS)&&!t.includes(em.FILL_INTERACTIVE_FORMS)&&a(this,va)===Gs.ENABLE_FORMS&&(e.annotationMode=Gs.ENABLE)),e},_E=function(t){return O(this,null,function*(){if(document.visibilityState==="hidden"||!this.container.offsetParent||this._getVisiblePages().views.length===0)return;let e=Promise.withResolvers(),i=new AbortController;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e.resolve()},{signal:typeof AbortSignal.any=="function"?AbortSignal.any([t,i.signal]):t}),yield Promise.race([this._onePageRenderedCapability.promise,e.promise]),i.abort()})},bE=function(t,e){let i=document.getSelection(),{focusNode:n,anchorNode:s}=i;if(s&&n&&i.containsNode(a(this,Ko))){if(a(this,pc)||t===ts.ENABLE_PERMISSIONS){e.preventDefault(),e.stopPropagation();return}m(this,pc,!0);let{classList:o}=this.viewer;o.add("copyAll");let l=new AbortController;window.addEventListener("keydown",c=>m(this,fc,c.key==="Escape"),{signal:l.signal}),this.getAllText().then(c=>O(this,null,function*(){c!==null&&(yield navigator.clipboard.writeText(c))})).catch(c=>{console.warn(`Something goes wrong when extracting the text: ${c.message}`)}).finally(()=>{m(this,pc,!1),m(this,fc,!1),l.abort(),o.remove("copyAll")}),e.preventDefault(),e.stopPropagation()}},Bh=function(){if(this._scrollMode!==Nt.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");let t=this._currentPageNumber,e=a(this,Ca),i=this.viewer;if(i.textContent="",e.pages.length=0,this._spreadMode===hi.NONE&&!this.isInPresentationMode){let n=this._pages[t-1];i.append(n.div),e.pages.push(n)}else{let n=new Set,s=this._spreadMode-1;s===-1?n.add(t-1):t%2!==s?(n.add(t-1),n.add(t)):(n.add(t-2),n.add(t-1));let o=document.createElement("div");
353if(o.className="spread",this.isInPresentationMode){let l=document.createElement("div");l.className="dummyPage",o.append(l)}for(let l of n){let c=this._pages[l];c&&(o.append(c.div),e.pages.push(c))}i.append(o)}e.scrollDown=t>=e.previousPageNumber,e.previousPageNumber=t},pm=function(t,e=null){let{div:i,id:n}=t;if(this._currentPageNumber!==n&&this._setCurrentPageNumber(n),this._scrollMode===Nt.PAGE&&(f(this,ht,Bh).call(this),this.update()),!e&&!this.isInPresentationMode){let s=i.offsetLeft+i.clientLeft,o=s+i.clientWidth,{scrollLeft:l,clientWidth:c}=this.container;(this._scrollMode===Nt.HORIZONTAL||s<l||o>l+c)&&(e={left:0,top:0})}zC(i,e),!this._currentScaleValue&&this._location&&(this._location=null)},yE=function(t){return t===this._currentScale||Math.abs(t-this._currentScale)<1e-15},g0=function(t,e,{noScroll:i=!1,preset:n=!1,drawingDelay:s=-1,origin:o=null}){if(this._currentScaleValue=e.toString(),f(this,ht,yE).call(this,t)){n&&this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:e});return}this.viewer.style.setProperty("--scale-factor",t*zs.PDF_TO_CSS_UNITS);let l=s>=0&&s<1e3;this.refresh(!0,{scale:t,drawingDelay:l?s:-1}),l&&m(this,qo,setTimeout(()=>{m(this,qo,null),this.refresh()},s));let c=this._currentScale;if(this._currentScale=t,!i){let h=this._currentPageNumber,d;if(this._location&&!(this.isInPresentationMode||this.isChangingPresentationMode)&&(h=this._location.pageNumber,d=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:h,destArray:d,allowNegativeOffset:!0}),Array.isArray(o)){let u=t/c-1,[p,g]=this.containerTopLeft;this.container.scrollLeft+=(o[0]-g)*u,this.container.scrollTop+=(o[1]-p)*u}}this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:n?e:void 0}),this.defaultRenderingQueue&&this.update()},vE=function(){return this._spreadMode!==hi.NONE&&this._scrollMode!==Nt.HORIZONTAL?2:1},Do=function(t,e){let i=parseFloat(t);if(i>0)e.preset=!1,f(this,ht,g0).call(this,i,t,e);else{let n=this._pages[this._currentPageNumber-1];if(!n)return;let s=rC,o=aC;this.isInPresentationMode?(s=o=4,this._spreadMode!==hi.NONE&&(s*=2)):this.removePageBorders?s=o=0:this._scrollMode===Nt.HORIZONTAL&&([s,o]=[o,s]);let l=(this.container.clientWidth-s)/n.width*n.scale/a(this,ht,vE),c=(this.container.clientHeight-o)/n.height*n.scale;switch(t){case"page-actual":i=1;break;case"page-width":i=l;break;case"page-height":i=c;break;case"page-fit":i=Math.min(l,c);break;case"auto":let h=dC(n)?l:Math.min(c,l);i=Math.min(dI,h);break;default:console.error(`#setScale: "${t}" is an unknown zoom value.`);return}e.preset=!0,f(this,ht,g0).call(this,i,t,e)}},_0=function(){let t=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&f(this,ht,Do).call(this,this._currentScaleValue,{noScroll:!0}),f(this,ht,pm).call(this,t)},xE=function(){let t=this._getVisiblePages(),e=[],{ids:i,views:n}=t;for(let s of n){let{view:o}=s;if(!o.hasEditableAnnotations()){i.delete(o.id);continue}e.push(s)}return e.length===0?null:(this.renderingQueue.renderHighestPriority({first:e[0],last:e.at(-1),views:e,ids:i}),i)},wE=function(t){return O(this,null,function*(){if(t.pdfPage)return t.pdfPage;try{let e=yield this.pdfDocument.getPage(t.id);return t.pdfPage||t.setPdfPage(e),e}catch(e){return console.error("Unable to get page for page view",e),null}})},AE=function(t){var e,i;if(((e=t.first)==null?void 0:e.id)===1)return!0;if(((i=t.last)==null?void 0:i.id)===this.pagesCount)return!1;switch(this._scrollMode){case Nt.PAGE:return a(this,Ca).scrollDown;case Nt.HORIZONTAL:return this.scroll.right}return this.scroll.down},b0=function(t=this.container.clientHeight){t!==a(this,bu)&&(m(this,bu,t),gI.setProperty("--viewer-container-height",`${t}px`))},CE=function(t){for(let e of t)if(e.target===this.container){f(this,ht,b0).call(this,Math.floor(e.borderBoxSize[0].blockSize)),m(this,uu,null);break}},fm=function(){var t;(t=a(this,wa))==null||t.abort(),m(this,wa,null),a(this,Aa)!==null&&(clearTimeout(a(this,Aa)),m(this,Aa,null))};var y0=class extends Em{_resetView(){super._resetView(),this._scrollMode=Nt.PAGE,this._spreadMode=hi.NONE}set scrollMode(t){}_updateScrollMode(){}set spreadMode(t){}_updateSpreadMode(){}};var Yk=fe.AnnotationLayerBuilder,Xk=fe.DownloadManager,Kk=fe.EventBus,qk=fe.FindState,x0=fe.GenericL10n,Sa=fe.LinkTarget,w0=fe.PDFFindController,Zk=fe.PDFHistory,A0=fe.PDFLinkService,Qk=fe.PDFPageView,Jk=fe.PDFScriptingManager,C0=fe.PDFSinglePageViewer,E0=fe.PDFViewer,t1=fe.ProgressBar,e1=fe.RenderingStates,i1=fe.ScrollMode,n1=fe.SimpleLinkService,s1=fe.SpreadMode,o1=fe.StructTreeLayerBuilder,r1=fe.TextLayerBuilder,a1=fe.XfaLayerBuilder,l1=fe.parseQueryString;var c1=["pdfViewerContainer"];function d1(r,t){let e=new r.EventBus;return h1(e,t),e}function h1(r,t){xe(r,"documentload").pipe(At(t)).subscribe(()=>{let e=document.createEvent("CustomEvent");e.initCustomEvent("documentload",!0,!0,{}),window.dispatchEvent(e)}),xe(r,"pagerendered").pipe(At(t)).subscribe(({pageNumber:e,cssTransform:i,source:n})=>{let s=document.createEvent("CustomEvent");s.initCustomEvent("pagerendered",!0,!0,{pageNumber:e,cssTransform:i}),n.div.dispatchEvent(s)}),xe(r,"textlayerrendered").pipe(At(t)).subscribe(({pageNumber:e,source:i})=>{var s;let n=document.createEvent("CustomEvent");n.initCustomEvent("textlayerrendered",!0,!0,{pageNumber:e}),(s=i.textLayerDiv)==null||s.dispatchEvent(n)}),xe(r,"pagechanging").pipe(At(t)).subscribe(({pageNumber:e,source:i})=>{let n=document.createEvent("UIEvents");n.initEvent("pagechanging",!0,!0),n.pageNumber=e,i.container.dis
353patchEvent(n)}),xe(r,"pagesinit").pipe(At(t)).subscribe(({source:e})=>{let i=document.createEvent("CustomEvent");i.initCustomEvent("pagesinit",!0,!0,null),e.container.dispatchEvent(i)}),xe(r,"pagesloaded").pipe(At(t)).subscribe(({pagesCount:e,source:i})=>{let n=document.createEvent("CustomEvent");n.initCustomEvent("pagesloaded",!0,!0,{pagesCount:e}),i.container.dispatchEvent(n)}),xe(r,"scalechange").pipe(At(t)).subscribe(({scale:e,presetValue:i,source:n})=>{let s=document.createEvent("UIEvents");s.initEvent("scalechange",!0,!0),s.scale=e,s.presetValue=i,n.container.dispatchEvent(s)}),xe(r,"updateviewarea").pipe(At(t)).subscribe(({location:e,source:i})=>{let n=document.createEvent("UIEvents");n.initEvent("updateviewarea",!0,!0),n.location=e,i.container.dispatchEvent(n)}),xe(r,"find").pipe(At(t)).subscribe(({source:e,type:i,query:n,phraseSearch:s,caseSensitive:o,highlightAll:l,findPrevious:c})=>{if(e===window)return;let h=document.createEvent("CustomEvent");h.initCustomEvent("find"+i,!0,!0,{query:n,phraseSearch:s,caseSensitive:o,highlightAll:l,findPrevious:c}),window.dispatchEvent(h)}),xe(r,"attachmentsloaded").pipe(At(t)).subscribe(({attachmentsCount:e,source:i})=>{let n=document.createEvent("CustomEvent");n.initCustomEvent("attachmentsloaded",!0,!0,{attachmentsCount:e}),i.container.dispatchEvent(n)}),xe(r,"sidebarviewchanged").pipe(At(t)).subscribe(({view:e,source:i})=>{let n=document.createEvent("CustomEvent");n.initCustomEvent("sidebarviewchanged",!0,!0,{view:e}),i.outerContainer.dispatchEvent(n)}),xe(r,"pagemode").pipe(At(t)).subscribe(({mode:e,source:i})=>{let n=document.createEvent("CustomEvent");n.initCustomEvent("pagemode",!0,!0,{mode:e}),i.pdfViewer.container.dispatchEvent(n)}),xe(r,"namedaction").pipe(At(t)).subscribe(({action:e,source:i})=>{let n=document.createEvent("CustomEvent");n.initCustomEvent("namedaction",!0,!0,{action:e}),i.pdfViewer.container.dispatchEvent(n)}),xe(r,"presentationmodechanged").pipe(At(t)).subscribe(({active:e,switchInProgress:i})=>{let n=document.createEvent("CustomEvent");n.initCustomEvent("presentationmodechanged",!0,!0,{active:e,switchInProgress:i}),window.dispatchEvent(n)}),xe(r,"outlineloaded").pipe(At(t)).subscribe(({outlineCount:e,source:i})=>{let n=document.createEvent("CustomEvent");n.initCustomEvent("outlineloaded",!0,!0,{outlineCount:e}),i.container.dispatchEvent(n)})}function P0(r,t,e){r[t]=e}function yu(){return typeof window>"u"}yu()||P0(Kl,"verbosity",ly.INFOS);typeof Promise.withResolvers>"u"&&window&&(window.Promise.withResolvers=()=>{let r,t;return{promise:new Promise((i,n)=>{r=i,t=n}),resolve:r,reject:t}});var T0=function(r){return r[r.DISABLED=0]="DISABLED",r[r.ENABLED=1]="ENABLED",r[r.ENHANCED=2]="ENHANCED",r}(T0||{}),EE=(()=>{let t=class t{element;ngZone;pdfViewerContainer;eventBus;pdfLinkService;pdfFindController;pdfViewer;isVisible=!1;_cMapsUrl=typeof Kl<"u"?`https://unpkg.com/pdfjs-dist@${Mh}/cmaps/`:null;_imageResourcesPath=typeof Kl<"u"?`https://unpkg.com/pdfjs-dist@${Mh}/web/images/`:void 0;_renderText=!0;_renderTextMode=T0.ENABLED;_stickToPage=!1;_originalSize=!0;_pdf;_page=1;_zoom=1;_zoomScale="page-width";_rotation=0;_showAll=!0;_canAutoResize=!0;_fitToPage=!1;_externalLinkTarget="blank";_showBorders=!1;lastLoaded;_latestScrolledPage;pageScrollTimeout=null;isInitialized=!1;loadingTask;destroy$=new Dt;afterLoadComplete=new Vt;pageRendered=new Vt;pageInitialized=new Vt;textLayerRendered=new Vt;onError=new Vt;onProgress=new Vt;pageChange=new Vt(!0);src;set cMapsUrl(i){this._cMapsUrl=i}set page(i){i=parseInt(i,10)||1;let n=i;this._pdf&&(i=this.getValidPageNumber(i)),this._page=i,n!==i&&this.pageChange.emit(i)}set renderText(i){this._renderText=i}set renderTextMode(i){this._renderTextMode=i}set originalSize(i){this._originalSize=i}set showAll(i){this._showAll=i}set stickToPage(i){this._stickToPage=i}set zoom(i){i<=0||(this._zoom=i)}get zoom(){return this._zoom}set zoomScale(i){this._zoomScale=i}get zoomScale(){return this._zoomScale}set rotation(i){if(!(typeof i=="number"&&i%90===0)){console.warn("Invalid pages rotation angle.");return}this._rotation=i}set externalLinkTarget(i){this._externalLinkTarget=i}set autoresize(i){this._canAutoResize=!!i}set fitToPage(i){this._fitToPage=!!i}set showBorders(i){this._showBorders=!!i}static getLinkTarget(i){switch(i){case"blank":return Sa.BLANK;case"none":return Sa.NONE;case"self":return Sa.SELF;case"parent":return Sa.PARENT;case"top":return Sa.TOP}return null}
353constructor(i,n){if(this.element=i,this.ngZone=n,yu())return;let s,o=Mh,l=window[`pdfWorkerSrc${o}`];l?s=l:window.hasOwnProperty("pdfWorkerSrc")&&typeof window.pdfWorkerSrc=="string"&&window.pdfWorkerSrc?s=window.pdfWorkerSrc:s=`https://cdn.jsdelivr.net/npm/pdfjs-dist@${o}/legacy/build/pdf.worker.min.mjs`,P0(ay,"workerSrc",s)}ngAfterViewChecked(){if(this.isInitialized)return;let i=this.pdfViewerContainer.nativeElement.offsetParent;if(this.isVisible===!0&&i==null){this.isVisible=!1;return}this.isVisible===!1&&i!=null&&(this.isVisible=!0,setTimeout(()=>{this.initialize(),this.ngOnChanges({src:this.src})}))}ngOnInit(){this.initialize(),this.setupResizeListener()}ngOnDestroy(){this.clear(),this.destroy$.next(),this.loadingTask=null}ngOnChanges(i){if(!(yu()||!this.isVisible)){if("src"in i)this.loadPDF();else if(this._pdf){if(("renderText"in i||"showAll"in i)&&(this.setupViewer(),this.resetPdfDocument()),"page"in i){let{page:n}=i;if(n.currentValue===this._latestScrolledPage)return;this.pdfViewer.scrollPageIntoView({pageNumber:this._page})}this.update()}}}updateSize(){Lm(this._pdf.getPage(this.pdfViewer.currentPageNumber)).pipe(At(this.destroy$)).subscribe({next:i=>{let n=this._rotation+i.rotate,s=i.getViewport({scale:this._zoom,rotation:n}).width*t.CSS_UNITS,o=this._zoom,l=!0;if(!this._originalSize||this._fitToPage&&s>this.pdfViewerContainer.nativeElement.clientWidth){let c=i.getViewport({scale:1,rotation:n});o=this.getScale(c.width,c.height),l=!this._stickToPage}this.pdfViewer.currentScale=o,l&&this.pdfViewer.scrollPageIntoView({pageNumber:i.pageNumber,ignoreDestinationZoom:!0})}})}clear(){this.loadingTask&&!this.loadingTask.destroyed&&this.loadingTask.destroy(),this._pdf&&(this._latestScrolledPage=0,this._pdf.destroy(),this._pdf=void 0),this.pdfViewer&&this.pdfViewer.setDocument(null),this.pdfLinkService&&this.pdfLinkService.setDocument(null,null),this.pdfFindController&&this.pdfFindController.setDocument(null)}getPDFLinkServiceConfig(){let i=t.getLinkTarget(this._externalLinkTarget);return i?{externalLinkTarget:i}:{}}initEventBus(){this.eventBus=d1(S0,this.destroy$),xe(this.eventBus,"pagerendered").pipe(At(this.destroy$)).subscribe(i=>{this.pageRendered.emit(i)}),xe(this.eventBus,"pagesinit").pipe(At(this.destroy$)).subscribe(i=>{this.pageInitialized.emit(i)}),xe(this.eventBus,"pagechanging").pipe(At(this.destroy$)).subscribe(({pageNumber:i})=>{this.pageScrollTimeout&&clearTimeout(this.pageScrollTimeout),this.pageScrollTimeout=window.setTimeout(()=>{this._latestScrolledPage=i,this.pageChange.emit(i)},100)}),xe(this.eventBus,"textlayerrendered").pipe(At(this.destroy$)).subscribe(i=>{this.textLayerRendered.emit(i)})}initPDFServices(){this.pdfLinkService=new A0(ft({eventBus:this.eventBus},this.getPDFLinkServiceConfig())),this.pdfFindController=new w0({eventBus:this.eventBus,linkService:this.pdfLinkService})}getPDFOptions(){return{eventBus:this.eventBus,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfLinkService,textLayerMode:this._renderText?this._renderTextMode:T0.DISABLED,findController:this.pdfFindController,l10n:new x0("en"),imageResourcesPath:this._imageResourcesPath,annotationEditorMode:ry.DISABLE}}setupViewer(){this.pdfViewer&&this.pdfViewer.setDocument(null),P0(Kl,"disableTextLayer",!this._renderText),this.initPDFServices(),this._showAll?this.pdfViewer=new E0(this.getPDFOptions()):this.pdfViewer=new C0(this.getPDFOptions()),this.pdfLinkService.setViewer(this.pdfViewer),this.pdfViewer._currentPageNumber=this._page}getValidPageNumber(i){return i<1?1:i>this._pdf.numPages?this._pdf.numPages:i}getDocumentParams(){let i=typeof this.src;if(!this._cMapsUrl)return this.src;let n={cMapUrl:this._cMapsUrl,cMapPacked:!0,enableXfa:!0};return n.isEvalSupported=!1,i==="string"?n.url=this.src:i==="object"&&(this.src.byteLength!==void 0?n.data=this.src:Object.assign(n,this.src)),n}loadPDF(){if(!this.src)return;if(this.lastLoaded===this.src){this.update();return}this.clear(),this.setupViewer(),this.loadingTask=cy(this.getDocumentParams()),this.loadingTask.onProgress=n=>{this.onProgress.emit(n)};let i=this.src;Lm(this.loadingTask.promise).pipe(At(this.destroy$)).subscribe({next:n=>{this._pdf=n,this.lastLoaded=i,this.afterLoadComplete.emit(n),this.resetPdfDocument(),this.update()},error:n=>{this.lastLoaded=null,this.onError.emit(n)}})}update(){this.page=this._page,this.render()}render(){var i,n;if(this._page=this.getValidPageNumber(this._page),(this._rotation!==0||this.pdfViewer.pagesRotation!==this._rotation)&&((i=this.pdfViewer.firstPagePromise)==null||i.then(()=>this.pdfViewer.pagesRotation=this._rotation)),this._stickToPage&&setTimeout(()=>{this.pdfViewer.currentPageNumber=this._page}),(n=this.pdfViewer._pages)!=null&&n.length)this.updateSize();else{let s=this.pageInitialized.subscribe(()=>{this.updateSize(),s.unsubscribe()})}}getScale(i,n){let s=this._showBorders?2*t.BORDER_WIDTH:0,o=this.pdfViewerContainer.nativeElement.clientWidth-s,l=this.pdfViewerContainer.nativeElement.clientHeight-s;if(l===0||n===0||o===0||i===0)return 1;let c=1;switch(this._zoomScale){case"page-fit":c=Math.min(l/n,o/i);break;case"page-height":c=l/n;break;case"page-width":default:c=o/i;break}return this._zoom*c/t.CSS_UNITS}resetPdfDocument(){this.pdfLinkService.setDocument(this._pdf,null),this.pdfFindController.setDocument(this._pdf),this.pdfViewer.setDocument(this._pdf)}initialize(){yu()||!this.isVisible||(this.isInitialized=!0,this.initEventBus(),this.setupViewer())}setupResizeListener(){yu()||this.ngZone.runOutsideAngular(()=>{xe(window,"resize").pipe(Da(100),ui(()=>this._canAutoResize&&!!this._pdf),At(this.destroy$)).subscribe(()=>{this.updateSize()})})}};k(t,"CSS_UNITS",96/72),k(t,"BORDER_WIDTH",9),k(t,"\u0275fac",function(n){return new(n||t)(ct(ne),ct(Kt))}),k(t,"\u0275cmp",kt({type:t,selectors:[["pdf-viewer"]],viewQuery:function(n,s){if(n&1&&De(c1,5),n&2){let o;Jt(o=te())&&(s.pdfViewerContainer=o.first)}},inputs:{src:"src",cMapsUrl:[0,"c-maps-url","cMapsUrl"],page:"page",renderText:[0,"render-text","renderText"],renderTextMode:[0,"render-text-mode","renderTextMode"],originalSize:[0,"original-size","originalSize"],showAll:[0,"show-all","showAll"],stickToPage:[0,"stick-to-page","stickToPage"],zoom:"zoom",zoomScale:[0,"zoom-scale","zoomScale"],rotation:"rotation",externalLinkTarget:[0,"external-link-target","externalLinkTarget"],autoresize:"autoresize",fitToPage:[0,"fit-to-page","fitToPage"],showBorders:[0,"show-borders","showBorders"]},outputs:{afterLoadComplete:"after-load-complete",pageRendered:"page-rendered",pageInitialized:"pages-initialized",textLayerRendered:"text-layer-rendered",onError:"error",onProgress:"on-progress",pageChange:"pageChange"},standalone:!1,features:[En],decls:3,vars:0,consts:[["pdfViewerContainer",""],[1,"ng2-pdf-viewer-container"],[1,"pdfViewer"]],template:function(n,s){n&1&&(D(0,"div",1,0),Q(2,"div",2),R())},styles:[`.ng2-pdf-viewer-container[_ngcontent-%COMP%]{overflow-x:auto;position:absolute;height:100%;width:100%;-webkit-overflow-scrolling:touch}[_nghost-%COMP%]{display:block;position:relative}[_nghost-%COMP%]    {--pdfViewer-padding-bottom: 0;--page-margin: 1px auto -8px;--page-border: 9px solid transparent;--spreadHorizontalWrapped-margin-LR: -3.5px;--viewer-container-height: 0;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");--xfa-unfocused-field-background: var( --annotation-unfocused-field-background );--page-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAA1ElEQVQ4jbWUWw6EIAxFy2NFs/8NzR4UJhpqLsdi5mOmSSMUOfYWqv3S0gMr4XlYH/64gZa/gN3ANYA7KAXALt4ktoQ5MI9YxqaG8bWmsIysMuT6piSQCa4whZThCu8CM4zP9YJaKci9jicPq3NcBWYoPMGUlhG7ivtkB+gVyFY75wXghOvh8t5mto1Mdim6e+MBqH6XsY+YAwjpq3vGF7weTWQptLEDVCZvPTMl5JZZsdh47FHW6qFMyvLYqjcnmdFfY9Xk/KDOlzCusX2mi/ofM7MPkzBcSp4Q1/wAAAAASUVORK5CYII=) 9 9 repeat;--scale-factor: 1;--focus-outline: solid 2px blue;--hover-outline: dashed 2px blue;--freetext-line-height: 1.35;--freetext-padding: 2px;--editorInk-editing-cursor: pointer}@media screen and (forced-colors: active){[_nghost-%COMP%]    {--pdfViewer-padding-bottom: 9px;--page-margin: 8px auto -1px;--page-border: 1px solid CanvasText;--page-border-image: none;--spreadHorizontalWrapped-margin-LR: 3.5px}}@media (forced-colors: active){[_nghost-%COMP%]    {--focus-outline: solid 3px ButtonText;--hover-outline: dashed 3px ButtonText}}[_nghost-%COMP%]     .textLayer{position:absolute;text-align:initial;inset:0;overflow:hidden;opacity:.2;line-height:1;-webkit-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0}[_nghost-%COMP%]     .textLayer span, [_nghost-%COMP%]     .textLayer br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%}[_nghost-%COMP%]     .textLayer span.markedContent{top:0;height:0}[_nghost-%COMP%]     .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}[_nghost-%COMP%]     .textLayer .highlight.appended{position:initial}[_nghost-%COMP%]     .textLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%]     .textLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%]     .textLayer .highlight.middle{border-radius:0}[_nghost-%COMP%]     .textLayer .highlight.selected{background-color:#006400}[_nghost-%COMP%]     .textLayer ::selection{background:rgb(0,0,255)}[_nghost-%COMP%]     .textLayer br::selection{background:transparent}[_nghost-%COMP%]     .textLayer .endOfContent{display:block;position:absolute;inset:100% 0 0;z-index:-1;cursor:default;-webkit-user-select:none;user-select:none}[_nghost-%COMP%]     .textLayer .endOfContent.active{top:0}@media (forced-colors: active){[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input:required, [_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation textarea:required, [_nghost-%COMP%]     .annotationLayer .choiceWidgetAnnotation select:required, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:required, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid selectedItem}}[_nghost-%COMP%]     .annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0}[_nghost-%COMP%]     .annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;transform-origin:0 0}[_nghost-%COMP%]     .annotationLayer .linkAnnotation>a, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.pushButton>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.pushButton>canvas{width:100%;height:100%}[_nghost-%COMP%]     .annotationLayer .linkAnnotation>a:hover, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover{opacity:.2;background:rgb(255,255,0);box-shadow:0 2px 10px #ff0}[_nghost-%COMP%]     .annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input, [_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation textarea, [_nghost-%COMP%]     .annotationLayer .choiceWidgetAnnotation select, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input{background-image:var(--annotation-unfocused-field-background);border:1px solid transparent;box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input:required, [_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation textarea:required, [_nghost-%COMP%]     .annotationLayer .choiceWidgetAnnotation select:required, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:required, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid red}[_nghost-%COMP%]     .annotationLayer .choiceWidgetAnnotation select option{padding:0}[_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation textarea{resize:none}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input[disabled], [_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation textarea[disabled], [_nghost-%COMP%]     .annotationLayer .choiceWidgetAnnotation select[disabled], [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{background:none;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input:hover, [_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation textarea:hover, [_nghost-%COMP%]     .annotationLayer .choiceWidgetAnnotation select:hover, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:hover, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:1px solid rgb(0,0,0)}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input:focus, [_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation textarea:focus, [_nghost-%COMP%]     .annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:1px solid transparent}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input :focus, [_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation textarea :focus, [_nghost-%COMP%]     .annotationLayer .choiceWidgetAnnotation select :focus, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox :focus, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton :focus{background-image:none;background-color:transparent;outline:auto}[_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}[_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}[_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}[_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}[_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}[_nghost-%COMP%]     .annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}[_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%]     .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;appearance:none}[_nghost-%COMP%]     .annotationLayer .popupTriggerArea{height:100%;width:100%}[_nghost-%COMP%]     .annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}[_nghost-%COMP%]     .annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}[_nghost-%COMP%]     .annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}
353[_nghost-%COMP%]     .annotationLayer .popup h1{display:inline-block}[_nghost-%COMP%]     .annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}[_nghost-%COMP%]     .annotationLayer .popupContent{border-top:1px solid rgb(51,51,51);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}[_nghost-%COMP%]     .annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}[_nghost-%COMP%]     .annotationLayer .highlightAnnotation, [_nghost-%COMP%]     .annotationLayer .underlineAnnotation, [_nghost-%COMP%]     .annotationLayer .squigglyAnnotation, [_nghost-%COMP%]     .annotationLayer .strikeoutAnnotation, [_nghost-%COMP%]     .annotationLayer .freeTextAnnotation, [_nghost-%COMP%]     .annotationLayer .lineAnnotation svg line, [_nghost-%COMP%]     .annotationLayer .squareAnnotation svg rect, [_nghost-%COMP%]     .annotationLayer .circleAnnotation svg ellipse, [_nghost-%COMP%]     .annotationLayer .polylineAnnotation svg polyline, [_nghost-%COMP%]     .annotationLayer .polygonAnnotation svg polygon, [_nghost-%COMP%]     .annotationLayer .caretAnnotation, [_nghost-%COMP%]     .annotationLayer .inkAnnotation svg polyline, [_nghost-%COMP%]     .annotationLayer .stampAnnotation, [_nghost-%COMP%]     .annotationLayer .fileAttachmentAnnotation{cursor:pointer}[_nghost-%COMP%]     .annotationLayer section svg{position:absolute;width:100%;height:100%}[_nghost-%COMP%]     .annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;user-select:none;pointer-events:none}[_nghost-%COMP%]     .annotationLayer .annotationTextContent span{width:100%;display:inline-block}@media (forced-colors: active){[_nghost-%COMP%]     .xfaLayer *:required{outline:1.5px solid selectedItem}}[_nghost-%COMP%]     .xfaLayer .highlight{margin:-1px;padding:1px;background-color:#efcbed;border-radius:4px}[_nghost-%COMP%]     .xfaLayer .highlight.appended{position:initial}[_nghost-%COMP%]     .xfaLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%]     .xfaLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%]     .xfaLayer .highlight.middle{border-radius:0}[_nghost-%COMP%]     .xfaLayer .highlight.selected{background-color:#cbdfcb}[_nghost-%COMP%]     .xfaLayer ::selection{background:rgb(0,0,255)}[_nghost-%COMP%]     .xfaPage{overflow:hidden;position:relative}[_nghost-%COMP%]     .xfaContentarea{position:absolute}[_nghost-%COMP%]     .xfaPrintOnly{display:none}[_nghost-%COMP%]     .xfaLayer{position:absolute;text-align:initial;top:0;left:0;transform-origin:0 0;line-height:1.2}[_nghost-%COMP%]     .xfaLayer *{color:inherit;font:inherit;font-style:inherit;font-weight:inherit;font-kerning:inherit;letter-spacing:-.01px;text-align:inherit;text-decoration:inherit;box-sizing:border-box;background-color:transparent;padding:0;margin:0;pointer-events:auto;line-height:inherit}[_nghost-%COMP%]     .xfaLayer *:required{outline:1.5px solid red}[_nghost-%COMP%]     .xfaLayer div{pointer-events:none}[_nghost-%COMP%]     .xfaLayer svg{pointer-events:none}[_nghost-%COMP%]     .xfaLayer svg *{pointer-events:none}[_nghost-%COMP%]     .xfaLayer a{color:#00f}[_nghost-%COMP%]     .xfaRich li{margin-left:3em}[_nghost-%COMP%]     .xfaFont{color:#000;font-weight:400;font-kerning:none;font-size:10px;font-style:normal;letter-spacing:0;text-decoration:none;vertical-align:0}[_nghost-%COMP%]     .xfaCaption{overflow:hidden;flex:0 0 auto}[_nghost-%COMP%]     .xfaCaptionForCheckButton{overflow:hidden;flex:1 1 auto}[_nghost-%COMP%]     .xfaLabel{height:100%;width:100%}[_nghost-%COMP%]     .xfaLeft{display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%]     .xfaRight{display:flex;flex-direction:row-reverse;align-items:center}[_nghost-%COMP%]     .xfaLeft>.xfaCaption, [_nghost-%COMP%]     .xfaLeft>.xfaCaptionForCheckButton, [_nghost-%COMP%]     .xfaRight>.xfaCaption, [_nghost-%COMP%]     .xfaRight>.xfaCaptionForCheckButton{max-height:100%}[_nghost-%COMP%]     .xfaTop{display:flex;flex-direction:column;align-items:flex-start}[_nghost-%COMP%]     .xfaBottom{display:flex;flex-direction:column-reverse;align-items:flex-start}[_nghost-%COMP%]     .xfaTop>.xfaCaption, [_nghost-%COMP%]     .xfaTop>.xfaCaptionForCheckButton, [_nghost-%COMP%]     .xfaBottom>.xfaCaption, [_nghost-%COMP%]     .xfaBottom>.xfaCaptionForCheckButton{width:100%}[_nghost-%COMP%]     .xfaBorder{background-color:transparent;position:absolute;pointer-events:none}[_nghost-%COMP%]     .xfaWrapped{width:100%;height:100%}[_nghost-%COMP%]     .xfaTextfield:focus, [_nghost-%COMP%]     .xfaSelect:focus{background-image:none;background-color:transparent;outline:auto;outline-offset:-1px}[_nghost-%COMP%]     .xfaCheckbox:focus, [_nghost-%COMP%]     .xfaRadio:focus{outline:auto}[_nghost-%COMP%]     .xfaTextfield, [_nghost-%COMP%]     .xfaSelect{height:100%;width:100%;flex:1 1 auto;border:none;resize:none;background-image:var(--xfa-unfocused-field-background)}[_nghost-%COMP%]     .xfaTop>.xfaTextfield, [_nghost-%COMP%]     .xfaTop>.xfaSelect, [_nghost-%COMP%]     .xfaBottom>.xfaTextfield, [_nghost-%COMP%]     .xfaBottom>.xfaSelect{flex:0 1 auto}
353[_nghost-%COMP%]     .xfaButton{cursor:pointer;width:100%;height:100%;border:none;text-align:center}[_nghost-%COMP%]     .xfaLink{width:100%;height:100%;position:absolute;top:0;left:0}[_nghost-%COMP%]     .xfaCheckbox, [_nghost-%COMP%]     .xfaRadio{width:100%;height:100%;flex:0 0 auto;border:none}[_nghost-%COMP%]     .xfaRich{white-space:pre-wrap;width:100%;height:100%}[_nghost-%COMP%]     .xfaImage{object-position:left top;object-fit:contain;width:100%;height:100%}[_nghost-%COMP%]     .xfaLrTb, [_nghost-%COMP%]     .xfaRlTb, [_nghost-%COMP%]     .xfaTb{display:flex;flex-direction:column;align-items:stretch}[_nghost-%COMP%]     .xfaLr{display:flex;flex-direction:row;align-items:stretch}[_nghost-%COMP%]     .xfaRl{display:flex;flex-direction:row-reverse;align-items:stretch}[_nghost-%COMP%]     .xfaTb>div{justify-content:left}[_nghost-%COMP%]     .xfaPosition{position:relative}[_nghost-%COMP%]     .xfaArea{position:relative}[_nghost-%COMP%]     .xfaValignMiddle{display:flex;align-items:center}[_nghost-%COMP%]     .xfaTable{display:flex;flex-direction:column;align-items:stretch}[_nghost-%COMP%]     .xfaTable .xfaRow{display:flex;flex-direction:row;align-items:stretch}[_nghost-%COMP%]     .xfaTable .xfaRlRow{display:flex;flex-direction:row-reverse;align-items:stretch;flex:1}[_nghost-%COMP%]     .xfaTable .xfaRlRow>div{flex:1}[_nghost-%COMP%]     .xfaNonInteractive input, [_nghost-%COMP%]     .xfaNonInteractive textarea, [_nghost-%COMP%]     .xfaDisabled input, [_nghost-%COMP%]     .xfaDisabled textarea, [_nghost-%COMP%]     .xfaReadOnly input, [_nghost-%COMP%]     .xfaReadOnly textarea{background:initial}@media print{[_nghost-%COMP%]     .xfaTextfield, [_nghost-%COMP%]     .xfaSelect{background:transparent}[_nghost-%COMP%]     .xfaSelect{-webkit-appearance:none;appearance:none;text-indent:1px;text-overflow:""}}[_nghost-%COMP%]     [data-editor-rotation="90"]{transform:rotate(90deg)}[_nghost-%COMP%]     [data-editor-rotation="180"]{transform:rotate(180deg)}[_nghost-%COMP%]     [data-editor-rotation="270"]{transform:rotate(270deg)}[_nghost-%COMP%]     .annotationEditorLayer{background:transparent;position:absolute;top:0;left:0;font-size:calc(100px * var(--scale-factor));transform-origin:0 0}[_nghost-%COMP%]     .annotationEditorLayer .selectedEditor{outline:var(--focus-outline);resize:none}[_nghost-%COMP%]     .annotationEditorLayer .freeTextEditor{position:absolute;background:transparent;border-radius:3px;padding:calc(var(--freetext-padding) * var(--scale-factor));resize:none;width:auto;height:auto;z-index:1;transform-origin:0 0;touch-action:none}[_nghost-%COMP%]     .annotationEditorLayer .freeTextEditor .internal{background:transparent;border:none;top:0;left:0;overflow:visible;white-space:nowrap;resize:none;font:10px sans-serif;line-height:var(--freetext-line-height)}[_nghost-%COMP%]     .annotationEditorLayer .freeTextEditor .overlay{position:absolute;display:none;background:transparent;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%]     .annotationEditorLayer .freeTextEditor .overlay.enabled{display:block}[_nghost-%COMP%]     .annotationEditorLayer .freeTextEditor .internal:empty:before{content:attr(default-content);color:gray}[_nghost-%COMP%]     .annotationEditorLayer .freeTextEditor .internal:focus{outline:none}[_nghost-%COMP%]     .annotationEditorLayer .inkEditor.disabled{resize:none}[_nghost-%COMP%]     .annotationEditorLayer .inkEditor.disabled.selectedEditor{resize:horizontal}[_nghost-%COMP%]     .annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor), [_nghost-%COMP%]     .annotationEditorLayer .inkEditor:hover:not(.selectedEditor){outline:var(--hover-outline)}[_nghost-%COMP%]     .annotationEditorLayer .inkEditor{position:absolute;background:transparent;border-radius:3px;overflow:auto;width:100%;height:100%;z-index:1;transform-origin:0 0;
353cursor:auto}[_nghost-%COMP%]     .annotationEditorLayer .inkEditor.editing{resize:none;cursor:var(--editorInk-editing-cursor),pointer}[_nghost-%COMP%]     .annotationEditorLayer .inkEditor .inkEditorCanvas{position:absolute;top:0;left:0;width:100%;height:100%;touch-action:none}[_nghost-%COMP%]     [data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[_nghost-%COMP%]     [data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[_nghost-%COMP%]     [data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}[_nghost-%COMP%]     .pdfViewer{padding-bottom:var(--pdfViewer-padding-bottom)}[_nghost-%COMP%]     .pdfViewer .canvasWrapper{overflow:hidden}[_nghost-%COMP%]     .pdfViewer .canvasWrapper canvas{width:100%}[_nghost-%COMP%]     .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:var(--page-margin);position:relative;overflow:visible;border:var(--page-border);border-image:var(--page-border-image);background-clip:content-box;background-color:#fff}[_nghost-%COMP%]     .pdfViewer .dummyPage{position:relative;width:0;height:var(--viewer-container-height)}[_nghost-%COMP%]     .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}[_nghost-%COMP%]     .pdfViewer.singlePageView{display:inline-block}[_nghost-%COMP%]     .pdfViewer.singlePageView .page{margin:0;border:none}[_nghost-%COMP%]     .pdfViewer.scrollHorizontal, [_nghost-%COMP%]     .pdfViewer.scrollWrapped, [_nghost-%COMP%]     .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%]     .pdfViewer.scrollHorizontal, [_nghost-%COMP%]     .spread{white-space:nowrap}[_nghost-%COMP%]     .pdfViewer.removePageBorders, [_nghost-%COMP%]     .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%]     .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}[_nghost-%COMP%]     .spread .page, [_nghost-%COMP%]     .spread .dummyPage, [_nghost-%COMP%]     .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%]     .pdfViewer.scrollWrapped .page, [_nghost-%COMP%]     .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%]     .pdfViewer.scrollWrapped .spread{display:inline-block;vertical-align:middle}[_nghost-%COMP%]     .spread .page, [_nghost-%COMP%]     .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%]     .pdfViewer.scrollWrapped .page{margin-left:var(--spreadHorizontalWrapped-margin-LR);margin-right:var(--spreadHorizontalWrapped-margin-LR)}[_nghost-%COMP%]     .pdfViewer.removePageBorders .spread .page, [_nghost-%COMP%]     .pdfViewer.removePageBorders.scrollHorizontal .page, [_nghost-%COMP%]     .pdfViewer.removePageBorders.scrollWrapped .page{margin-left:5px;margin-right:5px}[_nghost-%COMP%]     .pdfViewer .page canvas{margin:0;display:block}[_nghost-%COMP%]     .pdfViewer .page canvas[hidden]{display:none}[_nghost-%COMP%]     .pdfViewer .page .loadingIcon{position:absolute;display:block;inset:0;background:url(data:image/gif;base64,R0lGODlhGAAYAPQQAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/ilPcHRpbWl6ZWQgd2l0aCBodHRwczovL2V6Z2lmLmNvbS9vcHRpbWl6ZQAh+QQJBwAQACwAAAAAGAAYAAAFmiAkjiTkOGVaBgjZNGSgkgKjjM8zLoI8iy+BKCdiCX8iBeMAhEEIPRXLxViYUE9CbCQoFAzFhHY3zkaT3oPvBz1zE4UBsr1eWZH4vAowOBwGAHk8AoQLfH6Agm0Ed3qOAXWOIgQKiWyFJQgDgJEpdG+WEACNEFNFmKVlVzJQk6qdkwqBoi1mebJ3ALNGeIZHtGSwNDS1RZKueCEAIfkECQcAEAAsAAAAABgAGAAABZcgJI4kpChlWgYCWRQkEKgjURgjw4zOg9CjVwuiEyEeO6CxkBC9nA+HiuUqLEyoBZI0Mx4SAFFgQCDZuguBoGv6Dtg0gvpqdhxQQDkBzuUr/4A1JwMKP39pc2mDhYCIc4GQYn6QCwCMeY91l0p6dBAEJ0OfcFRimZ91Mwt0alxxAIZyRmuAsKxDLKKvZbM1tJxmvGKRpn8hACH5BAkHABAALAAAAAAYABgAAAWhICSOJGQYZVoGAnkcJBKoI3EAY1GMCtPSosSBINKJBIwGkHdwBGGQA0OhYpEGQxNqkYzNIITBACEKKBaxxNfBeOCO4vMy0Hg8nDHFeCktkKtfNAtoS4UqAicKBj9zBAKPC4iKi4aRkISGmWWBmjUIAIyHkCUEAKCVo2WmREecVqoCgZhgP4NHrGWCj7e3szSpuxAsoVWxnp6cVV4kyZW+KSEAIfkECQcAEAAsAAAAABgAGAAABZkgJI4kBABlWgYEOQykEKgjMSDjcYxG0dKi108nEhQKQN4rCIMkCgbawjWYnSCLY2yGVSgEooBhWqsGGwxc0RtNBgoMhmJ1QgETjANYFeBKyUmBKQQIdT9JDmgPDQ6EhoKJD4sOgpWWgiwChyqEBH5hmptSoSOZgJ4kLKWkYTF7C2SaqaM/hEWygay4mYG8t6uffFuzl1iANCEAIfkECQcAEAAsAAAAABgAGAAABZ0gJI4khCBlmhKkop
353BCoI6LIozDMAIHO4uuBVBnOiR+I4FrCDwAZsKdQnaCLIwwmRUA8JmioprWUCjcwlwUMnAoG0qL03k2KCS8cC0UjOzDCQKBfHQFDAwFU4CCfgqFhy9+kZJWgzSKSAcPZn+BfQENDw8OljGWJAFeDoZPYTBnC1GdSXqnsoBolSulX2GyP6hgvnG0KrS3NJNhuSQhACH5BAkHABAALAAAAAAYABgAAAWaICSOJCQIZZoupGGQRKCOC0CMijIiwz2LABtQZxoMfjQhxAXszWQ7gOwECRhh0MCJJRJARTUoIHFAgbfI6uBwAJS01J/i4PClVYHvfV8lbLlIBmwFbQt+aGmChG18jXeGT4dICQxlb4g/AQUMDER9XjR6BAdiDQwINDBmkAsPDVh4cX4imw53iLKuaVqAcUsPqEiidkt6j4AzIQAh+QQJBwAQACwAAAAAGAAYAAAFmSAkjiREEGWaBiSCtCoZCMsIAKOg1LEo0KKbaKFQ9EYLoOkFuQlirNxzCQkUW9GZ0hQd4nyDAWr4G/esYSbyZFYZwu3jqiuvr8u8I2BwOAwASXh1e31/doeHC3klWnElfAlTd46MfQUGk2stCVEGBQWSdCciDg5VDAVYKoEiDQ0iBwxGcj9RDw8+qHIzebc2DJJQJK6qiKVyIQAh+QQJBwAQACwAAAAAGAAYAAAFmSAkjiS0LGWaBiRBtCoZCKgoCCMB1DF0sz6cCQDo5W62l28XAyZFpyECBv3lnCbhUqHMIo0Qg4Jbmn1jRCa4iV27TzfXGjEecOFWMN1OdvvfPGUuXSoKBw6EXokrAwcHRVU0UAeEBANAAAmUI1gNDyhjJgUHLW0iDg8FIqOnBQZrDA9TELE2rEYIDw4jta2LMpCrqld/YQpgIQAh+QQJBwAQACwAAAAAGAAYAAAFmyAkjiS0LGWaBiRBkKw6BgIqCsJcyyMe4yJajhcEml5H26o1PN2QQd3uFiv2AADlAgflIbDdZLgkABOJgep5LfWty4p4zeU+w+XsvJWXliEKDwdEBgMKYQ4PDw1qK3EDCCMAiQ5BCV0LCj+FSDQkgCgGBiYHAy2MIgoMghAHqw4HAGsNDEMFBTekdgwKI7aRB2MwkL2rVHoQoWchACH5BAkHABAALAAAAAAYABgAAAWWICSOJLQsZZoGJEGQrDoGAioKwlzLIx7jIlqOFwSaXkfbqjU83ZBB3e4WK0qrCxyU55peid0qcUwuixyNx6PhILsAcAJazXYj4lvz2MkLiFsHDAlEcABKZwwMBX8pBgoKQxAIigpBA1sLBj+PSDQkB4uSACYDlTMyBgWDEKVnl2QFBUigN61gBQYjtLV5JZ4jtlR6omMhACH5BAkHABAALAAAAAAYABgAAAWaICSOJLQsZZoGJEGQrDoGAioKwlzLIx7jIlqOFwSaXkdbidYanm7I4AjwYDh6saJuJ3JUG1mZi9srPA7EcRimJLrfJYWZUVC8TziXnEG3u/E+cIJaPAFrPQl1aQAIbRAGBZGHJQiMUQKRBkEKbQsAPZaEXQcslSYKmjMyAAdXj34ACkNEiUgDA5t+PAQHn6Ogjkuzry2DNwhuIQAh+QQFBwAQACwAAAAAGAAYAAAFnCAkjiS0LGVaBgBJEGSguo8zCsK4CPIsMg+ECCcKEH0ix6MwhJl4KiOp8UCdmrEbo6EoHpxF8A6aBBZ6vhf5dmAkkGr0CoWs21WGQ2FvsI9xC3l7B311fy93iWGKJQQOhHCAJQB6A3IqcWwJLU90i2FkUiMKlhBELEI6MwgDXRAGhQgAYD6tTqRFAJxpA6mvrqazSKJJhUWMpjlIIQA7) center no-repeat}[_nghost-%COMP%]     .pdfViewer .page .loadingIcon.notVisible{background:none}[_nghost-%COMP%]     .pdfViewer.enablePermissions .textLayer span{-webkit-user-select:none!important;user-select:none!important;cursor:not-allowed}[_nghost-%COMP%]     .pdfPresentationMode .pdfViewer{padding-bottom:0}[_nghost-%COMP%]     .pdfPresentationMode .spread{margin:0}[_nghost-%COMP%]     .pdfPresentationMode .pdfViewer .page{margin:0 auto;border:2px solid transparent}`]}));let r=t;return r})(),iB=(()=>{let t=class t{};k(t,"\u0275fac",function(n){return new(n||t)}),k(t,"\u0275mod",Gt({type:t})),k(t,"\u0275inj",Ut({}));let r=t;return r})();var p1=["*"];function f1(r,t){if(r&1){let e=jt();D(0,"div",2),ut("click",function(){yt(e);let n=j();return vt(n.toggleZoom())}),R()}if(r&2){let e=j();we("pz-zoom-button-out",e.isZoomedIn)}}var km={transitionDuration:200,doubleTap:!0,doubleTapScale:2,limitZoom:"original image size",autoZoomOut:!1,zoomControlScale:1,minPanScale:1.0001,minScale:0,listeners:"mouse and touch",wheel:!0,wheelZoomFactor:.2,draggableImage:!1,draggableOnPinch:!1},SE={"transition-duration":"transitionDuration",transitionDurationBackwardCompatibility:"transitionDuration","double-tap":"doubleTap",doubleTapBackwardCompatibility:"doubleTap","double-tap-scale":"doubleTapScale",doubleTapScaleBackwardCompatibility:"doubleTapScale","auto-zoom-out":"autoZoomOut",autoZoomOutBackwardCompatibility:"autoZoomOut","limit-zoom":"limitZoom",limitZoomBackwardCompatibility:"limitZoom"},I0=class{get touchListeners(){return this.properties.touchListeners?this.properties.touchListeners:this._touchListeners}get mouseListeners(){return this.properties.mouseListeners?this.properties.mouseListeners:this._mouseListeners}get otherListeners(){return this.properties.otherListeners?this.properties.otherListeners:this._otherListeners}constructor(t){this.eventType=void 0,this.handlers={},this.startX=0,this.startY=0,this.lastTap=0,this.doubleTapMinTimeout=300,this.tapMinTimeout=200,this.touchstartTime=0,this.i=0,this.isMousedown=!1,this._touchListeners={touchstart:"handleTouchstart",touchmove:"handleTouchmove",touchend:"handleTouchend"},this._mouseListeners={mousedown:"handleMousedown",mousemove:"handleMousemove",mouseup:"handleMouseup",wheel:"handleWheel"},this._otherListeners={resize:"handleResize"},this.handleTouchstart=e=>{this.elementPosition=this.getElementPosition(),this.touchstartTime=new Date().getTime(),this.eventType===void 0&&this.getTouchstartPosition(e),this.runHandler("touchstart",e)},this.handleTouchmove=e=>{let i=e.touches;this.detectPan(i)&&this.runHandler("pan",e),this.detectPinch(e)&&this.runHandler("pinch",e)},this.handleTouchend=e=>{let i=e.touches;this.detectDoubleTap()&&this.runHandler("double-tap",e),this.detectTap(),this.runHandler("touchend",e),this.eventType="touchend",i&&i.length===0&&(this.eventType=void 0,this.i=0)},this.handleMousedown=e=>{this.isMousedown=!0,this.elementPosition=this.getElementPosition(),this.touchstartTime=new Date().getTime(),this.eventType===void 0&&this.getMousedownPosition(e),this.runHandler("mousedown",e)},this.handleMousemove=e=>{if(this.isMousedown){switch(this.runHandler("pan",e),this.detectLinearSwipe(e)){case"horizontal-swipe":e.swipeType="horizontal-swipe",this.runHandler("horizontal-swipe",e);break;
353case"vertical-swipe":e.swipeType="vertical-swipe",this.runHandler("vertical-swipe",e);break}(this.detectLinearSwipe(e)||this.eventType==="horizontal-swipe"||this.eventType==="vertical-swipe")&&this.handleLinearSwipe(e)}},this.handleMouseup=e=>{this.detectTap(),this.isMousedown=!1,this.runHandler("mouseup",e),this.eventType=void 0,this.i=0},this.handleWheel=e=>{this.runHandler("wheel",e)},this.handleResize=e=>{this.runHandler("resize",e)},this.properties=t,this.element=this.properties.element,this.elementPosition=this.getElementPosition(),this.toggleEventListeners("addEventListener")}destroy(){this.toggleEventListeners("removeEventListener")}toggleEventListeners(t){let e;this.properties.listeners==="mouse and touch"?e=Object.assign(this.touchListeners,this.mouseListeners):e=this.detectTouchScreen()?this.touchListeners:this.mouseListeners,this.properties.resize&&(e=Object.assign(e,this.otherListeners));for(let i in e){let n=e[i];i==="resize"?(t==="addEventListener"&&window.addEventListener(i,this[n],!1),t==="removeEventListener"&&window.removeEventListener(i,this[n],!1)):i==="mouseup"||i==="mousemove"?(t==="addEventListener"&&document.addEventListener(i,this[n],!1),t==="removeEventListener"&&document.removeEventListener(i,this[n],!1)):(t==="addEventListener"&&this.element.addEventListener(i,this[n],!1),t==="removeEventListener"&&this.element.removeEventListener(i,this[n],!1))}}addEventListeners(t){let e=this._mouseListeners[t];window.addEventListener(t,this[e],!1)}removeEventListeners(t){let e=this._mouseListeners[t];window.removeEventListener(t,this[e],!1)}handleLinearSwipe(t){this.i++,this.i>3&&(this.eventType=this.getLinearSwipeType(t)),this.eventType==="horizontal-swipe"&&this.runHandler("horizontal-swipe",t),this.eventType==="vertical-swipe"&&this.runHandler("vertical-swipe",t)}runHandler(t,e){this.handlers[t]&&this.handlers[t](e)}detectPan(t){return t.length===1&&!this.eventType||this.eventType==="pan"}detectDoubleTap(){if(this.eventType!=null)return;let t=new Date().getTime(),e=t-this.lastTap;if(window.clearTimeout(this.doubleTapTimeout),e<this.doubleTapMinTimeout&&e>0)return!0;this.doubleTapTimeout=window.setTimeout(()=>{window.clearTimeout(this.doubleTapTimeout)},this.doubleTapMinTimeout),this.lastTap=t}detectTap(){if(this.eventType!=null)return;let e=new Date().getTime()-this.touchstartTime;e>0&&(e<this.tapMinTimeout?this.runHandler("tap",{}):this.runHandler("longtap",{}))}detectPinch(t){return t.touches.length===2&&this.eventType===void 0||this.eventType==="pinch"}detectLinearSwipe(t){let e=t.touches;if(e){if(e.length===1&&!this.eventType||this.eventType==="horizontal-swipe"||this.eventType==="vertical-swipe")return this.getLinearSwipeType(t)}else if(!this.eventType||this.eventType==="horizontal-swipe"||this.eventType==="vertical-swipe")return this.getLinearSwipeType(t)}getLinearSwipeType(t){if(this.eventType!=="horizontal-swipe"&&this.eventType!=="vertical-swipe"){let e=Math.abs(this.moveLeft(0,t)-this.startX);return Math.abs(this.moveTop(0,t)-this.startY)*3>e?"vertical-swipe":"horizontal-swipe"}else return this.eventType}getElementPosition(){return this.element.getBoundingClientRect()}getTouchstartPosition(t){this.startX=t.touches[0].clientX-this.elementPosition.left,this.startY=t.touches[0].clientY-this.elementPosition.top}getMousedownPosition(t){this.startX=t.clientX-this.elementPosition.left,this.startY=t.clientY-this.elementPosition.top}moveLeft(t,e){let i=e.touches;return i?i[t].clientX-this.elementPosition.left:e.clientX-this.elementPosition.left}moveTop(t,e){let i=e.touches;return i?i[t].clientY-this.elementPosition.top:e.clientY-this.elementPosition.top}detectTouchScreen(){let t=" -webkit- -moz- -o- -ms- ".split(" "),e=n=>window.matchMedia(n).matches;if("ontouchstart"in window)return!0;let i=["(",t.join("touch-enabled),("),"heartz",")"].join("");return e(i)}on(t,e){t&&(this.handlers[t]=e)}},k0=class{get minPanScale(){return this.getPropertiesValue("minPanScale")}get fullImage(){return this.properties.fullImage}constructor(t,e){this.properties=km,this.scale=1,this.initialScale=1,this.startX=0,this.startY=0,this.moveX=0,this.moveY=0,this.initialMoveX=0,this.initialMoveY=0,this.moveXC=0,this.moveYC=0,this.distance=0,this.initialDistance=0,this.defaultMaxScale=3,this.initialPinchCenterX=0,this.initialPinchCenterY=0,this.handleTouchstart=i=>{this.touches.addEventListeners("mousemove"),this.getElementPosition(),this.eventType===void 0&&this.getTouchstartPosition(i)},this.handleTouchend=i=>{if(i.type==="touchend"){let n=i.touches;this.scale<1&&(this.scale=1,this.zoomChanged.emit(this.scale)),this.properties.autoZoomOut&&this.eventType==="pinch"&&(this.scale=1,this.zoomChanged.emit(this.scale)),(this.eventType==="pinch"||this.eventType==="pan"&&this.scale>this.minPanScale)&&this.alignImage(),(this.eventType==="pinch"||this.eventType==="pan"||this.eventType==="horizontal-swipe"||this.eventType==="vertical-swi
353pe")&&this.updateInitialValues(),this.eventType="touchend",n&&n.length===0&&(this.eventType=void 0)}i.type==="mouseup"&&(this.updateInitialValues(),this.eventType=void 0),this.touches.removeEventListeners("mousemove")},this.handlePan=i=>{if(this.scale<this.minPanScale||this.properties.disablePan)return;i.preventDefault();let{clientX:n,clientY:s}=this.getClientPosition(i);this.eventType||(this.startX=n-this.elementPosition.left,this.startY=s-this.elementPosition.top),this.eventType="pan",this.moveX=this.initialMoveX+(this.moveLeft(i,0)-this.startX),this.moveY=this.initialMoveY+(this.moveTop(i,0)-this.startY),this.properties.limitPan&&(this.limitPanY(),this.limitPanX()),i.type==="mousemove"&&this.scale>this.minPanScale&&this.centeringImage(),this.transformElement(0)},this.handleDoubleTap=i=>{this.toggleZoom(i)},this.handlePinch=i=>{if(i.preventDefault(),!this.properties.draggableOnPinch){if(this.eventType===void 0||this.eventType==="pinch"){let C=i.touches;if(!this.eventType){this.initialDistance=this.getDistance(C);let x=this.moveLeft(i,0),I=this.moveLeft(i,1),A=this.moveTop(i,0),E=this.moveTop(i,1);this.moveXC=(x+I)/2-this.initialMoveX,this.moveYC=(A+E)/2-this.initialMoveY}this.eventType="pinch",this.distance=this.getDistance(C),this.scale=this.initialScale*(this.distance/this.initialDistance),this.zoomChanged.emit(this.scale),this.moveX=this.initialMoveX-(this.distance/this.initialDistance*this.moveXC-this.moveXC),this.moveY=this.initialMoveY-(this.distance/this.initialDistance*this.moveYC-this.moveYC),this.handleLimitZoom(),this.properties.limitPan&&(this.limitPanY(),this.limitPanX()),this.transformElement(0)}return}let n=i.touches;if(!this.eventType){this.eventType="pinch",this.initialDistance=this.getDistance(n);let C=this.moveLeft(i,0),x=this.moveLeft(i,1),I=this.moveTop(i,0),A=this.moveTop(i,1);this.initialPinchCenterX=(C+x)/2,this.initialPinchCenterY=(I+A)/2,this.moveXC=this.initialPinchCenterX-this.initialMoveX,this.moveYC=this.initialPinchCenterY-this.initialMoveY}this.eventType="pinch",this.distance=this.getDistance(n);let s=this.distance/this.initialDistance;this.scale=this.initialScale*s,this.zoomChanged.emit(this.scale);let o=this.moveLeft(i,0),l=this.moveLeft(i,1),c=this.moveTop(i,0),h=this.moveTop(i,1),d=(o+l)/2,u=(c+h)/2,p=d-this.initialPinchCenterX,g=u-this.initialPinchCenterY,_=(s-1)*this.moveXC,y=(s-1)*this.moveYC;this.moveX=this.initialMoveX+p-_,this.moveY=this.initialMoveY+g-y,this.handleLimitZoom(),this.properties.limitPan&&(this.limitPanY(),this.limitPanX()),this.transformElement(0)},this.handleWheel=i=>{i.preventDefault();let n=this.properties.wheelZoomFactor||0,s=i.deltaY<0?n:-n,o=this.initialScale+s;if(o<1+n?o=1:o<this.maxScale&&o>this.maxScale-n&&(o=this.maxScale),o<1||o>this.maxScale||o===this.scale)return;this.getElementPosition(),this.scale=o,this.zoomChanged.emit(this.scale);let l=i.clientX-this.elementPosition.left-this.initialMoveX,c=i.clientY-this.elementPosition.top-this.initialMoveY;this.setZoom({scale:o,center:[l,c]})},this.handleResize=i=>{this.setAutoHeight()},this.element=t.element,this.zoomChanged=e,this.element&&(typeof t.limitZoom=="number"&&(this.maxScale=t.limitZoom),this.elementTarget=this.element.querySelector("*").tagName,this.parentElement=this.element.parentElement,this.properties=Object.assign({},km,t),this.detectLimitZoom(),this.touches=new I0({element:t.element,listeners:t.listeners,resize:t.autoHeight,mouseListeners:{mousedown:"handleMousedown",mouseup:"handleMouseup",wheel:"handleWheel"}}),this.setBasicStyles(),this.touches.on("touchstart",this.handleTouchstart),this.touches.on("touchend",this.handleTouchend),this.touches.on("mousedown",this.handleTouchstart),this.touches.on("mouseup",this.handleTouchend),this.touches.on("pan",this.handlePan),this.touches.on("mousemove",this.handlePan),this.touches.on("pinch",this.handlePinch),this.properties.wheel&&this.touches.on("wheel",this.handleWheel),this.properties.doubleTap&&this.touches.on("double-tap",this.handleDoubleTap),this.properties.autoHeight&&this.touches.on("resize",this.handleResize))}handleLimitZoom(){let t=this.maxScale,e=this.properties.minScale||0;if(this.scale>t||this.scale<=e){let i=this.getImageWidth(),n=this.getImageHeight(),s=i*this.scale,o=n*this.scale,l=this.moveX/(s-i),c=this.moveY/(o-n);this.scale>t&&(this.scale=t,this.zoomChanged.emit(this.scale)),this.scale<=e&&(this.scale=e,this.zoomChanged.emit(this.scale));let h=i*this.scale,d=n*this.scale;this.moveX=-Math.abs(l*(h-i)),this.moveY=-Math.abs(-c*(d-n))}}moveLeft(t,e=0){return this.getClientPosition(t,e).clientX-this.elementPosition.left}moveTop(t,e=0){return this.getClientPosition(t,e).clientY-this.elementPosition.top}centeringImage(){let t=this.getImageElement(),e=this.moveX,i=this.moveY;return this.moveY>0&&(this.moveY=0),this.moveX>0&&(this.moveX=0),t&&(this.limitPanY(),this.limitPanX()),t&&this.scale<1&&this.moveX<this.element.offsetWidth*(1-this.scale)&&(this.moveX=this.element.offsetWidth*(1-this.scale)),e!==this.moveX||i!==this.moveY}limitPanY(){let t=this.getImageHeight(),e=t*this.scale,i=this.parentElement.offsetHeight,n=this.element.offsetHeight;if(e<i)this.moveY=(i-n*this.scale)/2;else{let s=(t-n)*this.scale/2;this.moveY>s?this.moveY=s:e+Math.abs(s)-i+this.moveY<0&&(this.moveY=-(e+Math.abs(s)-i))}}limitPanX(){let t=this.getImageWidth(),e=t*this.scale,i=this.parentElement.offsetWidth,n=this.element.offsetWidth;if(e<i)this.moveX=(i-n*this.scale)/2;else{let s=(t-n)*this.scale/2;this.moveX>s?this.moveX=s:e+Math.abs(s)-i+this.moveX<0&&(this.moveX=-(t*this.scale+Math.abs(s)-i))}}setBasicStyles(){this.element.style.display="flex",this.element.style.alignItems="center",this.element.style.justifyContent="center",this.element.style.transformOrigin="0 0",this.setImageSize(),this.setDraggableImage()}removeBasicStyles(){this.element.style.display="",this.element.style.alignItems="",this.element.style.justifyContent="",this.element.style.transformOrigin="",this.removeImageSize(),this.removeDraggableImage()}setDraggableImage(){let t=this.getImageElement();t&&(t.draggable=this.properties.draggableImage)}removeDraggableImage(){let t=this.getImageElement();t&&(t.draggable=!0)}setImageSize(){let t=this.getImageElements();t.length&&(t[0].style.maxWidth="100%",t[0].style.maxHeight="100%",this.setAutoHeight())}setAutoHeight(){let t=this.getImageElements();if(!this.properties.autoHeight||!t.length)return;let e=t[0].getAttribute("width"),i=t[0].getAttribute("height"),n=+e/+i,s=this.parentElement.offsetWidth;t[0].style.maxHeight=s/n+"px"}removeImageSize(){let t=this.getImageElements();t.length&&(t[0].style.maxWidth="",t[0].style.maxHeight="")}getElementPosition(){this.elementPosition=this.element.parentElement.getBoundingClientRect()}getTouchstartPosition(t){let{clientX:e,clientY:i}=this.getClientPosition(t);this.startX=e-this.elementPosition.left,this.startY=i-this.elementPosition.top}getClientPosition(t,e=0){let i,n;return(t.type==="touchstart"||t.type==="touchmove")&&(i=t.touches[e].clientX,n=t.touches[e].clientY),(t.type==="mousedown"||t.type==="mousemove")&&(i=t.clientX,n=t.clientY),{clientX:i,clientY:n}}resetScale(){this.scale=1,this.zoomChanged.emit(this.scale),this.moveX=0,this.moveY=0,this.updateInitialValues(),this.transformElement(this.properties.transitionDuration)}updateInitialValues(){this.initialScale=this.scale,this.initialMoveX=this.moveX,this.initialMoveY=this.moveY}getDistance(t){return Math.sqrt(Math.pow(t[0].pageX-t[1].pageX,2)+Math.pow(t[0].pageY-t[1].pageY,2))}getImageHeight(){return this.getImageElement().offsetHeight}getImageWidth(){return this.getImageElement().offsetWidth}transformElement(t){this.element.style.transition="all "+t+"ms",this.element.style.transform="matrix("+Number(this.scale)+", 0, 0, "+Number(this.scale)+", "+Number(this.moveX)+", "+Number(this.moveY)+")"}isTouchScreen(){let t=" -webkit- -moz- -o- -ms- ".split(" ");if("ontouchstart"in window)return!0;let e=["(",t.join("touch-enabled),("),"heartz",")"].join("");return this.getMatchMedia(e)}getMatchMedia(t){return window.matchMedia(t).matches}isDragging(){if(this.properties.disablePan)return!1;let t=this.getImageHeight(),e=this.getImageWidth();if(this.scale>1)return t*this.scale>this.parentElement.offsetHeight||e*this.scale>this.parentElement.offsetWidth;if(this.scale===1)return t>this.parentElement.offsetHeight||e>this.parentElement.offsetWidth}detectLimitZoom(){var t;(t=this.maxScale)!=null||(this.maxScale=this.defaultMaxScale),this.properties.limitZoom==="original image size"&&this.elementTarget==="IMG"&&this.pollLimitZoomForOriginalImage()}pollLimitZoomForOriginalImage(){let t=setInterval(()=>{let e=this.getMaxScaleForOriginalImage();typeof e=="number"&&(this.maxScale=e,clearInterval(t))},10)}getMaxScaleForOriginalImage(){let t,e=this.element.getElementsByTagName("img")[0];
353return e.naturalWidth&&e.offsetWidth&&(t=e.naturalWidth/e.offsetWidth),t}getImageElement(){let t=this.element.getElementsByTagName(this.elementTarget);if(t.length)return t[0]}getImageElements(){return this.element.getElementsByTagName(this.elementTarget)}toggleZoom(t=!1){if(this.initialScale===1){if(t&&t.changedTouches){if(this.properties.doubleTapScale===void 0)return;let e=t.changedTouches;this.scale=this.initialScale*this.properties.doubleTapScale,this.zoomChanged.emit(this.scale),this.moveX=this.initialMoveX-(e[0].clientX-this.elementPosition.left)*(this.properties.doubleTapScale-1),this.moveY=this.initialMoveY-(e[0].clientY-this.elementPosition.top)*(this.properties.doubleTapScale-1)}else{let e=this.properties.zoomControlScale||0;this.scale=this.initialScale*(e+1),this.zoomChanged.emit(this.scale),this.moveX=this.initialMoveX-this.element.offsetWidth*(this.scale-1)/2,this.moveY=this.initialMoveY-this.element.offsetHeight*(this.scale-1)/2}this.centeringImage(),this.updateInitialValues(),this.transformElement(this.properties.transitionDuration)}else this.resetScale()}zoomIn(t){let e=this.scale+t;return e>=this.maxScale?(this.scale=this.maxScale,this.zoomChanged.emit(this.scale),this.scale):(this.setZoom({scale:e}),this.scale)}zoomOut(t){let e=this.scale-t;return e<=this.properties.minScale?(this.scale=this.properties.minScale,this.zoomChanged.emit(this.scale),this.scale):(this.setZoom({scale:e}),this.scale)}setZoom(t){this.scale=t.scale,this.zoomChanged.emit(this.scale);let e,i,n=this.element.offsetWidth,s=this.element.offsetHeight,o=n*this.scale/(n*this.initialScale);t.center?(e=t.center[0],i=t.center[1]):(e=n/2-this.initialMoveX,i=s/2-this.initialMoveY),this.moveX=this.initialMoveX-(o*e-e),this.moveY=this.initialMoveY-(o*i-i),this.centeringImage(),this.updateInitialValues(),this.transformElement(this.properties.transitionDuration)}alignImage(){this.centeringImage()&&(this.updateInitialValues(),this.transformElement(this.properties.transitionDuration))}destroy(){this.removeBasicStyles(),this.touches.destroy()}getPropertiesValue(t){return this.properties&&this.properties[t]?this.properties[t]:km[t]}},m1={overflow:"hidden",disableZoomControl:"auto",backgroundColor:"rgba(0,0,0,0.85)"},PE=(()=>{let t=class t{set properties(i){i&&(this._properties=i)}get properties(){return this._properties}
353set transitionDurationBackwardCompatibility(i){i&&(this._transitionDuration=i)}set transitionDuration(i){i&&(this._transitionDuration=i)}get transitionDuration(){return this._transitionDuration}set doubleTapBackwardCompatibility(i){i&&(this._doubleTap=i)}set doubleTap(i){i&&(this._doubleTap=i)}get doubleTap(){return this._doubleTap}set doubleTapScaleBackwardCompatibility(i){i&&(this._doubleTapScale=i)}set doubleTapScale(i){i&&(this._doubleTapScale=i)}get doubleTapScale(){return this._doubleTapScale}set autoZoomOutBackwardCompatibility(i){i&&(this._autoZoomOut=i)}set autoZoomOut(i){i&&(this._autoZoomOut=i)}get autoZoomOut(){return this._autoZoomOut}set limitZoomBackwardCompatibility(i){i&&(this._limitZoom=i)}set limitZoom(i){i&&(this._limitZoom=i)}get limitZoom(){return this._limitZoom}get hostOverflow(){return this.properties.overflow}get hostBackgroundColor(){return this.properties.backgroundColor}get isTouchScreen(){let i=" -webkit- -moz- -o- -ms- ".split(" "),n=o=>window.matchMedia(o).matches;if("ontouchstart"in window)return!0;let s=["(",i.join("touch-enabled),("),"heartz",")"].join("");return n(s)}get isDragging(){var i;return(i=this.pinchZoom)==null?void 0:i.isDragging()}get isDisabled(){return this._properties.disabled}get scale(){return this.pinchZoom.scale}get isZoomedIn(){return this.scale>1}get scaleLevel(){return Math.round(this.scale/this._zoomControlScale)}get maxScale(){return this.pinchZoom.maxScale}get isZoomLimitReached(){return this.scale>=this.maxScale}get _zoomControlScale(){return this.getPropertiesValue("zoomControlScale")}constructor(i){this.elementRef=i,this.zoomChanged=new Vt,this.defaultComponentProperties=this.getDefaultComponentProperties(),this.applyPropertiesDefault(this.defaultComponentProperties,{})}ngOnInit(){this.initPinchZoom(),this.detectLimitZoom()}ngOnChanges(i){let n=this.getProperties(i);n=this.renameProperties(n),this.applyPropertiesDefault(this.defaultComponentProperties,n)}ngOnDestroy(){this.destroy()}initPinchZoom(){this._properties.disabled||(this._properties.limitZoom=this.limitZoom,this._properties.element=this.elementRef.nativeElement.querySelector(".pinch-zoom-content"),this.pinchZoom=new k0(this.properties,this.zoomChanged))}getProperties(i){let n={};for(let s in i)s!=="properties"&&(n[s]=i[s].currentValue),s==="properties"&&(n=i[s].currentValue);return n}renameProperties(i){for(let n in i)SE[n]&&(i[SE[n]]=i[n],delete i[n]);return i}applyPropertiesDefault(i,n){this.properties=Object.assign({},i,n)}toggleZoom(){var i;(i=this.pinchZoom)==null||i.toggleZoom()}zoomIn(i){var n;return(n=this.pinchZoom)==null?void 0:n.zoomIn(i)}zoomOut(i){var n;return(n=this.pinchZoom)==null?void 0:n.zoomOut(i)}isControl(){return!(this.isDisabled||this._properties.disableZoomControl==="disable"||this.isTouchScreen&&this._properties.disableZoomControl==="auto")}detectLimitZoom(){var i;(i=this.pinchZoom)==null||i.detectLimitZoom()}destroy(){var i;(i=this.pinchZoom)==null||i.destroy()}getPropertiesValue(i){return this.properties&&this.properties[i]?this.properties[i]:this.defaultComponentProperties[i]}getDefaultComponentProperties(){return ft(ft({},km),m1)}};t.\u0275fac=function(n){return new(n||t)(ct(ne))},t.\u0275cmp=kt({type:t,selectors:[["pinch-zoom"],["","pinch-zoom",""]],hostVars:4,hostBindings:function(n,s){n&2&&oe("overflow",s.hostOverflow)("background-color",s.hostBackgroundColor)},inputs:{properties:"properties",transitionDurationBackwardCompatibility:[0,"transition-duration","transitionDurationBackwardCompatibility"],transitionDuration:"transitionDuration",doubleTapBackwardCompatibility:[0,"double-tap","doubleTapBackwardCompatibility"],doubleTap:"doubleTap",doubleTapScaleBackwardCompatibility:[0,"double-tap-scale","doubleTapScaleBackwardCompatibility"],doubleTapScale:"doubleTapScale",autoZoomOutBackwardCompatibility:[0,"auto-zoom-out","autoZoomOutBackwardCompatibility"],autoZoomOut:"autoZoomOut",limitZoomBackwardCompatibility:[0,"limit-zoom","limitZoomBackwardCompatibility"],limitZoom:"limitZoom",disabled:"disabled",disablePan:"disablePan",overflow:"overflow",zoomControlScale:"zoomControlScale",disableZoomControl:"disableZoomControl",backgroundColor:"backgroundColor",limitPan:"limitPan",minPanScale:"minPanScale",minScale:"minScale",listeners:"listeners",wheel:"wheel",autoHeight:"autoHeight",wheelZoomFactor:"wheelZoomFactor",draggableImage:"draggableImage",draggableOnPinch:"draggableOnPinch"},outputs:{zoomChanged:"zoomChanged"},exportAs:["pinchZoom"],features:[En],ngContentSelectors:p1,decls:3,vars:3,consts:[[1,"pinch-zoom-content"],[1,"pz-zoom-button","pz-zoom-control-position-bottom",3,"pz-zoom-button-out"],[1,"pz-zoom-button","pz-zoom-control-position-bottom",3,"click"]],template:function(n,s){n&1&&(bi(),D(0,"div",0),ae(1),R(),q(2,f1,1,2,"div",1)),n&2&&(we("pz-dragging",s.isDragging),P(2),de(s.isControl()?2:-1))},dependencies:[Fu],styles:["[_nghost-%COMP%]{position:relative;overflow:hidden;display:block}.pinch-zoom-content[_ngcontent-%COMP%]{height:inherit}.pz-dragging[_ngcontent-%COMP%]{cursor:all-scroll}.pz-zoom-button[_ngcontent-%COMP%]{position:absolute;z-index:1000;color:#fff;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgc3R5bGU9IiI+PHJlY3QgaWQ9ImJhY2tncm91bmRyZWN0IiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4PSIwIiB5PSIwIiBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiLz48ZyBjbGFzcz0iY3VycmVudExheWVyIiBzdHlsZT0iIj48dGl0bGU+TGF5ZXIgMTwvdGl0bGU+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6IiBpZD0ic3ZnXzEiIGNsYXNzPSIiIGZpbGw9IiNmZmZmZmYiIGZpbGwtb3BhY2l0eT0iMSIvPjxwYXRoIGQ9Ik0xMiAxMGgtMnYySDl2LTJIN1Y5aDJWN2gxdjJoMnYxeiIgaWQ9InN2Z18zIiBjbGFzcz0iIiBmaWxsPSIjZmZmZmZmIiBmaWxsLW9wYWNpdHk9IjEiLz48L2c+PC9zdmc+),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PHJlY3QgaWQ9ImJhY2tncm91bmRyZWN0IiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4PSIwIiB5PSIwIiBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiLz48ZyBjbGFzcz0iY3VycmVudExheWVyIiBzdHlsZT0iIj48dGl0bGU+TGF5ZXIgMTwvdGl0bGU+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiIGlkPSJzdmdfMiIgY2xhc3M9IiIgZmlsbD0iI2ZmZmZmZiIgZmlsbC1vcGFjaXR5PSIxIi8+PC9nPjwvc3ZnPg==);background-color:#000c;background-position:center,-1000px;background-repeat:no-repeat,no-repeat;background-size:40px;width:56px;height:56px;border-radius:4px;opacity:.5;cursor:pointer;transition:opacity .1s;-webkit-user-select:none;user-select:none}.pz-zoom-button-out[_ngcontent-%COMP%]{background-position:-1000px,center}.pz-zoom-button[_ngcontent-%COMP%]:hover{opacity:.7}.pz-zoom-button.pz-zoom-control-position-right[_ngcontent-%COMP%]{right:16px;top:50%;margin-top:-28px}.pz-zoom-button.pz-zoom-control-position-right-bottom[_ngcontent-%COMP%]{right:16px;bottom:32px}.pz-zoom-button.pz-zoom-control-position-bottom[_ngcontent-%COMP%]{bottom:16px;left:50%;margin-left:-28px}.pz-zoom-control[_ngcontent-%COMP%]{position:absolute;background-color:#000c;border-radius:4px;overflow:hidden}.pz-zoom-control.pz-zoom-control-position-right[_ngcontent-%COMP%]{right:16px;top:50%;margin-top:-48px}.pz-zoom-control.pz-zoom-control-position-right-bottom[_ngcontent-%COMP%]{right:16px;bottom:32px}.pz-zoom-control.pz-zoom-control-position-bottom[_ngcontent-%COMP%]{bottom:16px;left:50%;margin-left:-48px}.pz-zoom-in[_ngcontent-%COMP%], .pz-zoom-out[_ngcontent-%COMP%]{width:48px;height:48px;background-position:center;background-repeat:no-repeat;opacity:1;cursor:pointer}.pz-zoom-in[_ngcontent-%COMP%]:hover, .pz-zoom-out[_ngcontent-%COMP%]:hover{background-color:#fff3}.pz-zoom-control-position-bottom[_ngcontent-%COMP%]   .pz-zoom-in[_ngcontent-%COMP%], .pz-zoom-control-position-bottom[_ngcontent-%COMP%]   .pz-zoom-out[_ngcontent-%COMP%]{float:right}.pz-disabled[_ngcontent-%COMP%]{opacity:.5;cursor:default}.pz-disabled[_ngcontent-%COMP%]:hover{background-color:#fff0}.pz-zoom-in[_ngcontent-%COMP%]{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgc3R5bGU9IiI+PHJlY3QgaWQ9ImJhY2tncm91bmRyZWN0IiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4PSIwIiB5PSIwIiBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiLz48ZyBjbGFzcz0iY3VycmVudExheWVyIiBzdHlsZT0iIj48dGl0bGU+TGF5ZXIgMTwvdGl0bGU+PHBhdGggZD0iTTE5IDEzaC02djZoLTJ2LTZINXYtMmg2VjVoMnY2aDZ2MnoiIGlkPSJzdmdfMSIgY2x
353hc3M9IiIgc3Ryb2tlPSJub25lIiBmaWxsPSIjZmZmZmZmIiBmaWxsLW9wYWNpdHk9IjEiLz48cGF0aCBkPSJNLTE1LjgzNjczNDQyMDQ2MTY1Myw0NC41MzU0MDkzMDY3MTAxOCBoNTguMjA0MDgwODI3NTkzMDkgdi02LjU3NjIyNjcyMzM2OTIyMTUgSC0xNS44MzY3MzQ0MjA0NjE2NTMgeiIgZmlsbD0ibm9uZSIgaWQ9InN2Z18yIiBjbGFzcz0iIiBzdHJva2U9Im5vbmUiLz48L2c+PC9zdmc+)}.pz-zoom-out[_ngcontent-%COMP%]{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PHJlY3QgaWQ9ImJhY2tncm91bmRyZWN0IiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4PSIwIiB5PSIwIiBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiLz48ZyBjbGFzcz0iY3VycmVudExheWVyIiBzdHlsZT0iIj48dGl0bGU+TGF5ZXIgMTwvdGl0bGU+PHBhdGggZD0iTTE5IDEzSDV2LTJoMTR2MnoiIGlkPSJzdmdfMSIgY2xhc3M9IiIgZmlsbD0iI2ZmZmZmZiIgZmlsbC1vcGFjaXR5PSIxIi8+PC9nPjwvc3ZnPg==)}"]});let r=t;return r})();function _1(r){r.CapacitorUtils.Synapse=new Proxy({},{get(t,e){return new Proxy({},{get(i,n){return(s,o,l)=>{let c=r.Capacitor.Plugins[e];if(c===void 0){l(new Error(`Capacitor plugin ${e} not found`));return}if(typeof c[n]!="function"){l(new Error(`Method ${n} not found in Capacitor plugin ${e}`));return}O(null,null,function*(){try{let h=yield c[n](s);o(h)}catch(h){l(h)}})}}})}})}function b1(r){r.CapacitorUtils.Synapse=new Proxy({},{get(t,e){return r.cordova.plugins[e]}})}function TE(r=!1){typeof window>"u"||(window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0&&!r?_1(window):window.cordova!==void 0&&b1(window))}var vu=Wa("Filesystem",{web:()=>import("./chunk-ZITDIX2F.js").then(r=>new r.FilesystemWeb)});TE();var wc=Wa("Share",{web:()=>import("./chunk-Q77GUMHC.js").then(r=>new r.ShareWeb)});var IE=r=>({"padding-left":r});function y1(r,t){if(r&1&&(D(0,"ion-title",14),G(1),Z(2,"translate"),R()),r&2){let e=j(3);qt(e.pageCtrl.styleUtil.getTextLight()),P(),Et(" ",nt(2,3,e.title)," ")}}function v1(r,t){if(r&1&&(D(0,"ion-title",15),G(1),Z(2,"translate"),R()),r&2){let e=j(3);qt(e.pageCtrl.styleUtil.getTextLight()),V("ngClass",e.docopt?"":"custom-tablet-title"),P(),Et(" ",nt(2,4,e.title)," ")}}function x1(r,t){if(r&1){let e=jt();D(0,"ion-icon",16),ut("click",function(){yt(e);let n=j(3);return vt(n.zoomIn())}),R()}}function w1(r,t){if(r&1){let e=jt();D(0,"ion-icon",17),ut("click",function(){yt(e);let n=j(3);return vt(n.zoomOut())}),R()}}function A1(r,t){if(r&1){let e=jt();D(0,"ion-toolbar",5)(1,"ion-row")(2,"ion-col",6),q(3,y1,3,5,"ion-title",7)(4,v1,3,6,"ion-title",8),R(),D(5,"ion-col",9),q(6,x1,1,0,"ion-icon",10)(7,w1,1,0,"ion-icon",11),D(8,"ion-icon",12),ut("click",function(){yt(e);let n=j(2);return vt(n.download())}),R(),D(9,"ion-icon",13),ut("click",function(){yt(e);let n=j(2);return vt(n.closePage())}),R()()()()}if(r&2){let e=j(2);qt(e.pageCtrl.styleUtil.getMenuPrimary()),P(2),V("size",e.docopt?"11":"9"),P(),V("ngIf",!e.pageCtrl.platform.is("tablet")),P(),V("ngIf",e.pageCtrl.platform.is("tablet")),P(),V("size",e.docopt?"1":"3"),P(),V("ngIf",!e.docopt),P(),V("ngIf",!e.docopt)}}function C1(r,t){if(r&1){let e=jt();D(0,"ion-icon",16),ut("click",function(){yt(e);let n=j(3);return vt(n.zoomIn())}),R()}}function E1(r,t){if(r&1){let e=jt();D(0,"ion-icon",17),ut("click",function(){yt(e);let n=j(3);return vt(n.zoomOut())}),R()}}function S1(r,t){if(r&1){let e=jt();D(0,"ion-icon",25),ut("click",function(){yt(e);let n=j(3);return vt(n.share())}),R()}}function P1(r,t){if(r&1){let e=jt();D(0,"ion-icon",12),ut("click",function(){yt(e);let n=j(3);return vt(n.download())}),R()}}function T1(r,t){if(r&1){let e=jt();D(0,"ion-toolbar",18)(1,"ion-row")(2,"ion-col",19)(3,"ion-icon",20),ut("click",function(){yt(e);let n=j(2);return vt(n.closePage())}),R(),D(4,"ion-title",21),G(5),Z(6,"translate"),R()(),D(7,"ion-col",22),q(8,C1,1,0,"ion-icon",10)(9,E1,1,0,"ion-icon",11)(10,S1,1,0,"ion-icon",23)(11,P1,1,0,"ion-icon",24),R()()()}if(r&2){let e=j(2);qt(e.pageCtrl.styleUtil.getMenuPrimary()),P(4),qt(e.pageCtrl.styleUtil.getTextLight()),P(),Ct(nt(6,9,e.title)),P(3),V("ngIf",!e.docopt),P(),V("ngIf",!e.docopt),P(),V("ngIf",e.pageCtrl.platform.isApp()),P(),V("ngIf",!e.pageCtrl.platform.isApp())}}function I1(r,t){if(r&1&&(D(0,"ion-header"),q(1,A1,10,8,"ion-toolbar",3)(2,T1,12,11,"ion-toolbar",4),R()),r&2){let e=j();
353P(),V("ngIf",!e.pageCtrl.platform.is("mobile")),P(),V("ngIf",e.pageCtrl.platform.is("mobile"))}}function k1(r,t){if(r&1&&(D(0,"div")(1,"div",27),G(2),Z(3,"translate"),R(),Q(4,"br")(5,"img",28),R()),r&2){let e=j(2);P(2),Et(" ",nt(3,2,"Front Check")," "),P(3),V("src",e.frontCheckData,Pn)}}function M1(r,t){if(r&1&&(D(0,"div"),Q(1,"br"),D(2,"div",27),G(3),Z(4,"translate"),R(),Q(5,"br")(6,"img",28),R()),r&2){let e=j(2);P(3),Et(" ",nt(4,2,"Back Check")," "),P(3),V("src",e.backCheckData,Pn)}}function D1(r,t){if(r&1&&(D(0,"div",26),q(1,k1,6,4,"div",0)(2,M1,7,4,"div",0),R()),r&2){let e=j();P(),V("ngIf",e.frontCheckData),P(),V("ngIf",e.backCheckData)}}function R1(r,t){if(r&1&&(D(0,"pinch-zoom",31),Q(1,"pdf-viewer",32),R()),r&2){let e=j(2);P(),V("src",e.pdfData)("original-size",!1)("render-text",!1)("show-all",!0)("zoom",e.zoom)("ngStyle",In(6,IE,e.myPadding))}}function L1(r,t){if(r&1&&Q(0,"pdf-viewer",33),r&2){let e=j(2);V("src",e.pdfData)("original-size",!1)("render-text",!1)("show-all",!0)("zoom",e.zoom)("zoom-scale",1)("ngStyle",In(7,IE,e.myPadding))}}function O1(r,t){if(r&1&&(D(0,"ion-content"),q(1,R1,2,8,"pinch-zoom",29)(2,L1,1,9,"pdf-viewer",30),R()),r&2){let e=j();oe("border",e.pageCtrl.platform.is("mobile")?"":"2px solid black"),P(),V("ngIf",e.pageCtrl.platform.is("mobile")),P(),V("ngIf",!e.pageCtrl.platform.is("mobile"))}}var kE=(()=>{let t=class t{constructor(i,n,s,o,l,c){this.api=i,this.pageCtrl=n,this.modalCtrl=s,this.loadingCtrl=o,this.events=l,this.util=c,this.disabledHeader=!1,this.myScroll="scroll",this.myPadding="",this.loadingCount=0}ngOnInit(){if(this.title||(this.title="Document Viewer"),this.zoom||(this.zoom=1.1),console.log("docviwer documentKey=",this.documentKey+" docopt="+this.docopt+" chequeId="+this.chequeId+" doctype="+this.doctype),this.doctype=="IMG")this.getCustomerEPSCheckImage();else if(this.docopt){if(this.zoom=.93,this.pageCtrl.platform.is("mobile")&&(this.zoom=1.3),this.docopt=="C"||this.docopt=="A"||this.docopt=="V"||this.docopt=="P"||this.docopt=="CA"||this.docopt=="OL"){var i=screen.width;i>1300&&(this.zoom=1,this.myPadding="")}this.myScroll="myscroll"}console.log("setting zoom level for desktop zoom="+this.zoom+" screenWidth="+i+" docOpt="+this.docopt+" docKey=",this.documentKey+" pdfData=",this.pdfData)}getCustomerEPSCheckImage(){return O(this,null,function*(){var i,n;try{let s=yield this.loadingCtrl.create();yield s.present();let o=yield this.api.post("/ols/s/external/getCustomerEPSCheckImage",{checkImageId:this.chequeId});if(yield s.dismiss(),o&&o.outcome=="SUCCESS"){let l=encodeURI((i=o.epsCheckImages)==null?void 0:i.frontChequeImgContent),c=encodeURI((n=o.epsCheckImages)==null?void 0:n.frontChequeImgContent);this.frontCheckData=`data:image/png;base64,${l}`,this.backCheckData=`data:image/png;base64,${c}`}else this.util.confirm({title:o==null?void 0:o.outcome,message:o==null?void 0:o.pageMessage,cssClass:this.util.getPrimaryClass(),button:["OK"]})}catch(s){console.log("Error=",s)}})}getDocumentByte(i){return O(this,null,function*(){try{let n=yield this.loadingCtrl.create();yield n.present();let s=yield this.api.post("/ols/s/document/getDocumentBytes",{documentKey:i});if(yield n.dismiss(),s&&s.outcome=="SUCCESS"){this.base64String=encodeURI(s.documentBytes);let o=`data:application/pdf;base64,${this.base64String}`;this.pdfSrc=this.convertDataURIToBinary(o)}else this.util.confirm({title:s==null?void 0:s.outcome,message:s==null?void 0:s.pageMessage,cssClass:this.util.getPrimaryClass(),button:["OK"]})}catch(n){console.log("Error=",n)}})}getDocument(i){return O(this,null,function*(){try{let n=yield this.loadingCtrl.create();yield n.present();let s=yield this.api.post("/ols/s/document/getDocument",{documentKey:i});yield n.dismiss(),s&&s.outcome=="SUCCESS"?this.url=s.documentContentURL:this.util.confirm({message:s.pageMessage,button:["OK"]})}catch(n){console.log("Error=",n)}})}zoomIn(){this.zoom=this.zoom+this.zoom*.15,console.log("zoom in zoom="+this.zoom)}zoomOut(){this.zoom=this.zoom-this.zoom*.15,console.log("zoom out zoom="+this.zoom)}closePage(){console.log("trying to close"),this.modalCtrl.dismiss()}share(){return O(this,null,function*(){yield this.getDocumentByte(this.documentKey);let n=yield vu.writeFile({path:"document.pdf",data:this.base64String,directory:Tc.Cache,recursive:!0});yield wc.share({title:"Document",url:n.uri})})}shareOld(){return O(this,null,function*(){yield this.getDocumentByte(this.documentKey),wc.share({title:"Document",files:[`data:application/pdf;df:document.pdf;base64,${this.base64String}`]})})}download(){return O(this,null,function*(){if(this.doctype=="IMG"){alert("Download TBD");return}yield this.getDocumentByte(this.documentKey);var i=`data:application/pdf;base64,${this.base64String}`;let n=new Blob([this.convertDataURIToBinary(i)],{type:"application/pdf"}),s="document";this.docopt=="S"?s="Statement":this.docopt=="C"?s="Agreement":this.docopt=="A"?s="Autopay":this.docopt=="V"?s="Vantage":this.docopt=="P"?s="Paperless":this.docopt=="N"?s="Notice":this.docopt=="CA"?s="
353Cashadvance":this.docopt=="OL"&&(s="Overlimit"),s=this.pageCtrl.platform.translate(s);var o=URL.createObjectURL(n),l=document.createElement("a");l.href=o,l.download=s,l.target="_blank",document.body.appendChild(l),l.click()})}convertDataURIToBinary(i){var n=";base64,",s=i.indexOf(n)+n.length,o=i.substring(s),l=window.atob(o),c=l.length,h=new Uint8Array(new ArrayBuffer(c));for(let d=0;d<c;d++)h[d]=l.charCodeAt(d);return h}dismissLoader(){return O(this,null,function*(){if(this.pageCtrl.platform.is("android"))return;var i=window.navigator.userAgent;let n=/firefox/i.test(i);(this.pageCtrl.platform.isIEBrowser()||n||this.loadingCount>0)&&this.loader.dismiss(),this.loadingCount++})}isIE11Browser(){var i=window.navigator.userAgent;return/msie\s|trident\//i.test(i)}};t.\u0275fac=function(n){return new(n||t)(ct(Xi),ct(We),ct(Ue),ct(Zs),ct(Yi),ct(Dn))},t.\u0275cmp=kt({type:t,selectors:[["app-docviewer"]],inputs:{title:"title",disabledHeader:"disabledHeader",documentKey:"documentKey",docopt:"docopt",doctype:"doctype",pdfData:"pdfData",chequeId:"chequeId",zoom:"zoom"},standalone:!1,decls:3,vars:3,consts:[[4,"ngIf"],["class","desktop-content-wrapper","style","margin:2%",4,"ngIf"],[3,"border",4,"ngIf"],["style","text-align:center;",3,"class",4,"ngIf"],["mode","ios","style","min-height: 64px; height: fit-content;",3,"class",4,"ngIf"],[2,"text-align","center"],[3,"size"],["class","global-font-17",3,"class",4,"ngIf"],["class","global-font-17",3,"class","ngClass",4,"ngIf"],[2,"text-align","right",3,"size"],["name","add-circle-outline","class","title-icon",3,"click",4,"ngIf"],["name","remove-circle-outline","class","title-icon",3,"click",4,"ngIf"],["name","cloud-download-outline",1,"title-icon",3,"click"],["name","close",1,"title-icon",3,"click"],[1,"global-font-17"],[1,"global-font-17",3,"ngClass"],["name","add-circle-outline",1,"title-icon",3,"click"],["name","remove-circle-outline",1,"title-icon",3,"click"],["mode","ios",2,"min-height","64px","height","fit-content"],["size","9"],["name","arrow-back",1,"title-icon",3,"click"],[1,"global-font-17","custom-tablet-title"],["size","3",2,"text-align","right"],["name","share-outline","class","title-icon",3,"click",4,"ngIf"],["name","cloud-download-outline","class","title-icon",3,"click",4,"ngIf"],["name","share-outline",1,"title-icon",3,"click"],[1,"desktop-content-wrapper",2,"margin","2%"],[1,"font-family-regular","global-font-12",2,"text-align","center"],[2,"border","5px solid black",3,"src"],["style","display: contents; height: 100vh;",4,"ngIf"],["style","display: block; width: 100%; height: 90%;",3,"src","original-size","render-text","show-all","zoom","zoom-scale","ngStyle",4,"ngIf"],[2,"display","contents","height","100vh"],[2,"display","block","width","100vw","height","90vh",3,"src","original-size","render-text","show-all","zoom","ngStyle"],[2,"display","block","width","100%","height","90%",3,"src","original-size","render-text","show-all","zoom","zoom-scale","ngStyle"]],template:function(n,s){n&1&&q(0,I1,3,2,"ion-header",0)(1,D1,3,2,"div",1)(2,O1,3,4,"ion-content",2),n&2&&(V("ngIf",!s.disabledHeader),P(),V("ngIf",s.doctype=="IMG"),P(),V("ngIf",s.doctype!="IMG"))},dependencies:[Fa,Mn,cv,Va,Xs,Ks,$i,ja,Ha,qs,EE,PE,Qs],styles:["div[scrollx=true][_ngcontent-%COMP%], div[scrolly=true][_ngcontent-%COMP%]{position:relative;overflow:hidden}div[scrollx=true][_ngcontent-%COMP%]{overflow-x:auto}.custom-tablet-title[_ngcontent-%COMP%]{padding:0 30px;text-align:left}.title-icon[_ngcontent-%COMP%]{cursor:pointer;font-size:16px;color:#fff;padding:0 4px}"]});let r=t;return r})();var N1=["*"],ME=(()=>{let t=class t{constructor(i,n,s){this.modalCtrl=i,this.pageCtrl=n,this.util=s,this.enableCheckBox=new Vt,this.pageCtrl.events.unsubscribe("programdocument:getDocumentByte"),this.pageCtrl.events.subscribe("programdocument:getDocumentByte",()=>{console.log("programdocument getting document byte"),this.getDocumentByte(new Event("click"))})}openDocumentViewer(i,n){return O(this,null,function*(){var o,l,c,h;let s="A";this.mytitle&&this.mytitle.indexOf("Vantage")>=0?s="V":((o=this.mytitle)==null?void 0:o.indexOf("Cash Advance"))>=0||((l=this.mytitle)==null?void 0:l.indexOf("del adelanto en efectivo"))>=0?s="CA":(((c=this.mytitle)==null?void 0:c.toUpperCase().indexOf("OVERLIMIT COVERAGE"))>=0||((h=this.mytitle)==null?void 0:h.toUpperCase().indexOf("OPCIONAL DE COBERTURA POR EXCESO DE L\xCDMITE"))>=0)&&(s="OL"),(this.pageCtrl.platform.is("mobile")||this.pageCtrl.platform.is("tablet"))&&(s=null),this.program&&this.program.documentKey&&(i.preventDefault(),yield(yield this.modalCtrl.create({component:kE,backdropDismiss:!1,cssClass:"mymodal-pdfviewer",componentProps:{documentKey:this.program.documentKey,title:this.mytitle,docopt:s,pdfData:n}})).present())})}getDocumentByte(i){return O(this,null,function*(){var n,s;if(this.mytitle!==""){let o=yield this.pageCtrl.util.getDocumentByte(this.program.documentKey,null,this.autoPayRequiredIndicator);(((n=this.mytitle)==null?void 0:n.toUpperCase().indexOf("OVERLIMIT COVERAGE"))>=0||((s=this.mytitle)==null?void 0:s.toUpperCase().indexOf("OPCIONAL DE COBERTURA POR EXCESO DE L\xCDMITE"))>=0)&&this.pageCtrl.events.publish("lightboxmodal:setOverlimitViewed"),o&&(this.openDocumentViewer(i,o),this.enableCheckBox.emit(!0))}else this.enableCheckBox.emit(!1)})}};t.\u0275fac=function(n){return new(n||t)(ct(Ue),ct(We),ct(Dn))},t.\u0275cmp=kt({type:t,selectors:[["app-program-document"]],inputs:{program:"program",href:"href",mytitle:"mytitle",autoPayRequiredIndicator:"autoPayRequiredIndicator"},outputs:{enableCheckBox:"enableCheckBox"},standalone:!1,ngContentSelectors:N1,decls:2,vars:2,consts:[[1,"program-document",3,"click"]],template:function(n,s){n&1&&(bi(),D(0,"a",0),ut("click",function(l){return s.getDocumentByte(l)}),ae(1),R()),n&2&&qt(s.util.getTextClass())},styles:[".program-document[_ngcontent-%COMP%]{text-decoration:underline;color:var(--ion-link-color);cursor:pointer}"]});let r=t;return r})();var B1=["*"],z1=r=>({"u-padding-top-0":r}),M0=r=>({brandname:r});function V1(r,t){if(r&1&&(D(0,"span"),G(1),Z(2,"translate"),R()),r&2){let e=j(2);P(),Ct(nt(2,1,e.title))}}function j1(r,t){if(r&1&&(D(0,"span"),G(1),Z(2,"translate"),R()),r&2){let e=j(2);P(),Ct(nt(2,1,e.cancelbutton))}}function H1(r,t){if(r&1){let e=jt();D(0,"ion-header")(1,"ion-toolbar",32)(2,"ion-title",33),q(3,V1,3,3,"span",0)(4,j1,3,3,"span",0),R(),D(5,"ion-buttons",34)(6,"ion-button",35),ut("click",function(){yt(e);let n=j();return vt(n.closePage())}),Q(7,"ion-icon",36),R()()()()}if(r&2){let e=j();
353P(),qt(e.pageCtrl.styleUtil.getMenuPrimary()),P(2),V("ngIf",!e.isModifyAuto),P(),V("ngIf",e.isModifyAuto)}}function U1(r,t){if(r&1&&(D(0,"span",41),G(1),R()),r&2){let e=j(2);P(),Et(" ",e.pageCtrl.util.formatCardName(e.account==null||e.account.account==null?null:e.account.account.cardName,e.account==null||e.account.account==null?null:e.account.account.last4AccountNumber)," ")}}function W1(r,t){if(r&1&&(D(0,"span",41),G(1),Z(2,"translate"),R()),r&2){let e=j(2);P(),Gi(" ",nt(2,2,"account_selector.ending")," ",e.account==null||e.account.account==null?null:e.account.account.last4AccountNumber," ")}}function G1(r,t){if(r&1){let e=jt();D(0,"ion-header")(1,"ion-toolbar")(2,"ion-button",37),ut("click",function(){yt(e);let n=j();return vt(n.closePage())}),Q(3,"ion-icon",38),R(),D(4,"ion-title",39),G(5),Z(6,"translate"),Q(7,"br"),q(8,U1,2,1,"span",40)(9,W1,3,4,"span",40),R()()()}if(r&2){let e=j();P(),qt(e.pageCtrl.styleUtil.getMenuPrimary()),P(),qt(e.pageCtrl.styleUtil.getMenuPrimary()),P(3),Et("",nt(6,7,e.title)," "),P(3),V("ngIf",e.account==null||e.account.account==null?null:e.account.account.cardName),P(),V("ngIf",!(!(e.account==null||e.account.account==null)&&e.account.account.cardName))}}function $1(r,t){if(r&1&&(D(0,"span",45),G(1),Z(2,"translate"),Z(3,"date"),R()),r&2){let e=j(2);oe("color",e.pageCtrl.util.getButtonColor()),P(),Gi("",nt(2,4,"payment.minimum_payment_due_by")," ",e.util.convertSpanishDate(kn(3,6,e.dueDate,"MMM d"),e.profile.config.getLanguage()),"")}}function Y1(r,t){if(r&1&&(D(0,"span",45),G(1),Z(2,"translate"),Z(3,"date"),R()),r&2){let e=j(2);oe("color",e.pageCtrl.util.getButtonColor()),P(),Gi("",nt(2,4,"balance.label.payment_due")," ",e.util.convertSpanishDate(kn(3,6,e.dueDate,"MMM d"),e.profile.config.getLanguage()),"")}}function X1(r,t){if(r&1&&(D(0,"span",45),G(1),Z(2,"translate"),R()),r&2){let e=j(2);oe("color",e.pageCtrl.util.getButtonColor()),P(),Ct(nt(2,3,"balance.label.no_payment_due"))}}function K1(r,t){if(r&1&&(D(0,"div",42)(1,"h3",43),G(2),Z(3,"currency"),R(),q(4,$1,4,9,"span",44)(5,Y1,4,9,"span",44)(6,X1,3,5,"span",44),R()),r&2){let e=j();P(),oe("color",e.pageCtrl.util.getButtonColor()),P(),Ct(Lu(3,6,e.minPaymentDue,"USD","symbol","1.2-2")),P(2),V("ngIf",e.dueDate&&e.pageCtrl.platform.getACCode()!="FXC"),P(),V("ngIf",e.dueDate&&e.pageCtrl.platform.getACCode()=="FXC"),P(),V("ngIf",!e.dueDate)}}function q1(r,t){if(r&1&&(D(0,"div",46),G(1),R()),r&2){let e=j();P(),Ct(e.errors.paymentMethod)}}function Z1(r,t){if(r&1&&(D(0,"span",47),G(1),Z(2,"translate"),R()),r&2){let e=j();oe("color",e.util.getTextColorStyle()),P(),Ct(nt(2,3,"payment.minimum_payment"))}}function Q1(r,t){if(r&1&&(D(0,"span",47),G(1),Z(2,"translate"),R()),r&2){let e=j();oe("color",e.util.getTextColorStyle()),P(),Ct(nt(2,3,"balance.label.payment_due"))}}function J1(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),R()),r&2&&(P(),Et(" ",nt(2,1,"payment.minimum_payment_description")," "))}function tM(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),R()),r&2&&(P(),Et(" ",nt(2,1,"Your Minimum Payment will be initiated from your paycheck beginning the day after your billing cycle.")," "))}function eM(r,t){if(r&1&&(D(0,"div",48),q(1,J1,3,3,"span",0)(2,tM,3,3,"span",0),R()),r&2){let e=j();oe("color",e.util.getTextColorStyle()),P(),V("ngIf",(e.paymentAccount==null?null:e.paymentAccount.bankAccountType)!="P"),P(),V("ngIf",(e.paymentAccount==null?null:e.paymentAccount.bankAccountType)=="P")}}function iM(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),R()),r&2&&(P(),Et(" ",nt(2,1,"payment.payment_due_description")," "))}function nM(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),R()),r&2&&(P(),Et(" ",nt(2,1,"payment.paycheck_payment_description")," "))}function sM(r,t){if(r&1&&(D(0,"div",48),q(1,iM,3,3,"span",0)(2,nM,3,3,"span",0),R()),r&2){let e=j();oe("color",e.util.getTextColorStyle()),P(),V("ngIf",(e.paymentAccount==null?null:e.paymentAccount.bankAccountType)!="P"),P(),V("ngIf",(e.paymentAccount==null?null:e.paymentAccount.bankAccountType)=="P")}}function oM(r,t){r&1&&(D(0,"div",53)(1,"div",54)(2,"ion-row")(3,"ion-col",55),G(4),Z(5,"translate"),R()()()()),r&2&&(P(4),Et(" ",nt(5,1,"autopromobundle.statementbalance.tooltip")," "))}function rM(r,t){if(r&1&&(D(0,"span"),Q(1,"ion-icon",51),D(2,"ion-popover",52),q(3,oM,6,3,"ng-template"),R()()),r&2){let e=j(2);
353qt(e.pageCtrl.platform.is("mobile")?"global-font-11":"global-font-14"),oe("color",e.util.getTextColorStyle())}}function aM(r,t){if(r&1){let e=jt();D(0,"div")(1,"ion-item",9)(2,"ion-radio",49),ut("click",function(){yt(e);let n=j();return vt(n.clearAccountNumber())}),D(3,"span",47),G(4),Z(5,"translate"),R(),q(6,rM,4,4,"span",50),R()(),D(7,"div",48),G(8),Z(9,"translate"),R()()}if(r&2){let e=j();P(),V("disabled",e.isModifyAuto),P(),qt(e.pageCtrl.styleUtil.getRadioColor()),P(),qt(e.pageCtrl.platform.is("mobile")?"global-font-12":"global-font-14"),oe("color",e.util.getTextColorStyle()),P(),Ct(nt(5,12,"Statement Balance")),P(2),V("ngIf",e.pageCtrl.util.isADOptimizationAllowed()),P(),oe("color",e.util.getTextColorStyle()),P(),Et(" ",nt(9,14,"Paying the Statement Balance listed on each billing statement prevents interest charges on your account.")," ")}}function lM(r,t){r&1&&Q(0,"div",56)}function cM(r,t){if(r&1&&(D(0,"mat-label"),G(1),Z(2,"translate"),R()),r&2){let e=j();P(),Ct(nt(2,1,e.getSelectText()))}}function dM(r,t){if(r&1&&(D(0,"span",59),G(1),R()),r&2){let e=j().$implicit,i=j();P(),Ct(i.bankName(e))}}function hM(r,t){if(r&1&&(D(0,"span",48),G(1),R()),r&2){let e=j().$implicit,i=j();oe("color",i.util.getTextColorStyle()),P(),Ct(i.bankName(e))}}function uM(r,t){if(r&1){let e=jt();D(0,"mat-option",57),ut("click",function(){let n=yt(e).$implicit,s=j();return vt(s.onItemSelected(n))}),q(1,dM,2,1,"span",58)(2,hM,2,3,"span",12),R()}if(r&2){let e=t.$implicit,i=j();V("value",e),P(),V("ngIf",i.paymentAccount&&i.paymentAccount.bankName===e.bankName&&i.theme==="violet"),P(),V("ngIf",!(i.paymentAccount&&i.paymentAccount.bankName===e.bankName&&i.theme==="violet"))}}function pM(r,t){if(r&1&&(D(0,"div",60),G(1),R()),r&2){let e=j();P(),Ct(e.errors.paymentAccount)}}function fM(r,t){if(r&1&&(D(0,"span"),G(1),R()),r&2){let e=j(4);P(),Et("(",e.newAcctBankName,")")}}function mM(r,t){if(r&1){let e=jt();D(0,"ion-item",67)(1,"ion-input",68),Na("ngModelChange",function(n){yt(e);let s=j(3);return Oa(s.newAcct.bankRoutingNumber,n)||(s.newAcct.bankRoutingNumber=n),vt(n)}),ut("ionFocus",function(){yt(e);let n=j(3);return vt(n.handleClick(2))})("click",function(){yt(e);let n=j(3);return vt(n.clearAccountNumber())})("ionBlur",function(){yt(e);let n=j(3);return vt(n.getBankInfo(n.newAcct.bankRoutingNumber))}),D(2,"div",69),G(3),Z(4,"translate"),q(5,fM,2,1,"span",0),R()()()}if(r&2){let e=j(3);V("disabled",e.isModifyAuto),P(),La("ngModel",e.newAcct.bankRoutingNumber),V("disabled",e.newAcct.bankAccountType==="D"?"true":"false"),P(2),Et("",nt(4,5,"Routing Number")," "),P(2),V("ngIf",e.newAcctBankName)}}function gM(r,t){if(r&1&&(D(0,"div",70),G(1),R()),r&2){let e=j(3);P(),Ct(e.bankingRoutingErrorMessage)}}function _M(r,t){if(r&1&&Q(0,"div",71),r&2){let e=j(3);V("validate",e.errors)}}function bM(r,t){if(r&1&&(D(0,"div",70),G(1),R()),r&2){let e=j(3);P(),Ct(e.errors.bankAccountNumber)}}function yM(r,t){if(r&1){let e=jt();D(0,"div"),q(1,mM,6,7,"ion-item",62)(2,gM,2,1,"div",63),D(3,"ion-item",64)(4,"ion-input",65),Z(5,"translate"),Na("ngModelChange",function(n){yt(e);let s=j(2);return Oa(s.newAcct.bankAccountNumber,n)||(s.newAcct.bankAccountNumber=n),vt(n)}),ut("ionFocus",function(){yt(e);let n=j(2);return vt(n.handleClick(3))}),R()(),q(6,_M,1,1,"div",66)(7,bM,2,1,"div",63),R()}if(r&2){let e=j(2);P(),V("ngIf",(e.paymentAccount==null?null:e.paymentAccount.bankAccountType)=="C"||e.newAcct.bankAccountType==="C"),P(),V("ngIf",e.bankingRoutingErrorMessage&&!e.isBankNameAvailable),P(),V("disabled",e.isModifyAuto),P(),Q0("label",nt(5,8,"Account Number")),La("ngModel",e.newAcct.bankAccountNumber),V("disabled",e.newAcct.bankAccountType==="D"?"true":"false"),P(2),V("ngIf",e.errors),P(),V("ngIf",e.errors&&e.errors.bankAccountNumber)}}function vM(r,t){if(r&1&&(D(0,"ion-list",61),q(1,yM,8,10,"div",0),R()),r&2){let e=j();P(),V("ngIf",!e.isModifyAuto&&(e.paymentAccount==null?null:e.paymentAccount.bankAccountType)=="C"||e.newAcct.bankAccountType!="P")}}function xM(r,t){if(r&1&&(D(0,"div")(1,"p"),G(2),Z(3,"translate"),R()()),r&2){let e=j();P(),qt(e.pageCtrl.platform.is("mobile")?"small-text":"small-text-autopromo"),P(),Et(" ",kn(3,3,"auto
353promobundle.debit.autopaymessage",In(6,M0,e.account==null?null:e.account.account.brandDescription))," ")}}function wM(r,t){if(r&1&&(D(0,"div")(1,"p",72),G(2),Z(3,"translate"),R()()),r&2){let e=j();P(2),Et(" ",kn(3,1,"setup_autopay.debit.epmmessage",In(4,M0,e.account==null?null:e.account.account.brandDescription))," ")}}function AM(r,t){if(r&1&&(D(0,"div",60),G(1),R()),r&2){let e=j(2);P(),Ct(e.errors.pbpagree)}}function CM(r,t){if(r&1){let e=jt();D(0,"ion-row",25)(1,"ion-col",26)(2,"ion-checkbox",73),Na("ngModelChange",function(n){yt(e);let s=j();return Oa(s.pbpagree,n)||(s.pbpagree=n),vt(n)}),ut("ionChange",function(n){yt(e);let s=j();return vt(s.checkCancelButton(n,"P"))}),D(3,"span",74),G(4),Z(5,"translate"),R()()(),q(6,AM,2,1,"div",20),R()}if(r&2){let e=j();P(2),qt(e.pageCtrl.styleUtil.getCBColor()),La("ngModel",e.pbpagree),V("disabled",e.isModifyAuto),P(2),Et(" ",kn(5,6,"setup_autopay.debit.pbpmessage",In(9,M0,e.account==null?null:e.account.account.brandDescription))," "),P(2),V("ngIf",e.errors&&e.errors.pbpagree)}}function EM(r,t){if(r&1&&(D(0,"span"),G(1),Z(2,"translate"),Z(3,"translate"),R()),r&2){let e=j();P(),ev(" ",nt(2,3,"Automatic payments will occur on the")," ",e.paymentDueDay," ",nt(3,5,"of each month, which is your regular Payment Due Date.")," ")}}function SM(r,t){r&1&&(D(0,"span"),G(1),Z(2,"translate"),R()),r&2&&(P(),Et(" ",nt(2,1,"setup.autopay.debit.pbpdatemessage")," "))}function PM(r,t){if(r&1&&(D(0,"div",60),G(1),R()),r&2){let e=j();P(),Ct(e.errors.agree)}}function TM(r,t){if(r&1){let e=jt();D(0,"ion-button",75),ut("click",function(){yt(e);let n=j();return vt(n.onSubmit())}),G(1),R()}if(r&2){let e=j();qt(e.util.getButtonClass()),V("disabled",(e.account==null?null:e.account.account.paycheckAutoDeductInd)!="Y"&&e.newAcct.bankAccountType==="D"),P(),Et("",e.buttonLabel," ")}}var DE=(()=>{let t=class t extends rw{constructor(i,n,s,o,l,c,h,d,u,p){super(i,n),this.api=i,this.pageCtrl=n,this.alertCtrl=s,this.modalCtrl=o,this.util=l,this.loadingCtrl=c,this.events=h,this.profile=d,this.lookup=u,this.analyticsService=p,this.hideHeader=!1,this.autoDeductMethods={minPaymentDue:"M",statementBalance:"P"},this.invertDeductMethods={M:"minPaymentDue",P:"statementBalance"},this.agree=!1,this.pbpagree=!1,this.toggleAP=new Vt,this.contentResize=new Vt,this.hasError=!1,this.autotermstitle="Auto Pay Terms of Use",this.selectautopay="Select Auto Pay Amount",this.cancelbutton="Cancel Auto Pay",this.isBankNameAvailable=!1,this.saveDebitAcct=!1,this.displayDebitCard=!1,this.lang=this.pageCtrl.platform.trans.getDefaultLang(),this.highlineSuccess=!1}ngOnInit(){var n,s,o,l,c,h,d,u,p,g,_,y,C,x,I,A,E,L,v,S,M,T,N,B;this.maxAutoDeductSetupAttempts=(n=this.lookup)==null?void 0:n.getAccCode("maxAutoDeductSetupAttempts"),console.log("setup autopay isAutoPay="+this.isAutoPay+" title="+this.title+" isModifyAuto=",this.isModifyAuto+" originalBankType="+this.originalBankType+" fromStatementBundle="+this.fromStatementBundle),this.pageCtrl.events.unsubscribe("modifyauto:init"),this.pageCtrl.events.subscribe("modifyauto:init",W=>{var $,X;console.log("modifyauto newAcct=",W),W.bankAccountType=="D"&&(this.debitAccountHolderName=((($=this.pageCtrl.profile.customer)==null?void 0:$.firstName)+" "+((X=this.pageCtrl.profile.customer)==null?void 0:X.lastName)).toUpperCase(),this.cardNumber=W.bankAccountNumber,this.expiryDate=W.expirationDate,this.zipCode=W.zipCode),W.bankAccountType=="P"&&(this.paymentAccount={bankName:this.pageCtrl.platform.translate("payment.epmcard.type"),bankAccountType:"P",isDebitCard:!0})}),this.isAutoPay?this.myHeight=this.pageCtrl.platform.is("mobile")?"550px":"750px":this.myHeight="",this.title||(this.title=this.pageCtrl.platform.translate("Setup Auto Pay"),this.buttonLabel=this.pageCtrl.platform.translate("Setup Auto Pay"),this.endPoint="/ols/s/accountautodeduct/addAutoDeduct"),this.paymentDueDay=(o=(s=this.account)==null?void 0:s.account)==null?void 0:o.paymentDueDay,this.originalAutoPay=this.autoPay,console.log("autopay locationCode="+this.locationCode),this.theme==null&&(this.theme="primary"),this.autoPayRequiredIndicator=(c=(l=this.account)==null?void 0:l.account)==null?void 0:c.autoPayRequiredIndicator,this.autoDeductProgram={autoPayRequiredIndicator:this.autoPayRequiredIndicator,documentKey:{documentKeyType:"PROGRAM",programDocumentKey:{caProgramId:5,brandId:(d=(h=this.account)==null?void 0:h.accountKey)==null?void 0:d.brandId,caSubProgramId:-1,progSolNumber:(p=(u=this.account)==null?void 0:u.accountKey)==null?void 0:p.progSolNumber,documentType:((_=(g=this.account)==null?void 0:g.account)==null?void 0:_.paycheckAutoDeductInd)=="Y"?269:13}}};try{this.minPaymentDue=(C=(y=this.account)==null?void 0:y.account)==null?void 0:C.osMinPaymentDue,this.statementBalance=(I=(x=this.account)==null?void 0:x.account)==null?void 0:I.statementBalance,this.dueDate=(E=(A=this.account)==null?void 0:A.account)!=null&&E.paymentDueDate?(v=(L=this.account)==null?void 0:L.account)==null?void 0:v.paymentDueDate:(M=(S=this.account)==null?void 0:S.account)==null?void 0:M.expectedPaymentDueDate,this.minPaymentDue==0&&(this.dueDate="")}catch(W){console.log("Setup AutoPay page data error=",W)}this.isModifyAuto?(this.agree=!0,this.pbpagree=!0):((N=(T=this.account)==null?void 0:T.account)==null?void 0:N.paycheckAutoDeductInd)=="Y"&&(this.paymentMethod="minPaymentDue"),this.pageCtrl.platform.getACCode()=="FXC"&&(this.paymentMethod="minPaymentDue",this.selectautopay="Auto Pay Amount"),this.cancelbutton="Cancel Auto Pay",this.isModifyAuto&&this.pageCtrl.util.isADOptimizationAllowed()&&(this.cancelbutton="Cancel AutoPay"),this.pageCtrl.util.isADOptimizationAllowed()&&(this.selectautopay="Select AutoPay Amount",this.autotermstitle="AutoPay Terms of Use",this.title=this.pageCtrl.platform.translate("SetupAutoPay"),this.buttonLabel=this.pageCtrl.platform.translate("SetupAutoPay")),this.getPaymentAccounts(this.account,this.lang);let i="page-setupautopay";this.isModifyAuto&&(i="page-modifyautopay"),console.log("autopayment page firing analytics loadPageEvent pageName=",i),(B=this.analyticsService)==null||B.loadPageEvent(i,this.pageCtrl.profile.customer)}onSubmit(){return O(this,null,function*(){var c,h,d,u,p,g,_,y,C,x,I,A,E,L,v,S,M,T,N,B,W,$,X;this.errors=Object.assign({}),this.hasError=!1,this.buttonElm=document.getElementById("mybuttonid"),this.buttonElm&&this.buttonElm.setAttribute("disabled","true");let i={};if(!this.agree){let et="You must agree to the Auto Pay Terms of Use to proceed.";i.agree=this.pageCtrl.platform.translate(et),this.hasError=!0}if(((c=this.paymentAccount)==null?void 0:c.bankAccountType)=="P"&&!this.pbpagree&&(i.pbpagree=this.pageCtrl.platform.translate("You must agree to the Pay by Paycheck to proceed."),this.hasError=!0),!this.paymentAccount)i.paymentAccount=this.pageCtrl.platform.translate("Please select a payment account."),this.hasError=!0;else if((h=this.paymentAccount)!=null&&h.isNewAccount&&this.newAcct){this.newAcct.bankAccountType=(d=this.paymentAccount)==null?void 0:d.bankAccountType;var n=new RegExp("^$|[0-9]+");this.newAcct.bankAccountType||(i.bankAccountType=this.pageCtrl.platform.translate("Please select bank account type."),this.hasError=!0),this.newAcct.bankAccountNumber?n.test(this.newAcct.bankAccountNumber)||(i.bankAccountNumber=this.pageCtrl.platform.translate("Please enter your valid bank account number."),this.hasError=!0):(i.bankAccountNumber=this.pageCtrl.platform.translate("Please enter your bank account number."),this.hasError=!0),this.newAcct.bankRoutingNumber?n.test(this.newAcct.bankRoutingNumber)||(i.bankRoutingNumber=this.pageCtrl.platform.translate("Please enter your valid bank routing number."),this.hasError=!0):(i.bankRoutingNumber=this.pageCtrl.platform.translate("Please enter your bank's 9 digit routing number."),this.hasError=!0)}if(this.paymentMethod||(i.paymentMethod=this.pageCtrl.platform.translate("Please select the desired auto pay method."),this.pageCtrl.util.isADOptimizationAllowed()&&(i.paymentMethod=this.pageCtrl.platform.translate("Please select the desired autopay method.")),this.hasError=!0),this.hasError)return this.buttonElm&&this.buttonElm.setAttribute("disabled","false"),this.errors=i,this.bankingRoutingErrorMessage=this.errors.bankRoutingNumber,!1;let s=this.paymentAccount;if((u=this.paymentAccount)!=null&&u.isDebitCard||(s==null?void 0:s.bankAccountType)=="D"||(s==null?void 0:s.bankAccountType)=="P")return((g=(p=this.account)==null?void 0:p.account)==null?void 0:g.paycheckAutoDeductInd)=="Y"&&(s==null?void 0:s.bankAccountType)=="P"?yield this.processEPMCount(s,s==null?void 0:s.bankAccountType):(this.openDebitCardURL(),this.addNewPaymentAccount=!1),this.buttonElm&&this.buttonElm.setAttribute("disabled","false"),!1;(_=this.paymentAccount)!=null&&_.isNewAccount?s=this.newAcct:s=this.paymentAccount;let o={};s.bankAccountType=="D"?o={account:this.account,date:(C=(y=this.account)==null?void 0:y.account)!=null&&C.paymentDueDate&&((I=(x=this.account)==null?void 0:x.account)==null?void 0:I.currentBalance)>
3530?(E=(A=this.account)==null?void 0:A.account)==null?void 0:E.paymentDueDate:(v=(L=this.account)==null?void 0:L.account)==null?void 0:v.expectedPaymentDueDate,paymentAccount:this.paymentAccount,fromDebitcard:!0,autoDeductMethod:this.paymentMethod,fromSetupAutoPay:!0,amountType:s.bankAccountType,amountNumber:s.bankAccountNumber,theme:this.theme,callback:this.postRequest.bind(this)}:o={account:this.account,date:(M=(S=this.account)==null?void 0:S.account)!=null&&M.paymentDueDate&&((N=(T=this.account)==null?void 0:T.account)==null?void 0:N.currentBalance)>0?(W=(B=this.account)==null?void 0:B.account)==null?void 0:W.paymentDueDate:(X=($=this.account)==null?void 0:$.account)==null?void 0:X.expectedPaymentDueDate,paymentAccount:this.paymentAccount,amountChoice:this.paymentMethod,fromSetupAutoPay:!0,amountType:s.bankAccountType,amountNumber:s.bankAccountNumber,theme:this.theme,callback:this.postRequest.bind(this)};let l=yield this.modalCtrl.create({component:Dg,cssClass:this.pageCtrl.platform.is("mobile")?"mobile-payment-confirmation":"payment-confirmation",backdropDismiss:!1,componentProps:o});l.onDidDismiss().then(et=>{this.buttonElm&&et.data&&this.buttonElm.setAttribute("disabled","false")}),l.present()})}onAutopaySuccess(i){return O(this,null,function*(){var n,s,o,l;if(i){if(this.pageCtrl.util.isADOptimizationAllowed()){console.log("setup autodeduct refreshing promotions, summary refresh");let c=yield this.loadingCtrl.create();yield c.present(),setTimeout(()=>O(this,null,function*(){yield c.dismiss(),yield this.getRefreshData()}),4e3),this.fromStatementBundle&&this.events.publish("statementbundle:summary")}else yield this.getRefreshData();this.modalCtrl&&((yield this.modalCtrl.dismiss(!0))||(this.events.publish("menu:select",(s=(n=this.account)==null?void 0:n.account)==null?void 0:s.cardName),yield this.util.timeout(500)),this.pageCtrl.tabSelect("payments",(l=(o=this.account)==null?void 0:o.accountKey)==null?void 0:l.accountId))}})}postRequest(i){return O(this,null,function*(){var s,o,l,c,h,d;console.log("postRequest paymentAccount=",this.paymentAccount+" fromHighline=",i);let n=yield this.loadingCtrl.create();yield n.present(),this.errors=Object.assign({});try{let u;this.addNewPaymentAccount?(u=this.newAcct,u.bankName=this.newAcctBankName,u.paymentAccountId=""):u=this.paymentAccount;let p={};!i&&this.displayDebitCard?p={accountKey:(s=this.account)==null?void 0:s.accountKey,autoDeduct:{bankAccountType:u==null?void 0:u.bankAccountType,bankAccountNumber:this.vAccountNumber,bankRoutingNumber:"000000001",bankAccountHolderName:(((o=this.pageCtrl.profile.customer)==null?void 0:o.firstName)+" "+((l=this.pageCtrl.profile.customer)==null?void 0:l.lastName)).toUpperCase(),bankName:u==null?void 0:u.bankName,paymentAccountId:u==null?void 0:u.paymentAccountId,autoDeductTranId:this.vautoDeductTranId,autoDeductPromoInd:this.autoDeductPromoInd,autoDeductMethod:this.autoDeductMethods[this.paymentMethod],locationCode:this.locationCode,last4DebitCard:this.vlast4DebitCard,zipCode:this.zipCode,expirationDate:this.expiryDate},promotion:this.promotion,autoPayRequiredIndicator:this.autoPayRequiredIndicator}:p={accountKey:(c=this.account)==null?void 0:c.accountKey,autoDeduct:{bankAccountType:u.bankAccountType,bankAccountNumber:u.bankAccountNumber,bankRoutingNumber:u.bankRoutingNumber,bankAccountHolderName:(((h=this.pageCtrl.profile.customer)==null?void 0:h.firstName)+" "+((d=this.pageCtrl.profile.customer)==null?void 0:d.lastName)).toUpperCase(),bankName:u.bankName,paymentAccountId:u.paymentAccountId,autoDeductPromoInd:this.autoDeductPromoInd,autoDeductMethod:this.autoDeductMethods[this.paymentMethod],locationCode:this.locationCode,payByCheckUserId:this.highlineUserId,payByCheckConnectionId:this.highlineConnectionId},promotion:this.promotion,autoPayRequiredIndicator:this.autoPayRequiredIndicator};let g=yield this.api.post(this.endPoint,p);if(yield n.dismiss(),g&&g.outcome=="SUCCESS"){let _="setup_autopay.success.message";this.pageCtrl.util.isADOptimizationAllowed()&&(_="setup_autopay.success.message_ad");let y=yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isSuccessAlert:!0,alertCallback:this.onAutopaySuccess.bind(this),message:this.pageCtrl.platform.translate(_)}});return y.onDidDismiss().then(()=>{this.closePageWithRes(g)}),yield y.present(),g}else return g&&g.pageMessage?(this.buttonElm&&this.buttonElm.setAttribute("disabled","false"),yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,header:this.pageCtrl.platform.translate("setup_auto
353pay.failure.title"),message:g.pageMessage}})).present(),g):(this.errors=this.api.convertError(g),g)}catch(u){return console.log("Payment submission error=",u),u}})}onItemSelected(i){var n,s,o,l,c;if(console.log("payment dropdown ",i),this.paymentAccount=i,this.payAcctSelect(i),this.shouldResize=(n=this.paymentAccount)==null?void 0:n.isNewAccount,this.contentResize.emit((s=this.paymentAccount)==null?void 0:s.isNewAccount),this.hideLabel=!0,this.displayDebitCard=!1,((o=this.paymentAccount)==null?void 0:o.bankAccountType)=="P")return console.log("Found pay-by-check option"),!1;if((l=this.paymentAccount)!=null&&l.isDebitCard)return this.addNewPaymentAccount=!1,!1;(c=this.paymentAccount)!=null&&c.isNewAccount&&(this.newAcct.bankAccountType="",this.newAcct.bankAccountHolderName="",this.newAcct.bankAccountNumber="",this.newAcct.bankRoutingNumber="")}handleClick(i){i==1?this.newAcct.bankAccountHolderName="":i==2?this.newAcct.bankRoutingNumber="":i==3?this.newAcct.bankAccountNumber="":i==4&&(this.newAcct.bankAccountHolderName="",this.newAcct.bankRoutingNumber="",this.newAcct.bankAccountNumber="")}bankName(i){return i.nickName?i.nickName+" ("+i.bankAccountNumber+")":(i==null?void 0:i.bankName)!=this.pageCtrl.platform.translate("payment.card.type")&&(i==null?void 0:i.bankName)!=this.pageCtrl.platform.translate("payment.epmcard.type")&&(i==null?void 0:i.bankName)!=this.pageCtrl.platform.translate("payment.account.checkingtype")?(i==null?void 0:i.bankName)+" ("+(i==null?void 0:i.bankAccountNumber)+")":i.bankName}onRemove(){}closePage(){this.modalCtrl.dismiss()}closePageWithRes(i){this.modalCtrl.dismiss({res:i})}clearAccountNumber(){this.title&&(this.title.indexOf("Cancel")>=0||this.title.indexOf("Cancelar")>=0)&&this.newAcct&&(console.log("clearing account number field"),this.newAcct.bankAccountNumber="")}getBankInfo(i){return O(this,null,function*(){var s;this.isBankNameAvailable=!1;let n=yield this.api.getBankName(i);(n==null?void 0:n.outcome)=="SUCCESS"?(this.newAcctBankName=n.routingInfo.bankName,this.isBankNameAvailable=!0):(this.bankingRoutingErrors=this.api.convertError(n),this.bankingRoutingErrorMessage=i?(s=this.bankingRoutingErrors.routingNumber)==null?void 0:s.message:null,this.newAcctBankName="")})}invokeDebitConfirmation(){return O(this,null,function*(){var h,d,u,p,g,_,y,C,x,I,A,E,L,v,S,M,T,N,B,W,$,X,et,rt,it,at,ii,ni,me,zt,Lt,si,ye;this.debitCardError=null,this.debitExpiryError=null,this.debitZipError=null;let i=this.pageCtrl.platform.getACCode()+"APP",n=yield this.loadingCtrl.create();yield n.present();let s={};((d=(h=this.account)==null?void 0:h.account)==null?void 0:d.paycheckAutoDeductInd)=="Y"&&(s={currentAttempts:this.currentAttempts,maxAttempts:this.maxAutoDeductSetupAttempts});let o={clientInfo:{leadGenCompanyId:i,leadGenLocationId:i,leadGenName:i,referenceNumber:1},autoDeductInfo:{cardNumber:this.cardNumber,expirationDate:this.expiryDate,zipCode:this.zipCode,autoDeductionMethod:this.autoDeductMethods[this.paymentMethod],bankAccountType:"D",paymentAccountId:this.cardToken},autoPayRequiredIndicator:this.autoPayRequiredIndicator,epmInfo:s,programChannelCode:i,accountInfo:{applicationId:"",progSolNumber:(p=(u=this.account)==null?void 0:u.accountKey)==null?void 0:p.progSolNumber,accountNumber:(_=(g=this.account)==null?void 0:g.accountKey)==null?void 0:_.accountNumber,systemIdentifier:(C=(y=this.account)==null?void 0:y.account)==null?void 0:C.systemIdentifier,principleIdentifier:(I=(x=this.account)==null?void 0:x.account)==null?void 0:I.principalIdentifier,principalIdentifier:(E=(A=this.account)==null?void 0:A.account)==null?void 0:E.principalIdentifier,language:this.lang,cardHolderFirstName:(v=(L=this.pageCtrl.profile.customer)==null?void 0:L.firstName)==null?void 0:v.toUpperCase(),cardHolderLastName:(M=(S=this.pageCtrl.profile.customer)==null?void 0:S.lastName)==null?void 0:M.toUpperCase()}},l="https://"+this.lookup.getAccCode("homeURL")+"/dcapi/payment/validateAutoDeduct",c=yield this.api.postUrl(l,o);if(yield n.dismiss(),this.invokeTracking(l,c,"fromValidate"),((T=c==null?void 0:c.GatewayOutput)==null?void 0:T.status)=="Success"){let U=c.GatewayOutput.resultCode;if(console.log("validateAutoDeduct API Success resultCode=",U),!U&&((B=(N=this.account)==null?void 0:N.account)==null?void 0:B.paycheckAutoDeductInd)=="Y"&&(U="A"),U=="A"){this.cardToken=c.GatewayOutput.cardToken,console.log(" validateAutoDeduct cardToken=",this.cardToken),this.vautoDeductTranId=c.GatewayOutput.autoDeductTranId,this.vAccountNumber=c.GatewayOutput.bankAccountNumber,this.vlast4DebitCard=c.GatewayOutput.last4DebitCard,this.zipCode=c.GatewayOutput.zipCode,this.expiryDate=c.GatewayOutput.expirationDate;let Xt=yield this.modalCtrl.create({component:Dg,cssClass:this.pageCtrl.platform.is("mobile")?"mobile-payment-confirmation":"payment-confirmation",backdropDismiss:!1,componentProps:{account:this.account,fromDebitcard:!0,bankAccountType:"D",bankAccountNumber:this.cardNumber,paymentAccount:this.paymentAccount,fromSetupAutoPay:!0,amountType:"D",amountNumber:this.cardNumber,autoDeductMethod:this.paymentMethod,date:($=(W=this.account)==null?void 0:W.account)!=null&&$.paymentDueDate&&((et=(X=this.account)==null?void 0:X.account)==null?void 0:et.currentBalance)>0?(it=(rt=this.account)==null?void 0:rt.account)==null?void 0:it.paymentDueDate:(ii=(at=this.account)==null?void 0:at.account)==null?void 0:ii.expectedPaymentDueDate,theme:this.theme,callback:this.postRequest.bind(this)}});
353Xt.onDidDismiss().then(ln=>{this.buttonElm&&ln.data&&this.buttonElm.setAttribute("disabled","false")}),yield Xt.present()}else if(U=="D"||U=="DM"){let Xt=yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,message:(ni=c==null?void 0:c.GatewayOutput)!=null&&ni.pageMessage?(me=c==null?void 0:c.GatewayOutput)==null?void 0:me.pageMessage:this.pageCtrl.platform.translate("delete_autopay.declinemax.message")}});yield Xt.present(),U=="DM"&&Xt.onDidDismiss().then(()=>{this.closePage()})}else console.log("validateAutoDeduct unknown resultCode=",U),yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,message:(zt=c==null?void 0:c.GatewayOutput)!=null&&zt.resultMsg?(Lt=c==null?void 0:c.GatewayOutput)==null?void 0:Lt.resultMsg:"Please try again"}})).present()}else this.buttonElm&&this.buttonElm.setAttribute("disabled","false"),(ye=(si=c==null?void 0:c.GatewayOutput)==null?void 0:si.errors)==null||ye.forEach(U=>{U.attribute=="payment.bankAccountNumber"?this.debitCardError=U.message:U.attribute=="payment.expirationDate"?this.debitExpiryError=U.message:U.attribute=="payment.zipCode"?this.debitZipError=U.message:U.attribute=="payment.bankAccountHolderName"})})}invokeTracking(i,n,s){return O(this,null,function*(){var c;let o="/ols/s/tracking/enrollDCAD";s=="fromValidate"&&(o="/ols/s/tracking/validateDCAD"),console.log("tracking API="+o+" url=",i);let l=yield this.api.post(o,{accountKey:this.account?(c=this.account)==null?void 0:c.accountKey:null,launchURL:i,callbackData:JSON.stringify(n)})})}clearDebitFields(){this.cardNumber="",this.expiryDate="",this.zipCode="",this.saveDebitAcct=!1,this.debitCardError=null,this.debitExpiryError=null,this.debitZipError=null,this.debitAccountHolderName=""}checkCancelButton(i,n){var c;if(this.isModifyAuto){var s=document.getElementById("mycancelautopay");if(s){var o=i.currentTarget.checked;n=="A"?this.agree=o:n=="P"&&(this.pbpagree=o);var l=!1;((c=this.paymentAccount)==null?void 0:c.bankAccountType)=="P"?this.agree&&this.pbpagree&&(l=!0):this.agree&&(l=!0),l?s.setAttribute("disabled","false"):s.setAttribute("disabled","true"),console.log("agree=",this.agree+" toEnable="+l+" isChecked="+o)}}}getRefreshData(){return O(this,null,function*(){var s,o;console.log("setup autodeduct calling refreshAccountSummary");let i={accountKey:(s=this.account)==null?void 0:s.accountKey,account:(o=this.account)==null?void 0:o.account},n=yield this.api.post("/ols/s/customer/refreshAccountSummary",i);n&&n.outcome=="SUCCESS"?(console.log("refresh res data :",n.accountContent),this.account=n.accountContent,this.events.publish("account:setaccount",n.accountContent),this.events.publish("base:setaccount",n.accountContent),this.events.publish("autopay:setup",n.accountContent),this.events.publish("autopay:show"),this.events.publish("promotion:refresh",3)):console.log("refreshAccountSummary API failed")})}processEPMCount(i,n){return O(this,null,function*(){var l,c,h,d;console.log("setup autodeduct calling processEPMCount");let s={epmMethod:n,maxAutoDeductSetupAttempts:this.maxAutoDeductSetupAttempts,accountKey:(l=this.account)==null?void 0:l.accountKey,sorCustomerId:(h=(c=this.account)==null?void 0:c.account)==null?void 0:h.sorCustomerId},o=yield this.api.post("/ols/s/external/processEPMCount",s);if(o&&o.outcome=="SUCCESS")if(console.log("processEPMCount API Success"),this.epmOutcome=o.epmOutcome,this.currentAttempts=o.currentAttempts,console.log("setup epmOutcome="+this.epmOutcome+" currentAttempts="+this.currentAttempts),this.epmOutcome=="C")(d=this.paymentAccount)!=null&&d.isDebitCard,i.bankAccountType=="P"?(this.displayDebitCard=!1,this.highlineAccessToken=o.highlineAccessToken,this.highlineApplicationToken=o.highlineApplicationToken,yield this.invokeHighLine()):(this.addNewPaymentAccount=!1,this.openDebitCardURL());else if(this.epmOutcome=="R"||this.epmOutcome=="S"){let u=this.epmOutcome=="R"?this.pageCtrl.platform.translate("delete_autopay.declinemax.message"):this.pageCtrl.platform.translate("setup_auto
353pay.debit.error2"),p=yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:this.epmOutcome=="R",isSuccessAlert:this.epmOutcome=="S",message:o.pageMessage||u}});yield p.present(),yield this.getRefreshData(),p.onDidDismiss().then(()=>{this.closePage()})}else if(this.epmOutcome=="X"){let u=this.pageCtrl.platform.translate("setup_autopay.debit.errorX");yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,header:this.pageCtrl.platform.translate("global.error_title.oops"),message:o.pageMessage||u}})).present()}else yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,header:this.pageCtrl.platform.translate("global.error_title.oops"),message:o.pageMessage||"Please try again."}})).present();else console.log("processEPMCount API failed"),yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,header:this.pageCtrl.platform.translate("global.error_title.oops"),message:o.pageMessage||"Please try again."}})).present()})}invokeHighLine(){return O(this,null,function*(){console.log("invoking paymenthighline highlineAccessToken="+this.highlineAccessToken+" highlineApplicationToken=",this.highlineApplicationToken),this.highlineSuccess=!1;var i=highlineLink==null?void 0:highlineLink.init({access_token:this.highlineAccessToken,applicant_token:this.highlineApplicationToken,feature:"payments",on_success:({user_id:n,connection_id:s})=>{console.log("on_success! "+n+" connection_id="+s),this.highlineSuccess=!0,this.highlineConnectionId=s,this.highlineUserId=n,this.pageCtrl.util.invokeTracking("success","paymentHighlineSuccess")},on_error:({type:n,message:s,user_id:o,connection_id:l})=>{this.highlineSuccess=!1,console.log("on_error! "+s+" connection_id="+l+" type="+n),this.highlineConnectionId=l,this.highlineUserId=o,o&&console.log("User ID: "+o),this.pageCtrl.util.invokeTracking("error","paymentHighlineError"),this.showSetupDialog()},on_close:()=>{console.log("on_close highlineSuccess="+this.highlineSuccess),this.pageCtrl.util.invokeTracking("close","paymentHighlineClose"),this.highlineSuccess?(console.log("invoking enroll API from highline"),this.postRequest(!0)):this.showSetupDialog()}});i&&(console.log("paymenthighline open"),this.hideSetupDialog(),i.open())})}hideSetupDialog(){return O(this,null,function*(){let i=document.getElementsByClassName("md modal-default mymodal-right hydrated show-modal");i&&i[0]&&(console.log("Hiding setup dialog"),i[0].className="mymodal-right myhide")})}showSetupDialog(){return O(this,null,function*(){let i=document.getElementsByClassName("mymodal-right myhide");i&&i[0]&&(console.log("Showing setup dialog"),i[0].className="md modal-default mymodal-right hydrated show-modal")})}getSelectText(){let i=this.paymentAccount?this.bankName(this.paymentAccount):"Select an account";return this.isModifyAuto&&(this.newAcct.bankAccountType=="C"?i="Checking Account":this.newAcct.bankAccountType=="D"?i="Debit Card":this.newAcct.bankAccountType=="P"&&(i="Pay by Paycheck")),i}openDebitCardURL(){return O(this,null,function*(){this.errors=Object.assign({});let i=this.pageCtrl.platform.trans.getDefaultLang(),n=yield this.modalCtrl.create({component:ow,backdropDismiss:!1,cssClass:"mymodal-debit",componentProps:{account:this.account,customer:this.pageCtrl.profile.customer,paymentAccount:this.paymentAccount,apiType:"DCAutoPay",theme:this.theme,fromAutoDeduct:!0,promotion:this.promotion,autoDeductionMethod:this.autoDeductMethods[this.paymentMethod],lang:i}});n.onDidDismiss().then(s=>O(this,null,function*(){var l,c,h,d,u;let o=s.data;if(console.log("make payment debit data=",o),o){let p=o.pageMessage?o.pageMessage:this.pageCtrl.platform.translate("debit_card.success.message");if(((l=o.status)==null?void 0:l.toUpperCase())=="SUCCESS"){let g=o.resultCode;console.log("debitCard Data resultCode=,",g),g=="A"&&this.closePage(),(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isSuccessAlert:g=="A",isOopsAlert:g!="A",alertCallback:this.onAutopaySuccess.bind(this),message:p}})).present()}else(((c=o.status)==null?void 0:c.toUpperCase())=="ERROR"||((h=o.status)==null?void 0:h.toUpperCase())=="FAILURE")&&(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,message:p}})).present();this.pageCtrl.tabSelect("payments",(u=(d=this.account)==null?void 0:d.accountKey)==null?void 0:u.accountNumber)}})),n.present()})}};t.\u0275fac=function(n){return new(n||t)(ct(Xi),ct(We),ct(Ua),ct(Ue),ct(Dn),ct(Zs),ct(Yi),ct(to),ct(Js),ct(iw))},t.\u0275cmp=kt({type:t,selectors:[["app-setup-auto-pay"]],inputs:{paymentMethod:"paymentMethod",autoPay:"autoPay",account:"account",promotion:"promotion",title:"title",hideHeader:"hideHeader",theme:"theme",minPaymentDue:"minPaymentDue",statementBalance:"statementBalance",dueDate:"dueDate",autoDeductPromoInd:"autoDeductPromoInd",locationCode:"locationCode",fromStatementBundle:"fromStatementBundle",buttonElm:"buttonElm",agree:"agree",pbpagree:"pbpagree",hideNewAcctName:"hideNewAcctName",showAPForm:"showAPForm",shouldResize:"shouldResize"},outputs:{toggleAP:"toggleAP",contentResize:"contentResize"},standalone:!1,features:[Mu],ngContentSelectors:B1,decls:58,vars:63,consts:[[4,"ngIf"],[1,"ion-padding",3,"ngClass"],["text-center","","style","text-align:center;",4,"ngIf"],[2,"padding-top","5%","border-bottom","1px solid #cccccc"],[2,"background-color","white",3,"ngClass"],["no-lines","",1,"auto-pay-list"],["no-padding","",1,"auto-pay-subtitle"],["no-padding","","class","invali
353d-input","style","padding-bottom: 8px;",4,"ngIf"],[3,"ngModelChange","ngModel"],["lines","none",1,"custom-margin-left",3,"disabled"],["label-placement","end","slot","start","value","minPaymentDue","mode","md","name","paymentMethod",3,"click"],["class","font-family-medium global-font-14",3,"color",4,"ngIf"],["class","small-text",3,"color",4,"ngIf"],["style","border-bottom:1px solid #cccccc",4,"ngIf"],["no-lines","",1,"ion-no-padding"],["no-padding","","text-wrap","","no-margin","",2,"--inner-border-width","0","margin-left","-16px",3,"disabled"],[2,"width","100%","padding-top","9px"],["appearance","fill"],["name","custom-dropdown"],[3,"value","click",4,"ngFor","ngForOf"],["no-padding","","class","invalid-input",4,"ngIf"],["style","padding-bottom: 16px !important;",4,"ngIf"],["padding","","style","padding-bottom: 16px;",4,"ngIf"],["text-wrap","","color","light",2,"--inner-border-width","0"],[1,"small-text","small-text-light"],["padding","",2,"padding-bottom","16px"],["size","12",1,"autopay-checkbox"],["label-placement","end","justify","start","mode","md","id","agree","name","agree",3,"ngModelChange","ionChange","ngModel"],[1,"small-text","ion-text-wrap",2,"line-height","1.5"],[3,"program","autoPayRequiredIndicator","mytitle"],[2,"font-size","14px"],["size","default","style","letter-spacing: 0;","expand","block","id","mybuttonid","strong","",3,"class","disabled","click",4,"ngIf"],[2,"text-align","center","color","white"],[1,"global-font-17",2,"color","white"],["slot","end"],[1,"global-font-16",3,"click"],["name","close",2,"color","white"],[1,"global-font-16",2,"float","left",3,"click"],["name","arrow-back",2,"color","white"],[1,"global-font-17",2,"text-align","left","color","white"],["class","mobile-title-ending font-family-regular global-font-12",4,"ngIf"],[1,"mobile-title-ending","font-family-regular","global-font-12"],["text-center","",2,"text-align","center"],["style1","margin: -0.3rem auto 1rem;",1,"value-text"],["class","medium-text",3,"color",4,"ngIf"],[1,"medium-text"],["no-padding","",1,"invalid-input",2,"padding-bottom","8px"],[1,"font-family-medium","global-font-14"],[1,"small-text"],["label-placement","end","value","statementBalance","mode","md","name","paymentMethod",3,"click"],[3,"color","class",4,"ngIf"],["name","information-circle","id","so-trigger-small"],["trigger","so-trigger-small","side","top","alignment","center","triggerAction","hover"],[1,"rectangleSmall"],[1,"tooltipClassSmall"],["size","12",1,"global-font-12"],[2,"border-bottom","1px solid #cccccc"],[3,"click","value"],["class","small-text","style","color:white;",4,"ngIf"],[1,"small-text",2,"color","white"],["no-padding","",1,"invalid-input"],[2,"padding-bottom","16px !important"],["lines","none","class","auto-pay-input input-bottom",3,"disabled",4,"ngIf"],["style","padding-left: 16px;","class","invalid-input",4,"ngIf"],["lines","none","padding-bottom","",1,"auto-pay-input","input-bottom",3,"disabled"],["label-placement","floating","type","text","color","black",1,"global-font-16",3,"ngModelChange","ionFocus","label","ngModel","disabled"],["validateName","autoDeduct.bankAccountNumber",3,"validate",4,"ngIf"],["lines","none",1,"auto-pay-input","input-bottom",3,"disabled"],["label-placement","floating","type","text","color","black","maxlength","9",1,"global-font-16",3,"ngModelChange","ionFocus","click","ionBlur","ngModel","disabled"],["slot","label"],[1,"invalid-input",2,"padding-left","16px"],["validateName","autoDeduct.bankAccountNumber",3,"validate"],[1,"small-text",2,"color","red"],["label-placement","end","justify","start","mode","md","id","pbpagree","name","pbpagree",3,"ngModelChange","ionChange","ngModel","disabled"],[1,"small-text","ion-text-wrap",2,"line-height","1.5","color","red"],["size","default","expand","block","id","mybuttonid","strong","",2,"letter-spacing","0",3,"click","disabled"]],template:function(n,s){n&1&&(bi(),q(0,H1,8,4,"ion-header",0)(1,G1,10,9,"ion-header",0),D(2,"ion-content",1),q(3,K1,7,11,"div",2),Q(4,"div",3),D(5,"div",4)(6,"div")(7,"ion-list",5)(8,"ion-list-header",6),G(9),Z(10,"translate"),R(),q(11,q1,2,1,"div",7),D(12,"ion-radio-group",8),Na("ngModelChange",function(l){return Oa(s.paymentMethod,l)||(s.paymentMethod=l),l}),D(13,"ion-item",9)(14,"ion-radio",10),ut("click",function(){return s.clearAccountNumber()}),q(15,Z1,3,5,"span",11)(16,Q1,3,5,"span",11),R()(),q(17,eM,3,4,"div",12)(18,sM,3,4,"div",12)(19,aM,10,16,"div",0),R()()(),q(20,lM,1,0,"div",13),D(21,"div")(22,"ion-list",14)(23,"ion-list-header",6),G(24),Z(25,"translate"),R(),D(26,"ion-item",15)(27,"form",16)(28,"mat-form-field",17),q(29,cM,3,3,"mat-label",0),D(30,"mat-select",18),q(31,uM,3,3,"mat-option",19),R()()()(),q(32,pM,2,1,"div",20),R(),q(33,vM,2,1,"ion-list",21)(34,xM,4,8,"div",0)(35,wM,4,6,"div",0)(36,CM,7,11,"ion-row",22),D(37,"ion-list",5)(38,"ion-list-header",6),G(39),Z(40,"translate"),R(),D(41,"ion-item",23)(42,"p",24),q(43,EM,4,7,"span",0)(44,SM,3,3,"span",0),R()()(),D(45,"ion-row",25)(46,"ion-col",26)(47,"ion-checkbox",27),Na("ngModelChange",function(l){return Oa(s.agree,l)||(s.agree=l),l}),ut("ionChange",function(l){return s.checkCancelButton(l,"A")}),D(48,"span",28),G(49),Z(50,"translate"),D(51,"app-program-document",29)(52,"span",30),G(53),Z(54,"translate"),R()()()()(),q(55,PM,2,1,"div",20),R(),q(56,TM,2,4,"ion-button",31),R()(),ae(57),R()),n&2&&(V("ngIf",!s.hideHeader&&!s.pageCtrl.platform.is("mobile")),P(),V("ngIf",s.pageCtrl.platform.is("mobile")&&!s.hideHeader),P(),oe("height",s.myHeight),V("ngClass",In(61,z1,s.hideHeader)),P(),V("ngIf",!s.hideHeader),P(2),V("ngClass",s.hideHeader?"row":null),P(),Ii("ion-col",s.hideHeader?"":null)("col-6",s.hideHeader?"":null),P(3),Et(" ",nt(10,51,s.selectautopay)," "),P(2),V("ngIf",s.errors&&s.errors.paymentMethod),P(),La("ngModel",s.paymentMethod),P(),V("disabled",s.isModifyAuto),P(),qt(s.pageCtrl.
353styleUtil.getRadioColor()),P(),V("ngIf",s.pageCtrl.platform.getACCode()!="FXC"),P(),V("ngIf",s.pageCtrl.platform.getACCode()=="FXC"),P(),V("ngIf",s.pageCtrl.platform.getACCode()!="FXC"),P(),V("ngIf",s.pageCtrl.platform.getACCode()=="FXC"),P(),V("ngIf",s.pageCtrl.platform.getACCode()!="FXC"&&(s.account==null?null:s.account.account.paycheckAutoDeductInd)!="Y"),P(),V("ngIf",!s.hideHeader),P(),Ii("ion-col",s.hideHeader?"":null)("col-6",s.hideHeader?"":null),P(),oe("margin-bottom",s.addNewPaymentAccount?"":"32px"),P(2),Ct(nt(25,53,"Pay from Account")),P(2),V("disabled",s.isModifyAuto),P(3),V("ngIf",!s.hideLabel),P(2),V("ngForOf",s.paymentAccounts),P(),V("ngIf",s.errors&&s.errors.paymentAccount),P(),V("ngIf",s.addNewPaymentAccount),P(),V("ngIf",!s.isModifyAuto&&s.pageCtrl.util.isADOptimizationAllowed()&&(s.paymentAccount==null?null:s.paymentAccount.bankAccountType)=="D"),P(),V("ngIf",!s.isModifyAuto&&!s.pageCtrl.util.isADOptimizationAllowed()&&(s.account==null?null:s.account.account.accountCategoryCode)=="E"&&(s.paymentAccount==null?null:s.paymentAccount.bankAccountType)=="D"),P(),V("ngIf",!s.isModifyAuto&&(s.paymentAccount==null?null:s.paymentAccount.bankAccountType)=="P"),P(3),Ct(nt(40,55,"Payment Date")),P(3),oe("color",s.util.getTextColorStyle()),P(),V("ngIf",(s.paymentAccount==null?null:s.paymentAccount.bankAccountType)!="P"),P(),V("ngIf",(s.paymentAccount==null?null:s.paymentAccount.bankAccountType)=="P"),P(3),qt(s.pageCtrl.styleUtil.getCBColor()),La("ngModel",s.agree),P(),oe("color",s.util.getTextColorStyle()),P(),Et(" ",nt(50,57,"I have read and agree to the")," "),P(2),V("program",s.autoDeductProgram)("autoPayRequiredIndicator",s.autoPayRequiredIndicator)("mytitle",s.autotermstitle),P(2),Et("",nt(54,59,s.autotermstitle),"."),P(2),V("ngIf",s.errors&&s.errors.agree),P(),V("ngIf",!s.isModifyAuto))},dependencies:[Fa,lv,Mn,Ba,za,Iv,Va,Xs,Ks,$i,Mv,Vu,ju,Dv,Rv,Lv,ja,Ha,qs,Ov,Ev,Sv,Pv,wv,yv,vv,Cv,xv,Bu,bg,Vc,Tg,Hc,ME,jv,Nu,hv,Qs],styles:[".autopay-checkbox[_ngcontent-%COMP%]{margin-top:-6px}.mobi-title[_ngcontent-%COMP%]{color:#fff;padding-left:6px;margin-top:-6px;position:relative;font-size:14px;letter-spacing:normal}.custom-margin-left[_ngcontent-%COMP%]{margin-left:-2%}.auto-pay-list[_ngcontent-%COMP%]{padding:0;margin-bottom:32px}.auto-pay-subtitle[_ngcontent-%COMP%]{font-size:16px;color:#000!important;font-family:var(--ion-font-family-regular);padding:1px 0 0}.auto-pay-input[_ngcontent-%COMP%]{--inner-border-width: 0 0 0px;--border-width: 0;padding-right:8px;--border-color: #8f9d9d}ion-item[_ngcontent-%COMP%]   .item-native[_ngcontent-%COMP%]{padding-inline-start:0px!important}ion-item[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   .item-inner[_ngcontent-%COMP%]{border-bottom:none!important}"]});let r=t;return r})();var Pa;(function(r){r._nls={custom:{},"en-US":{monday:!0,weekdays:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},en:{monday:!0,weekdays:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},es:{monday:!0,weekdays:["lunes","martes","mi\xE9rcoles","jueves","viernes","s\xE1bado","domingo"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},"en-UK":{weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},"pt-BR":{weekdays:["Domingo","Segunda-Feira","Ter\xE7a-Feira","Quarta-Feira","Quinta-Feira","Sexta-Feira","S\xE1bado"],months:["Janeiro","Fevereiro","Mar\xE7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},"he-IL":{weekdays:["\u05E8\u05D0\u05E9\u05D5\u05DF","\u05E9\u05E0\u05D9","\u05E9\u05DC\u05D9\u05E9\u05D9","\u05E8\u05D1\u05D9\u05E2\u05D9","\u05D7\u05DE\u05D9\u05E9\u05D9","\u05E9\u05D9\u05E9\u05D9","\u05E9\u05D1\u05EA"],months:["\u05D9\u05E0\u05D5\u05D0\u05E8","\u05E4\u05D1\u05E8\u05D5\u05D0\u05E8","\u05DE\u05E8\u05E5","\u05D0\u05E4\u05E8\u05D9\u05DC","\u05DE\u05D0\u05D9","\u05D9\u05D5\u05E0\u05D9","\u05D9\u05D5\u05DC\u05D9","\u05D0\u05D5\u05D2\u05D5\u05E1\u05D8","\u05E1\u05E4\u05D8\u05DE\u05D1\u05E8","\u05D0\u05D5\u05E7\u05D8\u05D5\u05D1\u05E8","\u05E0\u05D5\u05D1\u05DE\u05D1\u05E8","\u05D3\u05E6\u05DE\u05D1\u05E8"]},"ru-RU":{weekdays:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u0438\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"]},de:{weekdays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],months:["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},fi:{weekdays:["Sunnuntai","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai"],months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kes\xE4kuu","Hein\xE4kuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"]},"fr-FR":{monday:!0,weekdays:["Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],months:["Janvier","F\xE9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xFBt","Septembre","Octobre","Novembre","D\xE9cembre"]},"zh-CN":{weekdays:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],months:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]},"zh-TW":{weekdays:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],months:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]}};function t(s){return this.getNls(s).weekdays}r.getWeekdays=t;function e(s){return this.getNls(s).months}r.getMonths=e;function i(s){return this._nls[s]||this._nls["en-US"]}r.getNls=i;function n(s){return Object.keys(this._nls).some(l=>l===s)}r.checkExists=n})(Pa||(Pa={}));var ns=class ns{get locale(){return ns._local||"en-UK"}set locale(t){if(!Pa.checkExists(t))throw"Locale not recognized as a valid value. Only en-US/he-IL/ru-RU/pt-BR/de/fi/fr-FR/zh-CN/zh-TW avaliable";ns._local=t}setCustomNls(t){Pa._nls.custom=t}getDaysOfWeek(){return Pa.getWeekdays(this.locale)}getMonths(){return Pa.getMonths(this.locale)}doesStartFromMonday(){return!0}getYears(){let t=[];for(let e=1900;e<2101;e++)t.push(e);return t}createDateList(t){let e=new Date(t.getFullYear(),t.getMonth(),1).getDay();this.doesStartFromMonday()&&(e===0?e=6:e--);let i=new Date(t.getFullYear(),t.getMonth(),1).getDate(),n=new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),s=[];for(var o=0;o<e;o++)s.push(void 0);for(let l=i;l<=n;l++)s.push(new Date(t.getFullYear(),t.getMonth(),l));return s}};ns._local=void 0,ns.\u0275fac=function(e){return new(e||ns)},ns.\u0275prov=dt({token:ns,factory:ns.\u0275fac});var RE=ns;var IM="6Lcu160kAAAAAP7AmJn-Cekhj8WWf8z5WnWXZhpw",D0=[{name:"highline",src:"https://link.highline.co/v1/highline-link.js"},{name:"highline-sb",src:"https://sandbox-link.highline.co/highline-link.js"},{name:"paymenthighline",src:"https://sdk.highline.co/js/highline-link.js"},{name:"paymenthighline-sb",src:"https://sdk.highline.co/js/sandbox/highline-link.js"},{name:"chatpanel",src:"https://atlanticus.boost.ai/chatPanel/chatPanel.js"},{name:"chatpanel-sb",src:"https://atlanticus-test.boost.ai/chatPanel/chatPanel.js"},{name:"recaptchav3",src:"https://www.google.com/recaptcha/api.js?render="+IM}],gz=(()=>{let t=class t{constructor(){this.scripts={},D0==null||D0.forEach(i=>
353{this.scripts[i.name]={loaded:!1,src:i.src}})}load(...i){let n=[];return i==null||i.forEach(s=>n.push(this.loadScript(s))),Promise.all(n)}loadScript(i){return new Promise((n,s)=>{if(this.scripts[i].loaded)n({script:i,loaded:!0,status:"Already Loaded"});else{let o=document.createElement("script");o.type="text/javascript",o.src=this.scripts[i].src,o.onload=()=>{this.scripts[i].loaded=!0,console.log(`${i} Loaded.`),n({script:i,loaded:!0,status:"Loaded"})},o.onerror=l=>n({script:i,loaded:!1,status:"Loaded"}),document.getElementsByTagName("head")[0].appendChild(o)}})}showCaptchaBadge(){document.body.classList.add("show-recaptcha-badge")}hideCaptchaBadge(){document.body.classList.remove("show-recaptcha-badge")}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=dt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();function kM(r,t){if(r&1){let e=jt();D(0,"div",2)(1,"a",3),ut("click",function(){yt(e);let n=j();return vt(n.closePage())}),Q(2,"ion-icon",4),R(),D(3,"img",5),ut("click",function(){yt(e);let n=j();return vt(n.open())}),R()()}if(r&2){let e=j();P(3),oe("height",e.platform&&!e.platform.is("mobile")?"":"100%"),V("src",e.promotion.imageUrl,Pn)}}function MM(r,t){if(r&1){let e=jt();D(0,"div",2)(1,"a",3),ut("click",function(){yt(e);let n=j();return vt(n.closePage())}),Q(2,"ion-icon",4),R(),D(3,"img",5),ut("click",function(){yt(e);let n=j();return vt(n.open())}),R()()}if(r&2){let e=j();P(3),oe("height",e.platform&&!e.platform.is("mobile")?"":"100%"),V("src",e.imageSrc,Pn)}}var LE=(()=>{let t=class t{constructor(i,n,s){this.modalCtrl=i,this.platform=n,this.events=s}open(){this.destinationPathUrl?this.events.publish("promotion:lightboxinvokewallet",this.destinationPathUrl):this.events.publish("promotion:lightbox",this.promotion),this.closePage()}closePage(){this.modalCtrl.dismiss()}};t.\u0275fac=function(n){return new(n||t)(ct(Ue),ct(Fv),ct(Yi))},t.\u0275cmp=kt({type:t,selectors:[["app-promotion-detail"]],inputs:{promotion:"promotion",destinationPathUrl:"destinationPathUrl",imageSrc:"imageSrc"},standalone:!1,decls:2,vars:2,consts:[["style","line-height: 1px;",4,"ngIf"],["style","line-height:1px;",4,"ngIf"],[2,"line-height","1px"],[1,"close-button",3,"click"],["name","close",2,"color","red","font-size","40px"],[3,"click","src"]],template:function(n,s){n&1&&q(0,kM,4,3,"div",0)(1,MM,4,3,"div",1),n&2&&(V("ngIf",!s.destinationPathUrl),P(),V("ngIf",s.destinationPathUrl))},dependencies:[Mn,$i],styles:[".scroll-content[_ngcontent-%COMP%]{overflow-y:hidden;color:#6d7a7b;text-align:center;padding:0}a.close-button[_ngcontent-%COMP%]{position:absolute;right:20px;top:5px;font-size:14px}a.close-button[_ngcontent-%COMP%]   ion-icon[_ngcontent-%COMP%]{color:#000;font-size:24px;font-weight:700}"]});let r=t;return r})();var OE=(()=>{let t=class t{constructor(i,n,s,o){this.modalCtrl=i,this.pageCtrl=n,this.lookup=s,this.profile=o}ngOnInit(){console.log("return confirm promo=",this.promo),this.homeUrl="https://"+this.lookup.getAccCode("homeURL"),this.returnConfirmUrl=this.homeUrl+"/i/images/banners/confirmation_promo_thd_desktop.svg",this.pageCtrl.platform.is("mobile")&&(this.returnConfirmUrl=this.homeUrl+"/i/images/banners/confirmation_promo_thd_mobile.svg")}closePage(){console.log("return-confirm calling getPromotions API"),this.profile.refreshPromotions(),this.modalCtrl.dismiss()}};t.\u0275fac=function(n){return new(n||t)(ct(Ue),ct(We),ct(Js),ct(to))},t.\u0275cmp=kt({type:t,selectors:[["app-return-confirm"]],inputs:{promo:"promo"},standalone:!1,decls:4,vars:1,consts:[[3,"click"],["name","close",1,"close-button"],[3,"click","src"]],template:function(n,s){n&1&&(D(0,"div")(1,"a",0),ut("click",function(){return s.closePage()}),Q(2,"ion-icon",1),R(),D(3,"img",2),ut("click",function(){return s.closePage()}),R()()),n&2&&(P(3),V("src",s.returnConfirmUrl,Pn))},dependencies:[$i],styles:[".close-button[_ngcontent-%COMP%]{color:#000;font-size:24px;font-weight:700;position:absolute;right:20px;top:5px}"]});let r=t;return r})();var Wz=(()=>{let t=class t{constructor(i,n,s,o,l,c,h){this.modalCtrl=i,this.profile=n,this.events=s,this.api=o,this.alertCtrl=l,this.loadingCtrl=c,this.pageCtrl=h,this.events.unsubscribe("promotion:logview"),this.events.subscribe("promotion:logview",d=>
353{this.logView(d)}),this.events.unsubscribe("promotion:lightbox"),this.events.subscribe("promotion:lightbox",d=>{this.open(d)}),this.events.unsubscribe("promotion:lightboxinvokewallet"),this.events.subscribe("promotion:lightboxinvokewallet",d=>{this.destinationPathUrl=d,this.invokeWalletApi()})}open(i){this.goToPromoDestination(i)}invokeWalletApi(){return O(this,null,function*(){console.log("calling wallet API for destinationPathUrl="+this.destinationPathUrl);let i=[],n=yield this.api.post("/ols/s/customer/activateWallet",{destinationPathUrl:this.destinationPathUrl});n&&n.outcome=="SUCCESS"?(this.modalCtrl.dismiss(),yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isSuccessAlert:!0,message:n.pageMessage}})).present()):yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,message:n.pageMessage||"API failed"}})).present()})}openWithModal(i){return O(this,null,function*(){if(i.imageUrl){this.logView(i);let n=yield this.modalCtrl.create({component:LE,backdropDismiss:!1,componentProps:{promotion:i,actionCallback:()=>{this.goToPromoDestination(i,n)}}});yield n.present()}else this.goToPromoDestination(i)})}goToPromoDestination(i,n){return O(this,null,function*(){var s,o,l,c;if(n&&n.dismiss(),this.logClick(i),this.events.publish("mobilemenu:close"),i&&i.destinationUrl=="apireturn-confirm"){this.returnConfirm(i);return}if(i&&i.destinationType==="INTERNAL"){let h={promotion:i};if((s=h==null?void 0:h.promotion)!=null&&s.accountKey&&(h.account=yield this.profile.getAccount((o=h==null?void 0:h.promotion)==null?void 0:o.accountKey),h.theme=h.account?(c=(l=h.account)==null?void 0:l.account)==null?void 0:c.brandColor:"primary"),i.destinationUrl=="setup-autopay"){h.autoDeductPromoInd="Y";let d=yield this.modalCtrl.create({component:DE,backdropDismiss:!1,cssClass:"mymodal-right",componentProps:{account:h.account,mobileHeader:!0,theme:h.theme,autoDeductPromoInd:h.autoDeductPromoInd,isAutoPay:!0,promotion:h==null?void 0:h.promotion,locationCode:i.locationCode}});return d.onDidDismiss().then(u=>{console.log("dlg retdata="+u.data)}),yield d.present()}else console.log("promotion going to url="+i.destinationUrl),this.events.publish("navigate",{path:i.destinationUrl,params:h})}else i&&i.destinationUrl&&(i.destinationUrl.indexOf("http")<0&&(i.destinationUrl=`http://${i.destinationUrl}`),i.destinationType==="EXTERNAL"&&(console.log("launching external url="+i.destinationUrl+" for subject="+i.subject),this.events.publish("promotion:extlaunch",i.subject,i.destinationUrl,i.header)),i.destinationType==="NEXTERNAL"&&(console.log("launching direct external url="+i.destinationUrl),Vv.open({url:i.destinationUrl,windowName:"_system"})))})}logView(i){return O(this,null,function*(){i&&this.api.post("/ols/s/promotion/viewPromotion",{promotion:i})})}logClick(i,n){return O(this,null,function*(){if(!i)return;let s={promotion:i};n!=null&&(s.contactDispositionCode=n),yield this.api.post("/ols/s/promotion/clickPromotion",s)})}remove(i){return O(this,null,function*(){this.profile.removePromo(i)})}returnConfirm(i){return O(this,null,function*(){let n=yield this.loadingCtrl.create();yield n.present();let s=yield this.api.post("/ols/s/promotion/enrollTHDPromotion",{program:i.program,accountKey:i==null?void 0:i.accountKey});if(yield n.dismiss(),s&&s.outcome=="SUCCESS"){let o=yield this.modalCtrl.create({component:OE,backdropDismiss:!1,cssClass:yield this.pageCtrl.util.getPromoCSSClass(),componentProps:{promo:i}});o.onDidDismiss().then(l=>{console.log("dlg retdata="+l.data)}),yield o.present()}else console.log("enrollTHDPromotion API Error"),yield(yield this.modalCtrl.create({component:Ge,cssClass:this.pageCtrl.platform.is("mobile")?"generic-mobile-alert":"generic-desktop-alert",backdropDismiss:!1,componentProps:{isOopsAlert:!0,message:s.pageMessage||"No Promotion found"}})).present()})}};t.\u0275fac=function(n){return new(n||t)(je(Ue),je(to),je(Yi),je(Xi),je(Ua),je(Zs),je(We))},t.\u0275prov=dt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var Zz=(()=>{let t=class t{constructor(i,n,s){this.events=i,this.loadingCtrl=n,this.api=s,this.ready=!1}getMessages(){return O(this,null,function*(){this.ready=!1;let i=yield this.loadingCtrl.create();yield i.present();let n=yield this.api.post("/ols/s/message/getCustomerMessages",{});return i.dismiss(),n&&n.outcome=="SUCCESS"?(this.messages=n.messages||[],this.ready=!0,this.events.publish("messages:ready:base"),this.events.publish("messages:ready:header"),this.messages):null})}read(i){return O(this,null,function*(){var n;try{let s=yield this.api.post("/ols/s/message/markCustomerMessageRead",{message:i});return s&&s.outcome=="SUCCESS"&&this.messages&&this.messages.length>
3530&&((n=this.messages)==null||n.forEach((o,l,c)=>{i==o&&(c[l].read="Y")})),s}catch(s){return console.log(s),s}})}unreadCount(){return this.ready&&this.messages&&this.messages.length>0?this.messages.reduce((i,n)=>i+(n.read=="N"?1:0),0):0}hasUnread(){return this.unreadCount()>0}delete(i){return O(this,null,function*(){try{let n=yield this.api.post("/ols/s/message/markCustomerMessageDeleted",{message:i});if(n&&n.outcome=="SUCCESS")for(let s=0;s<this.messages.length;s++)this.messages[s].messageId==i.messageId&&this.messages.splice(s,1);return n}catch(n){return console.log(n),n}})}};t.\u0275fac=function(n){return new(n||t)(je(Yi),je(Zs),je(Xi))},t.\u0275prov=dt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var lV=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=Gt({type:t}),t.\u0275inj=Ut({providers:[zv,Nv],imports:[Fu,Wm,Bv.forRoot({driverOrder:["localstorage"]}),up,Wm,up]});let r=t;return r})();var fV=(()=>{let t=class t{constructor(i,n){this.modalCtrl=i,this.pageCtrl=n}share(i,n){return O(this,null,function*(){this.csvData=this.ConvertToCSV(i,["description","transactionAmount","postDate"]),console.log("csv Share initiated:",this.csvData),yield vu.writeFile({path:n+".csv",data:this.csvData,directory:Tc.Data,encoding:Gm.UTF8}).then(s=>{wc.share({url:s.uri}).then(o=>{console.log("csv Share success:",s.uri)}).catch(o=>{console.log("csv Share failed:",o)})},s=>{console.log("csv Error: ",s)})})}shareTransfer(i,n){return O(this,null,function*(){this.csvData=this.ConvertToCSV(i,["postDate","transactionType","memo","transactionAmount"]),console.log("csv ShareTransfer initiated:",this.csvData),yield vu.writeFile({path:n+".csv",data:this.csvData,directory:Tc.Data,encoding:Gm.UTF8}).then(s=>{wc.share({url:s.uri}).then(o=>{console.log("csv ShareTransfer success:",s.uri)}).catch(o=>{console.log("csv ShareTransfer failed:",o)})},s=>{console.log("csv Error: ",s)})})}downloadTransferHistory(i,n){return O(this,null,function*(){if(this.pageCtrl.platform.isApp()){console.log("csv launching share:"),this.shareTransfer(i,n);return}else{this.csvData=this.ConvertToCSV(i,["postDate","transactionType","memo","transactionAmount"]),console.log("csv data in browser",this.csvData);let s=new Blob([this.csvData],{type:"text/csv"}),o=URL.createObjectURL(s),l=document.createElement("a");l.target="_blank",l.href=o,l.download=n+".csv",document.body.appendChild(l),l.click()}})}downloadFile(i,n){return O(this,null,function*(){if(this.pageCtrl.platform.isApp()){console.log("csv launching share:"),this.share(i,n);return}else{this.csvData=this.ConvertToCSV(i,["description","transactionAmount","postDate"]),console.log("csv data in browser",this.csvData);let s=new Blob([this.csvData],{type:"text/csv"}),o=URL.createObjectURL(s),l=document.createElement("a");l.target="_blank",l.href=o,l.download=n+".csv",document.body.appendChild(l),l.click()}})}ConvertToCSV(i,n){let s=typeof i!="object"?JSON.parse(i):i,o="",l="S.No,";for(let c in i[0])l+=i[0][c]+",";l=l.slice(0,-1),o+=l+`\r
354`;for(let c=1;c<s.length;c++){let h=c+"";for(let d in n){let u=n[d];h+=","+s[c][u]}o+=h+`\r
355`}return o}};t.\u0275fac=function(n){return new(n||t)(je(Ue),je(We))},t.\u0275prov=dt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var CV=(()=>{let t=class t{constructor(i,n){this.http=i,this.events=n,this.myuser={p1:"1234",op:"Login",method:"Session"}}sendPost(i,n){console.log("myhttp url="+i+" token=",n);let s={headers:new pv({"Content-Type":"application/json"})};return this.myuser.p1=n,this.http.post(i,JSON.stringify(this.myuser),s).pipe(Cc(o=>{console.log("successful")}),Nm(this.handleError("Error occured")))}get(i){return this.http.get(i).pipe(Cc(n=>console.log("get Success")),Nm(this.handleError("Get Error")))}handleError(i="operation",n){return s=>(console.error(s),console.log(`${i} failed: ${s.message}`),this.events.publish("posterror:message",`${s.message}`),Ma(n))}};t.\u0275fac=function(n){return new(n||t)(je(fv),je(Yi))},t.\u0275prov=dt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{iw as a,zF as b,nw as c,sw as d,ow as e,rw as f,Dg as g,ki as h,Rn as i,Ae as j,Xa as k,Wv as l,YE as m,Ln as n,JE as o,Nn as p,Fn as q,JL as r,pg as s,Vx as t,xg as u,BS as v,$x as w,Hc as x,eo as y,Vc as z,bg as A,qm as B,Ic as C,Qm as D,no as E,sg as F,Mi as G,qx as H,Tg as I,tP as J,up as K,iB as 
355L,PE as M,kE as N,ME as O,DE as P,RE as Q,IM as R,gz as S,LE as T,Wz as U,Zz as V,lV as W,fV as X,CV as Y};

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.