import{d as MA,c as q,o as O,a as sA,b as j,m as qo,u as Is,e as Al,f as el,r as X,g as C,w as v,h as p,E as YA,i as Y,j as cA,k as Ps,l as Ce,n as ze,p as hA,q as oA,t as WA,s as tl,_ as Ke,v as Gs,x as nr,y as jt,z as wa,F as Be,A as me,B as vn,C as rl,D as Ca,G as Qa,H as ut,I as fA,J as ma,K as Ua,L as Xs,M as Wr,N as Fn,O as d,P as Hs,Q as xs,R as Ft,S as Tt,T as jn,U as va,V as nl,W as Qe,X as gr,Y as Se,Z as an,$ as sl,a0 as zr,a1 as tA,a2 as rt,a3 as $n,a4 as il,a5 as al,a6 as ol,a7 as ll,a8 as fr,a9 as cl,aa as ul,ab as Bl,ac as dr,ad as Fa,ae as ie,af as qn,ag as Js,ah as Nt,ai as ya,aj as ot,ak as Ea,al as ba,am as As,an as gl,ao as fl,ap as dl,aq as hl,ar as pl,as as LA,at as Ia,au as Ys,av as lt,aw as $t,ax as wl,ay as Cl,az as Ws,aA as Ql,aB as Ss,aC as zs,aD as Ha,aE as xa,aF as ml,aG as Zs,aH as js,aI as Ul,aJ as $s,aK as vl,aL as Fl,aM as Sa,aN as Ta,aO as yl,aP as El}from"./index-9847718b.js";import{_ as bl,a as Il,g as Nr,u as es}from"./index-fd059ba6.js";const Hl={"aria-hidden":"true"},xl=["xlink:href"],JA=MA({__name:"index",props:{name:{type:String,required:!0},props:{type:Object,default:()=>{}}},setup(r){const A=r,t=q(()=>`#mt-edit-${A.name}`);return(e,n)=>(O(),sA("svg",Hl,[j("use",qo({"xlink:href":t.value},A.props),null,16,xl)]))}}),Sl={class:"flex justify-between",style:{width:"100%"}},Tl={class:"flex items-center justify-between w-50px"},Ll={class:"flex justify-between",style:{width:"calc(100% - 20px)"}},Dl={class:"flex items-center"},Kl={class:"flex justify-center items-center"},_l={class:"flex items-center mr-20px"},Ml={class:"flex items-center justify-between w-90px"},Ol={class:"flex items-center"},Vl=MA({__name:"index",props:{leftAside:{type:Boolean,default:!0},rightAside:{type:Boolean,default:!0},selectedItemsId:{default:()=>[]},groupEnabled:{type:Boolean},unGroupEnabled:{type:Boolean},alignEnabled:{type:Boolean},deleteEnabled:{type:Boolean},lockState:{type:Boolean},undoEnabled:{type:Boolean},redoEnabled:{type:Boolean},realTimeData:{},useThumbnail:{type:Boolean,default:!1}},emits:["update:leftAside","update:rightAside","onGroupClick","onUngroupClick","onDeleteClick","onExportClick","onTreeClick","alignSelected","update:lockState","onHelpClick","onRedoClick","onUndoClick","onImportClick","onPreviewClick","onReturnClick","onSaveClick","onDrawLineClick","onThumbnailClick","onRightDrawer","onImageDialog"],setup(r,{emit:A}){const t=r,e=A,n=Is({selector:"#mt-edit"});Al(),el(n);const s=X(!1),i=X(!1),a=()=>{e("onDeleteClick")},o=()=>{e("onExportClick")},l=()=>{e("onTreeClick")},c=()=>{e("update:lockState",!t.lockState)},u=()=>{e("onImportClick")},B=()=>{s.value=!s.value,e("onDrawLineClick",s.value)};return(f,g)=>(O(),sA("div",Sl,[j("div",Tl,[C(p(cA),{text:"",circle:"",size:"small",onClick:g[0]||(g[0]=h=>e("update:leftAside",!t.leftAside))},{default:v(()=>[C(p(YA),{size:20},{default:v(()=>[t.leftAside?(O(),Y(JA,{key:0,name:"menu-fold"})):(O(),Y(JA,{key:1,name:"menu-unfold"}))]),_:1})]),_:1})]),j("div",Ll,[j("div",Dl,[C(p(Ps),null,{default:v(()=>[C(p(cA),{text:"",circle:"",size:"small",disabled:!t.undoEnabled,onClick:g[1]||(g[1]=h=>e("onUndoClick"))},{default:v(()=>[C(p(YA),{title:"撤销 Ctrl+Z",size:20},{default:v(()=>[C(JA,{name:"undo"})]),_:1})]),_:1},8,["disabled"]),C(p(cA),{text:"",circle:"",size:"small",disabled:!t.redoEnabled,onClick:g[2]||(g[2]=h=>e("onRedoClick"))},{default:v(()=>[C(p(YA),{title:"重做 Ctrl+Y",size:20},{default:v(()=>[C(JA,{name:"redo"})]),_:1})]),_:1},8,["disabled"])]),_:1}),C(p(Ce),{direction:"vertical"}),C(p(cA),{text:"",circle:"",size:"small",disabled:!t.deleteEnabled,onClick:a},{default:v(()=>[C(p(YA),{title:"删除 delete",class:ze(""),size:20},{default:v(()=>[C(JA,{name:"delete"})]),_:1})]),_:1},8,["disabled"]),C(p(Ce),{direction:"vertical"}),C(p(cA),{text:"",circle:"",size:"small",onClick:l},{default:v(()=>[C(p(YA),{title:"组件树",size:20},{default:v(()=>[C(JA,{name:"tree-list"})]),_:1})]),_:1}),C(p(Ce),{direction:"vertical"}),C(p(Ps),null,{default:v(()=>[C(p(cA),{text:"",circle:"",size:"small",onClick:u},{default:v(()=>[C(p(YA),{title:"导入数据模型",size:20},{default:v(()=>[C(JA,{name:"import-json"})]),_:1})]),_:1}),C(p(cA),{text:"",circle:"",size:"small",onClick:o},{default:v(()=>[C(p(YA),{title:"导出数据模型",size:20},{default:v(()=>[C(JA,{name:"export-json"})]),_:1})]),_:1})]),_:1}),i.value?hA("",!0):(O(),Y(p(Ce),{key:0,direction:"vertical"})),i.value?hA("",!0):(O(),Y(p(cA),{key:1,text:"",circle:"",size:"small",onClick:B},{default:v(()=>[C(p(YA),{title:"连线编辑模式",size:20,class:ze(s.value?"icon-selected":"")},{default:v(()=>[C(JA,{name:"pen-line"})]),_:1},8,["class"])]),_:1}))]),j("div",Kl,[t.realTimeData.show?(O(),Y(p(tl),{key:0,size:"small"},{default:v(()=>[oA(WA(t.realTimeData.text),1)]),_:1})):hA("",!0)]),j("div",_l,[C(p(cA),{type:"primary",onClick:g[3]||(g[3]=h=>e("onImageDialog"))},{default:v(()=>[...g[9]||(g[9]=[oA(" 图片模型 ",-1)])]),_:1}),C(p(cA),{type:"primary",onClick:g[4]||(g[4]=h=>e("onRightDrawer"))},{default:v(()=>[...g[10]||(g[10]=[oA(" 模型文件 ",-1)])]),_:1}),C(p(Ce),{direction:"vertical"}),C(p(cA),{text:"",circle:"",size:"small",onClick:g[5]||(g[5]=h=>e("onSaveClick"))},{default:v(()=>[C(p(YA),{title:"保存",size:20},{default:v(()=>[C(JA,{name:"save"})]),_:1})]),_:1}),t.useThumbnail?(O(),Y(p(Ce),{key:0,direction:"vertical"})):hA("",!0),t.useThumbnail?(O(),Y(p(cA),{key:1,text:"",circle:"",size:"small",onClick:g[6]||(g[6]=h=>e("onThumbnailClick"))},{default:v(()=>[C(p(YA),{title:"生成缩略图",size:20},{default:v(()=>[C(JA,{name:"thumbnail"})]),_:1})]),_:1})):hA("",!0),C(p(Ce),{direction:"vertical"}),C(p(cA),{text:"",circle:"",size:"small",onClick:g[7]||(g[7]=h=>e("onPreviewClick"))},{default:v(()=>[C(p(YA),{title:"预览",size:20},{default:v(()=>[C(JA,{name:"preview"})]),_:1})]),_:1})])]),j("div",Ml,[C(p(cA),{text:"",circle:"",size:"small",onClick:g[8]||(g[8]=h=>e("update:rightAside",!t.rightAside))},{default:v(()=>[C(p(YA),{size:20,style:{cursor:"pointer"}},{default:v(()=>[t.rightAside?(O(),Y(JA,{key:0,name:"menu-unfold"})):(O(),Y(JA,{key:1,name:"menu-fold"}))]),_:1})]),_:1}),j("div",Ol,[C(p(Ce),{direction:"vertical"}),C(p(cA),{text:"",circle:"",size:"small",onClick:c},{default:v(()=>[C(p(YA),{title:t.lockState?"已锁定":"已解锁",size:20},{default:v(()=>[C(JA,{name:t.lockState?"lock":"unlock"},null,8,["name"])]),_:1},8,["title"])]),_:1}),C(p(Ce),{direction:"vertical"})])])]))}}),kl=Ke(Vl,[["__scopeId","data-v-067c540e"]]),Rl={id:"mt-left-aside",class:"pt-10px h-1/1 box-border p-x-10px"},Nl={class:"h-85/100"},Pl={class:"flex flex-wrap"},Gl=["onDragstart","onTouchstartPassive"],Xl={class:"flex justify-center items-center"},Jl={class:"flex flex-col"},Yl={class:"h-[calc(10%-1px)] flex justify-center items-center ct-border"},Wl={class:"flex"},zl={class:"flex justify-center"},Zl={key:0},jl={class:"flex flex-wrap"},$l=["onMouseenter"],ql={class:"w-60px h-60px flex justify-center items-center"},Ac={key:0,class:"absolute w-160px h-160px left-0 top-0 opacity-80 bg-light-300 flex justify-center items-center"},ec=MA({__name:"index",props:{leftAsideConfig:{default:()=>new Map}},setup(r){const A=r,t=Is({selector:"#mt-edit"}),e=X(),n=Gs("mt-disable-classify",[]),s=Gs("mt-local-file",[]);A.leftAsideConfig.set("本地文件",s.value);const i=X(),a=nr({}),o=X([]),l=X(),c=X(!1),u=X([]),B=X(null),f=q(()=>[...A.leftAsideConfig.keys()].map(_=>({label:_}))),g=X(f.value.filter(_=>!n.value.includes(_.label)).map(_=>_.label)),h=X(),w=q({get:()=>f.value.length==g.value.length,set:_=>{var K;_?g.value=f.value.map(x=>x.label):(g.value=[],(K=i.value)==null||K.setCheckedNodes([]))}}),m=q(()=>g.value.length>0&&g.value.length_%4==0?40:_%4==3?80:_%4==2?120:160,H=_=>_?l.value?_.filter(K=>K.title.includes(l.value)):_:[],T=(_,K)=>{if(!_||!K){console.error("拖拽初始化失败",_,K);return}a[`${_}${K}`]=!1,d.setIntention("create"),d.setCreateItemInfo({config_key:_,item_id:K})},D=()=>{c.value=!0},E=(_,K,x)=>{K&&!g.value.includes(_.label)?g.value.push(_.label):K||(g.value=g.value.filter(F=>F!==_.label)),n.value=f.value.filter(F=>!g.value.includes(F.label)).map(F=>F.label)},U=({label:_})=>{h.value=_},S=_=>{if(_.raw.type.includes("image/")){if(_.raw.size/1024/1024>1)return fA.error("不能上传超过1MB的图像!"),e.value.clearFiles(),u.value=[],!1}else return fA.error("只能上传图片!"),e.value.clearFiles(),u.value=[],!1;ma(_.raw).then(K=>{var R;const x=_.name.split(".")[0],F={id:x,title:x,type:"img",thumbnail:K,props:{},common_animations:{val:"",delay:"delay-0s",speed:"slow",repeat:"infinite"}},J=s.value.findIndex(eA=>eA.id==x);J!=-1&&(fA.info("存在同名文件,已覆盖!"),s.value.splice(J,1)),s.value.push(F),A.leftAsideConfig.set("本地文件",s.value),e.value.clearFiles(),u.value=[],h.value="本地文件",(R=i.value)==null||R.setCurrentKey("本地文件")})},I=({id:_})=>{const K=s.value.findIndex(x=>x.id==_);K!=-1&&s.value.splice(K,1),A.leftAsideConfig.set("本地文件",s.value)};return(_,K)=>(O(),sA("div",Rl,[C(p(jt),{modelValue:l.value,"onUpdate:modelValue":K[0]||(K[0]=x=>l.value=x),class:"pb-10px pr-10px",placeholder:"请输入关键字进行搜索"},null,8,["modelValue"]),j("div",Nl,[C(p(vn),{class:"pr-10px","view-style":{height:"100%"}},{default:v(()=>[C(p(wa),{modelValue:o.value,"onUpdate:modelValue":K[1]||(K[1]=x=>o.value=x)},{default:v(()=>[(O(!0),sA(Be,null,me(g.value,x=>(O(),Y(p(Ua),{key:x,title:x,name:x},{default:v(()=>[j("div",Pl,[(O(!0),sA(Be,null,me(H(A.leftAsideConfig.get(x)),(F,J)=>(O(),sA("div",{draggable:"true",onDragstart:R=>T(x,F.id),onTouchstartPassive:R=>T(x,F.id),class:"w-40px h-40px",key:F.id},[C(p(Xs),{visible:a[`${x}${F.id}`],"onUpdate:visible":R=>a[`${x}${F.id}`]=R,placement:"right",width:200,effect:p(t)?"dark":"light","show-arrow":!1,"hide-after":0,trigger:"hover",enterable:!1,offset:y(J+1)},{content:v(()=>[j("div",Xl,[j("div",Jl,[C(p(Wr),null,{default:v(()=>[oA(WA(F.title),1)]),_:2},1024),C(p(Fn),{class:ze(["w-100px h-100px pt-5px",p(t)?"bg-amber-50":""]),src:F.thumbnail},null,8,["class","src"])])])]),default:v(()=>[C(p(Fn),{draggable:"false",class:ze(["w-30px h-30px select-none",p(t)?"bg-amber-50":""]),src:F.thumbnail},null,8,["class","src"])]),_:2},1032,["visible","onUpdate:visible","effect","offset"])],40,Gl))),128))])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])]),_:1})]),j("div",Yl,[C(p(cA),{class:"w-80/100",onClick:D},{default:v(()=>[...K[6]||(K[6]=[oA("管理",-1)])]),_:1})]),C(p(ut),{modelValue:c.value,"onUpdate:modelValue":K[5]||(K[5]=x=>c.value=x),title:"图库管理",width:"80%","destroy-on-close":""},{default:v(()=>[j("div",Wl,[j("div",null,[j("div",null,[j("div",zl,[C(p(rl),{modelValue:w.value,"onUpdate:modelValue":K[2]||(K[2]=x=>w.value=x),indeterminate:m.value},{default:v(()=>[...K[7]||(K[7]=[oA("全选",-1)])]),_:1},8,["modelValue","indeterminate"])]),C(p(vn),{height:"50vh"},{default:v(()=>[C(p(Ca),{ref_key:"treeRef",ref:i,data:f.value,"highlight-current":!0,"show-checkbox":"",onCheckChange:E,"node-key":"label","default-checked-keys":g.value,onNodeClick:U},null,8,["data","default-checked-keys"])]),_:1}),C(p(Qa),{ref_key:"uploadRef",ref:e,class:"w-24px h-24px","file-list":u.value,"onUpdate:fileList":K[3]||(K[3]=x=>u.value=x),"auto-upload":!1,limit:1,"show-file-list":!1,"on-change":S,accept:"image/*"},{default:v(()=>[C(p(cA),{type:"primary"},{default:v(()=>[...K[8]||(K[8]=[oA("本地上传",-1)])]),_:1})]),_:1},8,["file-list"])])]),C(p(Ce),{direction:"vertical",class:"h-50vh ml-40px"}),h.value?(O(),sA("div",Zl,[C(p(vn),{height:"50vh"},{default:v(()=>[j("div",jl,[(O(!0),sA(Be,null,me(A.leftAsideConfig.get(h.value),x=>(O(),sA("div",{key:x.id,class:"w-160px h-160px flex flex-wrap justify-center items-center cursor-pointer relative",onMouseenter:F=>B.value=x.id,onMouseleave:K[4]||(K[4]=F=>B.value=null)},[C(p(Xs),{effect:p(t)?"dark":"light",content:x.title,placement:"top"},{default:v(()=>[j("div",null,[C(p(Fn),{class:ze(["w-60px h-60px",p(t)?"bg-amber-50":""]),src:x.thumbnail},null,8,["class","src"]),j("div",ql,[C(p(Wr),{truncated:""},{default:v(()=>[oA(WA(x.title),1)]),_:2},1024)]),h.value=="本地文件"&&B.value==x.id?(O(),sA("div",Ac,[C(p(cA),{type:"danger",onClick:F=>I(x)},{default:v(()=>[...K[9]||(K[9]=[oA("删除",-1)])]),_:1},8,["onClick"])])):hA("",!0)])]),_:2},1032,["effect","content"])],40,$l))),128))])]),_:1})])):hA("",!0)])]),_:1},8,["modelValue"])]))}}),tc={width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg"},rc=["width","height"],nc=["d","stroke"],sc=["width","height"],ic=["width","height"],ac=["d","stroke"],oc=MA({__name:"index",props:{grid:{type:Number,default:10},gridCount:{type:Number,default:5},showSmall:{type:Boolean,default:!0}},setup(r){const A=Is({selector:"#mt-edit"}),t=r,e=q(()=>t.grid*t.gridCount),n=q(()=>{const i=[["#e4e4e4","#ebebeb"],["#414141","#363636"]],[a,o]=i[A?0:1];return{bigGrid:a,grid:o}}),s=q(()=>({"--border-color":n.value.bigGrid}));return(i,a)=>(O(),sA("div",{class:"grid-rect",style:Hs(s.value)},[(O(),sA("svg",tc,[j("defs",null,[r.showSmall?(O(),sA("pattern",{key:0,id:"smallGrid",width:r.grid,height:r.grid,patternUnits:"userSpaceOnUse"},[j("path",{d:`M ${r.grid} 0 L 0 0 0 ${r.grid}`,fill:"none",stroke:n.value.grid,"stroke-width":"0.5"},null,8,nc)],8,rc)):hA("",!0),j("pattern",{id:"grid",width:e.value,height:e.value,patternUnits:"userSpaceOnUse"},[r.showSmall?(O(),sA("rect",{key:0,width:e.value,height:e.value,fill:"url(#smallGrid)"},null,8,ic)):hA("",!0),j("path",{d:`M ${e.value} 0 L 0 0 0 ${e.value}`,fill:"none",stroke:n.value.bigGrid,"stroke-width":"1"},null,8,ac)],8,sc)]),a[0]||(a[0]=j("rect",{width:"100%",height:"100%",fill:"url(#grid)"},null,-1))]))],4))}}),lc=Ke(oc,[["__scopeId","data-v-e248ab51"]]),cc={class:"mt-selected-area"},uc=MA({__name:"index",props:{scaleRatio:{default:1},targetDom:{default:null}},emits:["selectedAreaMouseUp"],setup(r,{expose:A,emit:t}){xs(a=>({v0480acc6:s.value.width+"px",v533d0e32:s.value.height+"px",v4ea033d2:s.value.top+"px",v23204a47:s.value.left+"px"}));const e=r,n=t,s=X({width:0,height:0,top:0,left:0});return A({onMouseDown:a=>{var g;const{realityX:o,realityY:l}=Ft(a,(g=e.targetDom)==null?void 0:g.getBoundingClientRect()),c=a instanceof MouseEvent?a.clientX:a.touches[0].pageX,u=a instanceof MouseEvent?a.clientY:a.touches[0].pageY,B=h=>{const w=h instanceof MouseEvent?h.clientX:h.touches[0].pageX,m=h instanceof MouseEvent?h.clientY:h.touches[0].pageY,y=(w-c)/e.scaleRatio,H=(m-u)/e.scaleRatio;let T=o/e.scaleRatio,D=l/e.scaleRatio,E=Math.abs(y),U=Math.abs(H);y<0&&(T=o/e.scaleRatio-E),H<0&&(D=l/e.scaleRatio-U),s.value={width:E,height:U,left:T,top:D}},f=()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",B),document.removeEventListener("touchend",f),n("selectedAreaMouseUp",p(s)),s.value={width:0,height:0,top:0,left:0}};document.addEventListener("mousemove",B),document.addEventListener("mouseup",f),document.addEventListener("touchmove",B),document.addEventListener("touchend",f)}}),(a,o)=>(O(),sA("div",cc))}}),Bc=Ke(uc,[["__scopeId","data-v-3704de4f"]]),gc={ref:"contextMenuRef",class:"contextMenu"},fc=["onClick"],dc={class:"shortcut"},hc=MA({__name:"index",props:{menuInfo:{},show:{type:Boolean}},emits:["onContextMenuClick"],setup(r,{emit:A}){xs(s=>({d490becc:t.menuInfo.left+"px",v3f7af964:t.menuInfo.top+"px"}));const t=r,e=A,n=(s,i,a)=>{i.enable&&e("onContextMenuClick",s,a)};return(s,i)=>Tt((O(),sA("ul",gc,[(O(!0),sA(Be,null,me(t.menuInfo.info,(a,o)=>(O(),sA("li",{key:a.title,onClick:l=>n(o,a,l)},[j("p",{class:ze(a.enable?"":"disabled")},[oA(WA(a.title)+" ",1),j("span",dc,WA(a.hot_key),1)],2)],8,fc))),128))],512)),[[jn,r.show]])}}),pc=Ke(hc,[["__scopeId","data-v-e515623d"]]),wc=["id"],Cc=["id"],Qc=["fill"],mc=["id"],Uc=["fill"],vc=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],Fc=["from","to","dur"],yc=MA({__name:"index",props:{itemJson:{},canvasCfg:{},grid:{},canvasDom:{},mode:{default:"pen"}},emits:["drawLineEnd"],setup(r,{expose:A,emit:t}){const e=r,n=t,s=va.lineRenderOffset;return q(()=>!e.grid.align||!e.grid.enabled?1:e.grid.size),A({onMouseDown:(a,o,l)=>{a.stopPropagation();const{x:c,y:u}=l,B=a instanceof MouseEvent?a.clientX:a.touches[0].pageX,f=a instanceof MouseEvent?a.clientY:a.touches[0].pageY;let g=0,h=0;const w=y=>{const H=y instanceof MouseEvent?y.clientX:y.touches[0].pageX,T=y instanceof MouseEvent?y.clientY:y.touches[0].pageY,D=a.ctrlKey?0:Qe((H-B)/e.canvasCfg.scale,1),E=a.shiftKey?0:Qe((T-f)/e.canvasCfg.scale,1);if(g=c+D,h=u+E,e.mode=="pencil"){e.itemJson.props.point_position.val.push({x:g,y:h});return}else{const U=e.itemJson.props.point_position.val;U[o].x=g,U[o].y=h}},m=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",m),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",m);const y=document.querySelector(`#${e.itemJson.id} g .real`).getBoundingClientRect(),H=e.canvasDom.getBoundingClientRect(),T=((y==null?void 0:y.left)-(H==null?void 0:H.left))/e.canvasCfg.scale,D=((y==null?void 0:y.top)-(H==null?void 0:H.top))/e.canvasCfg.scale,E=T-e.itemJson.binfo.left,U=D-e.itemJson.binfo.top,S={...e.itemJson,binfo:{...e.itemJson.binfo,left:T,top:D,width:(y==null?void 0:y.width)/e.canvasCfg.scale,height:(y==null?void 0:y.height)/e.canvasCfg.scale},props:{...e.itemJson.props,point_position:{...e.itemJson.props.point_position,val:e.itemJson.props.point_position.val.map(I=>({x:I.x-E,y:I.y-U}))}}};n("drawLineEnd",S)};document.addEventListener("mousemove",w),document.addEventListener("mouseup",m),document.addEventListener("touchmove",w),document.addEventListener("touchend",m)}}),(a,o)=>{var l,c,u,B;return O(),sA("svg",{id:e.itemJson.id,class:"mt-line-render",style:Hs({position:"absolute",left:`${-p(s)}px`,top:`${-p(s)}px`,width:`${e.canvasCfg.width+p(s)}px`,height:`${e.canvasCfg.height+p(s)}px`}),version:"1.1",xmlns:"http://www.w3.org/2000/svg","pointer-events":"none"},[j("g",null,[j("defs",null,[j("marker",{id:"markerArrowStart"+e.itemJson.id,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse"},[j("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:e.itemJson.props.stroke.val},null,8,Qc)],8,Cc),j("marker",{id:"markerArrowEnd"+e.itemJson.id,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto"},[j("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:e.itemJson.props.stroke.val},null,8,Uc)],8,mc)]),j("path",{d:p(nl)(e.itemJson.props.point_position.val,e.itemJson.binfo.left+p(s),e.itemJson.binfo.top+p(s)),"pointer-events":"visibleStroke",fill:"none",stroke:e.itemJson.props.ani_type.val==="electricity"?e.itemJson.props.ani_color.val:e.itemJson.props.stroke.val,"stroke-width":e.itemJson.props["stroke-width"].val,style:{cursor:"move"},"stroke-dashoffset":"0","stroke-dasharray":e.itemJson.props.ani_type.val==="electricity"?e.itemJson.props["stroke-width"].val*3:0,"marker-start":(c=(l=e.itemJson.props)==null?void 0:l["marker-start"])!=null&&c.val?`url(#markerArrowStart${e.itemJson.id})`:"","marker-end":(B=(u=e.itemJson.props)==null?void 0:u["marker-end"])!=null&&B.val?`url(#markerArrowEnd${e.itemJson.id})`:"",class:"real"},[e.itemJson.props.ani_type.val==="electricity"?(O(),sA("animate",{key:0,attributeName:"stroke-dashoffset",from:e.itemJson.props.ani_reverse.val?0:1e3,to:e.itemJson.props.ani_reverse.val?e.itemJson.props.ani_play.val?1e3:0:e.itemJson.props.ani_play.val?0:1e3,dur:`${e.itemJson.props.ani_dur.val<1?1:e.itemJson.props.ani_dur.val}s`,repeatCount:"indefinite"},null,8,Fc)):hA("",!0)],8,vc)])],12,wc)}}}),Ec={key:1},bc=["data-id","onMouseenter"],Ic=MA({__name:"index",props:{groupEnabled:{type:Boolean},unGroupEnabled:{type:Boolean},deleteEnabled:{type:Boolean},lineAppendEnable:{type:Boolean,default:!1}},setup(r,{expose:A}){xs(Q=>({v6726e123:`scale(${p(d).canvasCfg.scale})`,v3a549801:`${p(d).canvasCfg.transform_origin.x}px ${p(d).canvasCfg.transform_origin.y}px`,v472b6e47:p(d).canvasCfg.width+"px",v2de230f4:p(d).canvasCfg.height+"px",f6f0217a:p(d).canvasCfg.color,v621cd3aa:"url("+p(d).canvasCfg.img+")",v2405e576:p(d).canvasCfg.drag_offset.x+"px",v55de3a24:p(d).canvasCfg.drag_offset.y+"px",v63143886:p(d).guideCfg.x.display?"block":"none",v50b2342c:p(d).guideCfg.x.top+"px",v5f15c765:p(d).guideCfg.y.display?"block":"none",v15788b3f:p(d).guideCfg.y.left+"px"}));const t=r,e=X(),n=X(),s=X(),i=X(),a=X(!0);let o=!1;const l=nr(d.canvasCfg.drag_offset),c=q(()=>!d.gridCfg.align||!d.gridCfg.enabled?1:d.gridCfg.size),u=q({get(){return d.done_json},set(Q){d.setGlobalStoreDoneJson(Q)}}),B=va.sysComponent.find(Q=>Q.type=="sys-line"),f={id:B.id+"-"+gr(),title:B.title,type:B.type,binfo:{left:0,top:0,width:100,height:0,angle:0},resize:!1,rotate:!1,lock:!1,active:!0,hide:!1,props:{...B.props,point_position:{title:"点坐标",type:"jsonEdit",val:[{x:0,y:0},{x:0,y:0}],disabled:!0}},tag:B.id,common_animations:B.common_animations,events:[]},g=X(Se(f)),h=(Q,b)=>{var GA,RA,Fe,ye,Ee,ht;if(AA(),d.lock&&d.intention==="create"){fA.error("画布已锁定,请先解锁!");return}if(Q.preventDefault(),b&&d.intention!=="create"){if(d.lock){d.setIntention("beginDragCanvas"),(GA=s.value)==null||GA.onMouseDown(Q);return}if(t.lineAppendEnable){d.setIntention("drawSysLineStart");const{realityX:Re,realityY:pt}=Ft(Q,(RA=e.value)==null?void 0:RA.getBoundingClientRect());g.value={...Se(f),binfo:{left:Qe(Re/d.canvasCfg.scale,c.value),top:Qe(pt/d.canvasCfg.scale,c.value),width:0,height:0,angle:0}},(Fe=i.value)==null||Fe.onMouseDown(Q,1,{x:0,y:0});return}d.cancelAllSelect(),d.setIntention("beginMulSelect"),(ye=n.value)==null||ye.onMouseDown(Q)}if(d.intention!=="create")return;if(!d.create_item_info){console.error("拖拽初始化失败",d.create_item_info);return}d.setSelectItems([]);const L=(Ee=$n.config.get(d.create_item_info.config_key))==null?void 0:Ee.find(Re=>Re.id===d.create_item_info.item_id);if(!L){console.error("拖拽配置不匹配",d.create_item_info,$n.config);return}const V=Se(L),z=V.type==="sys-line",lA=V.id==="sys-line",Z=V.id==="sys-line-vertical",{realityX:QA,realityY:vA}=Ft(Q,(ht=e.value)==null?void 0:ht.getBoundingClientRect()),EA={id:V.id+"-"+gr(),title:V.title,type:V.type,binfo:{left:Qe(QA/d.canvasCfg.scale,c.value),top:Qe(vA/d.canvasCfg.scale,c.value),width:lA?100:Z?0:50,height:Z?100:lA?0:50,angle:0},resize:!z,rotate:!z,lock:!1,active:!0,hide:!1,props:V.props,tag:V.id,common_animations:V.common_animations,events:[]};V.type==="svg"?EA.symbol=V.symbol:V.type==="img"&&(EA.thumbnail=V.thumbnail);const kA=[...d.done_json];kA.push(EA),d.setGlobalStoreDoneJson(kA),d.setSingleSelect(EA.id),d.setIntention("none"),d.setCreateItemInfo(null),tA.addHistory(kA)},w=Q=>{Q.preventDefault()},m=(Q,b)=>{if(AA(),!d.lock){if(d.canvasCfg.adsorp||d.canvasCfg.guide){const L=d.done_json.filter(V=>!V.hide).map(V=>{const{left:z,top:lA,width:Z,height:QA,right:vA,bottom:EA}=document.getElementById(V.id).getBoundingClientRect();return{id:V.id,type:V.type,left:z,top:lA,width:Z,height:QA,right:vA,bottom:EA}});tA.setBoundingBox(L)}if(b.ctrlKey){if(b.ctrlKey&&!Q.lock){const L=d.done_json.find(V=>V.id==Q.id);L.active=!L.active,d.refreshSelectedItemsId()}}else{if(d.selected_items_id.includes(Q.id))return;d.setSingleSelect(Q.id)}}},y=Q=>{var b,L,V,z;if(AA(),d.cancelAllSelect(),d.lock||Q.button==2){d.setIntention("beginDragCanvas"),(b=s.value)==null||b.onMouseDown(Q);return}if(t.lineAppendEnable){d.setIntention("drawSysLineStart");const{realityX:lA,realityY:Z}=Ft(Q,(L=e.value)==null?void 0:L.getBoundingClientRect());g.value={...Se(f),binfo:{left:Qe(lA/d.canvasCfg.scale,c.value),top:Qe(Z/d.canvasCfg.scale,c.value),width:0,height:0,angle:0}},(V=i.value)==null||V.onMouseDown(Q,1,{x:0,y:0});return}d.setIntention("beginMulSelect"),(z=n.value)==null||z.onMouseDown(Q)},H=Q=>{const b=[...d.done_json].map(L=>{var GA,RA;const V=(GA=document.getElementById(L.id))==null?void 0:GA.getBoundingClientRect(),z=(RA=e.value)==null?void 0:RA.getBoundingClientRect();let{left:lA,top:Z,width:QA,height:vA}=L.binfo;V&&z&&(lA=(V.left-z.left)/d.canvasCfg.scale,Z=(V.top-z.top)/d.canvasCfg.scale,QA=V.width/d.canvasCfg.scale,vA=V.height/d.canvasCfg.scale);const EA=Q.leftlA+QA,kA=Q.topZ+vA;return EA&&kA&&!L.lock&&!L.hide&&(L.active=!0),L});d.setGlobalStoreDoneJson(b),d.refreshSelectedItemsId(),d.setIntention("none")},T=()=>{const Q=Se(d.done_json.filter(z=>d.selected_items_id.includes(z.id)));d.done_json.filter(z=>{var lA,Z;return z.type==="sys-line"&&(d.selected_items_id.includes((lA=z.props.bind_anchors.val.start)==null?void 0:lA.id)||d.selected_items_id.includes((Z=z.props.bind_anchors.val.end)==null?void 0:Z.id))&&!d.selected_items_id.includes(z.id)}).forEach(z=>{z.props.bind_anchors.val={start:null,end:null}});const L=il(Q,e.value,d.canvasCfg.scale),V=[...d.done_json].filter(z=>!d.selected_items_id.includes(z.id));V.push(L),d.setGlobalStoreDoneJson(V),d.setSingleSelect(L.id),tA.addHistory(d.done_json)},D=()=>{if(d.selected_items_id.length!=1){fA.error("只能解除组合组件!");return}const Q=d.done_json.find(V=>V.id===d.selected_items_id[0]);if(!Q){fA.error("未知错误!无法找到解组信息");return}if(Q.type!="group"){fA.error("只能解除组合组件!");return}const b=al(Q,e.value,d.canvasCfg.scale,c.value),L=[...d.done_json].filter(V=>!d.selected_items_id.includes(V.id));d.setGlobalStoreDoneJson([...L,...b]),d.setSelectItems(b.map(V=>V.id)),tA.addHistory(d.done_json)},E=({move_item_bounding_info:Q,move_binfo:b})=>{var lA;const L=(lA=e.value)==null?void 0:lA.getBoundingClientRect();if(d.canvasCfg.adsorp||d.canvasCfg.guide){let Z=tA.boundingBox;d.selected_items_id.length>1&&Q.length>1&&(Z=tA.boundingBox.filter(RA=>!d.selected_items_id.includes(RA.id)));const QA=Q,{y_info:vA,move_x:EA}=ol(Z,d.canvasCfg.adsorp_diff,QA,L,d.canvasCfg.scale),{x_info:kA,move_y:GA}=ll(Z,d.canvasCfg.adsorp_diff,QA,L,d.canvasCfg.scale);d.guideCfg.x=kA,d.guideCfg.y=vA,EA!=0&&d.canvasCfg.adsorp?d.adsorp_diff.x=EA:d.adsorp_diff.x=0,GA!=0&&d.canvasCfg.adsorp?d.adsorp_diff.y=GA:d.adsorp_diff.y=0}d.done_json.filter(Z=>Z.type=="sys-line"&&d.selected_items_id.includes(Z.id)&&(Z.props.bind_anchors.val.start||Z.props.bind_anchors.val.end)).forEach(Z=>{Z.props.bind_anchors.val.start&&(d.selected_items_id.includes(Z.props.bind_anchors.val.start.id)||(Z.props.bind_anchors.val.start=null)),Z.props.bind_anchors.val.end&&(d.selected_items_id.includes(Z.props.bind_anchors.val.end.id)||(Z.props.bind_anchors.val.end=null))});const z=d.done_json.filter(Z=>{var QA,vA;return Z.type=="sys-line"&&(d.selected_items_id.includes((QA=Z.props.bind_anchors.val.start)==null?void 0:QA.id)||d.selected_items_id.includes((vA=Z.props.bind_anchors.val.end)==null?void 0:vA.id))&&!d.selected_items_id.includes(Z.id)});fr(z,d.done_json,e.value,d.canvasCfg.scale,b)},U=()=>{d.guideCfg.x.display=!1,d.guideCfg.y.display=!1,tA.addHistory(d.done_json)},S=Q=>{const{topLeft:b,topRight:L,bottomLeft:V,bottomRight:z}=ul(Q.binfo),{topCenter:lA,bottomCenter:Z,leftCenter:QA,rightCenter:vA}=Bl(b,L,V,z),EA=lA.x,kA=QA.y,GA=Math.PI/180*Q.binfo.angle,RA=dr(lA.x,lA.y,EA,kA,GA),Fe=dr(Z.x,Z.y,EA,kA,GA),ye=dr(QA.x,QA.y,EA,kA,GA),Ee=dr(vA.x,vA.y,EA,kA,GA);tA.setAdsorbPoint([{type:"tc",x:RA.x,y:RA.y,id:Q.id},{type:"bc",x:Fe.x,y:Fe.y,id:Q.id},{type:"lc",x:ye.x,y:ye.y,id:Q.id},{type:"rc",x:Ee.x,y:Ee.y,id:Q.id}])},I=(Q,b)=>{b.type!="sys-line"&&S(b)},_=(Q,b)=>{d.intention=="adsorbStart"||d.intention=="adsorbEnd"||tA.setAdsorbPoint([])},K=Q=>{d.setIntention(Q)},x=Q=>{if(d.intention=="adsorbStart"||d.intention=="adsorbEnd"){const b=d.done_json.find(L=>L.id==d.selected_items_id[0]);b&&(d.intention=="adsorbStart"?(b.props.bind_anchors.val={...b.props.bind_anchors.val,start:{type:Q.type,id:Q.id}},b.props.point_position.val[0]={x:Q.x-b.binfo.left,y:Q.y-b.binfo.top}):d.intention=="adsorbEnd"&&(b.props.bind_anchors.val={...b.props.bind_anchors.val,end:{type:Q.type,id:Q.id}},b.props.point_position.val[b.props.point_position.val.length-1]={x:Q.x-b.binfo.left,y:Q.y-b.binfo.top}))}},F=()=>{if(d.intention=="adsorbStart"||d.intention=="adsorbEnd"){const Q=d.done_json.find(b=>b.id==d.selected_items_id[0]);Q&&(d.intention=="adsorbStart"?Q.props.bind_anchors.val={...Q.props.bind_anchors.val,start:null}:d.intention=="adsorbEnd"&&(Q.props.bind_anchors.val={...Q.props.bind_anchors.val,end:null}))}},J=Q=>{const b=d.done_json.filter(L=>{var V,z;return L.type=="sys-line"&&(((V=L.props.bind_anchors.val.start)==null?void 0:V.id)==Q.id||((z=L.props.bind_anchors.val.end)==null?void 0:z.id)==Q.id)});fr(b,d.done_json,e.value,d.canvasCfg.scale),tA.addHistory(d.done_json)},R=Q=>{const b=d.done_json.filter(L=>{var V,z;return L.type=="sys-line"&&(((V=L.props.bind_anchors.val.start)==null?void 0:V.id)==Q.id||((z=L.props.bind_anchors.val.end)==null?void 0:z.id)==Q.id)});fr(b,d.done_json,e.value,d.canvasCfg.scale),tA.addHistory(d.done_json)},eA=Q=>{const b=d.done_json.filter(L=>d.selected_items_id.includes(L.id));cl(Q,b,e.value,d.canvasCfg.scale,d.done_json),tA.addHistory(d.done_json)},iA=()=>{l.x=d.canvasCfg.drag_offset.x,l.y=d.canvasCfg.drag_offset.y},wA=(Q,b)=>{Q===0&&b===0||(d.setIntention("runDragCanvas"),d.canvasCfg.drag_offset={x:l.x+Q,y:l.y+b})},aA=()=>{d.intention=="runDragCanvas"?d.setIntention("endDragCanvas"):d.setIntention("none")},rA=Q=>{if(d.intention=="endDragCanvas")return;const b=[];tA.copy.length>0&&b.push("paste"),d.done_json.length>0&&b.push("selectAll"),rt.setDisplayItem(b),rt.setMenuInfo({...rt.menuInfo,left:Q.clientX,top:Q.clientY}),d.setIntention("showContextMenu")},gA=(Q,b)=>{const L=["copy","delete"];t.groupEnabled&&L.push("group"),t.unGroupEnabled&&L.push("ungroup"),t.deleteEnabled&&L.push("delete");const V=d.done_json.findIndex(z=>z.id==b.id);V>-1&&V-1&&V>0&&(L.push("moveDown"),L.push("moveBottom")),rt.setDisplayItem(L),rt.setMenuInfo({...rt.menuInfo,left:Q.clientX,top:Q.clientY}),d.setIntention("showContextMenu")},mA=()=>{d.setSelectItems(d.done_json.map(Q=>Q.id))},CA=()=>{d.selected_items_id.length<1||(tA.setCopy(d.done_json.filter(Q=>d.selected_items_id.includes(Q.id))),fA.success("复制成功"))},HA=Q=>(Q.forEach(b=>{b.id=b.tag+"-"+gr(),b.type=="sys-line"?b.props.bind_anchors.val={start:null,end:null}:b.type=="group"&&b.children&&(b.children=HA(b.children))}),Q),xA=(Q,b)=>{if(tA.copy.length<1)return;const L=HA(Se(tA.copy)).map(V=>({...V,binfo:{...V.binfo,left:V.binfo.left-Q,top:V.binfo.top-b}}));d.setGlobalStoreDoneJson([...d.done_json,...L]),d.setSelectItems(L.map(V=>V.id)),tA.addHistory(d.done_json)},$=()=>{d.selected_items_id.length<1||(d.deleteSelectedItems(),tA.addHistory(d.done_json))},zA=()=>{d.selected_items_id.length<2||T()},et=()=>{d.selected_items_id.length>1||D()},tt=()=>{if(d.selected_items_id.length!==1)return;const Q=d.done_json.find(b=>b.id===d.selected_items_id[0]);d.setGlobalStoreDoneJson([...d.done_json.filter(b=>b.id!==Q.id),Q]),tA.addHistory(d.done_json)},OA=()=>{if(d.selected_items_id.length!==1)return;const Q=d.done_json.find(b=>b.id===d.selected_items_id[0]);d.setGlobalStoreDoneJson([Q,...d.done_json.filter(b=>b.id!==Q.id)]),tA.addHistory(d.done_json)},Me=()=>{if(d.selected_items_id.length!==1)return;const Q=d.done_json.findIndex(L=>L.id===d.selected_items_id[0]);if(Q>=d.done_json.length-1){fA.error("已经是最上层了");return}const b=d.done_json[Q];d.done_json[Q]=d.done_json[Q+1],d.done_json[Q+1]=b,d.setGlobalStoreDoneJson(d.done_json),tA.addHistory(d.done_json)},Oe=()=>{if(d.selected_items_id.length!==1)return;const Q=d.done_json.findIndex(L=>L.id===d.selected_items_id[0]);if(Q<=0){fA.error("已经是最下层了");return}const b=d.done_json[Q];d.done_json[Q]=d.done_json[Q-1],d.done_json[Q-1]=b,d.setGlobalStoreDoneJson(d.done_json),tA.addHistory(d.done_json)},Ve=()=>{tA.historyIndex!=0&&(tA.historyIndex-=1,d.setGlobalStoreDoneJson(Se(tA.history[tA.historyIndex])),d.setSelectItems([]))},ZA=()=>{tA.historyIndex!=tA.history.length-1&&(tA.historyIndex+=1,d.setGlobalStoreDoneJson(Se(tA.history[tA.historyIndex])),d.setSelectItems([]))},ke=(Q,b)=>{var L;switch(Q){case"selectAll":mA();break;case"copy":CA();break;case"paste":{if(tA.copy.length<1)return;const{realityX:V,realityY:z}=Ft(b,(L=e.value)==null?void 0:L.getBoundingClientRect()),lA=Qe(V/d.canvasCfg.scale,1),Z=Qe(z/d.canvasCfg.scale,1);let QA="",vA=1/0;tA.copy.forEach(RA=>{RA.binfo.topRA.id===QA),kA=EA.binfo.left-lA,GA=EA.binfo.top-Z;xA(kA,GA);break}case"delete":$();break;case"group":zA();break;case"ungroup":et();break;case"moveTop":{tt();break}case"moveBottom":{OA();break}case"moveUp":{Me();break}case"moveDown":{Oe();break}}d.setIntention("none")},P=Q=>{Q.ctrlKey&&Q.key.toLocaleLowerCase()==="a"?(Q.preventDefault(),mA()):Q.ctrlKey&&Q.key.toLocaleLowerCase()==="c"?(Q.preventDefault(),CA()):Q.ctrlKey&&Q.key.toLocaleLowerCase()==="v"?(Q.preventDefault(),xA(10,10)):Q.key.toLocaleLowerCase()==="delete"?(Q.preventDefault(),$()):Q.ctrlKey&&Q.key.toLocaleLowerCase()==="g"?(Q.preventDefault(),zA()):Q.ctrlKey&&Q.key.toLocaleLowerCase()==="u"?(Q.preventDefault(),et()):Q.ctrlKey&&Q.key==="ArrowRight"?(Q.preventDefault(),tt()):Q.ctrlKey&&Q.key==="ArrowLeft"?(Q.preventDefault(),OA()):Q.ctrlKey&&Q.key==="ArrowUp"?(Q.preventDefault(),Me()):Q.ctrlKey&&Q.key==="ArrowDown"?(Q.preventDefault(),Oe()):Q.ctrlKey&&Q.key.toLocaleLowerCase()==="z"?(Q.preventDefault(),Ve()):Q.ctrlKey&&Q.key.toLocaleLowerCase()==="y"?(Q.preventDefault(),ZA()):Q.key==="ArrowUp"?(Q.preventDefault(),b(0,-1)):Q.key==="ArrowDown"?(Q.preventDefault(),b(0,1)):Q.key==="ArrowLeft"?(Q.preventDefault(),b(-1,0)):Q.key==="ArrowRight"&&(Q.preventDefault(),b(1,0));function b(L,V){if(d.selected_items_id.length<1)return;const z=[];d.done_json.forEach(lA=>{d.selected_items_id.includes(lA.id)&&(lA.binfo.left+=L,lA.binfo.top+=V,lA.type=="sys-line"?lA.props.bind_anchors.val={start:null,end:null}:z.push(...d.done_json.filter(Z=>{var QA,vA;return Z.type=="sys-line"&&(((QA=Z.props.bind_anchors.val.start)==null?void 0:QA.id)==lA.id||((vA=Z.props.bind_anchors.val.end)==null?void 0:vA.id)==lA.id)})))}),fr(z,d.done_json,e.value,d.canvasCfg.scale),tA.addHistory(d.done_json)}},k=Q=>{if(Q.ctrlKey){if(Q.preventDefault(),Q.stopPropagation(),Q.deltaY>0?d.canvasCfg.scale=(d.canvasCfg.scale*10-1)/10:Q.deltaY<0&&(d.canvasCfg.scale=(d.canvasCfg.scale*10+1)/10),!a.value)return;const{realityX:b,realityY:L}=Ft(Q,e.value.getBoundingClientRect()),V=parseInt(b/d.canvasCfg.scale+""),z=parseInt(L/d.canvasCfg.scale+"");d.canvasCfg.transform_origin.x!==V&&d.canvasCfg.transform_origin.y!==z&&(d.canvasCfg.transform_origin={x:V,y:z},a.value=!1)}},AA=()=>{o||(document.addEventListener("keydown",P),o=!0)},yA=()=>{o&&(document.removeEventListener("keydown",P),o=!1)},PA=()=>{a.value=!0},VA=Q=>{const b=[...d.done_json],L={...Q,id:Q.tag+"-"+gr()};b.push(L),d.setGlobalStoreDoneJson(b),d.setSingleSelect(L.id),d.setIntention("none"),tA.addHistory(b)};return an(()=>{AA()}),sl(()=>{yA()}),A({createGroupItem:T,onUngroup:D,onAlignSelected:eA,onRedo:ZA,onUndo:Ve,beginListenerKeyDown:AA,stopListenerKeyDown:yA}),(Q,b)=>{var L;return O(),sA("div",{class:"overflow-hidden w-1/1 h-1/1",onWheel:k},[j("div",{id:"mtCanvasArea",ref_key:"canvasAreaRef",ref:e,class:ze(`canvasArea ${p(d).intention=="runDragCanvas"?"cursor-grab":""}`),onDrop:h,onDragover:w,onTouchstart:b[3]||(b[3]=V=>h(V,!0)),onMousedown:y,onMousemove:PA,onContextmenu:zr(rA,["right","prevent"])},[p(d).gridCfg.enabled?(O(),Y(lc,{key:0,grid:p(d).gridCfg.size},null,8,["grid"])):hA("",!0),C(bl,{"done-json":u.value,"onUpdate:doneJson":b[0]||(b[0]=V=>u.value=V),"canvas-cfg":p(d).canvasCfg,"grid-cfg":p(d).gridCfg,"show-ghost-dom":!(((L=p(d).selected_items_id)==null?void 0:L.length)>1),"canvas-dom":e.value,"global-lock":p(d).lock,"line-append-enable":t.lineAppendEnable,onOnMouseDown:m,onOnItemMove:E,onOnMoveMouseUp:U,onOnItemMouseEnter:I,onOnItemMouseLeave:_,onSetIntention:K,onOnItemResizeDone:J,onOnItemRotateDone:R,onOnItemRightClick:zr(gA,["stop"])},null,8,["done-json","canvas-cfg","grid-cfg","show-ghost-dom","canvas-dom","global-lock","line-append-enable"]),Tt(C(Bc,{ref_key:"selectedAreaRef",ref:n,"scale-ratio":p(d).canvasCfg.scale,"target-dom":e.value,onSelectedAreaMouseUp:H},null,8,["scale-ratio","target-dom"]),[[jn,p(d).intention==="beginMulSelect"]]),C(Il,{ref_key:"dragCanvasRef",ref:s,"scale-ratio":p(d).canvasCfg.scale,onDragCanvasMouseDown:iA,onDragCanvasMouseMove:wA,onDragCanvasMouseUp:aA},null,8,["scale-ratio"]),Tt(C(yc,{ref_key:"dragLineRenderRef",ref:i,"item-json":g.value,"onUpdate:itemJson":b[1]||(b[1]=V=>g.value=V),"canvas-cfg":p(d).canvasCfg,"canvas-dom":e.value,grid:p(d).gridCfg,mode:"pen",onDrawLineEnd:VA},null,8,["item-json","canvas-cfg","canvas-dom","grid"]),[[jn,p(d).intention=="drawSysLineStart"]]),p(d).intention=="adsorbStart"||p(d).intention=="adsorbEnd"?(O(),sA("div",Ec,[(O(!0),sA(Be,null,me(p(tA).adsorbPoint,V=>(O(),sA("div",{key:V.type,class:"adsorb-point touch-none",style:Hs({left:V.x+"px",top:V.y+"px"}),"data-id":V.type,onMouseenter:z=>x(V),onMouseout:b[2]||(b[2]=z=>F())},null,44,bc))),128))])):hA("",!0),b[4]||(b[4]=j("div",{id:"guide-x"},null,-1)),b[5]||(b[5]=j("div",{id:"guide-y"},null,-1))],34),C(pc,{"menu-info":p(rt).menuInfo,show:p(d).intention=="showContextMenu",onOnContextMenuClick:ke},null,8,["menu-info","show"])],32)}}}),Hc=Ke(Ic,[["__scopeId","data-v-306a5bcf"]]),xc={class:"flex justify-between"},Sc={class:"flex justify-between px-10px ct-border pt-10px"},Tc={class:"flex justify-center items-center relative"},Lc=["src"],Dc=MA({__name:"page-setting",props:{canvasCfg:{},gridCfg:{}},emits:["update:canvasCfg","update:gridCfg"],setup(r,{emit:A}){const t=r,e=A,n=X("page"),s=X(),i=q({get:()=>`${t.canvasCfg.width}*${t.canvasCfg.height}`,set:U=>{const[S,I]=U.split("*");e("update:canvasCfg",{...t.canvasCfg,width:Number(S),height:Number(I)})}}),a=q({get:()=>t.canvasCfg.width,set:U=>{e("update:canvasCfg",{...t.canvasCfg,width:U})}}),o=q({get:()=>t.canvasCfg.height,set:U=>{e("update:canvasCfg",{...t.canvasCfg,height:U})}}),l=[{label:"pc端",options:[{value:"1170*660",label:"适配左侧菜单"},{value:"1395*660",label:"适配菜单收起"},{value:"1920*1080",label:"1920*1080"},{value:"1600*900",label:"1600*900"},{value:"1366*768",label:"1366*768"}]},{label:"移动端",options:[{value:"1024*1366",label:"1024*1366"},{value:"768*1024",label:"768*1024"},{value:"480*800",label:"480*800"}]}],c=q({get:()=>t.canvasCfg.scale,set:U=>{e("update:canvasCfg",{...t.canvasCfg,scale:U})}}),u=q({get:()=>t.canvasCfg.scale,set:U=>{e("update:canvasCfg",{...t.canvasCfg,scale:U})}}),B=[{value:.5,label:.5},{value:1,label:1},{value:1.5,label:1.5},{value:2,label:2}],f=q({get:()=>t.canvasCfg.color,set:U=>{e("update:canvasCfg",{...t.canvasCfg,color:U})}}),g=X(!1),h=X([]),w=q({get:()=>t.gridCfg.enabled,set:U=>{e("update:gridCfg",{...t.gridCfg,enabled:U})}}),m=q({get:()=>t.gridCfg.align,set:U=>{e("update:gridCfg",{...t.gridCfg,align:U})}}),y=q({get:()=>t.gridCfg.size,set:U=>{e("update:gridCfg",{...t.gridCfg,size:U})}}),H=U=>{if(g.value=!1,U.raw.type.includes("image/")){if(U.raw.size/1024/1024>1)return fA.error("不能上传超过1MB的图像!"),s.value.clearFiles(),h.value=[],!1}else return fA.error("只能上传图片!"),s.value.clearFiles(),h.value=[],!1;ma(U.raw).then(S=>{e("update:canvasCfg",{...t.canvasCfg,img:S})})},T=()=>{s.value.clearFiles(),e("update:canvasCfg",{...t.canvasCfg,img:""})},D=q({get:()=>t.canvasCfg.adsorp,set:U=>{e("update:canvasCfg",{...t.canvasCfg,adsorp:U})}}),E=q({get:()=>t.canvasCfg.guide,set:U=>{e("update:canvasCfg",{...t.canvasCfg,guide:U})}});return(U,S)=>(O(),Y(p(ba),{modelValue:n.value,"onUpdate:modelValue":S[14]||(S[14]=I=>n.value=I),class:"select-none"},{default:v(()=>[C(p(Ea),{label:"页面",name:"page"},{default:v(()=>[C(p(Fa),{"label-width":"70px","label-position":"left"},{default:v(()=>[C(p(ie),{label:"画布尺寸",size:"small"},{default:v(()=>[C(p(qn),{modelValue:i.value,"onUpdate:modelValue":S[2]||(S[2]=I=>i.value=I),placeholder:"请设置画布尺寸"},{default:v(()=>[C(p(Js),{label:"自定义"},{default:v(()=>[j("div",xc,[C(p(Nt),{modelValue:a.value,"onUpdate:modelValue":S[0]||(S[0]=I=>a.value=I),size:"small",controls:!1,class:"w-5/10 pl-5px"},null,8,["modelValue"]),C(p(Wr),null,{default:v(()=>[...S[15]||(S[15]=[oA("*",-1)])]),_:1}),C(p(Nt),{modelValue:o.value,"onUpdate:modelValue":S[1]||(S[1]=I=>o.value=I),size:"small",controls:!1,class:"w-5/10 pr-5px"},null,8,["modelValue"])])]),_:1}),(O(),sA(Be,null,me(l,I=>C(p(Js),{key:I.label,label:I.label},{default:v(()=>[(O(!0),sA(Be,null,me(I.options,_=>(O(),Y(p(As),{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:2},1032,["label"])),64))]),_:1},8,["modelValue"])]),_:1}),C(p(ie),{label:"缩放倍数",size:"small"},{default:v(()=>[C(p(qn),{modelValue:u.value,"onUpdate:modelValue":S[4]||(S[4]=I=>u.value=I),placeholder:"请设置缩放比例",size:"small"},{default:v(()=>[(O(),sA(Be,null,me(B,I=>C(p(As),{key:I.value,label:I.label,value:I.value},null,8,["label","value"])),64)),j("div",Sc,[C(p(Wr),null,{default:v(()=>[...S[16]||(S[16]=[oA("自定义:",-1)])]),_:1}),C(p(Nt),{modelValue:c.value,"onUpdate:modelValue":S[3]||(S[3]=I=>c.value=I),size:"small",step:.1,min:.1,class:"mx-5px"},null,8,["modelValue"])])]),_:1},8,["modelValue"])]),_:1}),C(p(ie),{label:"背景颜色",size:"small"},{default:v(()=>[C(p(ya),{modelValue:f.value,"onUpdate:modelValue":S[5]||(S[5]=I=>f.value=I)},null,8,["modelValue"])]),_:1}),C(p(ie),{label:"背景图片",size:"small"},{default:v(()=>[C(p(Qa),{ref_key:"canvasBgImgUploadRef",ref:s,class:"w-24px h-24px","file-list":h.value,"onUpdate:fileList":S[6]||(S[6]=I=>h.value=I),"auto-upload":!1,limit:1,"show-file-list":!1,"on-change":H,accept:"image/*",onMouseenter:S[7]||(S[7]=I=>g.value=!0),onMouseleave:S[8]||(S[8]=I=>g.value=!1)},{default:v(()=>[j("div",Tc,[t.canvasCfg.img?(O(),sA("img",{key:0,class:"w-40px h-40px absolute left-0",src:t.canvasCfg.img},null,8,Lc)):(O(),Y(p(cA),{key:1,size:"small",class:"w-40px h-40px absolute left-0"},{default:v(()=>[C(p(YA),{title:"上传",size:20},{default:v(()=>[C(JA,{name:"upload"})]),_:1})]),_:1})),t.canvasCfg.img&&g.value?(O(),sA("div",{key:2,class:"absolute w-40px h-40px left-0 opacity-80 bg-light-300 flex justify-center items-center",onClick:zr(T,["stop"])},[C(p(YA),{title:"删除",size:25},{default:v(()=>[C(JA,{name:"delete"})]),_:1})])):hA("",!0)])]),_:1},8,["file-list"])]),_:1}),C(p(ie),{label:"参考线",size:"small"},{default:v(()=>[C(p(ot),{modelValue:E.value,"onUpdate:modelValue":S[9]||(S[9]=I=>E.value=I)},null,8,["modelValue"])]),_:1}),C(p(ie),{label:"吸附",size:"small"},{default:v(()=>[C(p(ot),{modelValue:D.value,"onUpdate:modelValue":S[10]||(S[10]=I=>D.value=I)},null,8,["modelValue"])]),_:1}),C(p(ie),{label:"网格",size:"small"},{default:v(()=>[C(p(ot),{modelValue:w.value,"onUpdate:modelValue":S[11]||(S[11]=I=>w.value=I)},null,8,["modelValue"])]),_:1}),w.value?(O(),Y(p(ie),{key:0,label:"网格对齐",size:"small"},{default:v(()=>[C(p(ot),{modelValue:m.value,"onUpdate:modelValue":S[12]||(S[12]=I=>m.value=I)},null,8,["modelValue"])]),_:1})):hA("",!0),w.value?(O(),Y(p(ie),{key:1,label:"网格大小",size:"small"},{default:v(()=>[C(p(Nt),{modelValue:y.value,"onUpdate:modelValue":S[13]||(S[13]=I=>y.value=I),min:1},null,8,["modelValue"])]),_:1})):hA("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),qs=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],Ts=MA({name:"VAceEditor",props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...qs],render(){return gl("div")},mounted(){const r=this._editor=fl(dl.edit(this.$el,{placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines,...this.options}));this._contentBackup=this.value,this._isSettingContent=!1,r.on("change",()=>{if(this._isSettingContent)return;const A=r.getValue();this._contentBackup=A,this.$emit("update:value",A)}),qs.forEach(A=>{const t="on"+hl(A);typeof this.$.vnode.props[t]=="function"&&r.on(A,this.$emit.bind(this,A))}),this._ro=new pl(()=>r.resize()),this._ro.observe(this.$el),this.$emit("init",r)},beforeUnmount(){var r,A;(r=this._ro)===null||r===void 0||r.disconnect(),(A=this._editor)===null||A===void 0||A.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(r){if(this._contentBackup!==r){try{this._isSettingContent=!0,this._editor.setValue(r,1)}finally{this._isSettingContent=!1}this._contentBackup=r}},theme(r){this._editor.setTheme("ace/theme/"+r)},options(r){this._editor.setOptions(r)},readonly(r){this._editor.setReadOnly(r)},placeholder(r){this._editor.setOption("placeholder",r)},wrap(r){this._editor.setWrapBehavioursEnabled(r)},printMargin(r){this._editor.setOption("printMargin",r)},lang(r){this._editor.setOption("mode","ace/mode/"+r)},minLines(r){this._editor.setOption("minLines",r)},maxLines(r){this._editor.setOption("maxLines",r)}}}),Kc={class:"dialog-footer"},_c=MA({__name:"json-edit",props:{contentObj:{type:Object,default:()=>{}}},emits:["update:contentObj"],setup(r,{emit:A}){const t=r,e=X(!1),n=A,s=X(JSON.stringify(t.contentObj,null,2)),i=()=>{n("update:contentObj",JSON.parse(s.value)),e.value=!1};return(a,o)=>(O(),sA("div",null,[C(p(cA),{type:"primary",plain:"",round:"",onClick:o[0]||(o[0]=l=>e.value=!0)},{default:v(()=>[...o[4]||(o[4]=[oA("点击编辑",-1)])]),_:1}),C(p(ut),{modelValue:e.value,"onUpdate:modelValue":o[3]||(o[3]=l=>e.value=l),title:"配置编辑",width:"60%"},{footer:v(()=>[j("span",Kc,[C(p(cA),{type:"primary",onClick:i},{default:v(()=>[...o[5]||(o[5]=[oA("确定",-1)])]),_:1}),C(p(cA),{type:"primary",onClick:o[2]||(o[2]=l=>e.value=!1)},{default:v(()=>[...o[6]||(o[6]=[oA("关闭",-1)])]),_:1})])]),default:v(()=>[C(p(Ts),{value:s.value,"onUpdate:value":o[1]||(o[1]=l=>s.value=l),lang:"json",theme:"monokai",style:{height:"400px"},options:{useWorker:!0,enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}},null,8,["value"])]),_:1},8,["modelValue"])]))}}),Mc={class:"demo-pagination-block"},Oc=MA({__name:"imageModel",props:{dialogImageVisible:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},isDelete:{type:Boolean,default:!1},isBinding:{type:Boolean,default:!1},isUpload:{type:Boolean,default:!1}},emits:["updateDialogImageVisible","bindingImg"],setup(r,{emit:A}){const t=r;console.log("dialogImageVisible:",t.dialogImageVisible);const e=A,n=K=>{e("bindingImg",K)},s=q({get:()=>t.dialogImageVisible,set:K=>e("updateDialogImageVisible",K)}),i=nr({fileId:null,fileName:null,fileDate:null}),a=X(!1),o=X("");let l=X(!1),c=X(!1),u=X(1),B=X(4),f=X(0),g=X(""),h=X("");const w=X([]);async function m(){let K={id:h.value,fileName:g.value};const x=await $t.fileStorage_editFileNameById_post(K);x.code==200?fA.success(x.data):fA.error(x.message+",请联系管理员"),_(),c.value=!1,g.value="",h.value=""}async function y(K){let x={id:K};const F=await $t.fileStorage_deleteFileById_get(x);F.code==200?fA.success(F.data):fA.error(F.message+",请联系管理员"),_()}function H(K){_(),fA({message:"文件存储成功",type:"success"})}function T(){_()}function D(){i.fileId=null,i.fileName=null,i.fileDate=null}const E=K=>{console.log("size点击:",`${K} items per page`),_()},U=K=>{console.log("Current点击:",`current page: ${K}`),_()};function S(K,x){g.value=K,h.value=x,c.value=!0}function I(K){o.value=K,a.value=!0}async function _(){l.value=!0;let K={pageNum:u.value,pageSize:B.value,id:i.fileId,fileName:i.fileName,startTime:i.fileDate?new Date(i.fileDate[0]).getTime():null,endTime:i.fileDate?new Date(i.fileDate[1]).getTime():null};console.log("endJson:",K);const x=await $t.fileStorage_file_list_post(K);if(w.value=[],!x.data){l.value=!1;return}f.value=x.data.total,u.value=x.data.current,B.value=x.data.size,x.data.list.forEach(F=>{let J=wl(F.addTime),R=F.id,eA=F.fileName,iA=Cl(Ys,F.filePath);w.value.push({date:J,id:R,name:eA,imgUrl:iA})}),console.log("tableData:",w.value),l.value=!1}return an(()=>{_()}),(K,x)=>{const F=LA("el-input"),J=LA("el-form-item"),R=LA("el-col"),eA=LA("el-row"),iA=LA("el-date-picker"),wA=LA("el-upload"),aA=LA("el-form"),rA=LA("el-table-column"),gA=LA("el-image"),mA=LA("el-table"),CA=LA("el-pagination"),HA=LA("el-image-viewer"),xA=Ia("loading");return O(),sA(Be,null,[C(p(ut),{modelValue:s.value,"onUpdate:modelValue":x[5]||(x[5]=$=>s.value=$),top:"5vh",title:"图片模型",width:"80%",class:"custom-dialog"},{default:v(()=>[C(aA,{model:i,"label-width":"auto",style:{"max-width":"100%"},inline:""},{default:v(()=>[C(eA,{gutter:1},{default:v(()=>[C(R,{span:6},{default:v(()=>[C(J,{label:"文件ID"},{default:v(()=>[C(F,{modelValue:i.fileId,"onUpdate:modelValue":x[0]||(x[0]=$=>i.fileId=$),style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),C(R,{span:6},{default:v(()=>[C(J,{label:"文件名称"},{default:v(()=>[C(F,{modelValue:i.fileName,"onUpdate:modelValue":x[1]||(x[1]=$=>i.fileName=$)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),C(eA,{gutter:20},{default:v(()=>[C(R,{span:10},{default:v(()=>[C(J,{label:"创建时间"},{default:v(()=>[C(iA,{modelValue:i.fileDate,"onUpdate:modelValue":x[2]||(x[2]=$=>i.fileDate=$),type:"daterange","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"default"},null,8,["modelValue"])]),_:1})]),_:1}),C(R,{span:11},{default:v(()=>[C(p(cA),{type:"primary",onClick:T},{default:v(()=>[...x[9]||(x[9]=[oA("查询",-1)])]),_:1}),C(p(cA),{type:"info",onClick:D},{default:v(()=>[...x[10]||(x[10]=[oA("重置",-1)])]),_:1})]),_:1}),r.isUpload?(O(),Y(R,{key:0,span:3},{default:v(()=>[C(wA,{accept:"image/*",action:p(Ys)+"/fileStorage/saveFile","on-success":H,"show-file-list":!1,style:{width:"100%",padding:"0 10px"}},{default:v(()=>[C(p(cA),{type:"success"},{default:v(()=>[...x[11]||(x[11]=[oA("上传图片",-1)])]),_:1})]),_:1},8,["action"])]),_:1})):hA("",!0)]),_:1})]),_:1},8,["model"]),Tt((O(),Y(mA,{data:w.value,style:{width:"100%",height:"395px"}},{default:v(()=>[C(rA,{prop:"id",label:"文件ID"}),C(rA,{prop:"date",label:"添加时间"}),C(rA,{prop:"name",label:"文件名称"}),C(rA,{prop:"imgUrl",label:"文件",width:"180"},{default:v($=>[C(gA,{style:{width:"65px",height:"65px"},src:$.row.imgUrl,"preview-src-list":[],fit:"cover",onClick:zA=>I($.row.imgUrl)},null,8,["src","onClick"])]),_:1}),r.isEdit||r.isDelete||r.isBinding?(O(),Y(rA,{key:0,fixed:"right",label:"操作"},{default:v($=>[r.isEdit?(O(),Y(p(cA),{key:0,link:"",type:"primary",size:"small",onClick:zA=>S($.row.name,$.row.id)},{default:v(()=>[...x[12]||(x[12]=[oA(" 编辑 ",-1)])]),_:1},8,["onClick"])):hA("",!0),r.isDelete?(O(),Y(p(cA),{key:1,link:"",type:"danger",size:"small",onClick:zA=>y($.row.id)},{default:v(()=>[...x[13]||(x[13]=[oA("删除",-1)])]),_:1},8,["onClick"])):hA("",!0),r.isBinding?(O(),Y(p(cA),{key:2,link:"",type:"success",size:"small",onClick:zA=>n($.row)},{default:v(()=>[...x[14]||(x[14]=[oA("绑定",-1)])]),_:1},8,["onClick"])):hA("",!0)]),_:1})):hA("",!0)]),_:1},8,["data"])),[[xA,p(l)]]),j("div",Mc,[C(CA,{"current-page":p(u),"onUpdate:currentPage":x[3]||(x[3]=$=>lt(u)?u.value=$:u=$),"page-size":p(B),"onUpdate:pageSize":x[4]||(x[4]=$=>lt(B)?B.value=$:B=$),"page-sizes":[4,8,12],"pager-count":3,size:"default",layout:"total,sizes,-> ,prev, pager, next",total:p(f),onSizeChange:E,onCurrentChange:U},null,8,["current-page","page-size","total"])])]),_:1},8,["modelValue"]),C(p(ut),{modelValue:p(c),"onUpdate:modelValue":x[7]||(x[7]=$=>lt(c)?c.value=$:c=$),title:"修改文件名称",width:"500"},{default:v(()=>[C(eA,{gutter:20},{default:v(()=>[C(R,{span:24},{default:v(()=>[C(F,{modelValue:p(g),"onUpdate:modelValue":x[6]||(x[6]=$=>lt(g)?g.value=$:g=$)},null,8,["modelValue"])]),_:1})]),_:1}),x[16]||(x[16]=j("br",null,null,-1)),C(eA,{gutter:20},{default:v(()=>[C(R,{span:20}),C(R,{span:4},{default:v(()=>[C(p(cA),{type:"primary",onClick:m},{default:v(()=>[...x[15]||(x[15]=[oA(" 提交 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),a.value?(O(),Y(HA,{key:0,"url-list":[o.value],"z-index":3e3,onClose:x[8]||(x[8]=$=>a.value=!1)},null,8,["url-list"])):hA("",!0)],64)}}}),La=Ke(Oc,[["__scopeId","data-v-afca666c"]]),Vc={key:6},kc=MA({__name:"select-item-props-setting",props:{propsInfo:{}},emits:["imgUpload","selectById","updateDialogImageVisible","bindingImg"],setup(r,{emit:A}){const t=r,e=A;an(()=>{a()});let n=X(!1);function s(){n.value=!1}let i=X();function a(){for(const E in t.propsInfo){const U=t.propsInfo[E];U.type==="inputTypeTag"&&(i.value=U.val)}}let o;const l=X(!1);function c(E){T(),o=E,l.value=!0}let u;const B=E=>{n.value=!0,u=E};function f(E){console.log("绑定图片",E,u),u.val=E.id,e("imgUpload",E),n.value=!1}let g=X([]);function h(E){console.log("绑定",g.value),l.value=!1,g.value=[E.modeId],o.val=E.modeId,e("selectById",E.modeId)}function w(E){switch(E){case"遥信":return 1;case"遥测":return 2;case"遥控":return 3;case"遥调":return 4;default:return 0}}const m=X(""),y=(E,U)=>U.bType===E,H=q(()=>m.value?D.filter(E=>E.name.toLowerCase().includes(m.value.toLowerCase())):D);function T(){let E;i.value!==void 0&&(E=w(i.value)),D.splice(0,D.length);const U=window.globalData;if(U){if(U instanceof Map)U.forEach((S,I)=>{if(E==null||E==S.bType){let _=I,K=S.node.name,x=S.bType;D.push({modeId:_,name:K,bType:x})}});else for(const S in U)if(Object.prototype.hasOwnProperty.call(U,S)){const I=U[S];if(I&&(E==null||E==I.bType)){let _=S,K=I.node.name,x=I.bType;D.push({modeId:_,name:K,bType:x})}}}}const D=[];return(E,U)=>{const S=LA("el-input-tag"),I=LA("el-tag"),_=LA("el-table-column"),K=LA("el-table"),x=LA("el-dialog");return O(),sA(Be,null,[(O(!0),sA(Be,null,me(t.propsInfo,(F,J)=>(O(),sA("div",{key:J},[F.disabled?hA("",!0):(O(),Y(p(ie),{key:0,label:F.title,size:"small"},{default:v(()=>[F.type==="select"&&!F.disabled?(O(),Y(p(qn),{key:0,modelValue:F.val,"onUpdate:modelValue":R=>F.val=R,placeholder:"Select",size:"small",disabled:F==null?void 0:F.disabled},{default:v(()=>[(O(!0),sA(Be,null,me(F.options,R=>(O(),Y(p(As),{key:R.value,label:R.label,value:R.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):F.type==="number"&&!F.disabled?(O(),Y(p(Nt),{key:1,modelValue:F.val,"onUpdate:modelValue":R=>F.val=R,disabled:F==null?void 0:F.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):F.type==="input"&&!F.disabled?(O(),Y(p(jt),{key:2,modelValue:F.val,"onUpdate:modelValue":R=>F.val=R,disabled:F==null?void 0:F.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):F.type==="textArea"&&!F.disabled?(O(),Y(p(jt),{key:3,modelValue:F.val,"onUpdate:modelValue":R=>F.val=R,disabled:F==null?void 0:F.disabled,type:"textarea"},null,8,["modelValue","onUpdate:modelValue","disabled"])):F.type==="color"&&!F.disabled?(O(),Y(p(ya),{key:4,modelValue:F.val,"onUpdate:modelValue":R=>F.val=R,disabled:F==null?void 0:F.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):F.type==="switch"&&!F.disabled?(O(),Y(p(ot),{key:5,modelValue:F.val,"onUpdate:modelValue":R=>F.val=R,disabled:F==null?void 0:F.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):F.type==="jsonEdit"&&!F.disabled?(O(),sA("div",Vc,[C(_c,{contentObj:F.val,"onUpdate:contentObj":R=>F.val=R},null,8,["contentObj","onUpdate:contentObj"])])):F.type==="upload"&&!F.disabled?(O(),Y(S,{key:7,"model-value":[F.val],"tag-type":"success",size:"small",disabled:"",max:1,"max-collapse-tags":1,placeholder:"请绑定"},{prefix:v(()=>[C(p(YA),{onClick:R=>B(F)},{default:v(()=>[C(p(Ws))]),_:1},8,["onClick"])]),_:2},1032,["model-value"])):F.type==="inputTypeTag"&&!F.disabled?(O(),Y(I,{key:8},{default:v(()=>[oA(WA(F.val),1)]),_:2},1024)):F.type==="inputSelectId"&&!F.disabled?(O(),Y(S,{key:9,"model-value":[F.val],"tag-type":"success",size:"small",disabled:"",max:1,"max-collapse-tags":1,placeholder:"请绑定"},{prefix:v(()=>[C(p(YA),{onClick:R=>c(F)},{default:v(()=>[C(p(Ws))]),_:1},8,["onClick"])]),_:2},1032,["model-value"])):hA("",!0)]),_:2},1032,["label"]))]))),128)),C(La,{dialogImageVisible:p(n),isBinding:!0,onUpdateDialogImageVisible:s,onBindingImg:f},null,8,["dialogImageVisible"]),C(x,{modelValue:l.value,"onUpdate:modelValue":U[1]||(U[1]=F=>l.value=F),class:"elDialog",top:"10vh",title:"组件绑定",height:"80%",width:"60%"},{default:v(()=>[C(K,{data:H.value,"max-height":450},{default:v(()=>[C(_,{type:"index",label:"序号"}),C(_,{prop:"modeId",label:"遥ID"}),C(_,{prop:"name",label:"名称"}),p(i)==null?(O(),Y(_,{key:0,prop:"bType",label:"类型筛选",filters:[{text:"遥信",value:1},{text:"遥测",value:2},{text:"遥控",value:3},{text:"遥调",value:4},{text:"其他",value:0}],"filter-method":y,"filter-placement":"bottom-end","filter-confirm-button-text":"确定","filter-reset-button-text":"重置"},{default:v(F=>[F.row.bType===1?(O(),Y(I,{key:0,type:"primary"},{default:v(()=>[...U[2]||(U[2]=[oA(WA("遥信"),-1)])]),_:1})):F.row.bType===2?(O(),Y(I,{key:1,type:"success"},{default:v(()=>[...U[3]||(U[3]=[oA(WA("遥测"),-1)])]),_:1})):F.row.bType===3?(O(),Y(I,{key:2,type:"info"},{default:v(()=>[...U[4]||(U[4]=[oA(WA("遥控"),-1)])]),_:1})):F.row.bType===4?(O(),Y(I,{key:3,type:"warning"},{default:v(()=>[...U[5]||(U[5]=[oA(WA("遥调"),-1)])]),_:1})):(O(),Y(I,{key:4,type:"danger"},{default:v(()=>[...U[6]||(U[6]=[oA(WA("其他"),-1)])]),_:1}))]),_:1})):hA("",!0),p(i)!=null?(O(),Y(_,{key:1,label:"类型"},{default:v(F=>[F.row.bType===1?(O(),Y(I,{key:0,type:"primary"},{default:v(()=>[...U[7]||(U[7]=[oA(WA("遥信"),-1)])]),_:1})):F.row.bType===2?(O(),Y(I,{key:1,type:"success"},{default:v(()=>[...U[8]||(U[8]=[oA(WA("遥测"),-1)])]),_:1})):F.row.bType===3?(O(),Y(I,{key:2,type:"info"},{default:v(()=>[...U[9]||(U[9]=[oA(WA("遥控"),-1)])]),_:1})):F.row.bType===4?(O(),Y(I,{key:3,type:"warning"},{default:v(()=>[...U[10]||(U[10]=[oA(WA("遥调"),-1)])]),_:1})):hA("",!0)]),_:1})):hA("",!0),C(_,{align:"center"},{header:v(()=>[C(p(jt),{modelValue:m.value,"onUpdate:modelValue":U[0]||(U[0]=F=>m.value=F),size:"small",placeholder:"节点名称"},null,8,["modelValue"])]),default:v(F=>[C(p(cA),{size:"small",onClick:J=>h(F.row)},{default:v(()=>[...U[11]||(U[11]=[oA(" 绑定 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"])],64)}}}),Rc=Ke(kc,[["__scopeId","data-v-b6eb4910"]]),Nc=MA({__name:"select-item-setting",props:{itemJson:{},doneJson:{}},emits:["update:itemJson","addHistory","imgUpload","selectById"],setup(r,{emit:A}){const t=X("config"),e=X(["1"]);Ql();function n(){}const s=r,i=A,a=Ss();function o(g){var h;zs.emit(((h=s.itemJson)==null?void 0:h.id)||"",g||"")}function l(g){var h,w;console.log("selectById触发事件:",g),g&&(console.log("事件:",((h=s.itemJson)==null?void 0:h.id)||""),zs.emit(((w=s.itemJson)==null?void 0:w.id)||"",g))}q(()=>{var g;return((g=s.itemJson)==null?void 0:g.type)==="sys-line"});const c=q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.title},set:g=>{console.log("右侧属性修改1"),i("update:itemJson",{...s.itemJson,title:g})}});q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.binfo.left},set:g=>{var h;console.log("右侧属性修改2"),i("update:itemJson",{...s.itemJson,binfo:{...(h=s.itemJson)==null?void 0:h.binfo,left:g}})}}),q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.binfo.top},set:g=>{var h;console.log("右侧属性修改3"),i("update:itemJson",{...s.itemJson,binfo:{...(h=s.itemJson)==null?void 0:h.binfo,top:g}})}}),q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.binfo.width},set:g=>{var h;console.log("右侧属性修改4"),i("update:itemJson",{...s.itemJson,binfo:{...(h=s.itemJson)==null?void 0:h.binfo,width:g}})}}),q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.binfo.height},set:g=>{var h;console.log("右侧属性修改5"),i("update:itemJson",{...s.itemJson,binfo:{...(h=s.itemJson)==null?void 0:h.binfo,height:g}})}}),q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.binfo.angle},set:g=>{var h;console.log("右侧属性修改6"),i("update:itemJson",{...s.itemJson,binfo:{...(h=s.itemJson)==null?void 0:h.binfo,angle:g}})}});const u=q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.hide},set:g=>{console.log("右侧属性修改7"),i("update:itemJson",{...s.itemJson,hide:g})}}),B=q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.lock},set:g=>{console.log("右侧属性修改8"),i("update:itemJson",{...s.itemJson,lock:g})}});q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.resize},set:g=>{console.log("右侧属性修改9"),i("update:itemJson",{...s.itemJson,resize:g})}}),q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.use_proportional_scaling},set:g=>{console.log("右侧属性修改10"),i("update:itemJson",{...s.itemJson,use_proportional_scaling:g})}}),q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.rotate},set:g=>{console.log("右侧属性修改11"),i("update:itemJson",{...s.itemJson,rotate:g})}});const f=q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.props},set:g=>{console.log("右侧属性修改12"),i("update:itemJson",{...s.itemJson,props:g})}});return q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.common_animations},set:g=>{console.log("右侧属性修改13"),i("update:itemJson",{...s.itemJson,common_animations:g})}}),q({get:()=>{var g;return(g=s.itemJson)==null?void 0:g.events},set:g=>{console.log("右侧属性修改14"),i("update:itemJson",{...s.itemJson,events:g})}}),q(()=>!!a.deviceBind),(g,h)=>s.itemJson?(O(),Y(p(ba),{key:0,modelValue:t.value,"onUpdate:modelValue":h[8]||(h[8]=w=>t.value=w),stretch:!0,class:"select-none"},{default:v(()=>[j("button",{onClick:n},"查看参数"),C(p(Ea),{label:"配置",name:"config"},{default:v(()=>[C(p(wa),{modelValue:e.value,"onUpdate:modelValue":h[7]||(h[7]=w=>e.value=w)},{default:v(()=>[C(p(Ua),{title:"边界和属性",name:"1"},{default:v(()=>[C(p(Fa),{"label-width":"60px","label-position":"left"},{default:v(()=>[C(p(ie),{label:"标题",size:"small"},{default:v(()=>[C(p(jt),{size:"small",modelValue:c.value,"onUpdate:modelValue":h[0]||(h[0]=w=>c.value=w)},null,8,["modelValue"])]),_:1}),C(p(ie),{label:"隐藏",size:"small"},{default:v(()=>[C(p(ot),{size:"small",modelValue:u.value,"onUpdate:modelValue":h[1]||(h[1]=w=>u.value=w),onChange:h[2]||(h[2]=w=>i("addHistory"))},null,8,["modelValue"])]),_:1}),C(p(ie),{label:"锁定",size:"small"},{default:v(()=>[C(p(ot),{size:"small",modelValue:B.value,"onUpdate:modelValue":h[3]||(h[3]=w=>B.value=w),onChange:h[4]||(h[4]=w=>i("addHistory"))},null,8,["modelValue"])]),_:1}),C(Rc,{propsInfo:f.value,onImgUpload:h[5]||(h[5]=w=>o(w)),onSelectById:h[6]||(h[6]=w=>l(w))},null,8,["propsInfo"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])):hA("",!0)}}),Pc={id:"mt-right-aside",class:"px-4"},Gc=MA({__name:"index",setup(r){const A=Ss(),t=q(()=>d.done_json.findIndex(s=>s.id==d.selected_items_id[0])),e=()=>{tA.addHistory(d.done_json)},n=q(()=>!!A.deviceBind);return(s,i)=>(O(),sA("div",Pc,[p(d).selected_items_id.length==1?(O(),Y(Nc,{key:0,"item-json":p(d).done_json[t.value],"onUpdate:itemJson":i[0]||(i[0]=a=>p(d).done_json[t.value]=a),"done-json":p(d).done_json,onAddHistory:e},Ha({_:2},[n.value?{name:"deviceBind",fn:v(({item:a})=>[xa(s.$slots,"deviceBind",{item:a})]),key:"0"}:void 0]),1032,["item-json","done-json"])):(O(),Y(Dc,{key:1,canvasCfg:p(d).canvasCfg,"onUpdate:canvasCfg":i[1]||(i[1]=a=>p(d).canvasCfg=a),"grid-cfg":p(d).gridCfg,"onUpdate:gridCfg":i[2]||(i[2]=a=>p(d).gridCfg=a)},null,8,["canvasCfg","grid-cfg"]))]))}}),Xc={class:"flex justify-between w-8/10"},Jc=MA({__name:"index",props:{doneJson:{},selectedItemsId:{}},emits:["updateSelectedItemsId","updateSelectedIdHide"],setup(r,{emit:A}){const t=r,e=A,n=q(()=>t.selectedItemsId.length==1?t.selectedItemsId[0]:""),s=o=>{e("updateSelectedItemsId",o.id)},i=o=>{e("updateSelectedIdHide",o.id)},a={children:"nochildren",label:"title"};return(o,l)=>(O(),Y(p(Ca),{data:t.doneJson,props:a,onNodeClick:s,"default-expand-all":!0,"expand-on-click-node":!1,"highlight-current":!0,"node-key":"id","current-node-key":n.value},{default:v(({node:c,data:u})=>[j("div",Xc,[j("div",null,WA(c.label),1),C(p(cA),{text:"",circle:"",size:"small",class:"mr-10px"},{default:v(()=>[C(p(YA),{title:u.hide?"隐藏":"显示",size:20,onClick:zr(B=>i(u),["stop"])},{default:v(()=>[C(JA,{name:u.hide?"view-hide":"view-show"},null,8,["name"])]),_:2},1032,["title","onClick"])]),_:2},1024)])]),_:1},8,["data","current-node-key"]))}}),Yc=MA({__name:"index",props:{doneJson:{},canvasCfg:{},gridCfg:{}},setup(r){const A=r,t=q({get:()=>{const{exportJson:e}=Nr(A.canvasCfg,A.gridCfg,A.doneJson);return JSON.stringify(e,null,2)},set:()=>{}});return(e,n)=>(O(),sA("div",null,[C(p(Ts),{value:t.value,"onUpdate:value":n[0]||(n[0]=s=>t.value=s),lang:"json",theme:"monokai",style:{height:"400px"},options:{useWorker:!0,enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}},null,8,["value"])]))}}),Wc=MA({__name:"index",setup(r,{expose:A}){const t=X("");return A({onImport:()=>new Promise((n,s)=>{try{const i=JSON.parse(t.value),{canvasCfg:a,gridCfg:o,importDoneJson:l}=es(i);d.canvasCfg=a,d.gridCfg=o,d.setGlobalStoreDoneJson(l),n(!0)}catch{n(!1)}})}),(n,s)=>(O(),sA("div",null,[C(p(Ts),{value:t.value,"onUpdate:value":s[0]||(s[0]=i=>t.value=i),lang:"json",theme:"monokai",style:{height:"400px"},options:{useWorker:!0,enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}},null,8,["value"])]))}}),zc={id:"mt-edit",class:"relative flex-auto w-1/1 h-1/1 dark"},Zc={class:"drawer-footer"},jc={class:"dialog-footer"},$c=MA({__name:"index",props:{useThumbnail:{type:Boolean,default:!1},screen:{}},emits:["onPreviewClick","onReturnClick","onSaveClick","onThumbnailClick","onRightDrawer","onImageDialog","updateDialogImageVisible"],setup(r,{expose:A,emit:t}){const e={value:"id",label:"label",children:"children",disabled:"disabled"};let n=[];function s(){c.value=!1}const i=()=>{c.value=!0,console.log("点击:",c.value)};function a(P,k){P.forEach(AA=>{var yA,PA,VA,Q,b,L,V,z,lA;if(!AA.children&&!((yA=AA.meta)!=null&&yA.treeHidden)&&k.push({id:AA.name,label:(PA=AA.meta)==null?void 0:PA.title}),AA.children&&((VA=AA.children)==null?void 0:VA.length)===1&&!((Q=AA.meta)!=null&&Q.treeHidden)&&k.push({id:AA.name,label:(b=AA.meta)==null?void 0:b.title,disabled:!0,children:[{id:AA.children[0].name,label:(L=AA.children[0].meta)==null?void 0:L.title}]}),AA.children&&((V=AA.children)==null?void 0:V.length)>1&&!((z=AA.meta)!=null&&z.treeHidden)){const Z={id:AA.name,label:(lA=AA.meta)==null?void 0:lA.title,disabled:!0,children:[]};a(AA.children,Z.children),k.push(Z)}})}let o=X(!1),l=X(!1),c=X(!1),u=X(""),B=X("");const f=r,g=t,h=Ss(),w=X(),m=X(),y=nr({left_show:!0,right_show:!0}),H=q(()=>!!h.deviceBind),T=q(()=>d.selected_items_id.length>0),D=q(()=>d.selected_items_id.length>1),E=q(()=>{if(d.selected_items_id.length===1){const P=d.done_json.find(k=>k.id===d.selected_items_id[0]);return(P==null?void 0:P.type)==="group"}return!1}),U=q(()=>d.done_json.filter(k=>d.selected_items_id.includes(k.id)&&k.type!=="sys-line").length>1),S=X(!1),I=X(!1),_=X(!1),K=X(!1),x=()=>{d.deleteSelectedItems(),tA.addHistory(d.done_json)},F=()=>{var P;S.value=!0,(P=w.value)==null||P.stopListenerKeyDown()},J=()=>{var P;I.value=!0,(P=w.value)==null||P.stopListenerKeyDown()},R=P=>{d.setSingleSelect(P)},eA=P=>{const k=d.done_json.find(AA=>AA.id===P);k&&(k.hide=!k.hide)},iA=P=>{var k;(k=w.value)==null||k.onAlignSelected(P)},wA=()=>{window.open("http://mt.yaolm.top")},aA=()=>{var P;(P=w.value)==null||P.onRedo()},rA=()=>{var P;(P=w.value)==null||P.onUndo()},gA=async()=>{var k;await((k=m.value)==null?void 0:k.onImport())?(S.value=!1,tA.addHistory(d.done_json)):fA.error("导入失败,请检查数据格式")},mA=()=>{const{exportJson:P}=Nr(d.canvasCfg,d.gridCfg,d.done_json);g("onPreviewClick",P)},CA=()=>{const{exportJson:P}=Nr(d.canvasCfg,d.gridCfg,d.done_json);g("onSaveClick",P)},HA=()=>{g("onThumbnailClick")},xA=P=>{K.value=P};nr([]);let $=X("-1");function zA(){console.log("选中:",$.value,$),!$.value||$.value=="-1"?fA.warning("请先选择一个模型文件"):console.log("删除模型:",$.value)}async function et(){OA.value=!0;const{exportJson:P}=Nr(d.canvasCfg,d.gridCfg,d.done_json);let k={menuType:B.value,canvasCfg:P.canvasCfg,gridCfg:P.gridCfg,json:P.json};try{const AA=await $t.saveOrUpdate_modelData_post(k);AA.code==200?(OA.value=!1,l.value=!1,fA.success("数据模型保存成功")):(OA.value=!1,l.value=!1,console.error("保存失败:",AA.code,AA.message),console.error("服务器返回错误信息:",AA.message),fA.error(`数据模型保存失败: ${AA.code} - ${AA.message}`))}catch(AA){OA.value=!1,l.value=!1,console.error("请求错误:",AA),fA.error("网络请求失败")}}function tt(){var k;let P=(k=ZA.value)==null?void 0:k.getCheckedNodes();console.log(P==null?void 0:P.length),(P==null?void 0:P.length)===0?fA.warning("请至少选择一个模型文件"):(l.value=!0,u.value=P==null?void 0:P[0].label,B.value=P==null?void 0:P[0].id)}const OA=X(!1);async function Me(){var k;OA.value=!1;let P=(k=ZA.value)==null?void 0:k.getCheckedNodes();if(console.log(P==null?void 0:P.length),(P==null?void 0:P.length)===0)OA.value=!1,fA.warning("请至少选择一个模型文件");else{let AA={menuType:P==null?void 0:P[0].id};console.log("请求数据类型:",typeof JSON.stringify(AA));try{const yA=await $t.model_getModelData_post(AA);if(console.log("响应状态:",typeof yA),yA.code==200){fA.success("请求数据成功");const PA=yA.data,{canvasCfg:VA,gridCfg:Q,importDoneJson:b}=es(PA);d.canvasCfg=VA,d.gridCfg=Q,d.setGlobalStoreDoneJson(b),OA.value=!1}else OA.value=!1,fA.error(`数据模型加载失败: ${yA.code} - ${yA.message}`)}catch(yA){OA.value=!1,console.error("请求错误:",yA),fA.error("网络请求失败")}}}const Oe=()=>{o.value=!0};an(()=>{a(Fl,n)});const Ve=P=>{const{canvasCfg:k,gridCfg:AA,importDoneJson:yA}=es(P);return d.canvasCfg=k,d.gridCfg=AA,d.setGlobalStoreDoneJson(yA),tA.history[0]=yA,!0},ZA=X(),ke=(P,k)=>{var yA,PA,VA;const AA=(yA=ZA.value)==null?void 0:yA.getCheckedKeys();AA&&AA.length>1&&((PA=ZA.value)==null||PA.setCheckedKeys([k.checkedKeys[1]])),console.log("当前选中的节点:",(VA=ZA.value)==null?void 0:VA.getCheckedNodes())};return A({setImportJson:Ve}),(P,k)=>{const AA=LA("Document"),yA=LA("Folder"),PA=LA("FolderOpened"),VA=LA("el-icon"),Q=Ia("loading");return O(),sA("div",zc,[C(p(Zs),{class:"h-1/1"},{default:v(()=>[C(p(ml),{height:"45px",class:"dark:bg-myDarkBgColor cb-border p-0 select-none",onMousedown:k[5]||(k[5]=b=>{var L;return(L=w.value)==null?void 0:L.stopListenerKeyDown()})},{default:v(()=>{var b,L;return[C(kl,{leftAside:y.left_show,"onUpdate:leftAside":k[0]||(k[0]=V=>y.left_show=V),rightAside:y.right_show,"onUpdate:rightAside":k[1]||(k[1]=V=>y.right_show=V),"lock-state":p(d).lock,"onUpdate:lockState":k[2]||(k[2]=V=>p(d).lock=V),"selected-items-id":p(d).selected_items_id,"group-enabled":D.value,"un-group-enabled":E.value,"align-enabled":U.value,"delete-enabled":T.value,"undo-enabled":p(tA).historyIndex>0,"redo-enabled":p(tA).historyIndex_.value=!0),onOnHelpClick:wA,onAlignSelected:iA,onOnRedoClick:aA,onOnUndoClick:rA,onOnImportClick:F,onOnReturnClick:k[4]||(k[4]=V=>g("onReturnClick")),onOnSaveClick:CA,onOnPreviewClick:mA,onOnThumbnailClick:HA,onOnDrawLineClick:xA,onOnRightDrawer:Oe,onOnImageDialog:i},null,8,["leftAside","rightAside","lock-state","selected-items-id","group-enabled","un-group-enabled","align-enabled","delete-enabled","undo-enabled","redo-enabled","real-time-data","use-thumbnail","onOnGroupClick","onOnUngroupClick"])]}),_:1}),C(p(Zs),{class:"h-[calc(100%-45px-40px)]"},{default:v(()=>[C(p(js),{width:y.left_show?"200px":"0px",class:"dark:bg-myDarkBgColor cr-border mt-edit-aside h-1/1 select-none",onMousedown:k[6]||(k[6]=b=>{var L;return(L=w.value)==null?void 0:L.stopListenerKeyDown()})},{default:v(()=>[C(ec,{leftAsideConfig:p($n).config},null,8,["leftAsideConfig"])]),_:1},8,["width"]),C(p(Ul),{class:"dark:bg-myMainDarkBgColor",onMousedown:k[7]||(k[7]=b=>{var L;return(L=w.value)==null?void 0:L.beginListenerKeyDown()})},{default:v(()=>[C(Hc,{ref_key:"mainPanelRef",ref:w,"group-enabled":D.value,"un-group-enabled":E.value,"delete-enabled":T.value,"line-append-enable":K.value},null,8,["group-enabled","un-group-enabled","delete-enabled","line-append-enable"])]),_:1}),C(p(js),{width:y.right_show?"200px":"0px",class:"dark:bg-myDarkBgColor cl-border mt-edit-aside select-none",onMousedown:k[8]||(k[8]=b=>{var L;return(L=w.value)==null?void 0:L.stopListenerKeyDown()})},{default:v(()=>[C(Gc,null,Ha({_:2},[H.value?{name:"deviceBind",fn:v(({item:b})=>[xa(P.$slots,"deviceBind",{item:b},void 0,!0)]),key:"0"}:void 0]),1024)]),_:3},8,["width"])]),_:3})]),_:3}),C(p(ut),{modelValue:S.value,"onUpdate:modelValue":k[9]||(k[9]=b=>S.value=b),title:"数据导入",onClose:k[10]||(k[10]=b=>{var L;return(L=w.value)==null?void 0:L.beginListenerKeyDown()})},{footer:v(()=>[C(p(cA),{type:"primary",onClick:gA},{default:v(()=>[...k[17]||(k[17]=[oA("确定",-1)])]),_:1})]),default:v(()=>[C(Wc,{ref_key:"importJsonRef",ref:m},null,512)]),_:1},8,["modelValue"]),C(p(ut),{modelValue:I.value,"onUpdate:modelValue":k[11]||(k[11]=b=>I.value=b),title:"数据导出",onClose:k[12]||(k[12]=b=>{var L;return(L=w.value)==null?void 0:L.beginListenerKeyDown()})},{default:v(()=>[C(Yc,{"done-json":p(Se)(p(d).done_json),"canvas-cfg":p(d).canvasCfg,"grid-cfg":p(d).gridCfg},null,8,["done-json","canvas-cfg","grid-cfg"])]),_:1},8,["modelValue"]),C(p($s),{modelValue:_.value,"onUpdate:modelValue":k[13]||(k[13]=b=>_.value=b),title:"图形结构树",direction:"ltr",size:"30%"},{default:v(()=>[C(Jc,{"done-json":p(d).done_json,"selected-items-id":p(d).selected_items_id,onUpdateSelectedItemsId:R,onUpdateSelectedIdHide:eA},null,8,["done-json","selected-items-id"])]),_:1},8,["modelValue"]),C(p($s),{modelValue:p(o),"onUpdate:modelValue":k[14]||(k[14]=b=>lt(o)?o.value=b:o=b),modal:!1,title:"数据模型文件111","modal-penetrable":""},{footer:v(()=>[j("div",Zc,[C(p(cA),{onClick:tt},{default:v(()=>[...k[18]||(k[18]=[oA("保存模型11",-1)])]),_:1}),Tt((O(),Y(p(cA),{onClick:Me},{default:v(()=>[...k[19]||(k[19]=[oA("加载模型2",-1)])]),_:1})),[[Q,OA.value,void 0,{fullscreen:!0,lock:!0}]]),C(p(cA),{onClick:zA},{default:v(()=>[...k[20]||(k[20]=[oA(" 移除模型 ",-1)])]),_:1})])]),default:v(()=>[C(p(vl),{style:{"max-width":"600px",height:"100"},data:p(n),props:e,height:450,"show-checkbox":!0,"check-strictly":!0,"highlight-current":!0,onCheck:ke,ref_key:"treeRef",ref:ZA},{default:v(({node:b})=>[C(VA,{class:"el-icon--left"},{default:v(()=>[b.isLeaf?(O(),Y(AA,{key:0})):b.expanded?(O(),Y(PA,{key:2})):(O(),Y(yA,{key:1}))]),_:2},1024),j("span",{class:ze(["prefix",{"is-leaf":b.isLeaf}])},WA(b.label),3)]),_:1},8,["data"])]),_:1},8,["modelValue"]),C(p(ut),{modelValue:p(l),"onUpdate:modelValue":k[16]||(k[16]=b=>lt(l)?l.value=b:l=b),title:"数据模型保存",width:"500"},{footer:v(()=>[j("div",jc,[C(p(cA),{onClick:k[15]||(k[15]=b=>lt(l)?l.value=!1:l=!1)},{default:v(()=>[...k[21]||(k[21]=[oA("取消",-1)])]),_:1}),Tt((O(),Y(p(cA),{type:"primary",onClick:et},{default:v(()=>[...k[22]||(k[22]=[oA(" 确定 ",-1)])]),_:1})),[[Q,OA.value,void 0,{fullscreen:!0,lock:!0}]])])]),default:v(()=>[j("span",null,"确定保存或者覆盖 "+WA(p(u))+" 模型文件?",1)]),_:1},8,["modelValue"]),p(c)?(O(),Y(La,{key:0,dialogImageVisible:p(c),isEdit:!0,isDelete:!0,isBinding:!1,isUpload:!0,onUpdateDialogImageVisible:s},null,8,["dialogImageVisible"])):hA("",!0)])}}}),qc=Ke($c,[["__scopeId","data-v-593f0dd0"]]);var on={exports:{}},Pt={exports:{}};(function(){var r,A,t,e,n,s;typeof performance<"u"&&performance!==null&&performance.now?Pt.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Pt.exports=function(){return(r()-n)/1e6},A=process.hrtime,r=function(){var i;return i=A(),i[0]*1e9+i[1]},e=r(),s=process.uptime()*1e9,n=e-s):Date.now?(Pt.exports=function(){return Date.now()-t},t=Date.now()):(Pt.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(Sa);var Au=Pt.exports,eu=Au,Te=typeof window>"u"?Sa:window,hr=["moz","webkit"],Ht="AnimationFrame",Lt=Te["request"+Ht],sr=Te["cancel"+Ht]||Te["cancelRequest"+Ht];for(var Mt=0;!Lt&&Mt3&&(this.alpha=a[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var o=this.r.toString(16),l=this.g.toString(16),c=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),"#"+o+l+c},this.getHelpXML=function(){for(var o=new Array,l=0;l "+h.toRGB()+" -> "+h.toHex());g.appendChild(w),g.appendChild(m),f.appendChild(g)}catch{}return f}};const ts=Ta(nu);/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Da=function(r,A){return(Da=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(r,A)};function Ka(r,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function t(){this.constructor=r}Da(r,A),r.prototype=A===null?Object.create(A):(t.prototype=A.prototype,new t)}function su(r){var A="";Array.isArray(r)||(r=[r]);for(var t=0;tr.phi1&&(r.phi2-=2*Ge),r.sweepFlag===1&&r.phi2e)return[];if(e===0)return[[r*t/(r*r+A*A),A*t/(r*r+A*A)]];var n=Math.sqrt(e);return[[(r*t+A*n)/(r*r+A*A),(A*t-r*n)/(r*r+A*A)],[(r*t-A*n)/(r*r+A*A),(A*t+r*n)/(r*r+A*A)]]}var KA,be=Math.PI/180;function ti(r,A,t){return(1-t)*r+t*A}function ri(r,A,t,e){return r+Math.cos(e/180*Ge)*A+Math.sin(e/180*Ge)*t}function ni(r,A,t,e){var n=1e-6,s=A-r,i=t-A,a=3*s+3*(e-t)-6*i,o=6*(i-s),l=3*s;return Math.abs(a)U&&(f.sweepFlag=+!f.sweepFlag),f})}function i(){return function(a){var o={};for(var l in a)o[l]=a[l];return o}}r.ROUND=function(a){function o(l){return Math.round(l*a)/a}return a===void 0&&(a=1e13),fe(a),function(l){return l.x1!==void 0&&(l.x1=o(l.x1)),l.y1!==void 0&&(l.y1=o(l.y1)),l.x2!==void 0&&(l.x2=o(l.x2)),l.y2!==void 0&&(l.y2=o(l.y2)),l.x!==void 0&&(l.x=o(l.x)),l.y!==void 0&&(l.y=o(l.y)),l.rX!==void 0&&(l.rX=o(l.rX)),l.rY!==void 0&&(l.rY=o(l.rY)),l}},r.TO_ABS=A,r.TO_REL=function(){return n(function(a,o,l){return a.relative||(a.x1!==void 0&&(a.x1-=o),a.y1!==void 0&&(a.y1-=l),a.x2!==void 0&&(a.x2-=o),a.y2!==void 0&&(a.y2-=l),a.x!==void 0&&(a.x-=o),a.y!==void 0&&(a.y-=l),a.relative=!0),a})},r.NORMALIZE_HVZ=function(a,o,l){return a===void 0&&(a=!0),o===void 0&&(o=!0),l===void 0&&(l=!0),n(function(c,u,B,f,g){if(isNaN(f)&&!(c.type&M.MOVE_TO))throw new Error("path must start with moveto");return o&&c.type&M.HORIZ_LINE_TO&&(c.type=M.LINE_TO,c.y=c.relative?0:B),l&&c.type&M.VERT_LINE_TO&&(c.type=M.LINE_TO,c.x=c.relative?0:u),a&&c.type&M.CLOSE_PATH&&(c.type=M.LINE_TO,c.x=c.relative?f-u:f,c.y=c.relative?g-B:g),c.type&M.ARC&&(c.rX===0||c.rY===0)&&(c.type=M.LINE_TO,delete c.rX,delete c.rY,delete c.xRot,delete c.lArcFlag,delete c.sweepFlag),c})},r.NORMALIZE_ST=t,r.QT_TO_C=e,r.INFO=n,r.SANITIZE=function(a){a===void 0&&(a=0),fe(a);var o=NaN,l=NaN,c=NaN,u=NaN;return n(function(B,f,g,h,w){var m=Math.abs,y=!1,H=0,T=0;if(B.type&M.SMOOTH_CURVE_TO&&(H=isNaN(o)?0:f-o,T=isNaN(l)?0:g-l),B.type&(M.CURVE_TO|M.SMOOTH_CURVE_TO)?(o=B.relative?f+B.x2:B.x2,l=B.relative?g+B.y2:B.y2):(o=NaN,l=NaN),B.type&M.SMOOTH_QUAD_TO?(c=isNaN(c)?f:2*f-c,u=isNaN(u)?g:2*g-u):B.type&M.QUAD_TO?(c=B.relative?f+B.x1:B.x1,u=B.relative?g+B.y1:B.y2):(c=NaN,u=NaN),B.type&M.LINE_COMMANDS||B.type&M.ARC&&(B.rX===0||B.rY===0||!B.lArcFlag)||B.type&M.CURVE_TO||B.type&M.SMOOTH_CURVE_TO||B.type&M.QUAD_TO||B.type&M.SMOOTH_QUAD_TO){var D=B.x===void 0?0:B.relative?B.x:B.x-f,E=B.y===void 0?0:B.relative?B.y:B.y-g;H=isNaN(c)?B.x1===void 0?H:B.relative?B.x:B.x1-f:c-f,T=isNaN(u)?B.y1===void 0?T:B.relative?B.y:B.y1-g:u-g;var U=B.x2===void 0?0:B.relative?B.x:B.x2-f,S=B.y2===void 0?0:B.relative?B.y:B.y2-g;m(D)<=a&&m(E)<=a&&m(H)<=a&&m(T)<=a&&m(U)<=a&&m(S)<=a&&(y=!0)}return B.type&M.CLOSE_PATH&&m(f-h)<=a&&m(g-w)<=a&&(y=!0),y?[]:B})},r.MATRIX=s,r.ROTATE=function(a,o,l){o===void 0&&(o=0),l===void 0&&(l=0),fe(a,o,l);var c=Math.sin(a),u=Math.cos(a);return s(u,c,-c,u,o-o*u+l*c,l-o*c-l*u)},r.TRANSLATE=function(a,o){return o===void 0&&(o=0),fe(a,o),s(1,0,0,1,a,o)},r.SCALE=function(a,o){return o===void 0&&(o=a),fe(a,o),s(a,0,0,o,0,0)},r.SKEW_X=function(a){return fe(a),s(1,0,Math.atan(a),1,0,0)},r.SKEW_Y=function(a){return fe(a),s(1,Math.atan(a),0,1,0,0)},r.X_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),fe(a),s(-1,0,0,1,a,0)},r.Y_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),fe(a),s(1,0,0,-1,0,a)},r.A_TO_C=function(){return n(function(a,o,l){return M.ARC===a.type?function(c,u,B){var f,g,h,w;c.cX||bn(c,u,B);for(var m=Math.min(c.phi1,c.phi2),y=Math.max(c.phi1,c.phi2)-m,H=Math.ceil(y/90),T=new Array(H),D=u,E=B,U=0;Uu.maxX&&(u.maxX=rA),rAu.maxY&&(u.maxY=rA),rAaA&&w(si(f,h.x1,h.x2,h.x,aA));for(var T=0,D=ni(g,h.y1,h.y2,h.y);TaA&&m(si(g,h.y1,h.y2,h.y,aA))}if(h.type&M.ARC){w(h.x),m(h.y),bn(h,f,g);for(var E=h.xRot/180*Math.PI,U=Math.cos(E)*h.rX,S=Math.sin(E)*h.rX,I=-Math.sin(E)*h.rY,_=Math.cos(E)*h.rY,K=h.phi1h.phi2?[h.phi2+360,h.phi1+360]:[h.phi2,h.phi1],x=K[0],F=K[1],J=function(rA){var gA=rA[0],mA=rA[1],CA=180*Math.atan2(mA,gA)/Math.PI;return CAx&&aAx&&aAc)throw new SyntaxError('Expected positive number, got "'+c+'" at index "'+i+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"')}this.curArgs.push(c),this.curArgs.length===ou[this.curCommandType]&&(M.HORIZ_LINE_TO===this.curCommandType?s({type:M.HORIZ_LINE_TO,relative:this.curCommandRelative,x:c}):M.VERT_LINE_TO===this.curCommandType?s({type:M.VERT_LINE_TO,relative:this.curCommandRelative,y:c}):this.curCommandType===M.MOVE_TO||this.curCommandType===M.LINE_TO||this.curCommandType===M.SMOOTH_QUAD_TO?(s({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),M.MOVE_TO===this.curCommandType&&(this.curCommandType=M.LINE_TO)):this.curCommandType===M.CURVE_TO?s({type:M.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===M.SMOOTH_CURVE_TO?s({type:M.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===M.QUAD_TO?s({type:M.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===M.ARC&&s({type:M.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!iu(a))if(a===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(a!=="+"&&a!=="-"&&a!==".")if(l)this.curNumber=a,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+a+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,a!=="z"&&a!=="Z")if(a==="h"||a==="H")this.curCommandType=M.HORIZ_LINE_TO,this.curCommandRelative=a==="h";else if(a==="v"||a==="V")this.curCommandType=M.VERT_LINE_TO,this.curCommandRelative=a==="v";else if(a==="m"||a==="M")this.curCommandType=M.MOVE_TO,this.curCommandRelative=a==="m";else if(a==="l"||a==="L")this.curCommandType=M.LINE_TO,this.curCommandRelative=a==="l";else if(a==="c"||a==="C")this.curCommandType=M.CURVE_TO,this.curCommandRelative=a==="c";else if(a==="s"||a==="S")this.curCommandType=M.SMOOTH_CURVE_TO,this.curCommandRelative=a==="s";else if(a==="q"||a==="Q")this.curCommandType=M.QUAD_TO,this.curCommandRelative=a==="q";else if(a==="t"||a==="T")this.curCommandType=M.SMOOTH_QUAD_TO,this.curCommandRelative=a==="t";else{if(a!=="a"&&a!=="A")throw new SyntaxError('Unexpected character "'+a+'" at index '+i+".");this.curCommandType=M.ARC,this.curCommandRelative=a==="a"}else e.push({type:M.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=a,this.curNumberHasDecimal=a==="."}else this.curNumber+=a,this.curNumberHasDecimal=!0;else this.curNumber+=a;else this.curNumber+=a,this.curNumberHasExp=!0;else this.curNumber+=a,this.curNumberHasExpDigits=this.curNumberHasExp}return e},A.prototype.transform=function(t){return Object.create(this,{parse:{value:function(e,n){n===void 0&&(n=[]);for(var s=0,i=Object.getPrototypeOf(this).parse.call(this,e);s>>D;if(i[H+3]=Oe,Oe!==0){var Ve=255/Oe;i[H]=(rA*T>>>D)*Ve,i[H+1]=(gA*T>>>D)*Ve,i[H+2]=(mA*T>>>D)*Ve}else i[H]=i[H+1]=i[H+2]=0;rA-=eA,gA-=iA,mA-=wA,CA-=aA,eA-=w.r,iA-=w.g,wA-=w.b,aA-=w.a;var ZA=Me+s+1;ZA=y+(ZA>>D,L>0?(L=255/L,i[re]=(QA*T>>>D)*L,i[re+1]=(vA*T>>>D)*L,i[re+2]=(EA*T>>>D)*L):i[re]=i[re+1]=i[re+2]=0,QA-=V,vA-=z,EA-=lA,kA-=Z,V-=w.r,z-=w.g,lA-=w.b,Z-=w.a,re=PA+((re=Un+c)A--&&n?String(Math.round(parseFloat(e))):e)}const mu=/(\[[^\]]+\])/g,Uu=/(#[^\s+>~.[:]+)/g,vu=/(\.[^\s+>~.[:]+)/g,Fu=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,yu=/(:[\w-]+\([^)]*\))/gi,Eu=/(:[^\s+>~.[:]+)/g,bu=/([^\s+>~.[:]+)/g;function st(r,A){const t=A.exec(r);return t?[r.replace(A," "),t.length]:[r,0]}function Iu(r){const A=[0,0,0];let t=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),e=0;return[t,e]=st(t,mu),A[1]+=e,[t,e]=st(t,Uu),A[0]+=e,[t,e]=st(t,vu),A[1]+=e,[t,e]=st(t,Fu),A[2]+=e,[t,e]=st(t,yu),A[1]+=e,[t,e]=st(t,Eu),A[1]+=e,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,e]=st(t,bu),A[2]+=e,A.join("")}const xt=1e-8;function oi(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function ns(r,A){return(r[0]*A[0]+r[1]*A[1])/(oi(r)*oi(A))}function li(r,A){return(r[0]*A[1]0&&arguments[0]!==void 0?arguments[0]:" ";const{document:t,name:e}=this;return Kt(this.getString()).trim().split(A).map(n=>new W(t,e,n))}hasValue(A){const t=this.value;return t!==null&&t!==""&&(A||t!==0)&&typeof t<"u"}isString(A){const{value:t}=this,e=typeof t=="string";return!e||!A?e:A.test(t)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;const A=this.getString();switch(!0){case A.endsWith("px"):case/^[0-9]+$/.test(A):return!0;default:return!1}}setValue(A){return this.value=A,this}getValue(A){return typeof A>"u"||this.hasValue()?this.value:A}getNumber(A){if(!this.hasValue())return typeof A>"u"?0:parseFloat(A);const{value:t}=this;let e=parseFloat(t);return this.isString(/%$/)&&(e/=100),e}getString(A){return typeof A>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(A)}getColor(A){let t=this.getString(A);return this.isNormalizedColor||(this.isNormalizedColor=!0,t=Qu(t),this.value=t),t}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(A){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;const[e,n]=typeof A=="boolean"?[void 0,A]:[A],{viewPort:s}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&n):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(e);default:{const i=this.getNumber();return t&&i<1?i*s.computeSize(e):i}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){const A=this.getString(),t=/#([^)'"]+)/.exec(A),e=(t==null?void 0:t[1])||A;return this.document.definitions.get(e)}getFillStyleDefinition(A,t){let e=this.getDefinition();if(!e)return null;if(typeof e.createGradient=="function"&&"getBoundingBox"in A)return e.createGradient(this.document.ctx,A,t);if(typeof e.createPattern=="function"){if(e.getHrefAttribute().hasValue()){const n=e.getAttribute("patternTransform");e=e.getHrefAttribute().getDefinition(),e&&n.hasValue()&&e.getAttribute("patternTransform",!0).setValue(n.value)}if(e)return e.createPattern(this.document.ctx,A,t)}return null}getTextBaseline(){if(!this.hasValue())return null;const A=this.getString();return W.textBaselineMapping[A]||null}addOpacity(A){let t=this.getColor();const e=t.length;let n=0;for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:0;const[e=t,n=t]=ae(A);return new IA(e,n)}static parseScale(A){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const[e=t,n=e]=ae(A);return new IA(e,n)}static parsePath(A){const t=ae(A),e=t.length,n=[];for(let s=0;s0}runEvents(){if(!this.working)return;const{screen:A,events:t,eventElements:e}=this,{style:n}=A.ctx.canvas;let s;n&&(n.cursor=""),t.forEach((i,a)=>{let{run:o}=i;for(s=e[a];s;)o(s),s=s.parent}),this.events=[],this.eventElements=[]}checkPath(A,t){if(!this.working||!t)return;const{events:e,eventElements:n}=this;e.forEach((s,i)=>{let{x:a,y:o}=s;!n[i]&&t.isPointInPath&&t.isPointInPath(a,o)&&(n[i]=A)})}checkBoundingBox(A,t){if(!this.working||!t)return;const{events:e,eventElements:n}=this;e.forEach((s,i)=>{let{x:a,y:o}=s;!n[i]&&t.isPointInBox(a,o)&&(n[i]=A)})}mapXY(A,t){const{window:e,ctx:n}=this.screen,s=new IA(A,t);let i=n.canvas;for(;i;)s.x-=i.offsetLeft,s.y-=i.offsetTop,i=i.offsetParent;return e!=null&&e.scrollX&&(s.x+=e.scrollX),e!=null&&e.scrollY&&(s.y+=e.scrollY),s}onClick(A){const{x:t,y:e}=this.mapXY(A.clientX,A.clientY);this.events.push({type:"onclick",x:t,y:e,run(n){n.onClick&&n.onClick()}})}onMouseMove(A){const{x:t,y:e}=this.mapXY(A.clientX,A.clientY);this.events.push({type:"onmousemove",x:t,y:e,run(n){n.onMouseMove&&n.onMouseMove()}})}constructor(A){this.screen=A,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}}const Oa=typeof window<"u"?window:null,Va=typeof fetch<"u"?fetch.bind(void 0):void 0;class _e{wait(A){this.waits.push(A)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;const A=this.waits.every(t=>t());return A&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=A,A}setDefaults(A){A.strokeStyle="rgba(0,0,0,0)",A.lineCap="butt",A.lineJoin="miter",A.miterLimit=4}setViewBox(A){let{document:t,ctx:e,aspectRatio:n,width:s,desiredWidth:i,height:a,desiredHeight:o,minX:l=0,minY:c=0,refX:u,refY:B,clip:f=!1,clipX:g=0,clipY:h=0}=A;const w=Kt(n).replace(/^defer\s/,""),[m,y]=w.split(" "),H=m||"xMidYMid",T=y||"meet",D=s/i,E=a/o,U=Math.min(D,E),S=Math.max(D,E);let I=i,_=o;T==="meet"&&(I*=U,_*=U),T==="slice"&&(I*=S,_*=S);const K=new W(t,"refX",u),x=new W(t,"refY",B),F=K.hasValue()&&x.hasValue();if(F&&e.translate(-U*K.getPixels("x"),-U*x.getPixels("y")),f){const J=U*g,R=U*h;e.beginPath(),e.moveTo(J,R),e.lineTo(s,R),e.lineTo(s,a),e.lineTo(J,a),e.closePath(),e.clip()}if(!F){const J=T==="meet"&&U===E,R=T==="slice"&&S===E,eA=T==="meet"&&U===D,iA=T==="slice"&&S===D;H.startsWith("xMid")&&(J||R)&&e.translate(s/2-I/2,0),H.endsWith("YMid")&&(eA||iA)&&e.translate(0,a/2-_/2),H.startsWith("xMax")&&(J||R)&&e.translate(s-I,0),H.endsWith("YMax")&&(eA||iA)&&e.translate(0,a-_)}switch(!0){case H==="none":e.scale(D,E);break;case T==="meet":e.scale(U,U);break;case T==="slice":e.scale(S,S);break}e.translate(-l,-c)}start(A){let{enableRedraw:t=!1,ignoreMouse:e=!1,ignoreAnimation:n=!1,ignoreDimensions:s=!1,ignoreClear:i=!1,forceRedraw:a,scaleWidth:o,scaleHeight:l,offsetX:c,offsetY:u}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{mouse:B}=this,f=1e3/_e.FRAMERATE;if(this.isReadyLock=!1,this.frameDuration=f,this.readyPromise=new Promise(y=>{this.resolveReady=y}),this.isReady()&&this.render(A,s,i,o,l,c,u),!t)return;let g=Date.now(),h=g,w=0;const m=()=>{g=Date.now(),w=g-h,w>=f&&(h=g-w%f,this.shouldUpdate(n,a)&&(this.render(A,s,i,o,l,c,u),B.runEvents())),this.intervalId=En(m)};e||B.start(),this.intervalId=En(m)}stop(){this.intervalId&&(En.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(A,t){if(!A){const{frameDuration:e}=this;if(this.animations.reduce((s,i)=>i.update(e)||s,!1))return!0}return!!(typeof t=="function"&&t()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(A,t,e,n,s,i,a){const{viewPort:o,ctx:l,isFirstRender:c}=this,u=l.canvas;o.clear(),u.width&&u.height&&o.setCurrent(u.width,u.height);const B=A.getStyle("width"),f=A.getStyle("height");!t&&(c||typeof n!="number"&&typeof s!="number")&&(B.hasValue()&&(u.width=B.getPixels("x"),u.style&&(u.style.width="".concat(u.width,"px"))),f.hasValue()&&(u.height=f.getPixels("y"),u.style&&(u.style.height="".concat(u.height,"px"))));let g=u.clientWidth||u.width,h=u.clientHeight||u.height;if(t&&B.hasValue()&&f.hasValue()&&(g=B.getPixels("x"),h=f.getPixels("y")),o.setCurrent(g,h),typeof i=="number"&&A.getAttribute("x",!0).setValue(i),typeof a=="number"&&A.getAttribute("y",!0).setValue(a),typeof n=="number"||typeof s=="number"){const w=ae(A.getAttribute("viewBox").getString());let m=0,y=0;if(typeof n=="number"){const T=A.getStyle("width");T.hasValue()?m=T.getPixels("x")/n:w[2]&&!isNaN(w[2])&&(m=w[2]/n)}if(typeof s=="number"){const T=A.getStyle("height");T.hasValue()?y=T.getPixels("y")/s:w[3]&&!isNaN(w[3])&&(y=w[3]/s)}m||(m=y),y||(y=m),A.getAttribute("width",!0).setValue(n),A.getAttribute("height",!0).setValue(s);const H=A.getStyle("transform",!0,!0);H.setValue("".concat(H.getString()," scale(").concat(1/m,", ").concat(1/y,")"))}e||l.clearRect(0,0,g,h),A.render(l),c&&(this.isFirstRender=!1)}constructor(A,{fetch:t=Va,window:e=Oa}={}){if(this.ctx=A,this.viewPort=new ir,this.mouse=new Hu(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=e,!t)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");this.fetch=t}}_e.defaultWindow=Oa;_e.defaultFetch=Va;_e.FRAMERATE=30;_e.MAX_VIRTUAL_PIXELS=3e4;const{defaultFetch:xu}=_e,Su=typeof DOMParser<"u"?DOMParser:void 0;let In=class{async parse(A){return A.startsWith("<")?this.parseFromString(A):this.load(A)}parseFromString(A){const t=new this.DOMParser;try{return this.checkDocument(t.parseFromString(A,"image/svg+xml"))}catch{return this.checkDocument(t.parseFromString(A,"text/xml"))}}checkDocument(A){const t=A.getElementsByTagName("parsererror")[0];if(t)throw new Error(t.textContent||"Unknown parse error");return A}async load(A){const e=await(await this.fetch(A)).text();return this.parseFromString(e)}constructor({fetch:A=xu,DOMParser:t=Su}={}){if(!A)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");if(!t)throw new Error("Can't find 'DOMParser' in 'globalThis', please provide it via options");this.fetch=A,this.DOMParser=t}};class Tu{apply(A){const{x:t,y:e}=this.point;A.translate(t||0,e||0)}unapply(A){const{x:t,y:e}=this.point;A.translate(-1*t||0,-1*e||0)}applyToPoint(A){const{x:t,y:e}=this.point;A.applyTransform([1,0,0,1,t||0,e||0])}constructor(A,t){this.type="translate",this.point=IA.parse(t)}}class Lu{apply(A){const{cx:t,cy:e,originX:n,originY:s,angle:i}=this,a=t+n.getPixels("x"),o=e+s.getPixels("y");A.translate(a,o),A.rotate(i.getRadians()),A.translate(-a,-o)}unapply(A){const{cx:t,cy:e,originX:n,originY:s,angle:i}=this,a=t+n.getPixels("x"),o=e+s.getPixels("y");A.translate(a,o),A.rotate(-1*i.getRadians()),A.translate(-a,-o)}applyToPoint(A){const{cx:t,cy:e,angle:n}=this,s=n.getRadians();A.applyTransform([1,0,0,1,t||0,e||0]),A.applyTransform([Math.cos(s),Math.sin(s),-Math.sin(s),Math.cos(s),0,0]),A.applyTransform([1,0,0,1,-t||0,-e||0])}constructor(A,t,e){this.type="rotate";const n=ae(t);this.angle=new W(A,"angle",n[0]),this.originX=e[0],this.originY=e[1],this.cx=n[1]||0,this.cy=n[2]||0}}class Du{apply(A){const{scale:{x:t,y:e},originX:n,originY:s}=this,i=n.getPixels("x"),a=s.getPixels("y");A.translate(i,a),A.scale(t,e||t),A.translate(-i,-a)}unapply(A){const{scale:{x:t,y:e},originX:n,originY:s}=this,i=n.getPixels("x"),a=s.getPixels("y");A.translate(i,a),A.scale(1/t,1/e||t),A.translate(-i,-a)}applyToPoint(A){const{x:t,y:e}=this.scale;A.applyTransform([t||0,0,0,e||0,0,0])}constructor(A,t,e){this.type="scale";const n=IA.parseScale(t);(n.x===0||n.y===0)&&(n.x=xt,n.y=xt),this.scale=n,this.originX=e[0],this.originY=e[1]}}class ka{apply(A){const{originX:t,originY:e,matrix:n}=this,s=t.getPixels("x"),i=e.getPixels("y");A.translate(s,i),A.transform(n[0],n[1],n[2],n[3],n[4],n[5]),A.translate(-s,-i)}unapply(A){const{originX:t,originY:e,matrix:n}=this,s=n[0],i=n[2],a=n[4],o=n[1],l=n[3],c=n[5],u=0,B=0,f=1,g=1/(s*(l*f-c*B)-i*(o*f-c*u)+a*(o*B-l*u)),h=t.getPixels("x"),w=e.getPixels("y");A.translate(h,w),A.transform(g*(l*f-c*B),g*(c*u-o*f),g*(a*B-i*f),g*(s*f-a*u),g*(i*c-a*l),g*(a*o-s*c)),A.translate(-h,-w)}applyToPoint(A){A.applyTransform(this.matrix)}constructor(A,t,e){this.type="matrix",this.matrix=pu(t),this.originX=e[0],this.originY=e[1]}}class Ra extends ka{constructor(A,t,e){super(A,t,e),this.type="skew",this.angle=new W(A,"angle",t)}}class Ku extends Ra{constructor(A,t,e){super(A,t,e),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class _u extends Ra{constructor(A,t,e){super(A,t,e),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function Mu(r){return Kt(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Ou(r){const[A="",t=""]=r.split("(");return[A.trim(),t.trim().replace(")","")]}class ft{static fromElement(A,t){const e=t.getStyle("transform",!1,!0);if(e.hasValue()){const[n,s=n]=t.getStyle("transform-origin",!1,!0).split();if(n&&s){const i=[n,s];return new ft(A,e.getString(),i)}}return null}apply(A){this.transforms.forEach(t=>t.apply(A))}unapply(A){this.transforms.forEach(t=>t.unapply(A))}applyToPoint(A){this.transforms.forEach(t=>t.applyToPoint(A))}constructor(A,t,e){this.document=A,this.transforms=[],Mu(t).forEach(s=>{if(s==="none")return;const[i,a]=Ou(s),o=ft.transformTypes[i];o&&this.transforms.push(new o(this.document,a,e))})}}ft.transformTypes={translate:Tu,rotate:Lu,scale:Du,matrix:ka,skewX:Ku,skewY:_u};class FA{getAttribute(A){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const e=this.attributes.get(A);if(!e&&t){const n=new W(this.document,A,"");return this.attributes.set(A,n),n}return e||W.empty(this.document)}getHrefAttribute(){let A;for(const[t,e]of this.attributes)if(t==="href"||t.endsWith(":href")){A=e;break}return A||W.empty(this.document)}getStyle(A){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const n=this.styles.get(A);if(n)return n;const s=this.getAttribute(A);if(s.hasValue())return this.styles.set(A,s),s;if(!e){const{parent:i}=this;if(i){const a=i.getStyle(A);if(a.hasValue())return a}}if(t){const i=new W(this.document,A,"");return this.styles.set(A,i),i}return W.empty(this.document)}render(A){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(A.save(),this.getStyle("mask").hasValue()){const t=this.getStyle("mask").getDefinition();t&&(this.applyEffects(A),t.apply(A,this))}else if(this.getStyle("filter").getValue("none")!=="none"){const t=this.getStyle("filter").getDefinition();t&&(this.applyEffects(A),t.apply(A,this))}else this.setContext(A),this.renderChildren(A),this.clearContext(A);A.restore()}}setContext(A){}applyEffects(A){const t=ft.fromElement(this.document,this);t&&t.apply(A);const e=this.getStyle("clip-path",!1,!0);if(e.hasValue()){const n=e.getDefinition();n&&n.apply(A)}}clearContext(A){}renderChildren(A){this.children.forEach(t=>{t.render(A)})}addChild(A){const t=A instanceof FA?A:this.document.createElement(A);t.parent=this,FA.ignoreChildTypes.includes(t.type)||this.children.push(t)}matchesSelector(A){var t;const{node:e}=this;if(typeof e.matches=="function")return e.matches(A);const n=(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"class");return!n||n===""?!1:n.split(" ").some(s=>".".concat(s)===A)}addStylesFromStyleDefinition(){const{styles:A,stylesSpecificity:t}=this.document;for(const[e,n]of A)if(!e.startsWith("@")&&this.matchesSelector(e)){const s=t.get(e);if(n)for(const[i,a]of n){let o=this.stylesSpecificity.get(i);typeof o>"u"&&(o="000"),s&&s>=o&&(a&&this.styles.set(i,a),this.stylesSpecificity.set(i,s))}}}removeStyles(A,t){return t.reduce((n,s)=>{const i=A.getStyle(s);if(!i.hasValue())return n;const a=i.getString();return i.setValue(""),[...n,[s,a]]},[])}restoreStyles(A,t){t.forEach(e=>{let[n,s]=e;A.getStyle(n,!0).setValue(s)})}isFirstChild(){var A;return((A=this.parent)===null||A===void 0?void 0:A.children.indexOf(this))===0}constructor(A,t,e=!1){if(this.document=A,this.node=t,this.captureTextNodes=e,this.type="",this.attributes=new Map,this.styles=new Map,this.stylesSpecificity=new Map,this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!t||t.nodeType!==1)return;Array.from(t.attributes).forEach(i=>{const a=Cu(i.nodeName);this.attributes.set(a,new W(A,a,i.value))}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()&&this.getAttribute("style").getString().split(";").map(a=>a.trim()).forEach(a=>{if(!a)return;const[o,l]=a.split(":").map(c=>c.trim());o&&this.styles.set(o,new W(A,o,l))});const{definitions:n}=A,s=this.getAttribute("id");s.hasValue()&&(n.has(s.getString())||n.set(s.getString(),this)),Array.from(t.childNodes).forEach(i=>{if(i.nodeType===1)this.addChild(i);else if(e&&(i.nodeType===3||i.nodeType===4)){const a=A.createTextNode(i);a.getText().length>0&&this.addChild(a)}})}}FA.ignoreChildTypes=["title"];class Vu extends FA{constructor(A,t,e){super(A,t,e)}}function ku(r){const A=r.trim();return/^('|")/.test(A)?A:'"'.concat(A,'"')}function Ru(r){return typeof process>"u"?r:r.trim().split(",").map(ku).join(",")}function Nu(r){if(!r)return"";const A=r.trim().toLowerCase();switch(A){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return A;default:return/^oblique\s+(-|)\d+deg$/.test(A)?A:""}}function Pu(r){if(!r)return"";const A=r.trim().toLowerCase();switch(A){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return A;default:return/^[\d.]+$/.test(A)?A:""}}class te{static parse(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,e="",n="",s="",i="",a="";const o=Kt(A).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(c=>{switch(!0){case(!l.fontStyle&&te.styles.includes(c)):c!=="inherit"&&(e=c),l.fontStyle=!0;break;case(!l.fontVariant&&te.variants.includes(c)):c!=="inherit"&&(n=c),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&te.weights.includes(c)):c!=="inherit"&&(s=c),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:c!=="inherit"&&(i=c.split("/")[0]||""),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:c!=="inherit"&&(a+=c)}}),new te(e,n,s,i,a,t)}toString(){return[Nu(this.fontStyle),this.fontVariant,Pu(this.fontWeight),this.fontSize,Ru(this.fontFamily)].join(" ").trim()}constructor(A,t,e,n,s,i){const a=i?typeof i=="string"?te.parse(i):i:{};this.fontFamily=s||a.fontFamily,this.fontSize=n||a.fontSize,this.fontStyle=A||a.fontStyle,this.fontWeight=e||a.fontWeight,this.fontVariant=t||a.fontVariant}}te.styles="normal|italic|oblique|inherit";te.variants="normal|small-caps|inherit";te.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class he{get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(A,t){typeof A<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=A,this.x2=A),Athis.x2&&(this.x2=A)),typeof t<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),tthis.y2&&(this.y2=t))}addX(A){this.addPoint(A,0)}addY(A){this.addPoint(0,A)}addBoundingBox(A){if(!A)return;const{x1:t,y1:e,x2:n,y2:s}=A;this.addPoint(t,e),this.addPoint(n,s)}sumCubic(A,t,e,n,s){return Math.pow(1-A,3)*t+3*Math.pow(1-A,2)*A*e+3*(1-A)*Math.pow(A,2)*n+Math.pow(A,3)*s}bezierCurveAdd(A,t,e,n,s){const i=6*t-12*e+6*n,a=-3*t+9*e-9*n+3*s,o=3*e-3*t;if(a===0){if(i===0)return;const B=-o/i;01&&arguments[1]!==void 0?arguments[1]:!1;if(!t){const e=this.getStyle("fill"),n=this.getStyle("fill-opacity"),s=this.getStyle("stroke"),i=this.getStyle("stroke-opacity");if(e.isUrlDefinition()){const f=e.getFillStyleDefinition(this,n);f&&(A.fillStyle=f)}else if(e.hasValue()){e.getString()==="currentColor"&&e.setValue(this.getStyle("color").getColor());const f=e.getColor();f!=="inherit"&&(A.fillStyle=f==="none"?"rgba(0,0,0,0)":f)}if(n.hasValue()){const f=new W(this.document,"fill",A.fillStyle).addOpacity(n).getColor();A.fillStyle=f}if(s.isUrlDefinition()){const f=s.getFillStyleDefinition(this,i);f&&(A.strokeStyle=f)}else if(s.hasValue()){s.getString()==="currentColor"&&s.setValue(this.getStyle("color").getColor());const f=s.getString();f!=="inherit"&&(A.strokeStyle=f==="none"?"rgba(0,0,0,0)":f)}if(i.hasValue()){const f=new W(this.document,"stroke",A.strokeStyle).addOpacity(i).getString();A.strokeStyle=f}const a=this.getStyle("stroke-width");if(a.hasValue()){const f=a.getPixels();A.lineWidth=f||xt}const o=this.getStyle("stroke-linecap"),l=this.getStyle("stroke-linejoin"),c=this.getStyle("stroke-miterlimit"),u=this.getStyle("stroke-dasharray"),B=this.getStyle("stroke-dashoffset");if(o.hasValue()&&(A.lineCap=o.getString()),l.hasValue()&&(A.lineJoin=l.getString()),c.hasValue()&&(A.miterLimit=c.getNumber()),u.hasValue()&&u.getString()!=="none"){const f=ae(u.getString());typeof A.setLineDash<"u"?A.setLineDash(f):typeof A.webkitLineDash<"u"?A.webkitLineDash=f:typeof A.mozDash<"u"&&!(f.length===1&&f[0]===0)&&(A.mozDash=f);const g=B.getPixels();typeof A.lineDashOffset<"u"?A.lineDashOffset=g:typeof A.webkitLineDashOffset<"u"?A.webkitLineDashOffset=g:typeof A.mozDashOffset<"u"&&(A.mozDashOffset=g)}}if(this.modifiedEmSizeStack=!1,typeof A.font<"u"){const e=this.getStyle("font"),n=this.getStyle("font-style"),s=this.getStyle("font-variant"),i=this.getStyle("font-weight"),a=this.getStyle("font-size"),o=this.getStyle("font-family"),l=new te(n.getString(),s.getString(),i.getString(),a.hasValue()?"".concat(a.getPixels(!0),"px"):"",o.getString(),te.parse(e.getString(),A.font));n.setValue(l.fontStyle),s.setValue(l.fontVariant),i.setValue(l.fontWeight),a.setValue(l.fontSize),o.setValue(l.fontFamily),A.font=l.toString(),a.isPixels()&&(this.document.emSize=a.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(A),A.globalAlpha=this.calculateOpacity())}clearContext(A){super.clearContext(A),this.modifiedEmSizeStack&&this.document.popEmSize()}constructor(...A){super(...A),this.modifiedEmSizeStack=!1}}class qe extends dt{setContext(A){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(A,t);const e=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();e&&(A.textBaseline=e)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(A){if(this.type!=="text")return this.getTElementBoundingBox(A);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(A);let t=null;return this.children.forEach((e,n)=>{const s=this.getChildBoundingBox(A,this,this,n);t?t.addBoundingBox(s):t=s}),t}getFontSize(){const{document:A,parent:t}=this,e=te.parse(A.ctx.font).fontSize;return t.getStyle("font-size").getNumber(e)}getTElementBoundingBox(A){const t=this.getFontSize();return new he(this.x,this.y-t,this.x+this.measureText(A),this.y)}getGlyph(A,t,e){const n=t[e];let s;if(A.isArabic){var i;const a=t.length,o=t[e-1],l=t[e+1];let c="isolated";(e===0||o===" ")&&e0&&o!==" "&&e0&&o!==" "&&(e===a-1||l===" ")&&(c="initial"),s=((i=A.arabicGlyphs.get(n))===null||i===void 0?void 0:i.get(c))||A.glyphs.get(n)}else s=A.glyphs.get(n);return s||(s=A.missingGlyph),s}getText(){return""}getTextFromNode(A){const t=A||this.node,e=Array.from(t.parentNode.childNodes),n=e.indexOf(t),s=e.length-1;let i=Kt(t.textContent||"");return n===0&&(i=du(i)),n===s&&(i=hu(i)),i}renderChildren(A){if(this.type!=="text"){this.renderTElementChildren(A);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(A),this.children.forEach((e,n)=>{this.renderChild(A,this,this,n)});const{mouse:t}=this.document.screen;t.isWorking()&&t.checkBoundingBox(this,this.getBoundingBox(A))}renderTElementChildren(A){const{document:t,parent:e}=this,n=this.getText(),s=e.getStyle("font-family").getDefinition();if(s){const{unitsPerEm:o}=s.fontFace,l=te.parse(t.ctx.font),c=e.getStyle("font-size").getNumber(l.fontSize),u=e.getStyle("font-style").getString(l.fontStyle),B=c/o,f=s.isRTL?n.split("").reverse().join(""):n,g=ae(e.getAttribute("dx").getString()),h=f.length;for(let w=0;w=this.leafTexts.length)return;const A=this.leafTexts[this.textChunkStart],t=A.getStyle("text-anchor").getString("start"),e=!1;let n=0;t==="start"&&!e||t==="end"&&e?n=A.x-this.minX:t==="end"&&!e||t==="start"&&e?n=A.x-this.maxX:n=A.x-(this.minX+this.maxX)/2;for(let s=this.textChunkStart;s{this.adjustChildCoordinatesRecursiveCore(A,this,this,e)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(A,t,e,n){const s=e.children[n];s.children.length>0?s.children.forEach((i,a)=>{t.adjustChildCoordinatesRecursiveCore(A,t,s,a)}):this.adjustChildCoordinates(A,t,e,n)}adjustChildCoordinates(A,t,e,n){const s=e.children[n];if(typeof s.measureText!="function")return s;A.save(),s.setContext(A,!0);const i=s.getAttribute("x"),a=s.getAttribute("y"),o=s.getAttribute("dx"),l=s.getAttribute("dy"),c=s.getStyle("font-family").getDefinition(),u=!!(c!=null&&c.isRTL);n===0&&(i.hasValue()||i.setValue(s.getInheritedAttribute("x")),a.hasValue()||a.setValue(s.getInheritedAttribute("y")),o.hasValue()||o.setValue(s.getInheritedAttribute("dx")),l.hasValue()||l.setValue(s.getInheritedAttribute("dy")));const B=s.measureText(A);return u&&(t.x-=B),i.hasValue()?(t.applyAnchoring(),s.x=i.getPixels("x"),o.hasValue()&&(s.x+=o.getPixels("x"))):(o.hasValue()&&(t.x+=o.getPixels("x")),s.x=t.x),t.x=s.x,u||(t.x+=B),a.hasValue()?(s.y=a.getPixels("y"),l.hasValue()&&(s.y+=l.getPixels("y"))):(l.hasValue()&&(t.y+=l.getPixels("y")),s.y=t.y),t.y=s.y,t.leafTexts.push(s),t.minX=Math.min(t.minX,s.x,s.x+B),t.maxX=Math.max(t.maxX,s.x,s.x+B),s.clearContext(A),A.restore(),s}getChildBoundingBox(A,t,e,n){const s=e.children[n];if(typeof s.getBoundingBox!="function")return null;const i=s.getBoundingBox(A);return i&&s.children.forEach((a,o)=>{const l=t.getChildBoundingBox(A,t,s,o);i.addBoundingBox(l)}),i}renderChild(A,t,e,n){const s=e.children[n];s.render(A),s.children.forEach((i,a)=>{t.renderChild(A,t,s,a)})}measureText(A){const{measureCache:t}=this;if(~t)return t;const e=this.getText(),n=this.measureTargetText(A,e);return this.measureCache=n,n}measureTargetText(A,t){if(!t.length)return 0;const{parent:e}=this,n=e.getStyle("font-family").getDefinition();if(n){const i=this.getFontSize(),a=n.isRTL?t.split("").reverse().join(""):t,o=ae(e.getAttribute("dx").getString()),l=a.length;let c=0;for(let u=0;u0?"":this.getTextFromNode()}}class Gu extends ln{constructor(...A){super(...A),this.type="textNode"}}class nA extends M{reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new IA(0,0),this.control=new IA(0,0),this.current=new IA(0,0),this.points=[],this.angles=[]}isEnd(){const{i:A,commands:t}=this;return A>=t.length-1}next(){const A=this.commands[++this.i];return this.previousCommand=this.command,this.command=A,A}getPoint(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y";const e=new IA(this.command[A],this.command[t]);return this.makeAbsolute(e)}getAsControlPoint(A,t){const e=this.getPoint(A,t);return this.control=e,e}getAsCurrentPoint(A,t){const e=this.getPoint(A,t);return this.current=e,e}getReflectedControlPoint(){const A=this.previousCommand.type;if(A!==M.CURVE_TO&&A!==M.SMOOTH_CURVE_TO&&A!==M.QUAD_TO&&A!==M.SMOOTH_QUAD_TO)return this.current;const{current:{x:t,y:e},control:{x:n,y:s}}=this;return new IA(2*t-n,2*e-s)}makeAbsolute(A){if(this.command.relative){const{x:t,y:e}=this.current;A.x+=t,A.y+=e}return A}addMarker(A,t,e){const{points:n,angles:s}=this;e&&s.length>0&&!s[s.length-1]&&(s[s.length-1]=n[n.length-1].angleTo(e)),this.addMarkerAngle(A,t?t.angleTo(A):null)}addMarkerAngle(A,t){this.points.push(A),this.angles.push(t)}getMarkerPoints(){return this.points}getMarkerAngles(){const{angles:A}=this,t=A.length;for(let e=0;e[s,e[i]])}renderChildren(A){this.path(A),this.document.screen.mouse.checkPath(this,A);const t=this.getStyle("fill-rule");A.fillStyle!==""&&(t.getString("inherit")!=="inherit"?A.fill(t.getString()):A.fill()),A.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(A.save(),A.setTransform(1,0,0,1,0,0),A.stroke(),A.restore()):A.stroke());const e=this.getMarkers();if(e){const n=e.length-1,s=this.getStyle("marker-start"),i=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(s.isUrlDefinition()){const o=s.getDefinition(),[l,c]=e[0];o.render(A,l,c)}if(i.isUrlDefinition()){const o=i.getDefinition();for(let l=1;l1&&(n*=Math.sqrt(B),s*=Math.sqrt(B));let f=(a===o?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(s,2)-Math.pow(n,2)*Math.pow(u.y,2)-Math.pow(s,2)*Math.pow(u.x,2))/(Math.pow(n,2)*Math.pow(u.y,2)+Math.pow(s,2)*Math.pow(u.x,2)));isNaN(f)&&(f=0);const g=new IA(f*n*u.y/s,f*-s*u.x/n),h=new IA((t.x+c.x)/2+Math.cos(l)*g.x-Math.sin(l)*g.y,(t.y+c.y)/2+Math.sin(l)*g.x+Math.cos(l)*g.y),w=li([1,0],[(u.x-g.x)/n,(u.y-g.y)/s]),m=[(u.x-g.x)/n,(u.y-g.y)/s],y=[(-u.x-g.x)/n,(-u.y-g.y)/s];let H=li(m,y);return ns(m,y)<=-1&&(H=Math.PI),ns(m,y)>=1&&(H=0),{currentPoint:c,rX:n,rY:s,sweepFlag:o,xAxisRotation:l,centp:h,a1:w,ad:H}}pathA(A,t){const{pathParser:e}=this,{currentPoint:n,rX:s,rY:i,sweepFlag:a,xAxisRotation:o,centp:l,a1:c,ad:u}=dA.pathA(e),B=1-a?1:-1,f=c+B*(u/2),g=new IA(l.x+s*Math.cos(f),l.y+i*Math.sin(f));if(e.addMarkerAngle(g,f-B*Math.PI/2),e.addMarkerAngle(n,f-B*Math.PI),t.addPoint(n.x,n.y),A&&!isNaN(c)&&!isNaN(u)){const h=s>i?s:i,w=s>i?1:s/i,m=s>i?i/s:1;A.translate(l.x,l.y),A.rotate(o),A.scale(w,m),A.arc(0,0,h,c,c+u,!!(1-a)),A.scale(1/w,1/m),A.rotate(-o),A.translate(-l.x,-l.y)}}static pathZ(A){A.current=A.start}pathZ(A,t){dA.pathZ(this.pathParser),A&&t.x1!==t.x2&&t.y1!==t.y2&&A.closePath()}constructor(A,t,e){super(A,t,e),this.type="path",this.pathParser=new nA(this.getAttribute("d").getString())}}class cr extends dt{setContext(A){var t;const{document:e}=this,{screen:n,window:s}=e,i=A.canvas;if(n.setDefaults(A),"style"in i&&typeof A.font<"u"&&s&&typeof s.getComputedStyle<"u"){A.font=s.getComputedStyle(i).getPropertyValue("font");const y=new W(e,"fontSize",te.parse(A.font).fontSize);y.hasValue()&&(e.rootEmSize=y.getPixels("y"),e.emSize=e.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);let{width:a,height:o}=n.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");const l=this.getAttribute("refX"),c=this.getAttribute("refY"),u=this.getAttribute("viewBox"),B=u.hasValue()?ae(u.getString()):null,f=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible";let g=0,h=0,w=0,m=0;B&&(g=B[0],h=B[1]),this.root||(a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y"),this.type==="marker"&&(w=g,m=h,g=0,h=0)),n.viewPort.setCurrent(a,o),this.node&&(!this.parent||((t=this.node.parentNode)===null||t===void 0?void 0:t.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(A),A.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),B&&(a=B[2],o=B[3]),e.setViewBox({ctx:A,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n.viewPort.width,desiredWidth:a,height:n.viewPort.height,desiredHeight:o,minX:g,minY:h,refX:l.getValue(),refY:c.getValue(),clip:f,clipX:w,clipY:m}),B&&(n.viewPort.removeCurrent(),n.viewPort.setCurrent(a,o))}clearContext(A){super.clearContext(A),this.document.screen.viewPort.removeCurrent()}resize(A){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const n=this.getAttribute("width",!0),s=this.getAttribute("height",!0),i=this.getAttribute("viewBox"),a=this.getAttribute("style"),o=n.getNumber(0),l=s.getNumber(0);if(e)if(typeof e=="string")this.getAttribute("preserveAspectRatio",!0).setValue(e);else{const c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(A),s.setValue(t),i.hasValue()||i.setValue("0 0 ".concat(o||A," ").concat(l||t)),a.hasValue()){const c=this.getStyle("width"),u=this.getStyle("height");c.hasValue()&&c.setValue("".concat(A,"px")),u.hasValue()&&u.setValue("".concat(t,"px"))}}constructor(...A){super(...A),this.type="svg",this.root=!1}}class Na extends dA{path(A){const t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),s=this.getStyle("height",!1,!0).getPixels("y"),i=this.getAttribute("rx"),a=this.getAttribute("ry");let o=i.getPixels("x"),l=a.getPixels("y");if(i.hasValue()&&!a.hasValue()&&(l=o),a.hasValue()&&!i.hasValue()&&(o=l),o=Math.min(o,n/2),l=Math.min(l,s/2),A){const c=4*((Math.sqrt(2)-1)/3);A.beginPath(),s>0&&n>0&&(A.moveTo(t+o,e),A.lineTo(t+n-o,e),A.bezierCurveTo(t+n-o+c*o,e,t+n,e+l-c*l,t+n,e+l),A.lineTo(t+n,e+s-l),A.bezierCurveTo(t+n,e+s-l+c*l,t+n-o+c*o,e+s,t+n-o,e+s),A.lineTo(t+o,e+s),A.bezierCurveTo(t+o-c*o,e+s,t,e+s-l+c*l,t,e+s-l),A.lineTo(t,e+l),A.bezierCurveTo(t,e+l-c*l,t+o-c*o,e,t+o,e),A.closePath())}return new he(t,e,t+n,e+s)}getMarkers(){return null}constructor(...A){super(...A),this.type="rect"}}class Xu extends dA{path(A){const t=this.getAttribute("cx").getPixels("x"),e=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return A&&n>0&&(A.beginPath(),A.arc(t,e,n,0,Math.PI*2,!1),A.closePath()),new he(t-n,e-n,t+n,e+n)}getMarkers(){return null}constructor(...A){super(...A),this.type="circle"}}class Ju extends dA{path(A){const t=4*((Math.sqrt(2)-1)/3),e=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),s=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y");return A&&e>0&&n>0&&(A.beginPath(),A.moveTo(s+e,i),A.bezierCurveTo(s+e,i+t*n,s+t*e,i+n,s,i+n),A.bezierCurveTo(s-t*e,i+n,s-e,i+t*n,s-e,i),A.bezierCurveTo(s-e,i-t*n,s-t*e,i-n,s,i-n),A.bezierCurveTo(s+t*e,i-n,s+e,i-t*n,s+e,i),A.closePath()),new he(s-e,i-n,s+e,i+n)}getMarkers(){return null}constructor(...A){super(...A),this.type="ellipse"}}class Yu extends dA{getPoints(){return[new IA(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new IA(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(A){const[{x:t,y:e},{x:n,y:s}]=this.getPoints();return A&&(A.beginPath(),A.moveTo(t,e),A.lineTo(n,s)),new he(t,e,n,s)}getMarkers(){const[A,t]=this.getPoints(),e=A.angleTo(t);return[[A,e],[t,e]]}constructor(...A){super(...A),this.type="line"}}class Pa extends dA{path(A){const{points:t}=this,[{x:e,y:n}]=t,s=new he(e,n);return A&&(A.beginPath(),A.moveTo(e,n)),t.forEach(i=>{let{x:a,y:o}=i;s.addPoint(a,o),A&&A.lineTo(a,o)}),s}getMarkers(){const{points:A}=this,t=A.length-1,e=[];return A.forEach((n,s)=>{s!==t&&e.push([n,n.angleTo(A[s+1])])}),e.length>0&&e.push([A[A.length-1],e[e.length-1][1]]),e}constructor(A,t,e){super(A,t,e),this.type="polyline",this.points=[],this.points=IA.parsePath(this.getAttribute("points").getString())}}class Wu extends Pa{path(A){const t=super.path(A),[{x:e,y:n}]=this.points;return A&&(A.lineTo(e,n),A.closePath()),t}constructor(...A){super(...A),this.type="polygon"}}class zu extends FA{createPattern(A,t,e){const n=this.getStyle("width").getPixels("x",!0),s=this.getStyle("height").getPixels("y",!0),i=new cr(this.document,null);i.attributes.set("viewBox",new W(this.document,"viewBox",this.getAttribute("viewBox").getValue())),i.attributes.set("width",new W(this.document,"width","".concat(n,"px"))),i.attributes.set("height",new W(this.document,"height","".concat(s,"px"))),i.attributes.set("transform",new W(this.document,"transform",this.getAttribute("patternTransform").getValue())),i.children=this.children;const a=this.document.createCanvas(n,s),o=a.getContext("2d"),l=this.getAttribute("x"),c=this.getAttribute("y");l.hasValue()&&c.hasValue()&&o.translate(l.getPixels("x",!0),c.getPixels("y",!0)),e.hasValue()?this.styles.set("fill-opacity",e):this.styles.delete("fill-opacity");for(let B=-1;B<=1;B++)for(let f=-1;f<=1;f++)o.save(),i.attributes.set("x",new W(this.document,"x",B*a.width)),i.attributes.set("y",new W(this.document,"y",f*a.height)),i.render(o),o.restore();return A.createPattern(a,"repeat")}constructor(...A){super(...A),this.type="pattern"}}class Zu extends FA{render(A,t,e){if(!t)return;const{x:n,y:s}=t,i=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");A.translate(n,s),i==="auto"&&A.rotate(e),a==="strokeWidth"&&A.scale(A.lineWidth,A.lineWidth),A.save();const o=new cr(this.document);o.type=this.type,o.attributes.set("viewBox",new W(this.document,"viewBox",this.getAttribute("viewBox").getValue())),o.attributes.set("refX",new W(this.document,"refX",this.getAttribute("refX").getValue())),o.attributes.set("refY",new W(this.document,"refY",this.getAttribute("refY").getValue())),o.attributes.set("width",new W(this.document,"width",this.getAttribute("markerWidth").getValue())),o.attributes.set("height",new W(this.document,"height",this.getAttribute("markerHeight").getValue())),o.attributes.set("overflow",new W(this.document,"overflow",this.getAttribute("overflow").getValue())),o.attributes.set("fill",new W(this.document,"fill",this.getAttribute("fill").getColor("black"))),o.attributes.set("stroke",new W(this.document,"stroke",this.getAttribute("stroke").getValue("none"))),o.children=this.children,o.render(A),A.restore(),a==="strokeWidth"&&A.scale(1/A.lineWidth,1/A.lineWidth),i==="auto"&&A.rotate(-e),A.translate(-n,-s)}constructor(...A){super(...A),this.type="marker"}}class ju extends FA{render(){}constructor(...A){super(...A),this.type="defs"}}class Ls extends dt{getBoundingBox(A){const t=new he;return this.children.forEach(e=>{t.addBoundingBox(e.getBoundingBox(A))}),t}constructor(...A){super(...A),this.type="g"}}class Ga extends FA{getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(A,t,e){let n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(n));const{stops:s}=n,i=this.getGradient(A,t);if(!i)return this.addParentOpacity(e,s[s.length-1].color);if(s.forEach(a=>{i.addColorStop(a.offset,this.addParentOpacity(e,a.color))}),this.getAttribute("gradientTransform").hasValue()){const{document:a}=this,{MAX_VIRTUAL_PIXELS:o}=_e,{viewPort:l}=a.screen,c=l.getRoot(),u=new Na(a);u.attributes.set("x",new W(a,"x",-o/3)),u.attributes.set("y",new W(a,"y",-o/3)),u.attributes.set("width",new W(a,"width",o)),u.attributes.set("height",new W(a,"height",o));const B=new Ls(a);B.attributes.set("transform",new W(a,"transform",this.getAttribute("gradientTransform").getValue())),B.children=[u];const f=new cr(a);f.attributes.set("x",new W(a,"x",0)),f.attributes.set("y",new W(a,"y",0)),f.attributes.set("width",new W(a,"width",c.width)),f.attributes.set("height",new W(a,"height",c.height)),f.children=[B];const g=a.createCanvas(c.width,c.height),h=g.getContext("2d");return h.fillStyle=i,f.render(h),h.createPattern(g,"no-repeat")}return i}inheritStopContainer(A){this.attributesToInherit.forEach(t=>{!this.getAttribute(t).hasValue()&&A.getAttribute(t).hasValue()&&this.getAttribute(t,!0).setValue(A.getAttribute(t).getValue())})}addParentOpacity(A,t){return A.hasValue()?new W(this.document,"color",t).addOpacity(A).getColor():t}constructor(A,t,e){super(A,t,e),this.attributesToInherit=["gradientUnits"],this.stops=[];const{stops:n,children:s}=this;s.forEach(i=>{i.type==="stop"&&n.push(i)})}}class $u extends Ga{getGradient(A,t){const e=this.getGradientUnits()==="objectBoundingBox",n=e?t.getBoundingBox(A):null;if(e&&!n)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));const s=e?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),i=e?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=e?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=e?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return s===a&&i===o?null:A.createLinearGradient(s,i,a,o)}constructor(A,t,e){super(A,t,e),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}}class qu extends Ga{getGradient(A,t){const e=this.getGradientUnits()==="objectBoundingBox",n=t.getBoundingBox(A);if(e&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");const s=e?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),i=e?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y");let a=s,o=i;this.getAttribute("fx").hasValue()&&(a=e?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=e?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));const l=e?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return A.createRadialGradient(a,o,c,s,i,l)}constructor(A,t,e){super(A,t,e),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}}class AB extends FA{constructor(A,t,e){super(A,t,e),this.type="stop";const n=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),s=this.getStyle("stop-opacity");let i=this.getStyle("stop-color",!0);i.getString()===""&&i.setValue("#000"),s.hasValue()&&(i=i.addOpacity(s)),this.offset=n,this.color=i.getColor()}}class Ds extends FA{getProperty(){const A=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return A==="CSS"?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}calcValue(){const{initialUnits:A}=this,{progress:t,from:e,to:n}=this.getProgress();let s=e.getNumber()+(n.getNumber()-e.getNumber())*t;return A==="%"&&(s*=100),"".concat(s).concat(A)}update(A){const{parent:t}=this,e=this.getProperty();if(this.initialValue||(this.initialValue=e.getString(),this.initialUnits=e.getUnits()),this.duration>this.maxDuration){const s=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(s==="freeze"&&!this.frozen)this.frozen=!0,t&&e&&(t.animationFrozen=!0,t.animationFrozenValue=e.getString());else if(s==="remove"&&!this.removed)return this.removed=!0,t&&e&&e.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=A;let n=!1;if(this.begin{const l=s[o];return a+(l-a)*A}).join(" ")}constructor(...A){super(...A),this.type="animateTransform"}}class Xa extends FA{constructor(A,t,e){super(A,t,e),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class Ks extends dA{constructor(A,t,e){super(A,t,e),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class Ja extends Ks{constructor(...A){super(...A),this.type="missing-glyph",this.horizAdvX=0}}class rB extends FA{render(){}constructor(A,t,e){super(A,t,e),this.type="font",this.isArabic=!1,this.glyphs=new Map,this.arabicGlyphs=new Map,this.isRTL=!1,this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();const{definitions:n}=A,{children:s}=this;for(const i of s)if(i instanceof Xa){this.fontFace=i;const a=i.getStyle("font-family");a.hasValue()&&n.set(a.getString(),this)}else if(i instanceof Ja)this.missingGlyph=i;else if(i instanceof Ks)if(i.arabicForm){this.isRTL=!0,this.isArabic=!0;let a=this.arabicGlyphs.get(i.unicode);typeof a>"u"&&(a=new Map,this.arabicGlyphs.set(i.unicode,a)),a.set(i.arabicForm,i)}else this.glyphs.set(i.unicode,i)}}class nB extends qe{getText(){const A=this.getHrefAttribute().getDefinition();if(A){const t=A.children[0];if(t)return t.getText()}return""}constructor(...A){super(...A),this.type="tref"}}class sB extends qe{getText(){return this.text}renderChildren(A){if(this.hasText){super.renderChildren(A);const{document:t,x:e,y:n}=this,{mouse:s}=t.screen,i=new W(t,"fontSize",te.parse(t.ctx.font).fontSize);s.isWorking()&&s.checkBoundingBox(this,new he(e,n-i.getPixels("y"),e+this.measureText(A),n))}else if(this.children.length>0){const t=new Ls(this.document);t.children=this.children,t.parent=this,t.render(A)}}onClick(){const{window:A}=this.document;A&&A.open(this.getHrefAttribute().getString())}onMouseMove(){const A=this.document.ctx;A.canvas.style.cursor="pointer"}constructor(A,t,e){super(A,t,e),this.type="a";const{childNodes:n}=t,s=n[0],i=n.length>0&&Array.from(n).every(a=>a.nodeType===3);this.hasText=i,this.text=i?this.getTextFromNode(s):""}}class iB extends qe{getText(){return this.text}path(A){const{dataArray:t}=this;A&&A.beginPath(),t.forEach(e=>{let{type:n,points:s}=e;switch(n){case nA.LINE_TO:A&&A.lineTo(s[0],s[1]);break;case nA.MOVE_TO:A&&A.moveTo(s[0],s[1]);break;case nA.CURVE_TO:A&&A.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case nA.QUAD_TO:A&&A.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case nA.ARC:{const[i,a,o,l,c,u,B,f]=s,g=o>l?o:l,h=o>l?1:o/l,w=o>l?l/o:1;A&&(A.translate(i,a),A.rotate(B),A.scale(h,w),A.arc(0,0,g,c,c+u,!!(1-f)),A.scale(1/h,1/w),A.rotate(-B),A.translate(-i,-a));break}case nA.CLOSE_PATH:A&&A.closePath();break}})}renderChildren(A){this.setTextData(A),A.save();const t=this.parent.getStyle("text-decoration").getString(),e=this.getFontSize(),{glyphInfo:n}=this,s=A.fillStyle;t==="underline"&&A.beginPath(),n.forEach((i,a)=>{const{p0:o,p1:l,rotation:c,text:u}=i;A.save(),A.translate(o.x,o.y),A.rotate(c),A.fillStyle&&A.fillText(u,0,0),A.strokeStyle&&A.strokeText(u,0,0),A.restore(),t==="underline"&&(a===0&&A.moveTo(o.x,o.y+e/8),A.lineTo(l.x,l.y+e/5))}),t==="underline"&&(A.lineWidth=e/20,A.strokeStyle=s,A.stroke(),A.closePath()),A.restore()}getLetterSpacingAt(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[A]||0}findSegmentToFitChar(A,t,e,n,s,i,a,o,l){let c=i,u=this.measureText(A,o);o===" "&&t==="justify"&&e-1&&(c+=this.getLetterSpacingAt(l));const B=this.textHeight/20,f=this.getEquidistantPointOnPath(c,B,0),g=this.getEquidistantPointOnPath(c+u,B,0),h={p0:f,p1:g},w=f&&g?Math.atan2(g.y-f.y,g.x-f.x):0;if(a){const m=Math.cos(Math.PI/2+w)*a,y=Math.cos(-w)*a;h.p0={...f,x:f.x+m,y:f.y+y},h.p1={...g,x:g.x+m,y:g.y+y}}return c+=u,{offset:c,segment:h,rotation:w}}measureText(A,t){const{measuresCache:e}=this,n=t||this.getText();if(e.has(n))return e.get(n);const s=this.measureTargetText(A,n);return e.set(n,s),s}setTextData(A){if(this.glyphInfo)return;const t=this.getText(),e=t.split(""),n=t.split(" ").length-1,s=this.parent.getAttribute("dx").split().map(H=>H.getPixels("x")),i=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing");let c=0;!o.hasValue()||o.getValue()==="inherit"?c=l.getPixels():o.hasValue()&&o.getValue()!=="initial"&&o.getValue()!=="unset"&&(c=o.getPixels());const u=[],B=t.length;this.letterSpacingCache=u;for(let H=0;HD===0?0:H+T||0,0),g=this.measureText(A),h=Math.max(g+f,0);this.textWidth=g,this.textHeight=this.getFontSize(),this.glyphInfo=[];const w=this.getPathLength(),m=this.getStyle("startOffset").getNumber(0)*w;let y=0;(a==="middle"||a==="center")&&(y=-h/2),(a==="end"||a==="right")&&(y=-h),y+=m,e.forEach((H,T)=>{const{offset:D,segment:E,rotation:U}=this.findSegmentToFitChar(A,a,h,w,n,y,i,H,T);y=D,!(!E.p0||!E.p1)&&this.glyphInfo.push({text:e[T],p0:E.p0,p1:E.p1,rotation:U})})}parsePathData(A){if(this.pathLength=-1,!A)return[];const t=[],{pathParser:e}=A;for(e.reset();!e.isEnd();){const{current:n}=e,s=n?n.x:0,i=n?n.y:0,a=e.next();let o=a.type,l=[];switch(a.type){case nA.MOVE_TO:this.pathM(e,l);break;case nA.LINE_TO:o=this.pathL(e,l);break;case nA.HORIZ_LINE_TO:o=this.pathH(e,l);break;case nA.VERT_LINE_TO:o=this.pathV(e,l);break;case nA.CURVE_TO:this.pathC(e,l);break;case nA.SMOOTH_CURVE_TO:o=this.pathS(e,l);break;case nA.QUAD_TO:this.pathQ(e,l);break;case nA.SMOOTH_QUAD_TO:o=this.pathT(e,l);break;case nA.ARC:l=this.pathA(e);break;case nA.CLOSE_PATH:dA.pathZ(e);break}a.type!==nA.CLOSE_PATH?t.push({type:o,points:l,start:{x:s,y:i},pathLength:this.calcLength(s,i,o,l)}):t.push({type:nA.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(A,t){const{x:e,y:n}=dA.pathM(A).point;t.push(e,n)}pathL(A,t){const{x:e,y:n}=dA.pathL(A).point;return t.push(e,n),nA.LINE_TO}pathH(A,t){const{x:e,y:n}=dA.pathH(A).point;return t.push(e,n),nA.LINE_TO}pathV(A,t){const{x:e,y:n}=dA.pathV(A).point;return t.push(e,n),nA.LINE_TO}pathC(A,t){const{point:e,controlPoint:n,currentPoint:s}=dA.pathC(A);t.push(e.x,e.y,n.x,n.y,s.x,s.y)}pathS(A,t){const{point:e,controlPoint:n,currentPoint:s}=dA.pathS(A);return t.push(e.x,e.y,n.x,n.y,s.x,s.y),nA.CURVE_TO}pathQ(A,t){const{controlPoint:e,currentPoint:n}=dA.pathQ(A);t.push(e.x,e.y,n.x,n.y)}pathT(A,t){const{controlPoint:e,currentPoint:n}=dA.pathT(A);return t.push(e.x,e.y,n.x,n.y),nA.QUAD_TO}pathA(A){let{rX:t,rY:e,sweepFlag:n,xAxisRotation:s,centp:i,a1:a,ad:o}=dA.pathA(A);return n===0&&o>0&&(o-=2*Math.PI),n===1&&o<0&&(o+=2*Math.PI),[i.x,i.y,t,e,a,o,s,n]}calcLength(A,t,e,n){let s=0,i=null,a=null,o=0;switch(e){case nA.LINE_TO:return this.getLineLength(A,t,n[0],n[1]);case nA.CURVE_TO:for(s=0,i=this.getPointOnCubicBezier(0,A,t,n[0],n[1],n[2],n[3],n[4],n[5]),o=.01;o<=1;o+=.01)a=this.getPointOnCubicBezier(o,A,t,n[0],n[1],n[2],n[3],n[4],n[5]),s+=this.getLineLength(i.x,i.y,a.x,a.y),i=a;return s;case nA.QUAD_TO:for(s=0,i=this.getPointOnQuadraticBezier(0,A,t,n[0],n[1],n[2],n[3]),o=.01;o<=1;o+=.01)a=this.getPointOnQuadraticBezier(o,A,t,n[0],n[1],n[2],n[3]),s+=this.getLineLength(i.x,i.y,a.x,a.y),i=a;return s;case nA.ARC:{s=0;const l=n[4],c=n[5],u=n[4]+c;let B=Math.PI/180;if(Math.abs(l-u)u;o-=B)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),s+=this.getLineLength(i.x,i.y,a.x,a.y),i=a;else for(o=l+B;o5&&arguments[5]!==void 0?arguments[5]:t,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:e;const o=(s-e)/(n-t+xt);let l=Math.sqrt(A*A/(1+o*o));nt)return null;const{dataArray:s}=this;for(const i of s){if(i&&(i.pathLength<5e-5||e+i.pathLength+5e-5=0&&o>u)break;n=this.getPointOnEllipticalArc(i.points[0],i.points[1],i.points[2],i.points[3],o,i.points[6]);break}case nA.CURVE_TO:o=a/i.pathLength,o>1&&(o=1),n=this.getPointOnCubicBezier(o,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3],i.points[4],i.points[5]);break;case nA.QUAD_TO:o=a/i.pathLength,o>1&&(o=1),n=this.getPointOnQuadraticBezier(o,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3]);break}if(n)return n;break}return null}getLineLength(A,t,e,n){return Math.sqrt((e-A)*(e-A)+(n-t)*(n-t))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((A,t)=>t.pathLength>0?A+t.pathLength:A,0)),this.pathLength}getPointOnCubicBezier(A,t,e,n,s,i,a,o,l){const c=o*ci(A)+i*ui(A)+n*Bi(A)+t*gi(A),u=l*ci(A)+a*ui(A)+s*Bi(A)+e*gi(A);return{x:c,y:u}}getPointOnQuadraticBezier(A,t,e,n,s,i,a){const o=i*fi(A)+n*di(A)+t*hi(A),l=a*fi(A)+s*di(A)+e*hi(A);return{x:o,y:l}}getPointOnEllipticalArc(A,t,e,n,s,i){const a=Math.cos(i),o=Math.sin(i),l={x:e*Math.cos(s),y:n*Math.sin(s)};return{x:A+(l.x*a-l.y*o),y:t+(l.x*o+l.y*a)}}buildEquidistantCache(A,t){const e=this.getPathLength(),n=t||.25,s=A||e/100;if(!this.equidistantCache||this.equidistantCache.step!==s||this.equidistantCache.precision!==n){this.equidistantCache={step:s,precision:n,points:[]};let i=0;for(let a=0;a<=e;a+=n){const o=this.getPointOnPath(a),l=this.getPointOnPath(a+n);!o||!l||(i+=this.getLineLength(o.x,o.y,l.x,l.y),i>=s&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:a}),i-=s))}}}getEquidistantPointOnPath(A,t,e){if(this.buildEquidistantCache(t,e),A<0||A-this.getPathLength()>5e-5)return null;const n=Math.round(A/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}constructor(A,t,e){super(A,t,e),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);const n=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(n)}}const aB=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class oB extends dt{async loadImage(A){try{const t=await this.document.createImage(A);this.image=t}catch(t){console.error('Error while loading image "'.concat(A,'":'),t)}this.loaded=!0}async loadSvg(A){const t=aB.exec(A);if(t){const e=t[5];e&&(t[4]==="base64"?this.image=atob(e):this.image=decodeURIComponent(e))}else try{const n=await(await this.document.fetch(A)).text();this.image=n}catch(e){console.error('Error while loading image "'.concat(A,'":'),e)}this.loaded=!0}renderChildren(A){const{document:t,image:e,loaded:n}=this,s=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!(!n||!e||!a||!o)){if(A.save(),A.translate(s,i),typeof e=="string"){const l=t.canvg.forkString(A,e,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:o}),{documentElement:c}=l.document;c&&(c.parent=this),l.render()}else t.setViewBox({ctx:A,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:e.width,height:o,desiredHeight:e.height}),this.loaded&&(!("complete"in e)||e.complete)&&A.drawImage(e,0,0);A.restore()}}getBoundingBox(){const A=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),e=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new he(A,t,A+e,t+n)}constructor(A,t,e){super(A,t,e),this.type="image",this.loaded=!1;const n=this.getHrefAttribute().getString();if(!n)return;const s=n.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(n);A.images.push(this),s?this.loadSvg(n):this.loadImage(n)}}class lB extends dt{render(A){}constructor(...A){super(...A),this.type="symbol"}}class cB{async load(A,t){try{const{document:e}=this,s=(await e.canvg.parser.load(t)).getElementsByTagName("font");Array.from(s).forEach(i=>{const a=e.createElement(i);e.definitions.set(A,a)})}catch(e){console.error('Error while loading font "'.concat(t,'":'),e)}this.loaded=!0}constructor(A){this.document=A,this.loaded=!1,A.fonts.push(this)}}class Ya extends FA{constructor(A,t,e){super(A,t,e),this.type="style",Kt(Array.from(t.childNodes).map(i=>i.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach(i=>{const a=i.trim();if(!a)return;const o=a.split("{"),l=o[0].split(","),c=o[1].split(";");l.forEach(u=>{const B=u.trim();if(!B)return;const f=A.styles.get(B)||new Map;if(c.forEach(g=>{const h=g.indexOf(":"),w=g.substr(0,h).trim(),m=g.substr(h+1,g.length-h).trim();w&&m&&f.set(w,new W(A,w,m))}),A.styles.set(B,f),A.stylesSpecificity.set(B,Iu(B)),B==="@font-face"){const g=f.get("font-family").getString().replace(/"|'/g,"");f.get("src").getString().split(",").forEach(w=>{if(w.indexOf('format("svg")')>0){const m=Ma(w);m&&new cB(A).load(g,m)}})}})})}}Ya.parseExternalUrl=Ma;class uB extends dt{setContext(A){super.setContext(A);const t=this.getAttribute("x"),e=this.getAttribute("y");t.hasValue()&&A.translate(t.getPixels("x"),0),e.hasValue()&&A.translate(0,e.getPixels("y"))}path(A){const{element:t}=this;t&&t.path(A)}renderChildren(A){const{document:t,element:e}=this;if(e){let n=e;if(e.type==="symbol"&&(n=new cr(t),n.attributes.set("viewBox",new W(t,"viewBox",e.getAttribute("viewBox").getString())),n.attributes.set("preserveAspectRatio",new W(t,"preserveAspectRatio",e.getAttribute("preserveAspectRatio").getString())),n.attributes.set("overflow",new W(t,"overflow",e.getAttribute("overflow").getString())),n.children=e.children,e.styles.set("opacity",new W(t,"opacity",this.calculateOpacity()))),n.type==="svg"){const i=this.getStyle("width",!1,!0),a=this.getStyle("height",!1,!0);i.hasValue()&&n.attributes.set("width",new W(t,"width",i.getString())),a.hasValue()&&n.attributes.set("height",new W(t,"height",a.getString()))}const s=n.parent;n.parent=this,n.render(A),n.parent=s}}getBoundingBox(A){const{element:t}=this;return t?t.getBoundingBox(A):null}elementTransform(){const{document:A,element:t}=this;return t?ft.fromElement(A,t):null}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}constructor(...A){super(...A),this.type="use"}}function pr(r,A,t,e,n,s){return r[t*e*4+A*4+s]}function wr(r,A,t,e,n,s,i){r[t*e*4+A*4+s]=i}function DA(r,A,t){return r[A]*t}function Ie(r,A,t,e){return A+Math.cos(r)*t+Math.sin(r)*e}class Wa extends FA{apply(A,t,e,n,s){const{includeOpacity:i,matrix:a}=this,o=A.getImageData(0,0,n,s);for(let l=0;l{f.addBoundingBox(g.getBoundingBox(A))}),n=Math.floor(f.x1),s=Math.floor(f.y1),i=Math.floor(f.width),a=Math.floor(f.height)}const o=this.removeStyles(t,cn.ignoreStyles),l=e.createCanvas(n+i,s+a),c=l.getContext("2d");e.screen.setDefaults(c),this.renderChildren(c),new Wa(e,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(c,0,0,n+i,s+a);const u=e.createCanvas(n+i,s+a),B=u.getContext("2d");e.screen.setDefaults(B),t.render(B),B.globalCompositeOperation="destination-in",B.fillStyle=c.createPattern(l,"no-repeat"),B.fillRect(0,0,n+i,s+a),A.fillStyle=B.createPattern(u,"no-repeat"),A.fillRect(0,0,n+i,s+a),this.restoreStyles(t,o)}render(A){}constructor(...A){super(...A),this.type="mask"}}cn.ignoreStyles=["mask","transform","clip-path"];const wi=()=>{};class BB extends FA{apply(A){const{document:t}=this,e=Reflect.getPrototypeOf(A),{beginPath:n,closePath:s}=A;e&&(e.beginPath=wi,e.closePath=wi),Reflect.apply(n,A,[]),this.children.forEach(i=>{if(!("path"in i))return;let a="elementTransform"in i?i.elementTransform():null;a||(a=ft.fromElement(t,i)),a&&a.apply(A),i.path(A),e&&(e.closePath=s),a&&a.unapply(A)}),Reflect.apply(s,A,[]),A.clip(),e&&(e.beginPath=n,e.closePath=s)}render(A){}constructor(...A){super(...A),this.type="clipPath"}}class un extends FA{apply(A,t){const{document:e,children:n}=this,s="getBoundingBox"in t?t.getBoundingBox(A):null;if(!s)return;let i=0,a=0;n.forEach(m=>{const y=m.extraFilterDistance||0;i=Math.max(i,y),a=Math.max(a,y)});const o=Math.floor(s.width),l=Math.floor(s.height),c=o+2*i,u=l+2*a;if(c<1||u<1)return;const B=Math.floor(s.x),f=Math.floor(s.y),g=this.removeStyles(t,un.ignoreStyles),h=e.createCanvas(c,u),w=h.getContext("2d");e.screen.setDefaults(w),w.translate(-B+i,-f+a),t.render(w),n.forEach(m=>{typeof m.apply=="function"&&m.apply(w,0,0,c,u)}),A.drawImage(h,0,0,c,u,B-i,f-a,c,u),this.restoreStyles(t,g)}render(A){}constructor(...A){super(...A),this.type="filter"}}un.ignoreStyles=["filter","transform","clip-path"];class gB extends FA{apply(A,t,e,n,s){}constructor(A,t,e){super(A,t,e),this.type="feDropShadow",this.addStylesFromStyleDefinition()}}class fB extends FA{apply(A,t,e,n,s){}constructor(...A){super(...A),this.type="feMorphology"}}class dB extends FA{apply(A,t,e,n,s){}constructor(...A){super(...A),this.type="feComposite"}}class hB extends FA{apply(A,t,e,n,s){const{document:i,blurRadius:a}=this,o=i.window?i.window.document.body:null,l=A.canvas;l.id=i.getUniqueId(),o&&(l.style.display="none",o.appendChild(l)),gu(l,t,e,n,s,a),o&&o.removeChild(l)}constructor(A,t,e){super(A,t,e),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}}class pB extends FA{constructor(...A){super(...A),this.type="title"}}class wB extends FA{constructor(...A){super(...A),this.type="desc"}}const CB={svg:cr,rect:Na,circle:Xu,ellipse:Ju,line:Yu,polyline:Pa,polygon:Wu,path:dA,pattern:zu,marker:Zu,defs:ju,linearGradient:$u,radialGradient:qu,stop:AB,animate:Ds,animateColor:eB,animateTransform:tB,font:rB,"font-face":Xa,"missing-glyph":Ja,glyph:Ks,text:qe,tspan:ln,tref:nB,a:sB,textPath:iB,image:oB,g:Ls,symbol:lB,style:Ya,use:uB,mask:cn,clipPath:BB,filter:un,feDropShadow:gB,feMorphology:fB,feComposite:dB,feColorMatrix:Wa,feGaussianBlur:hB,title:pB,desc:wB};function QB(r,A){const t=document.createElement("canvas");return t.width=r,t.height=A,t}async function mB(r){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const t=document.createElement("img");return A&&(t.crossOrigin="Anonymous"),new Promise((e,n)=>{t.onload=()=>{e(t)},t.onerror=(s,i,a,o,l)=>{n(l)},t.src=r})}const Hn=12;class Ze{bindCreateImage(A,t){return typeof t=="boolean"?(e,n)=>A(e,typeof n=="boolean"?n:t):A}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){const{emSizeStack:A}=this;return A[A.length-1]||Hn}set emSize(A){const{emSizeStack:t}=this;t.push(A)}popEmSize(){const{emSizeStack:A}=this;A.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(A=>A.loaded)}isFontsLoaded(){return this.fonts.every(A=>A.loaded)}createDocumentElement(A){const t=this.createElement(A.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t,t}createElement(A){const t=A.nodeName.replace(/^[^:]+:/,""),e=Ze.elementTypes[t];return e?new e(this,A):new Vu(this,A)}createTextNode(A){return new Gu(this,A)}setViewBox(A){this.screen.setViewBox({document:this,...A})}constructor(A,{rootEmSize:t=Hn,emSize:e=Hn,createCanvas:n=Ze.createCanvas,createImage:s=Ze.createImage,anonymousCrossOrigin:i}={}){this.canvg=A,this.definitions=new Map,this.styles=new Map,this.stylesSpecificity=new Map,this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=A.screen,this.rootEmSize=t,this.emSize=e,this.createCanvas=n,this.createImage=this.bindCreateImage(s,i),this.screen.wait(()=>this.isImagesLoaded()),this.screen.wait(()=>this.isFontsLoaded())}}Ze.createCanvas=QB;Ze.createImage=mB;Ze.elementTypes=CB;class bt{static async from(A,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=await new In(e).parse(t);return new bt(A,s,e)}static fromString(A,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=new In(e).parseFromString(t);return new bt(A,s,e)}fork(A,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return bt.from(A,t,{...this.options,...e})}forkString(A,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return bt.fromString(A,t,{...this.options,...e})}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}async render(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.start({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0,...A}),await this.ready(),this.stop()}start(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{documentElement:t,screen:e,options:n}=this;e.start(t,{enableRedraw:!0,...n,...A})}stop(){this.screen.stop()}resize(A){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(A,t,e)}constructor(A,t,e={}){this.parser=new In(e),this.screen=new _e(A,e),this.options=e;const n=new Ze(this,e),s=n.createDocumentElement(t);this.document=n,this.documentElement=s}}/*! * html2canvas 1.4.1 * Copyright (c) 2022 Niklas von Hertzen * Released under MIT License *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var ss=function(r,A){return ss=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},ss(r,A)};function pe(r,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");ss(r,A);function t(){this.constructor=r}r.prototype=A===null?Object.create(A):(t.prototype=A.prototype,new t)}var is=function(){return is=Object.assign||function(A){for(var t,e=1,n=arguments.length;e0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]=55296&&n<=56319&&t>10)+55296,i%1024+56320)),(n+1===t||e.length>16384)&&(s+=String.fromCharCode.apply(String,e),e.length=0)}return s},Ci="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vB=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Qr=0;Qr"u"?[]:new Uint8Array(256);for(var mr=0;mr>4,c[n++]=(i&15)<<4|a>>2,c[n++]=(a&3)<<6|o&63;return l},yB=function(r){for(var A=r.length,t=[],e=0;e>Bt,IB=1<>Bt,xB=za+HB,SB=xB,TB=32,LB=SB+TB,DB=65536>>_s,KB=1<=0){if(A<55296||A>56319&&A<=65535)return t=this.index[A>>Bt],t=(t<>Bt)],t=(t<>_s),t=this.index[t],t+=A>>Bt&_B,t=this.index[t],t=(t<"u"?[]:new Uint8Array(256);for(var Ur=0;Urvi?(n.push(!0),a-=vi):n.push(!1),["normal","auto","loose"].indexOf(A)!==-1&&[8208,8211,12316,12448].indexOf(s)!==-1)return e.push(i),t.push(ls);if(a===PB||a===as){if(i===0)return e.push(i),t.push(at);var o=t[i-1];return jB.indexOf(o)===-1?(e.push(e[i-1]),t.push(o)):(e.push(i),t.push(at))}if(e.push(i),a===WB)return t.push(A==="strict"?cs:ar);if(a===qa||a===YB)return t.push(at);if(a===zB)return s>=131072&&s<=196605||s>=196608&&s<=262141?t.push(ar):t.push(at);t.push(a)}),[e,t,n]},Dn=function(r,A,t,e){var n=e[t];if(Array.isArray(r)?r.indexOf(n)!==-1:r===n)for(var s=t;s<=e.length;){s++;var i=e[s];if(i===A)return!0;if(i!==Je)break}if(n===Je)for(var s=t;s>0;){s--;var a=e[s];if(Array.isArray(r)?r.indexOf(a)!==-1:r===a)for(var o=t;o<=e.length;){o++;var i=e[o];if(i===A)return!0;if(i!==Je)break}if(a!==Je)break}return!1},xi=function(r,A){for(var t=r;t>=0;){var e=A[t];if(e===Je)t--;else return e}return 0},Ag=function(r,A,t,e,n){if(t[e]===0)return uA;var s=e-1;if(Array.isArray(n)&&n[s]===!0)return uA;var i=s-1,a=s+1,o=A[s],l=i>=0?A[i]:0,c=A[a];if(o===Za&&c===ja)return uA;if(hs.indexOf(o)!==-1)return Ao;if(hs.indexOf(c)!==-1||eo.indexOf(c)!==-1)return uA;if(xi(s,A)===$a)return Er;if(ds.get(r[s])===as||(o===Fr||o===yr)&&ds.get(r[a])===as||o===Fi||c===Fi||o===yi||[Je,os,Xt].indexOf(o)===-1&&c===yi||[vr,Ot,JB,wt,Ct].indexOf(c)!==-1||xi(s,A)===Vt||Dn(Tn,Vt,s,A)||Dn([vr,Ot],cs,s,A)||Dn(Ei,Ei,s,A))return uA;if(o===Je)return Er;if(o===Tn||c===Tn)return uA;if(c===ls||o===ls)return Er;if([os,Xt,cs].indexOf(c)!==-1||o===XB||l===gs&&$B.indexOf(o)!==-1||o===Ct&&c===gs||c===bi||He.indexOf(c)!==-1&&o===se||He.indexOf(o)!==-1&&c===se||o===Yt&&[ar,Fr,yr].indexOf(c)!==-1||[ar,Fr,yr].indexOf(o)!==-1&&c===Jt||He.indexOf(o)!==-1&&Ii.indexOf(c)!==-1||Ii.indexOf(o)!==-1&&He.indexOf(c)!==-1||[Yt,Jt].indexOf(o)!==-1&&(c===se||[Vt,Xt].indexOf(c)!==-1&&A[a+1]===se)||[Vt,Xt].indexOf(o)!==-1&&c===se||o===se&&[se,Ct,wt].indexOf(c)!==-1)return uA;if([se,Ct,wt,vr,Ot].indexOf(c)!==-1)for(var u=s;u>=0;){var B=A[u];if(B===se)return uA;if([Ct,wt].indexOf(B)!==-1)u--;else break}if([Yt,Jt].indexOf(c)!==-1)for(var u=[vr,Ot].indexOf(o)!==-1?i:s;u>=0;){var B=A[u];if(B===se)return uA;if([Ct,wt].indexOf(B)!==-1)u--;else break}if(fs===o&&[fs,Gr,us,Bs].indexOf(c)!==-1||[Gr,us].indexOf(o)!==-1&&[Gr,Xr].indexOf(c)!==-1||[Xr,Bs].indexOf(o)!==-1&&c===Xr||Hi.indexOf(o)!==-1&&[bi,Jt].indexOf(c)!==-1||Hi.indexOf(c)!==-1&&o===Yt||He.indexOf(o)!==-1&&He.indexOf(c)!==-1||o===wt&&He.indexOf(c)!==-1||He.concat(se).indexOf(o)!==-1&&c===Vt&&ZB.indexOf(r[a])===-1||He.concat(se).indexOf(c)!==-1&&o===Ot)return uA;if(o===Ln&&c===Ln){for(var f=t[s],g=1;f>0&&(f--,A[f]===Ln);)g++;if(g%2!==0)return uA}return o===Fr&&c===yr?uA:Er},eg=function(r,A){A||(A={lineBreak:"normal",wordBreak:"normal"});var t=qB(r,A.lineBreak),e=t[0],n=t[1],s=t[2];(A.wordBreak==="break-all"||A.wordBreak==="break-word")&&(n=n.map(function(a){return[se,at,qa].indexOf(a)!==-1?ar:a}));var i=A.wordBreak==="keep-all"?s.map(function(a,o){return a&&r[o]>=19968&&r[o]<=40959}):void 0;return[e,n,i]},tg=function(){function r(A,t,e,n){this.codePoints=A,this.required=t===Ao,this.start=e,this.end=n}return r.prototype.slice=function(){return TA.apply(void 0,this.codePoints.slice(this.start,this.end))},r}(),rg=function(r,A){var t=gn(r),e=eg(t,A),n=e[0],s=e[1],i=e[2],a=t.length,o=0,l=0;return{next:function(){if(l>=a)return{done:!0,value:null};for(var c=uA;l=to&&r<=57},Mg=function(r){return r>=55296&&r<=57343},Qt=function(r){return Ae(r)||r>=so&&r<=ao||r>=ro&&r<=Tg},Og=function(r){return r>=ro&&r<=Dg},Vg=function(r){return r>=so&&r<=_g},kg=function(r){return Og(r)||Vg(r)},Rg=function(r){return r>=Ug},Sr=function(r){return r===Zr||r===ig||r===ag},jr=function(r){return kg(r)||Rg(r)||r===ug},Ki=function(r){return jr(r)||Ae(r)||r===ne},Ng=function(r){return r>=Eg&&r<=bg||r===Ig||r>=Hg&&r<=xg||r===Sg},Xe=function(r,A){return r!==qt?!1:A!==Zr},Tr=function(r,A,t){return r===ne?jr(A)||Xe(A,t):jr(r)?!0:!!(r===qt&&Xe(r,A))},_n=function(r,A,t){return r===ct||r===ne?Ae(A)?!0:A===or&&Ae(t):Ae(r===or?A:r)},Pg=function(r){var A=0,t=1;(r[A]===ct||r[A]===ne)&&(r[A]===ne&&(t=-1),A++);for(var e=[];Ae(r[A]);)e.push(r[A++]);var n=e.length?parseInt(TA.apply(void 0,e),10):0;r[A]===or&&A++;for(var s=[];Ae(r[A]);)s.push(r[A++]);var i=s.length,a=i?parseInt(TA.apply(void 0,s),10):0;(r[A]===io||r[A]===no)&&A++;var o=1;(r[A]===ct||r[A]===ne)&&(r[A]===ne&&(o=-1),A++);for(var l=[];Ae(r[A]);)l.push(r[A++]);var c=l.length?parseInt(TA.apply(void 0,l),10):0;return t*(n+a*Math.pow(10,-i))*Math.pow(10,o*c)},Gg={type:2},Xg={type:3},Jg={type:4},Yg={type:13},Wg={type:8},zg={type:21},Zg={type:9},jg={type:10},$g={type:11},qg={type:12},Af={type:14},Lr={type:23},ef={type:1},tf={type:25},rf={type:24},nf={type:26},sf={type:27},af={type:28},of={type:29},lf={type:31},ps={type:32},oo=function(){function r(){this._value=[]}return r.prototype.write=function(A){this._value=this._value.concat(gn(A))},r.prototype.read=function(){for(var A=[],t=this.consumeToken();t!==ps;)A.push(t),t=this.consumeToken();return A},r.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case br:return this.consumeStringToken(br);case og:var t=this.peekCodePoint(0),e=this.peekCodePoint(1),n=this.peekCodePoint(2);if(Ki(t)||Xe(e,n)){var s=Tr(t,e,n)?sg:ng,i=this.consumeName();return{type:5,value:i,flags:s}}break;case lg:if(this.peekCodePoint(0)===kt)return this.consumeCodePoint(),Yg;break;case Ir:return this.consumeStringToken(Ir);case Hr:return Gg;case Rt:return Xg;case Kn:if(this.peekCodePoint(0)===kt)return this.consumeCodePoint(),Af;break;case ct:if(_n(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case vg:return Jg;case ne:var a=A,o=this.peekCodePoint(0),l=this.peekCodePoint(1);if(_n(a,o,l))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(Tr(a,o,l))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(o===ne&&l===fg)return this.consumeCodePoint(),this.consumeCodePoint(),rf;break;case or:if(_n(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Ti:if(this.peekCodePoint(0)===Kn)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===Kn&&(c=this.consumeCodePoint(),c===Ti))return this.consumeToken();if(c===we)return this.consumeToken()}break;case Fg:return nf;case yg:return sf;case gg:if(this.peekCodePoint(0)===Bg&&this.peekCodePoint(1)===ne&&this.peekCodePoint(2)===ne)return this.consumeCodePoint(),this.consumeCodePoint(),tf;break;case dg:var u=this.peekCodePoint(0),B=this.peekCodePoint(1),f=this.peekCodePoint(2);if(Tr(u,B,f)){var i=this.consumeName();return{type:7,value:i}}break;case hg:return af;case qt:if(Xe(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case pg:return of;case wg:if(this.peekCodePoint(0)===kt)return this.consumeCodePoint(),Wg;break;case Cg:return $g;case Qg:return qg;case Lg:case Kg:var g=this.peekCodePoint(0),h=this.peekCodePoint(1);return g===ct&&(Qt(h)||h===xr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case Li:if(this.peekCodePoint(0)===kt)return this.consumeCodePoint(),Zg;if(this.peekCodePoint(0)===Li)return this.consumeCodePoint(),zg;break;case mg:if(this.peekCodePoint(0)===kt)return this.consumeCodePoint(),jg;break;case we:return ps}return Sr(A)?(this.consumeWhiteSpace(),lf):Ae(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):jr(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:TA(A)}},r.prototype.consumeCodePoint=function(){var A=this._value.shift();return typeof A>"u"?-1:A},r.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},r.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},r.prototype.consumeUnicodeRangeToken=function(){for(var A=[],t=this.consumeCodePoint();Qt(t)&&A.length<6;)A.push(t),t=this.consumeCodePoint();for(var e=!1;t===xr&&A.length<6;)A.push(t),t=this.consumeCodePoint(),e=!0;if(e){var n=parseInt(TA.apply(void 0,A.map(function(o){return o===xr?to:o})),16),s=parseInt(TA.apply(void 0,A.map(function(o){return o===xr?ao:o})),16);return{type:30,start:n,end:s}}var i=parseInt(TA.apply(void 0,A),16);if(this.peekCodePoint(0)===ne&&Qt(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var a=[];Qt(t)&&a.length<6;)a.push(t),t=this.consumeCodePoint();var s=parseInt(TA.apply(void 0,a),16);return{type:30,start:i,end:s}}else return{type:30,start:i,end:i}},r.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return A.toLowerCase()==="url"&&this.peekCodePoint(0)===Hr?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Hr?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},r.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===we)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===Ir||t===br){var e=this.consumeStringToken(this.consumeCodePoint());return e.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===we||this.peekCodePoint(0)===Rt)?(this.consumeCodePoint(),{type:22,value:e.value}):(this.consumeBadUrlRemnants(),Lr)}for(;;){var n=this.consumeCodePoint();if(n===we||n===Rt)return{type:22,value:TA.apply(void 0,A)};if(Sr(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===we||this.peekCodePoint(0)===Rt?(this.consumeCodePoint(),{type:22,value:TA.apply(void 0,A)}):(this.consumeBadUrlRemnants(),Lr);if(n===br||n===Ir||n===Hr||Ng(n))return this.consumeBadUrlRemnants(),Lr;if(n===qt)if(Xe(n,this.peekCodePoint(0)))A.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Lr;else A.push(n)}},r.prototype.consumeWhiteSpace=function(){for(;Sr(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===Rt||A===we)return;Xe(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},r.prototype.consumeStringSlice=function(A){for(var t=5e4,e="";A>0;){var n=Math.min(t,A);e+=TA.apply(void 0,this._value.splice(0,n)),A-=n}return this._value.shift(),e},r.prototype.consumeStringToken=function(A){var t="",e=0;do{var n=this._value[e];if(n===we||n===void 0||n===A)return t+=this.consumeStringSlice(e),{type:0,value:t};if(n===Zr)return this._value.splice(0,e),ef;if(n===qt){var s=this._value[e+1];s!==we&&s!==void 0&&(s===Zr?(t+=this.consumeStringSlice(e),e=-1,this._value.shift()):Xe(n,s)&&(t+=this.consumeStringSlice(e),t+=TA(this.consumeEscapedCodePoint()),e=-1))}e++}while(!0)},r.prototype.consumeNumber=function(){var A=[],t=ur,e=this.peekCodePoint(0);for((e===ct||e===ne)&&A.push(this.consumeCodePoint());Ae(this.peekCodePoint(0));)A.push(this.consumeCodePoint());e=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(e===or&&Ae(n))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Si;Ae(this.peekCodePoint(0));)A.push(this.consumeCodePoint());e=this.peekCodePoint(0),n=this.peekCodePoint(1);var s=this.peekCodePoint(2);if((e===io||e===no)&&((n===ct||n===ne)&&Ae(s)||Ae(n)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Si;Ae(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[Pg(A),t]},r.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),t=A[0],e=A[1],n=this.peekCodePoint(0),s=this.peekCodePoint(1),i=this.peekCodePoint(2);if(Tr(n,s,i)){var a=this.consumeName();return{type:15,number:t,flags:e,unit:a}}return n===cg?(this.consumeCodePoint(),{type:16,number:t,flags:e}):{type:17,number:t,flags:e}},r.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(Qt(A)){for(var t=TA(A);Qt(this.peekCodePoint(0))&&t.length<6;)t+=TA(this.consumeCodePoint());Sr(this.peekCodePoint(0))&&this.consumeCodePoint();var e=parseInt(t,16);return e===0||Mg(e)||e>1114111?Di:e}return A===we?Di:A},r.prototype.consumeName=function(){for(var A="";;){var t=this.consumeCodePoint();if(Ki(t))A+=TA(t);else if(Xe(t,this.peekCodePoint(0)))A+=TA(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),A}},r}(),lo=function(){function r(A){this._tokens=A}return r.create=function(A){var t=new oo;return t.write(A),new r(t.read())},r.parseValue=function(A){return r.create(A).parseComponentValue()},r.parseValues=function(A){return r.create(A).parseComponentValues()},r.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===31;)A=this.consumeToken();if(A.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var t=this.consumeComponentValue();do A=this.consumeToken();while(A.type===31);if(A.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},r.prototype.parseComponentValues=function(){for(var A=[];;){var t=this.consumeComponentValue();if(t.type===32)return A;A.push(t),A.push()}},r.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},r.prototype.consumeSimpleBlock=function(A){for(var t={type:A,values:[]},e=this.consumeToken();;){if(e.type===32||uf(e,A))return t;this.reconsumeToken(e),t.values.push(this.consumeComponentValue()),e=this.consumeToken()}},r.prototype.consumeFunction=function(A){for(var t={name:A.value,values:[],type:18};;){var e=this.consumeToken();if(e.type===32||e.type===3)return t;this.reconsumeToken(e),t.values.push(this.consumeComponentValue())}},r.prototype.consumeToken=function(){var A=this._tokens.shift();return typeof A>"u"?ps:A},r.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},r}(),Br=function(r){return r.type===15},_t=function(r){return r.type===17},pA=function(r){return r.type===20},cf=function(r){return r.type===0},ws=function(r,A){return pA(r)&&r.value===A},co=function(r){return r.type!==31},Dt=function(r){return r.type!==31&&r.type!==4},Ue=function(r){var A=[],t=[];return r.forEach(function(e){if(e.type===4){if(t.length===0)throw new Error("Error parsing function args, zero tokens for arg");A.push(t),t=[];return}e.type!==31&&t.push(e)}),t.length&&A.push(t),A},uf=function(r,A){return A===11&&r.type===12||A===28&&r.type===29?!0:A===2&&r.type===3},At=function(r){return r.type===17||r.type===15},_A=function(r){return r.type===16||At(r)},uo=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},$A={type:17,number:0,flags:ur},Ms={type:16,number:50,flags:ur},Ye={type:16,number:100,flags:ur},Wt=function(r,A,t){var e=r[0],n=r[1];return[UA(e,A),UA(typeof n<"u"?n:e,t)]},UA=function(r,A){if(r.type===16)return r.number/100*A;if(Br(r))switch(r.unit){case"rem":case"em":return 16*r.number;case"px":default:return r.number}return r.number},Bo="deg",go="grad",fo="rad",ho="turn",fn={name:"angle",parse:function(r,A){if(A.type===15)switch(A.unit){case Bo:return Math.PI*A.number/180;case go:return Math.PI/200*A.number;case fo:return A.number;case ho:return Math.PI*2*A.number}throw new Error("Unsupported angle type")}},po=function(r){return r.type===15&&(r.unit===Bo||r.unit===go||r.unit===fo||r.unit===ho)},wo=function(r){var A=r.filter(pA).map(function(t){return t.value}).join(" ");switch(A){case"to bottom right":case"to right bottom":case"left top":case"top left":return[$A,$A];case"to top":case"bottom":return ce(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[$A,Ye];case"to right":case"left":return ce(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ye,Ye];case"to bottom":case"top":return ce(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ye,$A];case"to left":case"right":return ce(270)}return 0},ce=function(r){return Math.PI*r/180},je={name:"color",parse:function(r,A){if(A.type===18){var t=Bf[A.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return t(r,A.values)}if(A.type===5){if(A.value.length===3){var e=A.value.substring(0,1),n=A.value.substring(1,2),s=A.value.substring(2,3);return We(parseInt(e+e,16),parseInt(n+n,16),parseInt(s+s,16),1)}if(A.value.length===4){var e=A.value.substring(0,1),n=A.value.substring(1,2),s=A.value.substring(2,3),i=A.value.substring(3,4);return We(parseInt(e+e,16),parseInt(n+n,16),parseInt(s+s,16),parseInt(i+i,16)/255)}if(A.value.length===6){var e=A.value.substring(0,2),n=A.value.substring(2,4),s=A.value.substring(4,6);return We(parseInt(e,16),parseInt(n,16),parseInt(s,16),1)}if(A.value.length===8){var e=A.value.substring(0,2),n=A.value.substring(2,4),s=A.value.substring(4,6),i=A.value.substring(6,8);return We(parseInt(e,16),parseInt(n,16),parseInt(s,16),parseInt(i,16)/255)}}if(A.type===20){var a=Le[A.value.toUpperCase()];if(typeof a<"u")return a}return Le.TRANSPARENT}},$e=function(r){return(255&r)===0},XA=function(r){var A=255&r,t=255&r>>8,e=255&r>>16,n=255&r>>24;return A<255?"rgba("+n+","+e+","+t+","+A/255+")":"rgb("+n+","+e+","+t+")"},We=function(r,A,t,e){return(r<<24|A<<16|t<<8|Math.round(e*255)<<0)>>>0},_i=function(r,A){if(r.type===17)return r.number;if(r.type===16){var t=A===3?1:255;return A===3?r.number/100*t:Math.round(r.number/100*t)}return 0},Mi=function(r,A){var t=A.filter(Dt);if(t.length===3){var e=t.map(_i),n=e[0],s=e[1],i=e[2];return We(n,s,i,1)}if(t.length===4){var a=t.map(_i),n=a[0],s=a[1],i=a[2],o=a[3];return We(n,s,i,o)}return 0};function Mn(r,A,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(A-r)*t*6+r:t<1/2?A:t<2/3?(A-r)*6*(2/3-t)+r:r}var Oi=function(r,A){var t=A.filter(Dt),e=t[0],n=t[1],s=t[2],i=t[3],a=(e.type===17?ce(e.number):fn.parse(r,e))/(Math.PI*2),o=_A(n)?n.number/100:0,l=_A(s)?s.number/100:0,c=typeof i<"u"&&_A(i)?UA(i,1):1;if(o===0)return We(l*255,l*255,l*255,1);var u=l<=.5?l*(o+1):l+o-l*o,B=l*2-u,f=Mn(B,u,a+1/3),g=Mn(B,u,a),h=Mn(B,u,a-1/3);return We(f*255,g*255,h*255,c)},Bf={hsl:Oi,hsla:Oi,rgb:Mi,rgba:Mi},Ar=function(r,A){return je.parse(r,lo.create(A).parseComponentValue())},Le={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},gf={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,A){return A.map(function(t){if(pA(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ff={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},dn=function(r,A){var t=je.parse(r,A[0]),e=A[1];return e&&_A(e)?{color:t,stop:e}:{color:t,stop:null}},Vi=function(r,A){var t=r[0],e=r[r.length-1];t.stop===null&&(t.stop=$A),e.stop===null&&(e.stop=Ye);for(var n=[],s=0,i=0;is?n.push(o):n.push(s),s=o}else n.push(null)}for(var l=null,i=0;ii.optimumDistance)?{optimumCorner:a,optimumDistance:c}:i},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},pf=function(r,A,t,e,n){var s=0,i=0;switch(r.size){case 0:r.shape===0?s=i=Math.min(Math.abs(A),Math.abs(A-e),Math.abs(t),Math.abs(t-n)):r.shape===1&&(s=Math.min(Math.abs(A),Math.abs(A-e)),i=Math.min(Math.abs(t),Math.abs(t-n)));break;case 2:if(r.shape===0)s=i=Math.min(de(A,t),de(A,t-n),de(A-e,t),de(A-e,t-n));else if(r.shape===1){var a=Math.min(Math.abs(t),Math.abs(t-n))/Math.min(Math.abs(A),Math.abs(A-e)),o=ki(e,n,A,t,!0),l=o[0],c=o[1];s=de(l-A,(c-t)/a),i=a*s}break;case 1:r.shape===0?s=i=Math.max(Math.abs(A),Math.abs(A-e),Math.abs(t),Math.abs(t-n)):r.shape===1&&(s=Math.max(Math.abs(A),Math.abs(A-e)),i=Math.max(Math.abs(t),Math.abs(t-n)));break;case 3:if(r.shape===0)s=i=Math.max(de(A,t),de(A,t-n),de(A-e,t),de(A-e,t-n));else if(r.shape===1){var a=Math.max(Math.abs(t),Math.abs(t-n))/Math.max(Math.abs(A),Math.abs(A-e)),u=ki(e,n,A,t,!1),l=u[0],c=u[1];s=de(l-A,(c-t)/a),i=a*s}break}return Array.isArray(r.size)&&(s=UA(r.size[0],e),i=r.size.length===2?UA(r.size[1],n):s),[s,i]},wf=function(r,A){var t=ce(180),e=[];return Ue(A).forEach(function(n,s){if(s===0){var i=n[0];if(i.type===20&&i.value==="to"){t=wo(n);return}else if(po(i)){t=fn.parse(r,i);return}}var a=dn(r,n);e.push(a)}),{angle:t,stops:e,type:1}},Dr=function(r,A){var t=ce(180),e=[];return Ue(A).forEach(function(n,s){if(s===0){var i=n[0];if(i.type===20&&["top","left","right","bottom"].indexOf(i.value)!==-1){t=wo(n);return}else if(po(i)){t=(fn.parse(r,i)+ce(270))%ce(360);return}}var a=dn(r,n);e.push(a)}),{angle:t,stops:e,type:1}},Cf=function(r,A){var t=ce(180),e=[],n=1,s=0,i=3,a=[];return Ue(A).forEach(function(o,l){var c=o[0];if(l===0){if(pA(c)&&c.value==="linear"){n=1;return}else if(pA(c)&&c.value==="radial"){n=2;return}}if(c.type===18){if(c.name==="from"){var u=je.parse(r,c.values[0]);e.push({stop:$A,color:u})}else if(c.name==="to"){var u=je.parse(r,c.values[0]);e.push({stop:Ye,color:u})}else if(c.name==="color-stop"){var B=c.values.filter(Dt);if(B.length===2){var u=je.parse(r,B[1]),f=B[0];_t(f)&&e.push({stop:{type:16,number:f.number*100,flags:f.flags},color:u})}}}}),n===1?{angle:(t+ce(180))%ce(360),stops:e,type:n}:{size:i,shape:s,stops:e,position:a,type:n}},Co="closest-side",Qo="farthest-side",mo="closest-corner",Uo="farthest-corner",vo="circle",Fo="ellipse",yo="cover",Eo="contain",Qf=function(r,A){var t=0,e=3,n=[],s=[];return Ue(A).forEach(function(i,a){var o=!0;if(a===0){var l=!1;o=i.reduce(function(u,B){if(l)if(pA(B))switch(B.value){case"center":return s.push(Ms),u;case"top":case"left":return s.push($A),u;case"right":case"bottom":return s.push(Ye),u}else(_A(B)||At(B))&&s.push(B);else if(pA(B))switch(B.value){case vo:return t=0,!1;case Fo:return t=1,!1;case"at":return l=!0,!1;case Co:return e=0,!1;case yo:case Qo:return e=1,!1;case Eo:case mo:return e=2,!1;case Uo:return e=3,!1}else if(At(B)||_A(B))return Array.isArray(e)||(e=[]),e.push(B),!1;return u},o)}if(o){var c=dn(r,i);n.push(c)}}),{size:e,shape:t,stops:n,position:s,type:2}},Kr=function(r,A){var t=0,e=3,n=[],s=[];return Ue(A).forEach(function(i,a){var o=!0;if(a===0?o=i.reduce(function(c,u){if(pA(u))switch(u.value){case"center":return s.push(Ms),!1;case"top":case"left":return s.push($A),!1;case"right":case"bottom":return s.push(Ye),!1}else if(_A(u)||At(u))return s.push(u),!1;return c},o):a===1&&(o=i.reduce(function(c,u){if(pA(u))switch(u.value){case vo:return t=0,!1;case Fo:return t=1,!1;case Eo:case Co:return e=0,!1;case Qo:return e=1,!1;case mo:return e=2,!1;case yo:case Uo:return e=3,!1}else if(At(u)||_A(u))return Array.isArray(e)||(e=[]),e.push(u),!1;return c},o)),o){var l=dn(r,i);n.push(l)}}),{size:e,shape:t,stops:n,position:s,type:2}},mf=function(r){return r.type===1},Uf=function(r){return r.type===2},Os={name:"image",parse:function(r,A){if(A.type===22){var t={url:A.value,type:0};return r.cache.addImage(A.value),t}if(A.type===18){var e=bo[A.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return e(r,A.values)}throw new Error("Unsupported image type "+A.type)}};function vf(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!bo[r.name])}var bo={"linear-gradient":wf,"-moz-linear-gradient":Dr,"-ms-linear-gradient":Dr,"-o-linear-gradient":Dr,"-webkit-linear-gradient":Dr,"radial-gradient":Qf,"-moz-radial-gradient":Kr,"-ms-radial-gradient":Kr,"-o-radial-gradient":Kr,"-webkit-radial-gradient":Kr,"-webkit-gradient":Cf},Ff={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(r,A){if(A.length===0)return[];var t=A[0];return t.type===20&&t.value==="none"?[]:A.filter(function(e){return Dt(e)&&vf(e)}).map(function(e){return Os.parse(r,e)})}},yf={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,A){return A.map(function(t){if(pA(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ef={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,A){return Ue(A).map(function(t){return t.filter(_A)}).map(uo)}},bf={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,A){return Ue(A).map(function(t){return t.filter(pA).map(function(e){return e.value}).join(" ")}).map(If)}},If=function(r){switch(r){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},St;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(St||(St={}));var Hf={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,A){return Ue(A).map(function(t){return t.filter(xf)})}},xf=function(r){return pA(r)||_A(r)},hn=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Sf=hn("top"),Tf=hn("right"),Lf=hn("bottom"),Df=hn("left"),pn=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(A,t){return uo(t.filter(_A))}}},Kf=pn("top-left"),_f=pn("top-right"),Mf=pn("bottom-right"),Of=pn("bottom-left"),wn=function(r){return{name:"border-"+r+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Vf=wn("top"),kf=wn("right"),Rf=wn("bottom"),Nf=wn("left"),Cn=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,t){return Br(t)?t.number:0}}},Pf=Cn("top"),Gf=Cn("right"),Xf=Cn("bottom"),Jf=Cn("left"),Yf={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Wf={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,A){switch(A){case"rtl":return 1;case"ltr":default:return 0}}},zf={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,A){return A.filter(pA).reduce(function(t,e){return t|Zf(e.value)},0)}},Zf=function(r){switch(r){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},jf={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(r,A){switch(A){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},$f={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(r,A){return A.type===20&&A.value==="normal"?0:A.type===17||A.type===15?A.number:0}},$r;(function(r){r.NORMAL="normal",r.STRICT="strict"})($r||($r={}));var qf={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,A){switch(A){case"strict":return $r.STRICT;case"normal":default:return $r.NORMAL}}},Ad={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ri=function(r,A){return pA(r)&&r.value==="normal"?1.2*A:r.type===17?A*r.number:_A(r)?UA(r,A):A},ed={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,A){return A.type===20&&A.value==="none"?null:Os.parse(r,A)}},td={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(r,A){switch(A){case"inside":return 0;case"outside":default:return 1}}},Cs={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(r,A){switch(A){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Qn=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},rd=Qn("top"),nd=Qn("right"),sd=Qn("bottom"),id=Qn("left"),ad={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,A){return A.filter(pA).map(function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},od={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(r,A){switch(A){case"break-word":return"break-word";case"normal":default:return"normal"}}},mn=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},ld=mn("top"),cd=mn("right"),ud=mn("bottom"),Bd=mn("left"),gd={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(r,A){switch(A){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},fd={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(r,A){switch(A){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},dd={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,A){return A.length===1&&ws(A[0],"none")?[]:Ue(A).map(function(t){for(var e={color:Le.TRANSPARENT,offsetX:$A,offsetY:$A,blur:$A},n=0,s=0;s"u")throw new Error('Attempting to parse an unsupported transform function "'+A.name+'"');return t(A.values)}return null}},wd=function(r){var A=r.filter(function(t){return t.type===17}).map(function(t){return t.number});return A.length===6?A:null},Cd=function(r){var A=r.filter(function(o){return o.type===17}).map(function(o){return o.number}),t=A[0],e=A[1];A[2],A[3];var n=A[4],s=A[5];A[6],A[7],A[8],A[9],A[10],A[11];var i=A[12],a=A[13];return A[14],A[15],A.length===16?[t,e,n,s,i,a]:null},Qd={matrix:wd,matrix3d:Cd},Ni={type:16,number:50,flags:ur},md=[Ni,Ni],Ud={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(r,A){var t=A.filter(_A);return t.length!==2?md:[t[0],t[1]]}},vd={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(r,A){switch(A){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},er;(function(r){r.NORMAL="normal",r.BREAK_ALL="break-all",r.KEEP_ALL="keep-all"})(er||(er={}));var Fd={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,A){switch(A){case"break-all":return er.BREAK_ALL;case"keep-all":return er.KEEP_ALL;case"normal":default:return er.NORMAL}}},yd={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(r,A){if(A.type===20)return{auto:!0,order:0};if(_t(A))return{auto:!1,order:A.number};throw new Error("Invalid z-index number parsed")}},Io={name:"time",parse:function(r,A){if(A.type===15)switch(A.unit.toLowerCase()){case"s":return 1e3*A.number;case"ms":return A.number}throw new Error("Unsupported time type")}},Ed={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(r,A){return _t(A)?A.number:1}},bd={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Id={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(r,A){return A.filter(pA).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return t!==0})}},Hd={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(r,A){var t=[],e=[];return A.forEach(function(n){switch(n.type){case 20:case 0:t.push(n.value);break;case 17:t.push(n.number.toString());break;case 4:e.push(t.join(" ")),t.length=0;break}}),t.length&&e.push(t.join(" ")),e.map(function(n){return n.indexOf(" ")===-1?n:"'"+n+"'"})}},xd={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Sd={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(r,A){if(_t(A))return A.number;if(pA(A))switch(A.value){case"bold":return 700;case"normal":default:return 400}return 400}},Td={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(r,A){return A.filter(pA).map(function(t){return t.value})}},Ld={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(r,A){switch(A){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},NA=function(r,A){return(r&A)!==0},Dd={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(r,A){if(A.length===0)return[];var t=A[0];return t.type===20&&t.value==="none"?[]:A}},Kd={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(r,A){if(A.length===0)return null;var t=A[0];if(t.type===20&&t.value==="none")return null;for(var e=[],n=A.filter(co),s=0;s1?1:0],this.overflowWrap=G(A,od,t.overflowWrap),this.paddingTop=G(A,ld,t.paddingTop),this.paddingRight=G(A,cd,t.paddingRight),this.paddingBottom=G(A,ud,t.paddingBottom),this.paddingLeft=G(A,Bd,t.paddingLeft),this.paintOrder=G(A,kd,t.paintOrder),this.position=G(A,fd,t.position),this.textAlign=G(A,gd,t.textAlign),this.textDecorationColor=G(A,bd,(e=t.textDecorationColor)!==null&&e!==void 0?e:t.color),this.textDecorationLine=G(A,Id,(n=t.textDecorationLine)!==null&&n!==void 0?n:t.textDecoration),this.textShadow=G(A,dd,t.textShadow),this.textTransform=G(A,hd,t.textTransform),this.transform=G(A,pd,t.transform),this.transformOrigin=G(A,Ud,t.transformOrigin),this.visibility=G(A,vd,t.visibility),this.webkitTextStrokeColor=G(A,Rd,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=G(A,Nd,t.webkitTextStrokeWidth),this.wordBreak=G(A,Fd,t.wordBreak),this.zIndex=G(A,yd,t.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return $e(this.backgroundColor)},r.prototype.isTransformed=function(){return this.transform!==null},r.prototype.isPositioned=function(){return this.position!==0},r.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},r.prototype.isFloating=function(){return this.float!==0},r.prototype.isInlineLevel=function(){return NA(this.display,4)||NA(this.display,33554432)||NA(this.display,268435456)||NA(this.display,536870912)||NA(this.display,67108864)||NA(this.display,134217728)},r}(),Gd=function(){function r(A,t){this.content=G(A,Dd,t.content),this.quotes=G(A,Od,t.quotes)}return r}(),Gi=function(){function r(A,t){this.counterIncrement=G(A,Kd,t.counterIncrement),this.counterReset=G(A,_d,t.counterReset)}return r}(),G=function(r,A,t){var e=new oo,n=t!==null&&typeof t<"u"?t.toString():A.initialValue;e.write(n);var s=new lo(e.read());switch(A.type){case 2:var i=s.parseComponentValue();return A.parse(r,pA(i)?i.value:A.initialValue);case 0:return A.parse(r,s.parseComponentValue());case 1:return A.parse(r,s.parseComponentValues());case 4:return s.parseComponentValue();case 3:switch(A.format){case"angle":return fn.parse(r,s.parseComponentValue());case"color":return je.parse(r,s.parseComponentValue());case"image":return Os.parse(r,s.parseComponentValue());case"length":var a=s.parseComponentValue();return At(a)?a:$A;case"length-percentage":var o=s.parseComponentValue();return _A(o)?o:$A;case"time":return Io.parse(r,s.parseComponentValue())}break}},Xd="data-html2canvas-debug",Jd=function(r){var A=r.getAttribute(Xd);switch(A){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Qs=function(r,A){var t=Jd(r);return t===1||A===t},ve=function(){function r(A,t){if(this.context=A,this.textNodes=[],this.elements=[],this.flags=0,Qs(t,3))debugger;this.styles=new Pd(A,window.getComputedStyle(t,null)),vs(t)&&(this.styles.animationDuration.some(function(e){return e>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=Bn(this.context,t),Qs(t,4)&&(this.flags|=16)}return r}(),Yd="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAA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ACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIA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AAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var _r=0;_r>4,c[n++]=(i&15)<<4|a>>2,c[n++]=(a&3)<<6|o&63;return l},zd=function(r){for(var A=r.length,t=[],e=0;e>gt,$d=1<>gt,Ah=Ho+qd,eh=Ah,th=32,rh=eh+th,nh=65536>>Vs,sh=1<=0){if(A<55296||A>56319&&A<=65535)return t=this.index[A>>gt],t=(t<>gt)],t=(t<>Vs),t=this.index[t],t+=A>>gt&ih,t=this.index[t],t=(t<"u"?[]:new Uint8Array(256);for(var Mr=0;Mr=55296&&n<=56319&&t>10)+55296,i%1024+56320)),(n+1===t||e.length>16384)&&(s+=String.fromCharCode.apply(String,e),e.length=0)}return s},dh=oh(Yd),oe="×",Xn="÷",hh=function(r){return dh.get(r)},ph=function(r,A,t){var e=t-2,n=A[e],s=A[t-1],i=A[t];if(s===kn&&i===Rn)return oe;if(s===kn||s===Rn||s===Wi||i===kn||i===Rn||i===Wi)return Xn;if(s===Zi&&[Zi,Nn,ji,$i].indexOf(i)!==-1||(s===ji||s===Nn)&&(i===Nn||i===Pn)||(s===$i||s===Pn)&&i===Pn||i===qi||i===zi||i===Bh||s===uh)return oe;if(s===qi&&i===Aa){for(;n===zi;)n=A[--e];if(n===Aa)return oe}if(s===Gn&&i===Gn){for(var a=0;n===Gn;)a++,n=A[--e];if(a%2===0)return oe}return Xn},wh=function(r){var A=gh(r),t=A.length,e=0,n=0,s=A.map(hh);return{next:function(){if(e>=t)return{done:!0,value:null};for(var i=oe;ei.x||c.y>i.y;return i=c,l===0?!0:u});return r.body.removeChild(A),a},Uh=function(){return typeof new Image().crossOrigin<"u"},vh=function(){return typeof new XMLHttpRequest().responseType=="string"},Fh=function(r){var A=new Image,t=r.createElement("canvas"),e=t.getContext("2d");if(!e)return!1;A.src="data:image/svg+xml,";try{e.drawImage(A,0,0),t.toDataURL()}catch{return!1}return!0},ea=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},yh=function(r){var A=r.createElement("canvas"),t=100;A.width=t,A.height=t;var e=A.getContext("2d");if(!e)return Promise.reject(!1);e.fillStyle="rgb(0, 255, 0)",e.fillRect(0,0,t,t);var n=new Image,s=A.toDataURL();n.src=s;var i=ms(t,t,0,0,n);return e.fillStyle="red",e.fillRect(0,0,t,t),ta(i).then(function(a){e.drawImage(a,0,0);var o=e.getImageData(0,0,t,t).data;e.fillStyle="red",e.fillRect(0,0,t,t);var l=r.createElement("div");return l.style.backgroundImage="url("+s+")",l.style.height=t+"px",ea(o)?ta(ms(t,t,0,0,l)):Promise.reject(!1)}).then(function(a){return e.drawImage(a,0,0),ea(e.getImageData(0,0,t,t).data)}).catch(function(){return!1})},ms=function(r,A,t,e,n){var s="http://www.w3.org/2000/svg",i=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return i.setAttributeNS(null,"width",r.toString()),i.setAttributeNS(null,"height",A.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",t.toString()),a.setAttributeNS(null,"y",e.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),i.appendChild(a),a.appendChild(n),i},ta=function(r){return new Promise(function(A,t){var e=new Image;e.onload=function(){return A(e)},e.onerror=t,e.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},jA={get SUPPORT_RANGE_BOUNDS(){var r=Qh(document);return Object.defineProperty(jA,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=jA.SUPPORT_RANGE_BOUNDS&&mh(document);return Object.defineProperty(jA,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=Fh(document);return Object.defineProperty(jA,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?yh(document):Promise.resolve(!1);return Object.defineProperty(jA,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=Uh();return Object.defineProperty(jA,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=vh();return Object.defineProperty(jA,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(jA,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(jA,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},tr=function(){function r(A,t){this.text=A,this.bounds=t}return r}(),Eh=function(r,A,t,e){var n=Hh(A,t),s=[],i=0;return n.forEach(function(a){if(t.textDecorationLine.length||a.trim().length>0)if(jA.SUPPORT_RANGE_BOUNDS){var o=ra(e,i,a.length).getClientRects();if(o.length>1){var l=ks(a),c=0;l.forEach(function(B){s.push(new tr(B,De.fromDOMRectList(r,ra(e,c+i,B.length).getClientRects()))),c+=B.length})}else s.push(new tr(a,De.fromDOMRectList(r,o)))}else{var u=e.splitText(a.length);s.push(new tr(a,bh(r,e))),e=u}else jA.SUPPORT_RANGE_BOUNDS||(e=e.splitText(a.length));i+=a.length}),s},bh=function(r,A){var t=A.ownerDocument;if(t){var e=t.createElement("html2canvaswrapper");e.appendChild(A.cloneNode(!0));var n=A.parentNode;if(n){n.replaceChild(e,A);var s=Bn(r,e);return e.firstChild&&n.replaceChild(e.firstChild,e),s}}return De.EMPTY},ra=function(r,A,t){var e=r.ownerDocument;if(!e)throw new Error("Node has no owner document");var n=e.createRange();return n.setStart(r,A),n.setEnd(r,A+t),n},ks=function(r){if(jA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(A.segment(r)).map(function(t){return t.segment})}return Ch(r)},Ih=function(r,A){if(jA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(r)).map(function(e){return e.segment})}return Sh(r,A)},Hh=function(r,A){return A.letterSpacing!==0?ks(r):Ih(r,A)},xh=[32,160,4961,65792,65793,4153,4241],Sh=function(r,A){for(var t=rg(r,{lineBreak:A.lineBreak,wordBreak:A.overflowWrap==="break-word"?"break-word":A.wordBreak}),e=[],n,s=function(){if(n.value){var i=n.value.slice(),a=gn(i),o="";a.forEach(function(l){xh.indexOf(l)===-1?o+=TA(l):(o.length&&e.push(o),e.push(TA(l)),o="")}),o.length&&e.push(o)}};!(n=t.next()).done;)s();return e},Th=function(){function r(A,t,e){this.text=Lh(t.data,e.textTransform),this.textBounds=Eh(A,this.text,e,t)}return r}(),Lh=function(r,A){switch(A){case 1:return r.toLowerCase();case 3:return r.replace(Dh,Kh);case 2:return r.toUpperCase();default:return r}},Dh=/(^|\s|:|-|\(|\))([a-z])/g,Kh=function(r,A,t){return r.length>0?A+t.toUpperCase():r},xo=function(r){pe(A,r);function A(t,e){var n=r.call(this,t,e)||this;return n.src=e.currentSrc||e.src,n.intrinsicWidth=e.naturalWidth,n.intrinsicHeight=e.naturalHeight,n.context.cache.addImage(n.src),n}return A}(ve),So=function(r){pe(A,r);function A(t,e){var n=r.call(this,t,e)||this;return n.canvas=e,n.intrinsicWidth=e.width,n.intrinsicHeight=e.height,n}return A}(ve),To=function(r){pe(A,r);function A(t,e){var n=r.call(this,t,e)||this,s=new XMLSerializer,i=Bn(t,e);return e.setAttribute("width",i.width+"px"),e.setAttribute("height",i.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(s.serializeToString(e)),n.intrinsicWidth=e.width.baseVal.value,n.intrinsicHeight=e.height.baseVal.value,n.context.cache.addImage(n.svg),n}return A}(ve),Lo=function(r){pe(A,r);function A(t,e){var n=r.call(this,t,e)||this;return n.value=e.value,n}return A}(ve),Us=function(r){pe(A,r);function A(t,e){var n=r.call(this,t,e)||this;return n.start=e.start,n.reversed=typeof e.reversed=="boolean"&&e.reversed===!0,n}return A}(ve),_h=[{type:15,flags:0,unit:"px",number:3}],Mh=[{type:16,flags:0,number:50}],Oh=function(r){return r.width>r.height?new De(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width0)t.textNodes.push(new Th(r,n,t.styles));else if(It(n))if(Po(n)&&n.assignedNodes)n.assignedNodes().forEach(function(a){return Jr(r,a,t,e)});else{var i=Mo(r,n);i.styles.isVisible()&&(Nh(n,i,e)?i.flags|=4:Ph(i.styles)&&(i.flags|=2),Rh.indexOf(n.tagName)!==-1&&(i.flags|=8),t.elements.push(i),n.slot,n.shadowRoot?Jr(r,n.shadowRoot,i,e):!en(n)&&!ko(n)&&!tn(n)&&Jr(r,n,i,e))}},Mo=function(r,A){return Fs(A)?new xo(r,A):Ro(A)?new So(r,A):ko(A)?new To(r,A):Gh(A)?new Lo(r,A):Xh(A)?new Us(r,A):Jh(A)?new Rs(r,A):tn(A)?new Do(r,A):en(A)?new Ko(r,A):No(A)?new _o(r,A):new ve(r,A)},Oo=function(r,A){var t=Mo(r,A);return t.flags|=4,Jr(r,A,t,t),t},Nh=function(r,A,t){return A.styles.isPositionedWithZIndex()||A.styles.opacity<1||A.styles.isTransformed()||Ns(r)&&t.styles.isTransparent()},Ph=function(r){return r.isPositioned()||r.isFloating()},Vo=function(r){return r.nodeType===Node.TEXT_NODE},It=function(r){return r.nodeType===Node.ELEMENT_NODE},vs=function(r){return It(r)&&typeof r.style<"u"&&!Yr(r)},Yr=function(r){return typeof r.className=="object"},Gh=function(r){return r.tagName==="LI"},Xh=function(r){return r.tagName==="OL"},Jh=function(r){return r.tagName==="INPUT"},Yh=function(r){return r.tagName==="HTML"},ko=function(r){return r.tagName==="svg"},Ns=function(r){return r.tagName==="BODY"},Ro=function(r){return r.tagName==="CANVAS"},sa=function(r){return r.tagName==="VIDEO"},Fs=function(r){return r.tagName==="IMG"},No=function(r){return r.tagName==="IFRAME"},ia=function(r){return r.tagName==="STYLE"},Wh=function(r){return r.tagName==="SCRIPT"},en=function(r){return r.tagName==="TEXTAREA"},tn=function(r){return r.tagName==="SELECT"},Po=function(r){return r.tagName==="SLOT"},aa=function(r){return r.tagName.indexOf("-")>0},zh=function(){function r(){this.counters={}}return r.prototype.getCounterValue=function(A){var t=this.counters[A];return t&&t.length?t[t.length-1]:1},r.prototype.getCounterValues=function(A){var t=this.counters[A];return t||[]},r.prototype.pop=function(A){var t=this;A.forEach(function(e){return t.counters[e].pop()})},r.prototype.parse=function(A){var t=this,e=A.counterIncrement,n=A.counterReset,s=!0;e!==null&&e.forEach(function(a){var o=t.counters[a.counter];o&&a.increment!==0&&(s=!1,o.length||o.push(1),o[Math.max(0,o.length-1)]+=a.increment)});var i=[];return s&&n.forEach(function(a){var o=t.counters[a.counter];i.push(a.counter),o||(o=t.counters[a.counter]=[]),o.push(a.reset)}),i},r}(),oa={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},la={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Zh={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},jh={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},mt=function(r,A,t,e,n,s){return rt?lr(r,n,s.length>0):e.integers.reduce(function(i,a,o){for(;r>=a;)r-=a,i+=e.values[o];return i},"")+s},Go=function(r,A,t,e){var n="";do t||r--,n=e(r)+n,r/=A;while(r*A>=A);return n},SA=function(r,A,t,e,n){var s=t-A+1;return(r<0?"-":"")+(Go(Math.abs(r),s,e,function(i){return TA(Math.floor(i%s)+A)})+n)},it=function(r,A,t){t===void 0&&(t=". ");var e=A.length;return Go(Math.abs(r),e,!1,function(n){return A[Math.floor(n%e)]})+t},yt=1,Ne=2,Pe=4,Zt=8,xe=function(r,A,t,e,n,s){if(r<-9999||r>9999)return lr(r,4,n.length>0);var i=Math.abs(r),a=n;if(i===0)return A[0]+a;for(var o=0;i>0&&o<=4;o++){var l=i%10;l===0&&NA(s,yt)&&a!==""?a=A[l]+a:l>1||l===1&&o===0||l===1&&o===1&&NA(s,Ne)||l===1&&o===1&&NA(s,Pe)&&r>100||l===1&&o>1&&NA(s,Zt)?a=A[l]+(o>0?t[o-1]:"")+a:l===1&&o>0&&(a=t[o-1]+a),i=Math.floor(i/10)}return(r<0?e:"")+a},ca="十百千萬",ua="拾佰仟萬",Ba="マイナス",Jn="마이너스",lr=function(r,A,t){var e=t?". ":"",n=t?"、":"",s=t?", ":"",i=t?" ":"";switch(A){case 0:return"•"+i;case 1:return"◦"+i;case 2:return"◾"+i;case 5:var a=SA(r,48,57,!0,e);return a.length<4?"0"+a:a;case 4:return it(r,"〇一二三四五六七八九",n);case 6:return mt(r,1,3999,oa,3,e).toLowerCase();case 7:return mt(r,1,3999,oa,3,e);case 8:return SA(r,945,969,!1,e);case 9:return SA(r,97,122,!1,e);case 10:return SA(r,65,90,!1,e);case 11:return SA(r,1632,1641,!0,e);case 12:case 49:return mt(r,1,9999,la,3,e);case 35:return mt(r,1,9999,la,3,e).toLowerCase();case 13:return SA(r,2534,2543,!0,e);case 14:case 30:return SA(r,6112,6121,!0,e);case 15:return it(r,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return it(r,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return xe(r,"零一二三四五六七八九",ca,"負",n,Ne|Pe|Zt);case 47:return xe(r,"零壹貳參肆伍陸柒捌玖",ua,"負",n,yt|Ne|Pe|Zt);case 42:return xe(r,"零一二三四五六七八九",ca,"负",n,Ne|Pe|Zt);case 41:return xe(r,"零壹贰叁肆伍陆柒捌玖",ua,"负",n,yt|Ne|Pe|Zt);case 26:return xe(r,"〇一二三四五六七八九","十百千万",Ba,n,0);case 25:return xe(r,"零壱弐参四伍六七八九","拾百千万",Ba,n,yt|Ne|Pe);case 31:return xe(r,"영일이삼사오육칠팔구","십백천만",Jn,s,yt|Ne|Pe);case 33:return xe(r,"零一二三四五六七八九","十百千萬",Jn,s,0);case 32:return xe(r,"零壹貳參四五六七八九","拾百千",Jn,s,yt|Ne|Pe);case 18:return SA(r,2406,2415,!0,e);case 20:return mt(r,1,19999,jh,3,e);case 21:return SA(r,2790,2799,!0,e);case 22:return SA(r,2662,2671,!0,e);case 22:return mt(r,1,10999,Zh,3,e);case 23:return it(r,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return it(r,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return SA(r,3302,3311,!0,e);case 28:return it(r,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return it(r,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return SA(r,3792,3801,!0,e);case 37:return SA(r,6160,6169,!0,e);case 38:return SA(r,4160,4169,!0,e);case 39:return SA(r,2918,2927,!0,e);case 40:return SA(r,1776,1785,!0,e);case 43:return SA(r,3046,3055,!0,e);case 44:return SA(r,3174,3183,!0,e);case 45:return SA(r,3664,3673,!0,e);case 46:return SA(r,3872,3881,!0,e);case 3:default:return SA(r,48,57,!0,e)}},Xo="data-html2canvas-ignore",ga=function(){function r(A,t,e){if(this.context=A,this.options=e,this.scrolledElements=[],this.referenceElement=t,this.counters=new zh,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return r.prototype.toIFrame=function(A,t){var e=this,n=$h(A,t);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var s=A.defaultView.pageXOffset,i=A.defaultView.pageYOffset,a=n.contentWindow,o=a.document,l=ep(n).then(function(){return ee(e,void 0,void 0,function(){var c,u;return qA(this,function(B){switch(B.label){case 0:return this.scrolledElements.forEach(sp),a&&(a.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==t.top||a.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-t.left,a.scrollY-t.top,0,0))),c=this.options.onclone,u=this.clonedReferenceElement,typeof u>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:B.sent(),B.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Ap(o)]:[3,4];case 3:B.sent(),B.label=4;case 4:return typeof c=="function"?[2,Promise.resolve().then(function(){return c(o,u)}).then(function(){return n})]:[2,n]}})})});return o.open(),o.write(rp(document.doctype)+""),np(this.referenceElement.ownerDocument,s,i),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),l},r.prototype.createElementClone=function(A){if(Qs(A,2))debugger;if(Ro(A))return this.createCanvasClone(A);if(sa(A))return this.createVideoClone(A);if(ia(A))return this.createStyleClone(A);var t=A.cloneNode(!1);return Fs(t)&&(Fs(A)&&A.currentSrc&&A.currentSrc!==A.src&&(t.src=A.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),aa(t)?this.createCustomElementClone(t):t},r.prototype.createCustomElementClone=function(A){var t=document.createElement("html2canvascustomelement");return Yn(A.style,t),t},r.prototype.createStyleClone=function(A){try{var t=A.sheet;if(t&&t.cssRules){var e=[].slice.call(t.cssRules,0).reduce(function(s,i){return i&&typeof i.cssText=="string"?s+i.cssText:s},""),n=A.cloneNode(!1);return n.textContent=e,n}}catch(s){if(this.context.logger.error("Unable to access cssRules property",s),s.name!=="SecurityError")throw s}return A.cloneNode(!1)},r.prototype.createCanvasClone=function(A){var t;if(this.options.inlineImages&&A.ownerDocument){var e=A.ownerDocument.createElement("img");try{return e.src=A.toDataURL(),e}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var n=A.cloneNode(!1);try{n.width=A.width,n.height=A.height;var s=A.getContext("2d"),i=n.getContext("2d");if(i)if(!this.options.allowTaint&&s)i.putImageData(s.getImageData(0,0,A.width,A.height),0,0);else{var a=(t=A.getContext("webgl2"))!==null&&t!==void 0?t:A.getContext("webgl");if(a){var o=a.getContextAttributes();(o==null?void 0:o.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}i.drawImage(A,0,0)}return n}catch{this.context.logger.info("Unable to clone canvas as it is tainted",A)}return n},r.prototype.createVideoClone=function(A){var t=A.ownerDocument.createElement("canvas");t.width=A.offsetWidth,t.height=A.offsetHeight;var e=t.getContext("2d");try{return e&&(e.drawImage(A,0,0,t.width,t.height),this.options.allowTaint||e.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",A)}var n=A.ownerDocument.createElement("canvas");return n.width=A.offsetWidth,n.height=A.offsetHeight,n},r.prototype.appendChildNode=function(A,t,e){(!It(t)||!Wh(t)&&!t.hasAttribute(Xo)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!It(t)||!ia(t))&&A.appendChild(this.cloneNode(t,e))},r.prototype.cloneChildNodes=function(A,t,e){for(var n=this,s=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;s;s=s.nextSibling)if(It(s)&&Po(s)&&typeof s.assignedNodes=="function"){var i=s.assignedNodes();i.length&&i.forEach(function(a){return n.appendChildNode(t,a,e)})}else this.appendChildNode(t,s,e)},r.prototype.cloneNode=function(A,t){if(Vo(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var e=A.ownerDocument.defaultView;if(e&&It(A)&&(vs(A)||Yr(A))){var n=this.createElementClone(A);n.style.transitionProperty="none";var s=e.getComputedStyle(A),i=e.getComputedStyle(A,":before"),a=e.getComputedStyle(A,":after");this.referenceElement===A&&vs(n)&&(this.clonedReferenceElement=n),Ns(n)&&op(n);var o=this.counters.parse(new Gi(this.context,s)),l=this.resolvePseudoContent(A,n,i,rr.BEFORE);aa(A)&&(t=!0),sa(A)||this.cloneChildNodes(A,n,t),l&&n.insertBefore(l,n.firstChild);var c=this.resolvePseudoContent(A,n,a,rr.AFTER);return c&&n.appendChild(c),this.counters.pop(o),(s&&(this.options.copyStyles||Yr(A))&&!No(A)||t)&&Yn(s,n),(A.scrollTop!==0||A.scrollLeft!==0)&&this.scrolledElements.push([n,A.scrollLeft,A.scrollTop]),(en(A)||tn(A))&&(en(n)||tn(n))&&(n.value=A.value),n}return A.cloneNode(!1)},r.prototype.resolvePseudoContent=function(A,t,e,n){var s=this;if(e){var i=e.content,a=t.ownerDocument;if(!(!a||!i||i==="none"||i==="-moz-alt-content"||e.display==="none")){this.counters.parse(new Gi(this.context,e));var o=new Gd(this.context,e),l=a.createElement("html2canvaspseudoelement");Yn(e,l),o.content.forEach(function(u){if(u.type===0)l.appendChild(a.createTextNode(u.value));else if(u.type===22){var B=a.createElement("img");B.src=u.value,B.style.opacity="1",l.appendChild(B)}else if(u.type===18){if(u.name==="attr"){var f=u.values.filter(pA);f.length&&l.appendChild(a.createTextNode(A.getAttribute(f[0].value)||""))}else if(u.name==="counter"){var g=u.values.filter(Dt),h=g[0],w=g[1];if(h&&pA(h)){var m=s.counters.getCounterValue(h.value),y=w&&pA(w)?Cs.parse(s.context,w.value):3;l.appendChild(a.createTextNode(lr(m,y,!1)))}}else if(u.name==="counters"){var H=u.values.filter(Dt),h=H[0],T=H[1],w=H[2];if(h&&pA(h)){var D=s.counters.getCounterValues(h.value),E=w&&pA(w)?Cs.parse(s.context,w.value):3,U=T&&T.type===0?T.value:"",S=D.map(function(K){return lr(K,E,!1)}).join(U);l.appendChild(a.createTextNode(S))}}}else if(u.type===20)switch(u.value){case"open-quote":l.appendChild(a.createTextNode(Pi(o.quotes,s.quoteDepth++,!0)));break;case"close-quote":l.appendChild(a.createTextNode(Pi(o.quotes,--s.quoteDepth,!1)));break;default:l.appendChild(a.createTextNode(u.value))}}),l.className=ys+" "+Es;var c=n===rr.BEFORE?" "+ys:" "+Es;return Yr(t)?t.className.baseValue+=c:t.className+=c,l}}},r.destroy=function(A){return A.parentNode?(A.parentNode.removeChild(A),!0):!1},r}(),rr;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(rr||(rr={}));var $h=function(r,A){var t=r.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=A.width.toString(),t.height=A.height.toString(),t.scrolling="no",t.setAttribute(Xo,"true"),r.body.appendChild(t),t},qh=function(r){return new Promise(function(A){if(r.complete){A();return}if(!r.src){A();return}r.onload=A,r.onerror=A})},Ap=function(r){return Promise.all([].slice.call(r.images,0).map(qh))},ep=function(r){return new Promise(function(A,t){var e=r.contentWindow;if(!e)return t("No window assigned for iframe");var n=e.document;e.onload=r.onload=function(){e.onload=r.onload=null;var s=setInterval(function(){n.body.childNodes.length>0&&n.readyState==="complete"&&(clearInterval(s),A(r))},50)}})},tp=["all","d","content"],Yn=function(r,A){for(var t=r.length-1;t>=0;t--){var e=r.item(t);tp.indexOf(e)===-1&&A.style.setProperty(e,r.getPropertyValue(e))}return A},rp=function(r){var A="";return r&&(A+=""),A},np=function(r,A,t){r&&r.defaultView&&(A!==r.defaultView.pageXOffset||t!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(A,t)},sp=function(r){var A=r[0],t=r[1],e=r[2];A.scrollLeft=t,A.scrollTop=e},ip=":before",ap=":after",ys="___html2canvas___pseudoelement_before",Es="___html2canvas___pseudoelement_after",fa=`{ content: "" !important; display: none !important; }`,op=function(r){lp(r,"."+ys+ip+fa+` .`+Es+ap+fa)},lp=function(r,A){var t=r.ownerDocument;if(t){var e=t.createElement("style");e.textContent=A,r.appendChild(e)}},Jo=function(){function r(){}return r.getOrigin=function(A){var t=r._link;return t?(t.href=A,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},r.isSameOrigin=function(A){return r.getOrigin(A)===r._origin},r.setContext=function(A){r._link=A.document.createElement("a"),r._origin=r.getOrigin(A.location.href)},r._origin="about:blank",r}(),cp=function(){function r(A,t){this.context=A,this._options=t,this._cache={}}return r.prototype.addImage=function(A){var t=Promise.resolve();return this.has(A)||(zn(A)||fp(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),t},r.prototype.match=function(A){return this._cache[A]},r.prototype.loadImage=function(A){return ee(this,void 0,void 0,function(){var t,e,n,s,i=this;return qA(this,function(a){switch(a.label){case 0:return t=Jo.isSameOrigin(A),e=!Wn(A)&&this._options.useCORS===!0&&jA.SUPPORT_CORS_IMAGES&&!t,n=!Wn(A)&&!t&&!zn(A)&&typeof this._options.proxy=="string"&&jA.SUPPORT_CORS_XHR&&!e,!t&&this._options.allowTaint===!1&&!Wn(A)&&!zn(A)&&!n&&!e?[2]:(s=A,n?[4,this.proxy(s)]:[3,2]);case 1:s=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(o,l){var c=new Image;c.onload=function(){return o(c)},c.onerror=l,(dp(s)||e)&&(c.crossOrigin="anonymous"),c.src=s,c.complete===!0&&setTimeout(function(){return o(c)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},r.prototype.has=function(A){return typeof this._cache[A]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(A){var t=this,e=this._options.proxy;if(!e)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(s,i){var a=jA.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(o.status===200)if(a==="text")s(o.response);else{var u=new FileReader;u.addEventListener("load",function(){return s(u.result)},!1),u.addEventListener("error",function(B){return i(B)},!1),u.readAsDataURL(o.response)}else i("Failed to proxy resource "+n+" with status code "+o.status)},o.onerror=i;var l=e.indexOf("?")>-1?"&":"?";if(o.open("GET",""+e+l+"url="+encodeURIComponent(A)+"&responseType="+a),a!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=a),t._options.imageTimeout){var c=t._options.imageTimeout;o.timeout=c,o.ontimeout=function(){return i("Timed out ("+c+"ms) proxying "+n)}}o.send()})},r}(),up=/^data:image\/svg\+xml/i,Bp=/^data:image\/.*;base64,/i,gp=/^data:image\/.*/i,fp=function(r){return jA.SUPPORT_SVG_DRAWING||!hp(r)},Wn=function(r){return gp.test(r)},dp=function(r){return Bp.test(r)},zn=function(r){return r.substr(0,4)==="blob"},hp=function(r){return r.substr(-3).toLowerCase()==="svg"||up.test(r)},N=function(){function r(A,t){this.type=0,this.x=A,this.y=t}return r.prototype.add=function(A,t){return new r(this.x+A,this.y+t)},r}(),Ut=function(r,A,t){return new N(r.x+(A.x-r.x)*t,r.y+(A.y-r.y)*t)},Or=function(){function r(A,t,e,n){this.type=1,this.start=A,this.startControl=t,this.endControl=e,this.end=n}return r.prototype.subdivide=function(A,t){var e=Ut(this.start,this.startControl,A),n=Ut(this.startControl,this.endControl,A),s=Ut(this.endControl,this.end,A),i=Ut(e,n,A),a=Ut(n,s,A),o=Ut(i,a,A);return t?new r(this.start,e,i,o):new r(o,a,s,this.end)},r.prototype.add=function(A,t){return new r(this.start.add(A,t),this.startControl.add(A,t),this.endControl.add(A,t),this.end.add(A,t))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),le=function(r){return r.type===1},pp=function(){function r(A){var t=A.styles,e=A.bounds,n=Wt(t.borderTopLeftRadius,e.width,e.height),s=n[0],i=n[1],a=Wt(t.borderTopRightRadius,e.width,e.height),o=a[0],l=a[1],c=Wt(t.borderBottomRightRadius,e.width,e.height),u=c[0],B=c[1],f=Wt(t.borderBottomLeftRadius,e.width,e.height),g=f[0],h=f[1],w=[];w.push((s+o)/e.width),w.push((g+u)/e.width),w.push((i+h)/e.height),w.push((l+B)/e.height);var m=Math.max.apply(Math,w);m>1&&(s/=m,i/=m,o/=m,l/=m,u/=m,B/=m,g/=m,h/=m);var y=e.width-o,H=e.height-B,T=e.width-u,D=e.height-h,E=t.borderTopWidth,U=t.borderRightWidth,S=t.borderBottomWidth,I=t.borderLeftWidth,_=UA(t.paddingTop,A.bounds.width),K=UA(t.paddingRight,A.bounds.width),x=UA(t.paddingBottom,A.bounds.width),F=UA(t.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||i>0?bA(e.left+I/3,e.top+E/3,s-I/3,i-E/3,BA.TOP_LEFT):new N(e.left+I/3,e.top+E/3),this.topRightBorderDoubleOuterBox=s>0||i>0?bA(e.left+y,e.top+E/3,o-U/3,l-E/3,BA.TOP_RIGHT):new N(e.left+e.width-U/3,e.top+E/3),this.bottomRightBorderDoubleOuterBox=u>0||B>0?bA(e.left+T,e.top+H,u-U/3,B-S/3,BA.BOTTOM_RIGHT):new N(e.left+e.width-U/3,e.top+e.height-S/3),this.bottomLeftBorderDoubleOuterBox=g>0||h>0?bA(e.left+I/3,e.top+D,g-I/3,h-S/3,BA.BOTTOM_LEFT):new N(e.left+I/3,e.top+e.height-S/3),this.topLeftBorderDoubleInnerBox=s>0||i>0?bA(e.left+I*2/3,e.top+E*2/3,s-I*2/3,i-E*2/3,BA.TOP_LEFT):new N(e.left+I*2/3,e.top+E*2/3),this.topRightBorderDoubleInnerBox=s>0||i>0?bA(e.left+y,e.top+E*2/3,o-U*2/3,l-E*2/3,BA.TOP_RIGHT):new N(e.left+e.width-U*2/3,e.top+E*2/3),this.bottomRightBorderDoubleInnerBox=u>0||B>0?bA(e.left+T,e.top+H,u-U*2/3,B-S*2/3,BA.BOTTOM_RIGHT):new N(e.left+e.width-U*2/3,e.top+e.height-S*2/3),this.bottomLeftBorderDoubleInnerBox=g>0||h>0?bA(e.left+I*2/3,e.top+D,g-I*2/3,h-S*2/3,BA.BOTTOM_LEFT):new N(e.left+I*2/3,e.top+e.height-S*2/3),this.topLeftBorderStroke=s>0||i>0?bA(e.left+I/2,e.top+E/2,s-I/2,i-E/2,BA.TOP_LEFT):new N(e.left+I/2,e.top+E/2),this.topRightBorderStroke=s>0||i>0?bA(e.left+y,e.top+E/2,o-U/2,l-E/2,BA.TOP_RIGHT):new N(e.left+e.width-U/2,e.top+E/2),this.bottomRightBorderStroke=u>0||B>0?bA(e.left+T,e.top+H,u-U/2,B-S/2,BA.BOTTOM_RIGHT):new N(e.left+e.width-U/2,e.top+e.height-S/2),this.bottomLeftBorderStroke=g>0||h>0?bA(e.left+I/2,e.top+D,g-I/2,h-S/2,BA.BOTTOM_LEFT):new N(e.left+I/2,e.top+e.height-S/2),this.topLeftBorderBox=s>0||i>0?bA(e.left,e.top,s,i,BA.TOP_LEFT):new N(e.left,e.top),this.topRightBorderBox=o>0||l>0?bA(e.left+y,e.top,o,l,BA.TOP_RIGHT):new N(e.left+e.width,e.top),this.bottomRightBorderBox=u>0||B>0?bA(e.left+T,e.top+H,u,B,BA.BOTTOM_RIGHT):new N(e.left+e.width,e.top+e.height),this.bottomLeftBorderBox=g>0||h>0?bA(e.left,e.top+D,g,h,BA.BOTTOM_LEFT):new N(e.left,e.top+e.height),this.topLeftPaddingBox=s>0||i>0?bA(e.left+I,e.top+E,Math.max(0,s-I),Math.max(0,i-E),BA.TOP_LEFT):new N(e.left+I,e.top+E),this.topRightPaddingBox=o>0||l>0?bA(e.left+Math.min(y,e.width-U),e.top+E,y>e.width+U?0:Math.max(0,o-U),Math.max(0,l-E),BA.TOP_RIGHT):new N(e.left+e.width-U,e.top+E),this.bottomRightPaddingBox=u>0||B>0?bA(e.left+Math.min(T,e.width-I),e.top+Math.min(H,e.height-S),Math.max(0,u-U),Math.max(0,B-S),BA.BOTTOM_RIGHT):new N(e.left+e.width-U,e.top+e.height-S),this.bottomLeftPaddingBox=g>0||h>0?bA(e.left+I,e.top+Math.min(D,e.height-S),Math.max(0,g-I),Math.max(0,h-S),BA.BOTTOM_LEFT):new N(e.left+I,e.top+e.height-S),this.topLeftContentBox=s>0||i>0?bA(e.left+I+F,e.top+E+_,Math.max(0,s-(I+F)),Math.max(0,i-(E+_)),BA.TOP_LEFT):new N(e.left+I+F,e.top+E+_),this.topRightContentBox=o>0||l>0?bA(e.left+Math.min(y,e.width+I+F),e.top+E+_,y>e.width+I+F?0:o-I+F,l-(E+_),BA.TOP_RIGHT):new N(e.left+e.width-(U+K),e.top+E+_),this.bottomRightContentBox=u>0||B>0?bA(e.left+Math.min(T,e.width-(I+F)),e.top+Math.min(H,e.height+E+_),Math.max(0,u-(U+K)),B-(S+x),BA.BOTTOM_RIGHT):new N(e.left+e.width-(U+K),e.top+e.height-(S+x)),this.bottomLeftContentBox=g>0||h>0?bA(e.left+I+F,e.top+D,Math.max(0,g-(I+F)),h-(S+x),BA.BOTTOM_LEFT):new N(e.left+I+F,e.top+e.height-(S+x))}return r}(),BA;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(BA||(BA={}));var bA=function(r,A,t,e,n){var s=4*((Math.sqrt(2)-1)/3),i=t*s,a=e*s,o=r+t,l=A+e;switch(n){case BA.TOP_LEFT:return new Or(new N(r,l),new N(r,l-a),new N(o-i,A),new N(o,A));case BA.TOP_RIGHT:return new Or(new N(r,A),new N(r+i,A),new N(o,l-a),new N(o,l));case BA.BOTTOM_RIGHT:return new Or(new N(o,A),new N(o,A+a),new N(r+i,l),new N(r,l));case BA.BOTTOM_LEFT:default:return new Or(new N(o,l),new N(o-i,l),new N(r,A+a),new N(r,A))}},rn=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},wp=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},nn=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},Cp=function(){function r(A,t,e){this.offsetX=A,this.offsetY=t,this.matrix=e,this.type=0,this.target=6}return r}(),Vr=function(){function r(A,t){this.path=A,this.target=t,this.type=1}return r}(),Qp=function(){function r(A){this.opacity=A,this.type=2,this.target=6}return r}(),mp=function(r){return r.type===0},Yo=function(r){return r.type===1},Up=function(r){return r.type===2},da=function(r,A){return r.length===A.length?r.some(function(t,e){return t===A[e]}):!1},vp=function(r,A,t,e,n){return r.map(function(s,i){switch(i){case 0:return s.add(A,t);case 1:return s.add(A+e,t);case 2:return s.add(A+e,t+n);case 3:return s.add(A,t+n)}return s})},Wo=function(){function r(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),zo=function(){function r(A,t){if(this.container=A,this.parent=t,this.effects=[],this.curves=new pp(this.container),this.container.styles.opacity<1&&this.effects.push(new Qp(this.container.styles.opacity)),this.container.styles.transform!==null){var e=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new Cp(e,n,s))}if(this.container.styles.overflowX!==0){var i=rn(this.curves),a=nn(this.curves);da(i,a)?this.effects.push(new Vr(i,6)):(this.effects.push(new Vr(i,2)),this.effects.push(new Vr(a,4)))}}return r.prototype.getEffects=function(A){for(var t=[2,3].indexOf(this.container.styles.position)===-1,e=this.parent,n=this.effects.slice(0);e;){var s=e.effects.filter(function(o){return!Yo(o)});if(t||e.container.styles.position!==0||!e.parent){if(n.unshift.apply(n,s),t=[2,3].indexOf(e.container.styles.position)===-1,e.container.styles.overflowX!==0){var i=rn(e.curves),a=nn(e.curves);da(i,a)||n.unshift(new Vr(a,6))}}else n.unshift.apply(n,s);e=e.parent}return n.filter(function(o){return NA(o.target,A)})},r}(),bs=function(r,A,t,e){r.container.elements.forEach(function(n){var s=NA(n.flags,4),i=NA(n.flags,2),a=new zo(n,r);NA(n.styles.display,2048)&&e.push(a);var o=NA(n.flags,8)?[]:e;if(s||i){var l=s||n.styles.isPositioned()?t:A,c=new Wo(a);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var u=n.styles.zIndex.order;if(u<0){var B=0;l.negativeZIndex.some(function(g,h){return u>g.element.container.styles.zIndex.order?(B=h,!1):B>0}),l.negativeZIndex.splice(B,0,c)}else if(u>0){var f=0;l.positiveZIndex.some(function(g,h){return u>=g.element.container.styles.zIndex.order?(f=h+1,!1):f>0}),l.positiveZIndex.splice(f,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);bs(a,c,s?c:t,o)}else n.styles.isInlineLevel()?A.inlineLevel.push(a):A.nonInlineLevel.push(a),bs(a,A,t,o);NA(n.flags,8)&&Zo(n,o)})},Zo=function(r,A){for(var t=r instanceof Us?r.start:1,e=r instanceof Us?r.reversed:!1,n=0;n"u"?r[0]:t},Sp=function(r,A,t,e,n){var s=A[0],i=A[1],a=t[0],o=t[1];switch(r){case 2:return[new N(Math.round(e.left),Math.round(e.top+i)),new N(Math.round(e.left+e.width),Math.round(e.top+i)),new N(Math.round(e.left+e.width),Math.round(o+e.top+i)),new N(Math.round(e.left),Math.round(o+e.top+i))];case 3:return[new N(Math.round(e.left+s),Math.round(e.top)),new N(Math.round(e.left+s+a),Math.round(e.top)),new N(Math.round(e.left+s+a),Math.round(e.height+e.top)),new N(Math.round(e.left+s),Math.round(e.height+e.top))];case 1:return[new N(Math.round(e.left+s),Math.round(e.top+i)),new N(Math.round(e.left+s+a),Math.round(e.top+i)),new N(Math.round(e.left+s+a),Math.round(e.top+i+o)),new N(Math.round(e.left+s),Math.round(e.top+i+o))];default:return[new N(Math.round(n.left),Math.round(n.top)),new N(Math.round(n.left+n.width),Math.round(n.top)),new N(Math.round(n.left+n.width),Math.round(n.height+n.top)),new N(Math.round(n.left),Math.round(n.height+n.top))]}},Tp="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",pa="Hidden Text",Lp=function(){function r(A){this._data={},this._document=A}return r.prototype.parseMetrics=function(A,t){var e=this._document.createElement("div"),n=this._document.createElement("img"),s=this._document.createElement("span"),i=this._document.body;e.style.visibility="hidden",e.style.fontFamily=A,e.style.fontSize=t,e.style.margin="0",e.style.padding="0",e.style.whiteSpace="nowrap",i.appendChild(e),n.src=Tp,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",s.style.fontFamily=A,s.style.fontSize=t,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(pa)),e.appendChild(s),e.appendChild(n);var a=n.offsetTop-s.offsetTop+2;e.removeChild(s),e.appendChild(this._document.createTextNode(pa)),e.style.lineHeight="normal",n.style.verticalAlign="super";var o=n.offsetTop-e.offsetTop+2;return i.removeChild(e),{baseline:a,middle:o}},r.prototype.getMetrics=function(A,t){var e=A+" "+t;return typeof this._data[e]>"u"&&(this._data[e]=this.parseMetrics(A,t)),this._data[e]},r}(),$o=function(){function r(A,t){this.context=A,this.options=t}return r}(),Dp=1e4,Kp=function(r){pe(A,r);function A(t,e){var n=r.call(this,t,e)||this;return n._activeEffects=[],n.canvas=e.canvas?e.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),e.canvas||(n.canvas.width=Math.floor(e.width*e.scale),n.canvas.height=Math.floor(e.height*e.scale),n.canvas.style.width=e.width+"px",n.canvas.style.height=e.height+"px"),n.fontMetrics=new Lp(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-e.x,-e.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+e.width+"x"+e.height+") with scale "+e.scale),n}return A.prototype.applyEffects=function(t){for(var e=this;this._activeEffects.length;)this.popEffect();t.forEach(function(n){return e.applyEffect(n)})},A.prototype.applyEffect=function(t){this.ctx.save(),Up(t)&&(this.ctx.globalAlpha=t.opacity),mp(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Yo(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(t){return ee(this,void 0,void 0,function(){var e;return qA(this,function(n){switch(n.label){case 0:return e=t.element.container.styles,e.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(t){return ee(this,void 0,void 0,function(){return qA(this,function(e){switch(e.label){case 0:if(NA(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return e.sent(),[4,this.renderNodeContent(t)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(t,e,n){var s=this;if(e===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+n);else{var i=ks(t.text);i.reduce(function(a,o){return s.ctx.fillText(o,a,t.bounds.top+n),a+s.ctx.measureText(o).width},t.bounds.left)}},A.prototype.createFontStyle=function(t){var e=t.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=kp(t.fontFamily).join(", "),s=Br(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,e,t.fontWeight,s,n].join(" "),n,s]},A.prototype.renderTextNode=function(t,e){return ee(this,void 0,void 0,function(){var n,s,i,a,o,l,c,u,B=this;return qA(this,function(f){return n=this.createFontStyle(e),s=n[0],i=n[1],a=n[2],this.ctx.font=s,this.ctx.direction=e.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(i,a),l=o.baseline,c=o.middle,u=e.paintOrder,t.textBounds.forEach(function(g){u.forEach(function(h){switch(h){case 0:B.ctx.fillStyle=XA(e.color),B.renderTextWithLetterSpacing(g,e.letterSpacing,l);var w=e.textShadow;w.length&&g.text.trim().length&&(w.slice(0).reverse().forEach(function(m){B.ctx.shadowColor=XA(m.color),B.ctx.shadowOffsetX=m.offsetX.number*B.options.scale,B.ctx.shadowOffsetY=m.offsetY.number*B.options.scale,B.ctx.shadowBlur=m.blur.number,B.renderTextWithLetterSpacing(g,e.letterSpacing,l)}),B.ctx.shadowColor="",B.ctx.shadowOffsetX=0,B.ctx.shadowOffsetY=0,B.ctx.shadowBlur=0),e.textDecorationLine.length&&(B.ctx.fillStyle=XA(e.textDecorationColor||e.color),e.textDecorationLine.forEach(function(m){switch(m){case 1:B.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top+l),g.bounds.width,1);break;case 2:B.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top),g.bounds.width,1);break;case 3:B.ctx.fillRect(g.bounds.left,Math.ceil(g.bounds.top+c),g.bounds.width,1);break}}));break;case 1:e.webkitTextStrokeWidth&&g.text.trim().length&&(B.ctx.strokeStyle=XA(e.webkitTextStrokeColor),B.ctx.lineWidth=e.webkitTextStrokeWidth,B.ctx.lineJoin=window.chrome?"miter":"round",B.ctx.strokeText(g.text,g.bounds.left,g.bounds.top+l)),B.ctx.strokeStyle="",B.ctx.lineWidth=0,B.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(t,e,n){if(n&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var s=sn(t),i=nn(e);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,t.intrinsicWidth,t.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(t){return ee(this,void 0,void 0,function(){var e,n,s,i,a,o,y,y,l,c,u,B,T,f,g,D,h,w,m,y,H,T,D;return qA(this,function(E){switch(E.label){case 0:this.applyEffects(t.getEffects(4)),e=t.container,n=t.curves,s=e.styles,i=0,a=e.textNodes,E.label=1;case 1:return i0&&J>0&&(S=s.ctx.createPattern(D,"repeat"),s.renderRepeat(_,S,eA,iA))):Uf(c)&&(I=Zn(t,e,[null,null,null]),_=I[0],K=I[1],x=I[2],F=I[3],J=I[4],R=c.position.length===0?[Ms]:c.position,eA=UA(R[0],F),iA=UA(R[R.length-1],J),wA=pf(c,eA,iA,F,J),aA=wA[0],rA=wA[1],aA>0&&rA>0&&(gA=s.ctx.createRadialGradient(K+eA,x+iA,0,K+eA,x+iA,aA),Vi(c.stops,aA*2).forEach(function(zA){return gA.addColorStop(zA.stop,XA(zA.color))}),s.path(_),s.ctx.fillStyle=gA,aA!==rA?(mA=t.bounds.left+.5*t.bounds.width,CA=t.bounds.top+.5*t.bounds.height,HA=rA/aA,xA=1/HA,s.ctx.save(),s.ctx.translate(mA,CA),s.ctx.transform(1,0,0,HA,0,0),s.ctx.translate(-mA,-CA),s.ctx.fillRect(K,xA*(x-CA)+CA,F,J*xA),s.ctx.restore()):s.ctx.fill())),$.label=6;case 6:return e--,[2]}})},s=this,i=0,a=t.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,a,t.curves,2)]:[3,11]):[3,13];case 4:return B.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,a,t.curves,3)];case 6:return B.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,a,t.curves)];case 8:return B.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,t.curves)];case 10:B.sent(),B.label=11;case 11:a++,B.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(t,e,n,s,i){return ee(this,void 0,void 0,function(){var a,o,l,c,u,B,f,g,h,w,m,y,H,T,D,E,D,E;return qA(this,function(U){return this.ctx.save(),a=bp(s,n),o=ha(s,n),i===2&&(this.path(o),this.ctx.clip()),le(o[0])?(l=o[0].start.x,c=o[0].start.y):(l=o[0].x,c=o[0].y),le(o[1])?(u=o[1].end.x,B=o[1].end.y):(u=o[1].x,B=o[1].y),n===0||n===2?f=Math.abs(l-u):f=Math.abs(c-B),this.ctx.beginPath(),i===3?this.formatPath(a):this.formatPath(o.slice(0,2)),g=e<3?e*3:e*2,h=e<3?e*2:e,i===3&&(g=e,h=e),w=!0,f<=g*2?w=!1:f<=g*2+h?(m=f/(2*g+h),g*=m,h*=m):(y=Math.floor((f+h)/(g+h)),H=(f-y*g)/(y-1),T=(f-(y+1)*g)/y,h=T<=0||Math.abs(h-H){const A=document.querySelector(`#${r}`);if(!A){fA.error("没有找到canvas元素,请检查!");return}const t=[],e=document.body.querySelectorAll(`#${r} .mt-line-render`);for(const o of e){const l=o.outerHTML.trim(),c=document.createElement("canvas");c.width=o.getBoundingClientRect().width,c.height=o.getBoundingClientRect().height;const u=c.getContext("2d");await bt.fromString(u,l).render(),o.style.position&&(c.style.position+=o.style.position,c.style.left+=o.style.left,c.style.top+=o.style.top),o.parentNode.appendChild(c),t.push(c)}const n=A.offsetWidth,s=A.offsetHeight,i=await Xp(A,{useCORS:!0,scale:2,width:n,height:s,allowTaint:!0,windowHeight:s,logging:!1,ignoreElements:o=>!!o.classList.contains("mt-line-render")}),a=document.createElement("a");a.href=i.toDataURL("image/png"),a.download=Date.now().toString(),document.body.appendChild(a),a.click(),document.body.removeChild(a),t.forEach(o=>{o.remove()})},zp={class:"w-1/1 h-100vh"},Zp=MA({__name:"index",setup(r){console.log("重新渲染EDIT");const A=yl(),t=El();console.log("传递:",t.query);const e=a=>{sessionStorage.setItem("exportJson",JSON.stringify(a));const o=A.resolve({name:"preview"});window.open(o.href,"_blank")},n=a=>{console.log(a,"这是要保存的数据")},s=()=>{A.go(-1)},i=()=>{Wp()};return(a,o)=>(O(),sA("div",zp,[C(p(qc),{"use-thumbnail":!0,onOnPreviewClick:e,onOnReturnClick:s,onOnSaveClick:n,onOnThumbnailClick:i})]))}});const Aw=Ke(Zp,[["__scopeId","data-v-635be2c1"]]);export{Aw as default};