@win2win/shared-ui 0.2.18 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { Component } from "vue";
2
2
  import { z } from "zod";
3
3
  import { LinvermediaProductCard } from "./linvermedia-product-card";
4
+ import ProductPrice from "./linvermedia-product-card/components/ProductPrice.vue";
4
5
  export declare const WidgetsIndex: IndexedWidget;
5
6
  export type IndexedWidget = Record<string, WidgetOption>;
6
7
  export interface WidgetOption {
@@ -12,6 +13,6 @@ export interface WidgetOption {
12
13
  schema?: z.ZodObject<any>;
13
14
  mock?: Record<string, any>;
14
15
  }
15
- export { LinvermediaProductCard };
16
+ export { LinvermediaProductCard, ProductPrice };
16
17
  export default WidgetsIndex;
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,sBAAsB,EAEvB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,YAAY,EASpB,aAAa,CAAC;AAEnB,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,sBAAsB,EAEvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,YAAY,MAAM,wDAAwD,CAAC;AAElF,eAAO,MAAM,YAAY,EASpB,aAAa,CAAC;AAEnB,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B;AAED,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,CAAC;AAEhD,eAAe,YAAY,CAAC"}
@@ -16245,6 +16245,7 @@ export {
16245
16245
  D5 as DynamicForm,
16246
16246
  f2 as IndicatorColor,
16247
16247
  RI as LinvermediaProductCard,
16248
+ mI as ProductPrice,
16248
16249
  D2 as SectionSpinner,
16249
16250
  $z as SectionsContainer,
16250
16251
  A2 as StateIndicator,
@@ -31,4 +31,4 @@ function print() { __p += __j.call(arguments, '') }
31
31
  `)){const wl=document.createElement("div");wl.append(al?document.createTextNode(al):document.createElement("br")),this.editorDiv.append(wl)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(el,P,cl){const sl=super.deserialize(el,P,cl);return ut(sl,R,el.fontSize),ut(sl,Y,E.Util.makeHexColor(...el.color)),ut(sl,r,el.value),sl}serialize(){if(this.isEmpty())return null;const el=_._internalPadding*this.parentScale,P=this.getRect(el,el),cl=U.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:T(this,Y));return{annotationType:E.AnnotationEditorType.FREETEXT,color:cl,fontSize:T(this,R),value:T(this,r),pageIndex:this.pageIndex,rect:P,rotation:this.rotation}}};let il=_;W=new WeakMap,G=new WeakMap,N=new WeakMap,y=new WeakMap,Y=new WeakMap,r=new WeakMap,z=new WeakMap,X=new WeakMap,R=new WeakMap,J=new WeakSet,S=function(el){const P=sl=>{this.editorDiv.style.fontSize=`calc(${sl}px * var(--scale-factor))`,this.translate(0,-(sl-T(this,R))*this.parentScale),ut(this,R,sl),nt(this,j,g).call(this)},cl=T(this,R);this.addCommands({cmd:()=>{P(el)},undo:()=>{P(cl)},mustExec:!0,type:E.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},D=new WeakSet,v=function(el){const P=T(this,Y);this.addCommands({cmd:()=>{ut(this,Y,this.editorDiv.style.color=el)},undo:()=>{ut(this,Y,this.editorDiv.style.color=P)},mustExec:!0,type:E.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},K=new WeakSet,f=function(){const el=this.editorDiv.getElementsByTagName("div");if(el.length===0)return this.editorDiv.innerText;const P=[];for(const cl of el)P.push(cl.innerText.replace(/\r\n?|\n/,""));return P.join(`
32
32
  `)},j=new WeakSet,g=function(){const[el,P]=this.parentDimensions;let cl;if(this.isAttachedToDOM)cl=this.div.getBoundingClientRect();else{const{currentLayer:sl,div:rl}=this,al=rl.style.display;rl.style.display="hidden",sl.div.append(this.div),cl=rl.getBoundingClientRect(),rl.remove(),rl.style.display=al}this.width=cl.width/el,this.height=cl.height/P},It(il,"_freeTextDefaultContent",""),It(il,"_l10nPromise"),It(il,"_internalPadding",0),It(il,"_defaultColor",null),It(il,"_defaultFontSize",10),It(il,"_keyboardManager",new C.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],_.prototype.commitOrRemove]])),It(il,"_type","freetext"),Z.FreeTextEditor=il},(s,Z,u)=>{var W,G,N,y,Y,r,z,X,R,J,S,D,v,K,f,j,g,E,C,U,_,il,el,P,cl,sl,rl,al,wl,Q,H,q,ll,B,F,tl,nl,bl,Gl,Nl,Il,Rl,ml,vl,_l,Fl,$,Zl,Wl,pl,zl,gl,Ol,El,lt,Ql,tt,ql,dt,at,Nt,kl,Al,Mt,Gt,Et,Vt,Kl,Xt,zt;Object.defineProperty(Z,"__esModule",{value:!0}),Z.InkEditor=void 0;var Lt=u(1),ht=u(140),Re=u(141);const vt=16,wt=class extends ht.AnnotationEditor{constructor(Jl){super({...Jl,name:"inkEditor"}),et(this,g),et(this,C),et(this,_),et(this,el),et(this,cl),et(this,rl),et(this,wl),et(this,H),et(this,ll),et(this,F),et(this,nl),et(this,Gl),et(this,Il),et(this,ml),et(this,_l),et(this,$),et(this,Wl),et(this,zl),et(this,Ol),et(this,tt),et(this,dt),et(this,Nt),et(this,Al),et(this,Gt),et(this,Vt),et(this,Xt),et(this,W,0),et(this,G,0),et(this,N,0),et(this,y,this.canvasContextMenu.bind(this)),et(this,Y,this.canvasPointermove.bind(this)),et(this,r,this.canvasPointerleave.bind(this)),et(this,z,this.canvasPointerup.bind(this)),et(this,X,this.canvasPointerdown.bind(this)),et(this,R,new Path2D),et(this,J,!1),et(this,S,!1),et(this,D,!1),et(this,v,null),et(this,K,0),et(this,f,0),et(this,j,null),this.color=Jl.color||null,this.thickness=Jl.thickness||null,this.opacity=Jl.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(Jl){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map(Hl=>[Hl,Jl.get(Hl)]))}static updateDefaultParams(Jl,Hl){switch(Jl){case Lt.AnnotationEditorParamsType.INK_THICKNESS:wt._defaultThickness=Hl;break;case Lt.AnnotationEditorParamsType.INK_COLOR:wt._defaultColor=Hl;break;case Lt.AnnotationEditorParamsType.INK_OPACITY:wt._defaultOpacity=Hl/100}}updateParams(Jl,Hl){switch(Jl){case Lt.AnnotationEditorParamsType.INK_THICKNESS:nt(this,g,E).call(this,Hl);break;case Lt.AnnotationEditorParamsType.INK_COLOR:nt(this,C,U).call(this,Hl);break;case Lt.AnnotationEditorParamsType.INK_OPACITY:nt(this,_,il).call(this,Hl)}}static get defaultPropertiesToUpdate(){return[[Lt.AnnotationEditorParamsType.INK_THICKNESS,wt._defaultThickness],[Lt.AnnotationEditorParamsType.INK_COLOR,wt._defaultColor||ht.AnnotationEditor._defaultLineColor],[Lt.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*wt._defaultOpacity)]]}get propertiesToUpdate(){return[[Lt.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||wt._defaultThickness],[Lt.AnnotationEditorParamsType.INK_COLOR,this.color||wt._defaultColor||ht.AnnotationEditor._defaultLineColor],[Lt.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??wt._defaultOpacity))]]}rebuild(){super.rebuild(),this.div!==null&&(this.canvas||(nt(this,_l,Fl).call(this),nt(this,$,Zl).call(this)),this.isAttachedToDOM||(this.parent.add(this),nt(this,Wl,pl).call(this)),nt(this,Vt,Kl).call(this))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,T(this,v).disconnect(),ut(this,v,null),super.remove())}setParent(Jl){!this.parent&&Jl?this._uiManager.removeShouldRescale(this):this.parent&&Jl===null&&this._uiManager.addShouldRescale(this),super.setParent(Jl)}onScaleChanging(){const[Jl,Hl]=this.parentDimensions,it=this.width*Jl,mt=this.height*Hl;this.setDimensions(it,mt)}enableEditMode(){!T(this,J)&&this.canvas!==null&&(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",T(this,X)))}disableEditMode(){this.isInEditMode()&&this.canvas!==null&&(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",T(this,X)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){T(this,J)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),ut(this,J,!0),this.div.classList.add("disabled"),nt(this,Vt,Kl).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus({preventScroll:!0}))}focusin(Jl){super.focusin(Jl),this.enableEditMode()}canvasPointerdown(Jl){Jl.button===0&&this.isInEditMode()&&!T(this,J)&&(this.setInForeground(),Jl.preventDefault(),Jl.type!=="mouse"&&this.div.focus(),nt(this,rl,al).call(this,Jl.offsetX,Jl.offsetY))}canvasContextMenu(Jl){Jl.preventDefault()}canvasPointermove(Jl){Jl.preventDefault(),nt(this,wl,Q).call(this,Jl.offsetX,Jl.offsetY)}canvasPointerup(Jl){Jl.preventDefault(),nt(this,ml,vl).call(this,Jl)}canvasPointerleave(Jl){nt(this,ml,vl).call(this,Jl)}render(){if(this.div)return this.div;let Jl,Hl;this.width&&(Jl=this.x,Hl=this.y),super.render(),wt._l10nPromise.get("editor_ink2_aria_label").then(rt=>{var xt;return(xt=this.div)===null||xt===void 0?void 0:xt.setAttribute("aria-label",rt)});const[it,mt,ct,st]=nt(this,el,P).call(this);if(this.setAt(it,mt,0,0),this.setDims(ct,st),nt(this,_l,Fl).call(this),this.width){const[rt,xt]=this.parentDimensions;this.setAt(Jl*rt,Hl*xt,this.width*rt,this.height*xt),ut(this,D,!0),nt(this,Wl,pl).call(this),this.setDims(this.width*rt,this.height*xt),nt(this,Il,Rl).call(this),nt(this,Xt,zt).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return nt(this,$,Zl).call(this),this.div}setDimensions(Jl,Hl){const it=Math.round(Jl),mt=Math.round(Hl);if(T(this,K)===it&&T(this,f)===mt)return;ut(this,K,it),ut(this,f,mt),this.canvas.style.visibility="hidden",T(this,W)&&Math.abs(T(this,W)-Jl/Hl)>.01&&(Hl=Math.ceil(Jl/T(this,W)),this.setDims(Jl,Hl));const[ct,st]=this.parentDimensions;this.width=Jl/ct,this.height=Hl/st,T(this,J)&&nt(this,zl,gl).call(this,Jl,Hl),nt(this,Wl,pl).call(this),nt(this,Il,Rl).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(Jl,Hl,it){var mt,ct;const st=super.deserialize(Jl,Hl,it);st.thickness=Jl.thickness,st.color=Lt.Util.makeHexColor(...Jl.color),st.opacity=Jl.opacity;const[rt,xt]=st.pageDimensions,Ht=st.width*rt,gt=st.height*xt,ft=st.parentScale,Ut=Jl.thickness/2;ut(st,W,Ht/gt),ut(st,J,!0),ut(st,K,Math.round(Ht)),ut(st,f,Math.round(gt));for(const{bezier:ce}of Jl.paths){const Ge=[];st.paths.push(Ge);let le=ft*(ce[0]-Ut),te=ft*(gt-ce[1]-Ut);for(let Ze=2,fe=ce.length;Ze<fe;Ze+=6){const Gc=ft*(ce[Ze]-Ut),dc=ft*(gt-ce[Ze+1]-Ut),sc=ft*(ce[Ze+2]-Ut),Cc=ft*(gt-ce[Ze+3]-Ut),Lc=ft*(ce[Ze+4]-Ut),Dl=ft*(gt-ce[Ze+5]-Ut);Ge.push([[le,te],[Gc,dc],[sc,Cc],[Lc,Dl]]),le=Lc,te=Dl}const Xe=nt(this,lt,Ql).call(this,Ge);st.bezierPath2D.push(Xe)}const Bt=nt(mt=st,Al,Mt).call(mt);return ut(st,N,Math.max(vt,Bt[2]-Bt[0])),ut(st,G,Math.max(vt,Bt[3]-Bt[1])),nt(ct=st,zl,gl).call(ct,Ht,gt),st}serialize(){if(this.isEmpty())return null;const Jl=this.getRect(0,0),Hl=this.rotation%180==0?Jl[3]-Jl[1]:Jl[2]-Jl[0],it=ht.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:Lt.AnnotationEditorType.INK,color:it,thickness:this.thickness,opacity:this.opacity,paths:nt(this,tt,ql).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,Hl),pageIndex:this.pageIndex,rect:Jl,rotation:this.rotation}}};let ie=wt;W=new WeakMap,G=new WeakMap,N=new WeakMap,y=new WeakMap,Y=new WeakMap,r=new WeakMap,z=new WeakMap,X=new WeakMap,R=new WeakMap,J=new WeakMap,S=new WeakMap,D=new WeakMap,v=new WeakMap,K=new WeakMap,f=new WeakMap,j=new WeakMap,g=new WeakSet,E=function(Jl){const Hl=this.thickness;this.addCommands({cmd:()=>{this.thickness=Jl,nt(this,Vt,Kl).call(this)},undo:()=>{this.thickness=Hl,nt(this,Vt,Kl).call(this)},mustExec:!0,type:Lt.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},C=new WeakSet,U=function(Jl){const Hl=this.color;this.addCommands({cmd:()=>{this.color=Jl,nt(this,Il,Rl).call(this)},undo:()=>{this.color=Hl,nt(this,Il,Rl).call(this)},mustExec:!0,type:Lt.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},_=new WeakSet,il=function(Jl){Jl/=100;const Hl=this.opacity;this.addCommands({cmd:()=>{this.opacity=Jl,nt(this,Il,Rl).call(this)},undo:()=>{this.opacity=Hl,nt(this,Il,Rl).call(this)},mustExec:!0,type:Lt.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},el=new WeakSet,P=function(){const{parentRotation:Jl,parentDimensions:[Hl,it]}=this;switch(Jl){case 90:return[0,it,it,Hl];case 180:return[Hl,it,Hl,it];case 270:return[Hl,0,it,Hl];default:return[0,0,Hl,it]}},cl=new WeakSet,sl=function(){const{ctx:Jl,color:Hl,opacity:it,thickness:mt,parentScale:ct,scaleFactor:st}=this;Jl.lineWidth=mt*ct/st,Jl.lineCap="round",Jl.lineJoin="round",Jl.miterLimit=10,Jl.strokeStyle=`${Hl}${(0,Re.opacityToHex)(it)}`},rl=new WeakSet,al=function(Jl,Hl){this.canvas.addEventListener("contextmenu",T(this,y)),this.canvas.addEventListener("pointerleave",T(this,r)),this.canvas.addEventListener("pointermove",T(this,Y)),this.canvas.addEventListener("pointerup",T(this,z)),this.canvas.removeEventListener("pointerdown",T(this,X)),this.isEditing=!0,T(this,D)||(ut(this,D,!0),nt(this,Wl,pl).call(this),this.thickness||(this.thickness=wt._defaultThickness),this.color||(this.color=wt._defaultColor||ht.AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=wt._defaultOpacity)),this.currentPath.push([Jl,Hl]),ut(this,S,!1),nt(this,cl,sl).call(this),ut(this,j,()=>{nt(this,F,tl).call(this),T(this,j)&&window.requestAnimationFrame(T(this,j))}),window.requestAnimationFrame(T(this,j))},wl=new WeakSet,Q=function(Jl,Hl){const[it,mt]=this.currentPath.at(-1);if(this.currentPath.length>1&&Jl===it&&Hl===mt)return;const ct=this.currentPath;let st=T(this,R);ct.push([Jl,Hl]),ut(this,S,!0),ct.length<=2?(st.moveTo(...ct[0]),st.lineTo(Jl,Hl)):(ct.length===3&&(ut(this,R,st=new Path2D),st.moveTo(...ct[0])),nt(this,nl,bl).call(this,st,...ct.at(-3),...ct.at(-2),Jl,Hl))},H=new WeakSet,q=function(){if(this.currentPath.length===0)return;const Jl=this.currentPath.at(-1);T(this,R).lineTo(...Jl)},ll=new WeakSet,B=function(Jl,Hl){ut(this,j,null),Jl=Math.min(Math.max(Jl,0),this.canvas.width),Hl=Math.min(Math.max(Hl,0),this.canvas.height),nt(this,wl,Q).call(this,Jl,Hl),nt(this,H,q).call(this);let it;if(this.currentPath.length!==1)it=nt(this,Gl,Nl).call(this);else{const st=[Jl,Hl];it=[[st,st.slice(),st.slice(),st]]}const mt=T(this,R),ct=this.currentPath;this.currentPath=[],ut(this,R,new Path2D),this.addCommands({cmd:()=>{this.allRawPaths.push(ct),this.paths.push(it),this.bezierPath2D.push(mt),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(nt(this,_l,Fl).call(this),nt(this,$,Zl).call(this)),nt(this,Vt,Kl).call(this))},mustExec:!0})},F=new WeakSet,tl=function(){if(!T(this,S))return;ut(this,S,!1),Math.ceil(this.thickness*this.parentScale);const Jl=this.currentPath.slice(-3),Hl=Jl.map(ct=>ct[0]),it=Jl.map(ct=>ct[1]),{ctx:mt}=(Math.min(...Hl),Math.max(...Hl),Math.min(...it),Math.max(...it),this);mt.save(),mt.clearRect(0,0,this.canvas.width,this.canvas.height);for(const ct of this.bezierPath2D)mt.stroke(ct);mt.stroke(T(this,R)),mt.restore()},nl=new WeakSet,bl=function(Jl,Hl,it,mt,ct,st,rt){const xt=(Hl+mt)/2,Ht=(it+ct)/2,gt=(mt+st)/2,ft=(ct+rt)/2;Jl.bezierCurveTo(xt+2*(mt-xt)/3,Ht+2*(ct-Ht)/3,gt+2*(mt-gt)/3,ft+2*(ct-ft)/3,gt,ft)},Gl=new WeakSet,Nl=function(){const Jl=this.currentPath;if(Jl.length<=2)return[[Jl[0],Jl[0],Jl.at(-1),Jl.at(-1)]];const Hl=[];let it,[mt,ct]=Jl[0];for(it=1;it<Jl.length-2;it++){const[Ut,Bt]=Jl[it],[ce,Ge]=Jl[it+1],le=(Ut+ce)/2,te=(Bt+Ge)/2,Xe=[mt+2*(Ut-mt)/3,ct+2*(Bt-ct)/3],Ze=[le+2*(Ut-le)/3,te+2*(Bt-te)/3];Hl.push([[mt,ct],Xe,Ze,[le,te]]),[mt,ct]=[le,te]}const[st,rt]=Jl[it],[xt,Ht]=Jl[it+1],gt=[mt+2*(st-mt)/3,ct+2*(rt-ct)/3],ft=[xt+2*(st-xt)/3,Ht+2*(rt-Ht)/3];return Hl.push([[mt,ct],gt,ft,[xt,Ht]]),Hl},Il=new WeakSet,Rl=function(){if(this.isEmpty()){nt(this,Ol,El).call(this);return}nt(this,cl,sl).call(this);const{canvas:Jl,ctx:Hl}=this;Hl.setTransform(1,0,0,1,0,0),Hl.clearRect(0,0,Jl.width,Jl.height),nt(this,Ol,El).call(this);for(const it of this.bezierPath2D)Hl.stroke(it)},ml=new WeakSet,vl=function(Jl){this.canvas.removeEventListener("pointerleave",T(this,r)),this.canvas.removeEventListener("pointermove",T(this,Y)),this.canvas.removeEventListener("pointerup",T(this,z)),this.canvas.addEventListener("pointerdown",T(this,X)),setTimeout(()=>{this.canvas.removeEventListener("contextmenu",T(this,y))},10),nt(this,ll,B).call(this,Jl.offsetX,Jl.offsetY),this.addToAnnotationStorage(),this.setInBackground()},_l=new WeakSet,Fl=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",wt._l10nPromise.get("editor_ink_canvas_aria_label").then(Jl=>{var Hl;return(Hl=this.canvas)===null||Hl===void 0?void 0:Hl.setAttribute("aria-label",Jl)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},$=new WeakSet,Zl=function(){ut(this,v,new ResizeObserver(Jl=>{const Hl=Jl[0].contentRect;Hl.width&&Hl.height&&this.setDimensions(Hl.width,Hl.height)})),T(this,v).observe(this.div)},Wl=new WeakSet,pl=function(){if(!T(this,D))return;const[Jl,Hl]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*Jl),this.canvas.height=Math.ceil(this.height*Hl),nt(this,Ol,El).call(this)},zl=new WeakSet,gl=function(Jl,Hl){const it=nt(this,Gt,Et).call(this),mt=(Jl-it)/T(this,N),ct=(Hl-it)/T(this,G);this.scaleFactor=Math.min(mt,ct)},Ol=new WeakSet,El=function(){const Jl=nt(this,Gt,Et).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+Jl,this.translationY*this.scaleFactor+Jl)},lt=new WeakSet,Ql=function(Jl){const Hl=new Path2D;for(let it=0,mt=Jl.length;it<mt;it++){const[ct,st,rt,xt]=Jl[it];it===0&&Hl.moveTo(...ct),Hl.bezierCurveTo(st[0],st[1],rt[0],rt[1],xt[0],xt[1])}return Hl},tt=new WeakSet,ql=function(Jl,Hl,it,mt){const ct=[],st=this.thickness/2;let rt,xt;for(const Ht of this.paths){rt=[],xt=[];for(let gt=0,ft=Ht.length;gt<ft;gt++){const[Ut,Bt,ce,Ge]=Ht[gt],le=Jl*(Ut[0]+Hl)+st,te=mt-Jl*(Ut[1]+it)-st,Xe=Jl*(Bt[0]+Hl)+st,Ze=mt-Jl*(Bt[1]+it)-st,fe=Jl*(ce[0]+Hl)+st,Gc=mt-Jl*(ce[1]+it)-st,dc=Jl*(Ge[0]+Hl)+st,sc=mt-Jl*(Ge[1]+it)-st;gt===0&&(rt.push(le,te),xt.push(le,te)),rt.push(Xe,Ze,fe,Gc,dc,sc),nt(this,dt,at).call(this,le,te,Xe,Ze,fe,Gc,dc,sc,4,xt)}ct.push({bezier:rt,points:xt})}return ct},dt=new WeakSet,at=function(Jl,Hl,it,mt,ct,st,rt,xt,Ht,gt){if(nt(this,Nt,kl).call(this,Jl,Hl,it,mt,ct,st,rt,xt))gt.push(rt,xt);else{for(let ft=1;ft<Ht-1;ft++){const Ut=ft/Ht,Bt=1-Ut;let ce=Ut*Jl+Bt*it,Ge=Ut*Hl+Bt*mt,le=Ut*it+Bt*ct,te=Ut*mt+Bt*st;ce=Ut*ce+Bt*le,Ge=Ut*Ge+Bt*te,le=Ut*le+Bt*(Ut*ct+Bt*rt),te=Ut*te+Bt*(Ut*st+Bt*xt),ce=Ut*ce+Bt*le,Ge=Ut*Ge+Bt*te,gt.push(ce,Ge)}gt.push(rt,xt)}},Nt=new WeakSet,kl=function(Jl,Hl,it,mt,ct,st,rt,xt){const Ht=(3*it-2*Jl-rt)**2,gt=(3*mt-2*Hl-xt)**2,ft=(3*ct-Jl-2*rt)**2,Ut=(3*st-Hl-2*xt)**2;return Math.max(Ht,ft)+Math.max(gt,Ut)<=10},Al=new WeakSet,Mt=function(){let Jl=1/0,Hl=-1/0,it=1/0,mt=-1/0;for(const ct of this.paths)for(const[st,rt,xt,Ht]of ct){const gt=Lt.Util.bezierBoundingBox(...st,...rt,...xt,...Ht);Jl=Math.min(Jl,gt[0]),it=Math.min(it,gt[1]),Hl=Math.max(Hl,gt[2]),mt=Math.max(mt,gt[3])}return[Jl,it,Hl,mt]},Gt=new WeakSet,Et=function(){return T(this,J)?Math.ceil(this.thickness*this.parentScale):0},Vt=new WeakSet,Kl=function(){let Jl=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(this.isEmpty())return;if(!T(this,J)){nt(this,Il,Rl).call(this);return}const Hl=nt(this,Al,Mt).call(this),it=nt(this,Gt,Et).call(this);ut(this,N,Math.max(vt,Hl[2]-Hl[0])),ut(this,G,Math.max(vt,Hl[3]-Hl[1]));const mt=Math.ceil(it+T(this,N)*this.scaleFactor),ct=Math.ceil(it+T(this,G)*this.scaleFactor),[st,rt]=this.parentDimensions;this.width=mt/st,this.height=ct/rt,ut(this,W,mt/ct),nt(this,Xt,zt).call(this);const xt=this.translationX,Ht=this.translationY;this.translationX=-Hl[0],this.translationY=-Hl[1],nt(this,Wl,pl).call(this),nt(this,Il,Rl).call(this),ut(this,K,mt),ut(this,f,ct),this.setDims(mt,ct);const gt=Jl?it/this.scaleFactor/2:0;this.translate(xt-this.translationX-gt,Ht-this.translationY-gt)},Xt=new WeakSet,zt=function(){const{style:Jl}=this.div;T(this,W)>=1?(Jl.minHeight="16px",Jl.minWidth=`${Math.round(T(this,W)*vt)}px`):(Jl.minWidth="16px",Jl.minHeight=`${Math.round(vt/T(this,W))}px`)},et(ie,lt),It(ie,"_defaultColor",null),It(ie,"_defaultOpacity",1),It(ie,"_defaultThickness",1),It(ie,"_l10nPromise"),It(ie,"_type","ink"),Z.InkEditor=ie},(s,Z,u)=>{var W,G,N,y,Y,r,z,X;Object.defineProperty(Z,"__esModule",{value:!0}),Z.AnnotationLayer=void 0;var R=u(1),J=u(142),S=u(139),D=u(166),v=u(167);const K=1e3,f=new WeakSet;function j(Fl){return{width:Fl[2]-Fl[0],height:Fl[3]-Fl[1]}}class g{static create($){switch($.data.annotationType){case R.AnnotationType.LINK:return new C($);case R.AnnotationType.TEXT:return new U($);case R.AnnotationType.WIDGET:switch($.data.fieldType){case"Tx":return new il($);case"Btn":return $.data.radioButton?new P($):$.data.checkBox?new el($):new cl($);case"Ch":return new sl($)}return new _($);case R.AnnotationType.POPUP:return new al($);case R.AnnotationType.FREETEXT:return new Q($);case R.AnnotationType.LINE:return new H($);case R.AnnotationType.SQUARE:return new q($);case R.AnnotationType.CIRCLE:return new ll($);case R.AnnotationType.POLYLINE:return new B($);case R.AnnotationType.CARET:return new tl($);case R.AnnotationType.INK:return new nl($);case R.AnnotationType.POLYGON:return new F($);case R.AnnotationType.HIGHLIGHT:return new bl($);case R.AnnotationType.UNDERLINE:return new Gl($);case R.AnnotationType.SQUIGGLY:return new Nl($);case R.AnnotationType.STRIKEOUT:return new Il($);case R.AnnotationType.STAMP:return new Rl($);case R.AnnotationType.FILEATTACHMENT:return new ml($);default:return new E($)}}}class E{constructor($){let{isRenderable:Zl=!1,ignoreBorder:Wl=!1,createQuadrilaterals:pl=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.isRenderable=Zl,this.data=$.data,this.layer=$.layer,this.page=$.page,this.viewport=$.viewport,this.linkService=$.linkService,this.downloadManager=$.downloadManager,this.imageResourcesPath=$.imageResourcesPath,this.renderForms=$.renderForms,this.svgFactory=$.svgFactory,this.annotationStorage=$.annotationStorage,this.enableScripting=$.enableScripting,this.hasJSActions=$.hasJSActions,this._fieldObjects=$.fieldObjects,Zl&&(this.container=this._createContainer(Wl)),pl&&(this.quadrilaterals=this._createQuadrilaterals(Wl))}_createContainer(){let $=arguments.length>0&&arguments[0]!==void 0&&arguments[0];const{data:Zl,page:Wl,viewport:pl}=this,zl=document.createElement("section");zl.setAttribute("data-annotation-id",Zl.id),Zl.noRotate&&zl.classList.add("norotate");const{pageWidth:gl,pageHeight:Ol,pageX:El,pageY:lt}=pl.rawDims,{width:Ql,height:tt}=j(Zl.rect),ql=R.Util.normalizeRect([Zl.rect[0],Wl.view[3]-Zl.rect[1]+Wl.view[1],Zl.rect[2],Wl.view[3]-Zl.rect[3]+Wl.view[1]]);if(!$&&Zl.borderStyle.width>0){zl.style.borderWidth=`${Zl.borderStyle.width}px`;const at=Zl.borderStyle.horizontalCornerRadius,Nt=Zl.borderStyle.verticalCornerRadius;if(at>0||Nt>0){const Al=`calc(${at}px * var(--scale-factor)) / calc(${Nt}px * var(--scale-factor))`;zl.style.borderRadius=Al}else if(this instanceof P){const Al=`calc(${Ql}px * var(--scale-factor)) / calc(${tt}px * var(--scale-factor))`;zl.style.borderRadius=Al}switch(Zl.borderStyle.style){case R.AnnotationBorderStyleType.SOLID:zl.style.borderStyle="solid";break;case R.AnnotationBorderStyleType.DASHED:zl.style.borderStyle="dashed";break;case R.AnnotationBorderStyleType.BEVELED:(0,R.warn)("Unimplemented border style: beveled");break;case R.AnnotationBorderStyleType.INSET:(0,R.warn)("Unimplemented border style: inset");break;case R.AnnotationBorderStyleType.UNDERLINE:zl.style.borderBottomStyle="solid"}const kl=Zl.borderColor||null;kl?zl.style.borderColor=R.Util.makeHexColor(0|kl[0],0|kl[1],0|kl[2]):zl.style.borderWidth=0}zl.style.left=100*(ql[0]-El)/gl+"%",zl.style.top=100*(ql[1]-lt)/Ol+"%";const{rotation:dt}=Zl;return Zl.hasOwnCanvas||dt===0?(zl.style.width=100*Ql/gl+"%",zl.style.height=100*tt/Ol+"%"):this.setRotation(dt,zl),zl}setRotation($){let Zl=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.container;const{pageWidth:Wl,pageHeight:pl}=this.viewport.rawDims,{width:zl,height:gl}=j(this.data.rect);let Ol,El;$%180==0?(Ol=100*zl/Wl,El=100*gl/pl):(Ol=100*gl/Wl,El=100*zl/pl),Zl.style.width=`${Ol}%`,Zl.style.height=`${El}%`,Zl.setAttribute("data-main-rotation",(360-$)%360)}get _commonActions(){const $=(Zl,Wl,pl)=>{const zl=pl.detail[Zl];pl.target.style[Wl]=D.ColorConverters[`${zl[0]}_HTML`](zl.slice(1))};return(0,R.shadow)(this,"_commonActions",{display:Zl=>{const Wl=Zl.detail.display%2==1;this.container.style.visibility=Wl?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:Wl,print:Zl.detail.display===0||Zl.detail.display===3})},print:Zl=>{this.annotationStorage.setValue(this.data.id,{print:Zl.detail.print})},hidden:Zl=>{this.container.style.visibility=Zl.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:Zl.detail.hidden})},focus:Zl=>{setTimeout(()=>Zl.target.focus({preventScroll:!1}),0)},userName:Zl=>{Zl.target.title=Zl.detail.userName},readonly:Zl=>{Zl.detail.readonly?Zl.target.setAttribute("readonly",""):Zl.target.removeAttribute("readonly")},required:Zl=>{this._setRequired(Zl.target,Zl.detail.required)},bgColor:Zl=>{$("bgColor","backgroundColor",Zl)},fillColor:Zl=>{$("fillColor","backgroundColor",Zl)},fgColor:Zl=>{$("fgColor","color",Zl)},textColor:Zl=>{$("textColor","color",Zl)},borderColor:Zl=>{$("borderColor","borderColor",Zl)},strokeColor:Zl=>{$("strokeColor","borderColor",Zl)},rotation:Zl=>{const Wl=Zl.detail.rotation;this.setRotation(Wl),this.annotationStorage.setValue(this.data.id,{rotation:Wl})}})}_dispatchEventFromSandbox($,Zl){const Wl=this._commonActions;for(const pl of Object.keys(Zl.detail)){const zl=$[pl]||Wl[pl];zl==null||zl(Zl)}}_setDefaultPropertiesFromJS($){if(!this.enableScripting)return;const Zl=this.annotationStorage.getRawValue(this.data.id);if(!Zl)return;const Wl=this._commonActions;for(const[pl,zl]of Object.entries(Zl)){const gl=Wl[pl];gl&&(gl({detail:{[pl]:zl},target:$}),delete Zl[pl])}}_createQuadrilaterals(){let $=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!this.data.quadPoints)return null;const Zl=[],Wl=this.data.rect;for(const pl of this.data.quadPoints)this.data.rect=[pl[2].x,pl[2].y,pl[1].x,pl[1].y],Zl.push(this._createContainer($));return this.data.rect=Wl,Zl}_createPopup($,Zl){let Wl=this.container;this.quadrilaterals&&($||($=this.quadrilaterals),Wl=this.quadrilaterals[0]),$||(($=document.createElement("div")).classList.add("popupTriggerArea"),Wl.append($));const pl=new wl({container:Wl,trigger:$,color:Zl.color,titleObj:Zl.titleObj,modificationDate:Zl.modificationDate,contentsObj:Zl.contentsObj,richText:Zl.richText,hideWrapper:!0}).render();pl.style.left="100%",Wl.append(pl)}_renderQuadrilaterals($){for(const Zl of this.quadrilaterals)Zl.classList.add($);return this.quadrilaterals}render(){(0,R.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName($){let Zl=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const Wl=[];if(this._fieldObjects){const pl=this._fieldObjects[$];if(pl)for(const{page:zl,id:gl,exportValues:Ol}of pl){if(zl===-1||gl===Zl)continue;const El=typeof Ol=="string"?Ol:null,lt=document.querySelector(`[data-element-id="${gl}"]`);!lt||f.has(lt)?Wl.push({id:gl,exportValue:El,domElement:lt}):(0,R.warn)(`_getElementsByName - element not allowed: ${gl}`)}return Wl}for(const pl of document.getElementsByName($)){const{exportValue:zl}=pl,gl=pl.getAttribute("data-element-id");gl!==Zl&&f.has(pl)&&Wl.push({id:gl,exportValue:zl,domElement:pl})}return Wl}}class C extends E{constructor($){let Zl=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;super($,{isRenderable:!0,ignoreBorder:!(Zl==null||!Zl.ignoreBorder),createQuadrilaterals:!0}),et(this,W),et(this,N),this.isTooltipOnly=$.data.isTooltipOnly}render(){const{data:$,linkService:Zl}=this,Wl=document.createElement("a");Wl.setAttribute("data-element-id",$.id);let pl=!1;return $.url?(Zl.addLinkAttributes(Wl,$.url,$.newWindow),pl=!0):$.action?(this._bindNamedAction(Wl,$.action),pl=!0):$.attachment?(this._bindAttachment(Wl,$.attachment),pl=!0):$.setOCGState?(nt(this,N,y).call(this,Wl,$.setOCGState),pl=!0):$.dest?(this._bindLink(Wl,$.dest),pl=!0):($.actions&&($.actions.Action||$.actions["Mouse Up"]||$.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(Wl,$),pl=!0),$.resetForm?(this._bindResetFormAction(Wl,$.resetForm),pl=!0):this.isTooltipOnly&&!pl&&(this._bindLink(Wl,""),pl=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((zl,gl)=>{const Ol=gl===0?Wl:Wl.cloneNode();return zl.append(Ol),zl}):(this.container.classList.add("linkAnnotation"),pl&&this.container.append(Wl),this.container)}_bindLink($,Zl){$.href=this.linkService.getDestinationHash(Zl),$.onclick=()=>(Zl&&this.linkService.goToDestination(Zl),!1),(Zl||Zl==="")&&nt(this,W,G).call(this)}_bindNamedAction($,Zl){$.href=this.linkService.getAnchorUrl(""),$.onclick=()=>(this.linkService.executeNamedAction(Zl),!1),nt(this,W,G).call(this)}_bindAttachment($,Zl){$.href=this.linkService.getAnchorUrl(""),$.onclick=()=>{var Wl;return(Wl=this.downloadManager)===null||Wl===void 0||Wl.openOrDownloadData(this.container,Zl.content,Zl.filename),!1},nt(this,W,G).call(this)}_bindJSAction($,Zl){$.href=this.linkService.getAnchorUrl("");const Wl=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const pl of Object.keys(Zl.actions)){const zl=Wl.get(pl);zl&&($[zl]=()=>{var gl;return(gl=this.linkService.eventBus)===null||gl===void 0||gl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Zl.id,name:pl}}),!1})}$.onclick||($.onclick=()=>!1),nt(this,W,G).call(this)}_bindResetFormAction($,Zl){const Wl=$.onclick;Wl||($.href=this.linkService.getAnchorUrl("")),nt(this,W,G).call(this),this._fieldObjects?$.onclick=()=>{Wl==null||Wl();const{fields:pl,refs:zl,include:gl}=Zl,Ol=[];if(pl.length!==0||zl.length!==0){const tt=new Set(zl);for(const ql of pl){const dt=this._fieldObjects[ql]||[];for(const{id:at}of dt)tt.add(at)}for(const ql of Object.values(this._fieldObjects))for(const dt of ql)tt.has(dt.id)===gl&&Ol.push(dt)}else for(const tt of Object.values(this._fieldObjects))Ol.push(...tt);const El=this.annotationStorage,lt=[];for(const tt of Ol){const{id:ql}=tt;switch(lt.push(ql),tt.type){case"text":{const at=tt.defaultValue||"";El.setValue(ql,{value:at});break}case"checkbox":case"radiobutton":{const at=tt.defaultValue===tt.exportValues;El.setValue(ql,{value:at});break}case"combobox":case"listbox":{const at=tt.defaultValue||"";El.setValue(ql,{value:at});break}default:continue}const dt=document.querySelector(`[data-element-id="${ql}"]`);dt&&(f.has(dt)?dt.dispatchEvent(new Event("resetform")):(0,R.warn)(`_bindResetFormAction - element not allowed: ${ql}`))}if(this.enableScripting){var Ql;(Ql=this.linkService.eventBus)===null||Ql===void 0||Ql.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:lt,name:"ResetForm"}})}return!1}:((0,R.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),Wl||($.onclick=()=>!1))}}W=new WeakSet,G=function(){this.container.setAttribute("data-internal-link","")},N=new WeakSet,y=function(Fl,$){Fl.href=this.linkService.getAnchorUrl(""),Fl.onclick=()=>(this.linkService.executeSetOCGState($),!1),nt(this,W,G).call(this)};class U extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str)})}render(){this.container.classList.add("textAnnotation");const $=document.createElement("img");return $.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",$.alt="[{{type}} Annotation]",$.dataset.l10nId="text_annotation_type",$.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup($,this.data),this.container.append($),this.container}}class _ extends E{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas($){if(this.data.hasOwnCanvas){var Zl;((Zl=$.previousSibling)===null||Zl===void 0?void 0:Zl.nodeName)==="CANVAS"&&($.previousSibling.hidden=!0),$.hidden=!1}}_getKeyModifier($){const{isWin:Zl,isMac:Wl}=R.FeatureTest.platform;return Zl&&$.ctrlKey||Wl&&$.metaKey}_setEventListener($,Zl,Wl,pl){Zl.includes("mouse")?$.addEventListener(Zl,zl=>{var gl;(gl=this.linkService.eventBus)===null||gl===void 0||gl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:Wl,value:pl(zl),shift:zl.shiftKey,modifier:this._getKeyModifier(zl)}})}):$.addEventListener(Zl,zl=>{var gl;(gl=this.linkService.eventBus)===null||gl===void 0||gl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:Wl,value:pl(zl)}})})}_setEventListeners($,Zl,Wl){for(const[zl,gl]of Zl){var pl;(gl==="Action"||(pl=this.data.actions)!==null&&pl!==void 0&&pl[gl])&&this._setEventListener($,zl,gl,Wl)}}_setBackgroundColor($){const Zl=this.data.backgroundColor||null;$.style.backgroundColor=Zl===null?"transparent":R.Util.makeHexColor(Zl[0],Zl[1],Zl[2])}_setTextStyle($){const Zl=["left","center","right"],{fontColor:Wl}=this.data.defaultAppearanceData,pl=this.data.defaultAppearanceData.fontSize||9,zl=$.style;let gl;const Ol=El=>Math.round(10*El)/10;if(this.data.multiLine){const El=Math.abs(this.data.rect[3]-this.data.rect[1]-2),lt=El/(Math.round(El/(R.LINE_FACTOR*pl))||1);gl=Math.min(pl,Ol(lt/R.LINE_FACTOR))}else{const El=Math.abs(this.data.rect[3]-this.data.rect[1]-2);gl=Math.min(pl,Ol(El/R.LINE_FACTOR))}zl.fontSize=`calc(${gl}px * var(--scale-factor))`,zl.color=R.Util.makeHexColor(Wl[0],Wl[1],Wl[2]),this.data.textAlignment!==null&&(zl.textAlign=Zl[this.data.textAlignment])}_setRequired($,Zl){Zl?$.setAttribute("required",!0):$.removeAttribute("required"),$.setAttribute("aria-required",Zl)}}class il extends _{constructor($){super($,{isRenderable:$.renderForms||!$.data.hasAppearance&&!!$.data.fieldValue})}setPropertyOnSiblings($,Zl,Wl,pl){const zl=this.annotationStorage;for(const gl of this._getElementsByName($.name,$.id))gl.domElement&&(gl.domElement[Zl]=Wl),zl.setValue(gl.id,{[pl]:Wl})}render(){const $=this.annotationStorage,Zl=this.data.id;this.container.classList.add("textWidgetAnnotation");let Wl=null;if(this.renderForms){var pl;const gl=$.getValue(Zl,{value:this.data.fieldValue});let Ol=gl.value||"";const El=$.getValue(Zl,{charLimit:this.data.maxLen}).charLimit;El&&Ol.length>El&&(Ol=Ol.slice(0,El));let lt=gl.formattedValue||((pl=this.data.textContent)===null||pl===void 0?void 0:pl.join(`
33
33
  `))||null;lt&&this.data.comb&&(lt=lt.replaceAll(/\s+/g,""));const Ql={userValue:Ol,formattedValue:lt,lastCommittedValue:null,commitKey:1};this.data.multiLine?(Wl=document.createElement("textarea"),Wl.textContent=lt??Ol,this.data.doNotScroll&&(Wl.style.overflowY="hidden")):(Wl=document.createElement("input"),Wl.type="text",Wl.setAttribute("value",lt??Ol),this.data.doNotScroll&&(Wl.style.overflowX="hidden")),this.data.hasOwnCanvas&&(Wl.hidden=!0),f.add(Wl),Wl.setAttribute("data-element-id",Zl),Wl.disabled=this.data.readOnly,Wl.name=this.data.fieldName,Wl.tabIndex=K,this._setRequired(Wl,this.data.required),El&&(Wl.maxLength=El),Wl.addEventListener("input",ql=>{$.setValue(Zl,{value:ql.target.value}),this.setPropertyOnSiblings(Wl,"value",ql.target.value,"value"),Ql.formattedValue=null}),Wl.addEventListener("resetform",ql=>{const dt=this.data.defaultFieldValue??"";Wl.value=Ql.userValue=dt,Ql.formattedValue=null});let tt=ql=>{const{formattedValue:dt}=Ql;dt!=null&&(ql.target.value=dt),ql.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var zl;Wl.addEventListener("focus",dt=>{const{target:at}=dt;Ql.userValue&&(at.value=Ql.userValue),Ql.lastCommittedValue=at.value,Ql.commitKey=1}),Wl.addEventListener("updatefromsandbox",dt=>{this.showElementAndHideCanvas(dt.target);const at={value(Nt){Ql.userValue=Nt.detail.value??"",$.setValue(Zl,{value:Ql.userValue.toString()}),Nt.target.value=Ql.userValue},formattedValue(Nt){const{formattedValue:kl}=Nt.detail;Ql.formattedValue=kl,kl!=null&&Nt.target!==document.activeElement&&(Nt.target.value=kl),$.setValue(Zl,{formattedValue:kl})},selRange(Nt){Nt.target.setSelectionRange(...Nt.detail.selRange)},charLimit:Nt=>{var kl;const{charLimit:Al}=Nt.detail,{target:Mt}=Nt;if(Al===0){Mt.removeAttribute("maxLength");return}Mt.setAttribute("maxLength",Al);let Gt=Ql.userValue;Gt&&!(Gt.length<=Al)&&(Gt=Gt.slice(0,Al),Mt.value=Ql.userValue=Gt,$.setValue(Zl,{value:Gt}),(kl=this.linkService.eventBus)===null||kl===void 0||kl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Zl,name:"Keystroke",value:Gt,willCommit:!0,commitKey:1,selStart:Mt.selectionStart,selEnd:Mt.selectionEnd}}))}};this._dispatchEventFromSandbox(at,dt)}),Wl.addEventListener("keydown",dt=>{var at;Ql.commitKey=1;let Nt=-1;if(dt.key==="Escape"?Nt=0:dt.key!=="Enter"||this.data.multiLine?dt.key==="Tab"&&(Ql.commitKey=3):Nt=2,Nt===-1)return;const{value:kl}=dt.target;Ql.lastCommittedValue!==kl&&(Ql.lastCommittedValue=kl,Ql.userValue=kl,(at=this.linkService.eventBus)===null||at===void 0||at.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Zl,name:"Keystroke",value:kl,willCommit:!0,commitKey:Nt,selStart:dt.target.selectionStart,selEnd:dt.target.selectionEnd}}))});const ql=tt;tt=null,Wl.addEventListener("blur",dt=>{if(!dt.relatedTarget)return;const{value:at}=dt.target;if(Ql.userValue=at,Ql.lastCommittedValue!==at){var Nt;(Nt=this.linkService.eventBus)===null||Nt===void 0||Nt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Zl,name:"Keystroke",value:at,willCommit:!0,commitKey:Ql.commitKey,selStart:dt.target.selectionStart,selEnd:dt.target.selectionEnd}})}ql(dt)}),(zl=this.data.actions)!==null&&zl!==void 0&&zl.Keystroke&&Wl.addEventListener("beforeinput",dt=>{var at;Ql.lastCommittedValue=null;const{data:Nt,target:kl}=dt,{value:Al,selectionStart:Mt,selectionEnd:Gt}=kl;let Et=Mt,Vt=Gt;switch(dt.inputType){case"deleteWordBackward":{const Kl=Al.substring(0,Mt).match(/\w*[^\w]*$/);Kl&&(Et-=Kl[0].length);break}case"deleteWordForward":{const Kl=Al.substring(Mt).match(/^[^\w]*\w*/);Kl&&(Vt+=Kl[0].length);break}case"deleteContentBackward":Mt===Gt&&(Et-=1);break;case"deleteContentForward":Mt===Gt&&(Vt+=1)}dt.preventDefault(),(at=this.linkService.eventBus)===null||at===void 0||at.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Zl,name:"Keystroke",value:Al,change:Nt||"",willCommit:!1,selStart:Et,selEnd:Vt}})}),this._setEventListeners(Wl,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],dt=>dt.target.value)}if(tt&&Wl.addEventListener("blur",tt),this.data.comb){const ql=(this.data.rect[2]-this.data.rect[0])/El;Wl.classList.add("comb"),Wl.style.letterSpacing=`calc(${ql}px * var(--scale-factor) - 1ch)`}}else Wl=document.createElement("div"),Wl.textContent=this.data.fieldValue,Wl.style.verticalAlign="middle",Wl.style.display="table-cell";return this._setTextStyle(Wl),this._setBackgroundColor(Wl),this._setDefaultPropertiesFromJS(Wl),this.container.append(Wl),this.container}}class el extends _{constructor($){super($,{isRenderable:$.renderForms})}render(){const $=this.annotationStorage,Zl=this.data,Wl=Zl.id;let pl=$.getValue(Wl,{value:Zl.exportValue===Zl.fieldValue}).value;typeof pl=="string"&&(pl=pl!=="Off",$.setValue(Wl,{value:pl})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const zl=document.createElement("input");return f.add(zl),zl.setAttribute("data-element-id",Wl),zl.disabled=Zl.readOnly,this._setRequired(zl,this.data.required),zl.type="checkbox",zl.name=Zl.fieldName,pl&&zl.setAttribute("checked",!0),zl.setAttribute("exportValue",Zl.exportValue),zl.tabIndex=K,zl.addEventListener("change",gl=>{const{name:Ol,checked:El}=gl.target;for(const lt of this._getElementsByName(Ol,Wl)){const Ql=El&&lt.exportValue===Zl.exportValue;lt.domElement&&(lt.domElement.checked=Ql),$.setValue(lt.id,{value:Ql})}$.setValue(Wl,{value:El})}),zl.addEventListener("resetform",gl=>{const Ol=Zl.defaultFieldValue||"Off";gl.target.checked=Ol===Zl.exportValue}),this.enableScripting&&this.hasJSActions&&(zl.addEventListener("updatefromsandbox",gl=>{const Ol={value(El){El.target.checked=El.detail.value!=="Off",$.setValue(Wl,{value:El.target.checked})}};this._dispatchEventFromSandbox(Ol,gl)}),this._setEventListeners(zl,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],gl=>gl.target.checked)),this._setBackgroundColor(zl),this._setDefaultPropertiesFromJS(zl),this.container.append(zl),this.container}}class P extends _{constructor($){super($,{isRenderable:$.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const $=this.annotationStorage,Zl=this.data,Wl=Zl.id;let pl=$.getValue(Wl,{value:Zl.fieldValue===Zl.buttonValue}).value;typeof pl=="string"&&(pl=pl!==Zl.buttonValue,$.setValue(Wl,{value:pl}));const zl=document.createElement("input");if(f.add(zl),zl.setAttribute("data-element-id",Wl),zl.disabled=Zl.readOnly,this._setRequired(zl,this.data.required),zl.type="radio",zl.name=Zl.fieldName,pl&&zl.setAttribute("checked",!0),zl.tabIndex=K,zl.addEventListener("change",gl=>{const{name:Ol,checked:El}=gl.target;for(const lt of this._getElementsByName(Ol,Wl))$.setValue(lt.id,{value:!1});$.setValue(Wl,{value:El})}),zl.addEventListener("resetform",gl=>{const Ol=Zl.defaultFieldValue;gl.target.checked=Ol!=null&&Ol===Zl.buttonValue}),this.enableScripting&&this.hasJSActions){const gl=Zl.buttonValue;zl.addEventListener("updatefromsandbox",Ol=>{const El={value:lt=>{const Ql=gl===lt.detail.value;for(const tt of this._getElementsByName(lt.target.name)){const ql=Ql&&tt.id===Wl;tt.domElement&&(tt.domElement.checked=ql),$.setValue(tt.id,{value:ql})}}};this._dispatchEventFromSandbox(El,Ol)}),this._setEventListeners(zl,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Ol=>Ol.target.checked)}return this._setBackgroundColor(zl),this._setDefaultPropertiesFromJS(zl),this.container.append(zl),this.container}}class cl extends C{constructor($){super($,{ignoreBorder:$.data.hasAppearance})}render(){const $=super.render();$.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&($.title=this.data.alternativeText);const Zl=$.lastChild;return this.enableScripting&&this.hasJSActions&&Zl&&(this._setDefaultPropertiesFromJS(Zl),Zl.addEventListener("updatefromsandbox",Wl=>{this._dispatchEventFromSandbox({},Wl)})),$}}class sl extends _{constructor($){super($,{isRenderable:$.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const $=this.annotationStorage,Zl=this.data.id,Wl=$.getValue(Zl,{value:this.data.fieldValue}),pl=document.createElement("select");f.add(pl),pl.setAttribute("data-element-id",Zl),pl.disabled=this.data.readOnly,this._setRequired(pl,this.data.required),pl.name=this.data.fieldName,pl.tabIndex=K;let zl=this.data.combo&&this.data.options.length>0;this.data.combo||(pl.size=this.data.options.length,this.data.multiSelect&&(pl.multiple=!0)),pl.addEventListener("resetform",Ql=>{const tt=this.data.defaultFieldValue;for(const ql of pl.options)ql.selected=ql.value===tt});for(const Ql of this.data.options){const tt=document.createElement("option");tt.textContent=Ql.displayValue,tt.value=Ql.exportValue,Wl.value.includes(Ql.exportValue)&&(tt.setAttribute("selected",!0),zl=!1),pl.append(tt)}let gl=null;if(zl){const Ql=document.createElement("option");Ql.value=" ",Ql.setAttribute("hidden",!0),Ql.setAttribute("selected",!0),pl.prepend(Ql),gl=()=>{Ql.remove(),pl.removeEventListener("input",gl),gl=null},pl.addEventListener("input",gl)}const Ol=Ql=>{const tt=Ql?"value":"textContent",{options:ql,multiple:dt}=pl;return dt?Array.prototype.filter.call(ql,at=>at.selected).map(at=>at[tt]):ql.selectedIndex===-1?null:ql[ql.selectedIndex][tt]};let El=Ol(!1);const lt=Ql=>{const tt=Ql.target.options;return Array.prototype.map.call(tt,ql=>({displayValue:ql.textContent,exportValue:ql.value}))};return this.enableScripting&&this.hasJSActions?(pl.addEventListener("updatefromsandbox",Ql=>{const tt={value(ql){var dt;(dt=gl)===null||dt===void 0||dt();const at=ql.detail.value,Nt=new Set(Array.isArray(at)?at:[at]);for(const kl of pl.options)kl.selected=Nt.has(kl.value);$.setValue(Zl,{value:Ol(!0)}),El=Ol(!1)},multipleSelection(ql){pl.multiple=!0},remove(ql){const dt=pl.options,at=ql.detail.remove;dt[at].selected=!1,pl.remove(at),dt.length>0&&Array.prototype.findIndex.call(dt,Nt=>Nt.selected)===-1&&(dt[0].selected=!0),$.setValue(Zl,{value:Ol(!0),items:lt(ql)}),El=Ol(!1)},clear(ql){for(;pl.length!==0;)pl.remove(0);$.setValue(Zl,{value:null,items:[]}),El=Ol(!1)},insert(ql){const{index:dt,displayValue:at,exportValue:Nt}=ql.detail.insert,kl=pl.children[dt],Al=document.createElement("option");Al.textContent=at,Al.value=Nt,kl?kl.before(Al):pl.append(Al),$.setValue(Zl,{value:Ol(!0),items:lt(ql)}),El=Ol(!1)},items(ql){const{items:dt}=ql.detail;for(;pl.length!==0;)pl.remove(0);for(const at of dt){const{displayValue:Nt,exportValue:kl}=at,Al=document.createElement("option");Al.textContent=Nt,Al.value=kl,pl.append(Al)}pl.options.length>0&&(pl.options[0].selected=!0),$.setValue(Zl,{value:Ol(!0),items:lt(ql)}),El=Ol(!1)},indices(ql){const dt=new Set(ql.detail.indices);for(const at of ql.target.options)at.selected=dt.has(at.index);$.setValue(Zl,{value:Ol(!0)}),El=Ol(!1)},editable(ql){ql.target.disabled=!ql.detail.editable}};this._dispatchEventFromSandbox(tt,Ql)}),pl.addEventListener("input",Ql=>{var tt;const ql=Ol(!0);$.setValue(Zl,{value:ql}),Ql.preventDefault(),(tt=this.linkService.eventBus)===null||tt===void 0||tt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Zl,name:"Keystroke",value:El,changeEx:ql,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(pl,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Ql=>Ql.target.value)):pl.addEventListener("input",function(Ql){$.setValue(Zl,{value:Ol(!0)})}),this.data.combo&&this._setTextStyle(pl),this._setBackgroundColor(pl),this._setDefaultPropertiesFromJS(pl),this.container.append(pl),this.container}}const rl=class extends E{constructor(Fl){var $,Zl,Wl;const{data:pl}=Fl;super(Fl,{isRenderable:!rl.IGNORE_TYPES.has(pl.parentType)&&!!(($=pl.titleObj)!==null&&$!==void 0&&$.str||(Zl=pl.contentsObj)!==null&&Zl!==void 0&&Zl.str||(Wl=pl.richText)!==null&&Wl!==void 0&&Wl.str)})}render(){this.container.classList.add("popupAnnotation");const Fl=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`);if(Fl.length===0)return this.container;const $=new wl({container:this.container,trigger:Array.from(Fl),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),Zl=this.page,Wl=R.Util.normalizeRect([this.data.parentRect[0],Zl.view[3]-this.data.parentRect[1]+Zl.view[1],this.data.parentRect[2],Zl.view[3]-this.data.parentRect[3]+Zl.view[1]]),pl=Wl[0]+this.data.parentRect[2]-this.data.parentRect[0],zl=Wl[1],{pageWidth:gl,pageHeight:Ol,pageX:El,pageY:lt}=this.viewport.rawDims;return this.container.style.left=100*(pl-El)/gl+"%",this.container.style.top=100*(zl-lt)/Ol+"%",this.container.append($.render()),this.container}};let al=rl;It(al,"IGNORE_TYPES",new Set(["Line","Square","Circle","PolyLine","Polygon","Ink"]));class wl{constructor($){this.container=$.container,this.trigger=$.trigger,this.color=$.color,this.titleObj=$.titleObj,this.modificationDate=$.modificationDate,this.contentsObj=$.contentsObj,this.richText=$.richText,this.hideWrapper=$.hideWrapper||!1,this.pinned=!1}render(){var $,Zl;const Wl=document.createElement("div");Wl.classList.add("popupWrapper"),this.hideElement=this.hideWrapper?Wl:this.container,this.hideElement.hidden=!0;const pl=document.createElement("div");pl.classList.add("popup");const zl=this.color;if(zl){const El=.7*(255-zl[0])+zl[0],lt=.7*(255-zl[1])+zl[1],Ql=.7*(255-zl[2])+zl[2];pl.style.backgroundColor=R.Util.makeHexColor(0|El,0|lt,0|Ql)}const gl=document.createElement("h1");gl.dir=this.titleObj.dir,gl.textContent=this.titleObj.str,pl.append(gl);const Ol=J.PDFDateString.toDateObject(this.modificationDate);if(Ol){const El=document.createElement("span");El.classList.add("popupDate"),El.textContent="{{date}}, {{time}}",El.dataset.l10nId="annotation_date_string",El.dataset.l10nArgs=JSON.stringify({date:Ol.toLocaleDateString(),time:Ol.toLocaleTimeString()}),pl.append(El)}if(($=this.richText)===null||$===void 0||!$.str||(Zl=this.contentsObj)!==null&&Zl!==void 0&&Zl.str&&this.contentsObj.str!==this.richText.str){const El=this._formatContents(this.contentsObj);pl.append(El)}else v.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:pl}),pl.lastChild.classList.add("richText","popupContent");Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const El of this.trigger)El.addEventListener("click",this._toggle.bind(this)),El.addEventListener("mouseover",this._show.bind(this,!1)),El.addEventListener("mouseout",this._hide.bind(this,!1));return pl.addEventListener("click",this._hide.bind(this,!0)),Wl.append(pl),Wl}_formatContents($){let{str:Zl,dir:Wl}=$;const pl=document.createElement("p");pl.classList.add("popupContent"),pl.dir=Wl;const zl=Zl.split(/(?:\r\n?|\n)/);for(let gl=0,Ol=zl.length;gl<Ol;++gl){const El=zl[gl];pl.append(document.createTextNode(El)),gl<Ol-1&&pl.append(document.createElement("br"))}return pl}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}_hide(){(!(arguments.length>0&&arguments[0]!==void 0)||arguments[0])&&(this.pinned=!1),!this.hideElement.hidden&&!this.pinned&&(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}class Q extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0}),this.textContent=$.data.textContent}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const $=document.createElement("div");$.classList.add("annotationTextContent"),$.setAttribute("role","comment");for(const Zl of this.textContent){const Wl=document.createElement("span");Wl.textContent=Zl,$.append(Wl)}this.container.append($)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class H extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const $=this.data,{width:Zl,height:Wl}=j($.rect),pl=this.svgFactory.create(Zl,Wl,!0),zl=this.svgFactory.createElement("svg:line");return zl.setAttribute("x1",$.rect[2]-$.lineCoordinates[0]),zl.setAttribute("y1",$.rect[3]-$.lineCoordinates[1]),zl.setAttribute("x2",$.rect[2]-$.lineCoordinates[2]),zl.setAttribute("y2",$.rect[3]-$.lineCoordinates[3]),zl.setAttribute("stroke-width",$.borderStyle.width||1),zl.setAttribute("stroke","transparent"),zl.setAttribute("fill","transparent"),pl.append(zl),this.container.append(pl),this._createPopup(zl,$),this.container}}class q extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const $=this.data,{width:Zl,height:Wl}=j($.rect),pl=this.svgFactory.create(Zl,Wl,!0),zl=$.borderStyle.width,gl=this.svgFactory.createElement("svg:rect");return gl.setAttribute("x",zl/2),gl.setAttribute("y",zl/2),gl.setAttribute("width",Zl-zl),gl.setAttribute("height",Wl-zl),gl.setAttribute("stroke-width",zl||1),gl.setAttribute("stroke","transparent"),gl.setAttribute("fill","transparent"),pl.append(gl),this.container.append(pl),this._createPopup(gl,$),this.container}}class ll extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const $=this.data,{width:Zl,height:Wl}=j($.rect),pl=this.svgFactory.create(Zl,Wl,!0),zl=$.borderStyle.width,gl=this.svgFactory.createElement("svg:ellipse");return gl.setAttribute("cx",Zl/2),gl.setAttribute("cy",Wl/2),gl.setAttribute("rx",Zl/2-zl/2),gl.setAttribute("ry",Wl/2-zl/2),gl.setAttribute("stroke-width",zl||1),gl.setAttribute("stroke","transparent"),gl.setAttribute("fill","transparent"),pl.append(gl),this.container.append(pl),this._createPopup(gl,$),this.container}}class B extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const $=this.data,{width:Zl,height:Wl}=j($.rect),pl=this.svgFactory.create(Zl,Wl,!0);let zl=[];for(const Ol of $.vertices){const El=Ol.x-$.rect[0],lt=$.rect[3]-Ol.y;zl.push(El+","+lt)}zl=zl.join(" ");const gl=this.svgFactory.createElement(this.svgElementName);return gl.setAttribute("points",zl),gl.setAttribute("stroke-width",$.borderStyle.width||1),gl.setAttribute("stroke","transparent"),gl.setAttribute("fill","transparent"),pl.append(gl),this.container.append(pl),this._createPopup(gl,$),this.container}}class F extends B{constructor($){super($),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class tl extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class nl extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const $=this.data,{width:Zl,height:Wl}=j($.rect),pl=this.svgFactory.create(Zl,Wl,!0);for(const zl of $.inkLists){let gl=[];for(const El of zl){const lt=El.x-$.rect[0],Ql=$.rect[3]-El.y;gl.push(`${lt},${Ql}`)}gl=gl.join(" ");const Ol=this.svgFactory.createElement(this.svgElementName);Ol.setAttribute("points",gl),Ol.setAttribute("stroke-width",$.borderStyle.width||1),Ol.setAttribute("stroke","transparent"),Ol.setAttribute("fill","transparent"),this._createPopup(Ol,$),pl.append(Ol)}return this.container.append(pl),this.container}}class bl extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.classList.add("highlightAnnotation"),this.container)}}class Gl extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.classList.add("underlineAnnotation"),this.container)}}class Nl extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.classList.add("squigglyAnnotation"),this.container)}}class Il extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.classList.add("strikeoutAnnotation"),this.container)}}class Rl extends E{constructor($){var Zl,Wl,pl;super($,{isRenderable:!!($.data.hasPopup||(Zl=$.data.titleObj)!==null&&Zl!==void 0&&Zl.str||(Wl=$.data.contentsObj)!==null&&Wl!==void 0&&Wl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class ml extends E{constructor($){var Zl;super($,{isRenderable:!0});const{filename:Wl,content:pl}=this.data.file;this.filename=(0,J.getFilenameFromUrl)(Wl,!0),this.content=pl,(Zl=this.linkService.eventBus)===null||Zl===void 0||Zl.dispatch("fileattachmentannotation",{source:this,filename:Wl,content:pl})}render(){var $,Zl;this.container.classList.add("fileAttachmentAnnotation");let Wl;return this.data.hasAppearance?Wl=document.createElement("div"):(Wl=document.createElement("img"),Wl.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(this.data.name)?"paperclip":"pushpin"}.svg`),Wl.classList.add("popupTriggerArea"),Wl.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(($=this.data.titleObj)!==null&&$!==void 0&&$.str||(Zl=this.data.contentsObj)!==null&&Zl!==void 0&&Zl.str||this.data.richText)&&this._createPopup(Wl,this.data),this.container.append(Wl),this.container}_download(){var $;($=this.downloadManager)===null||$===void 0||$.openOrDownloadData(this.container,this.content,this.filename)}}const vl=class{static render(Fl){var $,Zl;const{annotations:Wl,div:pl,viewport:zl,accessibilityManager:gl}=Fl;(0,J.setLayerDimensions)(pl,zl);const Ol={data:null,layer:pl,page:Fl.page,viewport:zl,linkService:Fl.linkService,downloadManager:Fl.downloadManager,imageResourcesPath:Fl.imageResourcesPath||"",renderForms:Fl.renderForms!==!1,svgFactory:new J.DOMSVGFactory,annotationStorage:Fl.annotationStorage||new S.AnnotationStorage,enableScripting:Fl.enableScripting===!0,hasJSActions:Fl.hasJSActions,fieldObjects:Fl.fieldObjects};let El=0;for(const lt of Wl){if(lt.noHTML)continue;if(lt.annotationType!==R.AnnotationType.POPUP){const{width:ql,height:dt}=j(lt.rect);if(ql<=0||dt<=0)continue}Ol.data=lt;const Ql=g.create(Ol);if(!Ql.isRenderable)continue;const tt=Ql.render();if(lt.hidden&&(tt.style.visibility="hidden"),Array.isArray(tt))for(const ql of tt)ql.style.zIndex=El++,nt($=vl,Y,r).call($,ql,lt.id,pl,gl);else tt.style.zIndex=El++,Ql instanceof al?pl.prepend(tt):nt(Zl=vl,Y,r).call(Zl,tt,lt.id,pl,gl)}nt(this,z,X).call(this,pl,Fl.annotationCanvasMap)}static update(Fl){const{annotationCanvasMap:$,div:Zl,viewport:Wl}=Fl;(0,J.setLayerDimensions)(Zl,{rotation:Wl.rotation}),nt(this,z,X).call(this,Zl,$),Zl.hidden=!1}};let _l=vl;Y=new WeakSet,r=function(Fl,$,Zl,Wl){const pl=Fl.firstChild||Fl;pl.id=`${J.AnnotationPrefix}${$}`,Zl.append(Fl),Wl==null||Wl.moveElementInDOM(Zl,Fl,pl,!1)},z=new WeakSet,X=function(Fl,$){if($){for(const[Zl,Wl]of $){const pl=Fl.querySelector(`[data-annotation-id="${Zl}"]`);if(!pl)continue;const{firstChild:zl}=pl;zl?zl.nodeName==="CANVAS"?zl.replaceWith(Wl):zl.before(Wl):pl.append(Wl)}$.clear()}},et(_l,Y),et(_l,z),Z.AnnotationLayer=_l},(s,Z)=>{Object.defineProperty(Z,"__esModule",{value:!0}),Z.ColorConverters=void 0;function u(W){return Math.floor(255*Math.max(0,Math.min(1,W))).toString(16).padStart(2,"0")}Z.ColorConverters=class{static CMYK_G(W){let[G,N,y,Y]=W;return["G",1-Math.min(1,.3*G+.59*y+.11*N+Y)]}static G_CMYK(W){let[G]=W;return["CMYK",0,0,0,1-G]}static G_RGB(W){let[G]=W;return["RGB",G,G,G]}static G_HTML(W){let[G]=W;const N=u(G);return`#${N}${N}${N}`}static RGB_G(W){let[G,N,y]=W;return["G",.3*G+.59*N+.11*y]}static RGB_HTML(W){let[G,N,y]=W;return`#${u(G)}${u(N)}${u(y)}`}static T_HTML(){return"#00000000"}static CMYK_RGB(W){let[G,N,y,Y]=W;return["RGB",1-Math.min(1,G+Y),1-Math.min(1,y+Y),1-Math.min(1,N+Y)]}static CMYK_HTML(W){const G=this.CMYK_RGB(W).slice(1);return this.RGB_HTML(G)}static RGB_CMYK(W){let[G,N,y]=W;const Y=1-G,r=1-N,z=1-y;return["CMYK",Y,r,z,Math.min(Y,r,z)]}}},(s,Z,u)=>{Object.defineProperty(Z,"__esModule",{value:!0}),Z.XfaLayer=void 0;var W=u(154);Z.XfaLayer=class{static setupStorage(G,N,y,Y,r){const z=Y.getValue(N,{value:null});switch(y.name){case"textarea":if(z.value!==null&&(G.textContent=z.value),r==="print")break;G.addEventListener("input",X=>{Y.setValue(N,{value:X.target.value})});break;case"input":if(y.attributes.type==="radio"||y.attributes.type==="checkbox"){if(z.value===y.attributes.xfaOn?G.setAttribute("checked",!0):z.value===y.attributes.xfaOff&&G.removeAttribute("checked"),r==="print")break;G.addEventListener("change",X=>{Y.setValue(N,{value:X.target.checked?X.target.getAttribute("xfaOn"):X.target.getAttribute("xfaOff")})})}else{if(z.value!==null&&G.setAttribute("value",z.value),r==="print")break;G.addEventListener("input",X=>{Y.setValue(N,{value:X.target.value})})}break;case"select":if(z.value!==null)for(const X of y.children)X.attributes.value===z.value&&(X.attributes.selected=!0);G.addEventListener("input",X=>{const R=X.target.options,J=R.selectedIndex===-1?"":R[R.selectedIndex].value;Y.setValue(N,{value:J})})}}static setAttributes(G){let{html:N,element:y,storage:Y=null,intent:r,linkService:z}=G;const{attributes:X}=y,R=N instanceof HTMLAnchorElement;X.type==="radio"&&(X.name=`${X.name}-${r}`);for(const[J,S]of Object.entries(X))if(S!=null)switch(J){case"class":S.length&&N.setAttribute(J,S.join(" "));break;case"dataId":break;case"id":N.setAttribute("data-element-id",S);break;case"style":Object.assign(N.style,S);break;case"textContent":N.textContent=S;break;default:(!R||J!=="href"&&J!=="newWindow")&&N.setAttribute(J,S)}R&&z.addLinkAttributes(N,X.href,X.newWindow),Y&&X.dataId&&this.setupStorage(N,X.dataId,y,Y)}static render(G){const N=G.annotationStorage,y=G.linkService,Y=G.xfaHtml,r=G.intent||"display",z=document.createElement(Y.name);Y.attributes&&this.setAttributes({html:z,element:Y,intent:r,linkService:y});const X=[[Y,-1,z]],R=G.div;if(R.append(z),G.viewport){const D=`matrix(${G.viewport.transform.join(",")})`;R.style.transform=D}r!=="richText"&&R.setAttribute("class","xfaLayer xfaFont");const J=[];for(;X.length>0;){var S;const[D,v,K]=X.at(-1);if(v+1===D.children.length){X.pop();continue}const f=D.children[++X.at(-1)[1]];if(f===null)continue;const{name:j}=f;if(j==="#text"){const E=document.createTextNode(f.value);J.push(E),K.append(E);continue}let g;if(g=f!=null&&(S=f.attributes)!==null&&S!==void 0&&S.xmlns?document.createElementNS(f.attributes.xmlns,j):document.createElement(j),K.append(g),f.attributes&&this.setAttributes({html:g,element:f,storage:N,intent:r,linkService:y}),f.children&&f.children.length>0)X.push([f,-1,g]);else if(f.value){const E=document.createTextNode(f.value);W.XfaText.shouldBuildText(j)&&J.push(E),g.append(E)}}for(const D of R.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))D.setAttribute("readOnly",!0);return{textDivs:J}}static update(G){const N=`matrix(${G.viewport.transform.join(",")})`;G.div.style.transform=N,G.div.hidden=!1}}},(s,Z,u)=>{Object.defineProperty(Z,"__esModule",{value:!0}),Z.SVGGraphics=void 0;var W=u(142),G=u(1),N=u(3);let y=class{constructor(){(0,G.unreachable)("Not implemented: SVGGraphics")}};Z.SVGGraphics=y;{let Y=function(C){let U=[];const _=[];for(const il of C)il.fn!=="save"?il.fn==="restore"?U=_.pop():U.push(il):(U.push({fnId:92,fn:"group",items:[]}),_.push(U),U=U.at(-1).items);return U},r=function(C){if(Number.isInteger(C))return C.toString();const U=C.toFixed(10);let _=U.length-1;if(U[_]!=="0")return U;do _--;while(U[_]==="0");return U.substring(0,U[_]==="."?_:_+1)},z=function(C){if(C[4]===0&&C[5]===0){if(C[1]===0&&C[2]===0)return C[0]===1&&C[3]===1?"":`scale(${r(C[0])} ${r(C[3])})`;if(C[0]===C[3]&&C[1]===-C[2])return`rotate(${r(180*Math.acos(C[0])/Math.PI)})`}else if(C[0]===1&&C[1]===0&&C[2]===0&&C[3]===1)return`translate(${r(C[4])} ${r(C[5])})`;return`matrix(${r(C[0])} ${r(C[1])} ${r(C[2])} ${r(C[3])} ${r(C[4])} ${r(C[5])})`};const X={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},R="http://www.w3.org/XML/1998/namespace",J="http://www.w3.org/1999/xlink",S=["butt","round","square"],D=["miter","round","bevel"],v=function(C){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(URL.createObjectURL&&typeof Blob<"u"&&!_)return URL.createObjectURL(new Blob([C],{type:U}));const il="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let el=`data:${U};base64,`;for(let P=0,cl=C.length;P<cl;P+=3){const sl=255&C[P],rl=255&C[P+1],al=255&C[P+2];el+=il[sl>>2]+il[(3&sl)<<4|rl>>4]+il[P+1<cl?(15&rl)<<2|al>>6:64]+il[P+2<cl?63&al:64]}return el},K=function(){const C=new Uint8Array([137,80,78,71,13,10,26,10]),U=new Int32Array(256);for(let P=0;P<256;P++){let cl=P;for(let sl=0;sl<8;sl++)cl=1&cl?3988292384^cl>>1&2147483647:cl>>1&2147483647;U[P]=cl}function _(P,cl,sl,rl){let al=rl;const wl=cl.length;sl[al]=wl>>24&255,sl[al+1]=wl>>16&255,sl[al+2]=wl>>8&255,sl[al+3]=255&wl,al+=4,sl[al]=255&P.charCodeAt(0),sl[al+1]=255&P.charCodeAt(1),sl[al+2]=255&P.charCodeAt(2),sl[al+3]=255&P.charCodeAt(3),al+=4,sl.set(cl,al),al+=cl.length;const Q=function(H,q,ll){let B=-1;for(let F=q;F<ll;F++){const tl=255&(B^H[F]);B=B>>>8^U[tl]}return-1^B}(sl,rl+4,al);sl[al]=Q>>24&255,sl[al+1]=Q>>16&255,sl[al+2]=Q>>8&255,sl[al+3]=255&Q}function il(P){let cl=P.length;const sl=65535,rl=Math.ceil(cl/sl),al=new Uint8Array(2+cl+5*rl+4);let wl=0;al[wl++]=120,al[wl++]=156;let Q=0;for(;cl>sl;)al[wl++]=0,al[wl++]=255,al[wl++]=255,al[wl++]=0,al[wl++]=0,al.set(P.subarray(Q,Q+sl),wl),wl+=sl,Q+=sl,cl-=sl;al[wl++]=1,al[wl++]=255&cl,al[wl++]=cl>>8&255,al[wl++]=255&~cl,al[wl++]=(65535&~cl)>>8&255,al.set(P.subarray(Q),wl),wl+=P.length-Q;const H=function(q,ll,B){let F=1,tl=0;for(let nl=ll;nl<B;++nl)F=(F+(255&q[nl]))%65521,tl=(tl+F)%65521;return tl<<16|F}(P,0,P.length);return al[wl++]=H>>24&255,al[wl++]=H>>16&255,al[wl++]=H>>8&255,al[wl++]=255&H,al}function el(P,cl,sl,rl){const al=P.width,wl=P.height;let Q,H,q;const ll=P.data;switch(cl){case G.ImageKind.GRAYSCALE_1BPP:H=0,Q=1,q=al+7>>3;break;case G.ImageKind.RGB_24BPP:H=2,Q=8,q=3*al;break;case G.ImageKind.RGBA_32BPP:H=6,Q=8,q=4*al;break;default:throw new Error("invalid format")}const B=new Uint8Array((1+q)*wl);let F=0,tl=0;for(let Rl=0;Rl<wl;++Rl)B[F++]=0,B.set(ll.subarray(tl,tl+q),F),tl+=q,F+=q;if(cl===G.ImageKind.GRAYSCALE_1BPP&&rl){F=0;for(let Rl=0;Rl<wl;Rl++){F++;for(let ml=0;ml<q;ml++)B[F++]^=255}}const nl=new Uint8Array([al>>24&255,al>>16&255,al>>8&255,255&al,wl>>24&255,wl>>16&255,wl>>8&255,255&wl,Q,H,0,0,0]),bl=function(Rl){if(!N.isNodeJS)return il(Rl);try{let ml;ml=parseInt(process.versions.node)>=8?Rl:Buffer.from(Rl);const vl=require$$6.deflateSync(ml,{level:9});return vl instanceof Uint8Array?vl:new Uint8Array(vl)}catch(ml){(0,G.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+ml)}return il(Rl)}(B),Gl=C.length+36+nl.length+bl.length,Nl=new Uint8Array(Gl);let Il=0;return Nl.set(C,Il),Il+=C.length,_("IHDR",nl,Nl,Il),Il+=12+nl.length,_("IDATA",bl,Nl,Il),Il+=12+bl.length,_("IEND",new Uint8Array(0),Nl,Il),v(Nl,"image/png",sl)}return function(P,cl,sl){return el(P,P.kind===void 0?G.ImageKind.GRAYSCALE_1BPP:P.kind,cl,sl)}}();class f{constructor(){this.fontSizeScale=1,this.fontWeight=X.fontWeight,this.fontSize=0,this.textMatrix=G.IDENTITY_MATRIX,this.fontMatrix=G.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=G.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=X.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(U,_){this.x=U,this.y=_}}let j=0,g=0,E=0;Z.SVGGraphics=y=class{constructor(C,U){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2];(0,W.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new W.DOMSVGFactory,this.current=new f,this.transformMatrix=G.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=C,this.objs=U,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!_,this._operatorIdMapping=[];for(const il in G.OPS)this._operatorIdMapping[G.OPS[il]]=il}getObject(C){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return typeof C=="string"?C.startsWith("g_")?this.commonObjs.get(C):this.objs.get(C):U}save(){this.transformStack.push(this.transformMatrix);const C=this.current;this.extraStack.push(C),this.current=C.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(C){this.save(),this.executeOpTree(C),this.restore()}loadDependencies(C){const U=C.fnArray,_=C.argsArray;for(let il=0,el=U.length;il<el;il++)if(U[il]===G.OPS.dependency)for(const P of _[il]){const cl=P.startsWith("g_")?this.commonObjs:this.objs,sl=new Promise(rl=>{cl.get(P,rl)});this.current.dependencies.push(sl)}return Promise.all(this.current.dependencies)}transform(C,U,_,il,el,P){const cl=[C,U,_,il,el,P];this.transformMatrix=G.Util.transform(this.transformMatrix,cl),this.tgrp=null}getSVG(C,U){this.viewport=U;const _=this._initialize(U);return this.loadDependencies(C).then(()=>(this.transformMatrix=G.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(C)),_))}convertOpList(C){const U=this._operatorIdMapping,_=C.argsArray,il=C.fnArray,el=[];for(let P=0,cl=il.length;P<cl;P++){const sl=il[P];el.push({fnId:sl,fn:U[sl],args:_[P]})}return Y(el)}executeOpTree(C){for(const U of C){const _=U.fn,il=U.fnId,el=U.args;switch(0|il){case G.OPS.beginText:this.beginText();break;case G.OPS.dependency:break;case G.OPS.setLeading:this.setLeading(el);break;case G.OPS.setLeadingMoveText:this.setLeadingMoveText(el[0],el[1]);break;case G.OPS.setFont:this.setFont(el);break;case G.OPS.showText:case G.OPS.showSpacedText:this.showText(el[0]);break;case G.OPS.endText:this.endText();break;case G.OPS.moveText:this.moveText(el[0],el[1]);break;case G.OPS.setCharSpacing:this.setCharSpacing(el[0]);break;case G.OPS.setWordSpacing:this.setWordSpacing(el[0]);break;case G.OPS.setHScale:this.setHScale(el[0]);break;case G.OPS.setTextMatrix:this.setTextMatrix(el[0],el[1],el[2],el[3],el[4],el[5]);break;case G.OPS.setTextRise:this.setTextRise(el[0]);break;case G.OPS.setTextRenderingMode:this.setTextRenderingMode(el[0]);break;case G.OPS.setLineWidth:this.setLineWidth(el[0]);break;case G.OPS.setLineJoin:this.setLineJoin(el[0]);break;case G.OPS.setLineCap:this.setLineCap(el[0]);break;case G.OPS.setMiterLimit:this.setMiterLimit(el[0]);break;case G.OPS.setFillRGBColor:this.setFillRGBColor(el[0],el[1],el[2]);break;case G.OPS.setStrokeRGBColor:this.setStrokeRGBColor(el[0],el[1],el[2]);break;case G.OPS.setStrokeColorN:this.setStrokeColorN(el);break;case G.OPS.setFillColorN:this.setFillColorN(el);break;case G.OPS.shadingFill:this.shadingFill(el[0]);break;case G.OPS.setDash:this.setDash(el[0],el[1]);break;case G.OPS.setRenderingIntent:this.setRenderingIntent(el[0]);break;case G.OPS.setFlatness:this.setFlatness(el[0]);break;case G.OPS.setGState:this.setGState(el[0]);break;case G.OPS.fill:this.fill();break;case G.OPS.eoFill:this.eoFill();break;case G.OPS.stroke:this.stroke();break;case G.OPS.fillStroke:this.fillStroke();break;case G.OPS.eoFillStroke:this.eoFillStroke();break;case G.OPS.clip:this.clip("nonzero");break;case G.OPS.eoClip:this.clip("evenodd");break;case G.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case G.OPS.paintImageXObject:this.paintImageXObject(el[0]);break;case G.OPS.paintInlineImageXObject:this.paintInlineImageXObject(el[0]);break;case G.OPS.paintImageMaskXObject:this.paintImageMaskXObject(el[0]);break;case G.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(el[0],el[1]);break;case G.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case G.OPS.closePath:this.closePath();break;case G.OPS.closeStroke:this.closeStroke();break;case G.OPS.closeFillStroke:this.closeFillStroke();break;case G.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case G.OPS.nextLine:this.nextLine();break;case G.OPS.transform:this.transform(el[0],el[1],el[2],el[3],el[4],el[5]);break;case G.OPS.constructPath:this.constructPath(el[0],el[1]);break;case G.OPS.endPath:this.endPath();break;case 92:this.group(U.items);break;default:(0,G.warn)(`Unimplemented operator ${_}`)}}}setWordSpacing(C){this.current.wordSpacing=C}setCharSpacing(C){this.current.charSpacing=C}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(C,U,_,il,el,P){const cl=this.current;cl.textMatrix=cl.lineMatrix=[C,U,_,il,el,P],cl.textMatrixScale=Math.hypot(C,U),cl.x=cl.lineX=0,cl.y=cl.lineY=0,cl.xcoords=[],cl.ycoords=[],cl.tspan=this.svgFactory.createElement("svg:tspan"),cl.tspan.setAttributeNS(null,"font-family",cl.fontFamily),cl.tspan.setAttributeNS(null,"font-size",`${r(cl.fontSize)}px`),cl.tspan.setAttributeNS(null,"y",r(-cl.y)),cl.txtElement=this.svgFactory.createElement("svg:text"),cl.txtElement.append(cl.tspan)}beginText(){const C=this.current;C.x=C.lineX=0,C.y=C.lineY=0,C.textMatrix=G.IDENTITY_MATRIX,C.lineMatrix=G.IDENTITY_MATRIX,C.textMatrixScale=1,C.tspan=this.svgFactory.createElement("svg:tspan"),C.txtElement=this.svgFactory.createElement("svg:text"),C.txtgrp=this.svgFactory.createElement("svg:g"),C.xcoords=[],C.ycoords=[]}moveText(C,U){const _=this.current;_.x=_.lineX+=C,_.y=_.lineY+=U,_.xcoords=[],_.ycoords=[],_.tspan=this.svgFactory.createElement("svg:tspan"),_.tspan.setAttributeNS(null,"font-family",_.fontFamily),_.tspan.setAttributeNS(null,"font-size",`${r(_.fontSize)}px`),_.tspan.setAttributeNS(null,"y",r(-_.y))}showText(C){const U=this.current,_=U.font,il=U.fontSize;if(il===0)return;const el=U.fontSizeScale,P=U.charSpacing,cl=U.wordSpacing,sl=U.fontDirection,rl=U.textHScale*sl,al=_.vertical,wl=al?1:-1,Q=_.defaultVMetrics,H=il*U.fontMatrix[0];let q=0;for(const F of C){if(F===null){q+=sl*cl;continue}if(typeof F=="number"){q+=wl*F*il/1e3;continue}const tl=(F.isSpace?cl:0)+P,nl=F.fontChar;let bl,Gl,Nl,Il=F.width;if(al){let Rl;const ml=F.vmetric||Q;Rl=F.vmetric?ml[1]:.5*Il,Rl=-Rl*H;const vl=ml[2]*H;Il=ml?-ml[0]:Il,bl=Rl/el,Gl=(q+vl)/el}else bl=q/el,Gl=0;(F.isInFont||_.missingFile)&&(U.xcoords.push(U.x+bl),al&&U.ycoords.push(-U.y+Gl),U.tspan.textContent+=nl),Nl=al?Il*H-tl*sl:Il*H+tl*sl,q+=Nl}U.tspan.setAttributeNS(null,"x",U.xcoords.map(r).join(" ")),al?U.tspan.setAttributeNS(null,"y",U.ycoords.map(r).join(" ")):U.tspan.setAttributeNS(null,"y",r(-U.y)),al?U.y-=q:U.x+=q*rl,U.tspan.setAttributeNS(null,"font-family",U.fontFamily),U.tspan.setAttributeNS(null,"font-size",`${r(U.fontSize)}px`),U.fontStyle!==X.fontStyle&&U.tspan.setAttributeNS(null,"font-style",U.fontStyle),U.fontWeight!==X.fontWeight&&U.tspan.setAttributeNS(null,"font-weight",U.fontWeight);const ll=U.textRenderingMode&G.TextRenderingMode.FILL_STROKE_MASK;if(ll===G.TextRenderingMode.FILL||ll===G.TextRenderingMode.FILL_STROKE?(U.fillColor!==X.fillColor&&U.tspan.setAttributeNS(null,"fill",U.fillColor),U.fillAlpha<1&&U.tspan.setAttributeNS(null,"fill-opacity",U.fillAlpha)):U.textRenderingMode===G.TextRenderingMode.ADD_TO_PATH?U.tspan.setAttributeNS(null,"fill","transparent"):U.tspan.setAttributeNS(null,"fill","none"),ll===G.TextRenderingMode.STROKE||ll===G.TextRenderingMode.FILL_STROKE){const F=1/(U.textMatrixScale||1);this._setStrokeAttributes(U.tspan,F)}let B=U.textMatrix;U.textRise!==0&&(B=B.slice(),B[5]+=U.textRise),U.txtElement.setAttributeNS(null,"transform",`${z(B)} scale(${r(rl)}, -1)`),U.txtElement.setAttributeNS(R,"xml:space","preserve"),U.txtElement.append(U.tspan),U.txtgrp.append(U.txtElement),this._ensureTransformGroup().append(U.txtElement)}setLeadingMoveText(C,U){this.setLeading(-U),this.moveText(C,U)}addFontStyle(C){if(!C.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const U=v(C.data,C.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${C.loadedName}"; src: url(${U}); }
34
- `}setFont(C){const U=this.current,_=this.commonObjs.get(C[0]);let il=C[1];U.font=_,this.embedFonts&&!_.missingFile&&!this.embeddedFonts[_.loadedName]&&(this.addFontStyle(_),this.embeddedFonts[_.loadedName]=_),U.fontMatrix=_.fontMatrix||G.FONT_IDENTITY_MATRIX;let el="normal";_.black?el="900":_.bold&&(el="bold");const P=_.italic?"italic":"normal";il<0?(il=-il,U.fontDirection=-1):U.fontDirection=1,U.fontSize=il,U.fontFamily=_.loadedName,U.fontWeight=el,U.fontStyle=P,U.tspan=this.svgFactory.createElement("svg:tspan"),U.tspan.setAttributeNS(null,"y",r(-U.y)),U.xcoords=[],U.ycoords=[]}endText(){var C;const U=this.current;U.textRenderingMode&G.TextRenderingMode.ADD_TO_PATH_FLAG&&(C=U.txtElement)!==null&&C!==void 0&&C.hasChildNodes()&&(U.element=U.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(C){C>0&&(this.current.lineWidth=C)}setLineCap(C){this.current.lineCap=S[C]}setLineJoin(C){this.current.lineJoin=D[C]}setMiterLimit(C){this.current.miterLimit=C}setStrokeAlpha(C){this.current.strokeAlpha=C}setStrokeRGBColor(C,U,_){this.current.strokeColor=G.Util.makeHexColor(C,U,_)}setFillAlpha(C){this.current.fillAlpha=C}setFillRGBColor(C,U,_){this.current.fillColor=G.Util.makeHexColor(C,U,_),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(C){this.current.strokeColor=this._makeColorN_Pattern(C)}setFillColorN(C){this.current.fillColor=this._makeColorN_Pattern(C)}shadingFill(C){const U=this.viewport.width,_=this.viewport.height,il=G.Util.inverseTransform(this.transformMatrix),el=G.Util.applyTransform([0,0],il),P=G.Util.applyTransform([0,_],il),cl=G.Util.applyTransform([U,0],il),sl=G.Util.applyTransform([U,_],il),rl=Math.min(el[0],P[0],cl[0],sl[0]),al=Math.min(el[1],P[1],cl[1],sl[1]),wl=Math.max(el[0],P[0],cl[0],sl[0]),Q=Math.max(el[1],P[1],cl[1],sl[1]),H=this.svgFactory.createElement("svg:rect");H.setAttributeNS(null,"x",rl),H.setAttributeNS(null,"y",al),H.setAttributeNS(null,"width",wl-rl),H.setAttributeNS(null,"height",Q-al),H.setAttributeNS(null,"fill",this._makeShadingPattern(C)),this.current.fillAlpha<1&&H.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(H)}_makeColorN_Pattern(C){return C[0]==="TilingPattern"?this._makeTilingPattern(C):this._makeShadingPattern(C)}_makeTilingPattern(C){const U=C[1],_=C[2],il=C[3]||G.IDENTITY_MATRIX,[el,P,cl,sl]=C[4],rl=C[5],al=C[6],wl=C[7],Q="shading"+E++,[H,q,ll,B]=G.Util.normalizeRect([...G.Util.applyTransform([el,P],il),...G.Util.applyTransform([cl,sl],il)]),[F,tl]=G.Util.singularValueDecompose2dScale(il),nl=rl*F,bl=al*tl,Gl=this.svgFactory.createElement("svg:pattern");Gl.setAttributeNS(null,"id",Q),Gl.setAttributeNS(null,"patternUnits","userSpaceOnUse"),Gl.setAttributeNS(null,"width",nl),Gl.setAttributeNS(null,"height",bl),Gl.setAttributeNS(null,"x",`${H}`),Gl.setAttributeNS(null,"y",`${q}`);const Nl=this.svg,Il=this.transformMatrix,Rl=this.current.fillColor,ml=this.current.strokeColor,vl=this.svgFactory.create(ll-H,B-q);if(this.svg=vl,this.transformMatrix=il,wl===2){const _l=G.Util.makeHexColor(...U);this.current.fillColor=_l,this.current.strokeColor=_l}return this.executeOpTree(this.convertOpList(_)),this.svg=Nl,this.transformMatrix=Il,this.current.fillColor=Rl,this.current.strokeColor=ml,Gl.append(vl.childNodes[0]),this.defs.append(Gl),`url(#${Q})`}_makeShadingPattern(C){switch(typeof C=="string"&&(C=this.objs.get(C)),C[0]){case"RadialAxial":const U="shading"+E++,_=C[3];let il;switch(C[1]){case"axial":const el=C[4],P=C[5];il=this.svgFactory.createElement("svg:linearGradient"),il.setAttributeNS(null,"id",U),il.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),il.setAttributeNS(null,"x1",el[0]),il.setAttributeNS(null,"y1",el[1]),il.setAttributeNS(null,"x2",P[0]),il.setAttributeNS(null,"y2",P[1]);break;case"radial":const cl=C[4],sl=C[5],rl=C[6],al=C[7];il=this.svgFactory.createElement("svg:radialGradient"),il.setAttributeNS(null,"id",U),il.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),il.setAttributeNS(null,"cx",sl[0]),il.setAttributeNS(null,"cy",sl[1]),il.setAttributeNS(null,"r",al),il.setAttributeNS(null,"fx",cl[0]),il.setAttributeNS(null,"fy",cl[1]),il.setAttributeNS(null,"fr",rl);break;default:throw new Error(`Unknown RadialAxial type: ${C[1]}`)}for(const el of _){const P=this.svgFactory.createElement("svg:stop");P.setAttributeNS(null,"offset",el[0]),P.setAttributeNS(null,"stop-color",el[1]),il.append(P)}return this.defs.append(il),`url(#${U})`;case"Mesh":return(0,G.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${C[0]}`)}}setDash(C,U){this.current.dashArray=C,this.current.dashPhase=U}constructPath(C,U){const _=this.current;let il=_.x,el=_.y,P=[],cl=0;for(const sl of C)switch(0|sl){case G.OPS.rectangle:il=U[cl++],el=U[cl++];const rl=il+U[cl++],al=el+U[cl++];P.push("M",r(il),r(el),"L",r(rl),r(el),"L",r(rl),r(al),"L",r(il),r(al),"Z");break;case G.OPS.moveTo:il=U[cl++],el=U[cl++],P.push("M",r(il),r(el));break;case G.OPS.lineTo:il=U[cl++],el=U[cl++],P.push("L",r(il),r(el));break;case G.OPS.curveTo:il=U[cl+4],el=U[cl+5],P.push("C",r(U[cl]),r(U[cl+1]),r(U[cl+2]),r(U[cl+3]),r(il),r(el)),cl+=6;break;case G.OPS.curveTo2:P.push("C",r(il),r(el),r(U[cl]),r(U[cl+1]),r(U[cl+2]),r(U[cl+3])),il=U[cl+2],el=U[cl+3],cl+=4;break;case G.OPS.curveTo3:il=U[cl+2],el=U[cl+3],P.push("C",r(U[cl]),r(U[cl+1]),r(il),r(el),r(il),r(el)),cl+=4;break;case G.OPS.closePath:P.push("Z")}P=P.join(" "),_.path&&C.length>0&&C[0]!==G.OPS.rectangle&&C[0]!==G.OPS.moveTo?P=_.path.getAttributeNS(null,"d")+P:(_.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(_.path)),_.path.setAttributeNS(null,"d",P),_.path.setAttributeNS(null,"fill","none"),_.element=_.path,_.setCurrentPoint(il,el)}endPath(){const C=this.current;if(C.path=null,!this.pendingClip)return;if(!C.element){this.pendingClip=null;return}const U="clippath"+j++,_=this.svgFactory.createElement("svg:clipPath");_.setAttributeNS(null,"id",U),_.setAttributeNS(null,"transform",z(this.transformMatrix));const il=C.element.cloneNode(!0);if(this.pendingClip==="evenodd"?il.setAttributeNS(null,"clip-rule","evenodd"):il.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,_.append(il),this.defs.append(_),C.activeClipUrl){C.clipGroup=null;for(const el of this.extraStack)el.clipGroup=null;_.setAttributeNS(null,"clip-path",C.activeClipUrl)}C.activeClipUrl=`url(#${U})`,this.tgrp=null}clip(C){this.pendingClip=C}closePath(){const C=this.current;if(C.path){const U=`${C.path.getAttributeNS(null,"d")}Z`;C.path.setAttributeNS(null,"d",U)}}setLeading(C){this.current.leading=-C}setTextRise(C){this.current.textRise=C}setTextRenderingMode(C){this.current.textRenderingMode=C}setHScale(C){this.current.textHScale=C/100}setRenderingIntent(C){}setFlatness(C){}setGState(C){for(const[U,_]of C)switch(U){case"LW":this.setLineWidth(_);break;case"LC":this.setLineCap(_);break;case"LJ":this.setLineJoin(_);break;case"ML":this.setMiterLimit(_);break;case"D":this.setDash(_[0],_[1]);break;case"RI":this.setRenderingIntent(_);break;case"FL":this.setFlatness(_);break;case"Font":this.setFont(_);break;case"CA":this.setStrokeAlpha(_);break;case"ca":this.setFillAlpha(_);break;default:(0,G.warn)(`Unimplemented graphic state operator ${U}`)}}fill(){const C=this.current;C.element&&(C.element.setAttributeNS(null,"fill",C.fillColor),C.element.setAttributeNS(null,"fill-opacity",C.fillAlpha),this.endPath())}stroke(){const C=this.current;C.element&&(this._setStrokeAttributes(C.element),C.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(C){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const _=this.current;let il=_.dashArray;U!==1&&il.length>0&&(il=il.map(function(el){return U*el})),C.setAttributeNS(null,"stroke",_.strokeColor),C.setAttributeNS(null,"stroke-opacity",_.strokeAlpha),C.setAttributeNS(null,"stroke-miterlimit",r(_.miterLimit)),C.setAttributeNS(null,"stroke-linecap",_.lineCap),C.setAttributeNS(null,"stroke-linejoin",_.lineJoin),C.setAttributeNS(null,"stroke-width",r(U*_.lineWidth)+"px"),C.setAttributeNS(null,"stroke-dasharray",il.map(r).join(" ")),C.setAttributeNS(null,"stroke-dashoffset",r(U*_.dashPhase)+"px")}eoFill(){var C;(C=this.current.element)===null||C===void 0||C.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var C;(C=this.current.element)===null||C===void 0||C.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const C=this.svgFactory.createElement("svg:rect");C.setAttributeNS(null,"x","0"),C.setAttributeNS(null,"y","0"),C.setAttributeNS(null,"width","1px"),C.setAttributeNS(null,"height","1px"),C.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(C)}paintImageXObject(C){const U=this.getObject(C);U?this.paintInlineImageXObject(U):(0,G.warn)(`Dependent image with object ID ${C} is not ready yet`)}paintInlineImageXObject(C,U){const _=C.width,il=C.height,el=K(C,this.forceDataSchema,!!U),P=this.svgFactory.createElement("svg:rect");P.setAttributeNS(null,"x","0"),P.setAttributeNS(null,"y","0"),P.setAttributeNS(null,"width",r(_)),P.setAttributeNS(null,"height",r(il)),this.current.element=P,this.clip("nonzero");const cl=this.svgFactory.createElement("svg:image");cl.setAttributeNS(J,"xlink:href",el),cl.setAttributeNS(null,"x","0"),cl.setAttributeNS(null,"y",r(-il)),cl.setAttributeNS(null,"width",r(_)+"px"),cl.setAttributeNS(null,"height",r(il)+"px"),cl.setAttributeNS(null,"transform",`scale(${r(1/_)} ${r(-1/il)})`),U?U.append(cl):this._ensureTransformGroup().append(cl)}paintImageMaskXObject(C){const U=this.getObject(C.data,C);if(U.bitmap){(0,G.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const _=this.current,il=U.width,el=U.height,P=_.fillColor;_.maskId="mask"+g++;const cl=this.svgFactory.createElement("svg:mask");cl.setAttributeNS(null,"id",_.maskId);const sl=this.svgFactory.createElement("svg:rect");sl.setAttributeNS(null,"x","0"),sl.setAttributeNS(null,"y","0"),sl.setAttributeNS(null,"width",r(il)),sl.setAttributeNS(null,"height",r(el)),sl.setAttributeNS(null,"fill",P),sl.setAttributeNS(null,"mask",`url(#${_.maskId})`),this.defs.append(cl),this._ensureTransformGroup().append(sl),this.paintInlineImageXObject(U,cl)}paintFormXObjectBegin(C,U){if(Array.isArray(C)&&C.length===6&&this.transform(C[0],C[1],C[2],C[3],C[4],C[5]),U){const _=U[2]-U[0],il=U[3]-U[1],el=this.svgFactory.createElement("svg:rect");el.setAttributeNS(null,"x",U[0]),el.setAttributeNS(null,"y",U[1]),el.setAttributeNS(null,"width",r(_)),el.setAttributeNS(null,"height",r(il)),this.current.element=el,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(C){const U=this.svgFactory.create(C.width,C.height),_=this.svgFactory.createElement("svg:defs");U.append(_),this.defs=_;const il=this.svgFactory.createElement("svg:g");return il.setAttributeNS(null,"transform",z(C.transform)),U.append(il),this.svg=il,U}_ensureClipGroup(){if(!this.current.clipGroup){const C=this.svgFactory.createElement("svg:g");C.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(C),this.current.clipGroup=C}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",z(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}}],__webpack_module_cache__={};function __w_pdfjs_require__(s){var Z=__webpack_module_cache__[s];if(Z!==void 0)return Z.exports;var u=__webpack_module_cache__[s]={exports:{}};return __webpack_modules__[s].call(u.exports,u,u.exports,__w_pdfjs_require__),u.exports}var __webpack_exports__={};return(()=>{var s=__webpack_exports__;Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"AbortException",{enumerable:!0,get:function(){return Z.AbortException}}),Object.defineProperty(s,"AnnotationEditorLayer",{enumerable:!0,get:function(){return N.AnnotationEditorLayer}}),Object.defineProperty(s,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return Z.AnnotationEditorParamsType}}),Object.defineProperty(s,"AnnotationEditorType",{enumerable:!0,get:function(){return Z.AnnotationEditorType}}),Object.defineProperty(s,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return y.AnnotationEditorUIManager}}),Object.defineProperty(s,"AnnotationLayer",{enumerable:!0,get:function(){return Y.AnnotationLayer}}),Object.defineProperty(s,"AnnotationMode",{enumerable:!0,get:function(){return Z.AnnotationMode}}),Object.defineProperty(s,"CMapCompressionType",{enumerable:!0,get:function(){return Z.CMapCompressionType}}),Object.defineProperty(s,"FeatureTest",{enumerable:!0,get:function(){return Z.FeatureTest}}),Object.defineProperty(s,"GlobalWorkerOptions",{enumerable:!0,get:function(){return r.GlobalWorkerOptions}}),Object.defineProperty(s,"InvalidPDFException",{enumerable:!0,get:function(){return Z.InvalidPDFException}}),Object.defineProperty(s,"MissingPDFException",{enumerable:!0,get:function(){return Z.MissingPDFException}}),Object.defineProperty(s,"OPS",{enumerable:!0,get:function(){return Z.OPS}}),Object.defineProperty(s,"PDFDataRangeTransport",{enumerable:!0,get:function(){return u.PDFDataRangeTransport}}),Object.defineProperty(s,"PDFDateString",{enumerable:!0,get:function(){return W.PDFDateString}}),Object.defineProperty(s,"PDFWorker",{enumerable:!0,get:function(){return u.PDFWorker}}),Object.defineProperty(s,"PasswordResponses",{enumerable:!0,get:function(){return Z.PasswordResponses}}),Object.defineProperty(s,"PermissionFlag",{enumerable:!0,get:function(){return Z.PermissionFlag}}),Object.defineProperty(s,"PixelsPerInch",{enumerable:!0,get:function(){return W.PixelsPerInch}}),Object.defineProperty(s,"PromiseCapability",{enumerable:!0,get:function(){return Z.PromiseCapability}}),Object.defineProperty(s,"RenderingCancelledException",{enumerable:!0,get:function(){return W.RenderingCancelledException}}),Object.defineProperty(s,"SVGGraphics",{enumerable:!0,get:function(){return z.SVGGraphics}}),Object.defineProperty(s,"UnexpectedResponseException",{enumerable:!0,get:function(){return Z.UnexpectedResponseException}}),Object.defineProperty(s,"Util",{enumerable:!0,get:function(){return Z.Util}}),Object.defineProperty(s,"VerbosityLevel",{enumerable:!0,get:function(){return Z.VerbosityLevel}}),Object.defineProperty(s,"XfaLayer",{enumerable:!0,get:function(){return X.XfaLayer}}),Object.defineProperty(s,"build",{enumerable:!0,get:function(){return u.build}}),Object.defineProperty(s,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return Z.createValidAbsoluteUrl}}),Object.defineProperty(s,"getDocument",{enumerable:!0,get:function(){return u.getDocument}}),Object.defineProperty(s,"getFilenameFromUrl",{enumerable:!0,get:function(){return W.getFilenameFromUrl}}),Object.defineProperty(s,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return W.getPdfFilenameFromUrl}}),Object.defineProperty(s,"getXfaPageViewport",{enumerable:!0,get:function(){return W.getXfaPageViewport}}),Object.defineProperty(s,"isDataScheme",{enumerable:!0,get:function(){return W.isDataScheme}}),Object.defineProperty(s,"isPdfFile",{enumerable:!0,get:function(){return W.isPdfFile}}),Object.defineProperty(s,"loadScript",{enumerable:!0,get:function(){return W.loadScript}}),Object.defineProperty(s,"normalizeUnicode",{enumerable:!0,get:function(){return Z.normalizeUnicode}}),Object.defineProperty(s,"renderTextLayer",{enumerable:!0,get:function(){return G.renderTextLayer}}),Object.defineProperty(s,"setLayerDimensions",{enumerable:!0,get:function(){return W.setLayerDimensions}}),Object.defineProperty(s,"shadow",{enumerable:!0,get:function(){return Z.shadow}}),Object.defineProperty(s,"updateTextLayer",{enumerable:!0,get:function(){return G.updateTextLayer}}),Object.defineProperty(s,"version",{enumerable:!0,get:function(){return u.version}});var Z=__w_pdfjs_require__(1),u=__w_pdfjs_require__(138),W=__w_pdfjs_require__(142),G=__w_pdfjs_require__(161),N=__w_pdfjs_require__(162),y=__w_pdfjs_require__(141),Y=__w_pdfjs_require__(165),r=__w_pdfjs_require__(149),z=__w_pdfjs_require__(168),X=__w_pdfjs_require__(167)})(),__webpack_exports__})())})(pdf_min$2);var pdf_minExports=pdf_min$2.exports;const pdf_min=getDefaultExportFromCjs(pdf_minExports),pdf_min$1=Object.freeze(Object.defineProperty({__proto__:null,default:pdf_min},Symbol.toStringTag,{value:"Module"})),pdf_minF72cfa08=Object.freeze(Object.defineProperty({__proto__:null,p:pdf_min$1},Symbol.toStringTag,{value:"Module"}));exports.Card=Card$1,exports.DynamicCarousel=_sfc_main$z,exports.DynamicForm=_sfc_main$g,exports.IndicatorColor=IndicatorColor$1,exports.LinvermediaProductCard=LinvermediaProductCard,exports.SectionSpinner=SectionSpinner,exports.SectionsContainer=SectionsContainer,exports.StateIndicator=StateIndicator,exports.TestUi=_sfc_main$f,exports.WidgetsIndex=WidgetsIndex,exports.default=W2WSharedUi,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
34
+ `}setFont(C){const U=this.current,_=this.commonObjs.get(C[0]);let il=C[1];U.font=_,this.embedFonts&&!_.missingFile&&!this.embeddedFonts[_.loadedName]&&(this.addFontStyle(_),this.embeddedFonts[_.loadedName]=_),U.fontMatrix=_.fontMatrix||G.FONT_IDENTITY_MATRIX;let el="normal";_.black?el="900":_.bold&&(el="bold");const P=_.italic?"italic":"normal";il<0?(il=-il,U.fontDirection=-1):U.fontDirection=1,U.fontSize=il,U.fontFamily=_.loadedName,U.fontWeight=el,U.fontStyle=P,U.tspan=this.svgFactory.createElement("svg:tspan"),U.tspan.setAttributeNS(null,"y",r(-U.y)),U.xcoords=[],U.ycoords=[]}endText(){var C;const U=this.current;U.textRenderingMode&G.TextRenderingMode.ADD_TO_PATH_FLAG&&(C=U.txtElement)!==null&&C!==void 0&&C.hasChildNodes()&&(U.element=U.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(C){C>0&&(this.current.lineWidth=C)}setLineCap(C){this.current.lineCap=S[C]}setLineJoin(C){this.current.lineJoin=D[C]}setMiterLimit(C){this.current.miterLimit=C}setStrokeAlpha(C){this.current.strokeAlpha=C}setStrokeRGBColor(C,U,_){this.current.strokeColor=G.Util.makeHexColor(C,U,_)}setFillAlpha(C){this.current.fillAlpha=C}setFillRGBColor(C,U,_){this.current.fillColor=G.Util.makeHexColor(C,U,_),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(C){this.current.strokeColor=this._makeColorN_Pattern(C)}setFillColorN(C){this.current.fillColor=this._makeColorN_Pattern(C)}shadingFill(C){const U=this.viewport.width,_=this.viewport.height,il=G.Util.inverseTransform(this.transformMatrix),el=G.Util.applyTransform([0,0],il),P=G.Util.applyTransform([0,_],il),cl=G.Util.applyTransform([U,0],il),sl=G.Util.applyTransform([U,_],il),rl=Math.min(el[0],P[0],cl[0],sl[0]),al=Math.min(el[1],P[1],cl[1],sl[1]),wl=Math.max(el[0],P[0],cl[0],sl[0]),Q=Math.max(el[1],P[1],cl[1],sl[1]),H=this.svgFactory.createElement("svg:rect");H.setAttributeNS(null,"x",rl),H.setAttributeNS(null,"y",al),H.setAttributeNS(null,"width",wl-rl),H.setAttributeNS(null,"height",Q-al),H.setAttributeNS(null,"fill",this._makeShadingPattern(C)),this.current.fillAlpha<1&&H.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(H)}_makeColorN_Pattern(C){return C[0]==="TilingPattern"?this._makeTilingPattern(C):this._makeShadingPattern(C)}_makeTilingPattern(C){const U=C[1],_=C[2],il=C[3]||G.IDENTITY_MATRIX,[el,P,cl,sl]=C[4],rl=C[5],al=C[6],wl=C[7],Q="shading"+E++,[H,q,ll,B]=G.Util.normalizeRect([...G.Util.applyTransform([el,P],il),...G.Util.applyTransform([cl,sl],il)]),[F,tl]=G.Util.singularValueDecompose2dScale(il),nl=rl*F,bl=al*tl,Gl=this.svgFactory.createElement("svg:pattern");Gl.setAttributeNS(null,"id",Q),Gl.setAttributeNS(null,"patternUnits","userSpaceOnUse"),Gl.setAttributeNS(null,"width",nl),Gl.setAttributeNS(null,"height",bl),Gl.setAttributeNS(null,"x",`${H}`),Gl.setAttributeNS(null,"y",`${q}`);const Nl=this.svg,Il=this.transformMatrix,Rl=this.current.fillColor,ml=this.current.strokeColor,vl=this.svgFactory.create(ll-H,B-q);if(this.svg=vl,this.transformMatrix=il,wl===2){const _l=G.Util.makeHexColor(...U);this.current.fillColor=_l,this.current.strokeColor=_l}return this.executeOpTree(this.convertOpList(_)),this.svg=Nl,this.transformMatrix=Il,this.current.fillColor=Rl,this.current.strokeColor=ml,Gl.append(vl.childNodes[0]),this.defs.append(Gl),`url(#${Q})`}_makeShadingPattern(C){switch(typeof C=="string"&&(C=this.objs.get(C)),C[0]){case"RadialAxial":const U="shading"+E++,_=C[3];let il;switch(C[1]){case"axial":const el=C[4],P=C[5];il=this.svgFactory.createElement("svg:linearGradient"),il.setAttributeNS(null,"id",U),il.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),il.setAttributeNS(null,"x1",el[0]),il.setAttributeNS(null,"y1",el[1]),il.setAttributeNS(null,"x2",P[0]),il.setAttributeNS(null,"y2",P[1]);break;case"radial":const cl=C[4],sl=C[5],rl=C[6],al=C[7];il=this.svgFactory.createElement("svg:radialGradient"),il.setAttributeNS(null,"id",U),il.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),il.setAttributeNS(null,"cx",sl[0]),il.setAttributeNS(null,"cy",sl[1]),il.setAttributeNS(null,"r",al),il.setAttributeNS(null,"fx",cl[0]),il.setAttributeNS(null,"fy",cl[1]),il.setAttributeNS(null,"fr",rl);break;default:throw new Error(`Unknown RadialAxial type: ${C[1]}`)}for(const el of _){const P=this.svgFactory.createElement("svg:stop");P.setAttributeNS(null,"offset",el[0]),P.setAttributeNS(null,"stop-color",el[1]),il.append(P)}return this.defs.append(il),`url(#${U})`;case"Mesh":return(0,G.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${C[0]}`)}}setDash(C,U){this.current.dashArray=C,this.current.dashPhase=U}constructPath(C,U){const _=this.current;let il=_.x,el=_.y,P=[],cl=0;for(const sl of C)switch(0|sl){case G.OPS.rectangle:il=U[cl++],el=U[cl++];const rl=il+U[cl++],al=el+U[cl++];P.push("M",r(il),r(el),"L",r(rl),r(el),"L",r(rl),r(al),"L",r(il),r(al),"Z");break;case G.OPS.moveTo:il=U[cl++],el=U[cl++],P.push("M",r(il),r(el));break;case G.OPS.lineTo:il=U[cl++],el=U[cl++],P.push("L",r(il),r(el));break;case G.OPS.curveTo:il=U[cl+4],el=U[cl+5],P.push("C",r(U[cl]),r(U[cl+1]),r(U[cl+2]),r(U[cl+3]),r(il),r(el)),cl+=6;break;case G.OPS.curveTo2:P.push("C",r(il),r(el),r(U[cl]),r(U[cl+1]),r(U[cl+2]),r(U[cl+3])),il=U[cl+2],el=U[cl+3],cl+=4;break;case G.OPS.curveTo3:il=U[cl+2],el=U[cl+3],P.push("C",r(U[cl]),r(U[cl+1]),r(il),r(el),r(il),r(el)),cl+=4;break;case G.OPS.closePath:P.push("Z")}P=P.join(" "),_.path&&C.length>0&&C[0]!==G.OPS.rectangle&&C[0]!==G.OPS.moveTo?P=_.path.getAttributeNS(null,"d")+P:(_.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(_.path)),_.path.setAttributeNS(null,"d",P),_.path.setAttributeNS(null,"fill","none"),_.element=_.path,_.setCurrentPoint(il,el)}endPath(){const C=this.current;if(C.path=null,!this.pendingClip)return;if(!C.element){this.pendingClip=null;return}const U="clippath"+j++,_=this.svgFactory.createElement("svg:clipPath");_.setAttributeNS(null,"id",U),_.setAttributeNS(null,"transform",z(this.transformMatrix));const il=C.element.cloneNode(!0);if(this.pendingClip==="evenodd"?il.setAttributeNS(null,"clip-rule","evenodd"):il.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,_.append(il),this.defs.append(_),C.activeClipUrl){C.clipGroup=null;for(const el of this.extraStack)el.clipGroup=null;_.setAttributeNS(null,"clip-path",C.activeClipUrl)}C.activeClipUrl=`url(#${U})`,this.tgrp=null}clip(C){this.pendingClip=C}closePath(){const C=this.current;if(C.path){const U=`${C.path.getAttributeNS(null,"d")}Z`;C.path.setAttributeNS(null,"d",U)}}setLeading(C){this.current.leading=-C}setTextRise(C){this.current.textRise=C}setTextRenderingMode(C){this.current.textRenderingMode=C}setHScale(C){this.current.textHScale=C/100}setRenderingIntent(C){}setFlatness(C){}setGState(C){for(const[U,_]of C)switch(U){case"LW":this.setLineWidth(_);break;case"LC":this.setLineCap(_);break;case"LJ":this.setLineJoin(_);break;case"ML":this.setMiterLimit(_);break;case"D":this.setDash(_[0],_[1]);break;case"RI":this.setRenderingIntent(_);break;case"FL":this.setFlatness(_);break;case"Font":this.setFont(_);break;case"CA":this.setStrokeAlpha(_);break;case"ca":this.setFillAlpha(_);break;default:(0,G.warn)(`Unimplemented graphic state operator ${U}`)}}fill(){const C=this.current;C.element&&(C.element.setAttributeNS(null,"fill",C.fillColor),C.element.setAttributeNS(null,"fill-opacity",C.fillAlpha),this.endPath())}stroke(){const C=this.current;C.element&&(this._setStrokeAttributes(C.element),C.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(C){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const _=this.current;let il=_.dashArray;U!==1&&il.length>0&&(il=il.map(function(el){return U*el})),C.setAttributeNS(null,"stroke",_.strokeColor),C.setAttributeNS(null,"stroke-opacity",_.strokeAlpha),C.setAttributeNS(null,"stroke-miterlimit",r(_.miterLimit)),C.setAttributeNS(null,"stroke-linecap",_.lineCap),C.setAttributeNS(null,"stroke-linejoin",_.lineJoin),C.setAttributeNS(null,"stroke-width",r(U*_.lineWidth)+"px"),C.setAttributeNS(null,"stroke-dasharray",il.map(r).join(" ")),C.setAttributeNS(null,"stroke-dashoffset",r(U*_.dashPhase)+"px")}eoFill(){var C;(C=this.current.element)===null||C===void 0||C.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var C;(C=this.current.element)===null||C===void 0||C.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const C=this.svgFactory.createElement("svg:rect");C.setAttributeNS(null,"x","0"),C.setAttributeNS(null,"y","0"),C.setAttributeNS(null,"width","1px"),C.setAttributeNS(null,"height","1px"),C.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(C)}paintImageXObject(C){const U=this.getObject(C);U?this.paintInlineImageXObject(U):(0,G.warn)(`Dependent image with object ID ${C} is not ready yet`)}paintInlineImageXObject(C,U){const _=C.width,il=C.height,el=K(C,this.forceDataSchema,!!U),P=this.svgFactory.createElement("svg:rect");P.setAttributeNS(null,"x","0"),P.setAttributeNS(null,"y","0"),P.setAttributeNS(null,"width",r(_)),P.setAttributeNS(null,"height",r(il)),this.current.element=P,this.clip("nonzero");const cl=this.svgFactory.createElement("svg:image");cl.setAttributeNS(J,"xlink:href",el),cl.setAttributeNS(null,"x","0"),cl.setAttributeNS(null,"y",r(-il)),cl.setAttributeNS(null,"width",r(_)+"px"),cl.setAttributeNS(null,"height",r(il)+"px"),cl.setAttributeNS(null,"transform",`scale(${r(1/_)} ${r(-1/il)})`),U?U.append(cl):this._ensureTransformGroup().append(cl)}paintImageMaskXObject(C){const U=this.getObject(C.data,C);if(U.bitmap){(0,G.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const _=this.current,il=U.width,el=U.height,P=_.fillColor;_.maskId="mask"+g++;const cl=this.svgFactory.createElement("svg:mask");cl.setAttributeNS(null,"id",_.maskId);const sl=this.svgFactory.createElement("svg:rect");sl.setAttributeNS(null,"x","0"),sl.setAttributeNS(null,"y","0"),sl.setAttributeNS(null,"width",r(il)),sl.setAttributeNS(null,"height",r(el)),sl.setAttributeNS(null,"fill",P),sl.setAttributeNS(null,"mask",`url(#${_.maskId})`),this.defs.append(cl),this._ensureTransformGroup().append(sl),this.paintInlineImageXObject(U,cl)}paintFormXObjectBegin(C,U){if(Array.isArray(C)&&C.length===6&&this.transform(C[0],C[1],C[2],C[3],C[4],C[5]),U){const _=U[2]-U[0],il=U[3]-U[1],el=this.svgFactory.createElement("svg:rect");el.setAttributeNS(null,"x",U[0]),el.setAttributeNS(null,"y",U[1]),el.setAttributeNS(null,"width",r(_)),el.setAttributeNS(null,"height",r(il)),this.current.element=el,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(C){const U=this.svgFactory.create(C.width,C.height),_=this.svgFactory.createElement("svg:defs");U.append(_),this.defs=_;const il=this.svgFactory.createElement("svg:g");return il.setAttributeNS(null,"transform",z(C.transform)),U.append(il),this.svg=il,U}_ensureClipGroup(){if(!this.current.clipGroup){const C=this.svgFactory.createElement("svg:g");C.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(C),this.current.clipGroup=C}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",z(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}}],__webpack_module_cache__={};function __w_pdfjs_require__(s){var Z=__webpack_module_cache__[s];if(Z!==void 0)return Z.exports;var u=__webpack_module_cache__[s]={exports:{}};return __webpack_modules__[s].call(u.exports,u,u.exports,__w_pdfjs_require__),u.exports}var __webpack_exports__={};return(()=>{var s=__webpack_exports__;Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"AbortException",{enumerable:!0,get:function(){return Z.AbortException}}),Object.defineProperty(s,"AnnotationEditorLayer",{enumerable:!0,get:function(){return N.AnnotationEditorLayer}}),Object.defineProperty(s,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return Z.AnnotationEditorParamsType}}),Object.defineProperty(s,"AnnotationEditorType",{enumerable:!0,get:function(){return Z.AnnotationEditorType}}),Object.defineProperty(s,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return y.AnnotationEditorUIManager}}),Object.defineProperty(s,"AnnotationLayer",{enumerable:!0,get:function(){return Y.AnnotationLayer}}),Object.defineProperty(s,"AnnotationMode",{enumerable:!0,get:function(){return Z.AnnotationMode}}),Object.defineProperty(s,"CMapCompressionType",{enumerable:!0,get:function(){return Z.CMapCompressionType}}),Object.defineProperty(s,"FeatureTest",{enumerable:!0,get:function(){return Z.FeatureTest}}),Object.defineProperty(s,"GlobalWorkerOptions",{enumerable:!0,get:function(){return r.GlobalWorkerOptions}}),Object.defineProperty(s,"InvalidPDFException",{enumerable:!0,get:function(){return Z.InvalidPDFException}}),Object.defineProperty(s,"MissingPDFException",{enumerable:!0,get:function(){return Z.MissingPDFException}}),Object.defineProperty(s,"OPS",{enumerable:!0,get:function(){return Z.OPS}}),Object.defineProperty(s,"PDFDataRangeTransport",{enumerable:!0,get:function(){return u.PDFDataRangeTransport}}),Object.defineProperty(s,"PDFDateString",{enumerable:!0,get:function(){return W.PDFDateString}}),Object.defineProperty(s,"PDFWorker",{enumerable:!0,get:function(){return u.PDFWorker}}),Object.defineProperty(s,"PasswordResponses",{enumerable:!0,get:function(){return Z.PasswordResponses}}),Object.defineProperty(s,"PermissionFlag",{enumerable:!0,get:function(){return Z.PermissionFlag}}),Object.defineProperty(s,"PixelsPerInch",{enumerable:!0,get:function(){return W.PixelsPerInch}}),Object.defineProperty(s,"PromiseCapability",{enumerable:!0,get:function(){return Z.PromiseCapability}}),Object.defineProperty(s,"RenderingCancelledException",{enumerable:!0,get:function(){return W.RenderingCancelledException}}),Object.defineProperty(s,"SVGGraphics",{enumerable:!0,get:function(){return z.SVGGraphics}}),Object.defineProperty(s,"UnexpectedResponseException",{enumerable:!0,get:function(){return Z.UnexpectedResponseException}}),Object.defineProperty(s,"Util",{enumerable:!0,get:function(){return Z.Util}}),Object.defineProperty(s,"VerbosityLevel",{enumerable:!0,get:function(){return Z.VerbosityLevel}}),Object.defineProperty(s,"XfaLayer",{enumerable:!0,get:function(){return X.XfaLayer}}),Object.defineProperty(s,"build",{enumerable:!0,get:function(){return u.build}}),Object.defineProperty(s,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return Z.createValidAbsoluteUrl}}),Object.defineProperty(s,"getDocument",{enumerable:!0,get:function(){return u.getDocument}}),Object.defineProperty(s,"getFilenameFromUrl",{enumerable:!0,get:function(){return W.getFilenameFromUrl}}),Object.defineProperty(s,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return W.getPdfFilenameFromUrl}}),Object.defineProperty(s,"getXfaPageViewport",{enumerable:!0,get:function(){return W.getXfaPageViewport}}),Object.defineProperty(s,"isDataScheme",{enumerable:!0,get:function(){return W.isDataScheme}}),Object.defineProperty(s,"isPdfFile",{enumerable:!0,get:function(){return W.isPdfFile}}),Object.defineProperty(s,"loadScript",{enumerable:!0,get:function(){return W.loadScript}}),Object.defineProperty(s,"normalizeUnicode",{enumerable:!0,get:function(){return Z.normalizeUnicode}}),Object.defineProperty(s,"renderTextLayer",{enumerable:!0,get:function(){return G.renderTextLayer}}),Object.defineProperty(s,"setLayerDimensions",{enumerable:!0,get:function(){return W.setLayerDimensions}}),Object.defineProperty(s,"shadow",{enumerable:!0,get:function(){return Z.shadow}}),Object.defineProperty(s,"updateTextLayer",{enumerable:!0,get:function(){return G.updateTextLayer}}),Object.defineProperty(s,"version",{enumerable:!0,get:function(){return u.version}});var Z=__w_pdfjs_require__(1),u=__w_pdfjs_require__(138),W=__w_pdfjs_require__(142),G=__w_pdfjs_require__(161),N=__w_pdfjs_require__(162),y=__w_pdfjs_require__(141),Y=__w_pdfjs_require__(165),r=__w_pdfjs_require__(149),z=__w_pdfjs_require__(168),X=__w_pdfjs_require__(167)})(),__webpack_exports__})())})(pdf_min$2);var pdf_minExports=pdf_min$2.exports;const pdf_min=getDefaultExportFromCjs(pdf_minExports),pdf_min$1=Object.freeze(Object.defineProperty({__proto__:null,default:pdf_min},Symbol.toStringTag,{value:"Module"})),pdf_minF72cfa08=Object.freeze(Object.defineProperty({__proto__:null,p:pdf_min$1},Symbol.toStringTag,{value:"Module"}));exports.Card=Card$1,exports.DynamicCarousel=_sfc_main$z,exports.DynamicForm=_sfc_main$g,exports.IndicatorColor=IndicatorColor$1,exports.LinvermediaProductCard=LinvermediaProductCard,exports.ProductPrice=ProductPrice,exports.SectionSpinner=SectionSpinner,exports.SectionsContainer=SectionsContainer,exports.StateIndicator=StateIndicator,exports.TestUi=_sfc_main$f,exports.WidgetsIndex=WidgetsIndex,exports.default=W2WSharedUi,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@win2win/shared-ui",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [