import{a3 as qk,a4 as Ks,m as Of,r as Zt,a5 as Ta,U as t1,b as _h,V as bg,C as zr,D as Fn,E as or,u as Ti,J as _s,K as lc,L as xa,R as r1,_ as zu,l as Iu,a6 as n1,f as wA,w as i1,x as vn,v as Qr,F as Fr,G as Ya,a7 as Ig,Q as qs,Z as mu,M as ys,n as XI,H as Ma,I as Ca,a8 as X5,N as wh,O as Bh,a9 as Wk,aa as Kk,ab as $5,ac as zk,ad as Vk}from"./index-1bac2251.js";import{a as U5,d as Zk,q as Xk}from"./Agent-44307508.js";import{p as $k}from"./icon-chart-38e5438e.js";import{a as JI}from"./auth-54229761.js";import{a as xB,u as e9}from"./index-e65d7b06.js";const SB="/assets/icon-user-007bea0f.jpg",Vp="/assets/icon-picture-144a065f.png";var t9=Object.defineProperty,r9=(D,U,K)=>U in D?t9(D,U,{enumerable:!0,configurable:!0,writable:!0,value:K}):D[U]=K,PI=(D,U,K)=>r9(D,typeof U!="symbol"?U+"":U,K);class j5 extends Error{constructor(U,K){super(U),PI(this,"type"),PI(this,"field"),PI(this,"value"),PI(this,"line"),this.name="ParseError",this.type=K.type,this.field=K.field,this.value=K.value,this.line=K.line}}function dB(D){}function n9(D){const{onEvent:U=dB,onError:K=dB,onRetry:ee=dB,onComment:ge}=D;let Ue="",ht=!0,ut,_t="",Jt="";function ar(sr){const Ir=ht?sr.replace(/^\xEF\xBB\xBF/,""):sr,[hn,Oe]=i9(`${Ue}${Ir}`);for(const Et of hn)Tt(Et);Ue=Oe,ht=!1}function Tt(sr){if(sr===""){yr();return}if(sr.startsWith(":")){ge&&ge(sr.slice(sr.startsWith(": ")?2:1));return}const Ir=sr.indexOf(":");if(Ir!==-1){const hn=sr.slice(0,Ir),Oe=sr[Ir+1]===" "?2:1,Et=sr.slice(Ir+Oe);Fe(hn,Et,sr);return}Fe(sr,"",sr)}function Fe(sr,Ir,hn){switch(sr){case"event":Jt=Ir;break;case"data":_t=`${_t}${Ir} `;break;case"id":ut=Ir.includes("\0")?void 0:Ir;break;case"retry":/^\d+$/.test(Ir)?ee(parseInt(Ir,10)):K(new j5(`Invalid \`retry\` value: "${Ir}"`,{type:"invalid-retry",value:Ir,line:hn}));break;default:K(new j5(`Unknown field "${sr.length>20?`${sr.slice(0,20)}…`:sr}"`,{type:"unknown-field",field:sr,value:Ir,line:hn}));break}}function yr(){_t.length>0&&U({id:ut,event:Jt||void 0,data:_t.endsWith(` `)?_t.slice(0,-1):_t}),ut=void 0,_t="",Jt=""}function Le(sr={}){Ue&&sr.consume&&Tt(Ue),ut=void 0,_t="",Jt="",Ue=""}return{feed:ar,reset:Le}}function i9(D){const U=[];let K="";const ee=D.length;for(let ge=0;ge{Ue.enqueue(ht)},onError(ht){U==="terminate"?Ue.error(ht):typeof U=="function"&&U(ht)},onRetry:K,onComment:ee})},transform(Ue){ge.feed(Ue)}})}}const a9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAQdSURBVEiJrZZNbFRVHMV/5703hbbaCGFEosICSltM6cKQwAYDktTylZnBiRvRxBgkuJUdJk3ExBg/ViYYF4bEmMiTTjOtMTStogshIglgOlSKOmqioRM+KqXD8D7+LpiSobTFGs/y3HPPuf+bl3OfmAXd3d3O2bNnW4AuYAOwCniounwNuAicAL7s6Oj4qbu7O57JRzNwTiaT2RDH8WuS1gEG3AJ+NrMSgKQksBKoA2RmpxzHeaenp+cEcFfQXQHZbLY+CILXJT0PBGb2RRzHuQULFpz0fb88XVupVNY7jpOWtA1ImNkniUTijVrtnYAdO3Y0uK57SNJmMzvluu6Bo0ePFqoTzAXt2rVrTRRFByWtM7Ovoija29fXNwngVk/jmtm7krZK6gnDcF9vb++f9zG+g/Pnz5eam5v7XNd9FNgq6bH29vaBQqFgDkAYhtslpYDBcrm8fyp9Pujr65ssl8v7gUFJqTAMtwNoz549iVKp9A3QFEXR0/l8/tJ8zWuxc+fOpa7rDgF/J5PJp7yxsbGNklZI+mC6eTabfSAMwwWzmU1OTlpTU9O47/vRFJfP5y9lMplPzezVsbGxjZ6kTWYWArnazZ2dnYuDIOiTtGS2gIaGBsIwfB84VMubWc7MXpG0yQPaJVWSyeTFWlFTU9NEGIafA0tnCzCz2HGc09P5ZDJ5sVQqVYB2pdPpr82svre3d/1sRv8FqVTqpKSyY2ahpIX/pzkgSQ8CNz3HcX4zs1WdnZ2Ljx07dmVKkc1m66IoOmBmy+cwioGPcrnciVqyq6trCdAAFD3gJPBMfX39FuDIlCgIggZJW8zskTmOaZK+43bp3UFdXd1mIAGcUjqdfrgqKFy9ejV9/PjxsHYKbhfajBgfH7eBgYFJauokm826URTl4zhui+N4g5fL5UqpVOozSbsXLVr0AvDx1Abf929xu0n/NcbHxxc2NjYuBQ7n8/kxF6Ctre2MpB1AZ2tr6/DIyEhxPqaZTGbd6tWrdy9btuz00NBQeeXKlf7169cHi8Vi7AKMjIyUm5ubzziOs03SzpaWlstr164tFAqF+zUpAC0tLXslveR5nn/hwoXx0dHRm8ViMQZwpkT5fP4HSS8Cl13XPVipVJ6YxxBi5sfrXjKTyWwxs8Nm9l4ikfgwDMMuYAVQAq55nnfO9/1fU6nUk9U6cCStAZab2bfApKTfPc970/f9yJseYGbngBvA9jAMnwUer5nUgiD4HkhLagY2SRLVpxNYLymWdAl4C7g3YMpIUgtwBXg7juNBSSuAJcCPAB0dHUeGh4f7AcIwPAA8J2mb53l/AFH1C+SeAEmtZtYIjAZB8HJ/f/9odalQq6v+RUwApFKpoBp0I5fLTdTqZroiDyg6jrOvxnxOSPoF+CsIgonpa/8AnuDTBTdPFBQAAAAASUVORK5CYII=",o9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAANQSURBVEiJtZVPaBxlGMaf95uZbiIJDqhEYgueKqLGtYEgtsISEEwxzMzCB0pBA8KKqNCLHlRsPPbgQQQPHvwTexCHZHezRCQeuhgpaojEQJHSm5QedhKS4KKx+b55PHS3rNndJG7wgYHhmW/e37zP986M4LZEa61wRMVxbPd6AkCiKPoIwNgR6xtr7Tvz8/OXW01Xa62MMWcAZEhe66WyiNwF4BGl1AiAfwOaJyR/KZVK53oBRFH0KMlvOl1zO5kA1OjoqLNf0cHBQVarVXMQvA2Qy+Vc3/cviMgTB9z7dxRF7xaLxd/2W9RxcpQ68kDdUVsHjbYv/G8RNZSurKykh3vGHgBTU1N9GxsbAx3JaWoXFhY2ewZorY9tbW197bruY13uSfP5/Lm5ubkfAWBiYiJjrU2UUksklw8ExHFswjC8RLIb4Ja1dj0IgreVUs8BOA7AArhK8oTW2mn9ZIjW2jHGrJC8epgXLZ/PnyL5KYB7Sd5QSv2apmm/iIwBGCS55HneK3EcbwNdxnSf4sdJzgDoJ/l6Npt9amRk5NVSqfTSzs7OGIDPROS0MebDXC7ndowIuJ3rwMCAtzea3d3dt0TkbpIvl0qlRc/zjllrPwiCYLlcLs8AeC8Mwz4AL/i+Pw5gsQ1QKBS8JEm+NMacavVJXgFwRkR+KhaLiwBQr9f7MpnMOIAMgBkAqed5F40xIQAN4Ls2wPDwsE2SZIHk762+iCQAxjtNilLqZBRFb5L8K0mSz33fvykiD2utVRtgeno6BfDFXj+KopMA3iDJpue6rhGRdQAPAnhNRIzv+z+ISIrG/h56kzc3N2+SvAXg8aZXqVT+BKCNMc82jmestTdIPgDgWhzH6Z0ORMSLouiebgDXdf8wxiySPBsEwdPlcnkJAIrFYg1ArdG9Wl1dfV8p1W+tLQGgCwAkKSJPArjSDWCM+d5ae9FxnJyIfByG4flsNnu5ESm01v1ra2vnlVIvklwaGhr6Fmj8k8MwfB7AQ/tF5DjOyuzsbCWfz58m+QnJARG5nqbpsoj0iUgOwH0AfjbGFCqVynoT8J8VBMEJx3EKJM8CuF9EDMnraZp+tb29falare401/YEaEpr7dTrdbdWq6WTk5O2GVer/gF7XYiE/zxShQAAAABJRU5ErkJggg==",s9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAATHSURBVEiJjZVfjFxlGcZ/zzlndredNbGgVhdZimQjF7BGlqgXQjdpsknj/pkZmEKRhDRrqrHamBA0FoVBm3qhBG+8aEVvhJI40HM6yzKkakJDghADoY0iwSAb6p9uqrvBjNudOTPn8WLP4ip/tm9ycnLyvc/zfO/3Pt97xCVEtVq9LE3TQ8CkJANPdjqdI/Pz88ubYbVZQrlcvhyoA5+wPQ8QBMFklmWvpWm6ZzOR4P0Wa7VaAPwAuFrSviRJDiRJcsD2lySNFAqFw5txvKOC/fv3FxYWFvq2b99Oq9X6NPAI8NM4jo8AXsdVKpV7bc8CdwwODp5dXFxkx44dnWPHjqXvKrB79+4PDwwMzNq+SdIV+VoAXAY8mKbp3NDQ0ALA+fPnrwrDsAx8A1gCMsC2/yrp2W63+/Dc3Nw/3haYnp4eiqLoMeBK4IztP0vqsz0DrNjukxQAZ/L9fMp2JqkDbLWdSEqBaySN2n5T0t4TJ078PQAIguArWZZd2ev17grD8NY4ju/OsuwJQFmW3S/pOBABY/kTSTre6/VqgCQ9Ecfx3VEU3WJ7n+1h4MvkoAAYk/SHJEmeXT+yIAiutx0EQXAAuNr272z/JLfp1yTdFYbhG0AgaRQ4Xa/Xe8DpSqXye9tjQBAAlrQEfKRarYYAY2NjBds35rsblHSw3W7ffvLkyV8nSfKbdrt9u+2v2x4EZPvGsbGxAkC1Wg1tb7e9DDjKm/MMcHOn0/ns1NTUy2EY/gjYBbza7Xb3NhqNxY3OaDabbSCZnp7+bRiGjwG7hoeHHxoaGvpmt9u9wfZHJR0FHAC02+26pGVJ94Vh+LCkqdySr/w/+cZoNBqLtv+Y585EUXTU9nckLa+urj5Ofv40m81/AfdLul7S54EfAudst9+LfEOsAudyzM6c44Gc839u4WD+lu0ilzBGNoQkDa5jbG9dXwhgbZgBh4DngROSDuRWG7gE8gHbw7a/Kukp4AXgUM65JpCm6W1AsdfrHY6i6J4sy34mqSdpdHJycuS9qimVSjskXSepBzxy8eLFg5IO51zVdQEBO4FzjUbjTL1e7/T19X0PeBq4plAoPFmpVGYnJiaK68QTExPFcrm8L9/xCPB0FEX3NpvN9ujo6MvA32zfBGhd4AOSlsmHWb1e79k+m3+/Zvu+YrE4PzMzc1upVNpTLBYbwAO238xzzuSXjFqtZuAt1nqqCMiCIHje9my5XP7C6urqr5rNZjvLsrNhGGbA48BLwGwQBA/lRWS2fw78CTiSZdlZWJvEFy5c2AVcCxwFMgFMTU19KIqiR21fK+l14A3bA5Jutp1KKuSWfSGv+DOS+oAU6AOeAS4CVwGftP2qpC/GcfzPt5tXKpU+COxhzctX5KVvBT4OHEnTNNmyZct5gFar9bH+/v6SpG8DfwE6rE2E1yU9F0XRL+v1+lu8mzuq1WrYarUigP7+/uuAuqTjcRx/l//+cIJyufx923uDILh1aWnpFYDx8fFOrVbLNvJtdplULpcftH2LpINxHJ8EqFQq5SzLfgzUkyS5Z4PwOwk2EWB8fHxw27ZtjwI3AKdzsp22X1xZWbnz1KlT/34/fLiZwMLCQmdkZKQhKZT0OdvbgF8UCoVvzc3NrWyG/w+pzCwY+Ne0twAAAABJRU5ErkJggg==",ia=qk();function H5(D){return Ks.post("/api/v1/canvas/update_agent_conversation",D)}function c9(D){return Ks.post("/api/v1/advanced-agent/update_agent_conversation",D)}function IB(D){return Ks.get("/api/v1/canvas/get/"+D,{})}function u9(D){return Ks.post("/api/v1/canvas/set",D)}function l9(D){return Ks.post("/api/v1/canvas/reset",D)}function A9(D){return Ks.post("/api/v1/advanced-agent/conversation-set",D)}const Y5=({url:D,filename:U,target:K})=>{const ee=document.createElement("a");ee.style.display="none",ee.href=D,K&&(ee.target="_blank"),ee.rel="noopener noreferrer",U&&(ee.download=U),document.body.appendChild(ee),ee.click(),document.body.removeChild(ee)};function h9(D){const U={headers:{"Content-Type":"application/x-www-form-urlencoded"}};return Ks.post("/api/v1/advanced-agent/upload",D,U)}const _B="/assets/model-facdc71d.png",f9={class:"layoutNavMoveCenter"},d9={class:"layoutNavMove___j5ets"},g9={class:"myAgent___djnd_ myAgentAnim myAgentlight___yK7Gk"},p9={id:"myAgentBox"},v9={class:"myAgentBox___zrCit"},m9=["onClick"],y9={class:"myAgentBoxImgLayout___u69B_"},I9={class:"MuiBox-root css-5nczy5"},b9=["src"],C9={class:"myAgentBoxImgLayoutTip___xHV4m"},E9=["onClick"],w9=Of({__name:"chatMenu",emits:["querySessionDetail","changeAgentType","createSession"],setup(D,{emit:U}){const K=localStorage.getItem("httpUrl"),ee=U;Zt(""),Zt([]),Ta({}),Ta({}),Zt([]),Zt(""),Zt(""),Zt({});const ge=Zt([]),Ue=Zt(_B),ht=async Jt=>{const{code:ar,data:Tt}=await U5();ar===200&&(ge.value=Tt.map(Fe=>({...Fe})),console.log(ge.value,"用户习惯会话列表"))},ut=async Jt=>{if(console.log(Jt,"session"),Jt.app_type=="3")ia.emit("createSeniorAgent",Jt),ee("changeAgentType","5");else if(Jt.app_type=="1")ee("createSession",Jt.app_id,`和${Jt.name}的会话`),ee("changeAgentType","1");else{const{code:ar,data:Tt}=await IB(Jt.app_id);if(ar==0){console.log(Tt,"会话详情");let Fe={id:Jt.app_id,dsl:Tt.dsl,title:Jt.name};ia.emit("createAgent",Fe),ee("changeAgentType","2")}}},_t=async Jt=>{const{code:ar}=await Zk({app_id:Jt.app_id});if(ar===200){const{code:Tt,data:Fe}=await U5();Tt===200&&(ge.value=Fe,console.log(ge.value,"用户习惯会话列表"),ge.value.length==0&&(ee("createSession",""),ee("changeAgentType","1")))}};return t1(()=>{ht()}),_h(()=>{ia.on("queryAppUsageList",Jt=>{ht()})}),bg(()=>{ia.off("queryAppUsageList")}),(Jt,ar)=>(zr(),Fn("div",f9,[or("div",d9,[or("div",g9,[ar[7]||(ar[7]=or("div",{"data-testid":"msh-sidebar-main",class:"myAgentHome___PG6IZ"},null,-1)),ar[8]||(ar[8]=or("div",{class:"myAgentLine___Isl6E"},null,-1)),or("div",{class:"myAgentTool___Y1_mC","data-testid":"msh-sidebar-new",onClick:ar[0]||(ar[0]=()=>{Ti(ia).emit("newChat")})},ar[3]||(ar[3]=[or("div",{class:"myAgentToolIcon___gaAKI myAgentToolIconNew___DBZrW"},[or("img",{src:a9,style:{width:"24px"},alt:""})],-1)])),or("div",{"data-testid":"msh-sidebar-history",class:"myAgentTool___Y1_mC",onClick:ar[1]||(ar[1]=()=>{Ti(ia).emit("history")})},ar[4]||(ar[4]=[or("div",{class:"myAgentToolIcon___gaAKI myAgentToolIconHistory___GTLWk"},[or("img",{src:o9,style:{width:"24px"},alt:""})],-1)])),or("div",{"data-testid":"msh-sidebar-square",class:"myAgentTool___Y1_mC myAgentToolSquare___dbLm1",onClick:ar[2]||(ar[2]=()=>{Ti(ia).emit("smartAi")})},ar[5]||(ar[5]=[or("div",{class:"myAgentToolIcon___gaAKI myAgentToolIconSquare___Rj1o_"},[or("img",{src:s9,style:{width:"24px"},alt:""})],-1)])),ar[9]||(ar[9]=or("div",{class:"myAgentLine___Isl6E",style:{"margin-top":"4px"}},null,-1)),or("div",p9,[(zr(!0),Fn(_s,null,lc(ge.value,Tt=>(zr(),Fn("div",v9,[or("div",{class:"myAgentBoxImg___Mgu9e",onClick:Fe=>ut(Tt)},[or("div",y9,[or("div",I9,[or("img",{src:Tt.icon?Ti(K)+Tt.icon:Ue.value,alt:"",style:{"border-radius":"50%",width:"100%",height:"100%"}},null,8,b9)]),or("span",C9,xa(Tt.name),1)]),or("div",{"data-testid":"msh-sidebar-bot-delete",class:"myAgentBoxImgDelete___qXZuq",onClick:r1(Fe=>_t(Tt),["stop"])},ar[6]||(ar[6]=[or("div",{class:"myAgentBoxImgDeleteInner____Hawc"},"从侧边栏移除",-1)]),8,E9)],8,m9)]))),256))])])])]))}});const B9=zu(w9,[["__scopeId","data-v-cd9b5f85"]]);var eQ={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */(function(D,U){(function(ee,ge){D.exports=ge()})(Iu,function(){return function(){var K={686:function(Ue,ht,ut){ut.d(ht,{default:function(){return _a}});var _t=ut(279),Jt=ut.n(_t),ar=ut(370),Tt=ut.n(ar),Fe=ut(817),yr=ut.n(Fe);function Le(ln){try{return document.execCommand(ln)}catch{return!1}}var sr=function(gn){var cn=yr()(gn);return Le("cut"),cn},Ir=sr;function hn(ln){var gn=document.documentElement.getAttribute("dir")==="rtl",cn=document.createElement("textarea");cn.style.fontSize="12pt",cn.style.border="0",cn.style.padding="0",cn.style.margin="0",cn.style.position="absolute",cn.style[gn?"right":"left"]="-9999px";var Dn=window.pageYOffset||document.documentElement.scrollTop;return cn.style.top="".concat(Dn,"px"),cn.setAttribute("readonly",""),cn.value=ln,cn}var Oe=function(gn,cn){var Dn=hn(gn);cn.container.appendChild(Dn);var xn=yr()(Dn);return Le("copy"),Dn.remove(),xn},Et=function(gn){var cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Dn="";return typeof gn=="string"?Dn=Oe(gn,cn):gn instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(gn==null?void 0:gn.type)?Dn=Oe(gn.value,cn):(Dn=yr()(gn),Le("copy")),Dn},qt=Et;function nr(ln){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nr=function(cn){return typeof cn}:nr=function(cn){return cn&&typeof Symbol=="function"&&cn.constructor===Symbol&&cn!==Symbol.prototype?"symbol":typeof cn},nr(ln)}var Nr=function(){var gn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},cn=gn.action,Dn=cn===void 0?"copy":cn,xn=gn.container,Wn=gn.target,Vi=gn.text;if(Dn!=="copy"&&Dn!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(Wn!==void 0)if(Wn&&nr(Wn)==="object"&&Wn.nodeType===1){if(Dn==="copy"&&Wn.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Dn==="cut"&&(Wn.hasAttribute("readonly")||Wn.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Vi)return qt(Vi,{container:xn});if(Wn)return Dn==="cut"?Ir(Wn):qt(Wn,{container:xn})},zt=Nr;function Cr(ln){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cr=function(cn){return typeof cn}:Cr=function(cn){return cn&&typeof Symbol=="function"&&cn.constructor===Symbol&&cn!==Symbol.prototype?"symbol":typeof cn},Cr(ln)}function Wr(ln,gn){if(!(ln instanceof gn))throw new TypeError("Cannot call a class as a function")}function un(ln,gn){for(var cn=0;cn"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Ji(ln){return Ji=Object.setPrototypeOf?Object.getPrototypeOf:function(cn){return cn.__proto__||Object.getPrototypeOf(cn)},Ji(ln)}function La(ln,gn){var cn="data-clipboard-".concat(ln);if(gn.hasAttribute(cn))return gn.getAttribute(cn)}var yo=function(ln){Ea(cn,ln);var gn=Ds(cn);function cn(Dn,xn){var Wn;return Wr(this,cn),Wn=gn.call(this),Wn.resolveOptions(xn),Wn.listenClick(Dn),Wn}return Ui(cn,[{key:"resolveOptions",value:function(){var xn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof xn.action=="function"?xn.action:this.defaultAction,this.target=typeof xn.target=="function"?xn.target:this.defaultTarget,this.text=typeof xn.text=="function"?xn.text:this.defaultText,this.container=Cr(xn.container)==="object"?xn.container:document.body}},{key:"listenClick",value:function(xn){var Wn=this;this.listener=Tt()(xn,"click",function(Vi){return Wn.onClick(Vi)})}},{key:"onClick",value:function(xn){var Wn=xn.delegateTarget||xn.currentTarget,Vi=this.action(Wn)||"copy",uo=zt({action:Vi,container:this.container,target:this.target(Wn),text:this.text(Wn)});this.emit(uo?"success":"error",{action:Vi,text:uo,trigger:Wn,clearSelection:function(){Wn&&Wn.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(xn){return La("action",xn)}},{key:"defaultTarget",value:function(xn){var Wn=La("target",xn);if(Wn)return document.querySelector(Wn)}},{key:"defaultText",value:function(xn){return La("text",xn)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(xn){var Wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return qt(xn,Wn)}},{key:"cut",value:function(xn){return Ir(xn)}},{key:"isSupported",value:function(){var xn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],Wn=typeof xn=="string"?[xn]:xn,Vi=!!document.queryCommandSupported;return Wn.forEach(function(uo){Vi=Vi&&!!document.queryCommandSupported(uo)}),Vi}}]),cn}(Jt()),_a=yo},828:function(Ue){var ht=9;if(typeof Element<"u"&&!Element.prototype.matches){var ut=Element.prototype;ut.matches=ut.matchesSelector||ut.mozMatchesSelector||ut.msMatchesSelector||ut.oMatchesSelector||ut.webkitMatchesSelector}function _t(Jt,ar){for(;Jt&&Jt.nodeType!==ht;){if(typeof Jt.matches=="function"&&Jt.matches(ar))return Jt;Jt=Jt.parentNode}}Ue.exports=_t},438:function(Ue,ht,ut){var _t=ut(828);function Jt(Fe,yr,Le,sr,Ir){var hn=Tt.apply(this,arguments);return Fe.addEventListener(Le,hn,Ir),{destroy:function(){Fe.removeEventListener(Le,hn,Ir)}}}function ar(Fe,yr,Le,sr,Ir){return typeof Fe.addEventListener=="function"?Jt.apply(null,arguments):typeof Le=="function"?Jt.bind(null,document).apply(null,arguments):(typeof Fe=="string"&&(Fe=document.querySelectorAll(Fe)),Array.prototype.map.call(Fe,function(hn){return Jt(hn,yr,Le,sr,Ir)}))}function Tt(Fe,yr,Le,sr){return function(Ir){Ir.delegateTarget=_t(Ir.target,yr),Ir.delegateTarget&&sr.call(Fe,Ir)}}Ue.exports=ar},879:function(Ue,ht){ht.node=function(ut){return ut!==void 0&&ut instanceof HTMLElement&&ut.nodeType===1},ht.nodeList=function(ut){var _t=Object.prototype.toString.call(ut);return ut!==void 0&&(_t==="[object NodeList]"||_t==="[object HTMLCollection]")&&"length"in ut&&(ut.length===0||ht.node(ut[0]))},ht.string=function(ut){return typeof ut=="string"||ut instanceof String},ht.fn=function(ut){var _t=Object.prototype.toString.call(ut);return _t==="[object Function]"}},370:function(Ue,ht,ut){var _t=ut(879),Jt=ut(438);function ar(Le,sr,Ir){if(!Le&&!sr&&!Ir)throw new Error("Missing required arguments");if(!_t.string(sr))throw new TypeError("Second argument must be a String");if(!_t.fn(Ir))throw new TypeError("Third argument must be a Function");if(_t.node(Le))return Tt(Le,sr,Ir);if(_t.nodeList(Le))return Fe(Le,sr,Ir);if(_t.string(Le))return yr(Le,sr,Ir);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function Tt(Le,sr,Ir){return Le.addEventListener(sr,Ir),{destroy:function(){Le.removeEventListener(sr,Ir)}}}function Fe(Le,sr,Ir){return Array.prototype.forEach.call(Le,function(hn){hn.addEventListener(sr,Ir)}),{destroy:function(){Array.prototype.forEach.call(Le,function(hn){hn.removeEventListener(sr,Ir)})}}}function yr(Le,sr,Ir){return Jt(document.body,Le,sr,Ir)}Ue.exports=ar},817:function(Ue){function ht(ut){var _t;if(ut.nodeName==="SELECT")ut.focus(),_t=ut.value;else if(ut.nodeName==="INPUT"||ut.nodeName==="TEXTAREA"){var Jt=ut.hasAttribute("readonly");Jt||ut.setAttribute("readonly",""),ut.select(),ut.setSelectionRange(0,ut.value.length),Jt||ut.removeAttribute("readonly"),_t=ut.value}else{ut.hasAttribute("contenteditable")&&ut.focus();var ar=window.getSelection(),Tt=document.createRange();Tt.selectNodeContents(ut),ar.removeAllRanges(),ar.addRange(Tt),_t=ar.toString()}return _t}Ue.exports=ht},279:function(Ue){function ht(){}ht.prototype={on:function(ut,_t,Jt){var ar=this.e||(this.e={});return(ar[ut]||(ar[ut]=[])).push({fn:_t,ctx:Jt}),this},once:function(ut,_t,Jt){var ar=this;function Tt(){ar.off(ut,Tt),_t.apply(Jt,arguments)}return Tt._=_t,this.on(ut,Tt,Jt)},emit:function(ut){var _t=[].slice.call(arguments,1),Jt=((this.e||(this.e={}))[ut]||[]).slice(),ar=0,Tt=Jt.length;for(ar;ar{const U=(D==null?void 0:D.appendToBody)===void 0?!0:D.appendToBody;return{toClipboard(K,ee){return new Promise((ge,Ue)=>{const ht=document.createElement("button"),ut=new k9(ht,{text:()=>K,action:()=>"copy",container:ee!==void 0?ee:document.body});ut.on("success",_t=>{ut.destroy(),ge(_t)}),ut.on("error",_t=>{ut.destroy(),Ue(_t)}),U&&document.body.appendChild(ht),ht.click(),U&&document.body.removeChild(ht)})}}};function J5(D){return D!=null&&D.searchParam?Ks.get(`/api/conversation/list?modeltype=localragflow&search=${D.searchParam}&dialogid=&page=${D.page}&per_page=${D.page_size}`):Ks.get(`/api/conversation/list?modeltype=localragflow&dialogid=&page=${D.page}&per_page=${D.page_size}`)}function x9(D){return Ks.post("/api/v1/conversation/rm?modeltype=localragflow",{conversation_ids:D})}function Qh(D){return Ks.post("/api/v1/conversation/set?platform=localragflow",D)}function pg(D){return Ks.get("/api/conversation/get?modeltype=localragflow",{params:{conversation_id:D}})}function S9(){return Ks.get("/api/v1/dialog/list")}function _9(D){const U={headers:{"Content-Type":"application/x-www-form-urlencoded"}};return Ks.post("/api/v1/document/upload_and_parse",D,U)}function D9(){return Ks.get("/api/v1/user/parse-methods")}function R9(D){return Ks.get("/api/v1/advanced-agent/list",D)}const F9={class:"header___lEPyH"},N9={class:"chatHeader"},M9={class:"chatHeaderBox"},T9={style:{width:"100px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},L9={class:"chat-item"},O9=["onClick"],P9={class:"chat_bottom"},G9={class:"center-bottom"},U9={style:{width:"100%",display:"flex","justify-content":"space-between"}},j9={style:{width:"100%","text-align":"right"}},H9=Of({__name:"agentSession",props:{modalObj:Object},setup(D){const U=D,K=Zt([]);Zt([]),Ta({}),Zt("");const ee=Zt(!1),ge=Zt(!1),Ue=Zt("未命名会话"),ht=Zt(0),ut=Zt("");let _t=null;const Jt=Zt(""),ar=Zt("");Zt("");const Tt=Zt(""),Fe=Ta({});Zt([]),Zt(""),Zt({});let yr=Ta({}),Le=!1;const sr=xB(),Ir=wA(()=>sr.theme);let hn=Ta({name:"未命名会话"});const Oe=Zt(!1);let Et=Zt(!1),qt=Ta({});const nr={name:[{required:!0,message:"名称不允许为空"}]},Nr=async({values:tn,errors:xr})=>{if(xr)return;console.log(Fe,"agentObj");let Ei={id:Tt.value,conversation_id:Tt.value,name:hn.name};const{code:Ni,data:ji}=await Qh(Ei);ji&&(ys.success("修改成功"),Cr())},zt=()=>{Oe.value=!0},Cr=()=>{Oe.value=!1},Wr=tn=>{},un=async()=>{Ea()},Ui=async tn=>{console.log(tn,"新建agent会话对象"),Object.assign(Fe,tn),Et.value=!1,un()},Ea=async()=>{const tn=await u9({id:Fe.id,title:Fe.title,dsl:Fe.dsl});tn.code==0&&(Tt.value=tn.data.conversation_id,Po())},Po=async()=>{(await l9({id:Fe.id})).code==0&&Ds()},Ds=async()=>{var Ei;const tn=await fetch("/api/v1/canvas/completion",{method:"POST",headers:{Authorization:JI(),"Content-Type":"application/json"},body:JSON.stringify({converson_id:Tt.value,id:Fe.id,dsl:Fe.dsl})}),xr=(Ei=tn==null?void 0:tn.body)==null?void 0:Ei.pipeThrough(new TextDecoderStream).pipeThrough(new qI).getReader();for(ht.value=0;;){const Ni=await(xr==null?void 0:xr.read());if(Ni){const{done:ji,value:wa}=Ni;console.log(Ni,999);try{const Oa=JSON.parse((wa==null?void 0:wa.data)||""),Ja=Oa==null?void 0:Oa.data;typeof Ja!="boolean"&&(console.info("data:",Ja),Jt.value=Ja.content,Wn())}catch(Oa){console.warn(Oa)}if(ji){console.info("done"),ut.value="",co(Fe.id);break}}}ee.value=!1,ge.value=!1,ar.value=""},co=async tn=>{const{code:xr,data:Ei}=await IB(tn);if(xr==0){console.log(Ei,"agent会话详情");let Ni=Ei.dsl.messages.length;Ni>1?(yr.dsl.messages[yr.dsl.messages.length-1]=Ei.dsl.messages[Ni-1],await H5({converson_id:Tt.value,dsl:yr.dsl})):yr.dsl=Ei.dsl,K.value=yr.dsl.messages,Ue.value=`${Ei.title}`||"未命名会话",hn.name=`${Ei.title}`||"未命名会话",uo()}},kt=async tn=>{var Ni;Tt.value=tn.id,hn.name=tn.name;const{code:xr,data:Ei}=await pg(tn.id);if(xr==200){const ji=await IB(tn.dialog_id);if(ji.code==0){if(console.log(ji.data,"agent会话详情"),Object.assign(Fe,ji.data),(Ni=Ei==null?void 0:Ei.message)!=null&&Ni.messages){K.value=Ei.message.messages;let wa=Ei.message;Object.assign(yr,{dsl:wa})}else Object.assign(yr,ji.data),K.value=ji.data.dsl.messages;Object.assign(qt,ji.data.dsl),uo()}}},{toClipboard:Qa}=DB(),Ji=async tn=>{await Qa(tn)},La=()=>{_a("click")},yo=()=>{let tn=K.value[K.value.length-2].content;cn(tn)},_a=async tn=>{(tn.keyCode==13||tn==="click")&&(tn.shiftKey||(tn!=="click"&&tn.preventDefault(),ar.value?(cn(ar.value),ar.value=""):(ys.warning("消息不能为空"),ee.value=!1,ge.value=!1)))};let ln=[],gn="";const cn=async tn=>{var ji;Le=!1,ut.value="",K.value.push({content:tn,role:"user"}),K.value.push({role:"last"}),uo();let xr={id:Fe.id,converson_id:Tt.value,message:tn};Et.value&&(xr.dsl=qt);const Ei=await fetch("/api/v1/canvas/completion",{method:"POST",headers:{Authorization:JI(),"Content-Type":"application/json"},body:JSON.stringify(xr)}),Ni=(ji=Ei==null?void 0:Ei.body)==null?void 0:ji.pipeThrough(new TextDecoderStream).pipeThrough(new qI).getReader();for(ht.value=0;;){if(Le){ln.push(gn);break}const wa=await(Ni==null?void 0:Ni.read());if(wa){const{done:Oa,value:Ja}=wa;try{const lo=JSON.parse((Ja==null?void 0:Ja.data)||""),Go=lo==null?void 0:lo.data;if(gn!=Go.message_id)gn=Go.message_id,ln=[];else if(ln.findIndex(zs=>zs===gn)>-1)break;typeof Go!="boolean"&&(console.info("data:",Go),Jt.value=Go.content,Wn())}catch(lo){console.warn(lo)}if(Oa){console.info("done"),ut.value="",co(Fe.id),ia.emit("queryAppUsageList");break}}}ee.value=!1,ge.value=!1},Dn=async()=>{ge.value=!1,ee.value=!1,Le=!0,console.log("stopChat"),console.log(ut.value,"displayedText"),console.log(K.value,"sessionDetailList");let xr=[{content:K.value[K.value.length-2].content,role:"user"},{content:ut.value,role:"assistant"}];K.value=K.value.splice(0,K.value.length-2).concat(xr),console.log(K.value,"sessionDetailList2"),console.log(yr,"chatObj对象"),yr.dsl.messages=K.value;const{code:Ei,data:Ni}=await H5({converson_id:Tt.value,dsl:yr.dsl});Ni&&(clearTimeout(_t),_t=null)},xn=tn=>{tn.preventDefault(),ar.value+=` `},Wn=()=>{_t&&clearTimeout(_t);const tn=Jt.value;ht.value{XI(()=>{const tn=document.getElementById("agentHome");Vi.value.scrollTop(tn.scrollHeight)})};return _h(()=>{ia.on("createAgent",tn=>{Ui(tn)}),ia.on("queryAgentSessionDetail",tn=>{Et.value=!0,kt(tn)})}),bg(()=>{ia.off("createAgent"),ia.off("queryAgentSessionDetail")}),i1(()=>U.modalObj,(tn,xr)=>{Object.assign(Fe,tn),JSON.stringify(tn)!="{}"},{immediate:!0,deep:!0}),(tn,xr)=>{const Ei=vn("icon-down"),Ni=vn("a-button"),ji=vn("icon-edit"),wa=vn("a-popover"),Oa=vn("a-comment"),Ja=vn("a-textarea"),lo=vn("icon-copy"),Go=vn("icon-refresh"),Sc=vn("icon-record-stop"),zs=vn("a-scrollbar"),Vs=vn("icon-send"),So=vn("a-input"),Rs=vn("a-form-item"),Or=vn("a-form"),$r=vn("a-modal");return zr(),Fn(_s,null,[or("div",F9,[or("div",N9,[or("div",M9,[Qr(wa,{position:"bottom",trigger:"click"},{content:Fr(()=>[Qr(Ni,{type:"text",class:"button",style:{color:"#2a2a2b"},onClick:xr[0]||(xr[0]=jn=>zt())},{icon:Fr(()=>[Qr(ji)]),default:Fr(()=>[xr[7]||(xr[7]=Ya(" 修改名称 "))]),_:1})]),default:Fr(()=>[Qr(Ni,{border:""},{default:Fr(()=>[or("span",T9,xa(Ti(hn).name),1),Qr(Ei,{style:{"margin-left":"4px"}})]),_:1})]),_:1})])])]),Qr(zs,{ref_key:"scrollbar",ref:Vi,id:"agentHome",class:"chat-list",style:{width:"80%",overflow:"auto",height:"calc(100vh - 380px)",margin:"0px auto 20px"}},{default:Fr(()=>[(zr(!0),Fn(_s,null,lc(K.value,(jn,gi)=>(zr(),Fn("div",L9,[jn.role==="user"?(zr(),Ma(Oa,{key:0},{avatar:Fr(()=>xr[8]||(xr[8]=[or("img",{class:"icon-user-jpg",src:SB,alt:"本地图片"},null,-1)])),content:Fr(()=>[or("div",{class:qs({chartUserText:Ir.value==="light"})},xa(jn.content),3)]),_:2},1024)):jn.role==="assistant"?(zr(),Ma(Oa,{key:1},{avatar:Fr(()=>xr[9]||(xr[9]=[or("img",{class:"icon-user-jpg",src:Vp,alt:"本地图片"},null,-1)])),content:Fr(()=>[Qr(Ja,{readonly:"","auto-size":"",modelValue:jn.content,"onUpdate:modelValue":da=>jn.content=da,class:qs({chatItemAnswer:Ir.value==="light"}),style:mu([{backgroundColor:Ir.value==="light"?"#ffffff":"#000000"},{border:"none"}])},null,8,["modelValue","onUpdate:modelValue","class","style"])]),actions:Fr(()=>[gi!=0?(zr(),Fn("span",{key:0,class:"action",onClick:da=>Ji(jn.content)},[Qr(lo),xr[10]||(xr[10]=Ya(" 复制 "))],8,O9)):Ca("",!0),gi!=0&&gi==K.value.length-1?(zr(),Fn("span",{key:1,class:"action",onClick:xr[1]||(xr[1]=da=>yo())},[Qr(Go),xr[11]||(xr[11]=Ya(" 重新生成 "))])):Ca("",!0)]),_:2},1024)):jn.role==="last"?(zr(),Ma(Oa,{key:2},{avatar:Fr(()=>xr[12]||(xr[12]=[or("img",{class:"icon-user-jpg",src:$k,alt:"本地图片"},null,-1)])),content:Fr(()=>[Qr(Ja,{readonly:"","auto-size":"",modelValue:ut.value,"onUpdate:modelValue":xr[2]||(xr[2]=da=>ut.value=da),class:qs({chatItemAnswer:Ir.value==="light"}),style:mu([{backgroundColor:Ir.value==="light"?"#ffffff":"#000000"},{border:"none"}])},null,8,["modelValue","class","style"])]),actions:Fr(()=>[ut.value!=""?(zr(),Fn("div",{key:0,class:"action",onClick:Dn,style:{background:"var(--color-bg-2)",color:"var(--color-primary-light-4)"}},[Qr(Sc),xr[13]||(xr[13]=Ya(" 停止生成 "))])):Ca("",!0)]),_:1})):Ca("",!0)]))),256))]),_:1},512),or("div",P9,[or("div",G9,[Qr(Ja,{modelValue:ar.value,"onUpdate:modelValue":xr[3]||(xr[3]=jn=>ar.value=jn),onKeydown:[Ig(r1(xn,["shift"]),["enter"]),Ig(_a,["enter"])],placeholder:"输入您想了解的内容,Shift+Enter换行,Enter发送","allow-clear":"","show-word-limit":"",disabled:ee.value,class:qs({textItemAnswer:Ir.value==="dark"}),style:mu([{backgroundColor:Ir.value==="light"?"#ffffff":"#000000"},{border:"none"}]),"auto-size":{minRows:12,maxRows:5}},null,8,["modelValue","onKeydown","disabled","class","style"]),or("div",U9,[xr[14]||(xr[14]=or("span",null,null,-1)),Qr(Ni,{disabled:ee.value,onClick:La,type:"text",style:{"border-radius":"24px"},loading:ge.value},{default:Fr(()=>[Qr(Vs,{size:"32",style:{color:"#0960bd"}})]),_:1},8,["disabled","loading"])])]),Qr($r,{visible:Oe.value,"onUpdate:visible":xr[6]||(xr[6]=jn=>Oe.value=jn),title:"修改名称",onBeforeOpen:Wr,onCancel:Cr,footer:!1,"title-align":"start"},{default:Fr(()=>[Qr(Or,{ref:"formRef",rules:nr,model:Ti(hn),onSubmit:Nr},{default:Fr(()=>[Qr(Rs,{field:"name",label:"名称"},{default:Fr(()=>[Qr(So,{modelValue:Ti(hn).name,"onUpdate:modelValue":xr[4]||(xr[4]=jn=>Ti(hn).name=jn),placeholder:"请输入名称"},null,8,["modelValue"])]),_:1}),Qr(Rs,null,{default:Fr(()=>[or("div",j9,[Qr(Ni,{onClick:xr[5]||(xr[5]=jn=>Oe.value=!1)},{default:Fr(()=>xr[15]||(xr[15]=[Ya("取消")])),_:1}),Qr(Ni,{style:{"margin-left":"10px"},type:"primary","html-type":"submit"},{default:Fr(()=>xr[16]||(xr[16]=[Ya("确定")])),_:1})])]),_:1})]),_:1},8,["model"])]),_:1},8,["visible"])])],64)}}});const Y9=zu(H9,[["__scopeId","data-v-af68e55d"]]),J9={__name:"uploadFile",props:{limit:{type:Number,default:6},typeXLse:Boolean,sessionId:String,action:String,url:String},emits:["update:fileList","success","handleRemove","selectFileCallback"],setup(D,{emit:U}){e9();const K=D,ee=U,ge=wA(()=>K.url),Ue=Zt([]),ht=Zt([]),ut=Zt([]);i1(()=>[K.url,K.sessionId],([yr,Le],[sr,Ir])=>{},{deep:!0}),_h(()=>{ge.value&&(Ue.value=ge.value.split(",").map(yr=>({uid:yr,name:yr,status:"done",url:yr}))),ia.on("queryAgent",yr=>{yr?Ue.value.length==1?Ue.value=[]:Ue.value.forEach(Le=>{Le.name!=yr.name&&(Ue.value=[],Ue.value.push(Le))}):Ue.value=[]})});const _t=yr=>{ee("handleRemove"),Ue.value=[]},Jt=yr=>{const Le=ar(ut.value,yr).uniqueToSecond;ut.value=yr.map((sr,Ir)=>({index:Ir,name:sr.name,size:(sr.file.size/1024).toFixed(2)+"K",onFileSelectedLoading:!1,textName:""})),ht.value=yr,ee("selectFileCallback",ut.value,Le),yr.value=[]},ar=(yr,Le)=>{const sr=yr.filter(hn=>!Le.some(Oe=>hn.name==Oe.name)),Ir=Le.filter(hn=>!yr.some(Oe=>Oe.name==hn.name));return{uniqueToFirst:sr,uniqueToSecond:Ir}},Tt=wA(()=>K.type);function Fe(yr){if(Tt)return new Promise(Oe=>{Oe(!0)});let Le=["xlsx","xls"],sr=yr.name.split("."),Ir=sr[sr.length-1];if(!(Le.indexOf(Ir)>=0))ys.warning("只支持上传:xlsx,xls");else return new Promise(Oe=>{Oe(!0)})}return(yr,Le)=>{const sr=vn("icon-attachment"),Ir=vn("a-button"),hn=vn("a-upload");return zr(),Fn("div",null,[Qr(hn,{action:"/",fileList:Ue.value,"onUpdate:fileList":Le[0]||(Le[0]=Oe=>Ue.value=Oe),"auto-upload":!1,accept:yr.xlsx,limit:K.limit,onChange:Jt,onBeforeRemove:_t,onBeforeUpload:Fe,"image-preview":""},{"upload-button":Fr(()=>[Qr(Ir,{type:"text",style:{"border-radius":"24px"},onClick:yr.visibleChange},{default:Fr(()=>[Qr(sr,{size:"28",style:{color:"#0960bd"}})]),_:1},8,["onClick"])]),_:1},8,["fileList","accept","limit"])])}}},tQ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAixJREFUWEftl79rFEEUx79v5rAI0UqwEkT01jSCRLKzXJFYqI3kb1AUm4CgiIVNzkYwYGUhESFWYm+TVKbQuwfBH43m7vBAsLERLAXded5cbuPc3iYnuMc2u7CwO/t23ofve/MdhgBg25gFTXRfRCL3PumLiJqxyN0Z5k1qRdFVEnk66aRZ8wvRNWob8xpArQgAAG8cgBSUvJ+2BCgVKBUYUsAC9/wlScAJAi4COJyM+zEKmCZgVoBZAAfTyzk9X/JdAcvJcxbApvuo4/hHdWvrQ6tWCxDHKwQsunELnEt+FpGfYu2XA0pVLNEtADd9iICZnM2nwBbGAijg1eCnz1qp2i9rpzTwUYCpAcDQJAAeBcw32mF4HUSrScIBQN1PmFYpUwEPwMU/DJhvt415B+DMHgAu7m3AfLZjzJoAl91ALgCujjPM9XYUdSFyfB8AkLWXoPUhEXmeC0CvwV5WmRe3w/CCItpIeqCn0HzvuT6yh4gs/VbqRUXkuw/gx2lgXoDdvtizCRXRt6DZbH0Kw/Oa6AmAY14TpntgJ4fIElnbEK3fewBDTaiB5bEALmi30z3acQD9Eih1VIDHuZRgROK/y3BEAQKeVZmvdMJwXYicd+TThBnm4nzAB2gJsHaKeaVjzAMB7uS9DIcYfCOqKPX1ZKPR7c7NVWOlVv3a/o8C2M84fHsl4AgBp7FzT2eo1bf2fzairJpPeqzcjksFSgWKP5oVfjh1RlPk8fwPkL419LLE948AAAAASUVORK5CYII=",rQ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAYtJREFUWEftl00oRFEUx39vKyGbkQwWsjL5iDIbWZGPhWhmgZ3sZMFmlKUym6FkJzssZiILo2aykM0oQs3Y2BhmktVEScri6XjzIk3mSe896t3Ve93T/f/6n3vO7SgA/SE1DHQA9fJvwUoDJ/uzil/Ji/ssEC0kEVH6QuqtAm47AFTIiAOqHeK6pgPgOPA/HHCVQXMtxFPG6mXUC1sJY7GGHJADx7wQCEMy+/3BnhoI+mEzYQzCAfiVAw0uyObg5fUjLZamIDqjCQ8s2QCwMAKtdZrw+Q3Mb2vfljgw3A4TXRC9yDvQAutHsHNqAUB5CcwNQjIDgYgGEPSBxw2Le/D4bHIZSo2LyNQG5J40gMpSWB0HgZNeYVofuLqHxiot35L3z0vug9wLPcaURiSCa4ewe1a4Gw61wWS3tmcKQCwFK/HvW/F0D/Q2wXIMDi6LvweGGpFeXsXeAV2uugLuHoqLS4RhAGPH/TzKAXAc+BMOXFs4lH4tk7T9w6kgyYSsQqdVQ+r7UArHMp6/AaTB7y8Tx1kuAAAAAElFTkSuQmCC",nQ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAtBJREFUWEftV01o1EAYfV/SIqIIUvFWFMUoghb1VMguWkWhJlUPVdq0XgSR0pMgCCLqRS+CBw/Fk1STRSoK3dniQaTbzuKp9eClF72UYsEf8FRBu/nqZLN1d0m33TWrIAZCkslk3pv3ve+bDKGG4+jwmZbF5h9GnmmfxmhjQhsQnBvVMNIRVMNwQdfID9pHutfr/jcDec0AswFgPxXAdlcDqIuAOdxpQNcNIuwCyAAKgAC21DqbuggkPJtrBYqzP8VJoFYFFPa/RYB9PlIMT64/kzUfW4ejwqXeqfbYFSiCsc+3cv2Zm4oAaTReSkKRrJ8AIWAeHIztQHD+aopDAQJfZ2hfScMs+zxaClA0menZ/QQ8qpQ3LhOOSkecVoMnPfsBAxdDoKfSEWfVvenZMwTsWSkdfzsElPf3Tp4fmzG9k4cI2pQC0kAdE0563PS6ugk8EgWugEtMGHgAQKURs2vwAA9JJzNQdKq6FuVNpOw3YByIIhBXCIKxFzZhw7QtFlQYQNw02Zu5YLq2RQRRTfqYFAiGuSYdcVuFoUnTKduTnkp49msA7SsRQJglnOeJ5TTU6UZZpuSDFF1THfgkHbG1+HEyZXcw49WK4HUsx6sWIp0XW7N9L+YKzj91jOC/rEYg7kp4VzriSilgwrWnQThYjURQo+KohMuu97oGQTwve8WzpGudY6InVUwY11pAA9JJDxXS0HoL0Lx0xIkwLd8B2NnINJyVjthWAOsaBPi+ute5uTXb93wu4VqXQBSQa0wl1MiSPemxcLbvAewIge5JR1wO2l37MwgtlQTiqIS5n/+FKYA/ANgM4GERhIHvOUesU89J17rKRHcqCcRaCaPkJUD4wEci/gImpUZTWZGpWAuSntUJaMfL+jCmZF/aDRWO95dsWa0wDRUBBlJlk2FtsGEEGh6C1QrQfwKrKRRp7L++NYti9Uc3p7XI1ojt+RLxuuvcL0ZDbwAAAABJRU5ErkJggg==",iQ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAMhJREFUWEftl9ENgkAMhlvf1T2EFWAKdUhhCpjh3MMwQA0mZyL6X0vgNCblEX56Xz+O5MoErmN/E/TMfp8DC5+bentF73BegLF6GkIFaKs9zKRMvBrEEF8A4EAkBTLxBEDffKkBlk0hLBcEkR1gbODUDQcE8QYQO45Glhr4vE84tNWufGzRGJgumBeAKDaWDUD7vR3ADbgBN+AG3IAbcAP/Y8A+Bc1Lmg3MK2tPqwD2UumkdriFh9KfAay18LQOmi/UyWgtIARwB0qMYTCk/+beAAAAAElFTkSuQmCC",aQ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjFJREFUWEftl01rE1EUhp8zEUHUZqYgCtqtLirdFEFwYbt0LYobIQWhLgxKJtFldSWYD0t05UKhuPEniAv7AxSpEEFXQkEEIR8oRdqaI5OZSTNJ2knM1YXkrO7Hue957mHOvXOFbitUryPWNWC2Z27vgc8gS7jJlWHWScS51LiB6qNhBHp8hdtk7PygGjsAJT2A1j+CTAWL3yJ8jxVS5nwfrYBM+02KZO1s7FpgByBfncGy1gKBRbL2k0EEKNa15SesohwEzgRAz5myU1yWX3vpdADU5rDkdcu5qfPknNXhAaxFaHrg54O1r9jeSnHnyJfdtMwCZOx5Hvw4xr7tpygXgqBroAu4zrt+EOYBvCiXNMHZxgvgYhD0KyopssmX3RB/ByCMUmqsoHo16CpoCteJlKk5AKSCmzzdk+ZCbRmRmx3jOVy7EPYNANTKIGlfUCqIfuv7wbXL1Zu1TuFOfPKLJ7T8H1ZBeeMEW5vrA1VM6NRRZaMDeKKljeOwWUY5BxyNhTEOEBsR2CXDZjLwTwC8HQxj3SfpyBnoFIgDaeo9cs7diJsRAMKbL5C2ZKnV8gJ2m3GAfrsOb8JBLq+RMzAGGGdgnIFxBv7/DBTqswhv2md791kedwHFzRfr3kvJf7JpYprs4Q/RX7L7dYf9VNs63kvHlDV1EpEZX07XmbRPsiA/owBer1i7BfLQVNy+OiJpMsnH4Vz0deyNlhpX0Ga6RawcMgaj+h4rsUxm4lmn5m/yJdUwNBRPkQAAAABJRU5ErkJggg==";var oQ={exports:{}};(function(D){var U=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** * Prism: Lightweight, robust, elegant syntax highlighting * * @license MIT * @author Lea Verou * @namespace * @public */var K=function(ee){var ge=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,Ue=0,ht={},ut={manual:ee.Prism&&ee.Prism.manual,disableWorkerMessageHandler:ee.Prism&&ee.Prism.disableWorkerMessageHandler,util:{encode:function Oe(Et){return Et instanceof _t?new _t(Et.type,Oe(Et.content),Et.alias):Array.isArray(Et)?Et.map(Oe):Et.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(nr){var Oe=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(nr.stack)||[])[1];if(Oe){var Et=document.getElementsByTagName("script");for(var qt in Et)if(Et[qt].src==Oe)return Et[qt]}return null}},isActive:function(Oe,Et,qt){for(var nr="no-"+Et;Oe;){var Nr=Oe.classList;if(Nr.contains(Et))return!0;if(Nr.contains(nr))return!1;Oe=Oe.parentElement}return!!qt}},languages:{plain:ht,plaintext:ht,text:ht,txt:ht,extend:function(Oe,Et){var qt=ut.util.clone(ut.languages[Oe]);for(var nr in Et)qt[nr]=Et[nr];return qt},insertBefore:function(Oe,Et,qt,nr){nr=nr||ut.languages;var Nr=nr[Oe],zt={};for(var Cr in Nr)if(Nr.hasOwnProperty(Cr)){if(Cr==Et)for(var Wr in qt)qt.hasOwnProperty(Wr)&&(zt[Wr]=qt[Wr]);qt.hasOwnProperty(Cr)||(zt[Cr]=Nr[Cr])}var un=nr[Oe];return nr[Oe]=zt,ut.languages.DFS(ut.languages,function(Ui,Ea){Ea===un&&Ui!=Oe&&(this[Ui]=zt)}),zt},DFS:function Oe(Et,qt,nr,Nr){Nr=Nr||{};var zt=ut.util.objId;for(var Cr in Et)if(Et.hasOwnProperty(Cr)){qt.call(Et,Cr,Et[Cr],nr||Cr);var Wr=Et[Cr],un=ut.util.type(Wr);un==="Object"&&!Nr[zt(Wr)]?(Nr[zt(Wr)]=!0,Oe(Wr,qt,null,Nr)):un==="Array"&&!Nr[zt(Wr)]&&(Nr[zt(Wr)]=!0,Oe(Wr,qt,Cr,Nr))}}},plugins:{},highlightAll:function(Oe,Et){ut.highlightAllUnder(document,Oe,Et)},highlightAllUnder:function(Oe,Et,qt){var nr={callback:qt,container:Oe,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};ut.hooks.run("before-highlightall",nr),nr.elements=Array.prototype.slice.apply(nr.container.querySelectorAll(nr.selector)),ut.hooks.run("before-all-elements-highlight",nr);for(var Nr=0,zt;zt=nr.elements[Nr++];)ut.highlightElement(zt,Et===!0,nr.callback)},highlightElement:function(Oe,Et,qt){var nr=ut.util.getLanguage(Oe),Nr=ut.languages[nr];ut.util.setLanguage(Oe,nr);var zt=Oe.parentElement;zt&&zt.nodeName.toLowerCase()==="pre"&&ut.util.setLanguage(zt,nr);var Cr=Oe.textContent,Wr={element:Oe,language:nr,grammar:Nr,code:Cr};function un(Ea){Wr.highlightedCode=Ea,ut.hooks.run("before-insert",Wr),Wr.element.innerHTML=Wr.highlightedCode,ut.hooks.run("after-highlight",Wr),ut.hooks.run("complete",Wr),qt&&qt.call(Wr.element)}if(ut.hooks.run("before-sanity-check",Wr),zt=Wr.element.parentElement,zt&&zt.nodeName.toLowerCase()==="pre"&&!zt.hasAttribute("tabindex")&&zt.setAttribute("tabindex","0"),!Wr.code){ut.hooks.run("complete",Wr),qt&&qt.call(Wr.element);return}if(ut.hooks.run("before-highlight",Wr),!Wr.grammar){un(ut.util.encode(Wr.code));return}if(Et&&ee.Worker){var Ui=new Worker(ut.filename);Ui.onmessage=function(Ea){un(Ea.data)},Ui.postMessage(JSON.stringify({language:Wr.language,code:Wr.code,immediateClose:!0}))}else un(ut.highlight(Wr.code,Wr.grammar,Wr.language))},highlight:function(Oe,Et,qt){var nr={code:Oe,grammar:Et,language:qt};if(ut.hooks.run("before-tokenize",nr),!nr.grammar)throw new Error('The language "'+nr.language+'" has no grammar.');return nr.tokens=ut.tokenize(nr.code,nr.grammar),ut.hooks.run("after-tokenize",nr),_t.stringify(ut.util.encode(nr.tokens),nr.language)},tokenize:function(Oe,Et){var qt=Et.rest;if(qt){for(var nr in qt)Et[nr]=qt[nr];delete Et.rest}var Nr=new Tt;return Fe(Nr,Nr.head,Oe),ar(Oe,Nr,Et,Nr.head,0),Le(Nr)},hooks:{all:{},add:function(Oe,Et){var qt=ut.hooks.all;qt[Oe]=qt[Oe]||[],qt[Oe].push(Et)},run:function(Oe,Et){var qt=ut.hooks.all[Oe];if(!(!qt||!qt.length))for(var nr=0,Nr;Nr=qt[nr++];)Nr(Et)}},Token:_t};ee.Prism=ut;function _t(Oe,Et,qt,nr){this.type=Oe,this.content=Et,this.alias=qt,this.length=(nr||"").length|0}_t.stringify=function Oe(Et,qt){if(typeof Et=="string")return Et;if(Array.isArray(Et)){var nr="";return Et.forEach(function(un){nr+=Oe(un,qt)}),nr}var Nr={type:Et.type,content:Oe(Et.content,qt),tag:"span",classes:["token",Et.type],attributes:{},language:qt},zt=Et.alias;zt&&(Array.isArray(zt)?Array.prototype.push.apply(Nr.classes,zt):Nr.classes.push(zt)),ut.hooks.run("wrap",Nr);var Cr="";for(var Wr in Nr.attributes)Cr+=" "+Wr+'="'+(Nr.attributes[Wr]||"").replace(/"/g,""")+'"';return"<"+Nr.tag+' class="'+Nr.classes.join(" ")+'"'+Cr+">"+Nr.content+""};function Jt(Oe,Et,qt,nr){Oe.lastIndex=Et;var Nr=Oe.exec(qt);if(Nr&&nr&&Nr[1]){var zt=Nr[1].length;Nr.index+=zt,Nr[0]=Nr[0].slice(zt)}return Nr}function ar(Oe,Et,qt,nr,Nr,zt){for(var Cr in qt)if(!(!qt.hasOwnProperty(Cr)||!qt[Cr])){var Wr=qt[Cr];Wr=Array.isArray(Wr)?Wr:[Wr];for(var un=0;un=zt.reach);La+=Ji.value.length,Ji=Ji.next){var yo=Ji.value;if(Et.length>Oe.length)return;if(!(yo instanceof _t)){var _a=1,ln;if(Ds){if(ln=Jt(Qa,La,Oe,Po),!ln||ln.index>=Oe.length)break;var xn=ln.index,gn=ln.index+ln[0].length,cn=La;for(cn+=Ji.value.length;xn>=cn;)Ji=Ji.next,cn+=Ji.value.length;if(cn-=Ji.value.length,La=cn,Ji.value instanceof _t)continue;for(var Dn=Ji;Dn!==Et.tail&&(cnzt.reach&&(zt.reach=tn);var xr=Ji.prev;Vi&&(xr=Fe(Et,xr,Vi),La+=Vi.length),yr(Et,xr,_a);var Ei=new _t(Cr,Ea?ut.tokenize(Wn,Ea):Wn,co,Wn);if(Ji=Fe(Et,xr,Ei),uo&&Fe(Et,Ji,uo),_a>1){var Ni={cause:Cr+","+un,reach:tn};ar(Oe,Et,qt,Ji.prev,La,Ni),zt&&Ni.reach>zt.reach&&(zt.reach=Ni.reach)}}}}}}function Tt(){var Oe={value:null,prev:null,next:null},Et={value:null,prev:Oe,next:null};Oe.next=Et,this.head=Oe,this.tail=Et,this.length=0}function Fe(Oe,Et,qt){var nr=Et.next,Nr={value:qt,prev:Et,next:nr};return Et.next=Nr,nr.prev=Nr,Oe.length++,Nr}function yr(Oe,Et,qt){for(var nr=Et.next,Nr=0;Nr/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},K.languages.markup.tag.inside["attr-value"].inside.entity=K.languages.markup.entity,K.languages.markup.doctype.inside["internal-subset"].inside=K.languages.markup,K.hooks.add("wrap",function(ee){ee.type==="entity"&&(ee.attributes.title=ee.content.replace(/&/,"&"))}),Object.defineProperty(K.languages.markup.tag,"addInlined",{value:function(ge,Ue){var ht={};ht["language-"+Ue]={pattern:/(^$)/i,lookbehind:!0,inside:K.languages[Ue]},ht.cdata=/^$/i;var ut={"included-cdata":{pattern://i,inside:ht}};ut["language-"+Ue]={pattern:/[\s\S]+/,inside:K.languages[Ue]};var _t={};_t[ge]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return ge}),"i"),lookbehind:!0,greedy:!0,inside:ut},K.languages.insertBefore("markup","cdata",_t)}}),Object.defineProperty(K.languages.markup.tag,"addAttribute",{value:function(ee,ge){K.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+ee+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[ge,"language-"+ge],inside:K.languages[ge]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),K.languages.html=K.languages.markup,K.languages.mathml=K.languages.markup,K.languages.svg=K.languages.markup,K.languages.xml=K.languages.extend("markup",{}),K.languages.ssml=K.languages.xml,K.languages.atom=K.languages.xml,K.languages.rss=K.languages.xml,function(ee){var ge=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;ee.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+ge.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+ge.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+ge.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+ge.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:ge,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},ee.languages.css.atrule.inside.rest=ee.languages.css;var Ue=ee.languages.markup;Ue&&(Ue.tag.addInlined("style","css"),Ue.tag.addAttribute("style","css"))}(K),K.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},K.languages.javascript=K.languages.extend("clike",{"class-name":[K.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),K.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,K.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:K.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:K.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:K.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:K.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:K.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),K.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:K.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),K.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),K.languages.markup&&(K.languages.markup.tag.addInlined("script","javascript"),K.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),K.languages.js=K.languages.javascript,function(){if(typeof K>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var ee="Loading…",ge=function(sr,Ir){return"✖ Error "+sr+" while fetching file: "+Ir},Ue="✖ Error: File does not exist or is empty",ht={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},ut="data-src-status",_t="loading",Jt="loaded",ar="failed",Tt="pre[data-src]:not(["+ut+'="'+Jt+'"]):not(['+ut+'="'+_t+'"])';function Fe(sr,Ir,hn){var Oe=new XMLHttpRequest;Oe.open("GET",sr,!0),Oe.onreadystatechange=function(){Oe.readyState==4&&(Oe.status<400&&Oe.responseText?Ir(Oe.responseText):Oe.status>=400?hn(ge(Oe.status,Oe.statusText)):hn(Ue))},Oe.send(null)}function yr(sr){var Ir=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(sr||"");if(Ir){var hn=Number(Ir[1]),Oe=Ir[2],Et=Ir[3];return Oe?Et?[hn,Number(Et)]:[hn,void 0]:[hn,hn]}}K.hooks.add("before-highlightall",function(sr){sr.selector+=", "+Tt}),K.hooks.add("before-sanity-check",function(sr){var Ir=sr.element;if(Ir.matches(Tt)){sr.code="",Ir.setAttribute(ut,_t);var hn=Ir.appendChild(document.createElement("CODE"));hn.textContent=ee;var Oe=Ir.getAttribute("data-src"),Et=sr.language;if(Et==="none"){var qt=(/\.(\w+)$/.exec(Oe)||[,"none"])[1];Et=ht[qt]||qt}K.util.setLanguage(hn,Et),K.util.setLanguage(Ir,Et);var nr=K.plugins.autoloader;nr&&nr.loadLanguages(Et),Fe(Oe,function(Nr){Ir.setAttribute(ut,Jt);var zt=yr(Ir.getAttribute("data-range"));if(zt){var Cr=Nr.split(/\r\n?|\n/g),Wr=zt[0],un=zt[1]==null?Cr.length:zt[1];Wr<0&&(Wr+=Cr.length),Wr=Math.max(0,Math.min(Wr-1,Cr.length)),un<0&&(un+=Cr.length),un=Math.max(0,Math.min(un,Cr.length)),Nr=Cr.slice(Wr,un).join(` `),Ir.hasAttribute("data-start")||Ir.setAttribute("data-start",String(Wr+1))}hn.textContent=Nr,K.highlightElement(hn)},function(Nr){Ir.setAttribute(ut,ar),hn.textContent=Nr})}}),K.plugins.fileHighlight={highlight:function(Ir){for(var hn=(Ir||document).querySelectorAll(Tt),Oe=0,Et;Et=hn[Oe++];)K.highlightElement(Et)}};var Le=!1;K.fileHighlight=function(){Le||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),Le=!0),K.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(oQ);var q9=oQ.exports;const W9=n1(q9);const K9={class:"header___section"},z9={class:"chatHeader"},V9={class:"chatHeaderBox"},Z9={style:{width:"100px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},X9={class:"chat-item"},$9={key:0},e6={key:1},t6={class:"codeStle"},r6={class:"language"},n6={style:{background:"#2c2c36",padding:"10px","margin-top":"0","margin-bottom":"0"}},i6={class:"language-js line-numbers"},a6={key:1,class:"uploadFileList fileList"},o6=["src"],s6={key:2,class:"prompt"},c6=["onClick"],u6={style:{"margin-left":"20px"}},l6=["onClick"],A6=["onClick"],h6=["onClick"],f6=["onClick"],d6={class:"chat_bottom"},g6={class:"center-bottom"},p6={style:{width:"100%",display:"flex","justify-content":"space-between"},class:"uploadFileDis"},v6={key:0},m6={key:0,class:"uploadFileList"},y6={style:{"font-size":"12px"}},I6=["src"],b6={style:{width:"100%","text-align":"right"}},C6=Of({__name:"seniorAgentSession",props:{modalObj:Object},setup(D){const U=D,K=X5(),ee=Zt([{content:"你好! 我是你的助理,有什么可以帮到你的吗?",role:"assistant"}]),ge=K.hrefUrl;Zt([]),Ta({}),Zt("");const Ue=Zt(!1),ht=Zt(!1),ut=Zt("未命名会话"),_t=Zt(0),Jt=Zt("");let ar=null;const Tt=Zt(""),Fe=Zt(""),yr=Zt(""),Le=Zt(""),sr=Ta({}),Ir=Zt(""),hn=Zt(!1);Zt([]),Zt(""),Zt({});let Oe=Ta({});const Et=Zt(!1),qt=xB();Ta({});const nr=Zt([]),Nr=Zt([]),zt=wA(()=>qt.theme);let Cr=Ta({name:"未命名会话"});const Wr=Zt(!1);let un=Zt(!1),Ui=Ta({});const Ea=Ta({}),Po={name:[{required:!0,message:"名称不允许为空"}]},Ds=Or=>!!/\$([a-z]+)\$/g.test(Or),co=Or=>{let $r=[],jn,gi=0,da="",Sr=Or.content.match(/\$([a-z]+)\$/g);return Sr==null||Sr.map(br=>{let Ln=Or.content.indexOf(br);br=="$metadata$"&&(jn=Or.metadata),br=="$sql$"&&(jn=Or.sql),br=="$code$"&&(jn=Or.code),$r.push({index:Ln,item:br,preIndex:gi,preItem:da,tip_content:jn,len:Sr.length}),gi=Ln,da=br}),$r},kt=async({values:Or,errors:$r})=>{if($r)return;let jn={id:Le.value,conversation_id:Le.value,name:Cr.name};const{code:gi,data:da}=await Qh(jn);da&&(ys.success("修改成功"),Ji())},Qa=()=>{Wr.value=!0},Ji=()=>{Wr.value=!1},La=Or=>{},yo=async()=>{},_a=async Or=>{ee.value=[{content:"你好! 我是你的助理,有什么可以帮到你的吗?",role:"assistant"}],Nr.value=Or.prompts,yr.value="",ia.emit("queryAgent",nr.value),nr.value=[],console.log(12123),Dn(Or.id),Object.assign(sr,Or),Cr.name=Or.name;const $r=Or.prompt_config;$r!=null&&$r.prologue&&(ee.value[0].content=$r.prologue),un.value=!1,yo()},ln=Or=>{const $r=Or==null?void 0:Or.image_name;if($r)return ge+"/api/v1/advanced-agent/download?file_id="+$r+"&app_id=excel_talk&file_type=image"},gn=async Or=>{const{code:$r,data:jn}=await pg(Or);$r==200&&(console.log(jn,"agent会话详情"),Object.assign(Oe,jn),ee.value=jn.message,ut.value=`${jn.name}`||"未命名会话",Cr.name=`${jn.name}`||"未命名会话",Rs())},cn=Or=>{Fe.value=Or},Dn=Or=>{Or=="excel_talk"&&(hn.value=!1),Or=="questions_talk"&&(hn.value=!0)},xn=async Or=>{Le.value=Or.id,yr.value=Or.id,Ir.value=Or.dialog_id,ia.emit("queryAgent",nr.value),nr.value=[],Dn(Or.dialog_id),Cr.name=Or.name,gn(yr.value)},{toClipboard:Wn}=DB(),Vi=async Or=>{await Wn(Or)},uo=()=>{xr("click"),nr.value=[]},tn=()=>{let Or=ee.value[ee.value.length-2].content;lo(Or)},xr=async Or=>{(Or.keyCode==13||Or==="click")&&(Or.shiftKey||(Or!=="click"&&Or.preventDefault(),Fe.value?(Ei(""),nr.value=[]):(ys.warning("消息不能为空"),Ue.value=!1,ht.value=!1)))},Ei=async Or=>{var $r;try{ht.value=!0,Ue.value=!0;let jn=Fe.value;if(Or&&(jn=Or[0].name.split(".")[0]),yr.value)lo(Fe.value),Fe.value="";else{let gi=[{content:ee.value[0].content,role:"assistant"}];const da=await A9({id:"",app_id:sr.id,name:jn,message:gi});da.code==200&&(yr.value=($r=da.data)==null?void 0:$r.id,Or?(ht.value=!1,Ue.value=!1):(lo(Fe.value),Fe.value="",nr.value=[]))}}catch{ys.error("创建会话失败,请重试"),ht.value=!1,Ue.value=!1}},Ni=async Or=>{await Y5({url:"/api/v1/advanced-agent/download?file_id="+Or.filename})},ji=async Or=>{await Y5({url:"/api/v1/advanced-agent/download?file_id="+Or.excel_name+"&app_id=excel_talk&file_type=excel"})},wa=async(Or,$r)=>{console.log(111);try{const jn=new FormData;nr.value=Or,nr.value.map(Sr=>(Sr.name==$r[0].file.name&&(Sr.onFileSelectedLoading=!0,Sr.textName="上传中"),Sr)),yr.value||await Ei(Or),jn.append("files",$r[0].file),jn.append("conversation_id",yr.value),jn.append("app_id",sr.id),console.log(jn,"formData");const{data:gi,code:da}=await h9(jn);da===200&&nr.value.map(Sr=>(Sr.onFileSelectedLoading=!1,Sr.textName="上传成功",Sr))}catch{nr.value.map(gi=>(gi.onFileSelectedLoading=!1,gi.textName="上传失败",gi)),ys.error("上传失败")}},Oa=Or=>{console.log(nr.value),nr.value.splice(Or.index,1),ia.emit("queryAgent",Or)},Ja=wA(()=>Or=>{const $r=Zt("");switch($r.value=Or.split(".").pop(),$r.value){case"pptx":case"ppt":case"pdf":return tQ;case"docx":case"doc":case"wps":return rQ;case"xlsx":case"xls":return nQ;case"txt":return iQ;default:return aQ}}),lo=async Or=>{var Sr;ee.value.push({content:Or,role:"user"}),ee.value.push({role:"last"}),Rs();let $r={id:yr.value,message:Or,app_id:sr.id};un.value&&($r.dsl=Ui);const jn=await fetch("/api/v1/advanced-agent/completion",{method:"POST",headers:{Authorization:JI(),"Content-Type":"application/json"},body:JSON.stringify($r)}),gi=(Sr=jn==null?void 0:jn.body)==null?void 0:Sr.pipeThrough(new TextDecoderStream).pipeThrough(new qI).getReader();_t.value=0;let da={};for(;;){const br=await(gi==null?void 0:gi.read());if(br){const{done:Ln,value:Ai}=br;if(console.log(br,999),ht.value=!1,Ai&&(Ai==null?void 0:Ai.event)=="message")try{const ei=JSON.parse((Ai==null?void 0:Ai.data)||""),Li=ei==null?void 0:ei.data;if(typeof Li!="boolean"){if(console.info("data:",Li),Li!=null&&Li.content){let lr=Li.content;lr=lr.replace("$metadata$",Li.metadata),Li.content.includes("$sql$")&&(lr=lr.replace("$sql$",Li.sql)),Li.content.includes("$code$")&&(lr=lr.replace("$code$",Li.code)),da=Li,Tt.value=lr}ia.emit("queryAgent",nr.value),Vs()}}catch(ei){console.warn(ei)}if(Ln){console.info("done"),Oe!=null&&Oe.message||(Oe.message=[]),Oe.message.push(da),await c9({converson_id:yr.value,message:Oe.message}),Sc(Ea);break}}}Ue.value=!1},Go=async()=>{ht.value=!1,Ue.value=!1,Et.value=!0;let $r=[{content:ee.value[ee.value.length-2].content,role:"user"},{content:Jt.value,role:"assistant"}];ee.value=ee.value.splice(0,ee.value.length-2).concat($r),Oe.dsl.messages=Oe.dsl.messages.concat($r),Object.assign(Ea,{id:Oe.id,conversation_id:Oe.id,message:ee.value})},Sc=async Or=>{const{code:$r,data:jn}=await Qh(Or);jn&&(clearTimeout(ar),ar=null,gn(yr.value))},zs=Or=>{Or.preventDefault(),Fe.value+=` `},Vs=()=>{ar&&clearTimeout(ar);const Or=Tt.value;_t.value{XI(()=>{const Or=document.getElementById("chatAgentHome");Or&&(Or.scrollTop=Or.scrollHeight),So.scrollTop(Or.scrollHeight)})};return _h(()=>{ia.on("createSeniorAgent",Or=>{_a(Or)}),ia.on("queryAgentSessionDetails",Or=>{un.value=!0,xn(Or)}),setTimeout(()=>{W9.highlightAll()},1e3)}),bg(()=>{ia.off("createSeniorAgent"),ia.off("queryAgentSessionDetails")}),i1(()=>U.modalObj,(Or,$r)=>{JSON.stringify(Or)!="{}"},{immediate:!0,deep:!0}),(Or,$r)=>{const jn=vn("icon-down"),gi=vn("a-button"),da=vn("icon-edit"),Sr=vn("a-popover"),br=vn("a-comment"),Ln=vn("a-image"),Ai=vn("icon-right"),ei=vn("icon-copy"),Li=vn("icon-refresh"),lr=vn("icon-to-bottom"),Lt=vn("a-textarea"),ro=vn("a-spin"),Is=vn("icon-record-stop"),Fs=vn("icon-send"),Zc=vn("icon-sync"),Eu=vn("icon-close-circle-fill"),Xc=vn("a-input"),$c=vn("a-form-item"),_c=vn("a-form"),wu=vn("a-modal");return zr(),Fn(_s,null,[or("div",K9,[or("div",z9,[or("div",V9,[Qr(Sr,{position:"bottom",trigger:"click"},{content:Fr(()=>[Qr(gi,{type:"text",class:"button",style:{color:"#2a2a2b"},onClick:$r[0]||($r[0]=Sn=>Qa())},{icon:Fr(()=>[Qr(da)]),default:Fr(()=>[$r[7]||($r[7]=Ya(" 修改名称 "))]),_:1})]),default:Fr(()=>[Qr(gi,{border:""},{default:Fr(()=>[or("span",Z9,xa(Ti(Cr).name),1),Qr(jn,{style:{"margin-left":"4px"}})]),_:1})]),_:1})])])]),or("div",{ref_key:"scrollbar",ref:So,id:"chatAgentHome",class:"chat-list",style:{width:"80%",overflow:"auto",height:"calc(100vh - 400px)",margin:"0px auto 20px"}},[(zr(!0),Fn(_s,null,lc(ee.value,(Sn,Zs)=>(zr(),Fn("div",X9,[(Sn==null?void 0:Sn.role)==="user"?(zr(),Ma(br,{key:0},{avatar:Fr(()=>$r[8]||($r[8]=[or("img",{class:"icon-user-jpg",src:SB,alt:"本地图片"},null,-1)])),content:Fr(()=>[or("div",{class:qs({chartUserText:zt.value==="light"})},xa(Sn.content),3)]),_:2},1024)):(Sn==null?void 0:Sn.role)==="assistant"?(zr(),Ma(br,{key:1},{avatar:Fr(()=>$r[9]||($r[9]=[or("img",{class:"icon-user-jpg",src:Vp,alt:"本地图片"},null,-1)])),content:Fr(()=>[Ds(Sn.content)?(zr(),Fn("div",{key:0,class:qs({chartUserText:zt.value==="light"})},[(zr(!0),Fn(_s,null,lc(co(Sn),(ga,Bu)=>(zr(),Fn("div",null,[ga.preIndex==0?(zr(),Fn("span",$9,xa(Sn.content.substring(0,ga.index)),1)):(zr(),Fn("span",e6,xa(Sn.content.substring(ga.preIndex+ga.preItem.length,ga.index)),1)),or("div",t6,[or("div",r6,xa(ga.item),1),or("pre",n6,[or("code",i6,xa(ga==null?void 0:ga.tip_content),1)])])]))),256))],2)):(zr(),Fn("div",{key:1,class:qs({chartUserText:zt.value==="light"})},xa(Sn.content),3)),or("div",null,[Sn!=null&&Sn.image_name?(zr(),Ma(Ln,{key:0,src:ln(Sn),alt:""},null,8,["src"])):Ca("",!0),Sn!=null&&Sn.excel_name?(zr(),Fn("div",a6,[Qr(br,{content:Sn.excel_name,style:{background:"var(--color-bg-2)",padding:"10px","border-radius":"10px","font-size":"12px"}},{avatar:Fr(()=>[or("img",{src:Ja.value("xlsx"),alt:""},null,8,o6)]),_:2},1032,["content"])])):Ca("",!0)]),yr.value?Ca("",!0):(zr(),Fn("div",s6,[or("ul",null,[(zr(!0),Fn(_s,null,lc(Nr.value,(ga,Bu)=>(zr(),Fn("li",{class:"prompt-item",onClick:Zu=>cn(ga),key:Bu},[or("span",null,xa(ga),1),or("span",u6,[Qr(Ai)])],8,c6))),128))])])),$r[10]||($r[10]=or("div",null,null,-1))]),actions:Fr(()=>[Zs!=0&&(Sn!=null&&Sn.content)?(zr(),Fn("span",{key:0,class:"action",onClick:ga=>Vi(Sn.content)},[Qr(ei),$r[11]||($r[11]=Ya(" 复制 "))],8,l6)):Ca("",!0),Zs!=0&&(Sn!=null&&Sn.code)?(zr(),Fn("span",{key:1,class:"action",onClick:ga=>Vi(Sn.code+Sn.sql)},[Qr(ei),$r[12]||($r[12]=Ya(" 复制 "))],8,A6)):Ca("",!0),Zs!=0&&Zs==ee.value.length-1?(zr(),Fn("span",{key:2,class:"action",onClick:$r[1]||($r[1]=ga=>tn())},[Qr(Li),$r[13]||($r[13]=Ya(" 重新生成 "))])):Ca("",!0),Sn.filename?(zr(),Fn("span",{key:3,class:"action",onClick:ga=>Ni(Sn)},[Qr(lr),$r[14]||($r[14]=Ya("下载 "))],8,h6)):Ca("",!0),Sn!=null&&Sn.excel_name?(zr(),Fn("span",{key:4,class:"action",onClick:ga=>ji(Sn)},[Qr(lr),$r[15]||($r[15]=Ya("下载 "))],8,f6)):Ca("",!0)]),_:2},1024)):(Sn==null?void 0:Sn.role)==="last"?(zr(),Ma(br,{key:2},{avatar:Fr(()=>$r[16]||($r[16]=[or("img",{class:"icon-user-jpg",src:Vp,alt:"本地图片"},null,-1)])),content:Fr(()=>[Qr(ro,{loading:ht.value,dot:"",style:{width:"100%"}},{default:Fr(()=>[Qr(Lt,{readonly:"","auto-size":"",modelValue:Jt.value,"onUpdate:modelValue":$r[2]||($r[2]=ga=>Jt.value=ga),class:qs({chatItemAnswer:zt.value==="light"}),style:mu([{backgroundColor:zt.value==="light"?"#ffffff":"#000000"},{border:"none"}])},null,8,["modelValue","class","style"])]),_:1},8,["loading"])]),actions:Fr(()=>[Jt.value!=""?(zr(),Fn("div",{key:0,class:"action",onClick:Go,style:{background:"var(--color-bg-2)",color:"var(--color-primary-light-4)"}},[Qr(Is),$r[17]||($r[17]=Ya(" 停止生成 "))])):Ca("",!0)]),_:1})):Ca("",!0)]))),256))],512),or("div",d6,[or("div",g6,[Qr(Lt,{modelValue:Fe.value,"onUpdate:modelValue":$r[3]||($r[3]=Sn=>Fe.value=Sn),onKeydown:[Ig(r1(zs,["shift"]),["enter"]),Ig(xr,["enter"])],placeholder:"输入您想了解的内容,Shift+Enter换行,Enter发送","allow-clear":"","show-word-limit":"",disabled:Ue.value,class:qs({textItemAnswer:zt.value==="dark"}),style:mu([{backgroundColor:zt.value==="light"?"#ffffff":"#000000"},{border:"none"}]),"auto-size":{minRows:12,maxRows:5}},null,8,["modelValue","onKeydown","disabled","class","style"]),or("div",p6,[hn.value?(zr(),Fn("span",v6)):Ca("",!0),hn.value?Ca("",!0):(zr(),Ma(J9,{key:1,ref:"fileInput",sessionId:yr.value,handleRemove:Or.handleRemove,typeXLse:!1,onSelectFileCallback:wa},null,8,["sessionId","handleRemove"])),Qr(gi,{disabled:Ue.value,onClick:uo,type:"text",style:{"border-radius":"24px"},loading:ht.value},{default:Fr(()=>[Qr(Fs,{size:"32",style:{color:"#0960bd"}})]),_:1},8,["disabled","loading"])])]),nr.value.length>0?(zr(),Fn("div",m6,[(zr(!0),Fn(_s,null,lc(nr.value,(Sn,Zs)=>(zr(),Fn("div",{class:"files",key:Zs,style:{position:"relative",width:"220px","margin-top":"10px","margin-right":"20px"}},[Qr(br,{author:Sn.name,content:Sn.size,style:{background:"var(--color-bg-2)",padding:"10px","border-radius":"10px","font-size":"12px"}},{avatar:Fr(()=>[Sn.onFileSelectedLoading?(zr(),Ma(ro,{key:0,loading:Sn.onFileSelectedLoading},{icon:Fr(()=>[Qr(Zc)]),tip:Fr(()=>[or("div",y6,xa(Sn.textName),1)]),_:2},1032,["loading"])):Ca("",!0),or("img",{src:Ja.value(Sn.name),alt:""},null,8,I6),wh(or("div",{style:{"font-size":"12px"}},xa(Sn.textName),513),[[Bh,!Sn.onFileSelectedLoading]])]),_:2},1032,["author","content"]),Qr(Eu,{size:"18px",onClick:ga=>Oa(Sn),style:{position:"absolute",right:"-4px",top:"-4px",color:"red",cursor:"pointer"}},null,8,["onClick"])]))),128))])):Ca("",!0),Qr(wu,{visible:Wr.value,"onUpdate:visible":$r[6]||($r[6]=Sn=>Wr.value=Sn),title:"修改名称",onBeforeOpen:La,onCancel:Ji,footer:!1,"title-align":"start"},{default:Fr(()=>[Qr(_c,{ref:"formRef",rules:Po,model:Ti(Cr),onSubmit:kt},{default:Fr(()=>[Qr($c,{field:"name",label:"名称"},{default:Fr(()=>[Qr(Xc,{modelValue:Ti(Cr).name,"onUpdate:modelValue":$r[4]||($r[4]=Sn=>Ti(Cr).name=Sn),placeholder:"请输入名称"},null,8,["modelValue"])]),_:1}),Qr($c,null,{default:Fr(()=>[or("div",b6,[Qr(gi,{onClick:$r[5]||($r[5]=Sn=>Wr.value=!1)},{default:Fr(()=>$r[18]||($r[18]=[Ya("取消")])),_:1}),Qr(gi,{style:{"margin-left":"10px"},type:"primary","html-type":"submit"},{default:Fr(()=>$r[19]||($r[19]=[Ya("确定")])),_:1})])]),_:1})]),_:1},8,["model"])]),_:1},8,["visible"])])],64)}}});const E6=zu(C6,[["__scopeId","data-v-5327287f"]]);//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com var sQ;function yn(){return sQ.apply(null,arguments)}function w6(D){sQ=D}function Wu(D){return D instanceof Array||Object.prototype.toString.call(D)==="[object Array]"}function Lf(D){return D!=null&&Object.prototype.toString.call(D)==="[object Object]"}function aa(D,U){return Object.prototype.hasOwnProperty.call(D,U)}function RB(D){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(D).length===0;var U;for(U in D)if(aa(D,U))return!1;return!0}function xc(D){return D===void 0}function BA(D){return typeof D=="number"||Object.prototype.toString.call(D)==="[object Number]"}function a1(D){return D instanceof Date||Object.prototype.toString.call(D)==="[object Date]"}function cQ(D,U){var K=[],ee,ge=D.length;for(ee=0;ee>>0,ee;for(ee=0;ee0)for(K=0;K=0;return(Ue?K?"+":"":"-")+Math.pow(10,Math.max(0,ge)).toString().substr(1)+ee}var TB=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,GI=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,pB={},vg={};function qn(D,U,K,ee){var ge=ee;typeof ee=="string"&&(ge=function(){return this[ee]()}),D&&(vg[D]=ge),U&&(vg[U[0]]=function(){return Rl(ge.apply(this,arguments),U[1],U[2])}),K&&(vg[K]=function(){return this.localeData().ordinal(ge.apply(this,arguments),D)})}function S6(D){return D.match(/\[[\s\S]/)?D.replace(/^\[|\]$/g,""):D.replace(/\\/g,"")}function _6(D){var U=D.match(TB),K,ee;for(K=0,ee=U.length;K=0&&GI.test(D);)D=D.replace(GI,ee),GI.lastIndex=0,K-=1;return D}var D6={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function R6(D){var U=this._longDateFormat[D],K=this._longDateFormat[D.toUpperCase()];return U||!K?U:(this._longDateFormat[D]=K.match(TB).map(function(ee){return ee==="MMMM"||ee==="MM"||ee==="DD"||ee==="dddd"?ee.slice(1):ee}).join(""),this._longDateFormat[D])}var F6="Invalid date";function N6(){return this._invalidDate}var M6="%d",T6=/\d{1,2}/;function L6(D){return this._ordinal.replace("%d",D)}var O6={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function P6(D,U,K,ee){var ge=this._relativeTime[K];return Nl(ge)?ge(D,U,K,ee):ge.replace(/%d/i,D)}function G6(D,U){var K=this._relativeTime[D>0?"future":"past"];return Nl(K)?K(U):K.replace(/%s/i,U)}var K5={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Cu(D){return typeof D=="string"?K5[D]||K5[D.toLowerCase()]:void 0}function LB(D){var U={},K,ee;for(ee in D)aa(D,ee)&&(K=Cu(ee),K&&(U[K]=D[ee]));return U}var U6={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function j6(D){var U=[],K;for(K in D)aa(D,K)&&U.push({unit:K,priority:U6[K]});return U.sort(function(ee,ge){return ee.priority-ge.priority}),U}var hQ=/\d/,Vc=/\d\d/,fQ=/\d{3}/,OB=/\d{4}/,e2=/[+-]?\d{6}/,to=/\d\d?/,dQ=/\d\d\d\d?/,gQ=/\d\d\d\d\d\d?/,t2=/\d{1,3}/,PB=/\d{1,4}/,r2=/[+-]?\d{1,6}/,Cg=/\d+/,n2=/[+-]?\d+/,H6=/Z|[+-]\d\d:?\d\d/gi,i2=/Z|[+-]\d\d(?::?\d\d)?/gi,Y6=/[+-]?\d+(\.\d{1,3})?/,s1=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Eg=/^[1-9]\d?/,GB=/^([1-9]\d|\d)/,WI;WI={};function Qn(D,U,K){WI[D]=Nl(U)?U:function(ee,ge){return ee&&K?K:U}}function J6(D,U){return aa(WI,D)?WI[D](U._strict,U._locale):new RegExp(q6(D))}function q6(D){return CA(D.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(U,K,ee,ge,Ue){return K||ee||ge||Ue}))}function CA(D){return D.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function yu(D){return D<0?Math.ceil(D)||0:Math.floor(D)}function Gi(D){var U=+D,K=0;return U!==0&&isFinite(U)&&(K=yu(U)),K}var wB={};function Sa(D,U){var K,ee=U,ge;for(typeof D=="string"&&(D=[D]),BA(U)&&(ee=function(Ue,ht){ht[U]=Gi(Ue)}),ge=D.length,K=0;K68?1900:2e3)};var pQ=wg("FullYear",!0);function V6(){return a2(this.year())}function wg(D,U){return function(K){return K!=null?(vQ(this,D,K),yn.updateOffset(this,U),this):Zp(this,D)}}function Zp(D,U){if(!D.isValid())return NaN;var K=D._d,ee=D._isUTC;switch(U){case"Milliseconds":return ee?K.getUTCMilliseconds():K.getMilliseconds();case"Seconds":return ee?K.getUTCSeconds():K.getSeconds();case"Minutes":return ee?K.getUTCMinutes():K.getMinutes();case"Hours":return ee?K.getUTCHours():K.getHours();case"Date":return ee?K.getUTCDate():K.getDate();case"Day":return ee?K.getUTCDay():K.getDay();case"Month":return ee?K.getUTCMonth():K.getMonth();case"FullYear":return ee?K.getUTCFullYear():K.getFullYear();default:return NaN}}function vQ(D,U,K){var ee,ge,Ue,ht,ut;if(!(!D.isValid()||isNaN(K))){switch(ee=D._d,ge=D._isUTC,U){case"Milliseconds":return void(ge?ee.setUTCMilliseconds(K):ee.setMilliseconds(K));case"Seconds":return void(ge?ee.setUTCSeconds(K):ee.setSeconds(K));case"Minutes":return void(ge?ee.setUTCMinutes(K):ee.setMinutes(K));case"Hours":return void(ge?ee.setUTCHours(K):ee.setHours(K));case"Date":return void(ge?ee.setUTCDate(K):ee.setDate(K));case"FullYear":break;default:return}Ue=K,ht=D.month(),ut=D.date(),ut=ut===29&&ht===1&&!a2(Ue)?28:ut,ge?ee.setUTCFullYear(Ue,ht,ut):ee.setFullYear(Ue,ht,ut)}}function Z6(D){return D=Cu(D),Nl(this[D])?this[D]():this}function X6(D,U){if(typeof D=="object"){D=LB(D);var K=j6(D),ee,ge=K.length;for(ee=0;ee=0?(ut=new Date(D+400,U,K,ee,ge,Ue,ht),isFinite(ut.getFullYear())&&ut.setFullYear(D)):ut=new Date(D,U,K,ee,ge,Ue,ht),ut}function Xp(D){var U,K;return D<100&&D>=0?(K=Array.prototype.slice.call(arguments),K[0]=D+400,U=new Date(Date.UTC.apply(null,K)),isFinite(U.getUTCFullYear())&&U.setUTCFullYear(D)):U=new Date(Date.UTC.apply(null,arguments)),U}function KI(D,U,K){var ee=7+U-K,ge=(7+Xp(D,0,ee).getUTCDay()-U)%7;return-ge+ee-1}function EQ(D,U,K,ee,ge){var Ue=(7+K-ee)%7,ht=KI(D,ee,ge),ut=1+7*(U-1)+Ue+ht,_t,Jt;return ut<=0?(_t=D-1,Jt=zp(_t)+ut):ut>zp(D)?(_t=D+1,Jt=ut-zp(D)):(_t=D,Jt=ut),{year:_t,dayOfYear:Jt}}function $p(D,U,K){var ee=KI(D.year(),U,K),ge=Math.floor((D.dayOfYear()-ee-1)/7)+1,Ue,ht;return ge<1?(ht=D.year()-1,Ue=ge+EA(ht,U,K)):ge>EA(D.year(),U,K)?(Ue=ge-EA(D.year(),U,K),ht=D.year()+1):(ht=D.year(),Ue=ge),{week:Ue,year:ht}}function EA(D,U,K){var ee=KI(D,U,K),ge=KI(D+1,U,K);return(zp(D)-ee+ge)/7}qn("w",["ww",2],"wo","week");qn("W",["WW",2],"Wo","isoWeek");Qn("w",to,Eg);Qn("ww",to,Vc);Qn("W",to,Eg);Qn("WW",to,Vc);c1(["w","ww","W","WW"],function(D,U,K,ee){U[ee.substr(0,1)]=Gi(D)});function A8(D){return $p(D,this._week.dow,this._week.doy).week}var h8={dow:0,doy:6};function f8(){return this._week.dow}function d8(){return this._week.doy}function g8(D){var U=this.localeData().week(this);return D==null?U:this.add((D-U)*7,"d")}function p8(D){var U=$p(this,1,4).week;return D==null?U:this.add((D-U)*7,"d")}qn("d",0,"do","day");qn("dd",0,0,function(D){return this.localeData().weekdaysMin(this,D)});qn("ddd",0,0,function(D){return this.localeData().weekdaysShort(this,D)});qn("dddd",0,0,function(D){return this.localeData().weekdays(this,D)});qn("e",0,0,"weekday");qn("E",0,0,"isoWeekday");Qn("d",to);Qn("e",to);Qn("E",to);Qn("dd",function(D,U){return U.weekdaysMinRegex(D)});Qn("ddd",function(D,U){return U.weekdaysShortRegex(D)});Qn("dddd",function(D,U){return U.weekdaysRegex(D)});c1(["dd","ddd","dddd"],function(D,U,K,ee){var ge=K._locale.weekdaysParse(D,ee,K._strict);ge!=null?U.d=ge:xi(K).invalidWeekday=D});c1(["d","e","E"],function(D,U,K,ee){U[ee]=Gi(D)});function v8(D,U){return typeof D!="string"?D:isNaN(D)?(D=U.weekdaysParse(D),typeof D=="number"?D:null):parseInt(D,10)}function m8(D,U){return typeof D=="string"?U.weekdaysParse(D)%7||7:isNaN(D)?null:D}function jB(D,U){return D.slice(U,7).concat(D.slice(0,U))}var y8="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),wQ="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),I8="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),b8=s1,C8=s1,E8=s1;function w8(D,U){var K=Wu(this._weekdays)?this._weekdays:this._weekdays[D&&D!==!0&&this._weekdays.isFormat.test(U)?"format":"standalone"];return D===!0?jB(K,this._week.dow):D?K[D.day()]:K}function B8(D){return D===!0?jB(this._weekdaysShort,this._week.dow):D?this._weekdaysShort[D.day()]:this._weekdaysShort}function Q8(D){return D===!0?jB(this._weekdaysMin,this._week.dow):D?this._weekdaysMin[D.day()]:this._weekdaysMin}function k8(D,U,K){var ee,ge,Ue,ht=D.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],ee=0;ee<7;++ee)Ue=Fl([2e3,1]).day(ee),this._minWeekdaysParse[ee]=this.weekdaysMin(Ue,"").toLocaleLowerCase(),this._shortWeekdaysParse[ee]=this.weekdaysShort(Ue,"").toLocaleLowerCase(),this._weekdaysParse[ee]=this.weekdays(Ue,"").toLocaleLowerCase();return K?U==="dddd"?(ge=Oo.call(this._weekdaysParse,ht),ge!==-1?ge:null):U==="ddd"?(ge=Oo.call(this._shortWeekdaysParse,ht),ge!==-1?ge:null):(ge=Oo.call(this._minWeekdaysParse,ht),ge!==-1?ge:null):U==="dddd"?(ge=Oo.call(this._weekdaysParse,ht),ge!==-1||(ge=Oo.call(this._shortWeekdaysParse,ht),ge!==-1)?ge:(ge=Oo.call(this._minWeekdaysParse,ht),ge!==-1?ge:null)):U==="ddd"?(ge=Oo.call(this._shortWeekdaysParse,ht),ge!==-1||(ge=Oo.call(this._weekdaysParse,ht),ge!==-1)?ge:(ge=Oo.call(this._minWeekdaysParse,ht),ge!==-1?ge:null)):(ge=Oo.call(this._minWeekdaysParse,ht),ge!==-1||(ge=Oo.call(this._weekdaysParse,ht),ge!==-1)?ge:(ge=Oo.call(this._shortWeekdaysParse,ht),ge!==-1?ge:null))}function x8(D,U,K){var ee,ge,Ue;if(this._weekdaysParseExact)return k8.call(this,D,U,K);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),ee=0;ee<7;ee++){if(ge=Fl([2e3,1]).day(ee),K&&!this._fullWeekdaysParse[ee]&&(this._fullWeekdaysParse[ee]=new RegExp("^"+this.weekdays(ge,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[ee]=new RegExp("^"+this.weekdaysShort(ge,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[ee]=new RegExp("^"+this.weekdaysMin(ge,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[ee]||(Ue="^"+this.weekdays(ge,"")+"|^"+this.weekdaysShort(ge,"")+"|^"+this.weekdaysMin(ge,""),this._weekdaysParse[ee]=new RegExp(Ue.replace(".",""),"i")),K&&U==="dddd"&&this._fullWeekdaysParse[ee].test(D))return ee;if(K&&U==="ddd"&&this._shortWeekdaysParse[ee].test(D))return ee;if(K&&U==="dd"&&this._minWeekdaysParse[ee].test(D))return ee;if(!K&&this._weekdaysParse[ee].test(D))return ee}}function S8(D){if(!this.isValid())return D!=null?this:NaN;var U=Zp(this,"Day");return D!=null?(D=v8(D,this.localeData()),this.add(D-U,"d")):U}function _8(D){if(!this.isValid())return D!=null?this:NaN;var U=(this.day()+7-this.localeData()._week.dow)%7;return D==null?U:this.add(D-U,"d")}function D8(D){if(!this.isValid())return D!=null?this:NaN;if(D!=null){var U=m8(D,this.localeData());return this.day(this.day()%7?U:U-7)}else return this.day()||7}function R8(D){return this._weekdaysParseExact?(aa(this,"_weekdaysRegex")||HB.call(this),D?this._weekdaysStrictRegex:this._weekdaysRegex):(aa(this,"_weekdaysRegex")||(this._weekdaysRegex=b8),this._weekdaysStrictRegex&&D?this._weekdaysStrictRegex:this._weekdaysRegex)}function F8(D){return this._weekdaysParseExact?(aa(this,"_weekdaysRegex")||HB.call(this),D?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(aa(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=C8),this._weekdaysShortStrictRegex&&D?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function N8(D){return this._weekdaysParseExact?(aa(this,"_weekdaysRegex")||HB.call(this),D?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(aa(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=E8),this._weekdaysMinStrictRegex&&D?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function HB(){function D(ar,Tt){return Tt.length-ar.length}var U=[],K=[],ee=[],ge=[],Ue,ht,ut,_t,Jt;for(Ue=0;Ue<7;Ue++)ht=Fl([2e3,1]).day(Ue),ut=CA(this.weekdaysMin(ht,"")),_t=CA(this.weekdaysShort(ht,"")),Jt=CA(this.weekdays(ht,"")),U.push(ut),K.push(_t),ee.push(Jt),ge.push(ut),ge.push(_t),ge.push(Jt);U.sort(D),K.sort(D),ee.sort(D),ge.sort(D),this._weekdaysRegex=new RegExp("^("+ge.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+ee.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+K.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+U.join("|")+")","i")}function YB(){return this.hours()%12||12}function M8(){return this.hours()||24}qn("H",["HH",2],0,"hour");qn("h",["hh",2],0,YB);qn("k",["kk",2],0,M8);qn("hmm",0,0,function(){return""+YB.apply(this)+Rl(this.minutes(),2)});qn("hmmss",0,0,function(){return""+YB.apply(this)+Rl(this.minutes(),2)+Rl(this.seconds(),2)});qn("Hmm",0,0,function(){return""+this.hours()+Rl(this.minutes(),2)});qn("Hmmss",0,0,function(){return""+this.hours()+Rl(this.minutes(),2)+Rl(this.seconds(),2)});function BQ(D,U){qn(D,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),U)})}BQ("a",!0);BQ("A",!1);function QQ(D,U){return U._meridiemParse}Qn("a",QQ);Qn("A",QQ);Qn("H",to,GB);Qn("h",to,Eg);Qn("k",to,Eg);Qn("HH",to,Vc);Qn("hh",to,Vc);Qn("kk",to,Vc);Qn("hmm",dQ);Qn("hmmss",gQ);Qn("Hmm",dQ);Qn("Hmmss",gQ);Sa(["H","HH"],os);Sa(["k","kk"],function(D,U,K){var ee=Gi(D);U[os]=ee===24?0:ee});Sa(["a","A"],function(D,U,K){K._isPm=K._locale.isPM(D),K._meridiem=D});Sa(["h","hh"],function(D,U,K){U[os]=Gi(D),xi(K).bigHour=!0});Sa("hmm",function(D,U,K){var ee=D.length-2;U[os]=Gi(D.substr(0,ee)),U[qu]=Gi(D.substr(ee)),xi(K).bigHour=!0});Sa("hmmss",function(D,U,K){var ee=D.length-4,ge=D.length-2;U[os]=Gi(D.substr(0,ee)),U[qu]=Gi(D.substr(ee,2)),U[bA]=Gi(D.substr(ge)),xi(K).bigHour=!0});Sa("Hmm",function(D,U,K){var ee=D.length-2;U[os]=Gi(D.substr(0,ee)),U[qu]=Gi(D.substr(ee))});Sa("Hmmss",function(D,U,K){var ee=D.length-4,ge=D.length-2;U[os]=Gi(D.substr(0,ee)),U[qu]=Gi(D.substr(ee,2)),U[bA]=Gi(D.substr(ge))});function T8(D){return(D+"").toLowerCase().charAt(0)==="p"}var L8=/[ap]\.?m?\.?/i,O8=wg("Hours",!0);function P8(D,U,K){return D>11?K?"pm":"PM":K?"am":"AM"}var kQ={calendar:k6,longDateFormat:D6,invalidDate:F6,ordinal:M6,dayOfMonthOrdinalParse:T6,relativeTime:O6,months:e8,monthsShort:mQ,week:h8,weekdays:y8,weekdaysMin:I8,weekdaysShort:wQ,meridiemParse:L8},so={},Wp={},e1;function G8(D,U){var K,ee=Math.min(D.length,U.length);for(K=0;K0;){if(ge=o2(Ue.slice(0,K).join("-")),ge)return ge;if(ee&&ee.length>=K&&G8(Ue,ee)>=K-1)break;K--}U++}return e1}function j8(D){return!!(D&&D.match("^[^/\\\\]*$"))}function o2(D){var U=null,K;if(so[D]===void 0&&typeof module<"u"&&module&&module.exports&&j8(D))try{U=e1._abbr,K=require,K("./locale/"+D),Sh(U)}catch{so[D]=null}return so[D]}function Sh(D,U){var K;return D&&(xc(U)?K=QA(D):K=JB(D,U),K?e1=K:typeof console<"u"&&console.warn&&console.warn("Locale "+D+" not found. Did you forget to load it?")),e1._abbr}function JB(D,U){if(U!==null){var K,ee=kQ;if(U.abbr=D,so[D]!=null)lQ("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),ee=so[D]._config;else if(U.parentLocale!=null)if(so[U.parentLocale]!=null)ee=so[U.parentLocale]._config;else if(K=o2(U.parentLocale),K!=null)ee=K._config;else return Wp[U.parentLocale]||(Wp[U.parentLocale]=[]),Wp[U.parentLocale].push({name:D,config:U}),null;return so[D]=new MB(CB(ee,U)),Wp[D]&&Wp[D].forEach(function(ge){JB(ge.name,ge.config)}),Sh(D),so[D]}else return delete so[D],null}function H8(D,U){if(U!=null){var K,ee,ge=kQ;so[D]!=null&&so[D].parentLocale!=null?so[D].set(CB(so[D]._config,U)):(ee=o2(D),ee!=null&&(ge=ee._config),U=CB(ge,U),ee==null&&(U.abbr=D),K=new MB(U),K.parentLocale=so[D],so[D]=K),Sh(D)}else so[D]!=null&&(so[D].parentLocale!=null?(so[D]=so[D].parentLocale,D===Sh()&&Sh(D)):so[D]!=null&&delete so[D]);return so[D]}function QA(D){var U;if(D&&D._locale&&D._locale._abbr&&(D=D._locale._abbr),!D)return e1;if(!Wu(D)){if(U=o2(D),U)return U;D=[D]}return U8(D)}function Y8(){return EB(so)}function qB(D){var U,K=D._a;return K&&xi(D).overflow===-2&&(U=K[IA]<0||K[IA]>11?IA:K[Dl]<1||K[Dl]>UB(K[Ws],K[IA])?Dl:K[os]<0||K[os]>24||K[os]===24&&(K[qu]!==0||K[bA]!==0||K[Tf]!==0)?os:K[qu]<0||K[qu]>59?qu:K[bA]<0||K[bA]>59?bA:K[Tf]<0||K[Tf]>999?Tf:-1,xi(D)._overflowDayOfYear&&(UDl)&&(U=Dl),xi(D)._overflowWeeks&&U===-1&&(U=K6),xi(D)._overflowWeekday&&U===-1&&(U=z6),xi(D).overflow=U),D}var J8=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,q8=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,W8=/Z|[+-]\d\d(?::?\d\d)?/,UI=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],vB=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],K8=/^\/?Date\((-?\d+)/i,z8=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,V8={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function xQ(D){var U,K,ee=D._i,ge=J8.exec(ee)||q8.exec(ee),Ue,ht,ut,_t,Jt=UI.length,ar=vB.length;if(ge){for(xi(D).iso=!0,U=0,K=Jt;Uzp(ht)||D._dayOfYear===0)&&(xi(D)._overflowDayOfYear=!0),K=Xp(ht,0,D._dayOfYear),D._a[IA]=K.getUTCMonth(),D._a[Dl]=K.getUTCDate()),U=0;U<3&&D._a[U]==null;++U)D._a[U]=ee[U]=ge[U];for(;U<7;U++)D._a[U]=ee[U]=D._a[U]==null?U===2?1:0:D._a[U];D._a[os]===24&&D._a[qu]===0&&D._a[bA]===0&&D._a[Tf]===0&&(D._nextDay=!0,D._a[os]=0),D._d=(D._useUTC?Xp:l8).apply(null,ee),Ue=D._useUTC?D._d.getUTCDay():D._d.getDay(),D._tzm!=null&&D._d.setUTCMinutes(D._d.getUTCMinutes()-D._tzm),D._nextDay&&(D._a[os]=24),D._w&&typeof D._w.d<"u"&&D._w.d!==Ue&&(xi(D).weekdayMismatch=!0)}}function i7(D){var U,K,ee,ge,Ue,ht,ut,_t,Jt;U=D._w,U.GG!=null||U.W!=null||U.E!=null?(Ue=1,ht=4,K=dg(U.GG,D._a[Ws],$p(eo(),1,4).year),ee=dg(U.W,1),ge=dg(U.E,1),(ge<1||ge>7)&&(_t=!0)):(Ue=D._locale._week.dow,ht=D._locale._week.doy,Jt=$p(eo(),Ue,ht),K=dg(U.gg,D._a[Ws],Jt.year),ee=dg(U.w,Jt.week),U.d!=null?(ge=U.d,(ge<0||ge>6)&&(_t=!0)):U.e!=null?(ge=U.e+Ue,(U.e<0||U.e>6)&&(_t=!0)):ge=Ue),ee<1||ee>EA(K,Ue,ht)?xi(D)._overflowWeeks=!0:_t!=null?xi(D)._overflowWeekday=!0:(ut=EQ(K,ee,ge,Ue,ht),D._a[Ws]=ut.year,D._dayOfYear=ut.dayOfYear)}yn.ISO_8601=function(){};yn.RFC_2822=function(){};function KB(D){if(D._f===yn.ISO_8601){xQ(D);return}if(D._f===yn.RFC_2822){SQ(D);return}D._a=[],xi(D).empty=!0;var U=""+D._i,K,ee,ge,Ue,ht,ut=U.length,_t=0,Jt,ar;for(ge=AQ(D._f,D._locale).match(TB)||[],ar=ge.length,K=0;K0&&xi(D).unusedInput.push(ht),U=U.slice(U.indexOf(ee)+ee.length),_t+=ee.length),vg[Ue]?(ee?xi(D).empty=!1:xi(D).unusedTokens.push(Ue),W6(Ue,ee,D)):D._strict&&!ee&&xi(D).unusedTokens.push(Ue);xi(D).charsLeftOver=ut-_t,U.length>0&&xi(D).unusedInput.push(U),D._a[os]<=12&&xi(D).bigHour===!0&&D._a[os]>0&&(xi(D).bigHour=void 0),xi(D).parsedDateParts=D._a.slice(0),xi(D).meridiem=D._meridiem,D._a[os]=a7(D._locale,D._a[os],D._meridiem),Jt=xi(D).era,Jt!==null&&(D._a[Ws]=D._locale.erasConvertYear(Jt,D._a[Ws])),WB(D),qB(D)}function a7(D,U,K){var ee;return K==null?U:D.meridiemHour!=null?D.meridiemHour(U,K):(D.isPM!=null&&(ee=D.isPM(K),ee&&U<12&&(U+=12),!ee&&U===12&&(U=0)),U)}function o7(D){var U,K,ee,ge,Ue,ht,ut=!1,_t=D._f.length;if(_t===0){xi(D).invalidFormat=!0,D._d=new Date(NaN);return}for(ge=0;ge<_t;ge++)Ue=0,ht=!1,U=NB({},D),D._useUTC!=null&&(U._useUTC=D._useUTC),U._f=D._f[ge],KB(U),FB(U)&&(ht=!0),Ue+=xi(U).charsLeftOver,Ue+=xi(U).unusedTokens.length*10,xi(U).score=Ue,ut?Uethis?this:D:$I()});function RQ(D,U){var K,ee;if(U.length===1&&Wu(U[0])&&(U=U[0]),!U.length)return eo();for(K=U[0],ee=1;eethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function k7(){if(!xc(this._isDSTShifted))return this._isDSTShifted;var D={},U;return NB(D,this),D=_Q(D),D._a?(U=D._isUTC?Fl(D._a):eo(D._a),this._isDSTShifted=this.isValid()&&m7(D._a,U.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function x7(){return this.isValid()?!this._isUTC:!1}function S7(){return this.isValid()?this._isUTC:!1}function NQ(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _7=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,D7=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Vu(D,U){var K=D,ee=null,ge,Ue,ht;return HI(D)?K={ms:D._milliseconds,d:D._days,M:D._months}:BA(D)||!isNaN(+D)?(K={},U?K[U]=+D:K.milliseconds=+D):(ee=_7.exec(D))?(ge=ee[1]==="-"?-1:1,K={y:0,d:Gi(ee[Dl])*ge,h:Gi(ee[os])*ge,m:Gi(ee[qu])*ge,s:Gi(ee[bA])*ge,ms:Gi(BB(ee[Tf]*1e3))*ge}):(ee=D7.exec(D))?(ge=ee[1]==="-"?-1:1,K={y:Mf(ee[2],ge),M:Mf(ee[3],ge),w:Mf(ee[4],ge),d:Mf(ee[5],ge),h:Mf(ee[6],ge),m:Mf(ee[7],ge),s:Mf(ee[8],ge)}):K==null?K={}:typeof K=="object"&&("from"in K||"to"in K)&&(ht=R7(eo(K.from),eo(K.to)),K={},K.ms=ht.milliseconds,K.M=ht.months),Ue=new s2(K),HI(D)&&aa(D,"_locale")&&(Ue._locale=D._locale),HI(D)&&aa(D,"_isValid")&&(Ue._isValid=D._isValid),Ue}Vu.fn=s2.prototype;Vu.invalid=v7;function Mf(D,U){var K=D&&parseFloat(D.replace(",","."));return(isNaN(K)?0:K)*U}function V5(D,U){var K={};return K.months=U.month()-D.month()+(U.year()-D.year())*12,D.clone().add(K.months,"M").isAfter(U)&&--K.months,K.milliseconds=+U-+D.clone().add(K.months,"M"),K}function R7(D,U){var K;return D.isValid()&&U.isValid()?(U=VB(U,D),D.isBefore(U)?K=V5(D,U):(K=V5(U,D),K.milliseconds=-K.milliseconds,K.months=-K.months),K):{milliseconds:0,months:0}}function MQ(D,U){return function(K,ee){var ge,Ue;return ee!==null&&!isNaN(+ee)&&(lQ(U,"moment()."+U+"(period, number) is deprecated. Please use moment()."+U+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),Ue=K,K=ee,ee=Ue),ge=Vu(K,ee),TQ(this,ge,D),this}}function TQ(D,U,K,ee){var ge=U._milliseconds,Ue=BB(U._days),ht=BB(U._months);D.isValid()&&(ee=ee??!0,ht&&IQ(D,Zp(D,"Month")+ht*K),Ue&&vQ(D,"Date",Zp(D,"Date")+Ue*K),ge&&D._d.setTime(D._d.valueOf()+ge*K),ee&&yn.updateOffset(D,Ue||ht))}var F7=MQ(1,"add"),N7=MQ(-1,"subtract");function LQ(D){return typeof D=="string"||D instanceof String}function M7(D){return Ku(D)||a1(D)||LQ(D)||BA(D)||L7(D)||T7(D)||D===null||D===void 0}function T7(D){var U=Lf(D)&&!RB(D),K=!1,ee=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],ge,Ue,ht=ee.length;for(ge=0;geK.valueOf():K.valueOf()9999?jI(K,U?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Nl(Date.prototype.toISOString)?U?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",jI(K,"Z")):jI(K,U?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Z7(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var D="moment",U="",K,ee,ge,Ue;return this.isLocal()||(D=this.utcOffset()===0?"moment.utc":"moment.parseZone",U="Z"),K="["+D+'("]',ee=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",ge="-MM-DD[T]HH:mm:ss.SSS",Ue=U+'[")]',this.format(K+ee+ge+Ue)}function X7(D){D||(D=this.isUtc()?yn.defaultFormatUtc:yn.defaultFormat);var U=jI(this,D);return this.localeData().postformat(U)}function $7(D,U){return this.isValid()&&(Ku(D)&&D.isValid()||eo(D).isValid())?Vu({to:this,from:D}).locale(this.locale()).humanize(!U):this.localeData().invalidDate()}function ex(D){return this.from(eo(),D)}function tx(D,U){return this.isValid()&&(Ku(D)&&D.isValid()||eo(D).isValid())?Vu({from:this,to:D}).locale(this.locale()).humanize(!U):this.localeData().invalidDate()}function rx(D){return this.to(eo(),D)}function OQ(D){var U;return D===void 0?this._locale._abbr:(U=QA(D),U!=null&&(this._locale=U),this)}var PQ=bu("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(D){return D===void 0?this.localeData():this.locale(D)});function GQ(){return this._locale}var zI=1e3,mg=60*zI,VI=60*mg,UQ=(365*400+97)*24*VI;function yg(D,U){return(D%U+U)%U}function jQ(D,U,K){return D<100&&D>=0?new Date(D+400,U,K)-UQ:new Date(D,U,K).valueOf()}function HQ(D,U,K){return D<100&&D>=0?Date.UTC(D+400,U,K)-UQ:Date.UTC(D,U,K)}function nx(D){var U,K;if(D=Cu(D),D===void 0||D==="millisecond"||!this.isValid())return this;switch(K=this._isUTC?HQ:jQ,D){case"year":U=K(this.year(),0,1);break;case"quarter":U=K(this.year(),this.month()-this.month()%3,1);break;case"month":U=K(this.year(),this.month(),1);break;case"week":U=K(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":U=K(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":U=K(this.year(),this.month(),this.date());break;case"hour":U=this._d.valueOf(),U-=yg(U+(this._isUTC?0:this.utcOffset()*mg),VI);break;case"minute":U=this._d.valueOf(),U-=yg(U,mg);break;case"second":U=this._d.valueOf(),U-=yg(U,zI);break}return this._d.setTime(U),yn.updateOffset(this,!0),this}function ix(D){var U,K;if(D=Cu(D),D===void 0||D==="millisecond"||!this.isValid())return this;switch(K=this._isUTC?HQ:jQ,D){case"year":U=K(this.year()+1,0,1)-1;break;case"quarter":U=K(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":U=K(this.year(),this.month()+1,1)-1;break;case"week":U=K(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":U=K(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":U=K(this.year(),this.month(),this.date()+1)-1;break;case"hour":U=this._d.valueOf(),U+=VI-yg(U+(this._isUTC?0:this.utcOffset()*mg),VI)-1;break;case"minute":U=this._d.valueOf(),U+=mg-yg(U,mg)-1;break;case"second":U=this._d.valueOf(),U+=zI-yg(U,zI)-1;break}return this._d.setTime(U),yn.updateOffset(this,!0),this}function ax(){return this._d.valueOf()-(this._offset||0)*6e4}function ox(){return Math.floor(this.valueOf()/1e3)}function sx(){return new Date(this.valueOf())}function cx(){var D=this;return[D.year(),D.month(),D.date(),D.hour(),D.minute(),D.second(),D.millisecond()]}function ux(){var D=this;return{years:D.year(),months:D.month(),date:D.date(),hours:D.hours(),minutes:D.minutes(),seconds:D.seconds(),milliseconds:D.milliseconds()}}function lx(){return this.isValid()?this.toISOString():null}function Ax(){return FB(this)}function hx(){return kh({},xi(this))}function fx(){return xi(this).overflow}function dx(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}qn("N",0,0,"eraAbbr");qn("NN",0,0,"eraAbbr");qn("NNN",0,0,"eraAbbr");qn("NNNN",0,0,"eraName");qn("NNNNN",0,0,"eraNarrow");qn("y",["y",1],"yo","eraYear");qn("y",["yy",2],0,"eraYear");qn("y",["yyy",3],0,"eraYear");qn("y",["yyyy",4],0,"eraYear");Qn("N",ZB);Qn("NN",ZB);Qn("NNN",ZB);Qn("NNNN",Bx);Qn("NNNNN",Qx);Sa(["N","NN","NNN","NNNN","NNNNN"],function(D,U,K,ee){var ge=K._locale.erasParse(D,ee,K._strict);ge?xi(K).era=ge:xi(K).invalidEra=D});Qn("y",Cg);Qn("yy",Cg);Qn("yyy",Cg);Qn("yyyy",Cg);Qn("yo",kx);Sa(["y","yy","yyy","yyyy"],Ws);Sa(["yo"],function(D,U,K,ee){var ge;K._locale._eraYearOrdinalRegex&&(ge=D.match(K._locale._eraYearOrdinalRegex)),K._locale.eraYearOrdinalParse?U[Ws]=K._locale.eraYearOrdinalParse(D,ge):U[Ws]=parseInt(D,10)});function gx(D,U){var K,ee,ge,Ue=this._eras||QA("en")._eras;for(K=0,ee=Ue.length;K=0)return Ue[ee]}function vx(D,U){var K=D.since<=D.until?1:-1;return U===void 0?yn(D.since).year():yn(D.since).year()+(U-D.offset)*K}function mx(){var D,U,K,ee=this.localeData().eras();for(D=0,U=ee.length;DUe&&(U=Ue),Nx.call(this,D,U,K,ee,ge))}function Nx(D,U,K,ee,ge){var Ue=EQ(D,U,K,ee,ge),ht=Xp(Ue.year,0,Ue.dayOfYear);return this.year(ht.getUTCFullYear()),this.month(ht.getUTCMonth()),this.date(ht.getUTCDate()),this}qn("Q",0,"Qo","quarter");Qn("Q",hQ);Sa("Q",function(D,U){U[IA]=(Gi(D)-1)*3});function Mx(D){return D==null?Math.ceil((this.month()+1)/3):this.month((D-1)*3+this.month()%3)}qn("D",["DD",2],"Do","date");Qn("D",to,Eg);Qn("DD",to,Vc);Qn("Do",function(D,U){return D?U._dayOfMonthOrdinalParse||U._ordinalParse:U._dayOfMonthOrdinalParseLenient});Sa(["D","DD"],Dl);Sa("Do",function(D,U){U[Dl]=Gi(D.match(to)[0])});var JQ=wg("Date",!0);qn("DDD",["DDDD",3],"DDDo","dayOfYear");Qn("DDD",t2);Qn("DDDD",fQ);Sa(["DDD","DDDD"],function(D,U,K){K._dayOfYear=Gi(D)});function Tx(D){var U=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return D==null?U:this.add(D-U,"d")}qn("m",["mm",2],0,"minute");Qn("m",to,GB);Qn("mm",to,Vc);Sa(["m","mm"],qu);var Lx=wg("Minutes",!1);qn("s",["ss",2],0,"second");Qn("s",to,GB);Qn("ss",to,Vc);Sa(["s","ss"],bA);var Ox=wg("Seconds",!1);qn("S",0,0,function(){return~~(this.millisecond()/100)});qn(0,["SS",2],0,function(){return~~(this.millisecond()/10)});qn(0,["SSS",3],0,"millisecond");qn(0,["SSSS",4],0,function(){return this.millisecond()*10});qn(0,["SSSSS",5],0,function(){return this.millisecond()*100});qn(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});qn(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});qn(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});qn(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Qn("S",t2,hQ);Qn("SS",t2,Vc);Qn("SSS",t2,fQ);var xh,qQ;for(xh="SSSS";xh.length<=9;xh+="S")Qn(xh,Cg);function Px(D,U){U[Tf]=Gi(("0."+D)*1e3)}for(xh="S";xh.length<=9;xh+="S")Sa(xh,Px);qQ=wg("Milliseconds",!1);qn("z",0,0,"zoneAbbr");qn("zz",0,0,"zoneName");function Gx(){return this._isUTC?"UTC":""}function Ux(){return this._isUTC?"Coordinated Universal Time":""}var Hr=o1.prototype;Hr.add=F7;Hr.calendar=G7;Hr.clone=U7;Hr.diff=K7;Hr.endOf=ix;Hr.format=X7;Hr.from=$7;Hr.fromNow=ex;Hr.to=tx;Hr.toNow=rx;Hr.get=Z6;Hr.invalidAt=fx;Hr.isAfter=j7;Hr.isBefore=H7;Hr.isBetween=Y7;Hr.isSame=J7;Hr.isSameOrAfter=q7;Hr.isSameOrBefore=W7;Hr.isValid=Ax;Hr.lang=PQ;Hr.locale=OQ;Hr.localeData=GQ;Hr.max=A7;Hr.min=l7;Hr.parsingFlags=hx;Hr.set=X6;Hr.startOf=nx;Hr.subtract=N7;Hr.toArray=cx;Hr.toObject=ux;Hr.toDate=sx;Hr.toISOString=V7;Hr.inspect=Z7;typeof Symbol<"u"&&Symbol.for!=null&&(Hr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Hr.toJSON=lx;Hr.toString=z7;Hr.unix=ox;Hr.valueOf=ax;Hr.creationData=dx;Hr.eraName=mx;Hr.eraNarrow=yx;Hr.eraAbbr=Ix;Hr.eraYear=bx;Hr.year=pQ;Hr.isLeapYear=V6;Hr.weekYear=xx;Hr.isoWeekYear=Sx;Hr.quarter=Hr.quarters=Mx;Hr.month=bQ;Hr.daysInMonth=s8;Hr.week=Hr.weeks=g8;Hr.isoWeek=Hr.isoWeeks=p8;Hr.weeksInYear=Rx;Hr.weeksInWeekYear=Fx;Hr.isoWeeksInYear=_x;Hr.isoWeeksInISOWeekYear=Dx;Hr.date=JQ;Hr.day=Hr.days=S8;Hr.weekday=_8;Hr.isoWeekday=D8;Hr.dayOfYear=Tx;Hr.hour=Hr.hours=O8;Hr.minute=Hr.minutes=Lx;Hr.second=Hr.seconds=Ox;Hr.millisecond=Hr.milliseconds=qQ;Hr.utcOffset=I7;Hr.utc=C7;Hr.local=E7;Hr.parseZone=w7;Hr.hasAlignedHourOffset=B7;Hr.isDST=Q7;Hr.isLocal=x7;Hr.isUtcOffset=S7;Hr.isUtc=NQ;Hr.isUTC=NQ;Hr.zoneAbbr=Gx;Hr.zoneName=Ux;Hr.dates=bu("dates accessor is deprecated. Use date instead.",JQ);Hr.months=bu("months accessor is deprecated. Use month instead",bQ);Hr.years=bu("years accessor is deprecated. Use year instead",pQ);Hr.zone=bu("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",b7);Hr.isDSTShifted=bu("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",k7);function jx(D){return eo(D*1e3)}function Hx(){return eo.apply(null,arguments).parseZone()}function WQ(D){return D}var oa=MB.prototype;oa.calendar=x6;oa.longDateFormat=R6;oa.invalidDate=N6;oa.ordinal=L6;oa.preparse=WQ;oa.postformat=WQ;oa.relativeTime=P6;oa.pastFuture=G6;oa.set=Q6;oa.eras=gx;oa.erasParse=px;oa.erasConvertYear=vx;oa.erasAbbrRegex=Ex;oa.erasNameRegex=Cx;oa.erasNarrowRegex=wx;oa.months=n8;oa.monthsShort=i8;oa.monthsParse=o8;oa.monthsRegex=u8;oa.monthsShortRegex=c8;oa.week=A8;oa.firstDayOfYear=d8;oa.firstDayOfWeek=f8;oa.weekdays=w8;oa.weekdaysMin=Q8;oa.weekdaysShort=B8;oa.weekdaysParse=x8;oa.weekdaysRegex=R8;oa.weekdaysShortRegex=F8;oa.weekdaysMinRegex=N8;oa.isPM=T8;oa.meridiem=P8;function ZI(D,U,K,ee){var ge=QA(),Ue=Fl().set(ee,U);return ge[K](Ue,D)}function KQ(D,U,K){if(BA(D)&&(U=D,D=void 0),D=D||"",U!=null)return ZI(D,U,K,"month");var ee,ge=[];for(ee=0;ee<12;ee++)ge[ee]=ZI(D,ee,K,"month");return ge}function $B(D,U,K,ee){typeof D=="boolean"?(BA(U)&&(K=U,U=void 0),U=U||""):(U=D,K=U,D=!1,BA(U)&&(K=U,U=void 0),U=U||"");var ge=QA(),Ue=D?ge._week.dow:0,ht,ut=[];if(K!=null)return ZI(U,(K+Ue)%7,ee,"day");for(ht=0;ht<7;ht++)ut[ht]=ZI(U,(ht+Ue)%7,ee,"day");return ut}function Yx(D,U){return KQ(D,U,"months")}function Jx(D,U){return KQ(D,U,"monthsShort")}function qx(D,U,K){return $B(D,U,K,"weekdays")}function Wx(D,U,K){return $B(D,U,K,"weekdaysShort")}function Kx(D,U,K){return $B(D,U,K,"weekdaysMin")}Sh("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(D){var U=D%10,K=Gi(D%100/10)===1?"th":U===1?"st":U===2?"nd":U===3?"rd":"th";return D+K}});yn.lang=bu("moment.lang is deprecated. Use moment.locale instead.",Sh);yn.langData=bu("moment.langData is deprecated. Use moment.localeData instead.",QA);var mA=Math.abs;function zx(){var D=this._data;return this._milliseconds=mA(this._milliseconds),this._days=mA(this._days),this._months=mA(this._months),D.milliseconds=mA(D.milliseconds),D.seconds=mA(D.seconds),D.minutes=mA(D.minutes),D.hours=mA(D.hours),D.months=mA(D.months),D.years=mA(D.years),this}function zQ(D,U,K,ee){var ge=Vu(U,K);return D._milliseconds+=ee*ge._milliseconds,D._days+=ee*ge._days,D._months+=ee*ge._months,D._bubble()}function Vx(D,U){return zQ(this,D,U,1)}function Zx(D,U){return zQ(this,D,U,-1)}function Z5(D){return D<0?Math.floor(D):Math.ceil(D)}function Xx(){var D=this._milliseconds,U=this._days,K=this._months,ee=this._data,ge,Ue,ht,ut,_t;return D>=0&&U>=0&&K>=0||D<=0&&U<=0&&K<=0||(D+=Z5(kB(K)+U)*864e5,U=0,K=0),ee.milliseconds=D%1e3,ge=yu(D/1e3),ee.seconds=ge%60,Ue=yu(ge/60),ee.minutes=Ue%60,ht=yu(Ue/60),ee.hours=ht%24,U+=yu(ht/24),_t=yu(VQ(U)),K+=_t,U-=Z5(kB(_t)),ut=yu(K/12),K%=12,ee.days=U,ee.months=K,ee.years=ut,this}function VQ(D){return D*4800/146097}function kB(D){return D*146097/4800}function $x(D){if(!this.isValid())return NaN;var U,K,ee=this._milliseconds;if(D=Cu(D),D==="month"||D==="quarter"||D==="year")switch(U=this._days+ee/864e5,K=this._months+VQ(U),D){case"month":return K;case"quarter":return K/3;case"year":return K/12}else switch(U=this._days+Math.round(kB(this._months)),D){case"week":return U/7+ee/6048e5;case"day":return U+ee/864e5;case"hour":return U*24+ee/36e5;case"minute":return U*1440+ee/6e4;case"second":return U*86400+ee/1e3;case"millisecond":return Math.floor(U*864e5)+ee;default:throw new Error("Unknown unit "+D)}}function kA(D){return function(){return this.as(D)}}var ZQ=kA("ms"),eS=kA("s"),tS=kA("m"),rS=kA("h"),nS=kA("d"),iS=kA("w"),aS=kA("M"),oS=kA("Q"),sS=kA("y"),cS=ZQ;function uS(){return Vu(this)}function lS(D){return D=Cu(D),this.isValid()?this[D+"s"]():NaN}function Pf(D){return function(){return this.isValid()?this._data[D]:NaN}}var AS=Pf("milliseconds"),hS=Pf("seconds"),fS=Pf("minutes"),dS=Pf("hours"),gS=Pf("days"),pS=Pf("months"),vS=Pf("years");function mS(){return yu(this.days()/7)}var yA=Math.round,gg={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function yS(D,U,K,ee,ge){return ge.relativeTime(U||1,!!K,D,ee)}function IS(D,U,K,ee){var ge=Vu(D).abs(),Ue=yA(ge.as("s")),ht=yA(ge.as("m")),ut=yA(ge.as("h")),_t=yA(ge.as("d")),Jt=yA(ge.as("M")),ar=yA(ge.as("w")),Tt=yA(ge.as("y")),Fe=Ue<=K.ss&&["s",Ue]||Ue0,Fe[4]=ee,yS.apply(null,Fe)}function bS(D){return D===void 0?yA:typeof D=="function"?(yA=D,!0):!1}function CS(D,U){return gg[D]===void 0?!1:U===void 0?gg[D]:(gg[D]=U,D==="s"&&(gg.ss=U-1),!0)}function ES(D,U){if(!this.isValid())return this.localeData().invalidDate();var K=!1,ee=gg,ge,Ue;return typeof D=="object"&&(U=D,D=!1),typeof D=="boolean"&&(K=D),typeof U=="object"&&(ee=Object.assign({},gg,U),U.s!=null&&U.ss==null&&(ee.ss=U.s-1)),ge=this.localeData(),Ue=IS(this,!K,ee,ge),K&&(Ue=ge.pastFuture(+this,Ue)),ge.postformat(Ue)}var mB=Math.abs;function fg(D){return(D>0)-(D<0)||+D}function u2(){if(!this.isValid())return this.localeData().invalidDate();var D=mB(this._milliseconds)/1e3,U=mB(this._days),K=mB(this._months),ee,ge,Ue,ht,ut=this.asSeconds(),_t,Jt,ar,Tt;return ut?(ee=yu(D/60),ge=yu(ee/60),D%=60,ee%=60,Ue=yu(K/12),K%=12,ht=D?D.toFixed(3).replace(/\.?0+$/,""):"",_t=ut<0?"-":"",Jt=fg(this._months)!==fg(ut)?"-":"",ar=fg(this._days)!==fg(ut)?"-":"",Tt=fg(this._milliseconds)!==fg(ut)?"-":"",_t+"P"+(Ue?Jt+Ue+"Y":"")+(K?Jt+K+"M":"")+(U?ar+U+"D":"")+(ge||ee||D?"T":"")+(ge?Tt+ge+"H":"")+(ee?Tt+ee+"M":"")+(D?Tt+ht+"S":"")):"P0D"}var zi=s2.prototype;zi.isValid=p7;zi.abs=zx;zi.add=Vx;zi.subtract=Zx;zi.as=$x;zi.asMilliseconds=ZQ;zi.asSeconds=eS;zi.asMinutes=tS;zi.asHours=rS;zi.asDays=nS;zi.asWeeks=iS;zi.asMonths=aS;zi.asQuarters=oS;zi.asYears=sS;zi.valueOf=cS;zi._bubble=Xx;zi.clone=uS;zi.get=lS;zi.milliseconds=AS;zi.seconds=hS;zi.minutes=fS;zi.hours=dS;zi.days=gS;zi.weeks=mS;zi.months=pS;zi.years=vS;zi.humanize=ES;zi.toISOString=u2;zi.toString=u2;zi.toJSON=u2;zi.locale=OQ;zi.localeData=GQ;zi.toIsoString=bu("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",u2);zi.lang=PQ;qn("X",0,0,"unix");qn("x",0,0,"valueOf");Qn("x",n2);Qn("X",Y6);Sa("X",function(D,U,K){K._d=new Date(parseFloat(D)*1e3)});Sa("x",function(D,U,K){K._d=new Date(Gi(D))});//! moment.js yn.version="2.30.1";w6(eo);yn.fn=Hr;yn.min=h7;yn.max=f7;yn.now=d7;yn.utc=Fl;yn.unix=jx;yn.months=Yx;yn.isDate=a1;yn.locale=Sh;yn.invalid=$I;yn.duration=Vu;yn.isMoment=Ku;yn.weekdays=qx;yn.parseZone=Hx;yn.localeData=QA;yn.isDuration=HI;yn.monthsShort=Jx;yn.weekdaysMin=Kx;yn.defineLocale=JB;yn.updateLocale=H8;yn.locales=Y8;yn.weekdaysShort=Wx;yn.normalizeUnits=Cu;yn.relativeTimeRounding=bS;yn.relativeTimeThreshold=CS;yn.calendarFormat=P7;yn.prototype=Hr;yn.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const wS={class:"layoutHisCenter"},BS={class:"search"},QS={class:"historyCenter"},kS=["onClick","onMouseenter","onMouseleave"],xS={class:"text"},SS=["src"],_S={class:"time"},DS=Of({__name:"historySession",emits:["querySessionDetail","changeAgentType"],setup(D,{emit:U}){const K=U,ee=Zt([]);Zt(""),Zt([]),Ta({}),Ta({}),Zt([]);const ge=Zt("");Zt(""),Zt({});const Ue=Zt(null),ht=localStorage.getItem("httpUrl"),ut=Zt(_B);let _t=Zt(0),Jt=Ta({page:1,page_size:50});Zt(0);let ar=Zt([]),Tt=Zt(!0);const Fe=async Oe=>{const{code:Et,data:qt}=await J5({dialog_id:Oe,searchParam:ge.value,...Jt});Et===200?(ee.value=qt.map(nr=>({...nr,showtype:1})),Tt.value=!1,setTimeout(()=>{Tt.value=!0},100)):ys.warning("查询失败")},yr=async Oe=>{Kk.confirm({title:"提示信息",content:"确认删除吗",okText:"确定",cancelText:"取消",hideTitle:!0,onOk:async()=>{const{code:Et}=await x9([Oe.id]);Et===200&&(ys.success("删除成功"),Fe(""))},onCancel:()=>{}})},Le=async Oe=>{console.log(Oe,"session"),Oe.base?Oe.base=="agent"?(ia.emit("queryAgentSessionDetail",Oe),K("changeAgentType","2")):Oe.base=="advanced-agent"&&(ia.emit("queryAgentSessionDetails",Oe),K("changeAgentType","5")):(K("changeAgentType","1"),K("querySessionDetail",Oe))},sr=Oe=>{Oe.showtype=2},Ir=Oe=>{Oe.showtype=1},hn=async Oe=>{_t.value=Oe.target.scrollTop;let Et=Oe.target.offsetHeight,qt=Oe.target.scrollHeight;if(_t.value+Et>=qt-1){console.log(_t.value),Jt.page++;const{code:nr,data:Nr}=await J5({dialog_id:"",...Jt});if(nr===200){if(Nr.length==0){Tt.value=!0;return}ar.value=Nr.map(zt=>({...zt,showtype:1})),ee.value=[...ee.value,...ar.value],Tt.value=!1,setTimeout(()=>{Tt.value=!0,XI(()=>{Ue.value.scrollTop(_t.value)})},100)}else ys.warning("查询失败")}};return t1(()=>{Fe("")}),_h(()=>(console.log(ht,"当前地址"),ia.on("history",()=>{K("changeAgentType","3"),Jt.page=1,Fe("")}),Ue.value.$el.addEventListener("scroll",hn),()=>{Ue.value.$el.removeEventListener("scroll",hn)})),bg(()=>{ia.off("history")}),(Oe,Et)=>{const qt=vn("a-button"),nr=vn("a-input-search"),Nr=vn("icon-delete"),zt=vn("a-scrollbar");return zr(),Fn("div",wS,[Qr(qt,{type:"primary",status:"danger",style:{position:"absolute",top:"10px",left:"-40px","font-size":"30px","z-index":"99",cursor:"pointer"},onClick:Et[0]||(Et[0]=Cr=>K("changeAgentType","1"))},{icon:Fr(()=>[Qr(Ti(Wk),{style:{"font-size":"20px"}})]),_:1}),Ti(Tt)?(zr(),Ma(zt,{key:0,ref_key:"scrollRef",ref:Ue,class:"left-list",style:{height:"calc(100vh - 160px)","overflow-y":"scroll","overflow-x":"hidden"},onScroll:hn},{default:Fr(()=>[Et[3]||(Et[3]=or("div",{class:"historyTitle___F_iam"},"历史会话",-1)),or("div",BS,[Qr(nr,{onChange:Et[1]||(Et[1]=Cr=>Fe("")),modelValue:ge.value,"onUpdate:modelValue":Et[2]||(Et[2]=Cr=>ge.value=Cr),class:"search-box",placeholder:"按下Enter键,搜索会话名称"},null,8,["modelValue"])]),or("div",QS,[(zr(!0),Fn(_s,null,lc(ee.value,Cr=>(zr(),Fn("div",{class:"item historyCenter-box",onClick:Wr=>Le(Cr),onMouseenter:Wr=>sr(Cr),onMouseleave:Wr=>Ir(Cr)},[or("div",xS,[or("img",{style:{width:"16px"},alt:"dessert",src:Cr.icon?Ti(ht)+Cr.icon:ut.value},null,8,SS),Ya(" "+xa(Cr.name),1)]),or("div",_S,[wh(or("span",{style:{"font-size":"14px"}},xa(Ti(yn)(new Date(Cr.create_time)).format("YYYY-MM-DD HH:mm:ss")),513),[[Bh,Cr.showtype==1]])]),wh(Qr(qt,{type:"text",onClick:r1(Wr=>yr(Cr),["stop"]),style:{color:"red",position:"absolute",right:"10px",top:"10px"}},{default:Fr(()=>[Qr(Nr,{style:{"font-size":"14px"}})]),_:2},1032,["onClick"]),[[Bh,Cr.showtype==2]])],40,kS))),256))])]),_:1},512)):Ca("",!0)])}}});const RS=zu(DS,[["__scopeId","data-v-de6f0f71"]]),FS="/assets/his-9150ac4f.png",NS={class:"layoutAgentCenter"},MS={class:"agentMainCenter"},TS=["onClick"],LS={class:"text"},OS=["src"],PS={style:{"margin-left":"10px","font-weight":"500",color:"var(--color-text-1)"}},GS=["onClick"],US={class:"text"},jS=["src"],HS={style:{"margin-left":"10px","font-weight":"500",color:"var(--color-text-1)"}},YS=["onClick"],JS={class:"text"},qS=["src"],WS={style:{"margin-left":"10px","font-weight":"500",color:"var(--color-text-1)"}},KS=Of({__name:"smartAi",emits:["querySessionDetail","changeAgentType","createSession"],setup(D,{emit:U}){const K=U;Zt([]),Zt("");const ee=Zt([]);Ta({}),Ta({});const ge=Zt([]),Ue=Zt([]);Zt("");const ht=Zt("");Zt({});const ut=Zt(_B),_t=async()=>{const{code:Fe,data:yr}=await S9();Fe===200&&(yr==null?void 0:yr.length)>0&&(ht.value=yr[0].id,ee.value=yr.map(Le=>({...Le,type:1})))},Jt=async(Fe={})=>{try{const{data:yr}=await Xk(Fe);ge.value=yr.map(Le=>({...Le,name:Le.title,type:2}))}catch{}finally{}},ar=async()=>{const{code:Fe,data:yr}=await R9();Fe===200&&(Ue.value=yr)},Tt=async Fe=>{console.log(Fe,"session"),Fe.app_type=="3"?(ia.emit("createSeniorAgent",Fe),K("changeAgentType","5")):Fe.type=="1"?(K("createSession",Fe.id,`和${Fe.name}的会话`),K("changeAgentType","1")):(ia.emit("createAgent",Fe),K("changeAgentType","2"))};return t1(()=>{_t(),Jt(),ar()}),_h(()=>{ia.on("smartAi",()=>{K("changeAgentType","4"),_t(),Jt(),ar()})}),bg(()=>{ia.off("smartAi")}),(Fe,yr)=>{const Le=vn("a-avatar"),sr=vn("a-col"),Ir=vn("a-row"),hn=vn("a-scrollbar");return zr(),Fn("div",NS,[Qr(hn,{style:{height:"calc(100vh - 100px)","overflow-y":"auto","overflow-x":"hidden"}},{default:Fr(()=>[yr[3]||(yr[3]=or("div",{class:"search"},[or("img",{src:FS,style:{width:"100%"},alt:""})],-1)),or("div",MS,[Qr(Ir,{class:"agentCenter"},{default:Fr(()=>[(zr(!0),Fn(_s,null,lc(ee.value,Oe=>(zr(),Ma(sr,{span:8},{default:Fr(()=>[or("div",{class:"item agentCenter-box",onClick:Et=>Tt(Oe)},[or("div",LS,[Qr(Le,null,{default:Fr(()=>[or("img",{style:{width:"100%"},alt:"dessert",src:Oe.icon||ut.value},null,8,OS)]),_:2},1024),or("span",PS,xa(Oe.name),1)]),yr[0]||(yr[0]=or("div",{class:"time"},null,-1))],8,TS)]),_:2},1024))),256)),(zr(!0),Fn(_s,null,lc(ge.value,Oe=>(zr(),Ma(sr,{span:8},{default:Fr(()=>[or("div",{class:"item agentCenter-box",onClick:Et=>Tt(Oe)},[or("div",US,[Qr(Le,null,{default:Fr(()=>[or("img",{style:{width:"100%"},alt:"dessert",src:Oe.avatar||ut.value},null,8,jS)]),_:2},1024),or("span",HS,xa(Oe.name),1)]),yr[1]||(yr[1]=or("div",{class:"time"},null,-1))],8,GS)]),_:2},1024))),256)),(zr(!0),Fn(_s,null,lc(Ue.value,Oe=>(zr(),Ma(sr,{span:8},{default:Fr(()=>[or("div",{class:"item agentCenter-box",onClick:Et=>Tt(Oe)},[or("div",JS,[Qr(Le,null,{default:Fr(()=>[or("img",{style:{width:"100%"},alt:"dessert",src:Oe.icon||ut.value},null,8,qS)]),_:2},1024),or("span",WS,xa(Oe.name),1)]),yr[2]||(yr[2]=or("div",{class:"time"},null,-1))],8,YS)]),_:2},1024))),256))]),_:1})])]),_:1})])}}});const zS=zu(KS,[["__scopeId","data-v-9601f146"]]),VS={style:{display:"flex","justify-content":"space-between"}},ZS={style:{width:"100%","margin-top":"10px","justify-content":"space-between","text-align":"right"},class:"upload-wrap"},XS=Of({__name:"updataFile",props:["sessionId","hide"],emits:["selectFileCallback"],setup(D,{expose:U,emit:K}){const ee=Zt(!1);Zt(!1),Zt(!1),Zt(!1),Zt(null);const ge=Zt(!1),Ue=Zt("");Zt(!1);const ht=Zt([]),ut=Zt("");Ta({asr_id:"paraformer-realtime-8k-v1",embd_id:"BAAI/bge-large-zh-v1.5",img2txt_id:"qwen-vl-max",llm_id:"qwen-plus",name:"wanghaos Kingdom",parser_ids:"naive:通用,qa:Q&A,resume:简历,manual:说明书,table:表格,paper:多模态,book:书籍,laws:法律文件,presentation:PPT,picture:图片,one:整体",rerank_id:"BAAI/bge-reranker-v2-m3",role:"owner",tenant_id:"948fc6fa41ab11ef8fb80242ac120004",parser_idObj:{}});const _t=Ta({naive:{chunk_token_num:676,layout_recognize:!0,raptor:{use_raptor:!0,prompt:`请总结以下段落。 小心数字,不要编造。 段落如下: {cluster_content} 以上就是你需要总结的内容。`,max_token:600,threshold:.32,max_cluster:233,random_seed:1500}},qa:{entity_types:["organization","person","location","event","time"],raptor:{use_raptor:!1}},resume:{},manual:{},table:{},paper:{},book:{},laws:{},presentation:{},picture:{},one:{}}),Jt=Zt(["通用","多模态"]),ar=Zt([{name:"通用",value:"naive",parser_config:_t.naive,parser_config_str:"支持的文件格式为DOCX、EXCEL、PPT、IMAGE、PDF、TXT"},{name:"Q&A",value:"qa",parser_config:_t.qa,parser_config_str:`支持 excel 和 csv/txt 文件格式。 如果文件以 excel 格式,则应由两个列组成 没有标题:一个提出问题,另一个用于答案, 答案列之前的问题列。 如果文件以 csv/txt 格式为 用作分开问题和答案的定界符。 `},{name:"简历",value:"resume",parser_config:_t.resume,parser_config_str:"支持的文件格式为DOCX、PDF、TXT"},{name:"说明书",value:"manual",parser_config:_t.manual,parser_config_str:"仅支持PDF"},{name:"表格",value:"table",parser_config:_t.table,parser_config_str:`支持EXCEL和CSV/TXT格式文。 对于 csv 或 txt 文件,列之间的分隔符为 TAB, 第一行必须是列标题。 `},{name:"多模态",value:"paper",parser_config:_t.paper,parser_config_str:"仅支持PDF文件"},{name:"书籍",value:"book",parser_config:_t.book,parser_config_str:"支持的文件格式为DOCX、PDF、TXT"},{name:"法律文件",value:"laws",parser_config:_t.laws,parser_config_str:"支持的文件格式为DOCX、PDF、TXT"},{name:"PPT",value:"presentation",parser_config:_t.presentation,parser_config_str:"支持的文件格式为PDF、PPTX"},{name:"图片",value:"picture",parser_config:_t.picture,parser_config_str:"支持图像文件"},{name:"整体",value:"one",parser_config:_t.one,parser_config_str:"支持的文件格式为DOCX、EXCEL、PDF、TXT"}]),Tt=Zt([]);Zt([]);const Fe=D,yr=K,Le=Zt(),sr=Zt([]);wA(()=>".word, .pdf, .ppt, .excel, .txt, .zip, .rar, .7z, .doc, .docx, .xls, .xlsx, .pptx, .ppt, .pdf, .mp4, .avi, .mp3,.wav, .wma, .wmv, .rm,"),wA(()=>{const zt=ar.value.filter(Cr=>Jt.value.includes(Cr.name)).reverse().slice(0,4).reverse();return zt.unshift({name:"智能识别",value:"",parser_config_str:"",parser_config:""}),zt});const Ir=()=>{Nr()},hn=zt=>{sr.value=zt,sr.value.forEach(Cr=>{})},Oe=zt=>{zt.stopPropagation(),ee.value=!ee.value},Et=zt=>{const Cr=Zt("");Cr.value=zt.split(".").pop();let Wr="";return Tt.value.forEach(un=>{un.formats.includes(Cr.value)&&(Wr=un.id)}),Wr},qt=async()=>{var Cr,Wr;if(!ut.value){const un=await Qh({dialog_id:"",conversation_desc:""});if(un.code==200){ut.value=(Cr=un.data)==null?void 0:Cr.conversation_id;const{code:Ui,data:Ea}=await pg((Wr=un.data)==null?void 0:Wr.conversation_id);Ui===200&&console.log(Ea,"新建会话详情")}else ys.error("创建会话失败,请重试")}if(console.log(sr.value,"files"),console.log(ar.value,"解析方法"),sr.value.length==0){ys.warning("请选择文件");return}ht.value=sr.value.map((un,Ui)=>({index:Ui,name:un.name,size:(un.file.size/1024).toFixed(2)+"K"})),ge.value=!0;const zt=new FormData;for(let un=0;un{ge.value=!1,un.code==0?(ys.success("上传成功"),nr(),yr("selectFileCallback",ht.value,ut.value)):ys.error("上传失败")})},nr=()=>{ge.value||(ee.value=!1,Ue.value="")};U({cancel:nr});const Nr=async()=>{let zt=await D9();ar.value=zt.data.map(Cr=>(console.log(Cr,Cr.parser_config_str,78787),{name:Cr.name,value:Cr.id,parser_config:"",parser_config_str:JSON.stringify(Cr.formats)})),Tt.value=zt.data};return t1(()=>{Ir()}),_h(()=>{}),i1(()=>[Fe.sessionId,Fe.hide],([zt,Cr])=>{ee.value!=Cr&&(ee.value=!1),ut.value!=zt&&(ut.value=zt)}),(zt,Cr)=>{const Wr=vn("icon-attachment"),un=vn("a-button"),Ui=vn("icon-upload"),Ea=vn("a-upload"),Po=vn("a-popover");return zr(),Ma(Po,{"popup-visible":ee.value,title:"",trigger:"click",position:"tl"},{title:Fr(()=>[or("div",VS,[Cr[0]||(Cr[0]=or("div",null,"上传文件",-1)),or("div",null,[Qr(Ui)])])]),content:Fr(()=>[Qr(Ea,{draggable:"",action:"/",style:{width:"100%"},"auto-upload":!1,ref_key:"uploadRef",ref:Le,onChange:hn,"show-retry-button":!1,multiple:"",limit:1},null,512),or("div",ZS,[Qr(un,{loading:ge.value,onClick:qt,type:"primary",size:"mini",style:{"border-radius":"24px"}},{default:Fr(()=>Cr[1]||(Cr[1]=[or("span",{style:{"font-size":"12px"}}," 上传 ",-1)])),_:1},8,["loading"])])]),default:Fr(()=>[Qr(un,{type:"text",style:{"border-radius":"24px"},onClick:Oe},{default:Fr(()=>[Qr(Wr,{size:"28",style:{color:"#0960bd"}})]),_:1})]),_:1},8,["popup-visible"])}}});const $S=zu(XS,[["__scopeId","data-v-7bf09a66"]]),yB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA0JJREFUWEfFl0FME0EUhv83S4kXvRCkJZqIQUhoF03Agxej4apHuBBvKjdgi4nRi3rRmEiXchO9GS5w1CvRePGgJMq2JKAREw1dIFz0YoCdMbPdbbel290tQTYhLZ2Z97755703bwlH/FBU/73T26cE37kkLCSJsR65XnC+TAryxJo/LI22/IpiMxSAml3vg8WGQbgMoC/AwSIE3kPhs8ZY+2IQTF2A5PR2D7N2xwDcDjLkMz7DlVg2P9qy7LfeF8BxPgcgWV4sVonYay74G4U3rf/dQ0GOHWtCwmJ77YzYNSH4dYC6PA7zXIkN+UHUBKjhXEo5Y2jxmTBKqLopFZN/7nH5QuwD2O+c5g2tbSiM4+o5qr4xB4hB5/eaEBUA1c4FF49yE4mHjTh316QmCw+J0QM/iAoAVTefuwFHwJMlLX7/IM7dtb26+VgA95z/5VGOuGMlADvVOPvkDCwaWrw/yLncnZwTRiVVN6XtYkww3u+maAkgpZtTBMiUk89IUMBVAHsM+kE7gSkVhgCyOS0+Lr+XFdBNA0AKAmtGOn42cPd64QqB3hYNiqs5LfEuaI2aMb+D0CFFM7S4WgK4oBfOWKA1h+5lTovfCjKWagAgpZsvCLgpbSsQHZ+1xA9bAXWqMAhBsuiE3k1jAGXVQGLIGE/M2wDeVGFc6f4y0bp6GAqcn9zq4sxasTfqpHhRAU/B2NlRTqzcbf1zGADdT7eONzdbv4u2iwWuYYBkZrOTEf8qTXHBzuXTJ78FQfsCNHIE0pmsnPKz3m3nhfI/ggaC0AbIbHbaACF2b8eaJ3MqgtDucqzdn/bJEE0ujbfdCZLTuTfy9hEosWQYFXqnNp4JISZsP0rstOyevIXIKZVi1dAS3YEADcSAqhdWnF6hVOrLABkzA4LmOA4sxVFjwFuKIaAb6Xi6VAntVGzgMgpSyTseeBkV60H5OnbzNIoTv7lVjUnt69iVlFm7pT7wvzcktSAO0phUNSLBLZkr4ZE2pXUg5FW5JggLgJit1ZYDNEwCA86d75qK3pZXQRzNi0lFCmXX+wRnNwgYsLum+k9OAAvE+KsDv5rV8mN3T4SLtV5OFYGPssuJkrqhXk6jGIw69x/vV/QwkIuH4AAAAABJRU5ErkJggg==";var XQ={exports:{}};const e3=$5(zk),t3=$5(Vk);(function(D,U){(function(K,ee){D.exports=ee(e3,t3)})(Iu,function(K,ee){var ge=Object.defineProperty,Ue=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,ar=(Ie,P,L)=>P in Ie?ge(Ie,P,{enumerable:!0,configurable:!0,writable:!0,value:L}):Ie[P]=L,Tt=(Ie,P)=>{for(var L in P||(P={}))_t.call(P,L)&&ar(Ie,L,P[L]);if(ut)for(var L of ut(P))Jt.call(P,L)&&ar(Ie,L,P[L]);return Ie},Fe=(Ie,P)=>Ue(Ie,ht(P)),yr=(Ie,P,L)=>new Promise((V,ne)=>{var fe=je=>{try{Qe(L.next(je))}catch(rt){ne(rt)}},we=je=>{try{Qe(L.throw(je))}catch(rt){ne(rt)}},Qe=je=>je.done?V(je.value):Promise.resolve(je.value).then(fe,we);Qe((L=L.apply(Ie,P)).next())});typeof window.setImmediate>"u"&&(window.setImmediate=function(Ie,...P){setTimeout(()=>Ie(P))});var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Iu<"u"?Iu:typeof self<"u"?self:{};function sr(Ie){return Ie&&Ie.__esModule&&Object.prototype.hasOwnProperty.call(Ie,"default")?Ie.default:Ie}function Ir(Ie){throw new Error('Could not dynamically require "'+Ie+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var hn={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */(function(Ie,P){(function(L){Ie.exports=L()})(function(){return function L(V,ne,fe){function we(rt,gt){if(!ne[rt]){if(!V[rt]){var vt=typeof Ir=="function"&&Ir;if(!gt&&vt)return vt(rt,!0);if(Qe)return Qe(rt,!0);var mt=new Error("Cannot find module '"+rt+"'");throw mt.code="MODULE_NOT_FOUND",mt}var We=ne[rt]={exports:{}};V[rt][0].call(We.exports,function(ct){var He=V[rt][1][ct];return we(He||ct)},We,We.exports,L,V,ne,fe)}return ne[rt].exports}for(var Qe=typeof Ir=="function"&&Ir,je=0;je>2,We=(3&rt)<<4|gt>>4,ct=1>6:64,He=2>4,gt=(15&mt)<<4|(We=Qe.indexOf(je.charAt(He++)))>>2,vt=(3&We)<<6|(ct=Qe.indexOf(je.charAt(He++))),lt[it++]=rt,We!==64&&(lt[it++]=gt),ct!==64&&(lt[it++]=vt);return lt}},{"./support":30,"./utils":32}],2:[function(L,V,ne){var fe=L("./external"),we=L("./stream/DataWorker"),Qe=L("./stream/Crc32Probe"),je=L("./stream/DataLengthProbe");function rt(gt,vt,mt,We,ct){this.compressedSize=gt,this.uncompressedSize=vt,this.crc32=mt,this.compression=We,this.compressedContent=ct}rt.prototype={getContentWorker:function(){var gt=new we(fe.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new je("data_length")),vt=this;return gt.on("end",function(){if(this.streamInfo.data_length!==vt.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),gt},getCompressedWorker:function(){return new we(fe.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},rt.createWorkerFrom=function(gt,vt,mt){return gt.pipe(new Qe).pipe(new je("uncompressedSize")).pipe(vt.compressWorker(mt)).pipe(new je("compressedSize")).withStreamInfo("compression",vt)},V.exports=rt},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(L,V,ne){var fe=L("./stream/GenericWorker");ne.STORE={magic:"\0\0",compressWorker:function(){return new fe("STORE compression")},uncompressWorker:function(){return new fe("STORE decompression")}},ne.DEFLATE=L("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(L,V,ne){var fe=L("./utils"),we=function(){for(var Qe,je=[],rt=0;rt<256;rt++){Qe=rt;for(var gt=0;gt<8;gt++)Qe=1&Qe?3988292384^Qe>>>1:Qe>>>1;je[rt]=Qe}return je}();V.exports=function(Qe,je){return Qe!==void 0&&Qe.length?fe.getTypeOf(Qe)!=="string"?function(rt,gt,vt,mt){var We=we,ct=mt+vt;rt^=-1;for(var He=mt;He>>8^We[255&(rt^gt[He])];return-1^rt}(0|je,Qe,Qe.length,0):function(rt,gt,vt,mt){var We=we,ct=mt+vt;rt^=-1;for(var He=mt;He>>8^We[255&(rt^gt.charCodeAt(He))];return-1^rt}(0|je,Qe,Qe.length,0):0}},{"./utils":32}],5:[function(L,V,ne){ne.base64=!1,ne.binary=!1,ne.dir=!1,ne.createFolders=!0,ne.date=null,ne.compression=null,ne.compressionOptions=null,ne.comment=null,ne.unixPermissions=null,ne.dosPermissions=null},{}],6:[function(L,V,ne){var fe=null;fe=typeof Promise<"u"?Promise:L("lie"),V.exports={Promise:fe}},{lie:37}],7:[function(L,V,ne){var fe=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",we=L("pako"),Qe=L("./utils"),je=L("./stream/GenericWorker"),rt=fe?"uint8array":"array";function gt(vt,mt){je.call(this,"FlateWorker/"+vt),this._pako=null,this._pakoAction=vt,this._pakoOptions=mt,this.meta={}}ne.magic="\b\0",Qe.inherits(gt,je),gt.prototype.processChunk=function(vt){this.meta=vt.meta,this._pako===null&&this._createPako(),this._pako.push(Qe.transformTo(rt,vt.data),!1)},gt.prototype.flush=function(){je.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},gt.prototype.cleanUp=function(){je.prototype.cleanUp.call(this),this._pako=null},gt.prototype._createPako=function(){this._pako=new we[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var vt=this;this._pako.onData=function(mt){vt.push({data:mt,meta:vt.meta})}},ne.compressWorker=function(vt){return new gt("Deflate",vt)},ne.uncompressWorker=function(){return new gt("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(L,V,ne){function fe(We,ct){var He,it="";for(He=0;He>>=8;return it}function we(We,ct,He,it,Xe,lt){var Qt,Nt,Rt=We.file,pr=We.compression,$t=lt!==rt.utf8encode,Pr=Qe.transformTo("string",lt(Rt.name)),Vt=Qe.transformTo("string",rt.utf8encode(Rt.name)),Xr=Rt.comment,Vn=Qe.transformTo("string",lt(Xr)),It=Qe.transformTo("string",rt.utf8encode(Xr)),rr=Vt.length!==Rt.name.length,De=It.length!==Xr.length,Ar="",li="",Rr="",pi=Rt.dir,Gr=Rt.date,ti={crc32:0,compressedSize:0,uncompressedSize:0};ct&&!He||(ti.crc32=We.crc32,ti.compressedSize=We.compressedSize,ti.uncompressedSize=We.uncompressedSize);var Ht=0;ct&&(Ht|=8),$t||!rr&&!De||(Ht|=2048);var jt=0,Kn=0;pi&&(jt|=16),Xe==="UNIX"?(Kn=798,jt|=function(sn,Wa){var ho=sn;return sn||(ho=Wa?16893:33204),(65535&ho)<<16}(Rt.unixPermissions,pi)):(Kn=20,jt|=function(sn){return 63&(sn||0)}(Rt.dosPermissions)),Qt=Gr.getUTCHours(),Qt<<=6,Qt|=Gr.getUTCMinutes(),Qt<<=5,Qt|=Gr.getUTCSeconds()/2,Nt=Gr.getUTCFullYear()-1980,Nt<<=4,Nt|=Gr.getUTCMonth()+1,Nt<<=5,Nt|=Gr.getUTCDate(),rr&&(li=fe(1,1)+fe(gt(Pr),4)+Vt,Ar+="up"+fe(li.length,2)+li),De&&(Rr=fe(1,1)+fe(gt(Vn),4)+It,Ar+="uc"+fe(Rr.length,2)+Rr);var En="";return En+=` \0`,En+=fe(Ht,2),En+=pr.magic,En+=fe(Qt,2),En+=fe(Nt,2),En+=fe(ti.crc32,4),En+=fe(ti.compressedSize,4),En+=fe(ti.uncompressedSize,4),En+=fe(Pr.length,2),En+=fe(Ar.length,2),{fileRecord:vt.LOCAL_FILE_HEADER+En+Pr+Ar,dirRecord:vt.CENTRAL_FILE_HEADER+fe(Kn,2)+En+fe(Vn.length,2)+"\0\0\0\0"+fe(jt,4)+fe(it,4)+Pr+Ar+Vn}}var Qe=L("../utils"),je=L("../stream/GenericWorker"),rt=L("../utf8"),gt=L("../crc32"),vt=L("../signature");function mt(We,ct,He,it){je.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=ct,this.zipPlatform=He,this.encodeFileName=it,this.streamFiles=We,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}Qe.inherits(mt,je),mt.prototype.push=function(We){var ct=We.meta.percent||0,He=this.entriesCount,it=this._sources.length;this.accumulate?this.contentBuffer.push(We):(this.bytesWritten+=We.data.length,je.prototype.push.call(this,{data:We.data,meta:{currentFile:this.currentFile,percent:He?(ct+100*(He-it-1))/He:100}}))},mt.prototype.openedSource=function(We){this.currentSourceOffset=this.bytesWritten,this.currentFile=We.file.name;var ct=this.streamFiles&&!We.file.dir;if(ct){var He=we(We,ct,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:He.fileRecord,meta:{percent:0}})}else this.accumulate=!0},mt.prototype.closedSource=function(We){this.accumulate=!1;var ct=this.streamFiles&&!We.file.dir,He=we(We,ct,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(He.dirRecord),ct)this.push({data:function(it){return vt.DATA_DESCRIPTOR+fe(it.crc32,4)+fe(it.compressedSize,4)+fe(it.uncompressedSize,4)}(We),meta:{percent:100}});else for(this.push({data:He.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},mt.prototype.flush=function(){for(var We=this.bytesWritten,ct=0;ct=this.index;je--)rt=(rt<<8)+this.byteAt(je);return this.index+=Qe,rt},readString:function(Qe){return fe.transformTo("string",this.readData(Qe))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var Qe=this.readInt(4);return new Date(Date.UTC(1980+(Qe>>25&127),(Qe>>21&15)-1,Qe>>16&31,Qe>>11&31,Qe>>5&63,(31&Qe)<<1))}},V.exports=we},{"../utils":32}],19:[function(L,V,ne){var fe=L("./Uint8ArrayReader");function we(Qe){fe.call(this,Qe)}L("../utils").inherits(we,fe),we.prototype.readData=function(Qe){this.checkOffset(Qe);var je=this.data.slice(this.zero+this.index,this.zero+this.index+Qe);return this.index+=Qe,je},V.exports=we},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(L,V,ne){var fe=L("./DataReader");function we(Qe){fe.call(this,Qe)}L("../utils").inherits(we,fe),we.prototype.byteAt=function(Qe){return this.data.charCodeAt(this.zero+Qe)},we.prototype.lastIndexOfSignature=function(Qe){return this.data.lastIndexOf(Qe)-this.zero},we.prototype.readAndCheckSignature=function(Qe){return Qe===this.readData(4)},we.prototype.readData=function(Qe){this.checkOffset(Qe);var je=this.data.slice(this.zero+this.index,this.zero+this.index+Qe);return this.index+=Qe,je},V.exports=we},{"../utils":32,"./DataReader":18}],21:[function(L,V,ne){var fe=L("./ArrayReader");function we(Qe){fe.call(this,Qe)}L("../utils").inherits(we,fe),we.prototype.readData=function(Qe){if(this.checkOffset(Qe),Qe===0)return new Uint8Array(0);var je=this.data.subarray(this.zero+this.index,this.zero+this.index+Qe);return this.index+=Qe,je},V.exports=we},{"../utils":32,"./ArrayReader":17}],22:[function(L,V,ne){var fe=L("../utils"),we=L("../support"),Qe=L("./ArrayReader"),je=L("./StringReader"),rt=L("./NodeBufferReader"),gt=L("./Uint8ArrayReader");V.exports=function(vt){var mt=fe.getTypeOf(vt);return fe.checkSupport(mt),mt!=="string"||we.uint8array?mt==="nodebuffer"?new rt(vt):we.uint8array?new gt(fe.transformTo("uint8array",vt)):new Qe(fe.transformTo("array",vt)):new je(vt)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(L,V,ne){ne.LOCAL_FILE_HEADER="PK",ne.CENTRAL_FILE_HEADER="PK",ne.CENTRAL_DIRECTORY_END="PK",ne.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",ne.ZIP64_CENTRAL_DIRECTORY_END="PK",ne.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(L,V,ne){var fe=L("./GenericWorker"),we=L("../utils");function Qe(je){fe.call(this,"ConvertWorker to "+je),this.destType=je}we.inherits(Qe,fe),Qe.prototype.processChunk=function(je){this.push({data:we.transformTo(this.destType,je.data),meta:je.meta})},V.exports=Qe},{"../utils":32,"./GenericWorker":28}],25:[function(L,V,ne){var fe=L("./GenericWorker"),we=L("../crc32");function Qe(){fe.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}L("../utils").inherits(Qe,fe),Qe.prototype.processChunk=function(je){this.streamInfo.crc32=we(je.data,this.streamInfo.crc32||0),this.push(je)},V.exports=Qe},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(L,V,ne){var fe=L("../utils"),we=L("./GenericWorker");function Qe(je){we.call(this,"DataLengthProbe for "+je),this.propName=je,this.withStreamInfo(je,0)}fe.inherits(Qe,we),Qe.prototype.processChunk=function(je){if(je){var rt=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=rt+je.data.length}we.prototype.processChunk.call(this,je)},V.exports=Qe},{"../utils":32,"./GenericWorker":28}],27:[function(L,V,ne){var fe=L("../utils"),we=L("./GenericWorker");function Qe(je){we.call(this,"DataWorker");var rt=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,je.then(function(gt){rt.dataIsReady=!0,rt.data=gt,rt.max=gt&>.length||0,rt.type=fe.getTypeOf(gt),rt.isPaused||rt._tickAndRepeat()},function(gt){rt.error(gt)})}fe.inherits(Qe,we),Qe.prototype.cleanUp=function(){we.prototype.cleanUp.call(this),this.data=null},Qe.prototype.resume=function(){return!!we.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,fe.delay(this._tickAndRepeat,[],this)),!0)},Qe.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(fe.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},Qe.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var je=null,rt=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":je=this.data.substring(this.index,rt);break;case"uint8array":je=this.data.subarray(this.index,rt);break;case"array":case"nodebuffer":je=this.data.slice(this.index,rt)}return this.index=rt,this.push({data:je,meta:{percent:this.max?this.index/this.max*100:0}})},V.exports=Qe},{"../utils":32,"./GenericWorker":28}],28:[function(L,V,ne){function fe(we){this.name=we||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}fe.prototype={push:function(we){this.emit("data",we)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(we){this.emit("error",we)}return!0},error:function(we){return!this.isFinished&&(this.isPaused?this.generatedError=we:(this.isFinished=!0,this.emit("error",we),this.previous&&this.previous.error(we),this.cleanUp()),!0)},on:function(we,Qe){return this._listeners[we].push(Qe),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(we,Qe){if(this._listeners[we])for(var je=0;je "+we:we}},V.exports=fe},{}],29:[function(L,V,ne){var fe=L("../utils"),we=L("./ConvertWorker"),Qe=L("./GenericWorker"),je=L("../base64"),rt=L("../support"),gt=L("../external"),vt=null;if(rt.nodestream)try{vt=L("../nodejs/NodejsStreamOutputAdapter")}catch{}function mt(ct,He){return new gt.Promise(function(it,Xe){var lt=[],Qt=ct._internalType,Nt=ct._outputType,Rt=ct._mimeType;ct.on("data",function(pr,$t){lt.push(pr),He&&He($t)}).on("error",function(pr){lt=[],Xe(pr)}).on("end",function(){try{var pr=function($t,Pr,Vt){switch($t){case"blob":return fe.newBlob(fe.transformTo("arraybuffer",Pr),Vt);case"base64":return je.encode(Pr);default:return fe.transformTo($t,Pr)}}(Nt,function($t,Pr){var Vt,Xr=0,Vn=null,It=0;for(Vt=0;Vt"u")ne.blob=!1;else{var fe=new ArrayBuffer(0);try{ne.blob=new Blob([fe],{type:"application/zip"}).size===0}catch{try{var we=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);we.append(fe),ne.blob=we.getBlob("application/zip").size===0}catch{ne.blob=!1}}}try{ne.nodestream=!!L("readable-stream").Readable}catch{ne.nodestream=!1}},{"readable-stream":16}],31:[function(L,V,ne){for(var fe=L("./utils"),we=L("./support"),Qe=L("./nodejsUtils"),je=L("./stream/GenericWorker"),rt=new Array(256),gt=0;gt<256;gt++)rt[gt]=252<=gt?6:248<=gt?5:240<=gt?4:224<=gt?3:192<=gt?2:1;rt[254]=rt[254]=1;function vt(){je.call(this,"utf-8 decode"),this.leftOver=null}function mt(){je.call(this,"utf-8 encode")}ne.utf8encode=function(We){return we.nodebuffer?Qe.newBufferFrom(We,"utf-8"):function(ct){var He,it,Xe,lt,Qt,Nt=ct.length,Rt=0;for(lt=0;lt>>6:(it<65536?He[Qt++]=224|it>>>12:(He[Qt++]=240|it>>>18,He[Qt++]=128|it>>>12&63),He[Qt++]=128|it>>>6&63),He[Qt++]=128|63&it);return He}(We)},ne.utf8decode=function(We){return we.nodebuffer?fe.transformTo("nodebuffer",We).toString("utf-8"):function(ct){var He,it,Xe,lt,Qt=ct.length,Nt=new Array(2*Qt);for(He=it=0;He>10&1023,Nt[it++]=56320|1023&Xe)}return Nt.length!==it&&(Nt.subarray?Nt=Nt.subarray(0,it):Nt.length=it),fe.applyFromCharCode(Nt)}(We=fe.transformTo(we.uint8array?"uint8array":"array",We))},fe.inherits(vt,je),vt.prototype.processChunk=function(We){var ct=fe.transformTo(we.uint8array?"uint8array":"array",We.data);if(this.leftOver&&this.leftOver.length){if(we.uint8array){var He=ct;(ct=new Uint8Array(He.length+this.leftOver.length)).set(this.leftOver,0),ct.set(He,this.leftOver.length)}else ct=this.leftOver.concat(ct);this.leftOver=null}var it=function(lt,Qt){var Nt;for((Qt=Qt||lt.length)>lt.length&&(Qt=lt.length),Nt=Qt-1;0<=Nt&&(192<[Nt])==128;)Nt--;return Nt<0||Nt===0?Qt:Nt+rt[lt[Nt]]>Qt?Nt:Qt}(ct),Xe=ct;it!==ct.length&&(we.uint8array?(Xe=ct.subarray(0,it),this.leftOver=ct.subarray(it,ct.length)):(Xe=ct.slice(0,it),this.leftOver=ct.slice(it,ct.length))),this.push({data:ne.utf8decode(Xe),meta:We.meta})},vt.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:ne.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},ne.Utf8DecodeWorker=vt,fe.inherits(mt,je),mt.prototype.processChunk=function(We){this.push({data:ne.utf8encode(We.data),meta:We.meta})},ne.Utf8EncodeWorker=mt},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(L,V,ne){var fe=L("./support"),we=L("./base64"),Qe=L("./nodejsUtils"),je=L("./external");function rt(He){return He}function gt(He,it){for(var Xe=0;Xe>8;this.dir=!!(16&this.externalFileAttributes),We==0&&(this.dosPermissions=63&this.externalFileAttributes),We==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var We=fe(this.extraFields[1].value);this.uncompressedSize===we.MAX_VALUE_32BITS&&(this.uncompressedSize=We.readInt(8)),this.compressedSize===we.MAX_VALUE_32BITS&&(this.compressedSize=We.readInt(8)),this.localHeaderOffset===we.MAX_VALUE_32BITS&&(this.localHeaderOffset=We.readInt(8)),this.diskNumberStart===we.MAX_VALUE_32BITS&&(this.diskNumberStart=We.readInt(4))}},readExtraFields:function(We){var ct,He,it,Xe=We.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});We.index+4>>6:(We<65536?mt[it++]=224|We>>>12:(mt[it++]=240|We>>>18,mt[it++]=128|We>>>12&63),mt[it++]=128|We>>>6&63),mt[it++]=128|63&We);return mt},ne.buf2binstring=function(vt){return gt(vt,vt.length)},ne.binstring2buf=function(vt){for(var mt=new fe.Buf8(vt.length),We=0,ct=mt.length;We>10&1023,lt[ct++]=56320|1023&He)}return gt(lt,ct)},ne.utf8border=function(vt,mt){var We;for((mt=mt||vt.length)>vt.length&&(mt=vt.length),We=mt-1;0<=We&&(192&vt[We])==128;)We--;return We<0||We===0?mt:We+je[vt[We]]>mt?We:mt}},{"./common":41}],43:[function(L,V,ne){V.exports=function(fe,we,Qe,je){for(var rt=65535&fe|0,gt=fe>>>16&65535|0,vt=0;Qe!==0;){for(Qe-=vt=2e3>>1:we>>>1;Qe[je]=we}return Qe}();V.exports=function(we,Qe,je,rt){var gt=fe,vt=rt+je;we^=-1;for(var mt=rt;mt>>8^gt[255&(we^Qe[mt])];return-1^we}},{}],46:[function(L,V,ne){var fe,we=L("../utils/common"),Qe=L("./trees"),je=L("./adler32"),rt=L("./crc32"),gt=L("./messages"),vt=0,mt=4,We=0,ct=-2,He=-1,it=4,Xe=2,lt=8,Qt=9,Nt=286,Rt=30,pr=19,$t=2*Nt+1,Pr=15,Vt=3,Xr=258,Vn=Xr+Vt+1,It=42,rr=113,De=1,Ar=2,li=3,Rr=4;function pi(ve,cr){return ve.msg=gt[cr],cr}function Gr(ve){return(ve<<1)-(4ve.avail_out&&(Yt=ve.avail_out),Yt!==0&&(we.arraySet(ve.output,cr.pending_buf,cr.pending_out,Yt,ve.next_out),ve.next_out+=Yt,cr.pending_out+=Yt,ve.total_out+=Yt,ve.avail_out-=Yt,cr.pending-=Yt,cr.pending===0&&(cr.pending_out=0))}function jt(ve,cr){Qe._tr_flush_block(ve,0<=ve.block_start?ve.block_start:-1,ve.strstart-ve.block_start,cr),ve.block_start=ve.strstart,Ht(ve.strm)}function Kn(ve,cr){ve.pending_buf[ve.pending++]=cr}function En(ve,cr){ve.pending_buf[ve.pending++]=cr>>>8&255,ve.pending_buf[ve.pending++]=255&cr}function sn(ve,cr){var Yt,st,nt=ve.max_chain_length,xt=ve.strstart,Er=ve.prev_length,_r=ve.nice_match,Pt=ve.strstart>ve.w_size-Vn?ve.strstart-(ve.w_size-Vn):0,Jr=ve.window,wn=ve.w_mask,Vr=ve.prev,Un=ve.strstart+Xr,ya=Jr[xt+Er-1],Fi=Jr[xt+Er];ve.prev_length>=ve.good_match&&(nt>>=2),_r>ve.lookahead&&(_r=ve.lookahead);do if(Jr[(Yt=cr)+Er]===Fi&&Jr[Yt+Er-1]===ya&&Jr[Yt]===Jr[xt]&&Jr[++Yt]===Jr[xt+1]){xt+=2,Yt++;do;while(Jr[++xt]===Jr[++Yt]&&Jr[++xt]===Jr[++Yt]&&Jr[++xt]===Jr[++Yt]&&Jr[++xt]===Jr[++Yt]&&Jr[++xt]===Jr[++Yt]&&Jr[++xt]===Jr[++Yt]&&Jr[++xt]===Jr[++Yt]&&Jr[++xt]===Jr[++Yt]&&xtPt&&--nt!=0);return Er<=ve.lookahead?Er:ve.lookahead}function Wa(ve){var cr,Yt,st,nt,xt,Er,_r,Pt,Jr,wn,Vr=ve.w_size;do{if(nt=ve.window_size-ve.lookahead-ve.strstart,ve.strstart>=Vr+(Vr-Vn)){for(we.arraySet(ve.window,ve.window,Vr,Vr,0),ve.match_start-=Vr,ve.strstart-=Vr,ve.block_start-=Vr,cr=Yt=ve.hash_size;st=ve.head[--cr],ve.head[cr]=Vr<=st?st-Vr:0,--Yt;);for(cr=Yt=Vr;st=ve.prev[--cr],ve.prev[cr]=Vr<=st?st-Vr:0,--Yt;);nt+=Vr}if(ve.strm.avail_in===0)break;if(Er=ve.strm,_r=ve.window,Pt=ve.strstart+ve.lookahead,Jr=nt,wn=void 0,wn=Er.avail_in,Jr=Vt)for(xt=ve.strstart-ve.insert,ve.ins_h=ve.window[xt],ve.ins_h=(ve.ins_h<=Vt&&(ve.ins_h=(ve.ins_h<=Vt)if(st=Qe._tr_tally(ve,ve.strstart-ve.match_start,ve.match_length-Vt),ve.lookahead-=ve.match_length,ve.match_length<=ve.max_lazy_match&&ve.lookahead>=Vt){for(ve.match_length--;ve.strstart++,ve.ins_h=(ve.ins_h<=Vt&&(ve.ins_h=(ve.ins_h<=Vt&&ve.match_length<=ve.prev_length){for(nt=ve.strstart+ve.lookahead-Vt,st=Qe._tr_tally(ve,ve.strstart-1-ve.prev_match,ve.prev_length-Vt),ve.lookahead-=ve.prev_length-1,ve.prev_length-=2;++ve.strstart<=nt&&(ve.ins_h=(ve.ins_h<ve.pending_buf_size-5&&(Yt=ve.pending_buf_size-5);;){if(ve.lookahead<=1){if(Wa(ve),ve.lookahead===0&&cr===vt)return De;if(ve.lookahead===0)break}ve.strstart+=ve.lookahead,ve.lookahead=0;var st=ve.block_start+Yt;if((ve.strstart===0||ve.strstart>=st)&&(ve.lookahead=ve.strstart-st,ve.strstart=st,jt(ve,!1),ve.strm.avail_out===0)||ve.strstart-ve.block_start>=ve.w_size-Vn&&(jt(ve,!1),ve.strm.avail_out===0))return De}return ve.insert=0,cr===mt?(jt(ve,!0),ve.strm.avail_out===0?li:Rr):(ve.strstart>ve.block_start&&(jt(ve,!1),ve.strm.avail_out),De)}),new qi(4,4,8,4,ho),new qi(4,5,16,8,ho),new qi(4,6,32,32,ho),new qi(4,4,16,16,Ri),new qi(8,16,32,32,Ri),new qi(8,16,128,128,Ri),new qi(8,32,128,256,Ri),new qi(32,128,258,1024,Ri),new qi(32,258,258,4096,Ri)],ne.deflateInit=function(ve,cr){return Xs(ve,cr,lt,15,8,0)},ne.deflateInit2=Xs,ne.deflateReset=Ns,ne.deflateResetKeep=ma,ne.deflateSetHeader=function(ve,cr){return ve&&ve.state?ve.state.wrap!==2?ct:(ve.state.gzhead=cr,We):ct},ne.deflate=function(ve,cr){var Yt,st,nt,xt;if(!ve||!ve.state||5>8&255),Kn(st,st.gzhead.time>>16&255),Kn(st,st.gzhead.time>>24&255),Kn(st,st.level===9?2:2<=st.strategy||st.level<2?4:0),Kn(st,255&st.gzhead.os),st.gzhead.extra&&st.gzhead.extra.length&&(Kn(st,255&st.gzhead.extra.length),Kn(st,st.gzhead.extra.length>>8&255)),st.gzhead.hcrc&&(ve.adler=rt(ve.adler,st.pending_buf,st.pending,0)),st.gzindex=0,st.status=69):(Kn(st,0),Kn(st,0),Kn(st,0),Kn(st,0),Kn(st,0),Kn(st,st.level===9?2:2<=st.strategy||st.level<2?4:0),Kn(st,3),st.status=rr);else{var Er=lt+(st.w_bits-8<<4)<<8;Er|=(2<=st.strategy||st.level<2?0:st.level<6?1:st.level===6?2:3)<<6,st.strstart!==0&&(Er|=32),Er+=31-Er%31,st.status=rr,En(st,Er),st.strstart!==0&&(En(st,ve.adler>>>16),En(st,65535&ve.adler)),ve.adler=1}if(st.status===69)if(st.gzhead.extra){for(nt=st.pending;st.gzindex<(65535&st.gzhead.extra.length)&&(st.pending!==st.pending_buf_size||(st.gzhead.hcrc&&st.pending>nt&&(ve.adler=rt(ve.adler,st.pending_buf,st.pending-nt,nt)),Ht(ve),nt=st.pending,st.pending!==st.pending_buf_size));)Kn(st,255&st.gzhead.extra[st.gzindex]),st.gzindex++;st.gzhead.hcrc&&st.pending>nt&&(ve.adler=rt(ve.adler,st.pending_buf,st.pending-nt,nt)),st.gzindex===st.gzhead.extra.length&&(st.gzindex=0,st.status=73)}else st.status=73;if(st.status===73)if(st.gzhead.name){nt=st.pending;do{if(st.pending===st.pending_buf_size&&(st.gzhead.hcrc&&st.pending>nt&&(ve.adler=rt(ve.adler,st.pending_buf,st.pending-nt,nt)),Ht(ve),nt=st.pending,st.pending===st.pending_buf_size)){xt=1;break}xt=st.gzindexnt&&(ve.adler=rt(ve.adler,st.pending_buf,st.pending-nt,nt)),xt===0&&(st.gzindex=0,st.status=91)}else st.status=91;if(st.status===91)if(st.gzhead.comment){nt=st.pending;do{if(st.pending===st.pending_buf_size&&(st.gzhead.hcrc&&st.pending>nt&&(ve.adler=rt(ve.adler,st.pending_buf,st.pending-nt,nt)),Ht(ve),nt=st.pending,st.pending===st.pending_buf_size)){xt=1;break}xt=st.gzindexnt&&(ve.adler=rt(ve.adler,st.pending_buf,st.pending-nt,nt)),xt===0&&(st.status=103)}else st.status=103;if(st.status===103&&(st.gzhead.hcrc?(st.pending+2>st.pending_buf_size&&Ht(ve),st.pending+2<=st.pending_buf_size&&(Kn(st,255&ve.adler),Kn(st,ve.adler>>8&255),ve.adler=0,st.status=rr)):st.status=rr),st.pending!==0){if(Ht(ve),ve.avail_out===0)return st.last_flush=-1,We}else if(ve.avail_in===0&&Gr(cr)<=Gr(Yt)&&cr!==mt)return pi(ve,-5);if(st.status===666&&ve.avail_in!==0)return pi(ve,-5);if(ve.avail_in!==0||st.lookahead!==0||cr!==vt&&st.status!==666){var _r=st.strategy===2?function(Pt,Jr){for(var wn;;){if(Pt.lookahead===0&&(Wa(Pt),Pt.lookahead===0)){if(Jr===vt)return De;break}if(Pt.match_length=0,wn=Qe._tr_tally(Pt,0,Pt.window[Pt.strstart]),Pt.lookahead--,Pt.strstart++,wn&&(jt(Pt,!1),Pt.strm.avail_out===0))return De}return Pt.insert=0,Jr===mt?(jt(Pt,!0),Pt.strm.avail_out===0?li:Rr):Pt.last_lit&&(jt(Pt,!1),Pt.strm.avail_out===0)?De:Ar}(st,cr):st.strategy===3?function(Pt,Jr){for(var wn,Vr,Un,ya,Fi=Pt.window;;){if(Pt.lookahead<=Xr){if(Wa(Pt),Pt.lookahead<=Xr&&Jr===vt)return De;if(Pt.lookahead===0)break}if(Pt.match_length=0,Pt.lookahead>=Vt&&0Pt.lookahead&&(Pt.match_length=Pt.lookahead)}if(Pt.match_length>=Vt?(wn=Qe._tr_tally(Pt,1,Pt.match_length-Vt),Pt.lookahead-=Pt.match_length,Pt.strstart+=Pt.match_length,Pt.match_length=0):(wn=Qe._tr_tally(Pt,0,Pt.window[Pt.strstart]),Pt.lookahead--,Pt.strstart++),wn&&(jt(Pt,!1),Pt.strm.avail_out===0))return De}return Pt.insert=0,Jr===mt?(jt(Pt,!0),Pt.strm.avail_out===0?li:Rr):Pt.last_lit&&(jt(Pt,!1),Pt.strm.avail_out===0)?De:Ar}(st,cr):fe[st.level].func(st,cr);if(_r!==li&&_r!==Rr||(st.status=666),_r===De||_r===li)return ve.avail_out===0&&(st.last_flush=-1),We;if(_r===Ar&&(cr===1?Qe._tr_align(st):cr!==5&&(Qe._tr_stored_block(st,0,0,!1),cr===3&&(ti(st.head),st.lookahead===0&&(st.strstart=0,st.block_start=0,st.insert=0))),Ht(ve),ve.avail_out===0))return st.last_flush=-1,We}return cr!==mt?We:st.wrap<=0?1:(st.wrap===2?(Kn(st,255&ve.adler),Kn(st,ve.adler>>8&255),Kn(st,ve.adler>>16&255),Kn(st,ve.adler>>24&255),Kn(st,255&ve.total_in),Kn(st,ve.total_in>>8&255),Kn(st,ve.total_in>>16&255),Kn(st,ve.total_in>>24&255)):(En(st,ve.adler>>>16),En(st,65535&ve.adler)),Ht(ve),0=Yt.w_size&&(xt===0&&(ti(Yt.head),Yt.strstart=0,Yt.block_start=0,Yt.insert=0),Jr=new we.Buf8(Yt.w_size),we.arraySet(Jr,cr,wn-Yt.w_size,Yt.w_size,0),cr=Jr,wn=Yt.w_size),Er=ve.avail_in,_r=ve.next_in,Pt=ve.input,ve.avail_in=wn,ve.next_in=0,ve.input=cr,Wa(Yt);Yt.lookahead>=Vt;){for(st=Yt.strstart,nt=Yt.lookahead-(Vt-1);Yt.ins_h=(Yt.ins_h<>>=Vt=Pr>>>24,Qt-=Vt,(Vt=Pr>>>16&255)===0)Ar[gt++]=65535⪻else{if(!(16&Vt)){if(!(64&Vt)){Pr=Nt[(65535&Pr)+(lt&(1<>>=Vt,Qt-=Vt),Qt<15&&(lt+=De[je++]<>>=Vt=Pr>>>24,Qt-=Vt,!(16&(Vt=Pr>>>16&255))){if(!(64&Vt)){Pr=Rt[(65535&Pr)+(lt&(1<>>=Vt,Qt-=Vt,(Vt=gt-vt)>3,lt&=(1<<(Qt-=Xr<<3))-1,fe.next_in=je,fe.next_out=gt,fe.avail_in=je>>24&255)+(It>>>8&65280)+((65280&It)<<8)+((255&It)<<24)}function lt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new fe.Buf16(320),this.work=new fe.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Qt(It){var rr;return It&&It.state?(rr=It.state,It.total_in=It.total_out=rr.total=0,It.msg="",rr.wrap&&(It.adler=1&rr.wrap),rr.mode=ct,rr.last=0,rr.havedict=0,rr.dmax=32768,rr.head=null,rr.hold=0,rr.bits=0,rr.lencode=rr.lendyn=new fe.Buf32(He),rr.distcode=rr.distdyn=new fe.Buf32(it),rr.sane=1,rr.back=-1,mt):We}function Nt(It){var rr;return It&&It.state?((rr=It.state).wsize=0,rr.whave=0,rr.wnext=0,Qt(It)):We}function Rt(It,rr){var De,Ar;return It&&It.state?(Ar=It.state,rr<0?(De=0,rr=-rr):(De=1+(rr>>4),rr<48&&(rr&=15)),rr&&(rr<8||15=Rr.wsize?(fe.arraySet(Rr.window,rr,De-Rr.wsize,Rr.wsize,0),Rr.wnext=0,Rr.whave=Rr.wsize):(Ar<(li=Rr.wsize-Rr.wnext)&&(li=Ar),fe.arraySet(Rr.window,rr,De-Ar,li,Rr.wnext),(Ar-=li)?(fe.arraySet(Rr.window,rr,De-Ar,Ar,0),Rr.wnext=Ar,Rr.whave=Rr.wsize):(Rr.wnext+=li,Rr.wnext===Rr.wsize&&(Rr.wnext=0),Rr.whave>>8&255,De.check=Qe(De.check,xt,2,0),jt=Ht=0,De.mode=2;break}if(De.flags=0,De.head&&(De.head.done=!1),!(1&De.wrap)||(((255&Ht)<<8)+(Ht>>8))%31){It.msg="incorrect header check",De.mode=30;break}if((15&Ht)!=8){It.msg="unknown compression method",De.mode=30;break}if(jt-=4,ve=8+(15&(Ht>>>=4)),De.wbits===0)De.wbits=ve;else if(ve>De.wbits){It.msg="invalid window size",De.mode=30;break}De.dmax=1<>8&1),512&De.flags&&(xt[0]=255&Ht,xt[1]=Ht>>>8&255,De.check=Qe(De.check,xt,2,0)),jt=Ht=0,De.mode=3;case 3:for(;jt<32;){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>>8&255,xt[2]=Ht>>>16&255,xt[3]=Ht>>>24&255,De.check=Qe(De.check,xt,4,0)),jt=Ht=0,De.mode=4;case 4:for(;jt<16;){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>8),512&De.flags&&(xt[0]=255&Ht,xt[1]=Ht>>>8&255,De.check=Qe(De.check,xt,2,0)),jt=Ht=0,De.mode=5;case 5:if(1024&De.flags){for(;jt<16;){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>>8&255,De.check=Qe(De.check,xt,2,0)),jt=Ht=0}else De.head&&(De.head.extra=null);De.mode=6;case 6:if(1024&De.flags&&(Gr<(sn=De.length)&&(sn=Gr),sn&&(De.head&&(ve=De.head.extra_len-De.length,De.head.extra||(De.head.extra=new Array(De.head.extra_len)),fe.arraySet(De.head.extra,Ar,Rr,sn,ve)),512&De.flags&&(De.check=Qe(De.check,Ar,sn,Rr)),Gr-=sn,Rr+=sn,De.length-=sn),De.length))break e;De.length=0,De.mode=7;case 7:if(2048&De.flags){if(Gr===0)break e;for(sn=0;ve=Ar[Rr+sn++],De.head&&ve&&De.length<65536&&(De.head.name+=String.fromCharCode(ve)),ve&&sn>9&1,De.head.done=!0),It.adler=De.check=0,De.mode=12;break;case 10:for(;jt<32;){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>>=7&jt,jt-=7&jt,De.mode=27;break}for(;jt<3;){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>>=1)){case 0:De.mode=14;break;case 1:if(Xr(De),De.mode=20,rr!==6)break;Ht>>>=2,jt-=2;break e;case 2:De.mode=17;break;case 3:It.msg="invalid block type",De.mode=30}Ht>>>=2,jt-=2;break;case 14:for(Ht>>>=7&jt,jt-=7&jt;jt<32;){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>>16^65535)){It.msg="invalid stored block lengths",De.mode=30;break}if(De.length=65535&Ht,jt=Ht=0,De.mode=15,rr===6)break e;case 15:De.mode=16;case 16:if(sn=De.length){if(Gr>>=5,jt-=5,De.ndist=1+(31&Ht),Ht>>>=5,jt-=5,De.ncode=4+(15&Ht),Ht>>>=4,jt-=4,286>>=3,jt-=3}for(;De.have<19;)De.lens[Er[De.have++]]=0;if(De.lencode=De.lendyn,De.lenbits=7,Yt={bits:De.lenbits},cr=rt(0,De.lens,0,19,De.lencode,0,De.work,Yt),De.lenbits=Yt.bits,cr){It.msg="invalid code lengths set",De.mode=30;break}De.have=0,De.mode=19;case 19:for(;De.have>>16&255,Io=65535&nt,!((Ri=nt>>>24)<=jt);){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>>=Ri,jt-=Ri,De.lens[De.have++]=Io;else{if(Io===16){for(st=Ri+2;jt>>=Ri,jt-=Ri,De.have===0){It.msg="invalid bit length repeat",De.mode=30;break}ve=De.lens[De.have-1],sn=3+(3&Ht),Ht>>>=2,jt-=2}else if(Io===17){for(st=Ri+3;jt>>=Ri)),Ht>>>=3,jt-=3}else{for(st=Ri+7;jt>>=Ri)),Ht>>>=7,jt-=7}if(De.have+sn>De.nlen+De.ndist){It.msg="invalid bit length repeat",De.mode=30;break}for(;sn--;)De.lens[De.have++]=ve}}if(De.mode===30)break;if(De.lens[256]===0){It.msg="invalid code -- missing end-of-block",De.mode=30;break}if(De.lenbits=9,Yt={bits:De.lenbits},cr=rt(gt,De.lens,0,De.nlen,De.lencode,0,De.work,Yt),De.lenbits=Yt.bits,cr){It.msg="invalid literal/lengths set",De.mode=30;break}if(De.distbits=6,De.distcode=De.distdyn,Yt={bits:De.distbits},cr=rt(vt,De.lens,De.nlen,De.ndist,De.distcode,0,De.work,Yt),De.distbits=Yt.bits,cr){It.msg="invalid distances set",De.mode=30;break}if(De.mode=20,rr===6)break e;case 20:De.mode=21;case 21:if(6<=Gr&&258<=ti){It.next_out=pi,It.avail_out=ti,It.next_in=Rr,It.avail_in=Gr,De.hold=Ht,De.bits=jt,je(It,En),pi=It.next_out,li=It.output,ti=It.avail_out,Rr=It.next_in,Ar=It.input,Gr=It.avail_in,Ht=De.hold,jt=De.bits,De.mode===12&&(De.back=-1);break}for(De.back=0;qi=(nt=De.lencode[Ht&(1<>>16&255,Io=65535&nt,!((Ri=nt>>>24)<=jt);){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>ma)])>>>16&255,Io=65535&nt,!(ma+(Ri=nt>>>24)<=jt);){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>>=ma,jt-=ma,De.back+=ma}if(Ht>>>=Ri,jt-=Ri,De.back+=Ri,De.length=Io,qi===0){De.mode=26;break}if(32&qi){De.back=-1,De.mode=12;break}if(64&qi){It.msg="invalid literal/length code",De.mode=30;break}De.extra=15&qi,De.mode=22;case 22:if(De.extra){for(st=De.extra;jt>>=De.extra,jt-=De.extra,De.back+=De.extra}De.was=De.length,De.mode=23;case 23:for(;qi=(nt=De.distcode[Ht&(1<>>16&255,Io=65535&nt,!((Ri=nt>>>24)<=jt);){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>ma)])>>>16&255,Io=65535&nt,!(ma+(Ri=nt>>>24)<=jt);){if(Gr===0)break e;Gr--,Ht+=Ar[Rr++]<>>=ma,jt-=ma,De.back+=ma}if(Ht>>>=Ri,jt-=Ri,De.back+=Ri,64&qi){It.msg="invalid distance code",De.mode=30;break}De.offset=Io,De.extra=15&qi,De.mode=24;case 24:if(De.extra){for(st=De.extra;jt>>=De.extra,jt-=De.extra,De.back+=De.extra}if(De.offset>De.dmax){It.msg="invalid distance too far back",De.mode=30;break}De.mode=25;case 25:if(ti===0)break e;if(sn=En-ti,De.offset>sn){if((sn=De.offset-sn)>De.whave&&De.sane){It.msg="invalid distance too far back",De.mode=30;break}Wa=sn>De.wnext?(sn-=De.wnext,De.wsize-sn):De.wnext-sn,sn>De.length&&(sn=De.length),ho=De.window}else ho=li,Wa=pi-De.offset,sn=De.length;for(ti$t?(Vt=Wa[ho+it[rr]],jt[Kn+it[rr]]):(Vt=96,0),lt=1<>pi)+(Qt-=lt)]=Pr<<24|Vt<<16|Xr|0,Qt!==0;);for(lt=1<>=1;if(lt!==0?(Ht&=lt-1,Ht+=lt):Ht=0,rr++,--En[It]==0){if(It===Ar)break;It=vt[mt+it[rr]]}if(li>>7)]}function Kn(nt,xt){nt.pending_buf[nt.pending++]=255&xt,nt.pending_buf[nt.pending++]=xt>>>8&255}function En(nt,xt,Er){nt.bi_valid>Xe-Er?(nt.bi_buf|=xt<>Xe-nt.bi_valid,nt.bi_valid+=Er-Xe):(nt.bi_buf|=xt<>>=1,Er<<=1,0<--xt;);return Er>>>1}function ho(nt,xt,Er){var _r,Pt,Jr=new Array(it+1),wn=0;for(_r=1;_r<=it;_r++)Jr[_r]=wn=wn+Er[_r-1]<<1;for(Pt=0;Pt<=xt;Pt++){var Vr=nt[2*Pt+1];Vr!==0&&(nt[2*Pt]=Wa(Jr[Vr]++,Vr))}}function Ri(nt){var xt;for(xt=0;xt>1;1<=Er;Er--)ma(nt,Jr,Er);for(Pt=Un;Er=nt.heap[1],nt.heap[1]=nt.heap[nt.heap_len--],ma(nt,Jr,1),_r=nt.heap[1],nt.heap[--nt.heap_max]=Er,nt.heap[--nt.heap_max]=_r,Jr[2*Pt]=Jr[2*Er]+Jr[2*_r],nt.depth[Pt]=(nt.depth[Er]>=nt.depth[_r]?nt.depth[Er]:nt.depth[_r])+1,Jr[2*Er+1]=Jr[2*_r+1]=Pt,nt.heap[1]=Pt++,ma(nt,Jr,1),2<=nt.heap_len;);nt.heap[--nt.heap_max]=nt.heap[1],function(Fi,Ms){var Dc,fc,Tl,Ka,Ts,Mh,Rc=Ms.dyn_tree,Vf=Ms.max_code,Hg=Ms.stat_desc.static_tree,Yg=Ms.stat_desc.has_stree,Zf=Ms.stat_desc.extra_bits,Xf=Ms.stat_desc.extra_base,nl=Ms.stat_desc.max_length,PA=0;for(Ka=0;Ka<=it;Ka++)Fi.bl_count[Ka]=0;for(Rc[2*Fi.heap[Fi.heap_max]+1]=0,Dc=Fi.heap_max+1;Dc>=7;Pt>>=1)if(1&ya&&Vr.dyn_ltree[2*Un]!==0)return we;if(Vr.dyn_ltree[18]!==0||Vr.dyn_ltree[20]!==0||Vr.dyn_ltree[26]!==0)return Qe;for(Un=32;Un>>3,(Jr=nt.static_len+3+7>>>3)<=Pt&&(Pt=Jr)):Pt=Jr=Er+5,Er+4<=Pt&&xt!==-1?st(nt,xt,Er,_r):nt.strategy===4||Jr===Pt?(En(nt,2+(_r?1:0),3),Ns(nt,Vn,It)):(En(nt,4+(_r?1:0),3),function(Vr,Un,ya,Fi){var Ms;for(En(Vr,Un-257,5),En(Vr,ya-1,5),En(Vr,Fi-4,4),Ms=0;Ms>>8&255,nt.pending_buf[nt.d_buf+2*nt.last_lit+1]=255&xt,nt.pending_buf[nt.l_buf+nt.last_lit]=255&Er,nt.last_lit++,xt===0?nt.dyn_ltree[2*Er]++:(nt.matches++,xt--,nt.dyn_ltree[2*(De[Er]+vt+1)]++,nt.dyn_dtree[2*jt(xt)]++),nt.last_lit===nt.lit_bufsize-1},ne._tr_align=function(nt){En(nt,2,3),sn(nt,Qt,Vn),function(xt){xt.bi_valid===16?(Kn(xt,xt.bi_buf),xt.bi_buf=0,xt.bi_valid=0):8<=xt.bi_valid&&(xt.pending_buf[xt.pending++]=255&xt.bi_buf,xt.bi_buf>>=8,xt.bi_valid-=8)}(nt)}},{"../utils/common":41}],53:[function(L,V,ne){V.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(L,V,ne){(function(fe){(function(we,Qe){if(!we.setImmediate){var je,rt,gt,vt,mt=1,We={},ct=!1,He=we.document,it=Object.getPrototypeOf&&Object.getPrototypeOf(we);it=it&&it.setTimeout?it:we,je={}.toString.call(we.process)==="[object process]"?function(Nt){process.nextTick(function(){lt(Nt)})}:function(){if(we.postMessage&&!we.importScripts){var Nt=!0,Rt=we.onmessage;return we.onmessage=function(){Nt=!1},we.postMessage("","*"),we.onmessage=Rt,Nt}}()?(vt="setImmediate$"+Math.random()+"$",we.addEventListener?we.addEventListener("message",Qt,!1):we.attachEvent("onmessage",Qt),function(Nt){we.postMessage(vt+Nt,"*")}):we.MessageChannel?((gt=new MessageChannel).port1.onmessage=function(Nt){lt(Nt.data)},function(Nt){gt.port2.postMessage(Nt)}):He&&"onreadystatechange"in He.createElement("script")?(rt=He.documentElement,function(Nt){var Rt=He.createElement("script");Rt.onreadystatechange=function(){lt(Nt),Rt.onreadystatechange=null,rt.removeChild(Rt),Rt=null},rt.appendChild(Rt)}):function(Nt){setTimeout(lt,0,Nt)},it.setImmediate=function(Nt){typeof Nt!="function"&&(Nt=new Function(""+Nt));for(var Rt=new Array(arguments.length-1),pr=0;pr"u"?fe===void 0?this:fe:self)}).call(this,typeof Le<"u"?Le:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(hn);var Oe=hn.exports;const Et=sr(Oe);var qt;(function(Ie){Ie.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Ie.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",Ie.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Ie.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",Ie.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Ie.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",Ie.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Ie.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",Ie.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",Ie.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Ie.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",Ie.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",Ie.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",Ie.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",Ie.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Ie.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Ie.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties",Ie.Comments="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",Ie.CommentsExtended="http://schemas.microsoft.com/office/2011/relationships/commentsExtended"})(qt||(qt={}));function nr(Ie,P){return P.elements(Ie).map(L=>({id:P.attr(L,"Id"),type:P.attr(L,"Type"),target:P.attr(L,"Target"),targetMode:P.attr(L,"TargetMode")}))}const Nr={wordml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",drawingml:"http://schemas.openxmlformats.org/drawingml/2006/main",picture:"http://schemas.openxmlformats.org/drawingml/2006/picture",compatibility:"http://schemas.openxmlformats.org/markup-compatibility/2006",math:"http://schemas.openxmlformats.org/officeDocument/2006/math"},zt={Dxa:{mul:.05,unit:"pt"},Emu:{mul:1/12700,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt"},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"},LineHeight:{mul:1/240,unit:""},VmlEmu:{mul:1/12700,unit:""}};function Cr(Ie,P=zt.Dxa){return Ie==null||/.+(p[xt]|[%])$/.test(Ie)?Ie:`${(parseInt(Ie)*P.mul).toFixed(2)}${P.unit}`}function Wr(Ie,P=!1){switch(Ie){case"1":return!0;case"0":return!1;case"on":return!0;case"off":return!1;case"true":return!0;case"false":return!1;default:return P}}function un(Ie,P,L){if(Ie.namespaceURI!=Nr.wordml)return!1;switch(Ie.localName){case"color":P.color=L.attr(Ie,"val");break;case"sz":P.fontSize=L.lengthAttr(Ie,"val",zt.FontSize);break;default:return!1}return!0}function Ui(Ie,P=!1){P&&(Ie=Ie.replace(/<[?].*[?]>/,"")),Ie=Po(Ie);const L=new DOMParser().parseFromString(Ie,"application/xml"),V=Ea(L);if(V)throw new Error(V);return L}function Ea(Ie){var P;return(P=Ie.getElementsByTagName("parsererror")[0])==null?void 0:P.textContent}function Po(Ie){return Ie.charCodeAt(0)===65279?Ie.substring(1):Ie}function Ds(Ie){return new XMLSerializer().serializeToString(Ie)}class co{elements(P,L=null){const V=[];for(let ne=0,fe=P.childNodes.length;neyo(L,P))}function yo(Ie,P){let L={name:P.attr(Ie,"name"),embedFontRefs:[]};for(let V of P.elements(Ie))switch(V.localName){case"family":L.family=P.attr(V,"val");break;case"altName":L.altName=P.attr(V,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":L.embedFontRefs.push(_a(V,P));break}return L}function _a(Ie,P){return{id:P.attr(Ie,"id"),key:P.attr(Ie,"fontKey"),type:Ji[Ie.localName]}}class ln extends Qa{parseXml(P){this.fonts=La(P,this._package.xmlParser)}}function gn(Ie){return Ie==null?void 0:Ie.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}function cn(Ie){let P=Ie.lastIndexOf("/")+1,L=P==0?"":Ie.substring(0,P),V=P==0?Ie:Ie.substring(P);return[L,V]}function Dn(Ie,P){try{const L="http://docx/";return new URL(Ie,L+P).toString().substring(L.length)}catch{return`${P}${Ie}`}}function xn(Ie,P){return Ie.reduce((L,V)=>(L[P(V)]=V,L),{})}function Wn(Ie){return new Promise((P,L)=>{const V=new FileReader;V.onloadend=()=>P(V.result),V.onerror=()=>L(),V.readAsDataURL(Ie)})}function Vi(Ie){return Ie&&typeof Ie=="object"&&!Array.isArray(Ie)}function uo(Ie){return typeof Ie=="string"||Ie instanceof String}function tn(Ie,...P){var L;if(!P.length)return Ie;const V=P.shift();if(Vi(Ie)&&Vi(V))for(const ne in V)if(Vi(V[ne])){const fe=(L=Ie[ne])!=null?L:Ie[ne]={};tn(fe,V[ne])}else Ie[ne]=V[ne];return tn(Ie,...P)}function xr(Ie){return Array.isArray(Ie)?Ie:[Ie]}class Ei{constructor(P,L){this._zip=P,this.options=L,this.xmlParser=new co}get(P){var L;const V=Ni(P);return(L=this._zip.files[V])!=null?L:this._zip.files[V.replace(/\//g,"\\")]}update(P,L){this._zip.file(P,L)}static load(P,L){return yr(this,null,function*(){const V=yield Et.loadAsync(P);return new Ei(V,L)})}save(P="blob"){return this._zip.generateAsync({type:P})}load(P,L="string"){var V,ne;return(ne=(V=this.get(P))==null?void 0:V.async(L))!=null?ne:Promise.resolve(null)}loadRelationships(P=null){return yr(this,null,function*(){let L="_rels/.rels";if(P!=null){const[ne,fe]=cn(P);L=`${ne}_rels/${fe}.rels`}const V=yield this.load(L);return V?nr(this.parseXmlDocument(V).firstElementChild,this.xmlParser):null})}parseXmlDocument(P){return Ui(P,this.options.trimXmlDeclaration)}}function Ni(Ie){return Ie.startsWith("/")?Ie.substr(1):Ie}class ji extends Qa{constructor(P,L,V){super(P,L),this._documentParser=V}parseXml(P){this.body=this._documentParser.parseDocumentFile(P)}}function wa(Ie,P){return{type:P.attr(Ie,"val"),color:P.attr(Ie,"color"),size:P.lengthAttr(Ie,"sz",zt.Border),offset:P.lengthAttr(Ie,"space",zt.Point),frame:P.boolAttr(Ie,"frame"),shadow:P.boolAttr(Ie,"shadow")}}function Oa(Ie,P){var L={};for(let V of P.elements(Ie))switch(V.localName){case"left":L.left=wa(V,P);break;case"top":L.top=wa(V,P);break;case"right":L.right=wa(V,P);break;case"bottom":L.bottom=wa(V,P);break}return L}var Ja;(function(Ie){Ie.Continuous="continuous",Ie.NextPage="nextPage",Ie.NextColumn="nextColumn",Ie.EvenPage="evenPage",Ie.OddPage="oddPage"})(Ja||(Ja={}));function lo(Ie,P=kt){var L,V,ne={};for(let fe of P.elements(Ie))switch(fe.localName){case"pgSz":ne.pageSize={width:P.lengthAttr(fe,"w"),height:P.lengthAttr(fe,"h"),orientation:P.attr(fe,"orient")};break;case"type":ne.type=P.attr(fe,"val");break;case"pgMar":ne.pageMargins={left:P.lengthAttr(fe,"left"),right:P.lengthAttr(fe,"right"),top:P.lengthAttr(fe,"top"),bottom:P.lengthAttr(fe,"bottom"),header:P.lengthAttr(fe,"header"),footer:P.lengthAttr(fe,"footer"),gutter:P.lengthAttr(fe,"gutter")};break;case"cols":ne.columns=Go(fe,P);break;case"headerReference":((L=ne.headerRefs)!=null?L:ne.headerRefs=[]).push(zs(fe,P));break;case"footerReference":((V=ne.footerRefs)!=null?V:ne.footerRefs=[]).push(zs(fe,P));break;case"titlePg":ne.titlePage=P.boolAttr(fe,"val",!0);break;case"pgBorders":ne.pageBorders=Oa(fe,P);break;case"pgNumType":ne.pageNumber=Sc(fe,P);break}return ne}function Go(Ie,P){return{numberOfColumns:P.intAttr(Ie,"num"),space:P.lengthAttr(Ie,"space"),separator:P.boolAttr(Ie,"sep"),equalWidth:P.boolAttr(Ie,"equalWidth",!0),columns:P.elements(Ie,"col").map(L=>({width:P.lengthAttr(L,"w"),space:P.lengthAttr(L,"space")}))}}function Sc(Ie,P){return{chapSep:P.attr(Ie,"chapSep"),chapStyle:P.attr(Ie,"chapStyle"),format:P.attr(Ie,"fmt"),start:P.intAttr(Ie,"start")}}function zs(Ie,P){return{id:P.attr(Ie,"id"),type:P.attr(Ie,"type")}}function Vs(Ie,P){return{before:P.lengthAttr(Ie,"before"),after:P.lengthAttr(Ie,"after"),line:P.intAttr(Ie,"line"),lineRule:P.attr(Ie,"lineRule")}}function So(Ie,P){let L={};for(let V of P.elements(Ie))Rs(V,L,P);return L}function Rs(Ie,P,L){return!!un(Ie,P,L)}function Or(Ie,P){let L={};for(let V of P.elements(Ie))$r(V,L,P);return L}function $r(Ie,P,L){if(Ie.namespaceURI!=Nr.wordml)return!1;if(un(Ie,P,L))return!0;switch(Ie.localName){case"tabs":P.tabs=jn(Ie,L);break;case"sectPr":P.sectionProps=lo(Ie,L);break;case"numPr":P.numbering=gi(Ie,L);break;case"spacing":return P.lineSpacing=Vs(Ie,L),!1;case"textAlignment":return P.textAlignment=L.attr(Ie,"val"),!1;case"keepLines":P.keepLines=L.boolAttr(Ie,"val",!0);break;case"keepNext":P.keepNext=L.boolAttr(Ie,"val",!0);break;case"pageBreakBefore":P.pageBreakBefore=L.boolAttr(Ie,"val",!0);break;case"outlineLvl":P.outlineLevel=L.intAttr(Ie,"val");break;case"pStyle":P.styleName=L.attr(Ie,"val");break;case"rPr":P.runProps=So(Ie,L);break;default:return!1}return!0}function jn(Ie,P){return P.elements(Ie,"tab").map(L=>({position:P.lengthAttr(L,"pos"),leader:P.attr(L,"leader"),style:P.attr(L,"val")}))}function gi(Ie,P){var L={};for(let V of P.elements(Ie))switch(V.localName){case"numId":L.id=P.attr(V,"val");break;case"ilvl":L.level=P.intAttr(V,"val");break}return L}function da(Ie,P){let L={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let V of P.elements(Ie))switch(V.localName){case"num":L.numberings.push(Sr(V,P));break;case"abstractNum":L.abstractNumberings.push(br(V,P));break;case"numPicBullet":L.bulletPictures.push(ei(V,P));break}return L}function Sr(Ie,P){let L={id:P.attr(Ie,"numId"),overrides:[]};for(let V of P.elements(Ie))switch(V.localName){case"abstractNumId":L.abstractId=P.attr(V,"val");break;case"lvlOverride":L.overrides.push(Ai(V,P));break}return L}function br(Ie,P){let L={id:P.attr(Ie,"abstractNumId"),levels:[]};for(let V of P.elements(Ie))switch(V.localName){case"name":L.name=P.attr(V,"val");break;case"multiLevelType":L.multiLevelType=P.attr(V,"val");break;case"numStyleLink":L.numberingStyleLink=P.attr(V,"val");break;case"styleLink":L.styleLink=P.attr(V,"val");break;case"lvl":L.levels.push(Ln(V,P));break}return L}function Ln(Ie,P){let L={level:P.intAttr(Ie,"ilvl")};for(let V of P.elements(Ie))switch(V.localName){case"start":L.start=P.attr(V,"val");break;case"lvlRestart":L.restart=P.intAttr(V,"val");break;case"numFmt":L.format=P.attr(V,"val");break;case"lvlText":L.text=P.attr(V,"val");break;case"lvlJc":L.justification=P.attr(V,"val");break;case"lvlPicBulletId":L.bulletPictureId=P.attr(V,"val");break;case"pStyle":L.paragraphStyle=P.attr(V,"val");break;case"pPr":L.paragraphProps=Or(V,P);break;case"rPr":L.runProps=So(V,P);break}return L}function Ai(Ie,P){let L={level:P.intAttr(Ie,"ilvl")};for(let V of P.elements(Ie))switch(V.localName){case"startOverride":L.start=P.intAttr(V,"val");break;case"lvl":L.numberingLevel=Ln(V,P);break}return L}function ei(Ie,P){var L=P.element(Ie,"pict"),V=L&&P.element(L,"shape"),ne=V&&P.element(V,"imagedata");return ne?{id:P.attr(Ie,"numPicBulletId"),referenceId:P.attr(ne,"id"),style:P.attr(V,"style")}:null}class Li extends Qa{constructor(P,L,V){super(P,L),this._documentParser=V}parseXml(P){Object.assign(this,da(P,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(P)}}class lr extends Qa{constructor(P,L,V){super(P,L),this._documentParser=V}parseXml(P){this.styles=this._documentParser.parseStylesFile(P)}}var Lt;(function(Ie){Ie.Document="document",Ie.Paragraph="paragraph",Ie.Run="run",Ie.Break="break",Ie.NoBreakHyphen="noBreakHyphen",Ie.Table="table",Ie.Row="row",Ie.Cell="cell",Ie.Hyperlink="hyperlink",Ie.SmartTag="smartTag",Ie.Drawing="drawing",Ie.Image="image",Ie.Text="text",Ie.Tab="tab",Ie.Symbol="symbol",Ie.BookmarkStart="bookmarkStart",Ie.BookmarkEnd="bookmarkEnd",Ie.Footer="footer",Ie.Header="header",Ie.FootnoteReference="footnoteReference",Ie.EndnoteReference="endnoteReference",Ie.Footnote="footnote",Ie.Endnote="endnote",Ie.SimpleField="simpleField",Ie.ComplexField="complexField",Ie.Instruction="instruction",Ie.VmlPicture="vmlPicture",Ie.MmlMath="mmlMath",Ie.MmlMathParagraph="mmlMathParagraph",Ie.MmlFraction="mmlFraction",Ie.MmlFunction="mmlFunction",Ie.MmlFunctionName="mmlFunctionName",Ie.MmlNumerator="mmlNumerator",Ie.MmlDenominator="mmlDenominator",Ie.MmlRadical="mmlRadical",Ie.MmlBase="mmlBase",Ie.MmlDegree="mmlDegree",Ie.MmlSuperscript="mmlSuperscript",Ie.MmlSubscript="mmlSubscript",Ie.MmlPreSubSuper="mmlPreSubSuper",Ie.MmlSubArgument="mmlSubArgument",Ie.MmlSuperArgument="mmlSuperArgument",Ie.MmlNary="mmlNary",Ie.MmlDelimiter="mmlDelimiter",Ie.MmlRun="mmlRun",Ie.MmlEquationArray="mmlEquationArray",Ie.MmlLimit="mmlLimit",Ie.MmlLimitLower="mmlLimitLower",Ie.MmlMatrix="mmlMatrix",Ie.MmlMatrixRow="mmlMatrixRow",Ie.MmlBox="mmlBox",Ie.MmlBar="mmlBar",Ie.MmlGroupChar="mmlGroupChar",Ie.VmlElement="vmlElement",Ie.Inserted="inserted",Ie.Deleted="deleted",Ie.DeletedText="deletedText",Ie.Comment="comment",Ie.CommentReference="commentReference",Ie.CommentRangeStart="commentRangeStart",Ie.CommentRangeEnd="commentRangeEnd"})(Lt||(Lt={}));class ro{constructor(){this.children=[],this.cssStyle={}}}class Is extends ro{constructor(){super(...arguments),this.type=Lt.Header}}class Fs extends ro{constructor(){super(...arguments),this.type=Lt.Footer}}class Zc extends Qa{constructor(P,L,V){super(P,L),this._documentParser=V}parseXml(P){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(P)}}class Eu extends Zc{createRootElement(){return new Is}}class Xc extends Zc{createRootElement(){return new Fs}}function $c(Ie,P){const L={};for(let V of P.elements(Ie))switch(V.localName){case"Template":L.template=V.textContent;break;case"Pages":L.pages=_c(V.textContent);break;case"Words":L.words=_c(V.textContent);break;case"Characters":L.characters=_c(V.textContent);break;case"Application":L.application=V.textContent;break;case"Lines":L.lines=_c(V.textContent);break;case"Paragraphs":L.paragraphs=_c(V.textContent);break;case"Company":L.company=V.textContent;break;case"AppVersion":L.appVersion=V.textContent;break}return L}function _c(Ie){if(typeof Ie<"u")return parseInt(Ie)}class wu extends Qa{parseXml(P){this.props=$c(P,this._package.xmlParser)}}function Sn(Ie,P){const L={};for(let V of P.elements(Ie))switch(V.localName){case"title":L.title=V.textContent;break;case"description":L.description=V.textContent;break;case"subject":L.subject=V.textContent;break;case"creator":L.creator=V.textContent;break;case"keywords":L.keywords=V.textContent;break;case"language":L.language=V.textContent;break;case"lastModifiedBy":L.lastModifiedBy=V.textContent;break;case"revision":V.textContent&&(L.revision=parseInt(V.textContent));break}return L}class Zs extends Qa{parseXml(P){this.props=Sn(P,this._package.xmlParser)}}class ga{}function Bu(Ie,P){var L=new ga,V=P.element(Ie,"themeElements");for(let ne of P.elements(V))switch(ne.localName){case"clrScheme":L.colorScheme=Zu(ne,P);break;case"fontScheme":L.fontScheme=Ml(ne,P);break}return L}function Zu(Ie,P){var L={name:P.attr(Ie,"name"),colors:{}};for(let fe of P.elements(Ie)){var V=P.element(fe,"srgbClr"),ne=P.element(fe,"sysClr");V?L.colors[fe.localName]=P.attr(V,"val"):ne&&(L.colors[fe.localName]=P.attr(ne,"lastClr"))}return L}function Ml(Ie,P){var L={name:P.attr(Ie,"name")};for(let V of P.elements(Ie))switch(V.localName){case"majorFont":L.majorFont=Ac(V,P);break;case"minorFont":L.minorFont=Ac(V,P);break}return L}function Ac(Ie,P){return{latinTypeface:P.elementAttr(Ie,"latin","typeface"),eaTypeface:P.elementAttr(Ie,"ea","typeface"),csTypeface:P.elementAttr(Ie,"cs","typeface")}}class sa extends Qa{constructor(P,L){super(P,L)}parseXml(P){this.theme=Bu(P,this._package.xmlParser)}}class qa{}class Ao extends qa{constructor(){super(...arguments),this.type=Lt.Footnote}}class xA extends qa{constructor(){super(...arguments),this.type=Lt.Endnote}}class Vo extends Qa{constructor(P,L,V){super(P,L),this._documentParser=V}}class Xu extends Vo{constructor(P,L,V){super(P,L,V)}parseXml(P){this.notes=this._documentParser.parseNotes(P,"footnote",Ao)}}class Gf extends Vo{constructor(P,L,V){super(P,L,V)}parseXml(P){this.notes=this._documentParser.parseNotes(P,"endnote",xA)}}function Mt(Ie,P){var L={};for(let V of P.elements(Ie))switch(V.localName){case"defaultTabStop":L.defaultTabStop=P.lengthAttr(V,"val");break;case"footnotePr":L.footnoteProps=di(V,P);break;case"endnotePr":L.endnoteProps=di(V,P);break;case"autoHyphenation":L.autoHyphenation=P.boolAttr(V,"val");break}return L}function di(Ie,P){var L={defaultNoteIds:[]};for(let V of P.elements(Ie))switch(V.localName){case"numFmt":L.nummeringFormat=P.attr(V,"val");break;case"footnote":case"endnote":L.defaultNoteIds.push(P.attr(V,"id"));break}return L}class Ur extends Qa{constructor(P,L){super(P,L)}parseXml(P){this.settings=Mt(P,this._package.xmlParser)}}function Bg(Ie,P){return P.elements(Ie,"property").map(L=>{const V=L.firstChild;return{formatId:P.attr(L,"fmtid"),name:P.attr(L,"name"),type:V.nodeName,value:V.textContent}})}class Uo extends Qa{parseXml(P){this.props=Bg(P,this._package.xmlParser)}}class Uf extends Qa{constructor(P,L,V){super(P,L),this._documentParser=V}parseXml(P){this.comments=this._documentParser.parseComments(P),this.commentMap=xn(this.comments,L=>L.id)}}class Dh extends Qa{constructor(P,L){super(P,L),this.comments=[]}parseXml(P){const L=this._package.xmlParser;for(let V of L.elements(P,"commentEx"))this.comments.push({paraId:L.attr(V,"paraId"),paraIdParent:L.attr(V,"paraIdParent"),done:L.boolAttr(V,"done")});this.commentMap=xn(this.comments,V=>V.paraId)}}const jf=[{type:qt.OfficeDocument,target:"word/document.xml"},{type:qt.ExtendedProperties,target:"docProps/app.xml"},{type:qt.CoreProperties,target:"docProps/core.xml"},{type:qt.CustomProperties,target:"docProps/custom.xml"}];class Rh{constructor(){this.parts=[],this.partsMap={}}static load(P,L,V){return yr(this,null,function*(){var ne=new Rh;return ne._options=V,ne._parser=L,ne._package=yield Ei.load(P,V),ne.rels=yield ne._package.loadRelationships(),yield Promise.all(jf.map(fe=>{var we;const Qe=(we=ne.rels.find(je=>je.type===fe.type))!=null?we:fe;return ne.loadRelationshipPart(Qe.target,Qe.type)})),ne})}save(P="blob"){return this._package.save(P)}loadRelationshipPart(P,L){return yr(this,null,function*(){var V;if(this.partsMap[P])return this.partsMap[P];if(!this._package.get(P))return null;let ne=null;switch(L){case qt.OfficeDocument:this.documentPart=ne=new ji(this._package,P,this._parser);break;case qt.FontTable:this.fontTablePart=ne=new ln(this._package,P);break;case qt.Numbering:this.numberingPart=ne=new Li(this._package,P,this._parser);break;case qt.Styles:this.stylesPart=ne=new lr(this._package,P,this._parser);break;case qt.Theme:this.themePart=ne=new sa(this._package,P);break;case qt.Footnotes:this.footnotesPart=ne=new Xu(this._package,P,this._parser);break;case qt.Endnotes:this.endnotesPart=ne=new Gf(this._package,P,this._parser);break;case qt.Footer:ne=new Xc(this._package,P,this._parser);break;case qt.Header:ne=new Eu(this._package,P,this._parser);break;case qt.CoreProperties:this.corePropsPart=ne=new Zs(this._package,P);break;case qt.ExtendedProperties:this.extendedPropsPart=ne=new wu(this._package,P);break;case qt.CustomProperties:ne=new Uo(this._package,P);break;case qt.Settings:this.settingsPart=ne=new Ur(this._package,P);break;case qt.Comments:this.commentsPart=ne=new Uf(this._package,P,this._parser);break;case qt.CommentsExtended:this.commentsExtendedPart=ne=new Dh(this._package,P);break}if(ne==null)return Promise.resolve(null);if(this.partsMap[P]=ne,this.parts.push(ne),yield ne.load(),((V=ne.rels)==null?void 0:V.length)>0){const[fe]=cn(ne.path);yield Promise.all(ne.rels.map(we=>this.loadRelationshipPart(Dn(we.target,fe),we.type)))}return ne})}loadDocumentImage(P,L){return yr(this,null,function*(){const V=yield this.loadResource(L??this.documentPart,P,"blob");return this.blobToURL(V)})}loadNumberingImage(P){return yr(this,null,function*(){const L=yield this.loadResource(this.numberingPart,P,"blob");return this.blobToURL(L)})}loadFont(P,L){return yr(this,null,function*(){const V=yield this.loadResource(this.fontTablePart,P,"uint8array");return V&&this.blobToURL(new Blob([SA(V,L)]))})}blobToURL(P){return P?this._options.useBase64URL?Wn(P):URL.createObjectURL(P):null}findPartByRelId(P,L=null){var V,ne=((V=L.rels)!=null?V:this.rels).find(we=>we.id==P);const fe=L?cn(L.path)[0]:"";return ne?this.partsMap[Dn(ne.target,fe)]:null}getPathById(P,L){const V=P.rels.find(fe=>fe.id==L),[ne]=cn(P.path);return V?Dn(V.target,ne):null}loadResource(P,L,V){const ne=this.getPathById(P,L);return ne?this._package.load(ne,V):Promise.resolve(null)}}function SA(Ie,P){const L=P.replace(/{|}|-/g,""),V=new Array(16);for(let ne=0;ne<16;ne++)V[16-ne-1]=parseInt(L.substr(ne*2,2),16);for(let ne=0;ne<32;ne++)Ie[ne]=Ie[ne]^V[ne%16];return Ie}function Qg(Ie,P){return{type:Lt.BookmarkStart,id:P.attr(Ie,"id"),name:P.attr(Ie,"name"),colFirst:P.intAttr(Ie,"colFirst"),colLast:P.intAttr(Ie,"colLast")}}function kg(Ie,P){return{type:Lt.BookmarkEnd,id:P.attr(Ie,"id")}}class xg extends ro{constructor(){super(...arguments),this.type=Lt.VmlElement,this.attrs={}}}function Fh(Ie,P){var L=new xg;switch(Ie.localName){case"rect":L.tagName="rect",Object.assign(L.attrs,{width:"100%",height:"100%"});break;case"oval":L.tagName="ellipse",Object.assign(L.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":L.tagName="line";break;case"shape":L.tagName="g";break;case"textbox":L.tagName="foreignObject",Object.assign(L.attrs,{width:"100%",height:"100%"});break;default:return null}for(const V of kt.attrs(Ie))switch(V.localName){case"style":L.cssStyleText=V.value;break;case"fillcolor":L.attrs.fill=V.value;break;case"from":const[ne,fe]=Yf(V.value);Object.assign(L.attrs,{x1:ne,y1:fe});break;case"to":const[we,Qe]=Yf(V.value);Object.assign(L.attrs,{x2:we,y2:Qe});break}for(const V of kt.elements(Ie))switch(V.localName){case"stroke":Object.assign(L.attrs,Hf(V));break;case"fill":Object.assign(L.attrs,Sg());break;case"imagedata":L.tagName="image",Object.assign(L.attrs,{width:"100%",height:"100%"}),L.imageHref={id:kt.attr(V,"id"),title:kt.attr(V,"title")};break;case"txbxContent":L.children.push(...P.parseBodyElements(V));break;default:const ne=Fh(V,P);ne&&L.children.push(ne);break}return L}function Hf(Ie){var P;return{stroke:kt.attr(Ie,"color"),"stroke-width":(P=kt.lengthAttr(Ie,"weight",zt.Emu))!=null?P:"1px"}}function Sg(Ie){return{}}function Yf(Ie){return Ie.split(",")}class _g extends ro{constructor(){super(...arguments),this.type=Lt.Comment}}class Dg extends ro{constructor(P){super(),this.id=P,this.type=Lt.CommentReference}}class Qu extends ro{constructor(P){super(),this.id=P,this.type=Lt.CommentRangeStart}}class _A extends ro{constructor(P){super(),this.id=P,this.type=Lt.CommentRangeEnd}}var $u={shd:"inherit",color:"black",borderColor:"black",highlight:"transparent"};const hi=[],ku={oMath:Lt.MmlMath,oMathPara:Lt.MmlMathParagraph,f:Lt.MmlFraction,func:Lt.MmlFunction,fName:Lt.MmlFunctionName,num:Lt.MmlNumerator,den:Lt.MmlDenominator,rad:Lt.MmlRadical,deg:Lt.MmlDegree,e:Lt.MmlBase,sSup:Lt.MmlSuperscript,sSub:Lt.MmlSubscript,sPre:Lt.MmlPreSubSuper,sup:Lt.MmlSuperArgument,sub:Lt.MmlSubArgument,d:Lt.MmlDelimiter,nary:Lt.MmlNary,eqArr:Lt.MmlEquationArray,lim:Lt.MmlLimit,limLow:Lt.MmlLimitLower,m:Lt.MmlMatrix,mr:Lt.MmlMatrixRow,box:Lt.MmlBox,bar:Lt.MmlBar,groupChr:Lt.MmlGroupChar};class Rg{constructor(P){this.options=Tt({ignoreWidth:!1,debug:!1},P)}parseNotes(P,L,V){var ne=[];for(let fe of kt.elements(P,L)){const we=new V;we.id=kt.attr(fe,"id"),we.noteType=kt.attr(fe,"type"),we.children=this.parseBodyElements(fe),ne.push(we)}return ne}parseComments(P){var L=[];for(let V of kt.elements(P,"comment")){const ne=new _g;ne.id=kt.attr(V,"id"),ne.author=kt.attr(V,"author"),ne.initials=kt.attr(V,"initials"),ne.date=kt.attr(V,"date"),ne.children=this.parseBodyElements(V),L.push(ne)}return L}parseDocumentFile(P){var L=kt.element(P,"body"),V=kt.element(P,"background"),ne=kt.element(L,"sectPr");return{type:Lt.Document,children:this.parseBodyElements(L),props:ne?lo(ne,kt):{},cssStyle:V?this.parseBackground(V):{}}}parseBackground(P){var L={},V=Ba.colorAttr(P,"color");return V&&(L["background-color"]=V),L}parseBodyElements(P){var L=[];for(let V of kt.elements(P))switch(V.localName){case"p":L.push(this.parseParagraph(V));break;case"tbl":L.push(this.parseTable(V));break;case"sdt":L.push(...this.parseSdt(V,ne=>this.parseBodyElements(ne)));break}return L}parseStylesFile(P){var L=[];return Ba.foreach(P,V=>{switch(V.localName){case"style":L.push(this.parseStyle(V));break;case"docDefaults":L.push(this.parseDefaultStyles(V));break}}),L}parseDefaultStyles(P){var L={id:null,name:null,target:null,basedOn:null,styles:[]};return Ba.foreach(P,V=>{switch(V.localName){case"rPrDefault":var ne=kt.element(V,"rPr");ne&&L.styles.push({target:"span",values:this.parseDefaultProperties(ne,{})});break;case"pPrDefault":var fe=kt.element(V,"pPr");fe&&L.styles.push({target:"p",values:this.parseDefaultProperties(fe,{})});break}}),L}parseStyle(P){var L={id:kt.attr(P,"styleId"),isDefault:kt.boolAttr(P,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(kt.attr(P,"type")){case"paragraph":L.target="p";break;case"table":L.target="table";break;case"character":L.target="span";break}return Ba.foreach(P,V=>{switch(V.localName){case"basedOn":L.basedOn=kt.attr(V,"val");break;case"name":L.name=kt.attr(V,"val");break;case"link":L.linked=kt.attr(V,"val");break;case"next":L.next=kt.attr(V,"val");break;case"aliases":L.aliases=kt.attr(V,"val").split(",");break;case"pPr":L.styles.push({target:"p",values:this.parseDefaultProperties(V,{})}),L.paragraphProps=Or(V,kt);break;case"rPr":L.styles.push({target:"span",values:this.parseDefaultProperties(V,{})}),L.runProps=So(V,kt);break;case"tblPr":case"tcPr":L.styles.push({target:"td",values:this.parseDefaultProperties(V,{})});break;case"tblStylePr":for(let ne of this.parseTableStyle(V))L.styles.push(ne);break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:this.options.debug&&console.warn(`DOCX: Unknown style element: ${V.localName}`)}}),L}parseTableStyle(P){var L=[],V=kt.attr(P,"type"),ne="",fe="";switch(V){case"firstRow":fe=".first-row",ne="tr.first-row td";break;case"lastRow":fe=".last-row",ne="tr.last-row td";break;case"firstCol":fe=".first-col",ne="td.first-col";break;case"lastCol":fe=".last-col",ne="td.last-col";break;case"band1Vert":fe=":not(.no-vband)",ne="td.odd-col";break;case"band2Vert":fe=":not(.no-vband)",ne="td.even-col";break;case"band1Horz":fe=":not(.no-hband)",ne="tr.odd-row";break;case"band2Horz":fe=":not(.no-hband)",ne="tr.even-row";break;default:return[]}return Ba.foreach(P,we=>{switch(we.localName){case"pPr":L.push({target:`${ne} p`,mod:fe,values:this.parseDefaultProperties(we,{})});break;case"rPr":L.push({target:`${ne} span`,mod:fe,values:this.parseDefaultProperties(we,{})});break;case"tblPr":case"tcPr":L.push({target:ne,mod:fe,values:this.parseDefaultProperties(we,{})});break}}),L}parseNumberingFile(P){var L=[],V={},ne=[];return Ba.foreach(P,fe=>{switch(fe.localName){case"abstractNum":this.parseAbstractNumbering(fe,ne).forEach(je=>L.push(je));break;case"numPicBullet":ne.push(this.parseNumberingPicBullet(fe));break;case"num":var we=kt.attr(fe,"numId"),Qe=kt.elementAttr(fe,"abstractNumId","val");V[Qe]=we;break}}),L.forEach(fe=>fe.id=V[fe.id]),L}parseNumberingPicBullet(P){var L=kt.element(P,"pict"),V=L&&kt.element(L,"shape"),ne=V&&kt.element(V,"imagedata");return ne?{id:kt.intAttr(P,"numPicBulletId"),src:kt.attr(ne,"id"),style:kt.attr(V,"style")}:null}parseAbstractNumbering(P,L){var V=[],ne=kt.attr(P,"abstractNumId");return Ba.foreach(P,fe=>{switch(fe.localName){case"lvl":V.push(this.parseNumberingLevel(ne,fe,L));break}}),V}parseNumberingLevel(P,L,V){var ne={id:P,level:kt.intAttr(L,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return Ba.foreach(L,fe=>{switch(fe.localName){case"start":ne.start=kt.intAttr(fe,"val");break;case"pPr":this.parseDefaultProperties(fe,ne.pStyle);break;case"rPr":this.parseDefaultProperties(fe,ne.rStyle);break;case"lvlPicBulletId":var we=kt.intAttr(fe,"val");ne.bullet=V.find(Qe=>(Qe==null?void 0:Qe.id)==we);break;case"lvlText":ne.levelText=kt.attr(fe,"val");break;case"pStyle":ne.pStyleName=kt.attr(fe,"val");break;case"numFmt":ne.format=kt.attr(fe,"val");break;case"suff":ne.suff=kt.attr(fe,"val");break}}),ne}parseSdt(P,L){const V=kt.element(P,"sdtContent");return V?L(V):[]}parseInserted(P,L){var V,ne;return{type:Lt.Inserted,children:(ne=(V=L(P))==null?void 0:V.children)!=null?ne:[]}}parseDeleted(P,L){var V,ne;return{type:Lt.Deleted,children:(ne=(V=L(P))==null?void 0:V.children)!=null?ne:[]}}parseParagraph(P){var L={type:Lt.Paragraph,children:[]};for(let V of kt.elements(P))switch(V.localName){case"pPr":this.parseParagraphProperties(V,L);break;case"r":L.children.push(this.parseRun(V,L));break;case"hyperlink":L.children.push(this.parseHyperlink(V,L));break;case"smartTag":L.children.push(this.parseSmartTag(V,L));break;case"bookmarkStart":L.children.push(Qg(V,kt));break;case"bookmarkEnd":L.children.push(kg(V,kt));break;case"commentRangeStart":L.children.push(new Qu(kt.attr(V,"id")));break;case"commentRangeEnd":L.children.push(new _A(kt.attr(V,"id")));break;case"oMath":case"oMathPara":L.children.push(this.parseMathElement(V));break;case"sdt":L.children.push(...this.parseSdt(V,ne=>this.parseParagraph(ne).children));break;case"ins":L.children.push(this.parseInserted(V,ne=>this.parseParagraph(ne)));break;case"del":L.children.push(this.parseDeleted(V,ne=>this.parseParagraph(ne)));break}return L}parseParagraphProperties(P,L){this.parseDefaultProperties(P,L.cssStyle={},null,V=>{if($r(V,L,kt))return!0;switch(V.localName){case"pStyle":L.styleName=kt.attr(V,"val");break;case"cnfStyle":L.className=pa.classNameOfCnfStyle(V);break;case"framePr":this.parseFrame(V,L);break;case"rPr":break;default:return!1}return!0})}parseFrame(P,L){var V=kt.attr(P,"dropCap");V=="drop"&&(L.cssStyle.float="left")}parseHyperlink(P,L){var V={type:Lt.Hyperlink,parent:L,children:[]},ne=kt.attr(P,"anchor"),fe=kt.attr(P,"id");return ne&&(V.href="#"+ne),fe&&(V.id=fe),Ba.foreach(P,we=>{switch(we.localName){case"r":V.children.push(this.parseRun(we,V));break}}),V}parseSmartTag(P,L){var V={type:Lt.SmartTag,parent:L,children:[]},ne=kt.attr(P,"uri"),fe=kt.attr(P,"element");return ne&&(V.uri=ne),fe&&(V.element=fe),Ba.foreach(P,we=>{switch(we.localName){case"r":V.children.push(this.parseRun(we,V));break}}),V}parseRun(P,L){var V={type:Lt.Run,parent:L,children:[]};return Ba.foreach(P,ne=>{switch(ne=this.checkAlternateContent(ne),ne.localName){case"t":V.children.push({type:Lt.Text,text:ne.textContent});break;case"delText":V.children.push({type:Lt.DeletedText,text:ne.textContent});break;case"commentReference":V.children.push(new Dg(kt.attr(ne,"id")));break;case"fldSimple":V.children.push({type:Lt.SimpleField,instruction:kt.attr(ne,"instr"),lock:kt.boolAttr(ne,"lock",!1),dirty:kt.boolAttr(ne,"dirty",!1)});break;case"instrText":V.fieldRun=!0,V.children.push({type:Lt.Instruction,text:ne.textContent});break;case"fldChar":V.fieldRun=!0,V.children.push({type:Lt.ComplexField,charType:kt.attr(ne,"fldCharType"),lock:kt.boolAttr(ne,"lock",!1),dirty:kt.boolAttr(ne,"dirty",!1)});break;case"noBreakHyphen":V.children.push({type:Lt.NoBreakHyphen});break;case"br":V.children.push({type:Lt.Break,break:kt.attr(ne,"type")||"textWrapping"});break;case"lastRenderedPageBreak":V.children.push({type:Lt.Break,break:"lastRenderedPageBreak"});break;case"sym":V.children.push({type:Lt.Symbol,font:kt.attr(ne,"font"),char:kt.attr(ne,"char")});break;case"tab":V.children.push({type:Lt.Tab});break;case"footnoteReference":V.children.push({type:Lt.FootnoteReference,id:kt.attr(ne,"id")});break;case"endnoteReference":V.children.push({type:Lt.EndnoteReference,id:kt.attr(ne,"id")});break;case"drawing":let fe=this.parseDrawing(ne);fe&&(V.children=[fe]);break;case"pict":V.children.push(this.parseVmlPicture(ne));break;case"rPr":this.parseRunProperties(ne,V);break}}),V}parseMathElement(P){const L=`${P.localName}Pr`,V={type:ku[P.localName],children:[]};for(const fe of kt.elements(P))if(ku[fe.localName])V.children.push(this.parseMathElement(fe));else if(fe.localName=="r"){var ne=this.parseRun(fe);ne.type=Lt.MmlRun,V.children.push(ne)}else fe.localName==L&&(V.props=this.parseMathProperies(fe));return V}parseMathProperies(P){const L={};for(const V of kt.elements(P))switch(V.localName){case"chr":L.char=kt.attr(V,"val");break;case"vertJc":L.verticalJustification=kt.attr(V,"val");break;case"pos":L.position=kt.attr(V,"val");break;case"degHide":L.hideDegree=kt.boolAttr(V,"val");break;case"begChr":L.beginChar=kt.attr(V,"val");break;case"endChr":L.endChar=kt.attr(V,"val");break}return L}parseRunProperties(P,L){this.parseDefaultProperties(P,L.cssStyle={},null,V=>{switch(V.localName){case"rStyle":L.styleName=kt.attr(V,"val");break;case"vertAlign":L.verticalAlign=pa.valueOfVertAlign(V,!0);break;default:return!1}return!0})}parseVmlPicture(P){const L={type:Lt.VmlPicture,children:[]};for(const V of kt.elements(P)){const ne=Fh(V,this);ne&&L.children.push(ne)}return L}checkAlternateContent(P){var L;if(P.localName!="AlternateContent")return P;var V=kt.element(P,"Choice");if(V){var ne=kt.attr(V,"Requires"),fe=P.lookupNamespaceURI(ne);if(hi.includes(fe))return V.firstElementChild}return(L=kt.element(P,"Fallback"))==null?void 0:L.firstElementChild}parseDrawing(P){for(var L of kt.elements(P))switch(L.localName){case"inline":case"anchor":return this.parseDrawingWrapper(L)}}parseDrawingWrapper(P){var L,V={type:Lt.Drawing,children:[],cssStyle:{}},ne=P.localName=="anchor";let fe=null,we=kt.boolAttr(P,"simplePos");kt.boolAttr(P,"behindDoc");let Qe={relative:"page",align:"left",offset:"0"},je={relative:"page",align:"top",offset:"0"};for(var rt of kt.elements(P))switch(rt.localName){case"simplePos":we&&(Qe.offset=kt.lengthAttr(rt,"x",zt.Emu),je.offset=kt.lengthAttr(rt,"y",zt.Emu));break;case"extent":V.cssStyle.width=kt.lengthAttr(rt,"cx",zt.Emu),V.cssStyle.height=kt.lengthAttr(rt,"cy",zt.Emu);break;case"positionH":case"positionV":if(!we){let We=rt.localName=="positionH"?Qe:je;var gt=kt.element(rt,"align"),vt=kt.element(rt,"posOffset");We.relative=(L=kt.attr(rt,"relativeFrom"))!=null?L:We.relative,gt&&(We.align=gt.textContent),vt&&(We.offset=Ba.sizeValue(vt,zt.Emu))}break;case"wrapTopAndBottom":fe="wrapTopAndBottom";break;case"wrapNone":fe="wrapNone";break;case"graphic":var mt=this.parseGraphic(rt);mt&&V.children.push(mt);break}return fe=="wrapTopAndBottom"?(V.cssStyle.display="block",Qe.align&&(V.cssStyle["text-align"]=Qe.align,V.cssStyle.width="100%")):fe=="wrapNone"?(V.cssStyle.display="block",V.cssStyle.position="relative",V.cssStyle.width="0px",V.cssStyle.height="0px",Qe.offset&&(V.cssStyle.left=Qe.offset),je.offset&&(V.cssStyle.top=je.offset)):ne&&(Qe.align=="left"||Qe.align=="right")&&(V.cssStyle.float=Qe.align),V}parseGraphic(P){var L=kt.element(P,"graphicData");for(let V of kt.elements(L))switch(V.localName){case"pic":return this.parsePicture(V)}return null}parsePicture(P){var L={type:Lt.Image,src:"",cssStyle:{}},V=kt.element(P,"blipFill"),ne=kt.element(V,"blip");L.src=kt.attr(ne,"embed");var fe=kt.element(P,"spPr"),we=kt.element(fe,"xfrm");L.cssStyle.position="relative";for(var Qe of kt.elements(we))switch(Qe.localName){case"ext":L.cssStyle.width=kt.lengthAttr(Qe,"cx",zt.Emu),L.cssStyle.height=kt.lengthAttr(Qe,"cy",zt.Emu);break;case"off":L.cssStyle.left=kt.lengthAttr(Qe,"x",zt.Emu),L.cssStyle.top=kt.lengthAttr(Qe,"y",zt.Emu);break}return L}parseTable(P){var L={type:Lt.Table,children:[]};return Ba.foreach(P,V=>{switch(V.localName){case"tr":L.children.push(this.parseTableRow(V));break;case"tblGrid":L.columns=this.parseTableColumns(V);break;case"tblPr":this.parseTableProperties(V,L);break}}),L}parseTableColumns(P){var L=[];return Ba.foreach(P,V=>{switch(V.localName){case"gridCol":L.push({width:kt.lengthAttr(V,"w")});break}}),L}parseTableProperties(P,L){switch(L.cssStyle={},L.cellStyle={},this.parseDefaultProperties(P,L.cssStyle,L.cellStyle,V=>{switch(V.localName){case"tblStyle":L.styleName=kt.attr(V,"val");break;case"tblLook":L.className=pa.classNameOftblLook(V);break;case"tblpPr":this.parseTablePosition(V,L);break;case"tblStyleColBandSize":L.colBandSize=kt.intAttr(V,"val");break;case"tblStyleRowBandSize":L.rowBandSize=kt.intAttr(V,"val");break;default:return!1}return!0}),L.cssStyle["text-align"]){case"center":delete L.cssStyle["text-align"],L.cssStyle["margin-left"]="auto",L.cssStyle["margin-right"]="auto";break;case"right":delete L.cssStyle["text-align"],L.cssStyle["margin-left"]="auto";break}}parseTablePosition(P,L){var V=kt.lengthAttr(P,"topFromText"),ne=kt.lengthAttr(P,"bottomFromText"),fe=kt.lengthAttr(P,"rightFromText"),we=kt.lengthAttr(P,"leftFromText");L.cssStyle.float="left",L.cssStyle["margin-bottom"]=pa.addSize(L.cssStyle["margin-bottom"],ne),L.cssStyle["margin-left"]=pa.addSize(L.cssStyle["margin-left"],we),L.cssStyle["margin-right"]=pa.addSize(L.cssStyle["margin-right"],fe),L.cssStyle["margin-top"]=pa.addSize(L.cssStyle["margin-top"],V)}parseTableRow(P){var L={type:Lt.Row,children:[]};return Ba.foreach(P,V=>{switch(V.localName){case"tc":L.children.push(this.parseTableCell(V));break;case"trPr":this.parseTableRowProperties(V,L);break}}),L}parseTableRowProperties(P,L){L.cssStyle=this.parseDefaultProperties(P,{},null,V=>{switch(V.localName){case"cnfStyle":L.className=pa.classNameOfCnfStyle(V);break;case"tblHeader":L.isHeader=kt.boolAttr(V,"val");break;default:return!1}return!0})}parseTableCell(P){var L={type:Lt.Cell,children:[]};return Ba.foreach(P,V=>{switch(V.localName){case"tbl":L.children.push(this.parseTable(V));break;case"p":L.children.push(this.parseParagraph(V));break;case"tcPr":this.parseTableCellProperties(V,L);break}}),L}parseTableCellProperties(P,L){L.cssStyle=this.parseDefaultProperties(P,{},null,V=>{var ne;switch(V.localName){case"gridSpan":L.span=kt.intAttr(V,"val",null);break;case"vMerge":L.verticalMerge=(ne=kt.attr(V,"val"))!=null?ne:"continue";break;case"cnfStyle":L.className=pa.classNameOfCnfStyle(V);break;default:return!1}return!0})}parseDefaultProperties(P,L=null,V=null,ne=null){return L=L||{},Ba.foreach(P,fe=>{if(!(ne!=null&&ne(fe)))switch(fe.localName){case"jc":L["text-align"]=pa.valueOfJc(fe);break;case"textAlignment":L["vertical-align"]=pa.valueOfTextAlignment(fe);break;case"color":L.color=Ba.colorAttr(fe,"val",null,$u.color);break;case"sz":L["font-size"]=L["min-height"]=kt.lengthAttr(fe,"val",zt.FontSize);break;case"shd":L["background-color"]=Ba.colorAttr(fe,"fill",null,$u.shd);break;case"highlight":L["background-color"]=Ba.colorAttr(fe,"val",null,$u.highlight);break;case"vertAlign":break;case"position":L.verticalAlign=kt.lengthAttr(fe,"val",zt.FontSize);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":L.width=pa.valueOfSize(fe,"w");break;case"trHeight":this.parseTrHeight(fe,L);break;case"strike":L["text-decoration"]=kt.boolAttr(fe,"val",!0)?"line-through":"none";break;case"b":L["font-weight"]=kt.boolAttr(fe,"val",!0)?"bold":"normal";break;case"i":L["font-style"]=kt.boolAttr(fe,"val",!0)?"italic":"normal";break;case"caps":L["text-transform"]=kt.boolAttr(fe,"val",!0)?"uppercase":"none";break;case"smallCaps":L["font-variant"]=kt.boolAttr(fe,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(fe,L);break;case"ind":case"tblInd":this.parseIndentation(fe,L);break;case"rFonts":this.parseFont(fe,L);break;case"tblBorders":this.parseBorderProperties(fe,V||L);break;case"tblCellSpacing":L["border-spacing"]=pa.valueOfMargin(fe),L["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(fe,L);break;case"bdr":L.border=pa.valueOfBorder(fe);break;case"tcBorders":this.parseBorderProperties(fe,L);break;case"vanish":kt.boolAttr(fe,"val",!0)&&(L.display="none");break;case"kern":break;case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(fe,V||L);break;case"tblLayout":L["table-layout"]=pa.valueOfTblLayout(fe);break;case"vAlign":L["vertical-align"]=pa.valueOfTextAlignment(fe);break;case"spacing":P.localName=="pPr"&&this.parseSpacing(fe,L);break;case"wordWrap":kt.boolAttr(fe,"val")&&(L["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":L.hyphens=kt.boolAttr(fe,"val",!0)?"none":"auto";break;case"lang":L.$lang=kt.attr(fe,"val");break;case"bCs":case"iCs":case"szCs":case"tabs":case"outlineLvl":case"contextualSpacing":case"tblStyleColBandSize":case"tblStyleRowBandSize":case"webHidden":case"pageBreakBefore":case"suppressLineNumbers":case"keepLines":case"keepNext":case"widowControl":case"bidi":case"rtl":case"noProof":break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${P.localName}.${fe.localName}`);break}}),L}parseUnderline(P,L){var V=kt.attr(P,"val");if(V!=null){switch(V){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":L["text-decoration"]="underline dashed";break;case"dotted":case"dottedHeavy":L["text-decoration"]="underline dotted";break;case"double":L["text-decoration"]="underline double";break;case"single":case"thick":L["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":L["text-decoration"]="underline wavy";break;case"words":L["text-decoration"]="underline";break;case"none":L["text-decoration"]="none";break}var ne=Ba.colorAttr(P,"color");ne&&(L["text-decoration-color"]=ne)}}parseFont(P,L){var V=kt.attr(P,"ascii"),ne=pa.themeValue(P,"asciiTheme"),fe=[V,ne].filter(we=>we).join(", ");fe.length>0&&(L["font-family"]=fe)}parseIndentation(P,L){var V=kt.lengthAttr(P,"firstLine"),ne=kt.lengthAttr(P,"hanging"),fe=kt.lengthAttr(P,"left"),we=kt.lengthAttr(P,"start"),Qe=kt.lengthAttr(P,"right"),je=kt.lengthAttr(P,"end");V&&(L["text-indent"]=V),ne&&(L["text-indent"]=`-${ne}`),(fe||we)&&(L["margin-left"]=fe||we),(Qe||je)&&(L["margin-right"]=Qe||je)}parseSpacing(P,L){var V=kt.lengthAttr(P,"before"),ne=kt.lengthAttr(P,"after"),fe=kt.intAttr(P,"line",null),we=kt.attr(P,"lineRule");if(V&&(L["margin-top"]=V),ne&&(L["margin-bottom"]=ne),fe!==null)switch(we){case"auto":L["line-height"]=`${(fe/240).toFixed(2)}`;break;case"atLeast":L["line-height"]=`calc(100% + ${fe/20}pt)`;break;default:L["line-height"]=L["min-height"]=`${fe/20}pt`;break}}parseMarginProperties(P,L){Ba.foreach(P,V=>{switch(V.localName){case"left":L["padding-left"]=pa.valueOfMargin(V);break;case"right":L["padding-right"]=pa.valueOfMargin(V);break;case"top":L["padding-top"]=pa.valueOfMargin(V);break;case"bottom":L["padding-bottom"]=pa.valueOfMargin(V);break}})}parseTrHeight(P,L){switch(kt.attr(P,"hRule")){case"exact":L.height=kt.lengthAttr(P,"val");break;case"atLeast":default:L.height=kt.lengthAttr(P,"val");break}}parseBorderProperties(P,L){Ba.foreach(P,V=>{switch(V.localName){case"start":case"left":L["border-left"]=pa.valueOfBorder(V);break;case"end":case"right":L["border-right"]=pa.valueOfBorder(V);break;case"top":L["border-top"]=pa.valueOfBorder(V);break;case"bottom":L["border-bottom"]=pa.valueOfBorder(V);break}})}}const Jf=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class Ba{static foreach(P,L){for(var V=0;VL[ne]=="1").join(" ")}static valueOfJc(P){var L=kt.attr(P,"val");switch(L){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return L}static valueOfVertAlign(P,L=!1){var V=kt.attr(P,"val");switch(V){case"subscript":return"sub";case"superscript":return L?"sup":"super"}return L?null:V}static valueOfTextAlignment(P){var L=kt.attr(P,"val");switch(L){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return L}static addSize(P,L){return P==null?L:L==null?P:`calc(${P} + ${L})`}static classNameOftblLook(P){const L=kt.hexAttr(P,"val",0);let V="";return(kt.boolAttr(P,"firstRow")||L&32)&&(V+=" first-row"),(kt.boolAttr(P,"lastRow")||L&64)&&(V+=" last-row"),(kt.boolAttr(P,"firstColumn")||L&128)&&(V+=" first-col"),(kt.boolAttr(P,"lastColumn")||L&256)&&(V+=" last-col"),(kt.boolAttr(P,"noHBand")||L&512)&&(V+=" no-hband"),(kt.boolAttr(P,"noVBand")||L&1024)&&(V+=" no-vband"),V.trim()}}const DA={pos:0,leader:"none",style:"left"},Fg=50;function Ng(Ie=document.body){const P=document.createElement("div");P.style.width="100pt",Ie.appendChild(P);const L=100/P.offsetWidth;return Ie.removeChild(P),L}function Nh(Ie,P,L,V=72/96){const ne=Ie.closest("p"),fe=Ie.getBoundingClientRect(),we=ne.getBoundingClientRect(),Qe=getComputedStyle(ne),je=(P==null?void 0:P.length)>0?P.map(lt=>({pos:eu(lt.position),leader:lt.leader,style:lt.style})).sort((lt,Qt)=>lt.pos-Qt.pos):[DA],rt=je[je.length-1],gt=we.width*V,vt=eu(L);let mt=rt.pos+vt;if(mtlt.style!="clear"&<.pos>He);if(it==null)return;let Xe=1;if(it.style=="right"||it.style=="center"){const lt=Array.from(ne.querySelectorAll(`.${Ie.className}`)),Qt=lt.indexOf(Ie)+1,Nt=document.createRange();Nt.setStart(Ie,1),QtQe.id)),P.endnotesPart&&(this.endnoteMap=xn(P.endnotesPart.notes,Qe=>Qe.id)),P.settingsPart&&(this.defaultTabSize=(fe=P.settingsPart.settings)==null?void 0:fe.defaultTabStop),!ne.ignoreFonts&&P.fontTablePart&&this.renderFontTable(P.fontTablePart,V);var we=this.renderSections(P.documentPart.body);this.options.inWrapper?L.appendChild(this.renderWrapper(we)):tl(L,we),this.commentHighlight&&ne.renderComments&&CSS.highlights.set(`${this.className}-comments`,this.commentHighlight),this.refreshTabStops(),this.postRenderTasks.forEach(Qe=>Qe())}renderTheme(P,L){var V,ne;const fe={},we=(V=P.theme)==null?void 0:V.fontScheme;we&&(we.majorFont&&(fe["--docx-majorHAnsi-font"]=we.majorFont.latinTypeface),we.minorFont&&(fe["--docx-minorHAnsi-font"]=we.minorFont.latinTypeface));const Qe=(ne=P.theme)==null?void 0:ne.colorScheme;if(Qe)for(let[rt,gt]of Object.entries(Qe.colors))fe[`--docx-${rt}-color`]=`#${gt}`;const je=this.styleToString(`.${this.className}`,fe);L.appendChild(xu(je))}renderFontTable(P,L){for(let V of P.fonts)for(let ne of V.embedFontRefs)this.tasks.push(this.document.loadFont(ne.id,ne.key).then(fe=>{const we={"font-family":V.name,src:`url(${fe})`};(ne.type=="bold"||ne.type=="boldItalic")&&(we["font-weight"]="bold"),(ne.type=="italic"||ne.type=="boldItalic")&&(we["font-style"]="italic"),rl(L,`docxjs ${V.name} font`);const Qe=this.styleToString("@font-face",we);L.appendChild(xu(Qe)),this.refreshTabStops()}))}processStyleName(P){return P?`${this.className}_${gn(P)}`:this.className}processStyles(P){const L=xn(P.filter(ne=>ne.id!=null),ne=>ne.id);for(const ne of P.filter(fe=>fe.basedOn)){var V=L[ne.basedOn];if(V){ne.paragraphProps=tn(ne.paragraphProps,V.paragraphProps),ne.runProps=tn(ne.runProps,V.runProps);for(const fe of V.styles){const we=ne.styles.find(Qe=>Qe.target==fe.target);we?this.copyStyleProperties(fe.values,we.values):ne.styles.push(Fe(Tt({},fe),{values:Tt({},fe.values)}))}}else this.options.debug&&console.warn(`Can't find base style ${ne.basedOn}`)}for(let ne of P)ne.cssName=this.processStyleName(ne.id);return L}prodessNumberings(P){var L;for(let V of P.filter(ne=>ne.pStyleName)){const ne=this.findStyle(V.pStyleName);(L=ne==null?void 0:ne.paragraphProps)!=null&&L.numbering&&(ne.paragraphProps.numbering.level=V.level)}}processElement(P){if(P.children)for(var L of P.children)L.parent=P,L.type==Lt.Table?this.processTable(L):this.processElement(L)}processTable(P){for(var L of P.children)for(var V of L.children)V.cssStyle=this.copyStyleProperties(P.cellStyle,V.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(V)}copyStyleProperties(P,L,V=null){if(!P)return L;L==null&&(L={}),V==null&&(V=Object.getOwnPropertyNames(P));for(var ne of V)P.hasOwnProperty(ne)&&!L.hasOwnProperty(ne)&&(L[ne]=P[ne]);return L}createPageElement(P,L){var V=this.createElement("section",{className:P});return L&&(L.pageMargins&&(V.style.paddingLeft=L.pageMargins.left,V.style.paddingRight=L.pageMargins.right,V.style.paddingTop=L.pageMargins.top,V.style.paddingBottom=L.pageMargins.bottom),L.pageSize&&(this.options.ignoreWidth||(V.style.width=L.pageSize.width),this.options.ignoreHeight||(V.style.minHeight=L.pageSize.height))),V}createSectionContent(P){var L=this.createElement("article");return P.columns&&P.columns.numberOfColumns&&(L.style.columnCount=`${P.columns.numberOfColumns}`,L.style.columnGap=P.columns.space,P.columns.separator&&(L.style.columnRule="1px solid black")),L}renderSections(P){const L=[];this.processElement(P);const V=this.splitBySection(P.children,P.props),ne=this.groupByPageBreaks(V);let fe=null;for(let Qe=0,je=ne.length;Qegt.type=="first"):null)!=null?we:V%2==1?P.find(gt=>gt.type=="even"):null)!=null?Qe:P.find(gt=>gt.type=="default"),rt=je&&this.document.findPartByRelId(je.id,this.document.documentPart);if(rt){this.currentPart=rt,this.usedHederFooterParts.includes(rt.path)||(this.processElement(rt.rootElement),this.usedHederFooterParts.push(rt.path));const[gt]=this.renderElements([rt.rootElement],fe);L!=null&&L.pageMargins&&(rt.rootElement.type===Lt.Header?(gt.style.marginTop=`calc(${L.pageMargins.header} - ${L.pageMargins.top})`,gt.style.minHeight=`calc(${L.pageMargins.top} - ${L.pageMargins.header})`):rt.rootElement.type===Lt.Footer&&(gt.style.marginBottom=`calc(${L.pageMargins.footer} - ${L.pageMargins.bottom})`,gt.style.minHeight=`calc(${L.pageMargins.bottom} - ${L.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(P){return P.type!=Lt.Break?!1:P.break=="lastRenderedPageBreak"?!this.options.ignoreLastRenderedPageBreak:P.break=="page"}isPageBreakSection(P,L){var V,ne,fe,we,Qe,je;return!P||!L?!1:((V=P.pageSize)==null?void 0:V.orientation)!=((ne=L.pageSize)==null?void 0:ne.orientation)||((fe=P.pageSize)==null?void 0:fe.width)!=((we=L.pageSize)==null?void 0:we.width)||((Qe=P.pageSize)==null?void 0:Qe.height)!=((je=L.pageSize)==null?void 0:je.height)}splitBySection(P,L){var V,ne={sectProps:null,elements:[],pageBreak:!1},fe=[ne];for(let mt of P){if(mt.type==Lt.Paragraph){const We=this.findStyle(mt.styleName);(V=We==null?void 0:We.paragraphProps)!=null&&V.pageBreakBefore&&(ne.sectProps=we,ne.pageBreak=!0,ne={sectProps:null,elements:[],pageBreak:!1},fe.push(ne))}if(ne.elements.push(mt),mt.type==Lt.Paragraph){const We=mt;var we=We.sectionProps,Qe=-1,je=-1;if(this.options.breakPages&&We.children&&(Qe=We.children.findIndex(ct=>{var He,it;return je=(it=(He=ct.children)==null?void 0:He.findIndex(this.isPageBreakElement.bind(this)))!=null?it:-1,je!=-1})),(we||Qe!=-1)&&(ne.sectProps=we,ne.pageBreak=Qe!=-1,ne={sectProps:null,elements:[],pageBreak:!1},fe.push(ne)),Qe!=-1){let ct=We.children[Qe],He=je=0;mt--)fe[mt].sectProps==null?fe[mt].sectProps=vt??L:vt=fe[mt].sectProps;return fe}groupByPageBreaks(P){let L=[],V;const ne=[L];for(let fe of P)L.push(fe),(this.options.ignoreLastRenderedPageBreak||fe.pageBreak||this.isPageBreakSection(V,fe.sectProps))&&ne.push(L=[]),V=fe.sectProps;return ne.filter(fe=>fe.length>0)}renderWrapper(P){return this.createElement("div",{className:`${this.className}-wrapper`},P)}renderDefaultStyle(){var P=this.className,L=` .${P}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } .${P}-wrapper>section.${P} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; } .${P} { color: black; hyphens: auto; text-underline-position: from-font; } section.${P} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; } section.${P}>article { margin-bottom: auto; z-index: 1; } section.${P}>footer { z-index: 1; } .${P} table { border-collapse: collapse; } .${P} table td, .${P} table th { vertical-align: top; } .${P} p { margin: 0pt; min-height: 1em; } .${P} span { white-space: pre-wrap; overflow-wrap: break-word; } .${P} a { color: inherit; text-decoration: inherit; } .${P} svg { fill: transparent; } `;return this.options.renderComments&&(L+=` .${P}-comment-ref { cursor: default; } .${P}-comment-popover { display: none; z-index: 1000; padding: 0.5rem; background: white; position: absolute; box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.25); width: 30ch; } .${P}-comment-ref:hover~.${P}-comment-popover { display: block; } .${P}-comment-author,.${P}-comment-date { font-size: 0.875rem; color: #888; } `),xu(L)}renderNumbering(P,L){var V="",ne=[];for(var fe of P){var we=`p.${this.numberingClass(fe.id,fe.level)}`,Qe="none";if(fe.bullet){let je=`--${this.className}-${fe.bullet.src}`.toLowerCase();V+=this.styleToString(`${we}:before`,{content:"' '",display:"inline-block",background:`var(${je})`},fe.bullet.style),this.tasks.push(this.document.loadNumberingImage(fe.bullet.src).then(rt=>{var gt=`${this.rootSelector} { ${je}: url(${rt}) }`;L.appendChild(xu(gt))}))}else if(fe.levelText){let je=this.numberingCounter(fe.id,fe.level);const rt=je+" "+(fe.start-1);fe.level>0&&(V+=this.styleToString(`p.${this.numberingClass(fe.id,fe.level-1)}`,{"counter-reset":rt})),ne.push(rt),V+=this.styleToString(`${we}:before`,Tt({content:this.levelTextToContent(fe.levelText,fe.suff,fe.id,this.numFormatToCssValue(fe.format)),"counter-increment":je},fe.rStyle))}else Qe=this.numFormatToCssValue(fe.format);V+=this.styleToString(we,Tt({display:"list-item","list-style-position":"inside","list-style-type":Qe},fe.pStyle))}return ne.length>0&&(V+=this.styleToString(this.rootSelector,{"counter-reset":ne.join(" ")})),xu(V)}renderStyles(P){var L,V="";const ne=this.styleMap,fe=xn(P.filter(rt=>rt.isDefault),rt=>rt.target);for(const rt of P){var we=rt.styles;if(rt.linked){var Qe=rt.linked&&ne[rt.linked];Qe?we=we.concat(Qe.styles):this.options.debug&&console.warn(`Can't find linked style ${rt.linked}`)}for(const gt of we){var je=`${(L=rt.target)!=null?L:""}.${rt.cssName}`;rt.target!=gt.target&&(je+=` ${gt.target}`),fe[rt.target]==rt&&(je=`.${this.className} ${rt.target}, `+je),V+=this.styleToString(je,gt.values)}}return xu(V)}renderNotes(P,L,V){var ne=P.map(we=>L[we]).filter(we=>we);if(ne.length>0){var fe=this.createElement("ol",null,this.renderElements(ne));V.appendChild(fe)}}renderElement(P){switch(P.type){case Lt.Paragraph:return this.renderParagraph(P);case Lt.BookmarkStart:return this.renderBookmarkStart(P);case Lt.BookmarkEnd:return null;case Lt.Run:return this.renderRun(P);case Lt.Table:return this.renderTable(P);case Lt.Row:return this.renderTableRow(P);case Lt.Cell:return this.renderTableCell(P);case Lt.Hyperlink:return this.renderHyperlink(P);case Lt.SmartTag:return this.renderSmartTag(P);case Lt.Drawing:return this.renderDrawing(P);case Lt.Image:return this.renderImage(P);case Lt.Text:return this.renderText(P);case Lt.Text:return this.renderText(P);case Lt.DeletedText:return this.renderDeletedText(P);case Lt.Tab:return this.renderTab(P);case Lt.Symbol:return this.renderSymbol(P);case Lt.Break:return this.renderBreak(P);case Lt.Footer:return this.renderContainer(P,"footer");case Lt.Header:return this.renderContainer(P,"header");case Lt.Footnote:case Lt.Endnote:return this.renderContainer(P,"li");case Lt.FootnoteReference:return this.renderFootnoteReference(P);case Lt.EndnoteReference:return this.renderEndnoteReference(P);case Lt.NoBreakHyphen:return this.createElement("wbr");case Lt.VmlPicture:return this.renderVmlPicture(P);case Lt.VmlElement:return this.renderVmlElement(P);case Lt.MmlMath:return this.renderContainerNS(P,bi.mathML,"math",{xmlns:bi.mathML});case Lt.MmlMathParagraph:return this.renderContainer(P,"span");case Lt.MmlFraction:return this.renderContainerNS(P,bi.mathML,"mfrac");case Lt.MmlBase:return this.renderContainerNS(P,bi.mathML,P.parent.type==Lt.MmlMatrixRow?"mtd":"mrow");case Lt.MmlNumerator:case Lt.MmlDenominator:case Lt.MmlFunction:case Lt.MmlLimit:case Lt.MmlBox:return this.renderContainerNS(P,bi.mathML,"mrow");case Lt.MmlGroupChar:return this.renderMmlGroupChar(P);case Lt.MmlLimitLower:return this.renderContainerNS(P,bi.mathML,"munder");case Lt.MmlMatrix:return this.renderContainerNS(P,bi.mathML,"mtable");case Lt.MmlMatrixRow:return this.renderContainerNS(P,bi.mathML,"mtr");case Lt.MmlRadical:return this.renderMmlRadical(P);case Lt.MmlSuperscript:return this.renderContainerNS(P,bi.mathML,"msup");case Lt.MmlSubscript:return this.renderContainerNS(P,bi.mathML,"msub");case Lt.MmlDegree:case Lt.MmlSuperArgument:case Lt.MmlSubArgument:return this.renderContainerNS(P,bi.mathML,"mn");case Lt.MmlFunctionName:return this.renderContainerNS(P,bi.mathML,"ms");case Lt.MmlDelimiter:return this.renderMmlDelimiter(P);case Lt.MmlRun:return this.renderMmlRun(P);case Lt.MmlNary:return this.renderMmlNary(P);case Lt.MmlPreSubSuper:return this.renderMmlPreSubSuper(P);case Lt.MmlBar:return this.renderMmlBar(P);case Lt.MmlEquationArray:return this.renderMllList(P);case Lt.Inserted:return this.renderInserted(P);case Lt.Deleted:return this.renderDeleted(P);case Lt.CommentRangeStart:return this.renderCommentRangeStart(P);case Lt.CommentRangeEnd:return this.renderCommentRangeEnd(P);case Lt.CommentReference:return this.renderCommentReference(P)}return null}renderChildren(P,L){return this.renderElements(P.children,L)}renderElements(P,L){if(P==null)return null;var V=P.flatMap(ne=>this.renderElement(ne)).filter(ne=>ne!=null);return L&&tl(L,V),V}renderContainer(P,L,V){return this.createElement(L,V,this.renderChildren(P))}renderContainerNS(P,L,V,ne){return va(L,V,ne,this.renderChildren(P))}renderParagraph(P){var L,V,ne,fe=this.createElement("p");const we=this.findStyle(P.styleName);P.tabs!=null||(P.tabs=(L=we==null?void 0:we.paragraphProps)==null?void 0:L.tabs),this.renderClass(P,fe),this.renderChildren(P,fe),this.renderStyleValues(P.cssStyle,fe),this.renderCommonProperties(fe.style,P);const Qe=(ne=P.numbering)!=null?ne:(V=we==null?void 0:we.paragraphProps)==null?void 0:V.numbering;return Qe&&fe.classList.add(this.numberingClass(Qe.id,Qe.level)),fe}renderRunProperties(P,L){this.renderCommonProperties(P,L)}renderCommonProperties(P,L){L!=null&&(L.color&&(P.color=L.color),L.fontSize&&(P["font-size"]=L.fontSize))}renderHyperlink(P){var L=this.createElement("a");if(this.renderChildren(P,L),this.renderStyleValues(P.cssStyle,L),P.href)L.href=P.href;else if(P.id){const V=this.document.documentPart.rels.find(ne=>ne.id==P.id&&ne.targetMode==="External");L.href=V==null?void 0:V.target}return L}renderSmartTag(P){var L=this.createElement("span");return this.renderChildren(P,L),L}renderCommentRangeStart(P){var L;if(!this.options.renderComments)return null;const V=new Range;(L=this.commentHighlight)==null||L.add(V);const ne=this.htmlDocument.createComment(`start of comment #${P.id}`);return this.later(()=>V.setStart(ne,0)),this.commentMap[P.id]=V,ne}renderCommentRangeEnd(P){if(!this.options.renderComments)return null;const L=this.commentMap[P.id],V=this.htmlDocument.createComment(`end of comment #${P.id}`);return this.later(()=>L==null?void 0:L.setEnd(V,0)),V}renderCommentReference(P){var L;if(!this.options.renderComments)return null;var V=(L=this.document.commentsPart)==null?void 0:L.commentMap[P.id];if(!V)return null;const ne=new DocumentFragment,fe=hc("span",{className:`${this.className}-comment-ref`},["💬"]),we=hc("div",{className:`${this.className}-comment-popover`});return this.renderCommentContent(V,we),ne.appendChild(this.htmlDocument.createComment(`comment #${V.id} by ${V.author} on ${V.date}`)),ne.appendChild(fe),ne.appendChild(we),ne}renderCommentContent(P,L){L.appendChild(hc("div",{className:`${this.className}-comment-author`},[P.author])),L.appendChild(hc("div",{className:`${this.className}-comment-date`},[new Date(P.date).toLocaleString()])),this.renderChildren(P,L)}renderDrawing(P){var L=this.createElement("div");return L.style.display="inline-block",L.style.position="relative",L.style.textIndent="0px",this.renderChildren(P,L),this.renderStyleValues(P.cssStyle,L),L}renderImage(P){let L=this.createElement("img");return this.renderStyleValues(P.cssStyle,L),this.document&&this.tasks.push(this.document.loadDocumentImage(P.src,this.currentPart).then(V=>{L.src=V})),L}renderText(P){return this.htmlDocument.createTextNode(P.text)}renderDeletedText(P){return this.options.renderEndnotes?this.htmlDocument.createTextNode(P.text):null}renderBreak(P){return P.break=="textWrapping"?this.createElement("br"):null}renderInserted(P){return this.options.renderChanges?this.renderContainer(P,"ins"):this.renderChildren(P)}renderDeleted(P){return this.options.renderChanges?this.renderContainer(P,"del"):null}renderSymbol(P){var L=this.createElement("span");return L.style.fontFamily=P.font,L.innerHTML=`&#x${P.char};`,L}renderFootnoteReference(P){var L=this.createElement("sup");return this.currentFootnoteIds.push(P.id),L.textContent=`${this.currentFootnoteIds.length}`,L}renderEndnoteReference(P){var L=this.createElement("sup");return this.currentEndnoteIds.push(P.id),L.textContent=`${this.currentEndnoteIds.length}`,L}renderTab(P){var L,V=this.createElement("span");if(V.innerHTML=" ",this.options.experimental){V.className=this.tabStopClass();var ne=(L=RA(P,Lt.Paragraph))==null?void 0:L.tabs;this.currentTabs.push({stops:ne,span:V})}return V}renderBookmarkStart(P){var L=this.createElement("span");return L.id=P.name,L}renderRun(P){if(P.fieldRun)return null;const L=this.createElement("span");if(P.id&&(L.id=P.id),this.renderClass(P,L),this.renderStyleValues(P.cssStyle,L),P.verticalAlign){const V=this.createElement(P.verticalAlign);this.renderChildren(P,V),L.appendChild(V)}else this.renderChildren(P,L);return L}renderTable(P){let L=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},P.columns&&L.appendChild(this.renderTableColumns(P.columns)),this.renderClass(P,L),this.renderChildren(P,L),this.renderStyleValues(P.cssStyle,L),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),L}renderTableColumns(P){let L=this.createElement("colgroup");for(let V of P){let ne=this.createElement("col");V.width&&(ne.style.width=V.width),L.appendChild(ne)}return L}renderTableRow(P){let L=this.createElement("tr");return this.currentCellPosition.col=0,this.renderClass(P,L),this.renderChildren(P,L),this.renderStyleValues(P.cssStyle,L),this.currentCellPosition.row++,L}renderTableCell(P){let L=this.createElement("td");const V=this.currentCellPosition.col;return P.verticalMerge?P.verticalMerge=="restart"?(this.currentVerticalMerge[V]=L,L.rowSpan=1):this.currentVerticalMerge[V]&&(this.currentVerticalMerge[V].rowSpan+=1,L.style.display="none"):this.currentVerticalMerge[V]=null,this.renderClass(P,L),this.renderChildren(P,L),this.renderStyleValues(P.cssStyle,L),P.span&&(L.colSpan=P.span),this.currentCellPosition.col+=L.colSpan,L}renderVmlPicture(P){var L=hc("div");return this.renderChildren(P,L),L}renderVmlElement(P){var L,V,ne=tu("svg");ne.setAttribute("style",P.cssStyleText);const fe=this.renderVmlChildElement(P);return(L=P.imageHref)!=null&&L.id&&this.tasks.push((V=this.document)==null?void 0:V.loadDocumentImage(P.imageHref.id,this.currentPart).then(we=>fe.setAttribute("href",we))),ne.appendChild(fe),requestAnimationFrame(()=>{const we=ne.firstElementChild.getBBox();ne.setAttribute("width",`${Math.ceil(we.x+we.width)}`),ne.setAttribute("height",`${Math.ceil(we.y+we.height)}`)}),ne}renderVmlChildElement(P){const L=tu(P.tagName);Object.entries(P.attrs).forEach(([V,ne])=>L.setAttribute(V,ne));for(let V of P.children)V.type==Lt.VmlElement?L.appendChild(this.renderVmlChildElement(V)):L.appendChild(...xr(this.renderElement(V)));return L}renderMmlRadical(P){var L;const V=P.children.find(fe=>fe.type==Lt.MmlBase);if((L=P.props)!=null&&L.hideDegree)return va(bi.mathML,"msqrt",null,this.renderElements([V]));const ne=P.children.find(fe=>fe.type==Lt.MmlDegree);return va(bi.mathML,"mroot",null,this.renderElements([V,ne]))}renderMmlDelimiter(P){var L,V;const ne=[];return ne.push(va(bi.mathML,"mo",null,[(L=P.props.beginChar)!=null?L:"("])),ne.push(...this.renderElements(P.children)),ne.push(va(bi.mathML,"mo",null,[(V=P.props.endChar)!=null?V:")"])),va(bi.mathML,"mrow",null,ne)}renderMmlNary(P){var L,V;const ne=[],fe=xn(P.children,vt=>vt.type),we=fe[Lt.MmlSuperArgument],Qe=fe[Lt.MmlSubArgument],je=we?va(bi.mathML,"mo",null,xr(this.renderElement(we))):null,rt=Qe?va(bi.mathML,"mo",null,xr(this.renderElement(Qe))):null,gt=va(bi.mathML,"mo",null,[(V=(L=P.props)==null?void 0:L.char)!=null?V:"∫"]);return je||rt?ne.push(va(bi.mathML,"munderover",null,[gt,rt,je])):je?ne.push(va(bi.mathML,"mover",null,[gt,je])):rt?ne.push(va(bi.mathML,"munder",null,[gt,rt])):ne.push(gt),ne.push(...this.renderElements(fe[Lt.MmlBase].children)),va(bi.mathML,"mrow",null,ne)}renderMmlPreSubSuper(P){const L=[],V=xn(P.children,rt=>rt.type),ne=V[Lt.MmlSuperArgument],fe=V[Lt.MmlSubArgument],we=ne?va(bi.mathML,"mo",null,xr(this.renderElement(ne))):null,Qe=fe?va(bi.mathML,"mo",null,xr(this.renderElement(fe))):null,je=va(bi.mathML,"mo",null);return L.push(va(bi.mathML,"msubsup",null,[je,Qe,we])),L.push(...this.renderElements(V[Lt.MmlBase].children)),va(bi.mathML,"mrow",null,L)}renderMmlGroupChar(P){const L=P.props.verticalJustification==="bot"?"mover":"munder",V=this.renderContainerNS(P,bi.mathML,L);return P.props.char&&V.appendChild(va(bi.mathML,"mo",null,[P.props.char])),V}renderMmlBar(P){const L=this.renderContainerNS(P,bi.mathML,"mrow");switch(P.props.position){case"top":L.style.textDecoration="overline";break;case"bottom":L.style.textDecoration="underline";break}return L}renderMmlRun(P){const L=va(bi.mathML,"ms");return this.renderClass(P,L),this.renderStyleValues(P.cssStyle,L),this.renderChildren(P,L),L}renderMllList(P){const L=va(bi.mathML,"mtable");this.renderClass(P,L),this.renderStyleValues(P.cssStyle,L),this.renderChildren(P);for(let V of this.renderChildren(P))L.appendChild(va(bi.mathML,"mtr",null,[va(bi.mathML,"mtd",null,[V])]));return L}renderStyleValues(P,L){for(let V in P)V.startsWith("$")?L.setAttribute(V.slice(1),P[V]):L.style[V]=P[V]}renderClass(P,L){P.className&&(L.className=P.className),P.styleName&&L.classList.add(this.processStyleName(P.styleName))}findStyle(P){var L;return P&&((L=this.styleMap)==null?void 0:L[P])}numberingClass(P,L){return`${this.className}-num-${P}-${L}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(P,L,V=null){let ne=`${P} {\r `;for(const fe in L)fe.startsWith("$")||(ne+=` ${fe}: ${L[fe]};\r `);return V&&(ne+=V),ne+`}\r `}numberingCounter(P,L){return`${this.className}-num-${P}-${L}`}levelTextToContent(P,L,V,ne){var fe;const we={tab:"\\9",space:"\\a0"};var Qe=P.replace(/%\d*/g,je=>{let rt=parseInt(je.substring(1),10)-1;return`"counter(${this.numberingCounter(V,rt)}, ${ne})"`});return`"${Qe}${(fe=we[L])!=null?fe:""}"`}numFormatToCssValue(P){var L,V={none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman",decimalZero:"decimal-leading-zero",aiueo:"katakana",aiueoFullWidth:"katakana",chineseCounting:"simp-chinese-informal",chineseCountingThousand:"simp-chinese-informal",chineseLegalSimplified:"simp-chinese-formal",chosung:"hangul-consonant",ideographDigital:"cjk-ideographic",ideographTraditional:"cjk-heavenly-stem",ideographLegalTraditional:"trad-chinese-formal",ideographZodiac:"cjk-earthly-branch",iroha:"katakana-iroha",irohaFullWidth:"katakana-iroha",japaneseCounting:"japanese-informal",japaneseDigitalTenThousand:"cjk-decimal",japaneseLegal:"japanese-formal",thaiNumbers:"thai",koreanCounting:"korean-hangul-formal",koreanDigital:"korean-hangul-formal",koreanDigital2:"korean-hanja-informal",hebrew1:"hebrew",hebrew2:"hebrew",hindiNumbers:"devanagari",ganada:"hangul",taiwaneseCounting:"cjk-ideographic",taiwaneseCountingThousand:"cjk-ideographic",taiwaneseDigital:"cjk-decimal"};return(L=V[P])!=null?L:P}refreshTabStops(){this.options.experimental&&(clearTimeout(this.tabsTimeout),this.tabsTimeout=setTimeout(()=>{const P=Ng();for(let L of this.currentTabs)Nh(L.span,L.stops,this.defaultTabSize,P)},500))}later(P){this.postRenderTasks.push(P)}}function hc(Ie,P,L){return va(void 0,Ie,P,L)}function tu(Ie,P,L){return va(bi.svg,Ie,P,L)}function va(Ie,P,L,V){var ne=Ie?document.createElementNS(Ie,P):document.createElement(P);return Object.assign(ne,L),V&&tl(ne,V),ne}function qf(Ie){Ie.innerHTML=""}function tl(Ie,P){P.forEach(L=>Ie.appendChild(uo(L)?document.createTextNode(L):L))}function xu(Ie){return hc("style",{innerHTML:Ie})}function rl(Ie,P){Ie.appendChild(document.createComment(P))}function RA(Ie,P){for(var L=Ie.parent;L!=null&&L.type!=P;)L=L.parent;return L}const Wf={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1,renderComments:!1};function FA(Ie,P){const L=Tt(Tt({},Wf),P);return Rh.load(Ie,new Rg(L),L)}function Kf(Ie,P,L,V){return yr(this,null,function*(){const ne=Tt(Tt({},Wf),V),fe=new el(window.document);return fe.render(Ie,P,L,ne),Promise.allSettled(fe.tasks)})}function NA(Ie,P,L,V){return yr(this,null,function*(){const ne=yield FA(Ie,V);return yield Kf(ne,P,L,V),ne})}const Mg={ignoreLastRenderedPageBreak:!1};function MA(Ie,P={}){return typeof Ie=="string"?Tg(Ie,P):Promise.resolve(Ie)}function Tg(Ie,P){return fetch(Ie,P).then(L=>L.status!==200?Promise.reject(L):L)}function Lg(Ie){return yr(this,null,function*(){let P;return Ie instanceof Blob?P=Ie:Ie instanceof Response?P=yield Ie.blob():Ie instanceof ArrayBuffer&&(P=new Blob([Ie])),P})}function TA(Ie,P,L={}){if(!Ie)return P.innerHTML="",Promise.resolve();let V;return Ie instanceof Blob?V=Ie:Ie instanceof Response?V=Ie.blob():Ie instanceof ArrayBuffer&&(V=new Blob([Ie])),NA(V,P,P,Tt(Tt({},Mg),L))}const ru={getData:MA,render:TA,getBlob:Lg};function LA(Ie,P){return yr(this,null,function*(){P&&(P instanceof ArrayBuffer&&(P=new Blob([P])),zf(Ie,URL.createObjectURL(P)))})}function zf(Ie,P){let L=document.createElement("a");L.download=Ie,L.style.display="none",L.href=P,document.body.appendChild(L),L.click(),document.body.removeChild(L)}const Og=(Ie,P)=>{const L=Ie.__vccOpts||Ie;for(const[V,ne]of P)L[V]=ne;return L},Pg=K.defineComponent({name:"VueOfficeDocx",props:{src:[String,ArrayBuffer,Blob],requestOptions:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},emits:["rendered","error"],setup(Ie,{emit:P}){const L=K.ref(null);let V=null;function ne(){let we=L.value;ru.getData(Ie.src,Ie.requestOptions).then(Qe=>yr(this,null,function*(){V=yield ru.getBlob(Qe),ru.render(V,we,Ie.options).then(()=>{P("rendered")}).catch(je=>{ru.render("",we,Ie.options),P("error",je)})})).catch(Qe=>{ru.render("",we,Ie.options),P("error",Qe)})}K.onMounted(()=>{Ie.src&&ne()}),K.watch(()=>Ie.src,()=>{Ie.src?ne():ru.render("",L.value,Ie.options).then(()=>{P("rendered")})});function fe(we){LA(we||`vue-office-docx-${new Date().getTime()}.docx`,V)}return{rootRef:L,save:fe}}}),Gg={class:"vue-office-docx"},Ug={class:"vue-office-docx-main",ref:"rootRef"};function jg(Ie,P,L,V,ne,fe){return ee.openBlock(),ee.createElementBlock("div",Gg,[ee.createElementVNode("div",Ug,null,512)])}const OA=Og(Pg,[["render",jg]]);return OA.install=function(Ie){Ie.component(OA.name,OA)},OA})})(XQ);var e_=XQ.exports;const t_=n1(e_);const r_={__name:"docx",props:{previewSrc:{type:String,required:!1,default:()=>""}},setup(D){const U={width:"100%",height:"100%"},K=()=>{console.log("rendered")},ee=ge=>{console.log("error",ge)};return(ge,Ue)=>(zr(),Ma(Ti(t_),{src:D.previewSrc,style:U,onRendered:K,onError:ee},null,8,["src"]))}},n_=zu(r_,[["__scopeId","data-v-af49ea04"]]);var $Q={exports:{}};(function(D,U){(function(K,ee){D.exports=ee(e3,t3)})(Iu,function(K,ee){function ge(e){return(ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function Ue(e){var r=function(t,n){if(ge(t)!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var s=a.call(t,n||"default");if(ge(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}(e,"string");return ge(r)=="symbol"?r:String(r)}function ht(e,r,t){return(r=Ue(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ut(e){if(Array.isArray(e))return e}function _t(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t1&&arguments[1]!==void 0?arguments[1]:"";Fe(this,e),typeof r=="string"?(this.el=document.createElement(r),this.el.className=t):this.el=r,this.data={}}return Le(e,[{key:"data",value:function(r,t){return t!==void 0?(this.data[r]=t,this):this.data[r]}},{key:"on",value:function(r,t){var n=Ir(r.split(".")),a=n[0],s=n.slice(1),o=a;return o==="mousewheel"&&/Firefox/i.test(window.navigator.userAgent)&&(o="DOMMouseScroll"),this.el.addEventListener(o,function(i){t(i);for(var c=0;c0&&arguments[0]!==void 0?arguments[0]:"active";return this.toggleClass(r)}},{key:"toggleClass",value:function(r){return this.el.classList.toggle(r)}},{key:"active",value:function(){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"active";return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.addClass(r):this.removeClass(r),this}},{key:"checked",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.active(r,"checked"),this}},{key:"disabled",value:function(){return!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?this.addClass("disabled"):this.removeClass("disabled"),this}},{key:"attr",value:function(r,t){var n=this;if(t!==void 0)this.el.setAttribute(r,t);else{if(typeof r=="string")return this.el.getAttribute(r);Object.keys(r).forEach(function(a){n.el.setAttribute(a,r[a])})}return this}},{key:"removeAttr",value:function(r){return this.el.removeAttribute(r),this}},{key:"html",value:function(r){return r!==void 0?(this.el.innerHTML=r,this):this.el.innerHTML}},{key:"val",value:function(r){return r!==void 0?(this.el.value=r,this):this.el.value}},{key:"focus",value:function(){this.el.focus()}},{key:"cssRemoveKeys",value:function(){for(var r=this,t=arguments.length,n=new Array(t),a=0;a1&&arguments[1]!==void 0?arguments[1]:"")};function Et(e){return function(r){if(Array.isArray(r))return _t(r)}(e)||sr(e)||Jt(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var qt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function nr(e){for(var r="",t=e;t>=qt.length;)t/=qt.length,t-=1,r+=qt[parseInt(t,10)%qt.length];var n=e%qt.length;return r+=qt[n]}function Nr(e){for(var r=0,t=0;t="0"&&e.charAt(n)<="9"?t+=e.charAt(n):r+=e.charAt(n);return[Nr(r),parseInt(t,10)-1]}function Cr(e,r){return"".concat(nr(e)).concat(r+1)}function Wr(e,r,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return!0};if(r===0&&t===0)return e;var a=Tt(zt(e),2),s=a[0],o=a[1];return n(s,o)?Cr(s+r,o+t):e}var un=function(){function e(r,t,n,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;Fe(this,e),this.sri=r,this.sci=t,this.eri=n,this.eci=a,this.w=s,this.h=o}return Le(e,[{key:"set",value:function(r,t,n,a){this.sri=r,this.sci=t,this.eri=n,this.eci=a}},{key:"multiple",value:function(){return this.eri-this.sri>0||this.eci-this.sci>0}},{key:"includes",value:function(){for(var r=0,t=0,n=arguments.length,a=new Array(n),s=0;s1&&arguments[1]!==void 0?arguments[1]:function(){return!0},n=this.sri,a=this.sci,s=this.eri,o=this.eci,i=n;i<=s;i+=1)if(t(i))for(var c=a;c<=o;c+=1)r(i,c)}},{key:"contains",value:function(r){return this.sri<=r.sri&&this.sci<=r.sci&&this.eri>=r.eri&&this.eci>=r.eci}},{key:"within",value:function(r){return this.sri>=r.sri&&this.sci>=r.sci&&this.eri<=r.eri&&this.eci<=r.eci}},{key:"disjoint",value:function(r){return this.sri>r.eri||this.sci>r.eci||r.sri>this.eri||r.sci>this.eci}},{key:"intersects",value:function(r){return this.sri<=r.eri&&this.sci<=r.eci&&r.sri<=this.eri&&r.sci<=this.eci}},{key:"union",value:function(r){var t=this.sri,n=this.sci,a=this.eri,s=this.eci;return new e(r.sria?r.eri:a,r.eci>s?r.eci:s)}},{key:"difference",value:function(r){var t=[],n=function(h,f,d,g){t.push(new e(h,f,d,g))},a=this.sri,s=this.sci,o=this.eri,i=this.eci,c=r.sri-a,u=r.sci-s,l=o-r.eri,A=i-r.eci;return c>0?(n(a,s,r.sri-1,i),l>0?(n(r.eri+1,s,o,i),u>0&&n(r.sri,s,r.eri,r.sci-1),A>0&&n(r.sri,r.eci+1,r.eri,i)):(u>0&&n(r.sri,s,o,r.sci-1),A>0&&n(r.sri,r.eci+1,o,i))):l>0&&(n(r.eri+1,s,o,i),u>0&&n(a,s,r.eri,r.sci-1),A>0&&n(a,r.eci+1,r.eri,i)),u>0?(n(a,s,o,r.sci-1),A>0?(n(a,r.eri+1,o,i),c>0&&n(a,r.sci,r.sri-1,r.eci),l>0&&n(r.sri+1,r.sci,o,r.eci)):(c>0&&n(a,r.sci,r.sri-1,i),l>0&&n(r.sri+1,r.sci,o,i))):A>0&&(n(o,r.eci+1,o,i),c>0&&n(a,s,r.sri-1,r.eci),l>0&&n(r.eri+1,s,o,r.eci)),t}},{key:"size",value:function(){return[this.eri-this.sri+1,this.eci-this.sci+1]}},{key:"toString",value:function(){var r=this.sri,t=this.sci,n=this.eri,a=this.eci,s=Cr(t,r);return this.multiple()&&(s="".concat(s,":").concat(Cr(a,n))),s}},{key:"clone",value:function(){return new e(this.sri,this.sci,this.eri,this.eci,this.w,this.h)}},{key:"equals",value:function(r){return this.eri===r.eri&&this.eci===r.eci&&this.sri===r.sri&&this.sci===r.sci}}],[{key:"valueOf",value:function(r){var t=r.split(":"),n=Tt(zt(t[0]),2),a=n[0],s=n[1],o=s,i=a;if(t.length>1){var c=Tt(zt(t[1]),2);i=c[0],o=c[1]}return new e(s,a,o,i)}}]),e}(),Ui=function(){function e(){Fe(this,e),this.range=new un(0,0,0,0),this.ri=0,this.ci=0}return Le(e,[{key:"multiple",value:function(){return this.range.multiple()}},{key:"setIndexes",value:function(r,t){this.ri=r,this.ci=t}},{key:"size",value:function(){return this.range.size()}}]),e}(),Ea=Le(function e(){Fe(this,e),this.x=0,this.y=0,this.ri=0,this.ci=0}),Po=function(){function e(){Fe(this,e),this.undoItems=[],this.redoItems=[]}return Le(e,[{key:"add",value:function(r){this.undoItems.push(JSON.stringify(r)),this.redoItems=[]}},{key:"canUndo",value:function(){return this.undoItems.length>0}},{key:"canRedo",value:function(){return this.redoItems.length>0}},{key:"undo",value:function(r,t){var n=this.undoItems,a=this.redoItems;this.canUndo()&&(a.push(JSON.stringify(r)),t(JSON.parse(n.pop())))}},{key:"redo",value:function(r,t){var n=this.undoItems,a=this.redoItems;this.canRedo()&&(n.push(JSON.stringify(r)),t(JSON.parse(a.pop())))}}]),e}(),Ds=function(){function e(){Fe(this,e),this.range=null,this.state="clear"}return Le(e,[{key:"copy",value:function(r){return this.range=r,this.state="copy",this}},{key:"cut",value:function(r){return this.range=r,this.state="cut",this}},{key:"isCopy",value:function(){return this.state==="copy"}},{key:"isCut",value:function(){return this.state==="cut"}},{key:"isClear",value:function(){return this.state==="clear"}},{key:"clear",value:function(){this.range=null,this.state="clear"}}]),e}(),co=function(){function e(r,t,n){Fe(this,e),this.ci=r,this.operator=t,this.value=n}return Le(e,[{key:"set",value:function(r,t){this.operator=r,this.value=t}},{key:"includes",value:function(r){var t=this.operator,n=this.value;return t==="all"||t==="in"&&n.includes(r)}},{key:"vlength",value:function(){var r=this.operator,t=this.value;return r==="in"?t.length:0}},{key:"getData",value:function(){return{ci:this.ci,operator:this.operator,value:this.value}}}]),e}(),kt=function(){function e(r,t){Fe(this,e),this.ci=r,this.order=t}return Le(e,[{key:"asc",value:function(){return this.order==="asc"}},{key:"desc",value:function(){return this.order==="desc"}}]),e}(),Qa=function(){function e(){Fe(this,e),this.ref=null,this.filters=[],this.sort=null}return Le(e,[{key:"setData",value:function(r){var t=r.ref,n=r.filters,a=r.sort;t!=null&&(this.ref=t,this.filters=n.map(function(s){return new co(s.ci,s.operator,s.value)}),a&&(this.sort=new kt(a.ci,a.order)))}},{key:"getData",value:function(){if(this.active()){var r=this.ref,t=this.filters,n=this.sort;return{ref:r,filters:t.map(function(a){return a.getData()}),sort:n}}return{}}},{key:"addFilter",value:function(r,t,n){var a=this.getFilter(r);a==null?this.filters.push(new co(r,t,n)):a.set(t,n)}},{key:"setSort",value:function(r,t){this.sort=t?new kt(r,t):null}},{key:"includes",value:function(r,t){return!!this.active()&&this.hrange().includes(r,t)}},{key:"getSort",value:function(r){var t=this.sort;return t&&t.ci===r?t:null}},{key:"getFilter",value:function(r){for(var t=this.filters,n=0;n0&&arguments[0]!==void 0?arguments[0]:[];Fe(this,e),this._=r}return Le(e,[{key:"forEach",value:function(r){this._.forEach(r)}},{key:"deleteWithin",value:function(r){this._=this._.filter(function(t){return!t.within(r)})}},{key:"getFirstIncludes",value:function(r,t){for(var n=0;n=t?(l.sri+=n,l.eri+=n):o=t?(l.sci+=n,l.eci+=n):i0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length,n=new Array(t>1?t-1:0),a=1;a5?i.toFixed(2):i;return i.toFixed(Math.max(n,a))}const ln={cloneDeep:function(e){return JSON.parse(JSON.stringify(e))},merge:function(){for(var e=arguments.length,r=new Array(e),t=0;t1&&arguments[1]!==void 0?arguments[1]:function(a){return a},t=0,n=0;return Object.keys(e).forEach(function(a){t+=r(e[a],a),n+=1}),[t,n]},rangeEach:function(e,r,t){for(var n=e;na);c+=1)o+=i=s(c);return[c,o-i,i]},deleteProperty:function(e,r){var t=e["".concat(r)];return delete e["".concat(r)],t},numberCalc:_a};var gn=function(){function e(r){var t=r.len,n=r.height;Fe(this,e),this._={},this.len=t,this.height=n}return Le(e,[{key:"getHeight",value:function(r){if(this.isHide(r))return 0;var t=this.get(r);return t&&t.height?t.height:this.height}},{key:"setHeight",value:function(r,t){this.getOrNew(r).height=t}},{key:"unhide",value:function(r){for(var t=r;t>0&&(t-=1,this.isHide(t));)this.setHide(t,!1)}},{key:"isHide",value:function(r){var t=this.get(r);return t&&t.hide}},{key:"setHide",value:function(r,t){var n=this.getOrNew(r);t===!0?n.hide=!0:delete n.hide}},{key:"setStyle",value:function(r,t){this.getOrNew(r).style=t}},{key:"sumHeight",value:function(r,t,n){var a=this;return ln.rangeSum(r,t,function(s){return n&&n.has(s)?0:a.getHeight(s)})}},{key:"totalHeight",value:function(){return this.sumHeight(0,this.len)}},{key:"get",value:function(r){return this._[r]}},{key:"getOrNew",value:function(r){return this._[r]=this._[r]||{cells:{}},this._[r]}},{key:"getCell",value:function(r,t){var n=this.get(r);return n!==void 0&&n.cells!==void 0&&n.cells[t]!==void 0?n.cells[t]:null}},{key:"getCellMerge",value:function(r,t){var n=this.getCell(r,t);return n&&n.merge?n.merge:[0,0]}},{key:"getCellOrNew",value:function(r,t){var n=this.getOrNew(r);return n.cells[t]=n.cells[t]||{},n.cells[t]}},{key:"setCell",value:function(r,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"all",s=this.getOrNew(r);a==="all"?s.cells[t]=n:a==="text"?(s.cells[t]=s.cells[t]||{},s.cells[t].text=n.text):a==="format"&&(s.cells[t]=s.cells[t]||{},s.cells[t].style=n.style,n.merge&&(s.cells[t].merge=n.merge))}},{key:"setCellText",value:function(r,t,n){var a=this.getCellOrNew(r,t);a.editable!==!1&&(a.text=n)}},{key:"copyPaste",value:function(r,t,n){var a=this,s=arguments.length>3&&arguments[3]!==void 0&&arguments[3],o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){},i=r.sri,c=r.sci,u=r.eri,l=r.eci,A=t.sri,h=t.sci,f=t.eri,d=t.eci,g=Tt(r.size(),2),p=g[0],m=g[1],v=Tt(t.size(),2),y=v[0],I=v[1],E=!0,k=0;(f0){var C=N.text,w=H-h+(j-A)+2;if(E||(w-=k+1),C[0]==="=")N.text=C.replace(/[a-zA-Z]{1,3}\d+/g,function(S){var O=0,F=0;return i===A?O=w-1:F=w-1,/^\d+$/.test(S)?S:Wr(S,O,F)});else if(p<=1&&m>1&&(A>u||f1&&(h>l||d1&&arguments[1]!==void 0?arguments[1]:1,a={};this.each(function(s,o){var i=parseInt(s,10);i>=r&&(i+=n,t.eachCells(s,function(c,u){u.text&&u.text[0]==="="&&(u.text=u.text.replace(/[a-zA-Z]{1,3}\d+/g,function(l){return Wr(l,0,n,function(A,h){return h>=r})}))})),a[i]=o}),this._=a,this.len+=n}},{key:"delete",value:function(r,t){var n=this,a=t-r+1,s={};this.each(function(o,i){var c=parseInt(o,10);ct&&(s[c-a]=i,n.eachCells(o,function(u,l){l.text&&l.text[0]==="="&&(l.text=l.text.replace(/[a-zA-Z]{1,3}\d+/g,function(A){return Wr(A,0,-a,function(h,f){return f>t})}))}))}),this._=s,this.len-=a}},{key:"insertColumn",value:function(r){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.each(function(a,s){var o={};t.eachCells(a,function(i,c){var u=parseInt(i,10);u>=r&&(u+=n,c.text&&c.text[0]==="="&&(c.text=c.text.replace(/[a-zA-Z]{1,3}\d+/g,function(l){return Wr(l,n,0,function(A){return A>=r})}))),o[u]=c}),s.cells=o})}},{key:"deleteColumn",value:function(r,t){var n=this,a=t-r+1;this.each(function(s,o){var i={};n.eachCells(s,function(c,u){var l=parseInt(c,10);lt&&(i[l-a]=u,u.text&&u.text[0]==="="&&(u.text=u.text.replace(/[a-zA-Z]{1,3}\d+/g,function(A){return Wr(A,-a,0,function(h){return h>t})})))}),o.cells=i})}},{key:"deleteCells",value:function(r){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";r.each(function(a,s){t.deleteCell(a,s,n)})}},{key:"deleteCell",value:function(r,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"all",a=this.get(r);if(a!==null){var s=this.getCell(r,t);s!==null&&s.editable!==!1&&(n==="all"?delete a.cells[t]:n==="text"?(s.text&&delete s.text,s.value&&delete s.value):n==="format"?(s.style!==void 0&&delete s.style,s.merge&&delete s.merge):n==="merge"&&s.merge&&delete s.merge)}}},{key:"maxCell",value:function(){var r=Object.keys(this._),t=r[r.length-1],n=this._[t];if(n){var a=n.cells,s=Object.keys(a),o=s[s.length-1];return[parseInt(t,10),parseInt(o,10)]}return[0,0]}},{key:"each",value:function(r){Object.entries(this._).forEach(function(t){var n=Tt(t,2),a=n[0],s=n[1];r(a,s)})}},{key:"eachCells",value:function(r,t){this._[r]&&this._[r].cells&&Object.entries(this._[r].cells).forEach(function(n){var a=Tt(n,2),s=a[0],o=a[1];t(s,o)})}},{key:"setData",value:function(r){r.len&&(this.len=r.len,delete r.len),this._=r}},{key:"getData",value:function(){var r=this.len;return Object.assign({len:r},this._)}}]),e}(),cn=function(){function e(r){var t=r.len,n=r.width,a=r.indexWidth,s=r.minWidth;Fe(this,e),this._={},this.len=t,this.width=n,this.indexWidth=a,this.minWidth=s}return Le(e,[{key:"setData",value:function(r){r.len&&(this.len=r.len,delete r.len),this._=r}},{key:"getData",value:function(){var r=this.len;return Object.assign({len:r},this._)}},{key:"getWidth",value:function(r){if(this.isHide(r))return 0;var t=this._[r];return t&&t.width?t.width:this.width}},{key:"getOrNew",value:function(r){return this._[r]=this._[r]||{},this._[r]}},{key:"setWidth",value:function(r,t){this.getOrNew(r).width=t}},{key:"unhide",value:function(r){for(var t=r;t>0&&(t-=1,this.isHide(t));)this.setHide(t,!1)}},{key:"isHide",value:function(r){var t=this._[r];return t&&t.hide}},{key:"setHide",value:function(r,t){var n=this.getOrNew(r);t===!0?n.hide=!0:delete n.hide}},{key:"setStyle",value:function(r,t){this.getOrNew(r).style=t}},{key:"sumWidth",value:function(r,t){var n=this;return ln.rangeSum(r,t,function(a){return n.getWidth(a)})}},{key:"totalWidth",value:function(){return this.sumWidth(0,this.len)}}]),e}();function Dn(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(c,u){if(c){if(typeof c=="string")return xn(c,u);var l=Object.prototype.toString.call(c).slice(8,-1);if(l==="Object"&&c.constructor&&(l=c.constructor.name),l==="Map"||l==="Set")return Array.from(c);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return xn(c,u)}}(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return o=c.done,c},e:function(c){i=!0,s=c},f:function(){try{o||t.return==null||t.return()}finally{if(i)throw s}}}}function xn(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}}};function uo(e,r){if(r){var t,n=Dn(Wn);try{for(n.s();!(t=n.n()).done;){var a=t.value;if(!r[a])break;for(var s=r[a],o=e.match(/(?:\\.|[^.])+/g),i=0;i2&&arguments[2]!==void 0&&arguments[2]?Wn=[e]:Wn.unshift(e),r&&(Vi[e]=r)}var Ni={phone:/^[1-9]\d{10}$/,email:/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/};function ji(e,r){var t="";if(!e){for(var n=arguments.length,a=new Array(n>2?n-2:0),s=2;s=this.parseValue(c)&&o<=this.parseValue(u),"between",c,u)}if(n==="nbe"){var l=Tt(a,2),A=l[0],h=l[1];return ji(othis.parseValue(h),"notBetween",A,h)}if(n==="eq")return ji(o===this.parseValue(a),"equal",a);if(n==="neq")return ji(o!==this.parseValue(a),"notEqual",a);if(n==="lt")return ji(othis.parseValue(a),"greaterThan",a);if(n==="gte")return ji(o>=this.parseValue(a),"greaterThanEqual",a)}return[!0]}}]),e}(),Oa=function(){function e(r,t,n){Fe(this,e),this.refs=t,this.mode=r,this.validator=n}return Le(e,[{key:"includes",value:function(r,t){for(var n=this.refs,a=0;a0}).map(function(r){return r.getData()})}},{key:"setData",value:function(r){this._=r.map(function(t){return Oa.valueOf(t)})}}]),e}(),lo={mode:"edit",view:{height:function(){return document.documentElement.clientHeight},width:function(){return document.documentElement.clientWidth}},showGrid:!0,showToolbar:!0,showContextmenu:!0,showBottomBar:!0,row:{len:100,height:25},col:{len:26,width:100,indexWidth:60,minWidth:60},style:{bgcolor:"#ffffff",align:"left",valign:"middle",textwrap:!1,strike:!1,underline:!1,color:"#0a0a0a",font:{name:"Arial",size:10,bold:!1,italic:!1},format:"normal"}},Go=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)};function Sc(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},n=this.merges,a=r.clone(),s=Tt(e.size(),2),o=s[0],i=s[1],c=Tt(r.size(),2),u=c[0],l=c[1];return o>u&&(a.eri=r.sri+o-1),i>l&&(a.eci=r.sci+i-1),!n.intersects(a)||(t(tn("error.pasteForMergedCell")),!1)}function zs(e,r,t){var n=arguments.length>3&&arguments[3]!==void 0&&arguments[3],a=this.rows,s=this.merges;t!=="all"&&t!=="format"||(a.deleteCells(r,t),s.deleteWithin(r)),a.copyPaste(e,r,t,n,function(o,i,c){if(c&&c.merge){var u=Tt(c.merge,2),l=u[0],A=u[1];if(l<=0&&A<=0)return;s.add(new un(o,i,o+l,i+A))}})}function Vs(e,r){var t=this.clipboard,n=this.rows,a=this.merges;n.cutPaste(e,r),a.move(e,r.sri-e.sri,r.sci-e.sci),t.clear()}function So(e,r,t){var n=this.styles,a=this.rows.getCellOrNew(e,r),s={};a.style!==void 0&&(s=ln.cloneDeep(n[a.style])),s=ln.merge(s,{border:t}),a.style=this.addStyle(s)}function Rs(e){var r=this,t=e.mode,n=e.style,a=e.color,s=this.styles,o=this.selector,i=this.rows,c=o.range,u=c.sri,l=c.sci,A=c.eri,h=c.eci,f=!this.isSignleSelected();if(f||t!=="inside"&&t!=="horizontal"&&t!=="vertical")if(t!=="outside"||f){if(t==="none")o.range.each(function(Q,B){var S=i.getCell(Q,B);if(S&&S.style!==void 0){var O=ln.cloneDeep(s[S.style]);delete O.border,S.style=r.addStyle(O)}});else if(t==="all"||t==="inside"||t==="outside"||t==="horizontal"||t==="vertical")for(var d=[],g=u;g<=A;g+=1)for(var p=l;p<=h;p+=1){for(var m=[],v=0;vh)break;var T=i.getCell(g,p),j=0,W=0;if(T&&T.merge){var H=Tt(T.merge,2);j=H[0],W=H[1],d.push([g,p,j,W])}var X=j>0&&g+j===A,x=W>0&&p+W===h,N={};t==="all"?N={bottom:[n,a],top:[n,a],left:[n,a],right:[n,a]}:t==="inside"?(!x&&p0&&So.call(this,g,p,N),p+=W}else if(t==="top"||t==="bottom")for(var C=l;C<=h;C+=1)t==="top"&&(So.call(this,u,C,{top:[n,a]}),C+=i.getCellMerge(u,C)[1]),t==="bottom"&&(So.call(this,A,C,{bottom:[n,a]}),C+=i.getCellMerge(A,C)[1]);else if(t==="left"||t==="right")for(var w=u;w<=A;w+=1)t==="left"&&(So.call(this,w,l,{left:[n,a]}),w+=i.getCellMerge(w,l)[0]),t==="right"&&(So.call(this,w,h,{right:[n,a]}),w+=i.getCellMerge(w,h)[0])}else So.call(this,u,l,{top:[n,a],bottom:[n,a],left:[n,a],right:[n,a]})}function Or(e,r){var t=this.rows,n=this.freezeTotalHeight(),a=t.height;n+t.heighte);o+=1)s.has(o)||(i+=c=t.getHeight(o));return(i-=c)<=0?{ri:-1,top:0,height:c}:{ri:o-1,top:i,height:c}}function $r(e,r){var t=this.cols,n=this.freezeTotalWidth(),a=t.indexWidth;n+t.indexWidththis.selector.range.sci&&(r+=" "),Go(t[n].cells,a)){var s=String(t[n].cells[a].text);s.indexOf(` `)===-1&&s.indexOf(" ")===-1&&s.indexOf('"')===-1?r+=s:r+='"'.concat(s,'"')}}else for(var o=this.selector.range.sci;o<=this.selector.range.eci;o+=1)r+=" ";r+=` `}navigator.clipboard.writeText(r).then(function(){},function(i){console.log("text copy to the system clipboard error ",r,i)})}}},{key:"cut",value:function(){this.clipboard.cut(this.selector.range)}},{key:"paste",value:function(){var r=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"all",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},a=this.clipboard,s=this.selector;return!a.isClear()&&!!Sc.call(this,a.range,s.range,n)&&(this.changeData(function(){a.isCopy()?zs.call(r,a.range,s.range,t):a.isCut()&&Vs.call(r,a.range,s.range)}),!0)}},{key:"pasteFromText",value:function(r){var t=r.split(`\r `).map(function(s){return s.replace(/"/g,"").split(" ")});t.length>0&&(t.length-=1);var n=this.rows,a=this.selector;this.changeData(function(){n.paste(t,a.range)})}},{key:"autofill",value:function(r,t){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},s=this.selector.range;return!!Sc.call(this,s,r,a)&&(this.changeData(function(){zs.call(n,s,r,t,!0)}),!0)}},{key:"clearClipboard",value:function(){this.clipboard.clear()}},{key:"calSelectedRangeByEnd",value:function(r,t){var n=this.selector,a=this.rows,s=this.cols,o=this.merges,i=n.range,c=i.sri,u=i.sci,l=i.eri,A=i.eci,h=n.ri,f=n.ci,d=r,g=t;return r<0&&(d=a.len-1),t<0&&(g=s.len-1),d>h?(c=h,l=d):(c=d,l=h),g>f?(u=f,A=g):(u=g,A=f),n.range=o.union(new un(c,u,l,A)),n.range=o.union(n.range),n.range}},{key:"calSelectedRangeByStart",value:function(r,t){var n=this.selector,a=this.rows,s=this.cols,o=this.merges.getFirstIncludes(r,t);return o===null&&(o=new un(r,t,r,t),r===-1&&(o.sri=0,o.eri=a.len-1),t===-1&&(o.sci=0,o.eci=s.len-1)),n.range=o,o}},{key:"setSelectedCellAttr",value:function(r,t){var n=this;this.changeData(function(){var a=n.selector,s=n.styles,o=n.rows;if(r==="merge")t?n.merge():n.unmerge();else if(r==="border")Rs.call(n,t);else if(r==="formula"){var i=a.ri,c=a.ci,u=a.range;if(a.multiple()){var l=Tt(a.size(),2),A=l[0],h=l[1],f=u.sri,d=u.sci,g=u.eri,p=u.eci;if(A>1)for(var m=d;m<=p;m+=1)o.getCellOrNew(g+1,m).text="=".concat(t,"(").concat(Cr(m,f),":").concat(Cr(m,g),")");else h>1&&(o.getCellOrNew(i,p+1).text="=".concat(t,"(").concat(Cr(d,i),":").concat(Cr(p,i),")"))}else o.getCellOrNew(i,c).text="=".concat(t,"()")}else a.range.each(function(v,y){var I=o.getCellOrNew(v,y),E={};if(I.style!==void 0&&(E=ln.cloneDeep(s[I.style])),r==="format")E.format=t,I.style=n.addStyle(E);else if(r==="font-bold"||r==="font-italic"||r==="font-name"||r==="font-size"){var k={};k[r.split("-")[1]]=t,E.font=Object.assign(E.font||{},k),I.style=n.addStyle(E)}else r==="strike"||r==="textwrap"||r==="underline"||r==="align"||r==="valign"||r==="color"||r==="bgcolor"?(E[r]=t,I.style=n.addStyle(E)):I[r]=t})})}},{key:"setSelectedCellText",value:function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"input",n=this.autoFilter,a=this.selector,s=this.rows,o=a.ri,i=a.ci,c=o;this.unsortedRowMap.has(o)&&(c=this.unsortedRowMap.get(o));var u=s.getCell(c,i),l=u?u.text:"";if(this.setCellText(c,i,r,t),n.active()){var A=n.getFilter(i);if(A){var h=A.value.findIndex(function(f){return f===l});h>=0&&A.value.splice(h,1,r)}}}},{key:"getSelectedCell",value:function(){var r=this.selector,t=r.ri,n=r.ci,a=t;return this.unsortedRowMap.has(t)&&(a=this.unsortedRowMap.get(t)),this.rows.getCell(a,n)}},{key:"xyInSelectedRect",value:function(r,t){var n=this.getSelectedRect(),a=n.left,s=n.top,o=n.width,i=n.height,c=r-this.cols.indexWidth,u=t-this.rows.height;return c>a&&cs&&u0&&m>l&&(d=l),p>0&&p>A&&(g=A),{l,t:A,left:d,top:g,height:h,width:f,scroll:t}}},{key:"getCellRectByXY",value:function(r,t){var n=this.scroll,a=this.merges,s=this.rows,o=this.cols,i=Or.call(this,t,n.y),c=i.ri,u=i.top,l=i.height,A=$r.call(this,r,n.x),h=A.ci,f=A.left,d=A.width;if(h===-1&&(d=o.totalWidth()),c===-1&&(l=s.totalHeight()),c>=0||h>=0){var g=a.getFirstIncludes(c,h);if(g){c=g.sri,h=g.sci;var p=this.cellRect(c,h);f=p.left,u=p.top,d=p.width,l=p.height}}return{ri:c,ci:h,left:f,top:u,width:d,height:l}}},{key:"isSignleSelected",value:function(){var r=this.selector.range,t=r.sri,n=r.sci,a=r.eri,s=r.eci,o=this.getCell(t,n);if(o&&o.merge){var i=Tt(o.merge,2),c=i[0],u=i[1];if(t+c===a&&n+u===s)return!0}return!this.selector.multiple()}},{key:"canUnmerge",value:function(){var r=this.selector.range,t=r.sri,n=r.sci,a=r.eri,s=r.eci,o=this.getCell(t,n);if(o&&o.merge){var i=Tt(o.merge,2),c=i[0],u=i[1];if(t+c===a&&n+u===s)return!0}return!1}},{key:"merge",value:function(){var r=this,t=this.selector,n=this.rows;if(!this.isSignleSelected()){var a=Tt(t.size(),2),s=a[0],o=a[1];if(s>1||o>1){var i=t.range,c=i.sri,u=i.sci;this.changeData(function(){var l=n.getCellOrNew(c,u);l.merge=[s-1,o-1],r.merges.add(t.range),r.rows.deleteCells(t.range),r.rows.setCell(c,u,l)})}}}},{key:"unmerge",value:function(){var r=this,t=this.selector;if(this.isSignleSelected()){var n=t.range,a=n.sri,s=n.sci;this.changeData(function(){r.rows.deleteCell(a,s,"merge"),r.merges.deleteWithin(t.range)})}}},{key:"canAutofilter",value:function(){return!this.autoFilter.active()}},{key:"autofilter",value:function(){var r=this,t=this.autoFilter,n=this.selector;this.changeData(function(){t.active()?(t.clear(),r.exceptRowSet=new Set,r.sortedRowMap=new Map,r.unsortedRowMap=new Map):t.ref=n.range.toString()})}},{key:"setAutoFilter",value:function(r,t,n,a){var s=this.autoFilter;s.addFilter(r,n,a),s.setSort(r,t),this.resetAutoFilter()}},{key:"resetAutoFilter",value:function(){var r=this,t=this.autoFilter,n=this.rows;if(t.active()){var a=t.sort,s=t.filteredRows(function(l,A){return n.getCell(l,A)}),o=s.rset,i=s.fset,c=Array.from(i),u=Array.from(i);a&&c.sort(function(l,A){return a.order==="asc"?l-A:a.order==="desc"?A-l:0}),this.exceptRowSet=o,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,c.forEach(function(l,A){r.sortedRowMap.set(u[A],l),r.unsortedRowMap.set(l,u[A])})}}},{key:"deleteCell",value:function(){var r=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"all",n=this.selector;this.changeData(function(){r.rows.deleteCells(n.range,t),t!=="all"&&t!=="format"||r.merges.deleteWithin(n.range)})}},{key:"insert",value:function(r){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.changeData(function(){var a=t.selector.range,s=a.sri,o=a.sci,i=t.rows,c=t.merges,u=t.cols,l=s;r==="row"?i.insert(s,n):r==="column"&&(i.insertColumn(o,n),l=o,u.len+=1),c.shift(r,l,n,function(A,h,f,d){var g=i.getCell(A,h);g.merge[0]+=f,g.merge[1]+=d})})}},{key:"delete",value:function(r){var t=this;this.changeData(function(){var n=t.rows,a=t.merges,s=t.selector,o=t.cols,i=s.range,c=s.range,u=c.sri,l=c.sci,A=c.eri,h=c.eci,f=Tt(s.range.size(),2),d=f[0],g=f[1],p=u,m=d;r==="row"?n.delete(u,A):r==="column"&&(n.deleteColumn(l,h),p=i.sci,m=g,o.len-=1),a.shift(r,p,-m,function(v,y,I,E){var k=n.getCell(v,y);k.merge[0]+=I,k.merge[1]+=E,k.merge[0]===0&&k.merge[1]===0&&delete k.merge})})}},{key:"scrollx",value:function(r,t){var n=this.scroll,a=this.freeze,s=this.cols,o=Tt(a,2)[1],i=Tt(ln.rangeReduceIf(o,s.len,0,0,r,function(h){return s.getWidth(h)}),3),c=i[0],u=i[1],l=i[2],A=u;r>0&&(A+=l),n.x!==A&&(n.ci=r>0?c:0,n.x=A,t())}},{key:"scrolly",value:function(r,t){var n=this.scroll,a=this.freeze,s=this.rows,o=Tt(a,1)[0],i=Tt(ln.rangeReduceIf(o,s.len,0,0,r,function(h){return s.getHeight(h)}),3),c=i[0],u=i[1],l=i[2],A=u;r>0&&(A+=l),n.y!==A&&(n.ri=r>0?c:0,n.y=A,t())}},{key:"cellRect",value:function(r,t){var n=this.rows,a=this.cols,s=a.sumWidth(0,t),o=n.sumHeight(0,r),i=n.getCell(r,t),c=a.getWidth(t),u=n.getHeight(r);if(i!==null&&i.merge){var l=Tt(i.merge,2),A=l[0],h=l[1];if(A>0)for(var f=1;f<=A;f+=1)u+=n.getHeight(r+f);if(h>0)for(var d=1;d<=h;d+=1)c+=a.getWidth(t+d)}return{left:s,top:o,width:c,height:u,cell:i}}},{key:"getCell",value:function(r,t){return this.rows.getCell(r,t)}},{key:"getCellTextOrDefault",value:function(r,t){var n=this.getCell(r,t);return n&&n.text?n.text:""}},{key:"getCellStyle",value:function(r,t){var n=this.getCell(r,t);return n&&n.style!==void 0?this.styles[n.style]:null}},{key:"getCellStyleOrDefault",value:function(r,t){var n=this.styles,a=this.rows.getCell(r,t),s=a&&a.style!==void 0?n[a.style]:{};return ln.merge(this.defaultStyle(),s)}},{key:"getSelectedCellStyle",value:function(){var r=this.selector,t=r.ri,n=r.ci;return this.getCellStyleOrDefault(t,n)}},{key:"setCellText",value:function(r,t,n,a){var s=this.rows,o=this.history,i=this.validations;a==="finished"?(s.setCellText(r,t,""),o.add(this.getData()),s.setCellText(r,t,n)):(s.setCellText(r,t,n),this.change(this.getData())),i.validate(r,t,n)}},{key:"freezeIsActive",value:function(){var r=Tt(this.freeze,2),t=r[0],n=r[1];return t>0||n>0}},{key:"setFreeze",value:function(r,t){var n=this;this.changeData(function(){n.freeze=[r,t]})}},{key:"freezeTotalWidth",value:function(){return this.cols.sumWidth(0,this.freeze[1])}},{key:"freezeTotalHeight",value:function(){return this.rows.sumHeight(0,this.freeze[0])}},{key:"setRowHeight",value:function(r,t){var n=this;this.changeData(function(){n.rows.setHeight(r,t)})}},{key:"setColWidth",value:function(r,t){var n=this;this.changeData(function(){n.cols.setWidth(r,t)})}},{key:"viewHeight",value:function(){var r=this.settings,t=r.view,n=r.showToolbar,a=r.showBottomBar,s=t.height();return a&&(s-=41),n&&(s-=41),s}},{key:"viewWidth",value:function(){return this.settings.view.width()}},{key:"freezeViewRange",value:function(){var r=Tt(this.freeze,2),t=r[0],n=r[1];return new un(0,0,t-1,n-1,this.freezeTotalWidth(),this.freezeTotalHeight())}},{key:"contentRange",value:function(){var r=this.rows,t=this.cols,n=Tt(r.maxCell(),2),a=n[0],s=n[1],o=r.sumHeight(0,a+1),i=t.sumWidth(0,s+1);return new un(0,0,a,s,i,o)}},{key:"exceptRowTotalHeight",value:function(r,t){var n=this.exceptRowSet,a=this.rows,s=Array.from(n),o=0;return s.forEach(function(i){if(it){var c=a.getHeight(i);o+=c}}),o}},{key:"viewRange",value:function(){var r=this.scroll,t=this.rows,n=this.cols,a=this.freeze,s=this.exceptRowSet,o=r.ri,i=r.ci;o<=0&&(o=Tt(a,1)[0]),i<=0&&(i=Tt(a,2)[1]);for(var c=0,u=0,l=[t.len,n.len],A=l[0],h=l[1],f=o;fthis.viewHeight()));f+=1);for(var d=i;dthis.viewWidth()));d+=1);return new un(o,i,A,h,c,u)}},{key:"eachMergesInView",value:function(r,t){this.merges.filterIntersects(r).forEach(function(n){return t(n)})}},{key:"hideRowsOrCols",value:function(){var r=this.rows,t=this.cols,n=this.selector,a=Tt(n.size(),2),s=a[0],o=a[1],i=n.range,c=i.sri,u=i.sci,l=i.eri,A=i.eci;if(s===r.len)for(var h=u;h<=A;h+=1)t.setHide(h,!0);else if(o===t.len)for(var f=c;f<=l;f+=1)r.setHide(f,!0)}},{key:"unhideRowsOrCols",value:function(r,t){this["".concat(r,"s")].unhide(t)}},{key:"rowEach",value:function(r,t,n){for(var a=0,s=this.rows,o=this.exceptRowSet,i=Et(o),c=0,u=0;u0&&(n(l,a,A),(a+=A)>this.viewHeight()))break}}},{key:"colEach",value:function(r,t,n){for(var a=0,s=this.cols,o=r;o<=t;o+=1){var i=s.getWidth(o);if(i>0&&(n(o,a,i),(a+=i)>this.viewWidth()))break}}},{key:"defaultStyle",value:function(){return this.settings.style}},{key:"addStyle",value:function(r){for(var t=this.styles,n=0;n=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return o=c.done,c},e:function(c){i=!0,s=c},f:function(){try{o||t.return==null||t.return()}finally{if(i)throw s}}}}function da(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);tMath.abs(r)?n(e>0?"right":"left",e,t):n(r>0?"down":"up",r,t)}var lr="x-spreadsheet",Lt=function(){function e(){var r=this,t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=arguments.length>1?arguments[1]:void 0;Fe(this,e),this.moving=!1,this.vertical=t,this.el=Oe("div","".concat(lr,"-resizer ").concat(t?"vertical":"horizontal")).children(this.unhideHoverEl=Oe("div","".concat(lr,"-resizer-hover")).on("dblclick.stop",function(a){return r.mousedblclickHandler(a)}).css("position","absolute").hide(),this.hoverEl=Oe("div","".concat(lr,"-resizer-hover")).on("mousedown.stop",function(a){return r.mousedownHandler(a)}),this.lineEl=Oe("div","".concat(lr,"-resizer-line")).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=n,this.unhideFn=function(){}}return Le(e,[{key:"showUnhide",value:function(r){this.unhideIndex=r,this.unhideHoverEl.show()}},{key:"hideUnhide",value:function(){this.unhideHoverEl.hide()}},{key:"show",value:function(r,t){var n=this.moving,a=this.vertical,s=this.hoverEl,o=this.lineEl,i=this.el,c=this.unhideHoverEl;if(!n){this.cRect=r;var u=r.left,l=r.top,A=r.width,h=r.height;i.offset({left:a?u+A-5:u,top:a?l:l+h-5}).show(),s.offset({width:a?5:A,height:a?h:5}),o.offset({width:a?0:t.width,height:a?t.height:0}),c.offset({left:a?5-A:u,top:a?l:5-h,width:a?5:A,height:a?h:5})}}},{key:"hide",value:function(){this.el.offset({left:0,top:0}).hide(),this.hideUnhide()}},{key:"mousedblclickHandler",value:function(){this.unhideIndex&&this.unhideFn(this.unhideIndex)}},{key:"mousedownHandler",value:function(r){var t=this,n=r,a=this.el,s=this.lineEl,o=this.cRect,i=this.vertical,c=this.minDistance,u=i?o.width:o.height;s.show(),ei(window,function(l){t.moving=!0,n!==null&&l.buttons===1&&(i?(u+=l.movementX)>c&&a.css("left","".concat(o.left+u,"px")):(u+=l.movementY)>c&&a.css("top","".concat(o.top+u,"px")),n=l)},function(){n=null,s.hide(),t.moving=!1,t.hide(),t.finishedFn&&(un){var a=this.vertical?"height":"width";this.el.css(a,"".concat(n-15,"px")).show(),this.contentEl.css(this.vertical?"width":"height","1px").css(a,"".concat(t,"px"))}else this.el.hide();return this}}]),e}(),Is=10,Fs=function(){function e(){var r=this,t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];Fe(this,e),this.useHideInput=t,this.inputChange=function(){},this.cornerEl=Oe("div","".concat(lr,"-selector-corner")),this.areaEl=Oe("div","".concat(lr,"-selector-area")).child(this.cornerEl).hide(),this.clipboardEl=Oe("div","".concat(lr,"-selector-clipboard")).hide(),this.autofillEl=Oe("div","".concat(lr,"-selector-autofill")).hide(),this.el=Oe("div","".concat(lr,"-selector")).css("z-index","".concat(Is)).children(this.areaEl,this.clipboardEl,this.autofillEl).hide(),t&&(this.hideInput=Oe("input","").on("compositionend",function(n){r.inputChange(n.target.value)}),this.el.child(this.hideInputDiv=Oe("div","hide-input").child(this.hideInput)),this.el.child(this.hideInputDiv=Oe("div","hide-input").child(this.hideInput))),Is+=1}return Le(e,[{key:"setOffset",value:function(r){return this.el.offset(r).show(),this}},{key:"hide",value:function(){return this.el.hide(),this}},{key:"setAreaOffset",value:function(r){var t=r.left,n=r.top,a={width:r.width-3+.8,height:r.height-3+.8,left:t-.8,top:n-.8};this.areaEl.offset(a).show(),this.useHideInput&&(this.hideInputDiv.offset(a),this.hideInput.val("").focus())}},{key:"setClipboardOffset",value:function(r){var t=r.left,n=r.top,a=r.width,s=r.height;this.clipboardEl.offset({left:t,top:n,width:a-5,height:s-5})}},{key:"showAutofill",value:function(r){var t=r.left,n=r.top,a=r.width,s=r.height;this.autofillEl.offset({width:a-3,height:s-3,left:t,top:n}).show()}},{key:"hideAutofill",value:function(){this.autofillEl.hide()}},{key:"showClipboard",value:function(){this.clipboardEl.show()}},{key:"hideClipboard",value:function(){this.clipboardEl.hide()}}]),e}();function Zc(e){var r=this.data,t=e.left,n=e.top,a=e.width,s=e.height,o=e.scroll,i=e.l,c=e.t,u=r.freezeTotalWidth(),l=r.freezeTotalHeight(),A=t-u;u>i&&(A-=o.x);var h=n-l;return l>c&&(h-=o.y),{left:A,top:h,width:a,height:s}}function Eu(e){var r=this.data,t=e.left,n=e.width,a=e.height,s=e.l,o=e.t,i=e.scroll,c=r.freezeTotalWidth(),u=t-c;return c>s&&(u-=i.x),{left:u,top:o,width:n,height:a}}function Xc(e){var r=this.data,t=e.top,n=e.width,a=e.height,s=e.l,o=e.t,i=e.scroll,c=r.freezeTotalHeight(),u=t-c;return c>o&&(u-=i.y),{left:s,top:u,width:n,height:a}}function $c(e){this.br.setAreaOffset(Zc.call(this,e))}function _c(e){this.tl.setAreaOffset(e)}function wu(e){this.t.setAreaOffset(Eu.call(this,e))}function Sn(e){this.l.setAreaOffset(Xc.call(this,e))}function Zs(e){this.l.setClipboardOffset(Xc.call(this,e))}function ga(e){this.br.setClipboardOffset(Zc.call(this,e))}function Bu(e){this.tl.setClipboardOffset(e)}function Zu(e){this.t.setClipboardOffset(Eu.call(this,e))}function Ml(e){$c.call(this,e),_c.call(this,e),wu.call(this,e),Sn.call(this,e)}function Ac(e){ga.call(this,e),Bu.call(this,e),Zu.call(this,e),Zs.call(this,e)}var sa=function(){function e(r){var t=this;Fe(this,e),this.inputChange=function(){},this.data=r,this.br=new Fs(!0),this.t=new Fs,this.l=new Fs,this.tl=new Fs,this.br.inputChange=function(n){t.inputChange(n)},this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=Oe("div","".concat(lr,"-selectors")).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,Is+=1}return Le(e,[{key:"resetData",value:function(r){this.data=r,this.range=r.selector.range,this.resetAreaOffset()}},{key:"hide",value:function(){this.el.hide()}},{key:"resetOffset",value:function(){var r=this.data,t=this.tl,n=this.t,a=this.l,s=this.br,o=r.freezeTotalHeight(),i=r.freezeTotalWidth();o>0||i>0?(t.setOffset({width:i,height:o}),n.setOffset({left:i,height:o}),a.setOffset({top:o,width:i}),s.setOffset({left:i,top:o})):(t.hide(),n.hide(),a.hide(),s.setOffset({left:0,top:0}))}},{key:"resetAreaOffset",value:function(){var r=this.data.getSelectedRect(),t=this.data.getClipboardRect();Ml.call(this,r),Ac.call(this,t),this.resetOffset()}},{key:"resetBRTAreaOffset",value:function(){var r=this.data.getSelectedRect(),t=this.data.getClipboardRect();$c.call(this,r),wu.call(this,r),ga.call(this,t),Zu.call(this,t),this.resetOffset()}},{key:"resetBRLAreaOffset",value:function(){var r=this.data.getSelectedRect(),t=this.data.getClipboardRect();$c.call(this,r),Sn.call(this,r),ga.call(this,t),Zs.call(this,t),this.resetOffset()}},{key:"set",value:function(r,t){var n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],a=this.data,s=a.calSelectedRangeByStart(r,t),o=s.sri,i=s.sci;if(n){var c=r,u=t;r<0&&(c=0),t<0&&(u=0),a.selector.setIndexes(c,u),this.indexes=[c,u]}this.moveIndexes=[o,i],this.range=s,this.resetAreaOffset(),this.el.show()}},{key:"setEnd",value:function(r,t){var n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],a=this.data,s=this.lastri,o=this.lastci;if(n){if(r===s&&t===o)return;this.lastri=r,this.lastci=t}this.range=a.calSelectedRangeByEnd(r,t),Ml.call(this,this.data.getSelectedRect())}},{key:"reset",value:function(){var r=this.data.selector.range,t=r.eri,n=r.eci;this.setEnd(t,n)}},{key:"showAutofill",value:function(r,t){if(r!==-1||t!==-1){var n=this.range,a=n.sri,s=n.sci,o=n.eri,i=n.eci,c=r,u=t,l=a-r,A=o-r,h=i-t;if(s-t>0)this.arange=new un(a,u,o,s-1);else if(l>0)this.arange=new un(c,s,a-1,i);else if(h<0)this.arange=new un(a,i+1,o,u);else{if(!(A<0))return void(this.arange=null);this.arange=new un(o+1,s,c,i)}if(this.arange!==null){var f=this.data.getRect(this.arange);f.width+=2,f.height+=2;var d=this.br,g=this.l,p=this.t,m=this.tl;d.showAutofill(Zc.call(this,f)),g.showAutofill(Xc.call(this,f)),p.showAutofill(Eu.call(this,f)),m.showAutofill(f)}}}},{key:"hideAutofill",value:function(){var r=this;["br","l","t","tl"].forEach(function(t){r[t].hideAutofill()})}},{key:"showClipboard",value:function(){var r=this,t=this.data.getClipboardRect();Ac.call(this,t),["br","l","t","tl"].forEach(function(n){r[n].showClipboard()})}},{key:"hideClipboard",value:function(){var r=this;["br","l","t","tl"].forEach(function(t){r[t].hideClipboard()})}}]),e}();function qa(e){e.preventDefault(),e.stopPropagation();var r=this.filterItems;r.length<=0||(this.itemIndex>=0&&r[this.itemIndex].toggle(),this.itemIndex-=1,this.itemIndex<0&&(this.itemIndex=r.length-1),r[this.itemIndex].toggle())}function Ao(e){e.stopPropagation();var r=this.filterItems;r.length<=0||(this.itemIndex>=0&&r[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>r.length-1&&(this.itemIndex=0),r[this.itemIndex].toggle())}function xA(e){e.preventDefault();var r=this.filterItems;r.length<=0||(e.stopPropagation(),this.itemIndex<0&&(this.itemIndex=0),r[this.itemIndex].el.click(),this.hide())}function Vo(e){var r=e.keyCode;switch(e.ctrlKey&&e.stopPropagation(),r){case 37:case 39:default:e.stopPropagation();break;case 38:qa.call(this,e);break;case 40:Ao.call(this,e);break;case 13:case 9:xA.call(this,e)}}var Xu=function(){function e(r,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"200px";Fe(this,e),this.filterItems=[],this.items=r,this.el=Oe("div","".concat(lr,"-suggest")).css("width",n).hide(),this.itemClick=t,this.itemIndex=-1}return Le(e,[{key:"setOffset",value:function(r){this.el.cssRemoveKeys("top","bottom").offset(r)}},{key:"hide",value:function(){var r=this.el;this.filterItems=[],this.itemIndex=-1,r.hide(),Ln(this.el.parent())}},{key:"setItems",value:function(r){this.items=r}},{key:"search",value:function(r){var t,n=this,a=this.items;if(/^\s*$/.test(r)||(a=a.filter(function(o){return(o.key||o).startsWith(r.toUpperCase())})),a=a.map(function(o){var i=o.title;i?typeof i=="function"&&(i=i()):i=o;var c=Oe("div","".concat(lr,"-item")).child(i).on("click.stop",function(){n.itemClick(o),n.hide()});return o.label&&c.child(Oe("div","label").html(o.label)),c}),this.filterItems=a,!(a.length<=0)){var s=this.el;(t=s.html("")).children.apply(t,Et(a)).show(),Ai(s.parent(),function(){n.hide()})}}},{key:"bindInputEvents",value:function(r){var t=this;r.on("keydown",function(n){return Vo.call(t,n)})}}]),e}();function Gf(e,r){return(Gf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(e,r)}function Mt(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&Gf(e,r)}function di(e,r){if(r&&(ge(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}function Ur(e){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}function Bg(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Uo=function(e){Mt(t,e);var r=Bg(t);function t(n){var a;return Fe(this,t),(a=r.call(this,"div","".concat(lr,"-icon"))).iconNameEl=Oe("div","".concat(lr,"-icon-img ").concat(n)),a.child(a.iconNameEl),a}return Le(t,[{key:"setName",value:function(n){this.iconNameEl.className("".concat(lr,"-icon-img ").concat(n))}}]),t}(hn);function Uf(e,r){e.setMonth(e.getMonth()+r)}function Dh(e,r){var t=new Date(e);return t.setDate(r-e.getDay()+1),t}var jf=function(){function e(r){var t,n=this;Fe(this,e),this.value=r,this.cvalue=new Date(r),this.headerLeftEl=Oe("div","calendar-header-left"),this.bodyEl=Oe("tbody",""),this.buildAll(),this.el=Oe("div","x-spreadsheet-calendar").children(Oe("div","calendar-header").children(this.headerLeftEl,Oe("div","calendar-header-right").children(Oe("a","calendar-prev").on("click.stop",function(){return n.prev()}).child(new Uo("chevron-left")),Oe("a","calendar-next").on("click.stop",function(){return n.next()}).child(new Uo("chevron-right")))),Oe("table","calendar-body").children(Oe("thead","").child((t=Oe("tr","")).children.apply(t,Et(tn("calendar.weeks").map(function(a){return Oe("th","cell").child(a)})))),this.bodyEl)),this.selectChange=function(){}}return Le(e,[{key:"setValue",value:function(r){this.value=r,this.cvalue=new Date(r),this.buildAll()}},{key:"prev",value:function(){Uf(this.value,-1),this.buildAll()}},{key:"next",value:function(){Uf(this.value,1),this.buildAll()}},{key:"buildAll",value:function(){this.buildHeaderLeft(),this.buildBody()}},{key:"buildHeaderLeft",value:function(){var r=this.value;this.headerLeftEl.html("".concat(tn("calendar.months")[r.getMonth()]," ").concat(r.getFullYear()))}},{key:"buildBody",value:function(){var r,t=this,n=this.value,a=this.cvalue,s=this.bodyEl,o=function(i,c,u){for(var l=new Date(i,c,1,23,59,59),A=[[],[],[],[],[],[]],h=0;h<6;h+=1)for(var f=0;f<7;f+=1){var d=Dh(l,7*h+f),g=d.getMonth()!==c,p=d.getMonth()===u.getMonth()&&d.getDate()===u.getDate();A[h][f]={d,disabled:g,active:p}}return A}(n.getFullYear(),n.getMonth(),a).map(function(i){var c,u=i.map(function(l){var A="cell";return l.disabled&&(A+=" disabled"),l.active&&(A+=" active"),Oe("td","").child(Oe("div",A).on("click.stop",function(){t.selectChange(l.d)}).child(l.d.getDate().toString()))});return(c=Oe("tr","")).children.apply(c,Et(u))});(r=s.html("")).children.apply(r,Et(o))}}]),e}(),Rh=function(){function e(){Fe(this,e),this.calendar=new jf(new Date),this.el=Oe("div","".concat(lr,"-datepicker")).child(this.calendar.el).hide()}return Le(e,[{key:"setValue",value:function(r){var t=this.calendar;return typeof r=="string"?/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)&&t.setValue(new Date(r.replace(new RegExp("-","g"),"/"))):r instanceof Date&&t.setValue(r),this}},{key:"change",value:function(r){var t=this;this.calendar.selectChange=function(n){r(n),t.hide()}}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}}]),e}();function SA(){var e=this.inputText;if(!/^\s*$/.test(e)){var r=this.textlineEl,t=this.textEl,n=this.areaOffset,a=e.split(` `),s=Math.max.apply(Math,Et(a.map(function(A){return A.length}))),o=r.offset().width/e.length,i=(s+1)*o+5,c=this.viewFn().width-n.left-o,u=a.length;if(i>n.width){var l=i;i>c&&(l=c,u+=parseInt(i/c,10),u+=i%c>0?1:0),t.css("width","".concat(l,"px"))}(u*=this.rowHeight)>n.height&&t.css("height","".concat(u,"px"))}}function Qg(e,r){var t=e.target,n=t.value,a=t.selectionEnd,s="".concat(n.slice(0,a)).concat(r).concat(n.slice(a));t.value=s,t.setSelectionRange(a+1,a+1),this.inputText=s,this.textlineEl.html(s),SA.call(this)}function kg(e){var r=e.keyCode,t=e.altKey;r!==13&&r!==9&&e.stopPropagation(),r===13&&t&&(Qg.call(this,e,` `),e.stopPropagation()),r!==13||t||e.preventDefault()}function xg(e){var r=e.target.value,t=this.suggest,n=this.textlineEl,a=this.validator,s=this.cell;if(s!==null)if("editable"in s&&s.editable===!0||s.editable===void 0){if(this.inputText=r,a)a.type==="list"?t.search(r):t.hide();else{var o=r.lastIndexOf("=");o!==-1?t.search(r.substring(o+1)):t.hide()}n.html(r),SA.call(this),this.change("input",r)}else e.target.value=s.text;else{if(this.inputText=r,a)a.type==="list"?t.search(r):t.hide();else{var i=r.lastIndexOf("=");i!==-1?t.search(r.substring(i+1)):t.hide()}n.html(r),SA.call(this),this.change("input",r)}}function Fh(e){var r=this.textEl.el;setTimeout(function(){r.focus(),r.setSelectionRange(e,e)},0)}function Hf(e,r){var t=this.textEl,n=this.textlineEl;t.el.blur(),t.val(e),n.html(e),Fh.call(this,r)}function Sg(e){var r=this.inputText,t=this.validator,n=0;if(t&&t.type==="list")this.inputText=e,n=this.inputText.length;else{var a=r.lastIndexOf("="),s=r.substring(0,a+1),o=r.substring(a+1);o=o.indexOf(")")!==-1?o.substring(o.indexOf(")")):"",this.inputText="".concat(s+e.key,"("),n=this.inputText.length,this.inputText+=")".concat(o)}Hf.call(this,this.inputText,n)}function Yf(){this.suggest.setItems(this.formulas)}var _g=function(){function e(r,t,n){var a=this;Fe(this,e),this.viewFn=t,this.rowHeight=n,this.formulas=r,this.suggest=new Xu(r,function(s){Sg.call(a,s)}),this.datepicker=new Rh,this.datepicker.change(function(s){a.setText(function(o){var i=o.getMonth()+1,c=o.getDate();return i<10&&(i="0".concat(i)),c<10&&(c="0".concat(c)),"".concat(o.getFullYear(),"-").concat(i,"-").concat(c)}(s)),a.clear()}),this.areaEl=Oe("div","".concat(lr,"-editor-area")).children(this.textEl=Oe("textarea","").on("input",function(s){return xg.call(a,s)}).on("paste.stop",function(){}).on("keydown",function(s){return kg.call(a,s)}),this.textlineEl=Oe("div","textline"),this.suggest.el,this.datepicker.el).on("mousemove.stop",function(){}).on("mousedown.stop",function(){}),this.el=Oe("div","".concat(lr,"-editor")).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=function(){}}return Le(e,[{key:"setFreezeLengths",value:function(r,t){this.freeze.w=r,this.freeze.h=t}},{key:"clear",value:function(){this.inputText!==""&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.textEl.val(""),this.textlineEl.html(""),Yf.call(this),this.datepicker.hide()}},{key:"setOffset",value:function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",n=this.textEl,a=this.areaEl,s=this.suggest,o=this.freeze,i=this.el;if(r){this.areaOffset=r;var c=r.left,u=r.top,l=r.width,A=r.height,h=r.l,f=r.t,d={left:0,top:0};o.w>h&&o.h>f||(o.wh?d.top=o.h:o.h>f&&(d.left=o.w)),i.offset(d),a.offset({left:c-d.left-.8,top:u-d.top-.8}),n.offset({width:l-9+.8,height:A-3+.8});var g={left:0};g[t]=A,s.setOffset(g),s.hide()}}},{key:"setCell",value:function(r,t){var n=this.el,a=this.datepicker,s=this.suggest;n.show(),this.cell=r;var o=r&&r.text||"";if(this.setText(o),this.validator=t,t){var i=t.type;i==="date"&&(a.show(),/^\s*$/.test(o)||a.setValue(o)),i==="list"&&(s.setItems(t.values()),s.search(""))}}},{key:"setText",value:function(r){this.inputText=r,Hf.call(this,r,r.length),SA.call(this)}}]),e}();function Dg(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Qu=function(e){Mt(t,e);var r=Dg(t);function t(n){var a,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return Fe(this,t),(a=r.call(this,"div","".concat(lr,"-button ").concat(s))).child(tn("button.".concat(n))),a}return Le(t)}(hn);function _A(){return window.devicePixelRatio||1}function $u(){return _A()-.5}function hi(e){return parseInt(e*_A(),10)}function ku(e){var r=hi(e);return r>0?r-.5:.5}var Rg=function(){function e(r,t,n,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;Fe(this,e),this.x=r,this.y=t,this.width=n,this.height=a,this.padding=s,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null}return Le(e,[{key:"setBorders",value:function(r){var t=r.top,n=r.bottom,a=r.left,s=r.right;t&&(this.borderTop=t),s&&(this.borderRight=s),n&&(this.borderBottom=n),a&&(this.borderLeft=a)}},{key:"innerWidth",value:function(){return this.width-2*this.padding-2}},{key:"innerHeight",value:function(){return this.height-2*this.padding-2}},{key:"textx",value:function(r){var t=this.width,n=this.padding,a=this.x;return r==="left"?a+=n:r==="center"?a+=t/2:r==="right"&&(a+=t-n),a}},{key:"texty",value:function(r,t){var n=this.height,a=this.padding,s=this.y;return r==="top"?s+=a:r==="middle"?s+=n/2-t/2:r==="bottom"&&(s+=n-a-t),s}},{key:"topxys",value:function(){var r=this.x,t=this.y;return[[r,t],[r+this.width,t]]}},{key:"rightxys",value:function(){var r=this.x,t=this.y,n=this.width;return[[r+n,t],[r+n,t+this.height]]}},{key:"bottomxys",value:function(){var r=this.x,t=this.y,n=this.width,a=this.height;return[[r,t+a],[r+n,t+a]]}},{key:"leftxys",value:function(){var r=this.x,t=this.y;return[[r,t],[r,t+this.height]]}}]),e}();function Jf(e,r,t,n,a,s,o){var i={x:0,y:0};e==="underline"?i.y=a==="bottom"?0:a==="top"?-(s+2):-s/2:e==="strike"&&(a==="bottom"?i.y=s/2:a==="top"&&(i.y=-(s/2+2))),n==="center"?i.x=o/2:n==="right"&&(i.x=o),this.line([r-i.x,t-i.y],[r-i.x+o,t-i.y])}var Ba=function(){function e(r,t,n){Fe(this,e),this.el=r,this.ctx=r.getContext("2d"),this.resize(t,n),this.ctx.scale(_A(),_A())}return Le(e,[{key:"resize",value:function(r,t){this.el.style.width="".concat(r,"px"),this.el.style.height="".concat(t,"px"),this.el.width=hi(r),this.el.height=hi(t)}},{key:"clear",value:function(){var r=this.el,t=r.width,n=r.height;return this.ctx.clearRect(0,0,t,n),this}},{key:"attr",value:function(r){return Object.assign(this.ctx,r),this}},{key:"save",value:function(){return this.ctx.save(),this.ctx.beginPath(),this}},{key:"restore",value:function(){return this.ctx.restore(),this}},{key:"beginPath",value:function(){return this.ctx.beginPath(),this}},{key:"translate",value:function(r,t){return this.ctx.translate(hi(r),hi(t)),this}},{key:"scale",value:function(r,t){return this.ctx.scale(r,t),this}},{key:"clearRect",value:function(r,t,n,a){return this.ctx.clearRect(r,t,n,a),this}},{key:"fillRect",value:function(r,t,n,a){return this.ctx.fillRect(hi(r)-.5,hi(t)-.5,hi(n),hi(a)),this}},{key:"fillText",value:function(r,t,n){return this.ctx.fillText(r,hi(t),hi(n)),this}},{key:"text",value:function(r,t){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],o=this.ctx,i=a.align,c=a.valign,u=a.font,l=a.color,A=a.strike,h=a.underline,f=t.textx(i);o.save(),o.beginPath(),this.attr({textAlign:i,textBaseline:c,font:"".concat(u.italic?"italic":""," ").concat(u.bold?"bold":""," ").concat(hi(u.size),"px ").concat(u.name),fillStyle:l,strokeStyle:l});var d="".concat(r).split(` `),g=t.innerWidth(),p=[];d.forEach(function(y){var I=o.measureText(y).width;if(s&&I>hi(g)){for(var E={w:0,len:0,start:0},k=0;k=hi(g)&&(p.push(y.substr(E.start,E.len)),E={w:0,len:0,start:k}),E.len+=1,E.w+=o.measureText(y[k]).width+1;E.len>0&&p.push(y.substr(E.start,E.len))}else p.push(y)});var m=(p.length-1)*(u.size+2),v=t.texty(c,m);return p.forEach(function(y){var I=o.measureText(y).width;n.fillText(y,f,v),A&&Jf.call(n,"strike",f,v,i,c,u.size,I),h&&Jf.call(n,"underline",f,v,i,c,u.size,I),v+=u.size+2}),o.restore(),this}},{key:"border",value:function(r,t){var n=this.ctx;return n.lineWidth=$u,n.strokeStyle=t,r==="medium"?n.lineWidth=hi(2)-.5:r==="thick"?n.lineWidth=hi(3):r==="dashed"?n.setLineDash([hi(3),hi(2)]):r==="dotted"?n.setLineDash([hi(1),hi(1)]):r==="double"&&n.setLineDash([hi(2),0]),this}},{key:"line",value:function(){var r=this.ctx;if(arguments.length>1){r.beginPath();var t=Tt(arguments.length<=0?void 0:arguments[0],2),n=t[0],a=t[1];r.moveTo(ku(n),ku(a));for(var s=1;s="0"&&n[0]<="9")return a*Number(n);var s=Tt(zt(n),2);return a*r(s[0],s[1])};const Ng={render:function e(r,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];if(r[0]==="="){var s=function(o){for(var i=[],c=[],u=[],l=0,A="",h=1,f="",d=0;d="a"&&g<="z")u.push(g.toUpperCase());else if(g>="0"&&g<="9"||g>="A"&&g<="Z"||g===".")u.push(g);else if(g==='"'){for(d+=1;o.charAt(d)!=='"';)u.push(o.charAt(d)),d+=1;c.push('"'.concat(u.join(""))),u=[]}else if(g==="-"&&/[+\-*/,(]/.test(f))u.push(g);else{if(g!=="("&&u.length>0&&c.push(u.join("")),g===")"){var p=i.pop();if(l===2)try{for(var m=Tt(zt(c.pop()),2),v=m[0],y=m[1],I=Tt(zt(c.pop()),2),E=I[0],k=I[1],R=0,T=E;T<=v;T+=1)for(var j=k;j<=y;j+=1)c.push(Cr(T,j)),R+=1;c.push([p,R])}catch{}else if(l===1||l===3)l===3&&c.push(A),c.push([p,h]),h=1;else for(;p!=="("&&(c.push(p),!(i.length<=0));)p=i.pop();l=0}else if(g==="="||g===">"||g==="<"){var W=o.charAt(d+1);A=g,W!=="="&&W!=="-"||(A+=W,d+=1),l=3}else if(g===":")l=2;else if(g===",")l===3&&c.push(A),l=1,h+=1;else if(g==="("&&u.length>0)i.push(u.join(""));else{if(i.length>0&&(g==="+"||g==="-")){var H=i[i.length-1];if(H!=="("&&c.push(i.pop()),H==="*"||H==="/")for(;i.length>0&&(H=i[i.length-1])!=="(";)c.push(i.pop())}else if(i.length>0){var X=i[i.length-1];X!=="*"&&X!=="/"||c.push(i.pop())}i.push(g)}u=[]}f=g}}for(u.length>0&&c.push(u.join(""));i.length>0;)c.push(i.pop());return c}(r.substring(1));return s.length<=0?r:function(o,i,c,u){for(var l=[],A=0;A"||f==="<"){var v=l.pop();Number.isNaN(v)||(v=Number(v));var y=l.pop();Number.isNaN(y)||(y=Number(y));var I=!1;f==="="?I=y===v:h===">"?I=y>v:h===">="?I=y>=v:h==="<"?I=y="a"&&f<="z"||f>="A"&&f<="Z")&&u.push(h),l.push(Fg(h,c)),u.pop()}}return l[0]}(s,t,function(o,i){return e(n(o,i),t,n,a)},a)}return r}};var Nh=[{key:"SUM",title:xr("formula.sum"),render:function(e){return e.reduce(function(r,t){return _a("+",r,t)},0)}},{key:"AVERAGE",title:xr("formula.average"),render:function(e){return e.reduce(function(r,t){return Number(r)+Number(t)},0)/e.length}},{key:"MAX",title:xr("formula.max"),render:function(e){return Math.max.apply(Math,Et(e.map(function(r){return Number(r)})))}},{key:"MIN",title:xr("formula.min"),render:function(e){return Math.min.apply(Math,Et(e.map(function(r){return Number(r)})))}},{key:"IF",title:xr("formula._if"),render:function(e){var r=Tt(e,3),t=r[0],n=r[1],a=r[2];return t?n:a}},{key:"AND",title:xr("formula.and"),render:function(e){return e.every(function(r){return r})}},{key:"OR",title:xr("formula.or"),render:function(e){return e.some(function(r){return r})}},{key:"CONCAT",title:xr("formula.concat"),render:function(e){return e.join("")}}],eu=Nh,bi={};Nh.forEach(function(e){bi[e.key]=e});var el=function(e){return e},hc=function(e){if(/^(-?\d*.?\d*)$/.test(e)){var r=Ir(Number(e).toFixed(2).toString().split("\\.")),t=r[0],n=r.slice(1);return[t.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")].concat(Et(n))}return e},tu=[{key:"normal",title:xr("format.normal"),type:"string",render:el},{key:"text",title:xr("format.text"),type:"string",render:el},{key:"number",title:xr("format.number"),type:"number",label:"1,000.12",render:hc},{key:"percent",title:xr("format.percent"),type:"number",label:"10.12%",render:function(e){return"".concat(e,"%")}},{key:"rmb",title:xr("format.rmb"),type:"number",label:"¥10.00",render:function(e){return"¥".concat(hc(e))}},{key:"usd",title:xr("format.usd"),type:"number",label:"$10.00",render:function(e){return"$".concat(hc(e))}},{key:"eur",title:xr("format.eur"),type:"number",label:"€10.00",render:function(e){return"€".concat(hc(e))}},{key:"date",title:xr("format.date"),type:"date",label:"26/09/2008",render:el},{key:"time",title:xr("format.time"),type:"date",label:"15:59:00",render:el},{key:"datetime",title:xr("format.datetime"),type:"date",label:"26/09/2008 15:59:00",render:el},{key:"duration",title:xr("format.duration"),type:"date",label:"24:01:00",render:el}],va={};tu.forEach(function(e){va[e.key]=e});var qf=5,tl={fillStyle:"#f4f5f8"},xu={fillStyle:"#fff",lineWidth:$u,strokeStyle:"#e6e6e6"};function rl(e,r,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=e.cellRect(r,t),s=a.left,o=a.top,i=a.width,c=a.height;return new Rg(s,o+n,i,c,qf)}function RA(e,r,t,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=r.sortedRowMap,o=r.rows,i=r.cols;if(!o.isHide(t)&&!i.isHide(n)){var c=t;s.has(t)&&(c=s.get(t));var u=r.getCell(c,n);if(u!==null){var l=!1;"editable"in u&&u.editable===!1&&(l=!0);var A=r.getCellStyleOrDefault(c,n),h=rl(r,t,n,a);h.bgcolor=A.bgcolor,A.border!==void 0&&(h.setBorders(A.border),e.strokeBorders(h)),e.rect(h,function(){var f="";f=r.settings.evalPaused?u.text||"":Ng.render(u.text||"",bi,function(g,p){return r.getCellTextOrDefault(p,g)}),A.format&&(f=va[A.format].render(f));var d=Object.assign({},A.font);d.size=function(g){for(var p=0;p0&&c.rows.isHide(v-1)&&(i.save(),i.attr({strokeStyle:"#c6c6c6"}),i.line([5,E+5],[t-5,E+5]),i.restore())}),i.line([0,u+A],[t,u+A]),i.line([t,A],[t,u+A])),e!=="all"&&e!=="top"||(c.colEach(r.sci,r.eci,function(v,y,I){var E=h+y,k=v;i.line([E,0],[E,n]),g<=k&&k0&&c.cols.isHide(v-1)&&(i.save(),i.attr({strokeStyle:"#c6c6c6"}),i.line([E+5,5],[E+5,n-5]),i.restore())}),i.line([l+h,0],[l+h,n]),i.line([0,n],[l+h,n])),i.restore()}function Mg(e,r){var t=this.draw;t.save(),t.attr({fillStyle:"#f4f5f8"}).fillRect(0,0,e,r),t.restore()}function MA(e,r,t,n,a){var s=e.sri,o=e.sci,i=e.eri,c=e.eci,u=e.w,l=e.h,A=this.draw,h=this.data,f=h.settings;A.save(),A.attr(xu).translate(r+n,t+a),f.showGrid&&(h.rowEach(s,i,function(d,g,p){d!==s&&A.line([0,g],[u,g]),d===i&&A.line([0,g+p],[u,g+p])}),h.colEach(o,c,function(d,g,p){d!==o&&A.line([g,0],[g,l]),d===c&&A.line([g+p,0],[g+p,l])})),A.restore()}function Tg(e,r,t,n){var a=this.draw,s=this.data,o=s.viewWidth()-e,i=s.viewHeight()-r;a.save().translate(e,r).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),a.line([0,n],[o,n]),a.line([t,0],[t,i]),a.restore()}var Lg=function(){function e(r,t){Fe(this,e),this.el=r,this.draw=new Ba(r,t.viewWidth(),t.viewHeight()),this.data=t}return Le(e,[{key:"resetData",value:function(r){this.data=r,this.render()}},{key:"render",value:function(){var r=this.data,t=r.rows,n=r.cols.indexWidth,a=t.height;this.draw.resize(r.viewWidth(),r.viewHeight()),this.clear();var s=r.viewRange(),o=r.freezeTotalWidth(),i=r.freezeTotalHeight(),c=r.scroll,u=c.x,l=c.y;MA.call(this,s,n,a,o,i),FA.call(this,s,n,a,-u,-l),NA.call(this,"all",s,n,a,o,i),Mg.call(this,n,a);var A=Tt(r.freeze,2),h=A[0],f=A[1];if(h>0||f>0){if(h>0){var d=s.clone();d.sri=0,d.eri=h-1,d.h=i,MA.call(this,d,n,a,o,0),FA.call(this,d,n,a,-u,0),NA.call(this,"top",d,n,a,o,0)}if(f>0){var g=s.clone();g.sci=0,g.eci=f-1,g.w=o,MA.call(this,g,n,a,0,i),NA.call(this,"left",g,n,a,0,i),FA.call(this,g,n,a,0,-l)}var p=r.freezeViewRange();MA.call(this,p,n,a,0,0),NA.call(this,"all",p,n,a,0,0),FA.call(this,p,n,a,0,0),Tg.call(this,n,a,o,i)}}},{key:"clear",value:function(){this.draw.clear()}}]),e}(),TA=[["A3",11.69,16.54],["A4",8.27,11.69],["A5",5.83,8.27],["B4",9.84,13.9],["B5",6.93,9.84]],ru=["landscape","portrait"];function LA(e){return parseInt(96*e,10)}function zf(e){e==="cancel"?this.el.hide():this.toPrint()}function Og(e){var r=this.paper,t=e.target.value,n=TA[t];r.w=LA(n[1]),r.h=LA(n[2]),this.preview()}function Pg(e){var r=this.paper,t=e.target.value,n=ru[t];r.orientation=n,this.preview()}var Gg=function(){function e(r){var t,n;Fe(this,e),this.paper={w:LA(TA[0][1]),h:LA(TA[0][2]),padding:50,orientation:ru[0],get width(){return this.orientation==="landscape"?this.h:this.w},get height(){return this.orientation==="landscape"?this.w:this.h}},this.data=r,this.el=Oe("div","".concat(lr,"-print")).children(Oe("div","".concat(lr,"-print-bar")).children(Oe("div","-title").child("Print settings"),Oe("div","-right").children(Oe("div","".concat(lr,"-buttons")).children(new Qu("cancel").on("click",zf.bind(this,"cancel")),new Qu("next","primary").on("click",zf.bind(this,"next"))))),Oe("div","".concat(lr,"-print-content")).children(this.contentEl=Oe("div","-content"),Oe("div","-sider").child(Oe("form","").children(Oe("fieldset","").children(Oe("label","").child("".concat(tn("print.size"))),(t=Oe("select","")).children.apply(t,Et(TA.map(function(a,s){return Oe("option","").attr("value",s).child("".concat(a[0]," ( ").concat(a[1],"''x").concat(a[2],"'' )"))}))).on("change",Og.bind(this))),Oe("fieldset","").children(Oe("label","").child("".concat(tn("print.orientation"))),(n=Oe("select","")).children.apply(n,Et(ru.map(function(a,s){return Oe("option","").attr("value",s).child("".concat(tn("print.orientations")[s]))}))).on("change",Pg.bind(this))))))).hide()}return Le(e,[{key:"resetData",value:function(r){this.data=r}},{key:"preview",value:function(){var r=this,t=this.data,n=this.paper,a=n.width,s=n.height,o=n.padding,i=a-2*o,c=s-2*o,u=t.contentRange(),l=parseInt(u.h/c,10)+1,A=i/u.w,h=o,f=o;A>1&&(h+=(i-u.w)/2);var d=0,g=0;this.contentEl.html(""),this.canvases=[];for(var p={sri:0,sci:0,eri:0,eci:0},m=function(){var y=0,I=0,E=Oe("div","".concat(lr,"-canvas-card")),k=Oe("canvas","".concat(lr,"-canvas"));r.canvases.push(k.el);var R=new Ba(k.el,a,s);for(R.save(),R.translate(h,f),A<1&&R.scale(A,A);d<=u.eri;d+=1){var T=t.rows.getHeight(d);if(!((y+=T)1&&arguments[1]!==void 0&&arguments[1];Fe(this,e),this.menuItems=OA.call(this),this.el=(t=Oe("div","".concat(lr,"-contextmenu"))).children.apply(t,Et(this.menuItems)).hide(),this.viewFn=r,this.itemClick=function(){},this.isHide=n,this.setMode("range")}return Le(e,[{key:"setMode",value:function(r){var t=this.menuItems[12];r==="row-col"?t.show():t.hide()}},{key:"hide",value:function(){var r=this.el;r.hide(),Ln(r)}},{key:"setPosition",value:function(r,t){if(!this.isHide){var n=this.el,a=n.show().offset().width,s=this.viewFn(),o=s.height/2,i=r;s.width-r<=a&&(i-=a),n.css("left","".concat(i,"px")),t>o?n.css("bottom","".concat(s.height-t,"px")).css("max-height","".concat(t,"px")).css("top","auto"):n.css("top","".concat(t,"px")).css("max-height","".concat(s.height-t,"px")).css("bottom","auto"),Ai(n)}}}]),e}();function P(){return P=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,r,t){var n=function(s,o){for(;!Object.prototype.hasOwnProperty.call(s,o)&&(s=Ur(s))!==null;);return s}(e,r);if(n){var a=Object.getOwnPropertyDescriptor(n,r);return a.get?a.get.call(arguments.length<3?e:t):a.value}},P.apply(this,arguments)}var L=function(){function e(r,t,n){Fe(this,e),this.tip=tn("toolbar.".concat(r.replace(/-[a-z]/g,function(a){return a[1].toUpperCase()}))),t&&(this.tip+=" (".concat(t,")")),this.tag=r,this.shortcut=t,this.value=n,this.el=this.element(),this.change=function(){}}return Le(e,[{key:"element",value:function(){var r=this.tip;return Oe("div","".concat(lr,"-toolbar-btn")).on("mouseenter",function(t){(function(n,a){if(!a.classList.contains("active")){var s=a.getBoundingClientRect(),o=s.left,i=s.top,c=s.width,u=s.height,l=Oe("div","".concat(lr,"-tooltip")).html(n).show();document.body.appendChild(l.el);var A=l.box();l.css("left","".concat(o+c/2-A.width/2,"px")).css("top","".concat(i+u+2,"px")),Sr(a,"mouseleave",function(){document.body.contains(l.el)&&document.body.removeChild(l.el)}),Sr(a,"click",function(){document.body.contains(l.el)&&document.body.removeChild(l.el)})}})(r,t.target)}).attr("data-tooltip",r)}},{key:"setState",value:function(){}}]),e}();function V(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var ne=function(e){Mt(t,e);var r=V(t);function t(){return Fe(this,t),r.apply(this,arguments)}return Le(t,[{key:"dropdown",value:function(){}},{key:"getValue",value:function(n){return n}},{key:"element",value:function(){var n=this,a=this.tag;return this.dd=this.dropdown(),this.dd.change=function(s){return n.change(a,n.getValue(s))},P(Ur(t.prototype),"element",this).call(this).child(this.dd)}},{key:"setState",value:function(n){n&&(this.value=n,this.dd.setTitle(n))}}]),t}(L);function fe(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var we=function(e){Mt(t,e);var r=fe(t);function t(n,a,s,o){var i,c;Fe(this,t),(c=r.call(this,"div","".concat(lr,"-dropdown ").concat(o))).title=n,c.change=function(){},c.headerClick=function(){},typeof n=="string"?c.title=Oe("div","".concat(lr,"-dropdown-title")).child(n):s&&c.title.addClass("arrow-left"),c.contentEl=Oe("div","".concat(lr,"-dropdown-content")).css("width",a).hide();for(var u=arguments.length,l=new Array(u>4?u-4:0),A=4;A0&&(n=this.contentEl).children.apply(n,arguments)}},{key:"setTitle",value:function(n){this.title.html(n),this.hide()}},{key:"show",value:function(){var n=this;this.contentEl.show(),this.parent().active(),Ai(this.parent(),function(){n.hide()})}},{key:"hide",value:function(){this.parent().active(!1),this.contentEl.hide(),Ln(this.parent())}}]),t}(hn);function Qe(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var je=function(e){Mt(t,e);var r=Qe(t);function t(n,a){var s;Fe(this,t);var o=new Uo("align-".concat(a)),i=n.map(function(c){return(u="align-".concat(c),Oe("div","".concat(lr,"-item")).child(new Uo(u))).on("click",function(){s.setTitle(c),s.change(c)});var u});return s=r.call.apply(r,[this,o,"auto",!0,"bottom-left"].concat(Et(i)))}return Le(t,[{key:"setTitle",value:function(n){this.title.setName("align-".concat(n)),this.hide()}}]),t}(we);function rt(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var gt=function(e){Mt(t,e);var r=rt(t);function t(n){return Fe(this,t),r.call(this,"align","",n)}return Le(t,[{key:"dropdown",value:function(){var n=this.value;return new je(["left","center","right"],n)}}]),t}(ne);function vt(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var mt=function(e){Mt(t,e);var r=vt(t);function t(n){return Fe(this,t),r.call(this,"valign","",n)}return Le(t,[{key:"dropdown",value:function(){var n=this.value;return new je(["top","middle","bottom"],n)}}]),t}(ne);function We(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var ct=function(e){Mt(t,e);var r=We(t);function t(){return Fe(this,t),r.apply(this,arguments)}return Le(t,[{key:"element",value:function(){var n=this,a=this.tag;return P(Ur(t.prototype),"element",this).call(this).child(new Uo(a)).on("click",function(){return n.click()})}},{key:"click",value:function(){this.change(this.tag,this.toggle())}},{key:"setState",value:function(n){this.el.active(n)}},{key:"toggle",value:function(){return this.el.toggle()}},{key:"active",value:function(){return this.el.hasClass("active")}}]),t}(L);function He(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var it=function(e){Mt(t,e);var r=He(t);function t(){return Fe(this,t),r.call(this,"autofilter")}return Le(t,[{key:"setState",value:function(){}}]),t}(ct);function Xe(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var lt=function(e){Mt(t,e);var r=Xe(t);function t(){return Fe(this,t),r.call(this,"font-bold","Ctrl+B")}return Le(t)}(ct);function Qt(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Nt=function(e){Mt(t,e);var r=Qt(t);function t(){return Fe(this,t),r.call(this,"font-italic","Ctrl+I")}return Le(t)}(ct);function Rt(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var pr=function(e){Mt(t,e);var r=Rt(t);function t(){return Fe(this,t),r.call(this,"strike","Ctrl+U")}return Le(t)}(ct);function $t(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Pr=function(e){Mt(t,e);var r=$t(t);function t(){return Fe(this,t),r.call(this,"underline","Ctrl+U")}return Le(t)}(ct),Vt=["#ffffff","#000100","#e7e5e6","#445569","#5b9cd6","#ed7d31","#a5a5a5","#ffc001","#4371c6","#71ae47"],Xr=[["#f2f2f2","#7f7f7f","#d0cecf","#d5dce4","#deeaf6","#fce5d5","#ededed","#fff2cd","#d9e2f3","#e3efd9"],["#d8d8d8","#595959","#afabac","#adb8ca","#bdd7ee","#f7ccac","#dbdbdb","#ffe59a","#b3c6e7","#c5e0b3"],["#bfbfbf","#3f3f3f","#756f6f","#8596b0","#9cc2e6","#f4b184","#c9c9c9","#fed964","#8eaada","#a7d08c"],["#a5a5a5","#262626","#3a3839","#333f4f","#2e75b5","#c45a10","#7b7b7b","#bf8e01","#2f5596","#538136"],["#7f7f7f","#0c0c0c","#171516","#222a35","#1f4e7a","#843c0a","#525252","#7e6000","#203864","#365624"]],Vn=["#c00000","#fe0000","#fdc101","#ffff01","#93d051","#00b04e","#01b0f1","#0170c1","#012060","#7030a0"];function It(e){var r=this;return Oe("td","").child(Oe("div","".concat(lr,"-color-palette-cell")).on("click.stop",function(){return r.change(e)}).css("background-color",e))}var rr=Le(function e(){var r,t,n,a=this;Fe(this,e),this.el=Oe("div","".concat(lr,"-color-palette")),this.change=function(){};var s=Oe("table","").children((r=Oe("tbody","")).children.apply(r,[(t=Oe("tr","".concat(lr,"-theme-color-placeholders"))).children.apply(t,Et(Vt.map(function(o){return It.call(a,o)})))].concat(Et(Xr.map(function(o){var i;return(i=Oe("tr","".concat(lr,"-theme-colors"))).children.apply(i,Et(o.map(function(c){return It.call(a,c)})))})),[(n=Oe("tr","".concat(lr,"-standard-colors"))).children.apply(n,Et(Vn.map(function(o){return It.call(a,o)})))])));this.el.child(s)});function De(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Ar=function(e){Mt(t,e);var r=De(t);function t(n,a){var s;Fe(this,t);var o=new Uo(n).css("height","16px").css("border-bottom","3px solid ".concat(a)),i=new rr;return i.change=function(c){s.setTitle(c),s.change(c)},s=r.call(this,o,"auto",!1,"bottom-left",i.el)}return Le(t,[{key:"setTitle",value:function(n){this.title.css("border-color",n),this.hide()}}]),t}(we);function li(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Rr=[["thin",''],["medium",''],["thick",''],["dashed",''],["dotted",'']],pi=function(e){Mt(t,e);var r=li(t);function t(n){var a;Fe(this,t);var s=new Uo("line-type"),o=0,i=Rr.map(function(c,u){return Oe("div","".concat(lr,"-item state ").concat(n===c[0]?"checked":"")).on("click",function(){i[o].toggle("checked"),i[u].toggle("checked"),o=u,a.hide(),a.change(c)}).child(Oe("div","".concat(lr,"-line-type")).html(c[1]))});return a=r.call.apply(r,[this,s,"auto",!1,"bottom-left"].concat(Et(i)))}return Le(t)}(we);function Gr(){var e;return Oe("table","").child((e=Oe("tbody","")).children.apply(e,arguments))}function ti(e){var r=this;return Oe("td","").child(Oe("div","".concat(lr,"-border-palette-cell")).child(new Uo("border-".concat(e))).on("click",function(){r.mode=e;var t=r.mode,n=r.style,a=r.color;r.change({mode:t,style:n,color:a})}))}var Ht=Le(function e(){var r,t,n=this;Fe(this,e),this.color="#000",this.style="thin",this.mode="all",this.change=function(){},this.ddColor=new Ar("line-color",this.color),this.ddColor.change=function(s){n.color=s},this.ddType=new pi(this.style),this.ddType.change=function(s){var o=Tt(s,1)[0];n.style=o},this.el=Oe("div","".concat(lr,"-border-palette"));var a=Gr(Oe("tr","").children(Oe("td","".concat(lr,"-border-palette-left")).child(Gr((r=Oe("tr","")).children.apply(r,Et(["all","inside","horizontal","vertical","outside"].map(function(s){return ti.call(n,s)}))),(t=Oe("tr","")).children.apply(t,Et(["left","top","right","bottom","none"].map(function(s){return ti.call(n,s)}))))),Oe("td","".concat(lr,"-border-palette-right")).children(Oe("div","".concat(lr,"-toolbar-btn")).child(this.ddColor.el),Oe("div","".concat(lr,"-toolbar-btn")).child(this.ddType.el))));this.el.child(a)});function jt(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Kn=function(e){Mt(t,e);var r=jt(t);function t(){var n;Fe(this,t);var a=new Uo("border-all"),s=new Ht;return s.change=function(o){n.change(o),n.hide()},n=r.call(this,a,"auto",!1,"bottom-left",s.el)}return Le(t)}(we);function En(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var sn=function(e){Mt(t,e);var r=En(t);function t(){return Fe(this,t),r.call(this,"border")}return Le(t,[{key:"dropdown",value:function(){return new Kn}}]),t}(ne);function Wa(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var ho=function(e){Mt(t,e);var r=Wa(t);function t(){return Fe(this,t),r.apply(this,arguments)}return Le(t,[{key:"element",value:function(){var n=this;return P(Ur(t.prototype),"element",this).call(this).child(new Uo(this.tag)).on("click",function(){return n.change(n.tag)})}},{key:"setState",value:function(n){this.el.disabled(n)}}]),t}(L);function Ri(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var qi=function(e){Mt(t,e);var r=Ri(t);function t(){return Fe(this,t),r.call(this,"clearformat")}return Le(t)}(ho);function Io(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var ma=function(e){Mt(t,e);var r=Io(t);function t(){return Fe(this,t),r.call(this,"paintformat")}return Le(t,[{key:"setState",value:function(){}}]),t}(ct);function Ns(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Xs=function(e){Mt(t,e);var r=Ns(t);function t(n){return Fe(this,t),r.call(this,"color",void 0,n)}return Le(t,[{key:"dropdown",value:function(){var n=this.tag,a=this.value;return new Ar(n,a)}}]),t}(ne);function ve(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var cr=function(e){Mt(t,e);var r=ve(t);function t(n){return Fe(this,t),r.call(this,"bgcolor",void 0,n)}return Le(t,[{key:"dropdown",value:function(){var n=this.tag,a=this.value;return new Ar(n,a)}}]),t}(ne);function Yt(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var st=function(e){Mt(t,e);var r=Yt(t);function t(){var n;Fe(this,t);var a=DA.map(function(s){return Oe("div","".concat(lr,"-item")).on("click",function(){n.setTitle("".concat(s.pt)),n.change(s)}).child("".concat(s.pt))});return n=r.call.apply(r,[this,"10","60px",!0,"bottom-left"].concat(Et(a)))}return Le(t)}(we);function nt(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var xt=function(e){Mt(t,e);var r=nt(t);function t(){return Fe(this,t),r.call(this,"font-size")}return Le(t,[{key:"getValue",value:function(n){return n.pt}},{key:"dropdown",value:function(){return new st}}]),t}(ne);function Er(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var _r=function(e){Mt(t,e);var r=Er(t);function t(){var n;Fe(this,t);var a=pa.map(function(s){return Oe("div","".concat(lr,"-item")).on("click",function(){n.setTitle(s.title),n.change(s)}).child(s.title)});return n=r.call.apply(r,[this,pa[0].title,"160px",!0,"bottom-left"].concat(Et(a)))}return Le(t)}(we);function Pt(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Jr=function(e){Mt(t,e);var r=Pt(t);function t(){return Fe(this,t),r.call(this,"font-name")}return Le(t,[{key:"getValue",value:function(n){return n.key}},{key:"dropdown",value:function(){return new _r}}]),t}(ne);function wn(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Vr=function(e){Mt(t,e);var r=wn(t);function t(){var n;Fe(this,t);var a=tu.slice(0);return a.splice(2,0,{key:"divider"}),a.splice(8,0,{key:"divider"}),a=a.map(function(s){var o=Oe("div","".concat(lr,"-item"));return s.key==="divider"?o.addClass("divider"):(o.child(s.title()).on("click",function(){n.setTitle(s.title()),n.change(s)}),s.label&&o.child(Oe("div","label").html(s.label))),o}),n=r.call.apply(r,[this,"Normal","220px",!0,"bottom-left"].concat(Et(a)))}return Le(t,[{key:"setTitle",value:function(n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var ya=function(e){Mt(t,e);var r=Un(t);function t(){return Fe(this,t),r.call(this,"format")}return Le(t,[{key:"getValue",value:function(n){return n.key}},{key:"dropdown",value:function(){return new Vr}}]),t}(ne);function Fi(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Ms=function(e){Mt(t,e);var r=Fi(t);function t(){var n;Fe(this,t);var a=Nh.map(function(s){return Oe("div","".concat(lr,"-item")).on("click",function(){n.hide(),n.change(s)}).child(s.key)});return n=r.call.apply(r,[this,new Uo("formula"),"180px",!0,"bottom-left"].concat(Et(a)))}return Le(t)}(we);function Dc(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var fc=function(e){Mt(t,e);var r=Dc(t);function t(){return Fe(this,t),r.call(this,"formula")}return Le(t,[{key:"getValue",value:function(n){return n.key}},{key:"dropdown",value:function(){return new Ms}}]),t}(ne);function Tl(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Ka=function(e){Mt(t,e);var r=Tl(t);function t(){return Fe(this,t),r.call(this,"freeze")}return Le(t)}(ct);function Ts(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Mh=function(e){Mt(t,e);var r=Ts(t);function t(){return Fe(this,t),r.call(this,"merge")}return Le(t,[{key:"setState",value:function(n,a){this.el.active(n).disabled(a)}}]),t}(ct);function Rc(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Vf=function(e){Mt(t,e);var r=Rc(t);function t(){return Fe(this,t),r.call(this,"redo","Ctrl+Y")}return Le(t)}(ho);function Hg(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Yg=function(e){Mt(t,e);var r=Hg(t);function t(){return Fe(this,t),r.call(this,"undo","Ctrl+Z")}return Le(t)}(ho);function Zf(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var Xf=function(e){Mt(t,e);var r=Zf(t);function t(){return Fe(this,t),r.call(this,"print","Ctrl+P")}return Le(t)}(ho);function nl(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var PA=function(e){Mt(t,e);var r=nl(t);function t(){return Fe(this,t),r.call(this,"textwrap")}return Le(t)}(ct);function u1(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var l2=function(e){Mt(t,e);var r=u1(t);function t(){var n;Fe(this,t);var a=new Uo("ellipsis"),s=Oe("div","".concat(lr,"-toolbar-more"));return(n=r.call(this,a,"auto",!1,"bottom-right",s)).moreBtns=s,n.contentEl.css("max-width","420px"),n}return Le(t)}(we),Jg=function(e){Mt(t,e);var r=u1(t);function t(){var n;return Fe(this,t),(n=r.call(this,"more")).el.hide(),n}return Le(t,[{key:"dropdown",value:function(){return new l2}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}}]),t}(ne);function GA(){return Oe("div","".concat(lr,"-toolbar-divider"))}function dc(){var e=this;this.btns2=[],this.items.forEach(function(r){if(Array.isArray(r))r.forEach(function(o){var i=o.el,c=i.box(),u=i.computedStyle(),l=u.marginLeft,A=u.marginRight;e.btns2.push([i,c.width+parseInt(l,10)+parseInt(A,10)])});else{var t=r.box(),n=r.computedStyle(),a=n.marginLeft,s=n.marginRight;e.btns2.push([r,t.width+parseInt(a,10)+parseInt(s,10)])}})}function Th(){var e,r,t=this.el,n=this.btns,a=this.moreEl,s=this.btns2,o=a.dd,i=o.moreBtns,c=o.contentEl;t.css("width","".concat(this.widthFn()-60,"px"));var u=t.box(),l=160,A=12,h=[],f=[];s.forEach(function(d,g){var p=Tt(d,2),m=p[0],v=p[1];l+=v,g===s.length-1||l0?a.show():a.hide()}var A2=function(){function e(r,t){var n=this,a=arguments.length>2&&arguments[2]!==void 0&&arguments[2];Fe(this,e),this.data=r,this.change=function(){},this.widthFn=t,this.isHide=a;var s=r.defaultStyle();this.items=[[this.undoEl=new Yg,this.redoEl=new Vf,new Xf,this.paintformatEl=new ma,this.clearformatEl=new qi],GA(),[this.formatEl=new ya],GA(),[this.fontEl=new Jr,this.fontSizeEl=new xt],GA(),[this.boldEl=new lt,this.italicEl=new Nt,this.underlineEl=new Pr,this.strikeEl=new pr,this.textColorEl=new Xs(s.color)],GA(),[this.fillColorEl=new cr(s.bgcolor),this.borderEl=new sn,this.mergeEl=new Mh],GA(),[this.alignEl=new gt(s.align),this.valignEl=new mt(s.valign),this.textwrapEl=new PA],GA(),[this.freezeEl=new Ka,this.autofilterEl=new it,this.formulaEl=new fc,this.moreEl=new Jg]],this.el=Oe("div","".concat(lr,"-toolbar")),this.btns=Oe("div","".concat(lr,"-toolbar-btns")),this.items.forEach(function(o){Array.isArray(o)?o.forEach(function(i){n.btns.child(i.el),i.change=function(){n.change.apply(n,arguments)}}):n.btns.child(o.el)}),this.el.child(this.btns),a?this.el.hide():(this.reset(),setTimeout(function(){dc.call(n),Th.call(n)},0),Sr(window,"resize",function(){Th.call(n)}))}return Le(e,[{key:"paintformatActive",value:function(){return this.paintformatEl.active()}},{key:"paintformatToggle",value:function(){this.paintformatEl.toggle()}},{key:"trigger",value:function(r){this["".concat(r,"El")].click()}},{key:"resetData",value:function(r){this.data=r,this.reset()}},{key:"reset",value:function(){if(!this.isHide){var r=this.data,t=r.getSelectedCellStyle();this.undoEl.setState(!r.canUndo()),this.redoEl.setState(!r.canRedo()),this.mergeEl.setState(r.canUnmerge(),!r.selector.multiple()),this.autofilterEl.setState(!r.canAutofilter());var n=t.font,a=t.format;this.formatEl.setState(a),this.fontEl.setState(n.name),this.fontSizeEl.setState(n.size),this.boldEl.setState(n.bold),this.italicEl.setState(n.italic),this.underlineEl.setState(t.underline),this.strikeEl.setState(t.strike),this.textColorEl.setState(t.color),this.fillColorEl.setState(t.bgcolor),this.alignEl.setState(t.align),this.valignEl.setState(t.valign),this.textwrapEl.setState(t.textwrap),this.freezeEl.setState(r.freezeIsActive())}}}]),e}(),h2=function(){function e(r,t){var n,a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"600px";Fe(this,e),this.title=r,this.el=Oe("div","".concat(lr,"-modal")).css("width",s).children(Oe("div","".concat(lr,"-modal-header")).children(new Uo("close").on("click.stop",function(){return a.hide()}),this.title),(n=Oe("div","".concat(lr,"-modal-content"))).children.apply(n,Et(t))).hide()}return Le(e,[{key:"show",value:function(){var r=this;this.dimmer=Oe("div","".concat(lr,"-dimmer active")),document.body.appendChild(this.dimmer.el);var t=this.el.show().box(),n=t.width,a=t.height,s=document.documentElement,o=s.clientHeight,i=s.clientWidth;this.el.offset({left:(i-n)/2,top:(o-a)/3}),window.xkeydownEsc=function(c){c.keyCode===27&&r.hide()},Sr(window,"keydown",window.xkeydownEsc)}},{key:"hide",value:function(){this.el.hide(),document.body.removeChild(this.dimmer.el),br(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}]),e}(),il=function(){function e(r,t){var n=this;Fe(this,e),this.vchange=function(){},this.el=Oe("div","".concat(lr,"-form-input")),this.input=Oe("input","").css("width",r).on("input",function(a){return n.vchange(a)}).attr("placeholder",t),this.el.child(this.input)}return Le(e,[{key:"focus",value:function(){var r=this;setTimeout(function(){r.input.el.focus()},10)}},{key:"hint",value:function(r){this.input.attr("placeholder",r)}},{key:"val",value:function(r){return this.input.val(r)}}]),e}(),qg=function(){function e(r,t,n){var a=this,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(i){return i},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){};Fe(this,e),this.key=r,this.getTitle=s,this.vchange=function(){},this.el=Oe("div","".concat(lr,"-form-select")),this.suggest=new Xu(t.map(function(i){return{key:i,title:a.getTitle(i)}}),function(i){a.itemClick(i.key),o(i.key),a.vchange(i.key)},n,this.el),this.el.children(this.itemEl=Oe("div","input-text").html(this.getTitle(r)),this.suggest.el).on("click",function(){return a.show()})}return Le(e,[{key:"show",value:function(){this.suggest.search("")}},{key:"itemClick",value:function(r){this.key=r,this.itemEl.html(this.getTitle(r))}},{key:"val",value:function(r){return r!==void 0?(this.key=r,this.itemEl.html(this.getTitle(r)),this):this.key}}]),e}(),f2={number:/(^\d+$)|(^\d+(\.\d{0,4})?$)/,date:/^\d{4}-\d{1,2}-\d{1,2}$/},al=function(){function e(r,t,n,a){var s=this;Fe(this,e),this.label="",this.rule=t,n&&(this.label=Oe("label","label").css("width","".concat(a,"px")).html(n)),this.tip=Oe("div","tip").child("tip").hide(),this.input=r,this.input.vchange=function(){return s.validate()},this.el=Oe("div","".concat(lr,"-form-field")).children(this.label,r.el,this.tip)}return Le(e,[{key:"isShow",value:function(){return this.el.css("display")!=="none"}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){return this.el.hide(),this}},{key:"val",value:function(r){return this.input.val(r)}},{key:"hint",value:function(r){this.input.hint(r)}},{key:"validate",value:function(){var r=this.input,t=this.rule,n=this.tip,a=this.el,s=r.val();return t.required&&/^\s*$/.test(s)?(n.html(tn("validation.required")),a.addClass("error"),!1):(t.type||t.pattern)&&!(t.pattern||f2[t.type]).test(s)?(n.html(tn("validation.notMatch")),a.addClass("error"),!1):(a.removeClass("error"),!0)}}]),e}();function Wg(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var d2=function(e){Mt(t,e);var r=Wg(t);function t(){var n;Fe(this,t);var a=new al(new qg("cell",["cell"],"100%",function(h){return tn("dataValidation.modeType.".concat(h))}),{required:!0},"".concat(tn("dataValidation.range"),":"),100),s=new al(new il("120px","E3 or E3:F12"),{required:!0,pattern:/^([A-Z]{1,2}[1-9]\d*)(:[A-Z]{1,2}[1-9]\d*)?$/}),o=new al(new qg("list",["list","number","date","phone","email"],"100%",function(h){return tn("dataValidation.type.".concat(h))},function(h){return n.criteriaSelected(h)}),{required:!0},"".concat(tn("dataValidation.criteria"),":"),100),i=new al(new qg("be",["be","nbe","eq","neq","lt","lte","gt","gte"],"160px",function(h){return tn("dataValidation.operator.".concat(h))},function(h){return n.criteriaOperatorSelected(h)}),{required:!0}).hide(),c=new al(new il("70px","10"),{required:!0}).hide(),u=new al(new il("70px","100"),{required:!0,type:"number"}).hide(),l=new al(new il("120px","a,b,c"),{required:!0}),A=new al(new il("70px","10"),{required:!0,type:"number"}).hide();return(n=r.call(this,tn("contextmenu.validation"),[Oe("div","".concat(lr,"-form-fields")).children(a.el,s.el),Oe("div","".concat(lr,"-form-fields")).children(o.el,i.el,c.el,u.el,A.el,l.el),Oe("div","".concat(lr,"-buttons")).children(new Qu("cancel").on("click",function(){return n.btnClick("cancel")}),new Qu("remove").on("click",function(){return n.btnClick("remove")}),new Qu("save","primary").on("click",function(){return n.btnClick("save")}))])).mf=a,n.rf=s,n.cf=o,n.of=i,n.minvf=c,n.maxvf=u,n.vf=A,n.svf=l,n.change=function(){},n}return Le(t,[{key:"showVf",value:function(n){var a=n==="date"?"2018-11-12":"10",s=this.vf;s.input.hint(a),s.show()}},{key:"criteriaSelected",value:function(n){var a=this.of,s=this.minvf,o=this.maxvf,i=this.vf,c=this.svf;n==="date"||n==="number"?(a.show(),s.rule.type=n,o.rule.type=n,n==="date"?(s.hint("2018-11-12"),o.hint("2019-11-12")):(s.hint("10"),o.hint("100")),s.show(),o.show(),i.hide(),c.hide()):(n==="list"?c.show():c.hide(),i.hide(),a.hide(),s.hide(),o.hide())}},{key:"criteriaOperatorSelected",value:function(n){if(n){var a=this.minvf,s=this.maxvf,o=this.vf;if(n==="be"||n==="nbe")a.show(),s.show(),o.hide();else{var i=this.cf.val();o.rule.type=i,i==="date"?o.hint("2018-11-12"):o.hint("10"),o.show(),a.hide(),s.hide()}}}},{key:"btnClick",value:function(n){if(n==="cancel")this.hide();else if(n==="remove")this.change("remove"),this.hide();else if(n==="save"){for(var a=["mf","rf","cf","of","svf","vf","minvf","maxvf"],s=0;sl.width)t.move({left:a+c-l.width});else{var A=e.freezeTotalWidth();ol.height)r.move({top:s+u-l.height-1});else{var h=e.freezeTotalHeight();i3&&arguments[3]!==void 0)||arguments[3],a=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(r!==-1||t!==-1){var s=this.table,o=this.selector,i=this.toolbar,c=this.data;this.contextMenu.setMode(r===-1||t===-1?"row-col":"range");var u=c.getCell(r,t);e?(o.setEnd(r,t,a),this.trigger("cells-selected",u,o.range)):(o.set(r,t,n),this.trigger("cell-selected",u,r,t)),i.reset(),s.render()}}function nu(e,r){var t=this.selector,n=this.data,a=n.rows,s=n.cols,o=Tt(t.indexes,2),i=o[0],c=o[1],u=t.range,l=u.eri,A=u.eci;if(e){var h=Tt(t.moveIndexes,2);i=h[0],c=h[1]}r==="left"?c>0&&(c-=1):r==="right"?(A!==c&&(c=A),c0&&(i-=1):r==="down"?(l!==i&&(i=l),ic.indexWidth&&t>i.height)return n.hide(),void a.hide();var u=s.box(),l=o.getCellRectByXY(e.offsetX,e.offsetY);l.ri>=0&&l.ci===-1?(l.width=c.indexWidth,n.show(l,{width:u.width}),i.isHide(l.ri-1)?n.showUnhide(l.ri):n.hideUnhide()):n.hide(),l.ri===-1&&l.ci>=0?(l.height=i.height,a.show(l,{height:u.height}),c.isHide(l.ci-1)?a.showUnhide(l.ci):a.hideUnhide()):a.hide()}}function y2(e){var r=this.verticalScrollbar,t=this.horizontalScrollbar,n=this.data,a=r.scroll().top,s=t.scroll().left,o=n.rows,i=n.cols,c=e.deltaY,u=e.deltaX,l=function(g,p){var m=g,v=0;do v=p(m),m+=1;while(v<=0);return v},A=function(g){if(g>0){var p=n.scroll.ri+1;if(p=0){var y=l(v,function(I){return o.getHeight(I)});r.move({top:v===0?0:a-y})}}},h=Math.abs(c),f=Math.abs(u),d=Math.max(h,f);/Firefox/i.test(window.navigator.userAgent)&&Kg(A(e.detail),50),d===f&&Kg(function(g){if(g>0){var p=n.scroll.ci+1;if(p=0){var y=l(v,function(I){return i.getWidth(I)});t.move({left:v===0?0:s-y})}}}(u),50),d===h&&Kg(A(c),50)}function I2(e,r){var t=this.verticalScrollbar,n=this.horizontalScrollbar,a=t.scroll().top,s=n.scroll().left;e==="left"||e==="right"?n.move({left:s-r}):e!=="up"&&e!=="down"||t.move({top:a-r})}function zg(){var e=this.data,r=this.verticalScrollbar,t=this.getTableOffset().height,n=e.exceptRowTotalHeight(0,-1);r.set(t,e.rows.totalHeight()-n)}function Vg(){var e=this.data,r=this.horizontalScrollbar,t=this.getTableOffset().width;e&&r.set(t,e.cols.totalWidth())}function b2(){var e=this.selector,r=this.data,t=this.editor,n=Tt(r.freeze,2),a=n[0],s=n[1];if(a>0||s>0){var o=r.freezeTotalWidth(),i=r.freezeTotalHeight();t.setFreezeLengths(o,i)}e.resetAreaOffset()}function Ls(){var e=this.tableEl,r=this.overlayerEl,t=this.overlayerCEl,n=this.table,a=this.toolbar,s=this.selector,o=this.el,i=this.getTableOffset(),c=this.getRect();e.attr(c),r.offset(c),t.offset(i),o.css("width","".concat(c.width,"px")),zg.call(this),Vg.call(this),b2.call(this),n.render(),a.reset(),s.reset()}function Lh(){var e=this.data,r=this.selector;e.clearClipboard(),r.hideClipboard()}function Zg(){var e=this.data,r=this.selector;e.copy(),e.copyToSystemClipboard(),r.showClipboard()}function f1(){var e=this.data,r=this.selector;e.cut(),r.showClipboard()}function Oh(e,r){var t=this.data;if(t.settings.mode!=="read"){if(t.paste(e,function(a){return h1("Tip",a)}))Ls.call(this);else if(r){var n=r.clipboardData.getData("text/plain");this.data.pasteFromText(n),Ls.call(this)}}}function C2(){this.data.hideRowsOrCols(),Ls.call(this)}function d1(e,r){this.data.unhideRowsOrCols(e,r),Ls.call(this)}function E2(){this.data.autofilter(),Ls.call(this)}function w2(){var e=this.toolbar;e.paintformatActive()&&(Oh.call(this,"format"),Lh.call(this),e.paintformatToggle())}function g1(e){var r=this,t=this.selector,n=this.data,a=this.table,s=this.sortFilter,o=e.offsetX,i=e.offsetY,c=e.target.className==="".concat(lr,"-selector-corner"),u=n.getCellRectByXY(o,i),l=u.left,A=u.top,h=u.width,f=u.height,d=u.ri,g=u.ci,p=n.autoFilter;if(p.includes(d,g)&&l+h-20t.height/2&&(n="bottom"),e.setOffset(r,n)}function Gh(){var e=this.editor,r=this.data;r.settings.mode!=="read"&&(Ph.call(this),e.setCell(r.getSelectedCell(),r.getSelectedValidator()),Lh.call(this))}function B2(e){var r=this,t=this.data,n=this.table,a=this.selector;t.scrolly(e,function(){a.resetBRLAreaOffset(),Ph.call(r),n.render()})}function Da(e){var r=this,t=this.data,n=this.table,a=this.selector;t.scrollx(e,function(){a.resetBRTAreaOffset(),Ph.call(r),n.render()})}function Q2(e,r){var t=e.ri,n=this.table,a=this.selector;this.data.rows.setHeight(t,r),n.render(),a.resetAreaOffset(),zg.call(this),Ph.call(this)}function k2(e,r){var t=e.ci,n=this.table,a=this.selector;this.data.cols.setWidth(t,r),n.render(),a.resetAreaOffset(),Vg.call(this),Ph.call(this)}function Xg(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"finished",t=this.data,n=this.table;if(t.settings.mode!=="read"){t.setSelectedCellText(e,r);var a=t.selector,s=a.ri,o=a.ci;r==="finished"?n.render():this.trigger("cell-edited",e,s,o)}}function Ol(e){var r=this.data;r.settings.mode!=="read"&&(e==="insert-row"?r.insert("row"):e==="delete-row"?r.delete("row"):e==="insert-column"?r.insert("column"):e==="delete-column"?r.delete("column"):e==="delete-cell"?r.deleteCell():e==="delete-cell-format"?r.deleteCell("format"):e==="delete-cell-text"?r.deleteCell("text"):e==="cell-printable"?r.setSelectedCellAttr("printable",!0):e==="cell-non-printable"?r.setSelectedCellAttr("printable",!1):e==="cell-editable"?r.setSelectedCellAttr("editable",!0):e==="cell-non-editable"&&r.setSelectedCellAttr("editable",!1),Lh.call(this),Ls.call(this))}function ed(e,r){var t=this.data;if(e==="undo")this.undo();else if(e==="redo")this.redo();else if(e==="print")this.print.preview();else if(e==="paintformat")r===!0?Zg.call(this):Lh.call(this);else if(e==="clearformat")Ol.call(this,"delete-cell-format");else if(e!=="link"){if(e!=="chart")if(e==="autofilter")E2.call(this);else if(e==="freeze")if(r){var n=t.selector,a=n.ri,s=n.ci;this.freeze(a,s)}else this.freeze(0,0);else t.setSelectedCellAttr(e,r),e!=="formula"||t.selector.multiple()||Gh.call(this),Ls.call(this)}}function $g(e,r,t,n){this.data.setAutoFilter(e,r,t,n),Ls.call(this)}function x2(){var e,r,t,n,a,s,o=this,i=this.selector,c=this.overlayerEl,u=this.rowResizer,l=this.colResizer,A=this.verticalScrollbar,h=this.horizontalScrollbar,f=this.editor,d=this.contextMenu,g=this.toolbar,p=this.modalValidation,m=this.sortFilter;c.on("mousemove",function(v){m2.call(o,v)}).on("mousedown",function(v){f.clear(),d.hide(),v.buttons===2?(o.data.xyInSelectedRect(v.offsetX,v.offsetY)||g1.call(o,v),d.setPosition(v.offsetX,v.offsetY),v.stopPropagation()):v.detail===2?Gh.call(o):g1.call(o,v)}).on("mousewheel.stop",function(v){y2.call(o,v)}).on("mouseout",function(v){var y=v.offsetX;v.offsetY<=0&&l.hide(),y<=0&&u.hide()}),i.inputChange=function(v){Xg.call(o,v,"input"),Gh.call(o)},e=c.el,t=(r={move:function(v,y){I2.call(o,v,y)}}).move,n=r.end,a=0,s=0,Sr(e,"touchstart",function(v){var y=v.touches[0],I=y.pageX,E=y.pageY;a=I,s=E}),Sr(e,"touchmove",function(v){if(t){var y=v.changedTouches[0],I=y.pageX,E=y.pageY,k=I-a,R=E-s;(Math.abs(k)>10||Math.abs(R)>10)&&(Li(k,R,v,t),a=I,s=E),v.preventDefault()}}),Sr(e,"touchend",function(v){if(n){var y=v.changedTouches[0],I=y.pageX,E=y.pageY;Li(I-a,E-s,v,n)}}),g.change=function(v,y){return ed.call(o,v,y)},m.ok=function(v,y,I,E){return $g.call(o,v,y,I,E)},u.finishedFn=function(v,y){Q2.call(o,v,y)},l.finishedFn=function(v,y){k2.call(o,v,y)},u.unhideFn=function(v){d1.call(o,"row",v)},l.unhideFn=function(v){d1.call(o,"col",v)},A.moveFn=function(v,y){B2.call(o,v,y)},h.moveFn=function(v,y){Da.call(o,v,y)},f.change=function(v,y){Xg.call(o,y,v)},p.change=function(v){if(v==="save"){for(var y,I=arguments.length,E=new Array(I>1?I-1:0),k=1;k=65&&y<=90||y>=48&&y<=57||y>=96&&y<=105||v.key==="="?(Xg.call(o,v.key,"input"),Gh.call(o)):y===113&&Gh.call(o)}}})}var S2=function(){function e(r,t){var n=this;Fe(this,e),this.eventMap=function(){var c=new Map;function u(A,h){var f;return c.has(A)&&(f=c.get(A),Array.isArray(f)&&f.push(h)||!1)||c.set(A,[].concat(h))}function l(A,h){var f,d;return c.has(A)&&(d=(f=c.get(A)).indexOf(h))>=0&&f.splice(d,1)&&c.get(A).length===0&&c.delete(A)}return{get current(){return c},on:u,once:function(A,h){return u(A,function f(){for(var d=arguments.length,g=new Array(d),p=0;p1?n-1:0),s=1;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}var v1=function(e){Mt(t,e);var r=p1(t);function t(n){var a;Fe(this,t);var s=new Uo("ellipsis");return(a=r.call(this,s,"auto",!1,"top-left")).contentClick=n,a}return Le(t,[{key:"reset",value:function(n){var a=this,s=n.map(function(o,i){return Oe("div","".concat(lr,"-item")).css("width","150px").css("font-weight","normal").on("click",function(){a.contentClick(i),a.hide()}).child(o)});this.setContentChildren.apply(this,Et(s))}},{key:"setTitle",value:function(){}}]),t}(we),_2=[{key:"delete",title:xr("contextmenu.deleteSheet")}];function m1(e){var r=this;return Oe("div","".concat(lr,"-item")).child(e.title()).on("click",function(){r.itemClick(e.key),r.hide()})}function D2(){var e=this;return _2.map(function(r){return m1.call(e,r)})}var R2=function(){function e(){var r;Fe(this,e),this.el=(r=Oe("div","".concat(lr,"-contextmenu")).css("width","160px")).children.apply(r,Et(D2.call(this))).hide(),this.itemClick=function(){}}return Le(e,[{key:"hide",value:function(){var r=this.el;r.hide(),Ln(r)}},{key:"setOffset",value:function(r){var t=this.el;t.offset(r),t.show(),Ai(t)}}]),e}(),F2=function(){function e(){var r=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){};Fe(this,e),this.swapFunc=n,this.updateFunc=s,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new v1(function(o){r.clickSwap2(r.items[o])}),this.contextMenu=new R2,this.contextMenu.itemClick=a,this.el=Oe("div","".concat(lr,"-bottombar")).children(this.contextMenu.el,this.menuEl=Oe("ul","".concat(lr,"-menu")).child(Oe("li","").children(new Uo("add").on("click",function(){t()}),Oe("span","").child(this.moreEl))))}return Le(e,[{key:"addItem",value:function(r,t){var n=this;this.dataNames.push(r);var a=Oe("li",t?"active":"").child(r);a.on("click",function(){n.clickSwap2(a)}).on("contextmenu",function(s){var o=s.target,i=o.offsetLeft,c=o.offsetHeight;n.contextMenu.setOffset({left:i,bottom:c+1}),n.deleteEl=a}).on("dblclick",function(){var s=a.html(),o=new il("auto","");o.val(s),o.input.on("blur",function(i){var c=i.target.value,u=n.dataNames.findIndex(function(l){return l===s});n.renameItem(u,c)}),a.html("").child(o.el),o.focus()}),t&&this.clickSwap(a),this.items.push(a),this.menuEl.child(a),this.moreEl.reset(this.dataNames)}},{key:"renameItem",value:function(r,t){this.dataNames.splice(r,1,t),this.moreEl.reset(this.dataNames),this.items[r].html("").child(t),this.updateFunc(r,t)}},{key:"clear",value:function(){var r=this;this.items.forEach(function(t){r.menuEl.removeChild(t.el)}),this.items=[],this.dataNames=[],this.moreEl.reset(this.dataNames)}},{key:"deleteItem",value:function(){var r=this.activeEl,t=this.deleteEl;if(this.items.length>1){var n=this.items.findIndex(function(s){return s===t});if(this.items.splice(n,1),this.dataNames.splice(n,1),this.menuEl.removeChild(t.el),this.moreEl.reset(this.dataNames),r===t){var a=Tt(this.items,1)[0];return this.activeEl=a,this.activeEl.toggle(),[n,0]}return[n,-1]}return[-1]}},{key:"clickSwap2",value:function(r){var t=this.items.findIndex(function(n){return n===r});this.clickSwap(r),this.activeEl.toggle(),this.swapFunc(t)}},{key:"clickSwap",value:function(r){this.activeEl!==null&&this.activeEl.toggle(),this.activeEl=r}}]),e}();function y1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}var I1=function(){function e(r){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Fe(this,e);var a=r;this.options=function(o){for(var i=1;i1&&arguments[1]!==void 0)||arguments[1],a=r||"sheet".concat(this.sheetIndex),s=new jn(a,this.options);return s.change=function(){for(var o,i=arguments.length,c=new Array(i),u=0;u=0&&(this.datas.splice(t,1),n>=0&&this.sheet.resetData(this.datas[n]))}}},{key:"loadData",value:function(r){var t=Array.isArray(r)?r:[r];if(this.bottombar!==null&&this.bottombar.clear(),this.datas=[],t.length>0)for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:0;return this.datas[a].setCellText(r,t,n,"finished"),this}},{key:"cell",value:function(r,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.datas[n].getCell(r,t)}},{key:"cellStyle",value:function(r,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.datas[n].getCellStyle(r,t)}},{key:"reRender",value:function(){return this.sheet.table.render(),this}},{key:"on",value:function(r,t){return this.sheet.on(r,t),this}},{key:"validate",value:function(){return this.data.validations.errors.size<=0}},{key:"change",value:function(r){return this.sheet.on("change",r),this}}],[{key:"locale",value:function(r,t){Ei(r,t)}}]),e}();function b1(e,r,t,n,a,s,o){try{var i=e[s](o),c=i.value}catch(u){return void t(u)}i.done?r(c):Promise.resolve(c).then(n,a)}function Oi(e){return function(){var r=this,t=arguments;return new Promise(function(n,a){var s=e.apply(r,t);function o(c){b1(s,n,a,o,i,"next",c)}function i(c){b1(s,n,a,o,i,"throw",c)}o(void 0)})}}function C1(e,r){this.v=e,this.k=r}function E1(e){return new C1(e,0)}function UA(e){var r,t;function n(s,o){try{var i=e[s](o),c=i.value,u=c instanceof C1;Promise.resolve(u?c.v:c).then(function(l){if(u){var A=s==="return"?"return":"next";if(!c.k||l.done)return n(A,l);l=e[A](l).value}a(i.done?"return":"normal",l)},function(l){n("throw",l)})}catch(l){a("throw",l)}}function a(s,o){switch(s){case"return":r.resolve({value:o,done:!0});break;case"throw":r.reject(o);break;default:r.resolve({value:o,done:!1})}(r=r.next)?n(r.key,r.arg):t=null}this._invoke=function(s,o){return new Promise(function(i,c){var u={key:s,arg:o,resolve:i,reject:c,next:null};t?t=t.next=u:(r=t=u,n(s,o))})},typeof e.return!="function"&&(this.return=void 0)}window&&(window.x_spreadsheet=function(e){return new I1(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{})},window.x_spreadsheet.locale=function(e,r){return Ei(e,r)}),UA.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},UA.prototype.next=function(e){return this._invoke("next",e)},UA.prototype.throw=function(e){return this._invoke("throw",e)},UA.prototype.return=function(e){return this._invoke("return",e)};var mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Iu<"u"?Iu:typeof self<"u"?self:{};function w1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var td={exports:{}},B1={exports:{}};(function(e){function r(t){return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(B1);var Q1=B1.exports;(function(e){var r=Q1.default;function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=t=function(){return a},e.exports.__esModule=!0,e.exports.default=e.exports;var n,a={},s=Object.prototype,o=s.hasOwnProperty,i=Object.defineProperty||function(S,O,F){S[O]=F.value},c=typeof Symbol=="function"?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",A=c.toStringTag||"@@toStringTag";function h(S,O,F){return Object.defineProperty(S,O,{value:F,enumerable:!0,configurable:!0,writable:!0}),S[O]}try{h({},"")}catch{h=function(O,F,Y){return O[F]=Y}}function f(S,O,F,Y){var M=O&&O.prototype instanceof I?O:I,z=Object.create(M.prototype),ue=new Q(Y||[]);return i(z,"_invoke",{value:x(S,F,ue)}),z}function d(S,O,F){try{return{type:"normal",arg:S.call(O,F)}}catch(Y){return{type:"throw",arg:Y}}}a.wrap=f;var g="suspendedStart",p="suspendedYield",m="executing",v="completed",y={};function I(){}function E(){}function k(){}var R={};h(R,u,function(){return this});var T=Object.getPrototypeOf,j=T&&T(T(B([])));j&&j!==s&&o.call(j,u)&&(R=j);var W=k.prototype=I.prototype=Object.create(R);function H(S){["next","throw","return"].forEach(function(O){h(S,O,function(F){return this._invoke(O,F)})})}function X(S,O){function F(M,z,ue,ae){var Ne=d(S[M],S,z);if(Ne.type!=="throw"){var Ge=Ne.arg,Ye=Ge.value;return Ye&&r(Ye)=="object"&&o.call(Ye,"__await")?O.resolve(Ye.__await).then(function(Ae){F("next",Ae,ue,ae)},function(Ae){F("throw",Ae,ue,ae)}):O.resolve(Ye).then(function(Ae){Ge.value=Ae,ue(Ge)},function(Ae){return F("throw",Ae,ue,ae)})}ae(Ne.arg)}var Y;i(this,"_invoke",{value:function(M,z){function ue(){return new O(function(ae,Ne){F(M,z,ae,Ne)})}return Y=Y?Y.then(ue,ue):ue()}})}function x(S,O,F){var Y=g;return function(M,z){if(Y===m)throw new Error("Generator is already running");if(Y===v){if(M==="throw")throw z;return{value:n,done:!0}}for(F.method=M,F.arg=z;;){var ue=F.delegate;if(ue){var ae=N(ue,F);if(ae){if(ae===y)continue;return ae}}if(F.method==="next")F.sent=F._sent=F.arg;else if(F.method==="throw"){if(Y===g)throw Y=v,F.arg;F.dispatchException(F.arg)}else F.method==="return"&&F.abrupt("return",F.arg);Y=m;var Ne=d(S,O,F);if(Ne.type==="normal"){if(Y=F.done?v:p,Ne.arg===y)continue;return{value:Ne.arg,done:F.done}}Ne.type==="throw"&&(Y=v,F.method="throw",F.arg=Ne.arg)}}}function N(S,O){var F=O.method,Y=S.iterator[F];if(Y===n)return O.delegate=null,F==="throw"&&S.iterator.return&&(O.method="return",O.arg=n,N(S,O),O.method==="throw")||F!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+F+"' method")),y;var M=d(Y,S.iterator,O.arg);if(M.type==="throw")return O.method="throw",O.arg=M.arg,O.delegate=null,y;var z=M.arg;return z?z.done?(O[S.resultName]=z.value,O.next=S.nextLoc,O.method!=="return"&&(O.method="next",O.arg=n),O.delegate=null,y):z:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,y)}function C(S){var O={tryLoc:S[0]};1 in S&&(O.catchLoc=S[1]),2 in S&&(O.finallyLoc=S[2],O.afterLoc=S[3]),this.tryEntries.push(O)}function w(S){var O=S.completion||{};O.type="normal",delete O.arg,S.completion=O}function Q(S){this.tryEntries=[{tryLoc:"root"}],S.forEach(C,this),this.reset(!0)}function B(S){if(S||S===""){var O=S[u];if(O)return O.call(S);if(typeof S.next=="function")return S;if(!isNaN(S.length)){var F=-1,Y=function M(){for(;++F=0;--Y){var M=this.tryEntries[Y],z=M.completion;if(M.tryLoc==="root")return F("end");if(M.tryLoc<=this.prev){var ue=o.call(M,"catchLoc"),ae=o.call(M,"finallyLoc");if(ue&&ae){if(this.prev=0;--F){var Y=this.tryEntries[F];if(Y.tryLoc<=this.prev&&o.call(Y,"finallyLoc")&&this.prev=0;--O){var F=this.tryEntries[O];if(F.finallyLoc===S)return this.complete(F.completion,F.afterLoc),w(F),y}},catch:function(S){for(var O=this.tryEntries.length-1;O>=0;--O){var F=this.tryEntries[O];if(F.tryLoc===S){var Y=F.completion;if(Y.type==="throw"){var M=Y.arg;w(F)}return M}}throw new Error("illegal catch attempt")},delegateYield:function(S,O,F){return this.delegate={iterator:B(S),resultName:O,nextLoc:F},this.method==="next"&&(this.arg=n),y}},a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(td);var rd=(0,td.exports)(),N2=rd;try{regeneratorRuntime=rd}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=rd:Function("r","regeneratorRuntime = r")(rd)}const mn=w1(N2);function e0(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var k1={exports:{}};function ir(e){var r=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,n=Ur(e);if(r){var a=Ur(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return di(this,t)}}function nd(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(c,u){if(c){if(typeof c=="string")return x1(c,u);var l=Object.prototype.toString.call(c).slice(8,-1);if(l==="Object"&&c.constructor&&(l=c.constructor.name),l==="Map"||l==="Set")return Array.from(c);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return x1(c,u)}}(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return o=c.done,c},e:function(c){i=!0,s=c},f:function(){try{o||t.return==null||t.return()}finally{if(i)throw s}}}}function x1(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=o,i)if(typeof i=="string"){var u=n.decodeAddress(i);this.nativeCol=u.col+c,this.nativeColOff=0,this.nativeRow=u.row+c,this.nativeRowOff=0}else i.nativeCol!==void 0?(this.nativeCol=i.nativeCol||0,this.nativeColOff=i.nativeColOff||0,this.nativeRow=i.nativeRow||0,this.nativeRowOff=i.nativeRowOff||0):i.col!==void 0?(this.col=i.col+c,this.row=i.row+c):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}return Le(s,[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(o){this.nativeCol=Math.floor(o),this.nativeColOff=Math.floor((o-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(o){this.nativeRow=Math.floor(o),this.nativeRowOff=Math.floor((o-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(o){this.nativeCol=o.nativeCol,this.nativeColOff=o.nativeColOff,this.nativeRow=o.nativeRow,this.nativeRowOff=o.nativeRowOff}}],[{key:"asInstance",value:function(o){return o instanceof s||o==null?o:new s(o)}}]),s}();r.exports=a},{"../utils/col-cache":19}],3:[function(e,r,t){var n=e("../utils/col-cache"),a=e("../utils/under-dash"),s=e("./enums"),o=e("../utils/shared-formula").slideFormula,i=e("./note"),c=function(){function k(R,T,j){if(Fe(this,k),!R||!T)throw new Error("A Cell needs a Row");this._row=R,this._column=T,n.validateAddress(j),this._address=j,this._value=E.create(k.Types.Null,this),this.style=this._mergeStyle(R.style,T.style,{}),this._mergeCount=0}return Le(k,[{key:"worksheet",get:function(){return this._row.worksheet}},{key:"workbook",get:function(){return this._row.worksheet.workbook}},{key:"destroy",value:function(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(R){this.style.numFmt=R}},{key:"font",get:function(){return this.style.font},set:function(R){this.style.font=R}},{key:"alignment",get:function(){return this.style.alignment},set:function(R){this.style.alignment=R}},{key:"border",get:function(){return this.style.border},set:function(R){this.style.border=R}},{key:"fill",get:function(){return this.style.fill},set:function(R){this.style.fill=R}},{key:"protection",get:function(){return this.style.protection},set:function(R){this.style.protection=R}},{key:"_mergeStyle",value:function(R,T,j){var W=R&&R.numFmt||T&&T.numFmt;W&&(j.numFmt=W);var H=R&&R.font||T&&T.font;H&&(j.font=H);var X=R&&R.alignment||T&&T.alignment;X&&(j.alignment=X);var x=R&&R.border||T&&T.border;x&&(j.border=x);var N=R&&R.fill||T&&T.fill;N&&(j.fill=N);var C=R&&R.protection||T&&T.protection;return C&&(j.protection=C),j}},{key:"address",get:function(){return this._address}},{key:"row",get:function(){return this._row.number}},{key:"col",get:function(){return this._column.number}},{key:"$col$row",get:function(){return"$".concat(this._column.letter,"$").concat(this.row)}},{key:"type",get:function(){return this._value.type}},{key:"effectiveType",get:function(){return this._value.effectiveType}},{key:"toCsvString",value:function(){return this._value.toCsvString()}},{key:"addMergeRef",value:function(){this._mergeCount++}},{key:"releaseMergeRef",value:function(){this._mergeCount--}},{key:"isMerged",get:function(){return this._mergeCount>0||this.type===k.Types.Merge}},{key:"merge",value:function(R,T){this._value.release(),this._value=E.create(k.Types.Merge,this,R),T||(this.style=R.style)}},{key:"unmerge",value:function(){this.type===k.Types.Merge&&(this._value.release(),this._value=E.create(k.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}},{key:"isMergedTo",value:function(R){return this._value.type===k.Types.Merge&&this._value.isMergedTo(R)}},{key:"master",get:function(){return this.type===k.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===k.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(R){this.type!==k.Types.Merge?(this._value.release(),this._value=E.create(E.getType(R),this,R)):this._value.master.value=R}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(R){this._comment=new i(R)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return a.escapeHtml(this.text)}},{key:"toString",value:function(){return this.text}},{key:"_upgradeToHyperlink",value:function(R){this.type===k.Types.String&&(this._value=E.create(k.Types.Hyperlink,this,{text:this._value.value,hyperlink:R}))}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(R){this.names=[R]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(R){var T=this,j=this.workbook.definedNames;j.removeAllNames(this.fullAddress),R.forEach(function(W){j.addEx(T.fullAddress,W)})}},{key:"addName",value:function(R){this.workbook.definedNames.addEx(this.fullAddress,R)}},{key:"removeName",value:function(R){this.workbook.definedNames.removeEx(this.fullAddress,R)}},{key:"removeAllNames",value:function(){this.workbook.definedNames.removeAllNames(this.fullAddress)}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(R){this._dataValidations.add(this.address,R)}},{key:"model",get:function(){var R=this._value.model;return R.style=this.style,this._comment&&(R.comment=this._comment.model),R},set:function(R){this._value.release(),this._value=E.create(R.type,this),this._value.model=R,R.comment&&R.comment.type==="note"&&(this._comment=i.fromModel(R.comment)),R.style?this.style=R.style:this.style={}}}]),k}();c.Types=s.ValueType;var u=function(){function k(R){Fe(this,k),this.model={address:R.address,type:c.Types.Null}}return Le(k,[{key:"value",get:function(){return null},set:function(R){}},{key:"type",get:function(){return c.Types.Null}},{key:"effectiveType",get:function(){return c.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}}]),k}(),l=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.Number,value:T}}return Le(k,[{key:"value",get:function(){return this.model.value},set:function(R){this.model.value=R}},{key:"type",get:function(){return c.Types.Number}},{key:"effectiveType",get:function(){return c.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}}]),k}(),A=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.String,value:T}}return Le(k,[{key:"value",get:function(){return this.model.value},set:function(R){this.model.value=R}},{key:"type",get:function(){return c.Types.String}},{key:"effectiveType",get:function(){return c.Types.String}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}}]),k}(),h=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.String,value:T}}return Le(k,[{key:"value",get:function(){return this.model.value},set:function(R){this.model.value=R}},{key:"toString",value:function(){return this.model.value.richText.map(function(R){return R.text}).join("")}},{key:"type",get:function(){return c.Types.RichText}},{key:"effectiveType",get:function(){return c.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}}]),k}(),f=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.Date,value:T}}return Le(k,[{key:"value",get:function(){return this.model.value},set:function(R){this.model.value=R}},{key:"type",get:function(){return c.Types.Date}},{key:"effectiveType",get:function(){return c.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}}]),k}(),d=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.Hyperlink,text:T?T.text:void 0,hyperlink:T?T.hyperlink:void 0},T&&T.tooltip&&(this.model.tooltip=T.tooltip)}return Le(k,[{key:"value",get:function(){var R={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(R.tooltip=this.model.tooltip),R},set:function(R){this.model={text:R.text,hyperlink:R.hyperlink},R.tooltip&&(this.model.tooltip=R.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(R){this.model.text=R}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(R){this.model.hyperlink=R}},{key:"type",get:function(){return c.Types.Hyperlink}},{key:"effectiveType",get:function(){return c.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}}]),k}(),g=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.Merge,master:T?T.address:void 0},this._master=T,T&&T.addMergeRef()}return Le(k,[{key:"value",get:function(){return this._master.value},set:function(R){R instanceof c?(this._master&&this._master.releaseMergeRef(),R.addMergeRef(),this._master=R):this._master.value=R}},{key:"isMergedTo",value:function(R){return R===this._master}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return c.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}}]),k}(),p=function(){function k(R,T){Fe(this,k),this.cell=R,this.model={address:R.address,type:c.Types.Formula,shareType:T?T.shareType:void 0,ref:T?T.ref:void 0,formula:T?T.formula:void 0,sharedFormula:T?T.sharedFormula:void 0,result:T?T.result:void 0}}return Le(k,[{key:"_copyModel",value:function(R){var T={},j=function(W){var H=R[W];H&&(T[W]=H)};return j("formula"),j("result"),j("ref"),j("shareType"),j("sharedFormula"),T}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(R){this.model=this._copyModel(R)}},{key:"validate",value:function(R){switch(E.getType(R)){case c.Types.Null:case c.Types.String:case c.Types.Number:case c.Types.Date:break;case c.Types.Hyperlink:case c.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(R){this.model.formula=R}},{key:"formulaType",get:function(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(R){this.model.result=R}},{key:"type",get:function(){return c.Types.Formula}},{key:"effectiveType",get:function(){var R=this.model.result;return R==null?s.ValueType.Null:R instanceof String||typeof R=="string"?s.ValueType.String:typeof R=="number"?s.ValueType.Number:R instanceof Date?s.ValueType.Date:R.text&&R.hyperlink?s.ValueType.Hyperlink:R.formula?s.ValueType.Formula:s.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var R=this.cell.worksheet.findCell(this.model.sharedFormula);this._translatedFormula=R&&o(R.formula,R.address,this.model.address)}return this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}}]),k}(),m=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.SharedString,value:T}}return Le(k,[{key:"value",get:function(){return this.model.value},set:function(R){this.model.value=R}},{key:"type",get:function(){return c.Types.SharedString}},{key:"effectiveType",get:function(){return c.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}}]),k}(),v=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.Boolean,value:T}}return Le(k,[{key:"value",get:function(){return this.model.value},set:function(R){this.model.value=R}},{key:"type",get:function(){return c.Types.Boolean}},{key:"effectiveType",get:function(){return c.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}}]),k}(),y=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.Error,value:T}}return Le(k,[{key:"value",get:function(){return this.model.value},set:function(R){this.model.value=R}},{key:"type",get:function(){return c.Types.Error}},{key:"effectiveType",get:function(){return c.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}}]),k}(),I=function(){function k(R,T){Fe(this,k),this.model={address:R.address,type:c.Types.String,value:JSON.stringify(T),rawValue:T}}return Le(k,[{key:"value",get:function(){return this.model.rawValue},set:function(R){this.model.rawValue=R,this.model.value=JSON.stringify(R)}},{key:"type",get:function(){return c.Types.String}},{key:"effectiveType",get:function(){return c.Types.String}},{key:"address",get:function(){return this.model.address},set:function(R){this.model.address=R}},{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}}]),k}(),E={getType:function(k){return k==null?c.Types.Null:k instanceof String||typeof k=="string"?c.Types.String:typeof k=="number"?c.Types.Number:typeof k=="boolean"?c.Types.Boolean:k instanceof Date?c.Types.Date:k.text&&k.hyperlink?c.Types.Hyperlink:k.formula||k.sharedFormula?c.Types.Formula:k.richText?c.Types.RichText:k.sharedString?c.Types.SharedString:k.error?c.Types.Error:c.Types.JSON},types:[{t:c.Types.Null,f:u},{t:c.Types.Number,f:l},{t:c.Types.String,f:A},{t:c.Types.Date,f},{t:c.Types.Hyperlink,f:d},{t:c.Types.Formula,f:p},{t:c.Types.Merge,f:g},{t:c.Types.JSON,f:I},{t:c.Types.SharedString,f:m},{t:c.Types.RichText,f:h},{t:c.Types.Boolean,f:v},{t:c.Types.Error,f:y}].reduce(function(k,R){return k[R.t]=R.f,k},[]),create:function(k,R,T){var j=this.types[k];if(!j)throw new Error("Could not create Value of type ".concat(k));return new j(R,T)}};r.exports=c},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,r,t){var n=e("../utils/under-dash"),a=e("./enums"),s=e("../utils/col-cache"),o=9,i=function(){function c(u,l,A){Fe(this,c),this._worksheet=u,this._number=l,A!==!1&&(this.defn=A)}return Le(c,[{key:"number",get:function(){return this._number}},{key:"worksheet",get:function(){return this._worksheet}},{key:"letter",get:function(){return s.n2l(this._number)}},{key:"isCustomWidth",get:function(){return this.width!==void 0&&this.width!==o}},{key:"defn",get:function(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}},set:function(u){u?(this.key=u.key,this.width=u.width!==void 0?u.width:o,this.outlineLevel=u.outlineLevel,u.style?this.style=u.style:this.style={},this.header=u.header,this._hidden=!!u.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}},{key:"headers",get:function(){return this._header&&this._header instanceof Array?this._header:[this._header]}},{key:"header",get:function(){return this._header},set:function(u){var l=this;u!==void 0?(this._header=u,this.headers.forEach(function(A,h){l._worksheet.getCell(h+1,l.number).value=A})):this._header=void 0}},{key:"key",get:function(){return this._key},set:function(u){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=u,u&&this._worksheet.setColumnKey(this._key,this)}},{key:"hidden",get:function(){return!!this._hidden},set:function(u){this._hidden=u}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(u){this._outlineLevel=u}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}},{key:"toString",value:function(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}},{key:"equivalentTo",value:function(u){return this.width===u.width&&this.hidden===u.hidden&&this.outlineLevel===u.outlineLevel&&n.isEqual(this.style,u.style)}},{key:"isDefault",get:function(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;var u=this.style;return!u||!(u.font||u.numFmt||u.alignment||u.border||u.fill||u.protection)}},{key:"headerCount",get:function(){return this.headers.length}},{key:"eachCell",value:function(u,l){var A=this.number;l||(l=u,u=null),this._worksheet.eachRow(u,function(h,f){l(h.getCell(A),f)})}},{key:"values",get:function(){var u=[];return this.eachCell(function(l,A){l&&l.type!==a.ValueType.Null&&(u[A]=l.value)}),u},set:function(u){var l=this;if(u){var A=this.number,h=0;u.hasOwnProperty("0")&&(h=1),u.forEach(function(f,d){l._worksheet.getCell(d+h,A).value=f})}}},{key:"_applyStyle",value:function(u,l){return this.style[u]=l,this.eachCell(function(A){A[u]=l}),l}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(u){this._applyStyle("numFmt",u)}},{key:"font",get:function(){return this.style.font},set:function(u){this._applyStyle("font",u)}},{key:"alignment",get:function(){return this.style.alignment},set:function(u){this._applyStyle("alignment",u)}},{key:"protection",get:function(){return this.style.protection},set:function(u){this._applyStyle("protection",u)}},{key:"border",get:function(){return this.style.border},set:function(u){this._applyStyle("border",u)}},{key:"fill",get:function(){return this.style.fill},set:function(u){this._applyStyle("fill",u)}}],[{key:"toModel",value:function(u){var l=[],A=null;return u&&u.forEach(function(h,f){h.isDefault?A&&(A=null):A&&h.equivalentTo(A)?A.max=f+1:(A={min:f+1,max:f+1,width:h.width!==void 0?h.width:o,style:h.style,isCustomWidth:h.isCustomWidth,hidden:h.hidden,outlineLevel:h.outlineLevel,collapsed:h.collapsed},l.push(A))}),l.length?l:void 0}},{key:"fromModel",value:function(u,l){var A=[],h=1,f=0;for(l=(l=l||[]).sort(function(g,p){return g.min-p.min});fthis.bottom)&&(this.bottom=c),(!this.model.right||u>this.right)&&(this.right=u)}},{key:"expandRow",value:function(o){if(o){var i=o.dimensions,c=o.number;i&&this.expand(c,i.min,c,i.max)}}},{key:"expandToAddress",value:function(o){var i=n.decodeEx(o);this.expand(i.row,i.col,i.row,i.col)}},{key:"tl",get:function(){return n.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(n.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return n.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(n.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return this.count>1?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(o){return!(o.sheetName&&this.sheetName&&o.sheetName!==this.sheetName||o.bottomthis.bottom||o.rightthis.right)}},{key:"contains",value:function(o){var i=n.decodeEx(o);return this.containsEx(i)}},{key:"containsEx",value:function(o){return(!o.sheetName||!this.sheetName||o.sheetName===this.sheetName)&&o.row>=this.top&&o.row<=this.bottom&&o.col>=this.left&&o.col<=this.right}},{key:"forEachAddress",value:function(o){for(var i=this.left;i<=this.right;i++)for(var c=this.top;c<=this.bottom;c++)o(n.encodeAddress(c,i),c,i)}}]),s}();r.exports=a},{"../utils/col-cache":19}],11:[function(e,r,t){var n=e("../utils/under-dash"),a=e("./enums"),s=e("../utils/col-cache"),o=e("./cell"),i=function(){function c(u,l){Fe(this,c),this._worksheet=u,this._number=l,this._cells=[],this.style={},this.outlineLevel=0}return Le(c,[{key:"number",get:function(){return this._number}},{key:"worksheet",get:function(){return this._worksheet}},{key:"commit",value:function(){this._worksheet._commitRow(this)}},{key:"destroy",value:function(){delete this._worksheet,delete this._cells,delete this.style}},{key:"findCell",value:function(u){return this._cells[u-1]}},{key:"getCellEx",value:function(u){var l=this._cells[u.col-1];if(!l){var A=this._worksheet.getColumn(u.col);l=new o(this,A,u.address),this._cells[u.col-1]=l}return l}},{key:"getCell",value:function(u){if(typeof u=="string"){var l=this._worksheet.getColumnKey(u);u=l?l.number:s.l2n(u)}return this._cells[u-1]||this.getCellEx({address:s.encodeAddress(this._number,u),row:this._number,col:u})}},{key:"splice",value:function(u,l){for(var A=u+l,h=arguments.length,f=new Array(h>2?h-2:0),d=2;d0)for(g=y;g>=A;g--)(p=this._cells[g-1])?((m=this.getCell(g+v)).value=p.value,m.style=p.style,m._comment=p._comment):this._cells[g+v-1]=void 0;for(g=0;gA.col)&&(u=A.col),l0?{min:u,max:l}:null}},{key:"_applyStyle",value:function(u,l){return this.style[u]=l,this._cells.forEach(function(A){A&&(A[u]=l)}),l}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(u){this._applyStyle("numFmt",u)}},{key:"font",get:function(){return this.style.font},set:function(u){this._applyStyle("font",u)}},{key:"alignment",get:function(){return this.style.alignment},set:function(u){this._applyStyle("alignment",u)}},{key:"protection",get:function(){return this.style.protection},set:function(u){this._applyStyle("protection",u)}},{key:"border",get:function(){return this.style.border},set:function(u){this._applyStyle("border",u)}},{key:"fill",get:function(){return this.style.fill},set:function(u){this._applyStyle("fill",u)}},{key:"hidden",get:function(){return!!this._hidden},set:function(u){this._hidden=u}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(u){this._outlineLevel=u}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var u=[],l=0,A=0;return this._cells.forEach(function(h){if(h){var f=h.model;f&&((!l||l>h.col)&&(l=h.col),A0,"Table must be on valid row"),l(f>0,"Table must be on valid col");var d=this.width,g=this.filterHeight,p=this.tableHeight;c.autoFilterRef=n.encode(h,f,h+g-1,f+d-1),c.tableRef=n.encode(h,f,h+p-1,f+d-1),c.columns.forEach(function(m,v){l(m.name,"Column ".concat(v," must have a name")),v===0?u(m,"totalsRowLabel","Total"):(u(m,"totalsRowFunction","none"),m.totalsRowFormula=i.getFormula(m))})}},{key:"store",value:function(){var i=this,c=function(m,v){v&&Object.keys(v).forEach(function(y){m[y]=v[y]})},u=this.worksheet,l=this.table,A=l.tl,h=A.row,f=A.col,d=0;if(l.headerRow){var g=u.getRow(h+d++);l.columns.forEach(function(m,v){var y=m.style,I=m.name,E=g.getCell(f+v);E.value=I,c(E,y)})}if(l.rows.forEach(function(m){var v=u.getRow(h+d++);m.forEach(function(y,I){var E=v.getCell(f+I);E.value=y,c(E,l.columns[I].style)})}),l.totalsRow){var p=u.getRow(h+d++);l.columns.forEach(function(m,v){var y=p.getCell(f+v);if(v===0)y.value=m.totalsRowLabel;else{var I=i.getFormula(m);y.value=I?{formula:m.totalsRowFormula,result:m.totalsRowResult}:null}c(y,m.style)})}}},{key:"load",value:function(i){var c=this,u=this.table,l=u.tl,A=l.row,h=l.col,f=0;if(u.headerRow){var d=i.getRow(A+f++);u.columns.forEach(function(p,m){d.getCell(h+m).value=p.name})}if(u.rows.forEach(function(p){var m=i.getRow(A+f++);p.forEach(function(v,y){m.getCell(h+y).value=v})}),u.totalsRow){var g=i.getRow(A+f++);u.columns.forEach(function(p,m){var v=g.getCell(h+m);m===0?v.value=p.totalsRowLabel:c.getFormula(p)&&(v.value={formula:p.totalsRowFormula,result:p.totalsRowResult})})}}},{key:"model",get:function(){return this.table},set:function(i){this.table=i}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var i=n.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(i,c)}},{key:"getColumn",value:function(i){var c=this.table.columns[i];return new a(this,c,i)}},{key:"addColumn",value:function(i,c,u){this.cacheState(),u===void 0?(this.table.columns.push(i),this.table.rows.forEach(function(l,A){l.push(c[A])})):(this.table.columns.splice(u,0,i),this.table.rows.forEach(function(l,A){l.splice(u,0,c[A])}))}},{key:"removeColumns",value:function(i){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(i,c),this.table.rows.forEach(function(u){u.splice(i,c)})}},{key:"_assign",value:function(i,c,u){this.cacheState(),i[c]=u}},{key:"ref",get:function(){return this.table.ref},set:function(i){this._assign(this.table,"ref",i)}},{key:"name",get:function(){return this.table.name},set:function(i){this.table.name=i}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(i){this.table.displayName=i}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(i){this._assign(this.table,"headerRow",i)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(i){this._assign(this.table,"totalsRow",i)}},{key:"theme",get:function(){return this.table.style.name},set:function(i){this.table.style.name=i}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(i){this.table.style.showFirstColumn=i}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(i){this.table.style.showLastColumn=i}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(i){this.table.style.showRowStripes=i}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(i){this.table.style.showColumnStripes=i}}]),o}();r.exports=s},{"../utils/col-cache":19}],13:[function(e,r,t){var n=e("./worksheet"),a=e("./defined-names"),s=e("../xlsx/xlsx"),o=e("../csv/csv"),i=function(){function c(){Fe(this,c),this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new a}return Le(c,[{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new o(this)),this._csv}},{key:"nextId",get:function(){for(var u=1;ug?p.orderNo:g},0),f=Object.assign({},l,{id:A,name:u,orderNo:h+1,workbook:this}),d=new n(f);return this._worksheets[A]=d,d}},{key:"removeWorksheetEx",value:function(u){delete this._worksheets[u.id]}},{key:"removeWorksheet",value:function(u){var l=this.getWorksheet(u);l&&l.destroy()}},{key:"getWorksheet",value:function(u){return u===void 0?this._worksheets.find(Boolean):typeof u=="number"?this._worksheets[u]:typeof u=="string"?this._worksheets.find(function(l){return l&&l.name===u}):void 0}},{key:"worksheets",get:function(){return this._worksheets.slice(1).sort(function(u,l){return u.orderNo-l.orderNo}).filter(Boolean)}},{key:"eachSheet",value:function(u){this.worksheets.forEach(function(l){u(l,l.id)})}},{key:"definedNames",get:function(){return this._definedNames}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(u){var l=this.media.length;return this.media.push(Object.assign({},u,{type:"image"})),l}},{key:"getImage",value:function(u){return this.media[u]}},{key:"model",get:function(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(function(u){return u.model}),sheets:this.worksheets.map(function(u){return u.model}).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}},set:function(u){var l=this;this.creator=u.creator,this.lastModifiedBy=u.lastModifiedBy,this.lastPrinted=u.lastPrinted,this.created=u.created,this.modified=u.modified,this.company=u.company,this.manager=u.manager,this.title=u.title,this.subject=u.subject,this.keywords=u.keywords,this.category=u.category,this.description=u.description,this.language=u.language,this.revision=u.revision,this.contentStatus=u.contentStatus,this.properties=u.properties,this.calcProperties=u.calcProperties,this._worksheets=[],u.worksheets.forEach(function(A){var h=A.id,f=A.name,d=A.state,g=u.sheets&&u.sheets.findIndex(function(p){return p.id===h});(l._worksheets[h]=new n({id:h,name:f,orderNo:g,state:d,workbook:l})).model=A}),this._definedNames.model=u.definedNames,this.views=u.views,this._themes=u.themes,this.media=u.media||[]}}]),c}();r.exports=i},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,r,t){var n=e("../utils/under-dash"),a=e("../utils/col-cache"),s=e("./range"),o=e("./row"),i=e("./column"),c=e("./enums"),u=e("./image"),l=e("./table"),A=e("./data-validations"),h=e("../utils/encryptor"),f=e("../utils/copy-style").copyStyle,d=function(){function g(p){Fe(this,g),p=p||{},this._workbook=p.workbook,this.id=p.id,this.orderNo=p.orderNo,this.name=p.name,this.state=p.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},p.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!p.pageSetup||!p.pageSetup.fitToWidth&&!p.pageSetup.fitToHeight||p.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},p.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},p.headerFooter),this.dataValidations=new A,this.views=p.views||[],this.autoFilter=p.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}return Le(g,[{key:"name",get:function(){return this._name},set:function(p){if(p===void 0&&(p="sheet".concat(this.id)),this._name!==p){if(typeof p!="string")throw new Error("The name has to be a string.");if(p==="")throw new Error("The name can't be empty.");if(p==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(p))throw new Error("Worksheet name ".concat(p," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(p))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(p));if(p&&p.length>31&&(console.warn("Worksheet name ".concat(p," exceeds 31 chars. This will be truncated")),p=p.substring(0,31)),this._workbook._worksheets.find(function(m){return m&&m.name.toLowerCase()===p.toLowerCase()}))throw new Error("Worksheet name already exists: ".concat(p));this._name=p}}},{key:"workbook",get:function(){return this._workbook}},{key:"destroy",value:function(){this._workbook.removeWorksheetEx(this)}},{key:"dimensions",get:function(){var p=new s;return this._rows.forEach(function(m){if(m){var v=m.dimensions;v&&p.expand(m.number,v.min,m.number,v.max)}}),p}},{key:"columns",get:function(){return this._columns},set:function(p){var m=this;this._headerRowCount=p.reduce(function(I,E){var k=(E.header?1:E.headers&&E.headers.length)||0;return Math.max(I,k)},0);var v=1,y=this._columns=[];p.forEach(function(I){var E=new i(m,v++,!1);y.push(E),E.defn=I})}},{key:"getColumnKey",value:function(p){return this._keys[p]}},{key:"setColumnKey",value:function(p,m){this._keys[p]=m}},{key:"deleteColumnKey",value:function(p){delete this._keys[p]}},{key:"eachColumnKey",value:function(p){n.each(this._keys,p)}},{key:"getColumn",value:function(p){if(typeof p=="string"){var m=this._keys[p];if(m)return m;p=a.l2n(p)}if(this._columns||(this._columns=[]),p>this._columns.length)for(var v=this._columns.length+1;v<=p;)this._columns.push(new i(this,v++));return this._columns[p-1]}},{key:"spliceColumns",value:function(p,m){for(var v=this,y=this._rows.length,I=arguments.length,E=new Array(I>2?I-2:0),k=2;k0)for(var R=function(C){var w=[p,m];E.forEach(function(B){w.push(B[C]||null)});var Q=v.getRow(C+1);Q.splice.apply(Q,w)},T=0;T0)for(var x=H;x>=W;x--)this.getColumn(x+j).defn=this.getColumn(x).defn;for(var N=p;N0&&p[m-1]===void 0;)m--;return m}},{key:"_nextRow",get:function(){return this._lastRowNumber+1}},{key:"lastRow",get:function(){if(this._rows.length)return this._rows[this._rows.length-1]}},{key:"findRow",value:function(p){return this._rows[p-1]}},{key:"findRows",value:function(p,m){return this._rows.slice(p-1,p-1+m)}},{key:"rowCount",get:function(){return this._lastRowNumber}},{key:"actualRowCount",get:function(){var p=0;return this.eachRow(function(){p++}),p}},{key:"getRow",value:function(p){var m=this._rows[p-1];return m||(m=this._rows[p-1]=new o(this,p)),m}},{key:"getRows",value:function(p,m){if(!(m<1)){for(var v=[],y=p;y1&&arguments[1]!==void 0?arguments[1]:"n",v=this._nextRow,y=this.getRow(v);return y.values=p,this._setStyleOption(v,m[0]==="i"?m:"n"),y}},{key:"addRows",value:function(p){var m=this,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",y=[];return p.forEach(function(I){y.push(m.addRow(I,v))}),y}},{key:"insertRow",value:function(p,m){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(p,0,m),this._setStyleOption(p,v),this.getRow(p)}},{key:"insertRows",value:function(p,m){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows.apply(this,[p,0].concat(Et(m))),v!=="n")for(var y=0;y1&&arguments[1]!==void 0?arguments[1]:"n";m[0]==="o"&&this.findRow(p+1)!==void 0?this._copyStyle(p+1,p,m[1]==="+"):m[0]==="i"&&this.findRow(p-1)!==void 0&&this._copyStyle(p-1,p,m[1]==="+")}},{key:"_copyStyle",value:function(p,m){var v=arguments.length>2&&arguments[2]!==void 0&&arguments[2],y=this.getRow(p),I=this.getRow(m);I.style=f(y.style),y.eachCell({includeEmpty:v},function(E,k){I.getCell(k).style=f(E.style)}),I.height=y.height}},{key:"duplicateRow",value:function(p,m){var v=this,y=arguments.length>2&&arguments[2]!==void 0&&arguments[2],I=this._rows[p-1],E=new Array(m).fill(I.values);this.spliceRows.apply(this,[p+1,y?0:m].concat(Et(E)));for(var k=function(){var T=v._rows[p+R];T.style=I.style,T.height=I.height,I.eachCell({includeEmpty:!0},function(j,W){T.getCell(W).style=j.style})},R=0;R2?I-2:0),k=2;k0){var x=function(){if(T=v._rows[R-1]){var C=v.getRow(R+W);C.values=T.values,C.style=T.style,C.height=T.height,T.eachCell({includeEmpty:!0},function(w,Q){if(C.getCell(Q).style=w.style,w._value.constructor.name==="MergeValue"){var B=v.getRow(w._row._number+j).getCell(Q),S=w._value._master,O=v.getRow(S._row._number+j).getCell(S._column._number);B.merge(O)}})}else v._rows[R+W-1]=void 0};for(R=H;R>=y;R--)x()}for(R=0;Rp.top||I>p.left)&&this.getCell(y,I).merge(v,m);this._merges[v.address]=p}},{key:"_unMergeMaster",value:function(p){var m=this._merges[p.address];if(m){for(var v=m.top;v<=m.bottom;v++)for(var y=m.left;y<=m.right;y++)this.getCell(v,y).unmerge();delete this._merges[p.address]}}},{key:"hasMerges",get:function(){return n.some(this._merges,Boolean)}},{key:"unMergeCells",value:function(){for(var p=arguments.length,m=new Array(p),v=0;v3&&arguments[3]!==void 0?arguments[3]:"shared",E=a.decode(p),k=E.top,R=E.left,T=E.bottom,j=E.right,W=j-R+1,H=a.encodeAddress(k,R),X=I==="shared";y=typeof v=="function"?v:Array.isArray(v)?Array.isArray(v[0])?function(w,Q){return v[w-k][Q-R]}:function(w,Q){return v[(w-k)*W+(Q-R)]}:function(){};for(var x=!0,N=k;N<=T;N++)for(var C=R;C<=j;C++)x?(this.getCell(N,C).value={shareType:I,formula:m,ref:p,result:y(N,C)},x=!1):this.getCell(N,C).value=X?{sharedFormula:H,result:y(N,C)}:y(N,C)}},{key:"addImage",value:function(p,m){var v={type:"image",imageId:p,range:m};this._media.push(new u(this,v))}},{key:"getImages",value:function(){return this._media.filter(function(p){return p.type==="image"})}},{key:"addBackgroundImage",value:function(p){var m={type:"background",imageId:p};this._media.push(new u(this,m))}},{key:"getBackgroundImageId",value:function(){var p=this._media.find(function(m){return m.type==="background"});return p&&p.imageId}},{key:"protect",value:function(p,m){var v=this;return new Promise(function(y){v.sheetProtection={sheet:!0},m&&"spinCount"in m&&(m.spinCount=Number.isFinite(m.spinCount)?Math.round(Math.max(0,m.spinCount)):1e5),p&&(v.sheetProtection.algorithmName="SHA-512",v.sheetProtection.saltValue=h.randomBytes(16).toString("base64"),v.sheetProtection.spinCount=m&&"spinCount"in m?m.spinCount:1e5,v.sheetProtection.hashValue=h.convertPasswordToHash(p,"SHA512",v.sheetProtection.saltValue,v.sheetProtection.spinCount)),m&&(v.sheetProtection=Object.assign(v.sheetProtection,m),!p&&"spinCount"in m&&delete v.sheetProtection.spinCount),y()})}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(p){var m=new l(this,p);return this.tables[p.name]=m,m}},{key:"getTable",value:function(p){return this.tables[p]}},{key:"removeTable",value:function(p){delete this.tables[p]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(p){this.conditionalFormattings.push(p)}},{key:"removeConditionalFormatting",value:function(p){typeof p=="number"?this.conditionalFormattings.splice(p,1):this.conditionalFormattings=p instanceof Function?this.conditionalFormattings.filter(p):[]}},{key:"tabColor",get:function(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor},set:function(p){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=p}},{key:"model",get:function(){var p={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(function(y){return y.model}),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(function(y){return y.model}),conditionalFormattings:this.conditionalFormattings};p.cols=i.toModel(this.columns);var m=p.rows=[],v=p.dimensions=new s;return this._rows.forEach(function(y){var I=y&&y.model;I&&(v.expand(I.number,I.min,I.number,I.max),m.push(I))}),p.merges=[],n.each(this._merges,function(y){p.merges.push(y.range)}),p},set:function(p){var m=this;this.name=p.name,this._columns=i.fromModel(this,p.cols),this._parseRows(p),this._parseMergeCells(p),this.dataValidations=new A(p.dataValidations),this.properties=p.properties,this.pageSetup=p.pageSetup,this.headerFooter=p.headerFooter,this.views=p.views,this.autoFilter=p.autoFilter,this._media=p.media.map(function(v){return new u(m,v)}),this.sheetProtection=p.sheetProtection,this.tables=p.tables.reduce(function(v,y){var I=new l;return I.model=y,v[y.name]=I,v},{}),this.conditionalFormattings=p.conditionalFormattings}},{key:"_parseRows",value:function(p){var m=this;this._rows=[],p.rows.forEach(function(v){var y=new o(m,v.number);m._rows[y.number-1]=y,y.model=v})}},{key:"_parseMergeCells",value:function(p){var m=this;n.each(p.mergeCells,function(v){m.mergeCellsWithoutStyle(v)})}}]),g}();r.exports=d},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,r,t){e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");var n={Workbook:e("./doc/workbook")},a=e("./doc/enums");Object.keys(a).forEach(function(s){n[s]=a[s]}),r.exports=n},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,r,t){var n=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function a(s){return typeof s=="string"?s:n?n.decode(s):s.toString()}t.bufferToString=a},{}],17:[function(e,r,t){var n=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),a=e("buffer").Buffer;function s(o){return typeof o!="string"?o:n?a.from(n.encode(o).buffer):a.from(o)}t.stringToBuffer=s},{buffer:220}],18:[function(e,r,t){var n=e("./under-dash"),a=e("./col-cache"),s=function(){function o(i){Fe(this,o),this.template=i,this.sheets={}}return Le(o,[{key:"addCell",value:function(i){this.addCellEx(a.decodeEx(i))}},{key:"getCell",value:function(i){return this.findCellEx(a.decodeEx(i),!0)}},{key:"findCell",value:function(i){return this.findCellEx(a.decodeEx(i),!1)}},{key:"findCellAt",value:function(i,c,u){var l=this.sheets[i],A=l&&l[c];return A&&A[u]}},{key:"addCellEx",value:function(i){if(i.top)for(var c=i.top;c<=i.bottom;c++)for(var u=i.left;u<=i.right;u++)this.getCellAt(i.sheetName,c,u);else this.findCellEx(i,!0)}},{key:"getCellEx",value:function(i){return this.findCellEx(i,!0)}},{key:"findCellEx",value:function(i,c){var u=this.findSheet(i,c),l=this.findSheetRow(u,i,c);return this.findRowCell(l,i,c)}},{key:"getCellAt",value:function(i,c,u){var l=this.sheets[i]||(this.sheets[i]=[]),A=l[c]||(l[c]=[]);return A[u]||(A[u]={sheetName:i,address:a.n2l(u)+c,row:c,col:u})}},{key:"removeCellEx",value:function(i){var c=this.findSheet(i);if(c){var u=this.findSheetRow(c,i);u&&delete u[i.col]}}},{key:"forEachInSheet",value:function(i,c){var u=this.sheets[i];u&&u.forEach(function(l,A){l&&l.forEach(function(h,f){h&&c(h,A,f)})})}},{key:"forEach",value:function(i){var c=this;n.each(this.sheets,function(u,l){c.forEachInSheet(l,i)})}},{key:"map",value:function(i){var c=[];return this.forEach(function(u){c.push(i(u))}),c}},{key:"findSheet",value:function(i,c){var u=i.sheetName;return this.sheets[u]?this.sheets[u]:c?this.sheets[u]=[]:void 0}},{key:"findSheetRow",value:function(i,c,u){var l=c.row;return i&&i[l]?i[l]:u?i[l]=[]:void 0}},{key:"findRowCell",value:function(i,c,u){var l=c.col;return i&&i[l]?i[l]:u?i[l]=this.template?Object.assign(c,JSON.parse(JSON.stringify(this.template))):c:void 0}},{key:"spliceRows",value:function(i,c,u,l){var A=this.sheets[i];if(A){for(var h=[],f=0;f=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;A<=26;)o=this._dictionary[A-1],this._n2l[A]=o,this._l2n[o]=A,A++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(A=27;A<=702;)c=(i=A-27)%26,u=Math.floor(i/26),o=this._dictionary[u]+this._dictionary[c],this._n2l[A]=o,this._l2n[o]=A,A++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(A=703;A<=16384;)c=(i=A-703)%26,u=Math.floor(i/26)%26,l=Math.floor(i/676),o=this._dictionary[l]+this._dictionary[u]+this._dictionary[c],this._n2l[A]=o,this._l2n[o]=A,A++;this._l2nFill=3}},l2n:function(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: ".concat(s));return this._l2n[s]},n2l:function(s){if(s<1||s>16384)throw new Error("".concat(s," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress:function(s){if(!n.test(s))throw new Error("Invalid Address: ".concat(s));return!0},decodeAddress:function(s){var o=s.length<5&&this._hash[s];if(o)return o;for(var i,c=!1,u="",l=0,A=!1,h="",f=0,d=0;d=65&&i<=90)c=!0,u+=s[d],l=26*l+i-64;else if(i>=48&&i<=57)A=!0,h+=s[d],f=10*f+i-48;else if(A&&c&&i!==36)break;if(c){if(l>16384)throw new Error("Out of bounds. Invalid column letter: ".concat(u))}else l=void 0;A||(f=void 0);var g={address:s=u+h,col:l,row:f,$col$row:"$".concat(u,"$").concat(h)};return l<=100&&f<=100&&(this._hash[s]=g,this._hash[g.$col$row]=g),g},getAddress:function(s,o){if(o){var i=this.n2l(o)+s;return this.decodeAddress(i)}return this.decodeAddress(s)},decode:function(s){var o=s.split(":");if(o.length===2){var i=this.decodeAddress(o[0]),c=this.decodeAddress(o[1]),u={top:Math.min(i.row,c.row),left:Math.min(i.col,c.col),bottom:Math.max(i.row,c.row),right:Math.max(i.col,c.col)};return u.tl=this.n2l(u.left)+u.top,u.br=this.n2l(u.right)+u.bottom,u.dimensions="".concat(u.tl,":").concat(u.br),u}return this.decodeAddress(s)},decodeEx:function(s){var o=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),i=o[1]||o[2],c=o[3],u=c.split(":");if(u.length>1){var l=this.decodeAddress(u[0]),A=this.decodeAddress(u[1]),h=Math.min(l.row,A.row),f=Math.min(l.col,A.col),d=Math.max(l.row,A.row),g=Math.max(l.col,A.col);return l=this.n2l(f)+h,A=this.n2l(g)+d,{top:h,left:f,bottom:d,right:g,sheetName:i,tl:{address:l,col:f,row:h,$col$row:"$".concat(this.n2l(f),"$").concat(h),sheetName:i},br:{address:A,col:g,row:d,$col$row:"$".concat(this.n2l(g),"$").concat(d),sheetName:i},dimensions:"".concat(l,":").concat(A)}}if(c.startsWith("#"))return i?{sheetName:i,error:c}:{error:c};var p=this.decodeAddress(c);return i?bo({sheetName:i},p):p},encodeAddress:function(s,o){return a.n2l(o)+s},encode:function(){switch(arguments.length){case 2:return a.encodeAddress(arguments[0],arguments[1]);case 4:return"".concat(a.encodeAddress(arguments[0],arguments[1]),":").concat(a.encodeAddress(arguments[2],arguments[3]));default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange:function(s,o){var i=Tt(s,5),c=i[0],u=i[1],l=i[3],A=i[4],h=Tt(o,2),f=h[0],d=h[1];return f>=c&&f<=l&&d>=u&&d<=A}};r.exports=a},{}],20:[function(e,r,t){var n=function(i,c){return bo(bo({},i),c.reduce(function(u,l){return i[l]&&(u[l]=bo({},i[l])),u},{}))},a=function(i,c,u){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];i[u]&&(c[u]=n(i[u],l))},s=function(i){return Object.keys(i).length===0},o=function(i){if(!i)return i;if(s(i))return{};var c=bo({},i);return a(i,c,"font",["color"]),a(i,c,"alignment"),a(i,c,"protection"),i.border&&(a(i,c,"border"),a(i.border,c.border,"top",["color"]),a(i.border,c.border,"left",["color"]),a(i.border,c.border,"bottom",["color"]),a(i.border,c.border,"right",["color"]),a(i.border,c.border,"diagonal",["color"])),i.fill&&(a(i,c,"fill",["fgColor","bgColor","center"]),i.fill.stops&&(c.fill.stops=i.fill.stops.map(function(u){return n(u,["color"])}))),c};t.copyStyle=o},{}],21:[function(e,r,t){(function(n){(function(){var a=e("crypto"),s={hash:function(o){for(var i=a.createHash(o),c=arguments.length,u=new Array(c>1?c-1:0),l=1;l3||y.length===3&&y>"XFD")return h;var k=n.l2n(y),R=parseInt(E,10);return v||(k+=A.col-l.col),I||(R+=A.row-l.row),(f||"")+(v||"")+n.n2l(k)+(I||"")+R}return h})}r.exports={slideFormula:o}},{"./col-cache":19}],24:[function(e,r,t){(function(n,a){(function(){var s=e("readable-stream"),o=e("./utils"),i=e("./string-buf"),c=function(){function f(d,g){Fe(this,f),this._data=d,this._encoding=g}return Le(f,[{key:"length",get:function(){return this.toBuffer().length}},{key:"copy",value:function(d,g,p,m){return this.toBuffer().copy(d,g,p,m)}},{key:"toBuffer",value:function(){return this._buffer||(this._buffer=a.from(this._data,this._encoding)),this._buffer}}]),f}(),u=function(){function f(d){Fe(this,f),this._data=d}return Le(f,[{key:"length",get:function(){return this._data.length}},{key:"copy",value:function(d,g,p,m){return this._data._buf.copy(d,g,p,m)}},{key:"toBuffer",value:function(){return this._data.toBuffer()}}]),f}(),l=function(){function f(d){Fe(this,f),this._data=d}return Le(f,[{key:"length",get:function(){return this._data.length}},{key:"copy",value:function(d,g,p,m){this._data.copy(d,g,p,m)}},{key:"toBuffer",value:function(){return this._data}}]),f}(),A=function(){function f(d){Fe(this,f),this.size=d,this.buffer=a.alloc(d),this.iRead=0,this.iWrite=0}return Le(f,[{key:"toBuffer",value:function(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;var d=a.alloc(this.iWrite-this.iRead);return this.buffer.copy(d,0,this.iRead,this.iWrite),d}},{key:"length",get:function(){return this.iWrite-this.iRead}},{key:"eod",get:function(){return this.iRead===this.iWrite}},{key:"full",get:function(){return this.iWrite===this.size}},{key:"read",value:function(d){var g;return d===0?null:d===void 0||d>=this.length?(g=this.toBuffer(),this.iRead=this.iWrite,g):(g=a.alloc(d),this.buffer.copy(g,0,this.iRead,d),this.iRead+=d,g)}},{key:"write",value:function(d,g,p){var m=Math.min(p,this.size-this.iWrite);return d.copy(this.buffer,this.iWrite,g,g+m),this.iWrite+=m,m}}]),f}(),h=function(f){f=f||{},this.bufSize=f.bufSize||1048576,this.buffers=[],this.batch=f.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};o.inherits(h,s.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return a.concat(this.buffers.map(function(f){return f.toBuffer()}))}},_getWritableBuffer:function(){if(this.buffers.length){var f=this.buffers[this.buffers.length-1];if(!f.full)return f}var d=new A(this.bufSize);return this.buffers.push(d),d},_pipe:function(f){var d=this;return Oi(mn.mark(function g(){var p;return mn.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return p=function(v){return new Promise(function(y){v.write(f.toBuffer(),function(){y()})})},m.next=3,Promise.all(d.pipes.map(p));case 3:case"end":return m.stop()}},g)}))()},_writeToBuffers:function(f){for(var d=0,g=f.length;d1;)p._pipe(p.buffers.shift());y.next=29;break;case 21:if(p.corked){y.next=27;break}return y.next=24,p._pipe(v);case 24:g(),y.next=29;break;case 27:p._writeToBuffers(v),n.nextTick(g);case 29:y.next=34;break;case 31:p.paused||p.emit("data",v.toBuffer()),p._writeToBuffers(v),p.emit("readable");case 34:return y.abrupt("return",!0);case 35:case"end":return y.stop()}},m)}))()},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(f,d,g){var p=this,m=function(v){v?g(v):(p._flush(),p.pipes.forEach(function(y){y.end()}),p.emit("finish"))};f?this.write(f,d,m):m()},read:function(f){var d;if(f){for(d=[];f&&this.buffers.length&&!this.buffers[0].eod;){var g=this.buffers[0],p=g.read(f);f-=p.length,d.push(p),g.eod&&g.full&&this.buffers.shift()}return a.concat(d)}return d=this.buffers.map(function(m){return m.toBuffer()}).filter(Boolean),this.buffers=[],a.concat(d)},setEncoding:function(f){this.encoding=f},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(f){this.pipes.push(f),!this.paused&&this.buffers.length&&this.end()},unpipe:function(f){this.pipes=this.pipes.filter(function(d){return d!==f})},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),r.exports=h}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,r,t){(function(n){(function(){var a=function(){function s(o){Fe(this,s),this._buf=n.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}return Le(s,[{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}},{key:"toBuffer",value:function(){return this._buffer||(this._buffer=n.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}},{key:"reset",value:function(o){o=o||0,this._buffer=void 0,this._inPos=o}},{key:"_grow",value:function(o){for(var i=2*this._buf.length;i=this._buf.length-4;)this._grow(this._inPos+o.length),i=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=i}},{key:"addStringBuf",value:function(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}]),s}();r.exports=a}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,r,t){var n=Object.prototype.toString,a=/["&<>]/,s={each:function(o,i){o&&(Array.isArray(o)?o.forEach(i):Object.keys(o).forEach(function(c){i(o[c],c)}))},some:function(o,i){return!!o&&(Array.isArray(o)?o.some(i):Object.keys(o).some(function(c){return i(o[c],c)}))},every:function(o,i){return!o||(Array.isArray(o)?o.every(i):Object.keys(o).every(function(c){return i(o[c],c)}))},map:function(o,i){return o?Array.isArray(o)?o.map(i):Object.keys(o).map(function(c){return i(o[c],c)}):[]},keyBy:function(o,i){return o.reduce(function(c,u){return c[u[i]]=u,c},{})},isEqual:function(o,i){var c,u=typeof o,l=typeof i,A=Array.isArray(o),h=Array.isArray(i);if(u!==l)return!1;if(typeof o=="object"){if(A||h)return!(!A||!h)&&o.length===i.length&&o.every(function(p,m){var v=i[m];return s.isEqual(p,v)});if(o===null||i===null)return o===i;if(c=Object.keys(o),Object.keys(i).length!==c.length)return!1;var f,d=nd(c);try{for(d.s();!(f=d.n()).done;){var g=f.value;if(!i.hasOwnProperty(g))return!1}}catch(p){d.e(p)}finally{d.f()}return s.every(o,function(p,m){var v=i[m];return s.isEqual(p,v)})}return o===i},escapeHtml:function(o){var i=a.exec(o);if(!i)return o;for(var c="",u="",l=0,A=i.index;A":u=">";break;default:continue}l!==A&&(c+=o.substring(l,A)),l=A+1,c+=u}return l!==A?c+o.substring(l,A):c},strcmp:function(o,i){return oi?1:0},isUndefined:function(o){return n.call(o)==="[object Undefined]"},isObject:function(o){return n.call(o)==="[object Object]"},deepMerge:function(){var o,i,c,u=arguments[0]||{},l=arguments.length;function A(f,d){o=u[d],c=Array.isArray(f),s.isObject(f)||c?(c?(c=!1,i=o&&Array.isArray(o)?o:[]):i=o&&s.isObject(o)?o:{},u[d]=s.deepMerge(i,f)):s.isUndefined(f)||(u[d]=f)}for(var h=0;h&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,i={nop:function(){},promiseImmediate:function(c){return new Promise(function(u){n.setImmediate?a(function(){u(c)}):setTimeout(function(){u(c)},1)})},inherits:function(c,u,l,A){c.super_=u,A||(A=l,l=null),l&&Object.keys(l).forEach(function(f){Object.defineProperty(c,f,Object.getOwnPropertyDescriptor(l,f))});var h={constructor:{value:c,enumerable:!1,writable:!1,configurable:!0}};A&&Object.keys(A).forEach(function(f){h[f]=Object.getOwnPropertyDescriptor(A,f)}),c.prototype=Object.create(u.prototype,h)},dateToExcel:function(c,u){return 25569+c.getTime()/864e5-(u?1462:0)},excelToDate:function(c,u){var l=Math.round(24*(c-25569+(u?1462:0))*3600*1e3);return new Date(l)},parsePath:function(c){var u=c.lastIndexOf("/");return{path:c.substring(0,u),name:c.substring(u+1)}},getRelsPath:function(c){var u=i.parsePath(c);return"".concat(u.path,"/_rels/").concat(u.name,".rels")},xmlEncode:function(c){var u=o.exec(c);if(!u)return c;for(var l="",A="",h=0,f=u.index;f=11&&d!==13)){A="";break}continue}h!==f&&(l+=c.substring(h,f)),h=f+1,A&&(l+=A)}return h!==f?l+c.substring(h,f):l},xmlDecode:function(c){return c.replace(/&([a-z]*);/g,function(u){switch(u){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return u}})},validInt:function(c){var u=parseInt(c,10);return Number.isNaN(u)?0:u},isDateFmt:function(c){return!!c&&(c=(c=c.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null},fs:{exists:function(c){return new Promise(function(u){s.access(c,s.constants.F_OK,function(l){u(!l)})})}},toIsoDateString:function(c){return c.toIsoString().subsstr(0,10)},parseBoolean:function(c){return c===!0||c==="true"||c===1||c==="1"}};r.exports=i}).call(this)}).call(this,mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,r,t){var n=e("./under-dash"),a=e("./utils"),s="<",o=">",i="";function u(h,f,d){h.push(" ".concat(f,'="').concat(a.xmlEncode(d.toString()),'"'))}function l(h,f){if(f){var d=[];n.each(f,function(g,p){g!==void 0&&u(d,p,g)}),h.push(d.join(""))}}var A=function(){function h(){Fe(this,h),this._xml=[],this._stack=[],this._rollbacks=[]}return Le(h,[{key:"tos",get:function(){return this._stack.length?this._stack[this._stack.length-1]:void 0}},{key:"cursor",get:function(){return this._xml.length}},{key:"openXml",value:function(f){var d=this._xml;d.push(" `)}},{key:"openNode",value:function(f,d){var g=this.tos,p=this._xml;g&&this.open&&p.push(o),this._stack.push(f),p.push(s),p.push(f),l(p,d),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(f,d){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");d!==void 0&&u(this._xml,f,d)}},{key:"addAttributes",value:function(f){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");l(this._xml,f)}},{key:"writeText",value:function(f){var d=this._xml;this.open&&(d.push(o),this.open=!1),this.leaf=!1,d.push(a.xmlEncode(f.toString()))}},{key:"writeXml",value:function(f){this.open&&(this._xml.push(o),this.open=!1),this.leaf=!1,this._xml.push(f)}},{key:"closeNode",value:function(){var f=this._stack.pop(),d=this._xml;this.leaf?d.push(c):(d.push(i),d.push(f),d.push(o)),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(f,d,g){this.openNode(f,d),g!==void 0&&this.writeText(g),this.closeNode()}},{key:"closeAll",value:function(){for(;this._stack.length;)this.closeNode()}},{key:"addRollback",value:function(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}},{key:"commit",value:function(){this._rollbacks.pop()}},{key:"rollback",value:function(){var f=this._rollbacks.pop();this._xml.length>f.xml&&this._xml.splice(f.xml,this._xml.length-f.xml),this._stack.length>f.stack&&this._stack.splice(f.stack,this._stack.length-f.stack),this.leaf=f.leaf,this.open=f.open}},{key:"xml",get:function(){return this.closeAll(),this._xml.join("")}}]),h}();A.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},r.exports=A},{"./under-dash":26,"./utils":27}],29:[function(e,r,t){(function(n){(function(){var a=e("events"),s=e("jszip"),o=e("./stream-buf"),i=e("./browser-buffer-encode").stringToBuffer,c=function(u){Mt(A,u);var l=ir(A);function A(h){var f;return Fe(this,A),(f=l.call(this)).options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},h),f.zip=new s,f.stream=new o,f}return Le(A,[{key:"append",value:function(h,f){f.hasOwnProperty("base64")&&f.base64?this.zip.file(f.name,h,{base64:!0}):(n.browser&&typeof h=="string"&&(h=i(h)),this.zip.file(f.name,h))}},{key:"finalize",value:function(){var h=Oi(mn.mark(function d(){var g;return mn.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,this.zip.generateAsync(this.options);case 2:g=p.sent,this.stream.end(g),this.emit("finish");case 5:case"end":return p.stop()}},d,this)}));function f(){return h.apply(this,arguments)}return f}()},{key:"read",value:function(h){return this.stream.read(h)}},{key:"setEncoding",value:function(h){return this.stream.setEncoding(h)}},{key:"pause",value:function(){return this.stream.pause()}},{key:"resume",value:function(){return this.stream.resume()}},{key:"isPaused",value:function(){return this.stream.isPaused()}},{key:"pipe",value:function(h,f){return this.stream.pipe(h,f)}},{key:"unpipe",value:function(h){return this.stream.unpipe(h)}},{key:"unshift",value:function(h){return this.stream.unshift(h)}},{key:"wrap",value:function(h){return this.stream.wrap(h)}}]),A}(a.EventEmitter);r.exports={ZipWriter:c}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,r,t){r.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(e,r,t){r.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(e,r,t){var n=e("../../utils/parse-sax"),a=e("../../utils/xml-stream"),s=function(){function o(){Fe(this,o)}return Le(o,[{key:"prepare",value:function(){}},{key:"render",value:function(){}},{key:"parseOpen",value:function(i){}},{key:"parseText",value:function(i){}},{key:"parseClose",value:function(i){}},{key:"reconcile",value:function(i,c){}},{key:"reset",value:function(){this.model=null,this.map&&Object.values(this.map).forEach(function(i){i instanceof o?i.reset():i.xform&&i.xform.reset()})}},{key:"mergeModel",value:function(i){this.model=Object.assign(this.model||{},i)}},{key:"parse",value:function(){var i=Oi(mn.mark(function u(l){var A,h,f,d,g,p,m,v,y,I,E;return mn.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:A=!1,h=!1,k.prev=2,d=t0(l);case 4:return k.next=6,d.next();case 6:if(!(A=!(g=k.sent).done)){k.next=37;break}p=g.value,m=nd(p),k.prev=9,m.s();case 11:if((v=m.n()).done){k.next=26;break}if(y=v.value,I=y.eventType,E=y.value,I!=="opentag"){k.next=17;break}this.parseOpen(E),k.next=24;break;case 17:if(I!=="text"){k.next=21;break}this.parseText(E),k.next=24;break;case 21:if(I!=="closetag"){k.next=24;break}if(this.parseClose(E.name)){k.next=24;break}return k.abrupt("return",this.model);case 24:k.next=11;break;case 26:k.next=31;break;case 28:k.prev=28,k.t0=k.catch(9),m.e(k.t0);case 31:return k.prev=31,m.f(),k.finish(31);case 34:A=!1,k.next=4;break;case 37:k.next=43;break;case 39:k.prev=39,k.t1=k.catch(2),h=!0,f=k.t1;case 43:if(k.prev=43,k.prev=44,!A||d.return==null){k.next=48;break}return k.next=48,d.return();case 48:if(k.prev=48,!h){k.next=51;break}throw f;case 51:return k.finish(48);case 52:return k.finish(43);case 53:return k.abrupt("return",this.model);case 54:case"end":return k.stop()}},u,this,[[2,39,43,53],[9,28,31,34],[44,,48,52]])}));function c(u){return i.apply(this,arguments)}return c}()},{key:"parseStream",value:function(){var i=Oi(mn.mark(function u(l){return mn.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",this.parse(n(l)));case 1:case"end":return A.stop()}},u,this)}));function c(u){return i.apply(this,arguments)}return c}()},{key:"xml",get:function(){return this.toXml(this.model)}},{key:"toXml",value:function(i){var c=new a;return this.render(c,i),c.xml}}],[{key:"toAttribute",value:function(i,c){var u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(i===void 0){if(u)return c}else if(u||i!==c)return i.toString()}},{key:"toStringAttribute",value:function(i,c){var u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return o.toAttribute(i,c,u)}},{key:"toStringValue",value:function(i,c){return i===void 0?c:i}},{key:"toBoolAttribute",value:function(i,c){var u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(i===void 0){if(u)return c}else if(u||i!==c)return i?"1":"0"}},{key:"toBoolValue",value:function(i,c){return i===void 0?c:i==="1"}},{key:"toIntAttribute",value:function(i,c){var u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return o.toAttribute(i,c,u)}},{key:"toIntValue",value:function(i,c){return i===void 0?c:parseInt(i,10)}},{key:"toFloatAttribute",value:function(i,c){var u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return o.toAttribute(i,c,u)}},{key:"toFloatValue",value:function(i,c){return i===void 0?c:parseFloat(i)}}]),o}();r.exports=s},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,r,t){var n=e("../base-xform"),a=e("../../../utils/col-cache"),s=function(c){Mt(l,c);var u=ir(l);function l(){return Fe(this,l),u.apply(this,arguments)}return Le(l,[{key:"render",value:function(A,h){A.openNode("definedName",{name:h.name,localSheetId:h.localSheetId}),A.writeText(h.ranges.join(",")),A.closeNode()}},{key:"parseOpen",value:function(A){return A.name==="definedName"&&(this._parsedName=A.attributes.name,this._parsedLocalSheetId=A.attributes.localSheetId,this._parsedText=[],!0)}},{key:"parseText",value:function(A){this._parsedText.push(A)}},{key:"parseClose",value:function(){return this.model={name:this._parsedName,ranges:i(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}]),l}(n);function o(c){try{return a.decodeEx(c),!0}catch{return!1}}function i(c){var u=[],l=!1,A="";return c.split(",").forEach(function(h){if(h){var f=(h.match(/'/g)||[]).length;if(f){var d=f%2==0;!l&&d&&o(h)?u.push(h):l&&!d?(l=!1,o(A+h)&&u.push(A+h),A=""):(l=!0,A+="".concat(h,","))}else l?A+="".concat(h,","):o(h)&&u.push(h)}}),u}r.exports=s},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,r,t){var n=e("../../../utils/utils"),a=function(s){Mt(i,s);var o=ir(i);function i(){return Fe(this,i),o.apply(this,arguments)}return Le(i,[{key:"render",value:function(c,u){c.leafNode("sheet",{sheetId:u.id,name:u.name,state:u.state,"r:id":u.rId})}},{key:"parseOpen",value:function(c){return c.name==="sheet"&&(this.model={name:n.xmlDecode(c.attributes.name),id:parseInt(c.attributes.sheetId,10),state:c.attributes.state,rId:c.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),i}(e("../base-xform"));r.exports=a},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"render",value:function(i,c){i.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:c.fullCalcOnLoad?1:void 0})}},{key:"parseOpen",value:function(i){return i.name==="calcPr"&&(this.model={},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],36:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"render",value:function(i,c){i.leafNode("workbookPr",{date1904:c.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}},{key:"parseOpen",value:function(i){return i.name==="workbookPr"&&(this.model={date1904:i.attributes.date1904==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],37:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"render",value:function(i,c){var u={xWindow:c.x||0,yWindow:c.y||0,windowWidth:c.width||12e3,windowHeight:c.height||24e3,firstSheet:c.firstSheet,activeTab:c.activeTab};c.visibility&&c.visibility!=="visible"&&(u.visibility=c.visibility),i.leafNode("workbookView",u)}},{key:"parseOpen",value:function(i){if(i.name==="workbookView"){var c=this.model={},u=function(A,h,f){var d=h!==void 0?c[A]=h:f;d!==void 0&&(c[A]=d)},l=function(A,h,f){var d=h!==void 0?c[A]=parseInt(h,10):f;d!==void 0&&(c[A]=d)};return l("x",i.attributes.xWindow,0),l("y",i.attributes.yWindow,0),l("width",i.attributes.windowWidth,25e3),l("height",i.attributes.windowHeight,1e4),u("visibility",i.attributes.visibility,"visible"),l("activeTab",i.attributes.activeTab,void 0),l("firstSheet",i.attributes.firstSheet,void 0),!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],38:[function(e,r,t){var n=e("../../../utils/under-dash"),a=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),o=e("../base-xform"),i=e("../static-xform"),c=e("../list-xform"),u=e("./defined-name-xform"),l=e("./sheet-xform"),A=e("./workbook-view-xform"),h=e("./workbook-properties-xform"),f=e("./workbook-calc-properties-xform"),d=function(g){Mt(m,g);var p=ir(m);function m(){var v;return Fe(this,m),(v=p.call(this)).map={fileVersion:m.STATIC_XFORMS.fileVersion,workbookPr:new h,bookViews:new c({tag:"bookViews",count:!1,childXform:new A}),sheets:new c({tag:"sheets",count:!1,childXform:new l}),definedNames:new c({tag:"definedNames",count:!1,childXform:new u}),calcPr:new f},v}return Le(m,[{key:"prepare",value:function(v){v.sheets=v.worksheets;var y=[],I=0;v.sheets.forEach(function(E){if(E.pageSetup&&E.pageSetup.printArea&&E.pageSetup.printArea.split("&&").forEach(function(W){var H=W.split(":"),X={name:"_xlnm.Print_Area",ranges:["'".concat(E.name,"'!$").concat(H[0],":$").concat(H[1])],localSheetId:I};y.push(X)}),E.pageSetup&&(E.pageSetup.printTitlesRow||E.pageSetup.printTitlesColumn)){var k=[];if(E.pageSetup.printTitlesColumn){var R=E.pageSetup.printTitlesColumn.split(":");k.push("'".concat(E.name,"'!$").concat(R[0],":$").concat(R[1]))}if(E.pageSetup.printTitlesRow){var T=E.pageSetup.printTitlesRow.split(":");k.push("'".concat(E.name,"'!$").concat(T[0],":$").concat(T[1]))}var j={name:"_xlnm.Print_Titles",ranges:k,localSheetId:I};y.push(j)}I++}),y.length&&(v.definedNames=v.definedNames.concat(y)),(v.media||[]).forEach(function(E,k){E.name=E.type+(k+1)})}},{key:"render",value:function(v,y){v.openXml(s.StdDocAttributes),v.openNode("workbook",m.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(v),this.map.workbookPr.render(v,y.properties),this.map.bookViews.render(v,y.views),this.map.sheets.render(v,y.sheets),this.map.definedNames.render(v,y.definedNames),this.map.calcPr.render(v,y.calcProperties),v.closeNode()}},{key:"parseOpen",value:function(v){return this.parser?(this.parser.parseOpen(v),!0):(v.name==="workbook"||(this.parser=this.map[v.name],this.parser&&this.parser.parseOpen(v)),!0)}},{key:"parseText",value:function(v){this.parser&&this.parser.parseText(v)}},{key:"parseClose",value:function(v){return this.parser?(this.parser.parseClose(v)||(this.parser=void 0),!0):v!=="workbook"||(this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1)}},{key:"reconcile",value:function(v){var y,I=(v.workbookRels||[]).reduce(function(T,j){return T[j.Id]=j,T},{}),E=[],k=0;(v.sheets||[]).forEach(function(T){var j=I[T.rId];j&&(y=v.worksheetHash["xl/".concat(j.Target.replace(/^(\s|\/xl\/)+/,""))])&&(y.name=T.name,y.id=T.id,y.state=T.state,E[k++]=y)});var R=[];n.each(v.definedNames,function(T){if(T.name==="_xlnm.Print_Area"){if(y=E[T.localSheetId]){y.pageSetup||(y.pageSetup={});var j=a.decodeEx(T.ranges[0]);y.pageSetup.printArea=y.pageSetup.printArea?"".concat(y.pageSetup.printArea,"&&").concat(j.dimensions):j.dimensions}}else if(T.name==="_xlnm.Print_Titles"){if(y=E[T.localSheetId]){y.pageSetup||(y.pageSetup={});var W=T.ranges.join(","),H=/\$/g,X=/\$\d+:\$\d+/,x=W.match(X);if(x&&x.length){var N=x[0];y.pageSetup.printTitlesRow=N.replace(H,"")}var C=/\$[A-Z]+:\$[A-Z]+/,w=W.match(C);if(w&&w.length){var Q=w[0];y.pageSetup.printTitlesColumn=Q.replace(H,"")}}}else R.push(T)}),v.definedNames=R,v.media.forEach(function(T,j){T.index=j})}}]),m}(o);d.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},d.STATIC_XFORMS={fileVersion:new i({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},r.exports=d},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(e,r,t){var n=e("../strings/rich-text-xform"),a=e("../../../utils/utils"),s=e("../base-xform"),o=r.exports=function(i){this.model=i};a.inherits(o,s,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new n),this._richTextXform},render:function(i,c){var u=this;c=c||this.model,i.openNode("comment",{ref:c.ref,authorId:0}),i.openNode("text"),c&&c.note&&c.note.texts&&c.note.texts.forEach(function(l){u.richTextXform.render(i,l)}),i.closeNode(),i.closeNode()},parseOpen:function(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"comment":return this.model=bo({type:"note",note:{texts:[]}},i.attributes),!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(i),!0;default:return!1}},parseText:function(i){this.parser&&this.parser.parseText(i)},parseClose:function(i){switch(i){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(i),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,r,t){var n=e("../../../utils/xml-stream"),a=e("../../../utils/utils"),s=e("../base-xform"),o=e("./comment-xform"),i=r.exports=function(){this.map={comment:new o}};a.inherits(i,s,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render:function(c,u){var l=this;u=u||this.model,c.openXml(n.StdDocAttributes),c.openNode("comments",i.COMMENTS_ATTRIBUTES),c.openNode("authors"),c.leafNode("author",null,"Author"),c.closeNode(),c.openNode("commentList"),u.comments.forEach(function(A){l.map.comment.render(c,A)}),c.closeNode(),c.closeNode()},parseOpen:function(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(c),!0;default:return!1}},parseText:function(c){this.parser&&this.parser.parseText(c)},parseClose:function(c){switch(c){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(c),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this))._model=i,c}return Le(o,[{key:"tag",get:function(){return this._model&&this._model.tag}},{key:"render",value:function(i,c,u){(c===u[2]||this.tag==="x:SizeWithCells"&&c===u[1])&&i.leafNode(this.tag)}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.model={},this.model[this.tag]=!0,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../../base-xform"));r.exports=n},{"../../base-xform":32}],42:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this))._model=i,c}return Le(o,[{key:"tag",get:function(){return this._model&&this._model.tag}},{key:"render",value:function(i,c){i.leafNode(this.tag,null,c)}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.text="",!0)}},{key:"parseText",value:function(i){this.text=i}},{key:"parseClose",value:function(){return!1}}]),o}(e("../../base-xform"));r.exports=n},{"../../base-xform":32}],43:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"x:Anchor"}},{key:"getAnchorRect",value:function(i){var c=Math.floor(i.left),u=Math.floor(68*(i.left-c)),l=Math.floor(i.top),A=Math.floor(18*(i.top-l)),h=Math.floor(i.right),f=Math.floor(68*(i.right-h)),d=Math.floor(i.bottom);return[c,u,l,A,h,f,d,Math.floor(18*(i.bottom-d))]}},{key:"getDefaultRect",value:function(i){var c=i.col,u=6,l=Math.max(i.row-2,0);return[c,u,l,14,c+2,2,l+4,16]}},{key:"render",value:function(i,c){var u=c.anchor?this.getAnchorRect(c.anchor):this.getDefaultRect(c.refAddress);i.leafNode("x:Anchor",null,u.join(", "))}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.text="",!0)}},{key:"parseText",value:function(i){this.text=i}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],44:[function(e,r,t){var n=e("../base-xform"),a=e("./vml-anchor-xform"),s=e("./style/vml-protection-xform"),o=e("./style/vml-position-xform"),i=["twoCells","oneCells","absolute"],c=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={"x:Anchor":new a,"x:Locked":new s({tag:"x:Locked"}),"x:LockText":new s({tag:"x:LockText"}),"x:SizeWithCells":new o({tag:"x:SizeWithCells"}),"x:MoveWithCells":new o({tag:"x:MoveWithCells"})},h}return Le(A,[{key:"tag",get:function(){return"x:ClientData"}},{key:"render",value:function(h,f){var d=f.note,g=d.protection,p=d.editAs;h.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(h,p,i),this.map["x:SizeWithCells"].render(h,p,i),this.map["x:Anchor"].render(h,f),this.map["x:Locked"].render(h,g.locked),h.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(h,g.lockText),h.leafNode("x:Row",null,f.refAddress.row-1),h.leafNode("x:Column",null,f.refAddress.col-1),h.closeNode()}},{key:"parseOpen",value:function(h){return h.name===this.tag?(this.reset(),this.model={anchor:[],protection:{},editAs:""}):(this.parser=this.map[h.name],this.parser&&this.parser.parseOpen(h)),!0}},{key:"parseText",value:function(h){this.parser&&this.parser.parseText(h)}},{key:"parseClose",value:function(h){return this.parser?(this.parser.parseClose(h)||(this.parser=void 0),!0):h!==this.tag||(this.normalizeModel(),!1)}},{key:"normalizeModel",value:function(){var h=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),f=Object.keys(h).length;this.model.editAs=i[f],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}]),A}(n);r.exports=c},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(e,r,t){var n=e("../../../utils/xml-stream"),a=e("../base-xform"),s=e("./vml-shape-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={"v:shape":new s},l}return Le(u,[{key:"tag",get:function(){return"xml"}},{key:"render",value:function(l,A){var h=this;l.openXml(n.StdDocAttributes),l.openNode(this.tag,u.DRAWING_ATTRIBUTES),l.openNode("o:shapelayout",{"v:ext":"edit"}),l.leafNode("o:idmap",{"v:ext":"edit",data:1}),l.closeNode(),l.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),l.leafNode("v:stroke",{joinstyle:"miter"}),l.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),l.closeNode(),A.comments.forEach(function(f,d){h.map["v:shape"].render(l,f,d)}),l.closeNode()}},{key:"parseOpen",value:function(l){return this.parser?(this.parser.parseOpen(l),!0):(l.name===this.tag?(this.reset(),this.model={comments:[]}):(this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)),!0)}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){return this.parser?(this.parser.parseClose(l)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0):l!==this.tag}},{key:"reconcile",value:function(l,A){var h=this;l.anchors.forEach(function(f){f.br?h.map["xdr:twoCellAnchor"].reconcile(f,A):h.map["xdr:oneCellAnchor"].reconcile(f,A)})}}]),u}(a);o.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},r.exports=o},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,r,t){var n=e("../base-xform"),a=e("./vml-textbox-xform"),s=e("./vml-client-data-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={"v:textbox":new a,"x:ClientData":new s},l}return Le(u,[{key:"tag",get:function(){return"v:shape"}},{key:"render",value:function(l,A,h){l.openNode("v:shape",u.V_SHAPE_ATTRIBUTES(A,h)),l.leafNode("v:fill",{color2:"infoBackground [80]"}),l.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),l.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(l,A),this.map["x:ClientData"].render(l,A),l.closeNode()}},{key:"parseOpen",value:function(l){return this.parser?(this.parser.parseOpen(l),!0):(l.name===this.tag?(this.reset(),this.model={margins:{insetmode:l.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}}):(this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)),!0)}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),!0):l!==this.tag||(this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1)}}]),u}(n);o.V_SHAPE_ATTRIBUTES=function(i,c){return{id:"_x0000_s".concat(1025+c),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":i.note.margins&&i.note.margins.insetmode}},r.exports=o},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"v:textbox"}},{key:"conversionUnit",value:function(i,c,u){return"".concat(parseFloat(i)*c.toFixed(2)).concat(u)}},{key:"reverseConversionUnit",value:function(i){var c=this;return(i||"").split(",").map(function(u){return Number(parseFloat(c.conversionUnit(parseFloat(u),.1,"")).toFixed(2))})}},{key:"render",value:function(i,c){var u=this,l={style:"mso-direction-alt:auto"};if(c&&c.note){var A=(c.note&&c.note.margins).inset;Array.isArray(A)&&(A=A.map(function(h){return u.conversionUnit(h,10,"mm")}).join(",")),A&&(l.inset=A)}i.openNode("v:textbox",l),i.leafNode("div",{style:"text-align:left"}),i.closeNode()}},{key:"parseOpen",value:function(i){return i.name!==this.tag||(this.model={inset:this.reverseConversionUnit(i.attributes.inset)},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(i){return i!==this.tag}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],48:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"createNewModel",value:function(i){return{}}},{key:"parseOpen",value:function(i){return this.parser=this.parser||this.map[i.name],this.parser?(this.parser.parseOpen(i),!0):i.name===this.tag&&(this.model=this.createNewModel(i),!0)}},{key:"parseText",value:function(i){this.parser&&this.parser.parseText(i)}},{key:"onParserClose",value:function(i,c){this.model[i]=c.model}},{key:"parseClose",value:function(i){return this.parser?(this.parser.parseClose(i)||(this.onParserClose(i,this.parser),this.parser=void 0),!0):i!==this.tag}}]),o}(e("./base-xform"));r.exports=n},{"./base-xform":32}],49:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"render",value:function(i,c){i.openNode("HeadingPairs"),i.openNode("vt:vector",{size:2,baseType:"variant"}),i.openNode("vt:variant"),i.leafNode("vt:lpstr",void 0,"Worksheets"),i.closeNode(),i.openNode("vt:variant"),i.leafNode("vt:i4",void 0,c.length),i.closeNode(),i.closeNode(),i.closeNode()}},{key:"parseOpen",value:function(i){return i.name==="HeadingPairs"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(i){return i!=="HeadingPairs"}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],50:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"render",value:function(i,c){i.openNode("TitlesOfParts"),i.openNode("vt:vector",{size:c.length,baseType:"lpstr"}),c.forEach(function(u){i.leafNode("vt:lpstr",void 0,u.name)}),i.closeNode(),i.closeNode()}},{key:"parseOpen",value:function(i){return i.name==="TitlesOfParts"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(i){return i!=="TitlesOfParts"}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],51:[function(e,r,t){var n=e("../../../utils/xml-stream"),a=e("../base-xform"),s=e("../simple/string-xform"),o=e("./app-heading-pairs-xform"),i=e("./app-titles-of-parts-xform"),c=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={Company:new s({tag:"Company"}),Manager:new s({tag:"Manager"}),HeadingPairs:new o,TitleOfParts:new i},h}return Le(A,[{key:"render",value:function(h,f){h.openXml(n.StdDocAttributes),h.openNode("Properties",A.PROPERTY_ATTRIBUTES),h.leafNode("Application",void 0,"Microsoft Excel"),h.leafNode("DocSecurity",void 0,"0"),h.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(h,f.worksheets),this.map.TitleOfParts.render(h,f.worksheets),this.map.Company.render(h,f.company||""),this.map.Manager.render(h,f.manager),h.leafNode("LinksUpToDate",void 0,"false"),h.leafNode("SharedDoc",void 0,"false"),h.leafNode("HyperlinksChanged",void 0,"false"),h.leafNode("AppVersion",void 0,"16.0300"),h.closeNode()}},{key:"parseOpen",value:function(h){return this.parser?(this.parser.parseOpen(h),!0):h.name==="Properties"||(this.parser=this.map[h.name],!!this.parser&&(this.parser.parseOpen(h),!0))}},{key:"parseText",value:function(h){this.parser&&this.parser.parseText(h)}},{key:"parseClose",value:function(h){return this.parser?(this.parser.parseClose(h)||(this.parser=void 0),!0):h!=="Properties"||(this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1)}}]),A}(a);c.DateFormat=function(u){return u.toISOString().replace(/[.]\d{3,6}/,"")},c.DateAttrs={"xsi:type":"dcterms:W3CDTF"},c.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},r.exports=c},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(e,r,t){var n=e("../../../utils/xml-stream"),a=function(s){Mt(i,s);var o=ir(i);function i(){return Fe(this,i),o.apply(this,arguments)}return Le(i,[{key:"render",value:function(c,u){c.openXml(n.StdDocAttributes),c.openNode("Types",i.PROPERTY_ATTRIBUTES);var l={};(u.media||[]).forEach(function(A){if(A.type==="image"){var h=A.extension;l[h]||(l[h]=!0,c.leafNode("Default",{Extension:h,ContentType:"image/".concat(h)}))}}),c.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),c.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),c.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),u.worksheets.forEach(function(A){var h="/xl/worksheets/sheet".concat(A.id,".xml");c.leafNode("Override",{PartName:h,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),c.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),c.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),u.sharedStrings&&u.sharedStrings.count&&c.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),u.tables&&u.tables.forEach(function(A){c.leafNode("Override",{PartName:"/xl/tables/".concat(A.target),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),u.drawings&&u.drawings.forEach(function(A){c.leafNode("Override",{PartName:"/xl/drawings/".concat(A.name,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),u.commentRefs&&(c.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),u.commentRefs.forEach(function(A){var h=A.commentName;c.leafNode("Override",{PartName:"/xl/".concat(h,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),c.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),c.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),c.closeNode()}},{key:"parseOpen",value:function(){return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),i}(e("../base-xform"));a.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},r.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,r,t){var n=e("../../../utils/xml-stream"),a=e("../base-xform"),s=e("../simple/date-xform"),o=e("../simple/string-xform"),i=e("../simple/integer-xform"),c=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={"dc:creator":new o({tag:"dc:creator"}),"dc:title":new o({tag:"dc:title"}),"dc:subject":new o({tag:"dc:subject"}),"dc:description":new o({tag:"dc:description"}),"dc:identifier":new o({tag:"dc:identifier"}),"dc:language":new o({tag:"dc:language"}),"cp:keywords":new o({tag:"cp:keywords"}),"cp:category":new o({tag:"cp:category"}),"cp:lastModifiedBy":new o({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new s({tag:"cp:lastPrinted",format:A.DateFormat}),"cp:revision":new i({tag:"cp:revision"}),"cp:version":new o({tag:"cp:version"}),"cp:contentStatus":new o({tag:"cp:contentStatus"}),"cp:contentType":new o({tag:"cp:contentType"}),"dcterms:created":new s({tag:"dcterms:created",attrs:A.DateAttrs,format:A.DateFormat}),"dcterms:modified":new s({tag:"dcterms:modified",attrs:A.DateAttrs,format:A.DateFormat})},h}return Le(A,[{key:"render",value:function(h,f){h.openXml(n.StdDocAttributes),h.openNode("cp:coreProperties",A.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(h,f.creator),this.map["dc:title"].render(h,f.title),this.map["dc:subject"].render(h,f.subject),this.map["dc:description"].render(h,f.description),this.map["dc:identifier"].render(h,f.identifier),this.map["dc:language"].render(h,f.language),this.map["cp:keywords"].render(h,f.keywords),this.map["cp:category"].render(h,f.category),this.map["cp:lastModifiedBy"].render(h,f.lastModifiedBy),this.map["cp:lastPrinted"].render(h,f.lastPrinted),this.map["cp:revision"].render(h,f.revision),this.map["cp:version"].render(h,f.version),this.map["cp:contentStatus"].render(h,f.contentStatus),this.map["cp:contentType"].render(h,f.contentType),this.map["dcterms:created"].render(h,f.created),this.map["dcterms:modified"].render(h,f.modified),h.closeNode()}},{key:"parseOpen",value:function(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[h.name],this.parser)return this.parser.parseOpen(h),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(h)))}}},{key:"parseText",value:function(h){this.parser&&this.parser.parseText(h)}},{key:"parseClose",value:function(h){if(this.parser)return this.parser.parseClose(h)||(this.parser=void 0),!0;switch(h){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(h))}}}]),A}(a);c.DateFormat=function(u){return u.toISOString().replace(/[.]\d{3}/,"")},c.DateAttrs={"xsi:type":"dcterms:W3CDTF"},c.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},r.exports=c},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"render",value:function(i,c){i.leafNode("Relationship",c)}},{key:"parseOpen",value:function(i){return i.name==="Relationship"&&(this.model=i.attributes,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],55:[function(e,r,t){var n=e("../../../utils/xml-stream"),a=e("../base-xform"),s=e("./relationship-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={Relationship:new s},l}return Le(u,[{key:"render",value:function(l,A){var h=this;A=A||this._values,l.openXml(n.StdDocAttributes),l.openNode("Relationships",u.RELATIONSHIPS_ATTRIBUTES),A.forEach(function(f){h.map.Relationship.render(l,f)}),l.closeNode()}},{key:"parseOpen",value:function(l){if(this.parser)return this.parser.parseOpen(l),!0;if(l.name==="Relationships")return this.model=[],!0;if(this.parser=this.map[l.name],this.parser)return this.parser.parseOpen(l),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(l)))}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){if(this.parser)return this.parser.parseClose(l)||(this.model.push(this.parser.model),this.parser=void 0),!0;if(l==="Relationships")return!1;throw new Error("Unexpected xml node in parseClose: ".concat(l))}}]),u}(a);o.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},r.exports=o},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"parseOpen",value:function(i){return this.parser?(this.parser.parseOpen(i),!0):(i.name===this.tag?(this.reset(),this.model={range:{editAs:i.attributes.editAs||"oneCell"}}):(this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)),!0)}},{key:"parseText",value:function(i){this.parser&&this.parser.parseText(i)}},{key:"reconcilePicture",value:function(i,c){if(i&&i.rId){var u=c.rels[i.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(u){var l=u[1],A=c.mediaIndex[l];return c.media[A]}}}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],57:[function(e,r,t){var n=e("../base-xform"),a=e("./blip-xform"),s=function(o){Mt(c,o);var i=ir(c);function c(){var u;return Fe(this,c),(u=i.call(this)).map={"a:blip":new a},u}return Le(c,[{key:"tag",get:function(){return"xdr:blipFill"}},{key:"render",value:function(u,l){u.openNode(this.tag),this.map["a:blip"].render(u,l),u.openNode("a:stretch"),u.leafNode("a:fillRect"),u.closeNode(),u.closeNode()}},{key:"parseOpen",value:function(u){return this.parser?(this.parser.parseOpen(u),!0):(u.name===this.tag?this.reset():(this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),!0):u!==this.tag||(this.model=this.map["a:blip"].model,!1)}}]),c}(n);r.exports=s},{"../base-xform":32,"./blip-xform":58}],58:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"a:blip"}},{key:"render",value:function(i,c){i.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":c.rId,cstate:"print"})}},{key:"parseOpen",value:function(i){return i.name!==this.tag||(this.model={rId:i.attributes["r:embed"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(i){return i!==this.tag}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],59:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"xdr:cNvPicPr"}},{key:"render",value:function(i){i.openNode(this.tag),i.leafNode("a:picLocks",{noChangeAspect:"1"}),i.closeNode()}},{key:"parseOpen",value:function(i){return i.name,this.tag,!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(i){return i!==this.tag}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],60:[function(e,r,t){var n=e("../base-xform"),a=e("./hlink-click-xform"),s=e("./ext-lst-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={"a:hlinkClick":new a,"a:extLst":new s},l}return Le(u,[{key:"tag",get:function(){return"xdr:cNvPr"}},{key:"render",value:function(l,A){l.openNode(this.tag,{id:A.index,name:"Picture ".concat(A.index)}),this.map["a:hlinkClick"].render(l,A),this.map["a:extLst"].render(l,A),l.closeNode()}},{key:"parseOpen",value:function(l){return this.parser?(this.parser.parseOpen(l),!0):(l.name===this.tag?this.reset():(this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),!0):l!==this.tag||(this.model=this.map["a:hlinkClick"].model,!1)}}]),u}(n);r.exports=o},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,r,t){var n=e("../base-xform"),a=e("../simple/integer-xform"),s=function(o){Mt(c,o);var i=ir(c);function c(u){var l;return Fe(this,c),(l=i.call(this)).tag=u.tag,l.map={"xdr:col":new a({tag:"xdr:col",zero:!0}),"xdr:colOff":new a({tag:"xdr:colOff",zero:!0}),"xdr:row":new a({tag:"xdr:row",zero:!0}),"xdr:rowOff":new a({tag:"xdr:rowOff",zero:!0})},l}return Le(c,[{key:"render",value:function(u,l){u.openNode(this.tag),this.map["xdr:col"].render(u,l.nativeCol),this.map["xdr:colOff"].render(u,l.nativeColOff),this.map["xdr:row"].render(u,l.nativeRow),this.map["xdr:rowOff"].render(u,l.nativeRowOff),u.closeNode()}},{key:"parseOpen",value:function(u){return this.parser?(this.parser.parseOpen(u),!0):(u.name===this.tag?this.reset():(this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)),!0)}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),!0):u!==this.tag||(this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1)}}]),c}(n);r.exports=s},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,r,t){var n=e("../../../utils/col-cache"),a=e("../../../utils/xml-stream"),s=e("../base-xform"),o=e("./two-cell-anchor-xform"),i=e("./one-cell-anchor-xform");function c(l){return(typeof l.range=="string"?n.decode(l.range):l.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}var u=function(l){Mt(h,l);var A=ir(h);function h(){var f;return Fe(this,h),(f=A.call(this)).map={"xdr:twoCellAnchor":new o,"xdr:oneCellAnchor":new i},f}return Le(h,[{key:"prepare",value:function(f){var d=this;f.anchors.forEach(function(g,p){g.anchorType=c(g),d.map[g.anchorType].prepare(g,{index:p})})}},{key:"tag",get:function(){return"xdr:wsDr"}},{key:"render",value:function(f,d){var g=this;f.openXml(a.StdDocAttributes),f.openNode(this.tag,h.DRAWING_ATTRIBUTES),d.anchors.forEach(function(p){g.map[p.anchorType].render(f,p)}),f.closeNode()}},{key:"parseOpen",value:function(f){return this.parser?(this.parser.parseOpen(f),!0):(f.name===this.tag?(this.reset(),this.model={anchors:[]}):(this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)),!0)}},{key:"parseText",value:function(f){this.parser&&this.parser.parseText(f)}},{key:"parseClose",value:function(f){return this.parser?(this.parser.parseClose(f)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0):f!==this.tag}},{key:"reconcile",value:function(f,d){var g=this;f.anchors.forEach(function(p){p.br?g.map["xdr:twoCellAnchor"].reconcile(p,d):g.map["xdr:oneCellAnchor"].reconcile(p,d)})}}]),h}(s);u.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},r.exports=u},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"a:extLst"}},{key:"render",value:function(i){i.openNode(this.tag),i.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),i.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),i.closeNode(),i.closeNode()}},{key:"parseOpen",value:function(i){return i.name,this.tag,!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(i){return i!==this.tag}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],64:[function(e,r,t){var n=e("../base-xform"),a=9525,s=function(o){Mt(c,o);var i=ir(c);function c(u){var l;return Fe(this,c),(l=i.call(this)).tag=u.tag,l.map={},l}return Le(c,[{key:"render",value:function(u,l){u.openNode(this.tag);var A=Math.floor(l.width*a),h=Math.floor(l.height*a);u.addAttribute("cx",A),u.addAttribute("cy",h),u.closeNode()}},{key:"parseOpen",value:function(u){return u.name===this.tag&&(this.model={width:parseInt(u.attributes.cx||"0",10)/a,height:parseInt(u.attributes.cy||"0",10)/a},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),c}(n);r.exports=s},{"../base-xform":32}],65:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"a:hlinkClick"}},{key:"render",value:function(i,c){c.hyperlinks&&c.hyperlinks.rId&&i.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":c.hyperlinks.rId,tooltip:c.hyperlinks.tooltip})}},{key:"parseOpen",value:function(i){return i.name!==this.tag||(this.model={hyperlinks:{rId:i.attributes["r:id"],tooltip:i.attributes.tooltip}},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],66:[function(e,r,t){var n=e("../base-xform"),a=e("./c-nv-pr-xform"),s=e("./c-nv-pic-pr-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={"xdr:cNvPr":new a,"xdr:cNvPicPr":new s},l}return Le(u,[{key:"tag",get:function(){return"xdr:nvPicPr"}},{key:"render",value:function(l,A){l.openNode(this.tag),this.map["xdr:cNvPr"].render(l,A),this.map["xdr:cNvPicPr"].render(l,A),l.closeNode()}},{key:"parseOpen",value:function(l){return this.parser?(this.parser.parseOpen(l),!0):(l.name===this.tag?this.reset():(this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),!0):l!==this.tag||(this.model=this.map["xdr:cNvPr"].model,!1)}}]),u}(n);r.exports=o},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,r,t){var n=e("./base-cell-anchor-xform"),a=e("../static-xform"),s=e("./cell-position-xform"),o=e("./ext-xform"),i=e("./pic-xform"),c=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={"xdr:from":new s({tag:"xdr:from"}),"xdr:ext":new o({tag:"xdr:ext"}),"xdr:pic":new i,"xdr:clientData":new a({tag:"xdr:clientData"})},h}return Le(A,[{key:"tag",get:function(){return"xdr:oneCellAnchor"}},{key:"prepare",value:function(h,f){this.map["xdr:pic"].prepare(h.picture,f)}},{key:"render",value:function(h,f){h.openNode(this.tag,{editAs:f.range.editAs||"oneCell"}),this.map["xdr:from"].render(h,f.range.tl),this.map["xdr:ext"].render(h,f.range.ext),this.map["xdr:pic"].render(h,f.picture),this.map["xdr:clientData"].render(h,{}),h.closeNode()}},{key:"parseClose",value:function(h){return this.parser?(this.parser.parseClose(h)||(this.parser=void 0),!0):h!==this.tag||(this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1)}},{key:"reconcile",value:function(h,f){h.medium=this.reconcilePicture(h.picture,f)}}]),A}(n);r.exports=c},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,r,t){var n=e("../base-xform"),a=e("../static-xform"),s=e("./blip-fill-xform"),o=e("./nv-pic-pr-xform"),i=e("./sp-pr"),c=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={"xdr:nvPicPr":new o,"xdr:blipFill":new s,"xdr:spPr":new a(i)},h}return Le(A,[{key:"tag",get:function(){return"xdr:pic"}},{key:"prepare",value:function(h,f){h.index=f.index+1}},{key:"render",value:function(h,f){h.openNode(this.tag),this.map["xdr:nvPicPr"].render(h,f),this.map["xdr:blipFill"].render(h,f),this.map["xdr:spPr"].render(h,f),h.closeNode()}},{key:"parseOpen",value:function(h){return this.parser?(this.parser.parseOpen(h),!0):(h.name===this.tag?this.reset():(this.parser=this.map[h.name],this.parser&&this.parser.parseOpen(h)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(h){return this.parser?(this.parser.parseClose(h)||(this.mergeModel(this.parser.model),this.parser=void 0),!0):h!==this.tag}}]),A}(n);r.exports=c},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(e,r,t){r.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(e,r,t){var n=e("./base-cell-anchor-xform"),a=e("../static-xform"),s=e("./cell-position-xform"),o=e("./pic-xform"),i=function(c){Mt(l,c);var u=ir(l);function l(){var A;return Fe(this,l),(A=u.call(this)).map={"xdr:from":new s({tag:"xdr:from"}),"xdr:to":new s({tag:"xdr:to"}),"xdr:pic":new o,"xdr:clientData":new a({tag:"xdr:clientData"})},A}return Le(l,[{key:"tag",get:function(){return"xdr:twoCellAnchor"}},{key:"prepare",value:function(A,h){this.map["xdr:pic"].prepare(A.picture,h)}},{key:"render",value:function(A,h){A.openNode(this.tag,{editAs:h.range.editAs||"oneCell"}),this.map["xdr:from"].render(A,h.range.tl),this.map["xdr:to"].render(A,h.range.br),this.map["xdr:pic"].render(A,h.picture),this.map["xdr:clientData"].render(A,{}),A.closeNode()}},{key:"parseClose",value:function(A){return this.parser?(this.parser.parseClose(A)||(this.parser=void 0),!0):A!==this.tag||(this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1)}},{key:"reconcile",value:function(A,h){A.medium=this.reconcilePicture(A.picture,h)}}]),l}(n);r.exports=i},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this)).tag=i.tag,c.always=!!i.always,c.count=i.count,c.empty=i.empty,c.$count=i.$count||"count",c.$=i.$,c.childXform=i.childXform,c.maxItems=i.maxItems,c}return Le(o,[{key:"prepare",value:function(i,c){var u=this.childXform;i&&i.forEach(function(l,A){c.index=A,u.prepare(l,c)})}},{key:"render",value:function(i,c){if(this.always||c&&c.length){i.openNode(this.tag,this.$),this.count&&i.addAttribute(this.$count,c&&c.length||0);var u=this.childXform;(c||[]).forEach(function(l,A){u.render(i,l,A)}),i.closeNode()}else this.empty&&i.leafNode(this.tag)}},{key:"parseOpen",value:function(i){return this.parser?(this.parser.parseOpen(i),!0):i.name===this.tag?(this.model=[],!0):!!this.childXform.parseOpen(i)&&(this.parser=this.childXform,!0)}},{key:"parseText",value:function(i){this.parser&&this.parser.parseText(i)}},{key:"parseClose",value:function(i){if(this.parser){if(!this.parser.parseClose(i)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error("Max ".concat(this.childXform.tag," count (").concat(this.maxItems,") exceeded"));return!0}return!1}},{key:"reconcile",value:function(i,c){if(i){var u=this.childXform;i.forEach(function(l){u.reconcile(l,c)})}}}]),o}(e("./base-xform"));r.exports=n},{"./base-xform":32}],72:[function(e,r,t){var n=e("../../../utils/col-cache"),a=function(s){Mt(i,s);var o=ir(i);function i(){return Fe(this,i),o.apply(this,arguments)}return Le(i,[{key:"tag",get:function(){return"autoFilter"}},{key:"render",value:function(c,u){if(u)if(typeof u=="string")c.leafNode("autoFilter",{ref:u});else{var l=function(f){return typeof f=="string"?f:n.getAddress(f.row,f.column).address},A=l(u.from),h=l(u.to);A&&h&&c.leafNode("autoFilter",{ref:"".concat(A,":").concat(h)})}}},{key:"parseOpen",value:function(c){c.name==="autoFilter"&&(this.model=c.attributes.ref)}}]),i}(e("../base-xform"));r.exports=a},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,r,t){var n=e("../../../utils/utils"),a=e("../base-xform"),s=e("../../../doc/range"),o=e("../../../doc/enums"),i=e("../strings/rich-text-xform");function c(A){if(A==null)return o.ValueType.Null;if(A instanceof String||typeof A=="string")return o.ValueType.String;if(typeof A=="number")return o.ValueType.Number;if(typeof A=="boolean")return o.ValueType.Boolean;if(A instanceof Date)return o.ValueType.Date;if(A.text&&A.hyperlink)return o.ValueType.Hyperlink;if(A.formula)return o.ValueType.Formula;if(A.error)return o.ValueType.Error;throw new Error("I could not understand type of value")}function u(A){return A.type===o.ValueType.Formula?c(A.result):A.type}var l=function(A){Mt(f,A);var h=ir(f);function f(){var d;return Fe(this,f),(d=h.call(this)).richTextXForm=new i,d}return Le(f,[{key:"tag",get:function(){return"c"}},{key:"prepare",value:function(d,g){var p=g.styles.addStyleModel(d.style||{},u(d));switch(p&&(d.styleId=p),d.comment&&g.comments.push(bo(bo({},d.comment),{},{ref:d.address})),d.type){case o.ValueType.String:case o.ValueType.RichText:g.sharedStrings&&(d.ssId=g.sharedStrings.add(d.value));break;case o.ValueType.Date:g.date1904&&(d.date1904=!0);break;case o.ValueType.Hyperlink:g.sharedStrings&&d.text!==void 0&&d.text!==null&&(d.ssId=g.sharedStrings.add(d.text)),g.hyperlinks.push({address:d.address,target:d.hyperlink,tooltip:d.tooltip});break;case o.ValueType.Merge:g.merges.add(d);break;case o.ValueType.Formula:if(g.date1904&&(d.date1904=!0),d.shareType==="shared"&&(d.si=g.siFormulae++),d.formula)g.formulae[d.address]=d;else if(d.sharedFormula){var m=g.formulae[d.sharedFormula];if(!m)throw new Error("Shared Formula master must exist above and or left of clone for cell ".concat(d.address));m.si===void 0?(m.shareType="shared",m.si=g.siFormulae++,m.range=new s(m.address,d.address)):m.range&&m.range.expandToAddress(d.address),d.si=m.si}}}},{key:"renderFormula",value:function(d,g){var p=null;switch(g.shareType){case"shared":p={t:"shared",ref:g.ref||g.range.range,si:g.si};break;case"array":p={t:"array",ref:g.ref};break;default:g.si!==void 0&&(p={t:"shared",si:g.si})}switch(c(g.result)){case o.ValueType.Null:d.leafNode("f",p,g.formula);break;case o.ValueType.String:d.addAttribute("t","str"),d.leafNode("f",p,g.formula),d.leafNode("v",null,g.result);break;case o.ValueType.Number:d.leafNode("f",p,g.formula),d.leafNode("v",null,g.result);break;case o.ValueType.Boolean:d.addAttribute("t","b"),d.leafNode("f",p,g.formula),d.leafNode("v",null,g.result?1:0);break;case o.ValueType.Error:d.addAttribute("t","e"),d.leafNode("f",p,g.formula),d.leafNode("v",null,g.result.error);break;case o.ValueType.Date:d.leafNode("f",p,g.formula),d.leafNode("v",null,n.dateToExcel(g.result,g.date1904));break;default:throw new Error("I could not understand type of value")}}},{key:"render",value:function(d,g){var p=this;if(g.type!==o.ValueType.Null||g.styleId){switch(d.openNode("c"),d.addAttribute("r",g.address),g.styleId&&d.addAttribute("s",g.styleId),g.type){case o.ValueType.Null:break;case o.ValueType.Number:d.leafNode("v",null,g.value);break;case o.ValueType.Boolean:d.addAttribute("t","b"),d.leafNode("v",null,g.value?"1":"0");break;case o.ValueType.Error:d.addAttribute("t","e"),d.leafNode("v",null,g.value.error);break;case o.ValueType.String:case o.ValueType.RichText:g.ssId!==void 0?(d.addAttribute("t","s"),d.leafNode("v",null,g.ssId)):g.value&&g.value.richText?(d.addAttribute("t","inlineStr"),d.openNode("is"),g.value.richText.forEach(function(m){p.richTextXForm.render(d,m)}),d.closeNode("is")):(d.addAttribute("t","str"),d.leafNode("v",null,g.value));break;case o.ValueType.Date:d.leafNode("v",null,n.dateToExcel(g.value,g.date1904));break;case o.ValueType.Hyperlink:g.ssId!==void 0?(d.addAttribute("t","s"),d.leafNode("v",null,g.ssId)):(d.addAttribute("t","str"),d.leafNode("v",null,g.text));break;case o.ValueType.Formula:this.renderFormula(d,g);case o.ValueType.Merge:}d.closeNode()}}},{key:"parseOpen",value:function(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"c":return this.model={address:d.attributes.r},this.t=d.attributes.t,d.attributes.s&&(this.model.styleId=parseInt(d.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=d.attributes.si,this.model.shareType=d.attributes.t,this.model.ref=d.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(d),!0;default:return!1}}},{key:"parseText",value:function(d){if(this.parser)this.parser.parseText(d);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+d:d;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+d:d:this.model.value=this.model.value?this.model.value+d:d}}},{key:"parseClose",value:function(d){switch(d){case"c":var g=this.model;if(g.formula||g.shareType)g.type=o.ValueType.Formula,g.value&&(this.t==="str"?g.result=n.xmlDecode(g.value):this.t==="b"?g.result=parseInt(g.value,10)!==0:this.t==="e"?g.result={error:g.value}:g.result=parseFloat(g.value),g.value=void 0);else if(g.value!==void 0)switch(this.t){case"s":g.type=o.ValueType.String,g.value=parseInt(g.value,10);break;case"str":g.type=o.ValueType.String,g.value=n.xmlDecode(g.value);break;case"inlineStr":g.type=o.ValueType.String;break;case"b":g.type=o.ValueType.Boolean,g.value=parseInt(g.value,10)!==0;break;case"e":g.type=o.ValueType.Error,g.value={error:g.value};break;default:g.type=o.ValueType.Number,g.value=parseFloat(g.value)}else g.styleId?g.type=o.ValueType.Null:g.type=o.ValueType.Merge;return!1;case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(d),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(d),!0)}}},{key:"reconcile",value:function(d,g){var p=d.styleId&&g.styles&&g.styles.getStyleModel(d.styleId);switch(p&&(d.style=p),d.styleId!==void 0&&(d.styleId=void 0),d.type){case o.ValueType.String:typeof d.value=="number"&&g.sharedStrings&&(d.value=g.sharedStrings.getString(d.value)),d.value.richText&&(d.type=o.ValueType.RichText);break;case o.ValueType.Number:p&&n.isDateFmt(p.numFmt)&&(d.type=o.ValueType.Date,d.value=n.excelToDate(d.value,g.date1904));break;case o.ValueType.Formula:d.result!==void 0&&p&&n.isDateFmt(p.numFmt)&&(d.result=n.excelToDate(d.result,g.date1904)),d.shareType==="shared"&&(d.ref?g.formulae[d.si]=d.address:(d.sharedFormula=g.formulae[d.si],delete d.shareType),delete d.si)}var m=g.hyperlinkMap[d.address];m&&(d.type===o.ValueType.Formula?(d.text=d.result,d.result=void 0):(d.text=d.value,d.value=void 0),d.type=o.ValueType.Hyperlink,d.hyperlink=m);var v=g.commentsMap&&g.commentsMap[d.address];v&&(d.comment=v)}}]),f}(a);r.exports=l},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,r,t){var n=e("../../base-xform"),a=function(s){Mt(i,s);var o=ir(i);function i(){return Fe(this,i),o.apply(this,arguments)}return Le(i,[{key:"tag",get:function(){return"x14:cfIcon"}},{key:"render",value:function(c,u){c.leafNode(this.tag,{iconSet:u.iconSet,iconId:u.iconId})}},{key:"parseOpen",value:function(c){var u=c.attributes;this.model={iconSet:u.iconSet,iconId:n.toIntValue(u.iconId)}}},{key:"parseClose",value:function(c){return c!==this.tag}}]),i}(n);r.exports=a},{"../../base-xform":32}],75:[function(e,r,t){var n=e("uuid").v4,a=e("../../base-xform"),s=e("../../composite-xform"),o=e("./databar-ext-xform"),i=e("./icon-set-ext-xform"),c={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},u=function(l){Mt(h,l);var A=ir(h);function h(){var f;return Fe(this,h),(f=A.call(this)).map={"x14:dataBar":f.databarXform=new o,"x14:iconSet":f.iconSetXform=new i},f}return Le(h,[{key:"tag",get:function(){return"x14:cfRule"}},{key:"prepare",value:function(f){h.isExt(f)&&(f.x14Id="{".concat(n(),"}").toUpperCase())}},{key:"render",value:function(f,d){if(h.isExt(d))switch(d.type){case"dataBar":this.renderDataBar(f,d);break;case"iconSet":this.renderIconSet(f,d)}}},{key:"renderDataBar",value:function(f,d){f.openNode(this.tag,{type:"dataBar",id:d.x14Id}),this.databarXform.render(f,d),f.closeNode()}},{key:"renderIconSet",value:function(f,d){f.openNode(this.tag,{type:"iconSet",priority:d.priority,id:d.x14Id||"{".concat(n(),"}")}),this.iconSetXform.render(f,d),f.closeNode()}},{key:"createNewModel",value:function(f){var d=f.attributes;return{type:d.type,x14Id:d.id,priority:a.toIntValue(d.priority)}}},{key:"onParserClose",value:function(f,d){Object.assign(this.model,d.model)}}],[{key:"isExt",value:function(f){return f.type==="dataBar"?o.isExt(f):!(f.type!=="iconSet"||!f.custom&&!c[f.iconSet])}}]),h}(s);r.exports=u},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,r,t){var n=e("../../composite-xform"),a=e("./f-ext-xform"),s=function(o){Mt(c,o);var i=ir(c);function c(){var u;return Fe(this,c),(u=i.call(this)).map={"xm:f":u.fExtXform=new a},u}return Le(c,[{key:"tag",get:function(){return"x14:cfvo"}},{key:"render",value:function(u,l){u.openNode(this.tag,{type:l.type}),l.value!==void 0&&this.fExtXform.render(u,l.value),u.closeNode()}},{key:"createNewModel",value:function(u){return{type:u.attributes.type}}},{key:"onParserClose",value:function(u,l){u==="xm:f"&&(this.model.value=l.model?parseFloat(l.model):0)}}]),c}(n);r.exports=s},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,r,t){var n=e("../../composite-xform"),a=e("./sqref-ext-xform"),s=e("./cf-rule-ext-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={"xm:sqref":l.sqRef=new a,"x14:cfRule":l.cfRule=new s},l}return Le(u,[{key:"tag",get:function(){return"x14:conditionalFormatting"}},{key:"prepare",value:function(l,A){var h=this;l.rules.forEach(function(f){h.cfRule.prepare(f,A)})}},{key:"render",value:function(l,A){var h=this;A.rules.some(s.isExt)&&(l.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),A.rules.filter(s.isExt).forEach(function(f){return h.cfRule.render(l,f)}),this.sqRef.render(l,A.ref),l.closeNode())}},{key:"createNewModel",value:function(){return{rules:[]}}},{key:"onParserClose",value:function(l,A){switch(l){case"xm:sqref":this.model.ref=A.model;break;case"x14:cfRule":this.model.rules.push(A.model)}}}]),u}(n);r.exports=o},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,r,t){var n=e("../../composite-xform"),a=e("./cf-rule-ext-xform"),s=e("./conditional-formatting-ext-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={"x14:conditionalFormatting":l.cfXform=new s},l}return Le(u,[{key:"tag",get:function(){return"x14:conditionalFormattings"}},{key:"hasContent",value:function(l){return l.hasExtContent===void 0&&(l.hasExtContent=l.some(function(A){return A.rules.some(a.isExt)})),l.hasExtContent}},{key:"prepare",value:function(l,A){var h=this;l.forEach(function(f){h.cfXform.prepare(f,A)})}},{key:"render",value:function(l,A){var h=this;this.hasContent(A)&&(l.openNode(this.tag),A.forEach(function(f){return h.cfXform.render(l,f)}),l.closeNode())}},{key:"createNewModel",value:function(){return[]}},{key:"onParserClose",value:function(l,A){this.model.push(A.model)}}]),u}(n);r.exports=o},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,r,t){var n=e("../../base-xform"),a=e("../../composite-xform"),s=e("../../style/color-xform"),o=e("./cfvo-ext-xform"),i=function(c){Mt(l,c);var u=ir(l);function l(){var A;return Fe(this,l),(A=u.call(this)).map={"x14:cfvo":A.cfvoXform=new o,"x14:borderColor":A.borderColorXform=new s("x14:borderColor"),"x14:negativeBorderColor":A.negativeBorderColorXform=new s("x14:negativeBorderColor"),"x14:negativeFillColor":A.negativeFillColorXform=new s("x14:negativeFillColor"),"x14:axisColor":A.axisColorXform=new s("x14:axisColor")},A}return Le(l,[{key:"tag",get:function(){return"x14:dataBar"}},{key:"render",value:function(A,h){var f=this;A.openNode(this.tag,{minLength:n.toIntAttribute(h.minLength,0,!0),maxLength:n.toIntAttribute(h.maxLength,100,!0),border:n.toBoolAttribute(h.border,!1),gradient:n.toBoolAttribute(h.gradient,!0),negativeBarColorSameAsPositive:n.toBoolAttribute(h.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolAttribute(h.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toAttribute(h.axisPosition,"auto"),direction:n.toAttribute(h.direction,"leftToRight")}),h.cfvo.forEach(function(d){f.cfvoXform.render(A,d)}),this.borderColorXform.render(A,h.borderColor),this.negativeBorderColorXform.render(A,h.negativeBorderColor),this.negativeFillColorXform.render(A,h.negativeFillColor),this.axisColorXform.render(A,h.axisColor),A.closeNode()}},{key:"createNewModel",value:function(A){var h=A.attributes;return{cfvo:[],minLength:n.toIntValue(h.minLength,0),maxLength:n.toIntValue(h.maxLength,100),border:n.toBoolValue(h.border,!1),gradient:n.toBoolValue(h.gradient,!0),negativeBarColorSameAsPositive:n.toBoolValue(h.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolValue(h.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toStringValue(h.axisPosition,"auto"),direction:n.toStringValue(h.direction,"leftToRight")}}},{key:"onParserClose",value:function(A,h){var f=Tt(A.split(":"),2)[1];f==="cfvo"?this.model.cfvo.push(h.model):this.model[f]=h.model}}],[{key:"isExt",value:function(A){return!A.gradient}}]),l}(a);r.exports=i},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"xm:f"}},{key:"render",value:function(i,c){i.leafNode(this.tag,null,c)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(i){this.model+=i}},{key:"parseClose",value:function(i){return i!==this.tag}}]),o}(e("../../base-xform"));r.exports=n},{"../../base-xform":32}],81:[function(e,r,t){var n=e("../../base-xform"),a=e("../../composite-xform"),s=e("./cfvo-ext-xform"),o=e("./cf-icon-ext-xform"),i=function(c){Mt(l,c);var u=ir(l);function l(){var A;return Fe(this,l),(A=u.call(this)).map={"x14:cfvo":A.cfvoXform=new s,"x14:cfIcon":A.cfIconXform=new o},A}return Le(l,[{key:"tag",get:function(){return"x14:iconSet"}},{key:"render",value:function(A,h){var f=this;A.openNode(this.tag,{iconSet:n.toStringAttribute(h.iconSet),reverse:n.toBoolAttribute(h.reverse,!1),showValue:n.toBoolAttribute(h.showValue,!0),custom:n.toBoolAttribute(h.icons,!1)}),h.cfvo.forEach(function(d){f.cfvoXform.render(A,d)}),h.icons&&h.icons.forEach(function(d,g){d.iconId=g,f.cfIconXform.render(A,d)}),A.closeNode()}},{key:"createNewModel",value:function(A){var h=A.attributes;return{cfvo:[],iconSet:n.toStringValue(h.iconSet,"3TrafficLights"),reverse:n.toBoolValue(h.reverse,!1),showValue:n.toBoolValue(h.showValue,!0)}}},{key:"onParserClose",value:function(A,h){var f=Tt(A.split(":"),2)[1];switch(f){case"cfvo":this.model.cfvo.push(h.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(h.model);break;default:this.model[f]=h.model}}}]),l}(a);r.exports=i},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"xm:sqref"}},{key:"render",value:function(i,c){i.leafNode(this.tag,null,c)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(i){this.model+=i}},{key:"parseClose",value:function(i){return i!==this.tag}}]),o}(e("../../base-xform"));r.exports=n},{"../../base-xform":32}],83:[function(e,r,t){var n=e("../../base-xform"),a=e("../../composite-xform"),s=e("../../../../doc/range"),o=e("./databar-xform"),i=e("./ext-lst-ref-xform"),c=e("./formula-xform"),u=e("./color-scale-xform"),l=e("./icon-set-xform"),A={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},h=function(p){if(p.formulae&&p.formulae[0])return p.formulae[0];var m=new s(p.ref).tl;switch(p.operator){case"containsText":return'NOT(ISERROR(SEARCH("'.concat(p.text,'",').concat(m,")))");case"containsBlanks":return"LEN(TRIM(".concat(m,"))=0");case"notContainsBlanks":return"LEN(TRIM(".concat(m,"))>0");case"containsErrors":return"ISERROR(".concat(m,")");case"notContainsErrors":return"NOT(ISERROR(".concat(m,"))");default:return}},f=function(p){if(p.formulae&&p.formulae[0])return p.formulae[0];var m=new s(p.ref).tl;switch(p.timePeriod){case"thisWeek":return"AND(TODAY()-ROUNDDOWN(".concat(m,",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(m,",0)-TODAY()<=7-WEEKDAY(TODAY()))");case"lastWeek":return"AND(TODAY()-ROUNDDOWN(".concat(m,",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(m,",0)<(WEEKDAY(TODAY())+7))");case"nextWeek":return"AND(ROUNDDOWN(".concat(m,",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(m,",0)-TODAY()<(15-WEEKDAY(TODAY())))");case"yesterday":return"FLOOR(".concat(m,",1)=TODAY()-1");case"today":return"FLOOR(".concat(m,",1)=TODAY()");case"tomorrow":return"FLOOR(".concat(m,",1)=TODAY()+1");case"last7Days":return"AND(TODAY()-FLOOR(".concat(m,",1)<=6,FLOOR(").concat(m,",1)<=TODAY())");case"lastMonth":return"AND(MONTH(".concat(m,")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(m,")=YEAR(EDATE(TODAY(),0-1)))");case"thisMonth":return"AND(MONTH(".concat(m,")=MONTH(TODAY()),YEAR(").concat(m,")=YEAR(TODAY()))");case"nextMonth":return"AND(MONTH(".concat(m,")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(m,")=YEAR(EDATE(TODAY(),0+1)))");default:return}},d=function(p){var m=p.type,v=p.operator;switch(m){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:m};default:return{type:m,operator:v}}},g=function(p){Mt(v,p);var m=ir(v);function v(){var y;return Fe(this,v),(y=m.call(this)).map={dataBar:y.databarXform=new o,extLst:y.extLstRefXform=new i,formula:y.formulaXform=new c,colorScale:y.colorScaleXform=new u,iconSet:y.iconSetXform=new l},y}return Le(v,[{key:"tag",get:function(){return"cfRule"}},{key:"render",value:function(y,I){switch(I.type){case"expression":this.renderExpression(y,I);break;case"cellIs":this.renderCellIs(y,I);break;case"top10":this.renderTop10(y,I);break;case"aboveAverage":this.renderAboveAverage(y,I);break;case"dataBar":this.renderDataBar(y,I);break;case"colorScale":this.renderColorScale(y,I);break;case"iconSet":this.renderIconSet(y,I);break;case"containsText":this.renderText(y,I);break;case"timePeriod":this.renderTimePeriod(y,I)}}},{key:"renderExpression",value:function(y,I){y.openNode(this.tag,{type:"expression",dxfId:I.dxfId,priority:I.priority}),this.formulaXform.render(y,I.formulae[0]),y.closeNode()}},{key:"renderCellIs",value:function(y,I){var E=this;y.openNode(this.tag,{type:"cellIs",dxfId:I.dxfId,priority:I.priority,operator:I.operator}),I.formulae.forEach(function(k){E.formulaXform.render(y,k)}),y.closeNode()}},{key:"renderTop10",value:function(y,I){y.leafNode(this.tag,{type:"top10",dxfId:I.dxfId,priority:I.priority,percent:n.toBoolAttribute(I.percent,!1),bottom:n.toBoolAttribute(I.bottom,!1),rank:n.toIntValue(I.rank,10,!0)})}},{key:"renderAboveAverage",value:function(y,I){y.leafNode(this.tag,{type:"aboveAverage",dxfId:I.dxfId,priority:I.priority,aboveAverage:n.toBoolAttribute(I.aboveAverage,!0)})}},{key:"renderDataBar",value:function(y,I){y.openNode(this.tag,{type:"dataBar",priority:I.priority}),this.databarXform.render(y,I),this.extLstRefXform.render(y,I),y.closeNode()}},{key:"renderColorScale",value:function(y,I){y.openNode(this.tag,{type:"colorScale",priority:I.priority}),this.colorScaleXform.render(y,I),y.closeNode()}},{key:"renderIconSet",value:function(y,I){v.isPrimitive(I)&&(y.openNode(this.tag,{type:"iconSet",priority:I.priority}),this.iconSetXform.render(y,I),y.closeNode())}},{key:"renderText",value:function(y,I){y.openNode(this.tag,{type:I.operator,dxfId:I.dxfId,priority:I.priority,operator:n.toStringAttribute(I.operator,"containsText")});var E=h(I);E&&this.formulaXform.render(y,E),y.closeNode()}},{key:"renderTimePeriod",value:function(y,I){y.openNode(this.tag,{type:"timePeriod",dxfId:I.dxfId,priority:I.priority,timePeriod:I.timePeriod});var E=f(I);E&&this.formulaXform.render(y,E),y.closeNode()}},{key:"createNewModel",value:function(y){var I=y.attributes;return bo(bo({},d(I)),{},{dxfId:n.toIntValue(I.dxfId),priority:n.toIntValue(I.priority),timePeriod:I.timePeriod,percent:n.toBoolValue(I.percent),bottom:n.toBoolValue(I.bottom),rank:n.toIntValue(I.rank),aboveAverage:n.toBoolValue(I.aboveAverage)})}},{key:"onParserClose",value:function(y,I){switch(y){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,I.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(I.model)}}}],[{key:"isPrimitive",value:function(y){return y.type!=="iconSet"||!y.custom&&!A[y.iconSet]}}]),v}(a);r.exports=g},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(e,r,t){var n=e("../../base-xform"),a=function(s){Mt(i,s);var o=ir(i);function i(){return Fe(this,i),o.apply(this,arguments)}return Le(i,[{key:"tag",get:function(){return"cfvo"}},{key:"render",value:function(c,u){c.leafNode(this.tag,{type:u.type,val:u.value})}},{key:"parseOpen",value:function(c){this.model={type:c.attributes.type,value:n.toFloatValue(c.attributes.val)}}},{key:"parseClose",value:function(c){return c!==this.tag}}]),i}(n);r.exports=a},{"../../base-xform":32}],85:[function(e,r,t){var n=e("../../composite-xform"),a=e("../../style/color-xform"),s=e("./cfvo-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={cfvo:l.cfvoXform=new s,color:l.colorXform=new a},l}return Le(u,[{key:"tag",get:function(){return"colorScale"}},{key:"render",value:function(l,A){var h=this;l.openNode(this.tag),A.cfvo.forEach(function(f){h.cfvoXform.render(l,f)}),A.color.forEach(function(f){h.colorXform.render(l,f)}),l.closeNode()}},{key:"createNewModel",value:function(l){return{cfvo:[],color:[]}}},{key:"onParserClose",value:function(l,A){this.model[l].push(A.model)}}]),u}(n);r.exports=o},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,r,t){var n=e("../../composite-xform"),a=e("./cf-rule-xform"),s=function(o){Mt(c,o);var i=ir(c);function c(){var u;return Fe(this,c),(u=i.call(this)).map={cfRule:new a},u}return Le(c,[{key:"tag",get:function(){return"conditionalFormatting"}},{key:"render",value:function(u,l){var A=this;l.rules.some(a.isPrimitive)&&(u.openNode(this.tag,{sqref:l.ref}),l.rules.forEach(function(h){a.isPrimitive(h)&&(h.ref=l.ref,A.map.cfRule.render(u,h))}),u.closeNode())}},{key:"createNewModel",value:function(u){return{ref:u.attributes.sqref,rules:[]}}},{key:"onParserClose",value:function(u,l){this.model.rules.push(l.model)}}]),c}(n);r.exports=s},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,r,t){var n=e("../../base-xform"),a=e("./conditional-formatting-xform"),s=function(o){Mt(c,o);var i=ir(c);function c(){var u;return Fe(this,c),(u=i.call(this)).cfXform=new a,u}return Le(c,[{key:"tag",get:function(){return"conditionalFormatting"}},{key:"reset",value:function(){this.model=[]}},{key:"prepare",value:function(u,l){var A=u.reduce(function(h,f){return Math.max.apply(Math,[h].concat(Et(f.rules.map(function(d){return d.priority||0}))))},1);u.forEach(function(h){h.rules.forEach(function(f){f.priority||(f.priority=A++),f.style&&(f.dxfId=l.styles.addDxfStyle(f.style))})})}},{key:"render",value:function(u,l){var A=this;l.forEach(function(h){A.cfXform.render(u,h)})}},{key:"parseOpen",value:function(u){return this.parser?(this.parser.parseOpen(u),!0):u.name==="conditionalFormatting"&&(this.parser=this.cfXform,this.parser.parseOpen(u),!0)}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){return!(!this.parser||!this.parser.parseClose(u)&&(this.model.push(this.parser.model),this.parser=void 0,1))}},{key:"reconcile",value:function(u,l){u.forEach(function(A){A.rules.forEach(function(h){h.dxfId!==void 0&&(h.style=l.styles.getDxfStyle(h.dxfId),delete h.dxfId)})})}}]),c}(n);r.exports=s},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,r,t){var n=e("../../composite-xform"),a=e("../../style/color-xform"),s=e("./cfvo-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={cfvo:l.cfvoXform=new s,color:l.colorXform=new a},l}return Le(u,[{key:"tag",get:function(){return"dataBar"}},{key:"render",value:function(l,A){var h=this;l.openNode(this.tag),A.cfvo.forEach(function(f){h.cfvoXform.render(l,f)}),this.colorXform.render(l,A.color),l.closeNode()}},{key:"createNewModel",value:function(){return{cfvo:[]}}},{key:"onParserClose",value:function(l,A){switch(l){case"cfvo":this.model.cfvo.push(A.model);break;case"color":this.model.color=A.model}}}]),u}(n);r.exports=o},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,r,t){var n=e("../../base-xform"),a=e("../../composite-xform"),s=function(c){Mt(l,c);var u=ir(l);function l(){return Fe(this,l),u.apply(this,arguments)}return Le(l,[{key:"tag",get:function(){return"x14:id"}},{key:"render",value:function(A,h){A.leafNode(this.tag,null,h)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(A){this.model+=A}},{key:"parseClose",value:function(A){return A!==this.tag}}]),l}(n),o=function(c){Mt(l,c);var u=ir(l);function l(){var A;return Fe(this,l),(A=u.call(this)).map={"x14:id":A.idXform=new s},A}return Le(l,[{key:"tag",get:function(){return"ext"}},{key:"render",value:function(A,h){A.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(A,h.x14Id),A.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(A,h){this.model.x14Id=h.model}}]),l}(a),i=function(c){Mt(l,c);var u=ir(l);function l(){var A;return Fe(this,l),(A=u.call(this)).map={ext:new o},A}return Le(l,[{key:"tag",get:function(){return"extLst"}},{key:"render",value:function(A,h){A.openNode(this.tag),this.map.ext.render(A,h),A.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(A,h){Object.assign(this.model,h.model)}}]),l}(a);r.exports=i},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"formula"}},{key:"render",value:function(i,c){i.leafNode(this.tag,null,c)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(i){this.model+=i}},{key:"parseClose",value:function(i){return i!==this.tag}}]),o}(e("../../base-xform"));r.exports=n},{"../../base-xform":32}],91:[function(e,r,t){var n=e("../../base-xform"),a=e("../../composite-xform"),s=e("./cfvo-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={cfvo:l.cfvoXform=new s},l}return Le(u,[{key:"tag",get:function(){return"iconSet"}},{key:"render",value:function(l,A){var h=this;l.openNode(this.tag,{iconSet:n.toStringAttribute(A.iconSet,"3TrafficLights"),reverse:n.toBoolAttribute(A.reverse,!1),showValue:n.toBoolAttribute(A.showValue,!0)}),A.cfvo.forEach(function(f){h.cfvoXform.render(l,f)}),l.closeNode()}},{key:"createNewModel",value:function(l){var A=l.attributes;return{iconSet:n.toStringValue(A.iconSet,"3TrafficLights"),reverse:n.toBoolValue(A.reverse),showValue:n.toBoolValue(A.showValue),cfvo:[]}}},{key:"onParserClose",value:function(l,A){this.model[l].push(A.model)}}]),u}(a);r.exports=o},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,r,t){var n=e("../../../utils/utils"),a=function(s){Mt(i,s);var o=ir(i);function i(){return Fe(this,i),o.apply(this,arguments)}return Le(i,[{key:"tag",get:function(){return"col"}},{key:"prepare",value:function(c,u){var l=u.styles.addStyleModel(c.style||{});l&&(c.styleId=l)}},{key:"render",value:function(c,u){c.openNode("col"),c.addAttribute("min",u.min),c.addAttribute("max",u.max),u.width&&c.addAttribute("width",u.width),u.styleId&&c.addAttribute("style",u.styleId),u.hidden&&c.addAttribute("hidden","1"),u.bestFit&&c.addAttribute("bestFit","1"),u.outlineLevel&&c.addAttribute("outlineLevel",u.outlineLevel),u.collapsed&&c.addAttribute("collapsed","1"),c.addAttribute("customWidth","1"),c.closeNode()}},{key:"parseOpen",value:function(c){if(c.name==="col"){var u=this.model={min:parseInt(c.attributes.min||"0",10),max:parseInt(c.attributes.max||"0",10),width:c.attributes.width===void 0?void 0:parseFloat(c.attributes.width||"0")};return c.attributes.style&&(u.styleId=parseInt(c.attributes.style,10)),n.parseBoolean(c.attributes.hidden)&&(u.hidden=!0),n.parseBoolean(c.attributes.bestFit)&&(u.bestFit=!0),c.attributes.outlineLevel&&(u.outlineLevel=parseInt(c.attributes.outlineLevel,10)),n.parseBoolean(c.attributes.collapsed)&&(u.collapsed=!0),!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"reconcile",value:function(c,u){c.styleId&&(c.style=u.styles.getStyleModel(c.styleId))}}]),i}(e("../base-xform"));r.exports=a},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,r,t){var n=e("../../../utils/under-dash"),a=e("../../../utils/utils"),s=e("../../../utils/col-cache"),o=e("../base-xform"),i=e("../../../doc/range");function c(h,f,d,g){var p=f[d];p!==void 0?h[d]=p:g!==void 0&&(h[d]=g)}function u(h,f,d,g){var p=f[d];p!==void 0?h[d]=a.parseBoolean(p):g!==void 0&&(h[d]=g)}function l(h){var f=n.map(h,function(p,m){return{address:m,dataValidation:p,marked:!1}}).sort(function(p,m){return n.strcmp(p.address,m.address)}),d=n.keyBy(f,"address"),g=function(p,m,v){for(var y=0;y1||I>1){var R=m.row+(v-1),T=m.col+(I-1);return bo(bo({},p.dataValidation),{},{sqref:"".concat(p.address,":").concat(s.encodeAddress(R,T))})}return bo(bo({},p.dataValidation),{},{sqref:p.address})}return null}).filter(Boolean)}var A=function(h){Mt(d,h);var f=ir(d);function d(){return Fe(this,d),f.apply(this,arguments)}return Le(d,[{key:"tag",get:function(){return"dataValidations"}},{key:"render",value:function(g,p){var m=l(p);m.length&&(g.openNode("dataValidations",{count:m.length}),m.forEach(function(v){g.openNode("dataValidation"),v.type!=="any"&&(g.addAttribute("type",v.type),v.operator&&v.type!=="list"&&v.operator!=="between"&&g.addAttribute("operator",v.operator),v.allowBlank&&g.addAttribute("allowBlank","1")),v.showInputMessage&&g.addAttribute("showInputMessage","1"),v.promptTitle&&g.addAttribute("promptTitle",v.promptTitle),v.prompt&&g.addAttribute("prompt",v.prompt),v.showErrorMessage&&g.addAttribute("showErrorMessage","1"),v.errorStyle&&g.addAttribute("errorStyle",v.errorStyle),v.errorTitle&&g.addAttribute("errorTitle",v.errorTitle),v.error&&g.addAttribute("error",v.error),g.addAttribute("sqref",v.sqref),(v.formulae||[]).forEach(function(y,I){g.openNode("formula".concat(I+1)),v.type==="date"?g.writeText(a.dateToExcel(new Date(y))):g.writeText(y),g.closeNode()}),g.closeNode()}),g.closeNode())}},{key:"parseOpen",value:function(g){switch(g.name){case"dataValidations":return this.model={},!0;case"dataValidation":this._address=g.attributes.sqref;var p={type:g.attributes.type||"any",formulae:[]};switch(g.attributes.type&&u(p,g.attributes,"allowBlank"),u(p,g.attributes,"showInputMessage"),u(p,g.attributes,"showErrorMessage"),p.type){case"any":case"list":case"custom":break;default:c(p,g.attributes,"operator","between")}return c(p,g.attributes,"promptTitle"),c(p,g.attributes,"prompt"),c(p,g.attributes,"errorStyle"),c(p,g.attributes,"errorTitle"),c(p,g.attributes,"error"),this._dataValidation=p,!0;case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}},{key:"parseText",value:function(g){this._formula&&this._formula.push(g)}},{key:"parseClose",value:function(g){var p=this;switch(g){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(function(v){v.includes(":")?new i(v).forEachAddress(function(y){p.model[y]=p._dataValidation}):p.model[v]=p._dataValidation}),!0;case"formula1":case"formula2":var m=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":m=parseInt(m,10);break;case"decimal":m=parseFloat(m);break;case"date":m=a.excelToDate(parseFloat(m))}return this._dataValidation.formulae.push(m),this._formula=void 0,!0;default:return!0}}}]),d}(o);r.exports=A},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"dimension"}},{key:"render",value:function(i,c){c&&i.leafNode("dimension",{ref:c})}},{key:"parseOpen",value:function(i){return i.name==="dimension"&&(this.model=i.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],95:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"drawing"}},{key:"render",value:function(i,c){c&&i.leafNode(this.tag,{"r:id":c.rId})}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.model={rId:i.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],96:[function(e,r,t){var n=e("../composite-xform"),a=e("./cf-ext/conditional-formattings-ext-xform"),s=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={"x14:conditionalFormattings":l.conditionalFormattings=new a},l}return Le(u,[{key:"tag",get:function(){return"ext"}},{key:"hasContent",value:function(l){return this.conditionalFormattings.hasContent(l.conditionalFormattings)}},{key:"prepare",value:function(l,A){this.conditionalFormattings.prepare(l.conditionalFormattings,A)}},{key:"render",value:function(l,A){l.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(l,A.conditionalFormattings),l.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(l,A){this.model[l]=A.model}}]),u}(n),o=function(i){Mt(u,i);var c=ir(u);function u(){var l;return Fe(this,u),(l=c.call(this)).map={ext:l.ext=new s},l}return Le(u,[{key:"tag",get:function(){return"extLst"}},{key:"prepare",value:function(l,A){this.ext.prepare(l,A)}},{key:"hasContent",value:function(l){return this.ext.hasContent(l)}},{key:"render",value:function(l,A){this.hasContent(A)&&(l.openNode("extLst"),this.ext.render(l,A),l.closeNode())}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(l,A){Object.assign(this.model,A.model)}}]),u}(n);r.exports=o},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"headerFooter"}},{key:"render",value:function(i,c){if(c){i.addRollback();var u=!1;i.openNode("headerFooter"),c.differentFirst&&(i.addAttribute("differentFirst","1"),u=!0),c.differentOddEven&&(i.addAttribute("differentOddEven","1"),u=!0),c.oddHeader&&typeof c.oddHeader=="string"&&(i.leafNode("oddHeader",null,c.oddHeader),u=!0),c.oddFooter&&typeof c.oddFooter=="string"&&(i.leafNode("oddFooter",null,c.oddFooter),u=!0),c.evenHeader&&typeof c.evenHeader=="string"&&(i.leafNode("evenHeader",null,c.evenHeader),u=!0),c.evenFooter&&typeof c.evenFooter=="string"&&(i.leafNode("evenFooter",null,c.evenFooter),u=!0),c.firstHeader&&typeof c.firstHeader=="string"&&(i.leafNode("firstHeader",null,c.firstHeader),u=!0),c.firstFooter&&typeof c.firstFooter=="string"&&(i.leafNode("firstFooter",null,c.firstFooter),u=!0),u?(i.closeNode(),i.commit()):i.rollback()}}},{key:"parseOpen",value:function(i){switch(i.name){case"headerFooter":return this.model={},i.attributes.differentFirst&&(this.model.differentFirst=parseInt(i.attributes.differentFirst,0)===1),i.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(i.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}},{key:"parseText",value:function(i){switch(this.currentNode){case"oddHeader":this.model.oddHeader=i;break;case"oddFooter":this.model.oddFooter=i;break;case"evenHeader":this.model.evenHeader=i;break;case"evenFooter":this.model.evenFooter=i;break;case"firstHeader":this.model.firstHeader=i;break;case"firstFooter":this.model.firstFooter=i}}},{key:"parseClose",value:function(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],98:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"hyperlink"}},{key:"render",value:function(i,c){this.isInternalLink(c)?i.leafNode("hyperlink",{ref:c.address,"r:id":c.rId,tooltip:c.tooltip,location:c.target}):i.leafNode("hyperlink",{ref:c.address,"r:id":c.rId,tooltip:c.tooltip})}},{key:"parseOpen",value:function(i){return i.name==="hyperlink"&&(this.model={address:i.attributes.ref,rId:i.attributes["r:id"],tooltip:i.attributes.tooltip},i.attributes.location&&(this.model.target=i.attributes.location),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"isInternalLink",value:function(i){return i.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(i.target)}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],99:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"mergeCell"}},{key:"render",value:function(i,c){i.leafNode("mergeCell",{ref:c})}},{key:"parseOpen",value:function(i){return i.name==="mergeCell"&&(this.model=i.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],100:[function(e,r,t){var n=e("../../../utils/under-dash"),a=e("../../../doc/range"),s=e("../../../utils/col-cache"),o=e("../../../doc/enums"),i=function(){function c(){Fe(this,c),this.merges={}}return Le(c,[{key:"add",value:function(u){if(this.merges[u.master])this.merges[u.master].expandToAddress(u.address);else{var l="".concat(u.master,":").concat(u.address);this.merges[u.master]=new a(l)}}},{key:"mergeCells",get:function(){return n.map(this.merges,function(u){return u.range})}},{key:"reconcile",value:function(u,l){n.each(u,function(A){for(var h=s.decode(A),f=h.top;f<=h.bottom;f++)for(var d=l[f-1],g=h.left;g<=h.right;g++){var p=d.cells[g-1];p?p.type===o.ValueType.Merge&&(p.master=h.tl):d.cells[g]={type:o.ValueType.Null,address:s.encodeAddress(f,g)}}})}},{key:"getMasterAddress",value:function(u){var l=this.hash[u];return l&&l.tl}}]),c}();r.exports=i},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,r,t){var n=e("../base-xform"),a=function(o){return o!==void 0},s=function(o){Mt(c,o);var i=ir(c);function c(){return Fe(this,c),i.apply(this,arguments)}return Le(c,[{key:"tag",get:function(){return"outlinePr"}},{key:"render",value:function(u,l){return!(!l||!a(l.summaryBelow)&&!a(l.summaryRight)||(u.leafNode(this.tag,{summaryBelow:a(l.summaryBelow)?Number(l.summaryBelow):void 0,summaryRight:a(l.summaryRight)?Number(l.summaryRight):void 0}),0))}},{key:"parseOpen",value:function(u){return u.name===this.tag&&(this.model={summaryBelow:a(u.attributes.summaryBelow)?!!Number(u.attributes.summaryBelow):void 0,summaryRight:a(u.attributes.summaryRight)?!!Number(u.attributes.summaryRight):void 0},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),c}(n);r.exports=s},{"../base-xform":32}],102:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"brk"}},{key:"render",value:function(i,c){i.leafNode("brk",c)}},{key:"parseOpen",value:function(i){return i.name==="brk"&&(this.model=i.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],103:[function(e,r,t){var n=e("../../../utils/under-dash"),a=function(s){Mt(i,s);var o=ir(i);function i(){return Fe(this,i),o.apply(this,arguments)}return Le(i,[{key:"tag",get:function(){return"pageMargins"}},{key:"render",value:function(c,u){if(u){var l={left:u.left,right:u.right,top:u.top,bottom:u.bottom,header:u.header,footer:u.footer};n.some(l,function(A){return A!==void 0})&&c.leafNode(this.tag,l)}}},{key:"parseOpen",value:function(c){return c.name===this.tag&&(this.model={left:parseFloat(c.attributes.left||.7),right:parseFloat(c.attributes.right||.7),top:parseFloat(c.attributes.top||.75),bottom:parseFloat(c.attributes.bottom||.75),header:parseFloat(c.attributes.header||.3),footer:parseFloat(c.attributes.footer||.3)},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),i}(e("../base-xform"));r.exports=a},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"pageSetUpPr"}},{key:"render",value:function(i,c){return!(!c||!c.fitToPage||(i.leafNode(this.tag,{fitToPage:c.fitToPage?"1":void 0}),0))}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.model={fitToPage:i.attributes.fitToPage==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],105:[function(e,r,t){var n=e("../../../utils/under-dash");function a(l){return l?"1":void 0}function s(l){if(l==="overThenDown")return l}function o(l){switch(l){case"atEnd":case"asDisplyed":return l;default:return}}function i(l){switch(l){case"dash":case"blank":case"NA":return l;default:return}}function c(l){return l!==void 0?parseInt(l,10):void 0}var u=function(l){Mt(h,l);var A=ir(h);function h(){return Fe(this,h),A.apply(this,arguments)}return Le(h,[{key:"tag",get:function(){return"pageSetup"}},{key:"render",value:function(f,d){if(d){var g={paperSize:d.paperSize,orientation:d.orientation,horizontalDpi:d.horizontalDpi,verticalDpi:d.verticalDpi,pageOrder:s(d.pageOrder),blackAndWhite:a(d.blackAndWhite),draft:a(d.draft),cellComments:o(d.cellComments),errors:i(d.errors),scale:d.scale,fitToWidth:d.fitToWidth,fitToHeight:d.fitToHeight,firstPageNumber:d.firstPageNumber,useFirstPageNumber:a(d.firstPageNumber),usePrinterDefaults:a(d.usePrinterDefaults),copies:d.copies};n.some(g,function(p){return p!==void 0})&&f.leafNode(this.tag,g)}}},{key:"parseOpen",value:function(f){return f.name===this.tag&&(this.model={paperSize:c(f.attributes.paperSize),orientation:f.attributes.orientation||"portrait",horizontalDpi:parseInt(f.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(f.attributes.verticalDpi||"4294967295",10),pageOrder:f.attributes.pageOrder||"downThenOver",blackAndWhite:f.attributes.blackAndWhite==="1",draft:f.attributes.draft==="1",cellComments:f.attributes.cellComments||"None",errors:f.attributes.errors||"displayed",scale:parseInt(f.attributes.scale||"100",10),fitToWidth:parseInt(f.attributes.fitToWidth||"1",10),fitToHeight:parseInt(f.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(f.attributes.firstPageNumber||"1",10),useFirstPageNumber:f.attributes.useFirstPageNumber==="1",usePrinterDefaults:f.attributes.usePrinterDefaults==="1",copies:parseInt(f.attributes.copies||"1",10)},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),h}(e("../base-xform"));r.exports=u},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"picture"}},{key:"render",value:function(i,c){c&&i.leafNode(this.tag,{"r:id":c.rId})}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.model={rId:i.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],107:[function(e,r,t){var n=e("../../../utils/under-dash");function a(o){return o?"1":void 0}var s=function(o){Mt(c,o);var i=ir(c);function c(){return Fe(this,c),i.apply(this,arguments)}return Le(c,[{key:"tag",get:function(){return"printOptions"}},{key:"render",value:function(u,l){if(l){var A={headings:a(l.showRowColHeaders),gridLines:a(l.showGridLines),horizontalCentered:a(l.horizontalCentered),verticalCentered:a(l.verticalCentered)};n.some(A,function(h){return h!==void 0})&&u.leafNode(this.tag,A)}}},{key:"parseOpen",value:function(u){return u.name===this.tag&&(this.model={showRowColHeaders:u.attributes.headings==="1",showGridLines:u.attributes.gridLines==="1",horizontalCentered:u.attributes.horizontalCentered==="1",verticalCentered:u.attributes.verticalCentered==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),c}(e("../base-xform"));r.exports=s},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,r,t){var n=e("./page-breaks-xform"),a=function(s){Mt(i,s);var o=ir(i);function i(){Fe(this,i);var c={tag:"rowBreaks",count:!0,childXform:new n};return o.call(this,c)}return Le(i,[{key:"render",value:function(c,u){if(u&&u.length){c.openNode(this.tag,this.$),this.count&&(c.addAttribute(this.$count,u.length),c.addAttribute("manualBreakCount",u.length));var l=this.childXform;u.forEach(function(A){l.render(c,A)}),c.closeNode()}else this.empty&&c.leafNode(this.tag)}}]),i}(e("../list-xform"));r.exports=a},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,r,t){var n=e("../base-xform"),a=e("../../../utils/utils"),s=e("./cell-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(l){var A;return Fe(this,u),(A=c.call(this)).maxItems=l&&l.maxItems,A.map={c:new s},A}return Le(u,[{key:"tag",get:function(){return"row"}},{key:"prepare",value:function(l,A){var h=A.styles.addStyleModel(l.style);h&&(l.styleId=h);var f=this.map.c;l.cells.forEach(function(d){f.prepare(d,A)})}},{key:"render",value:function(l,A,h){l.openNode("row"),l.addAttribute("r",A.number),A.height&&(l.addAttribute("ht",A.height),l.addAttribute("customHeight","1")),A.hidden&&l.addAttribute("hidden","1"),A.min>0&&A.max>0&&A.min<=A.max&&l.addAttribute("spans","".concat(A.min,":").concat(A.max)),A.styleId&&(l.addAttribute("s",A.styleId),l.addAttribute("customFormat","1")),l.addAttribute("x14ac:dyDescent","0.25"),A.outlineLevel&&l.addAttribute("outlineLevel",A.outlineLevel),A.collapsed&&l.addAttribute("collapsed","1");var f=this.map.c;A.cells.forEach(function(d){f.render(l,d,h)}),l.closeNode()}},{key:"parseOpen",value:function(l){if(this.parser)return this.parser.parseOpen(l),!0;if(l.name==="row"){this.numRowsSeen+=1;var A=l.attributes.spans?l.attributes.spans.split(":").map(function(f){return parseInt(f,10)}):[void 0,void 0],h=this.model={number:parseInt(l.attributes.r,10),min:A[0],max:A[1],cells:[]};return l.attributes.s&&(h.styleId=parseInt(l.attributes.s,10)),a.parseBoolean(l.attributes.hidden)&&(h.hidden=!0),a.parseBoolean(l.attributes.bestFit)&&(h.bestFit=!0),l.attributes.ht&&(h.height=parseFloat(l.attributes.ht)),l.attributes.outlineLevel&&(h.outlineLevel=parseInt(l.attributes.outlineLevel,10)),a.parseBoolean(l.attributes.collapsed)&&(h.collapsed=!0),!0}return this.parser=this.map[l.name],!!this.parser&&(this.parser.parseOpen(l),!0)}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){if(this.parser){if(!this.parser.parseClose(l)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error("Max column count (".concat(this.maxItems,") exceeded"));this.parser=void 0}return!0}return!1}},{key:"reconcile",value:function(l,A){l.style=l.styleId?A.styles.getStyleModel(l.styleId):{},l.styleId!==void 0&&(l.styleId=void 0);var h=this.map.c;l.cells.forEach(function(f){h.reconcile(f,A)})}}]),u}(n);r.exports=o},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,r,t){var n=e("../../../utils/under-dash"),a=function(s){Mt(i,s);var o=ir(i);function i(){return Fe(this,i),o.apply(this,arguments)}return Le(i,[{key:"tag",get:function(){return"sheetFormatPr"}},{key:"render",value:function(c,u){if(u){var l={defaultRowHeight:u.defaultRowHeight,outlineLevelRow:u.outlineLevelRow,outlineLevelCol:u.outlineLevelCol,"x14ac:dyDescent":u.dyDescent};u.defaultColWidth&&(l.defaultColWidth=u.defaultColWidth),u.defaultRowHeight&&u.defaultRowHeight===15||(l.customHeight="1"),n.some(l,function(A){return A!==void 0})&&c.leafNode("sheetFormatPr",l)}}},{key:"parseOpen",value:function(c){return c.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(c.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(c.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(c.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(c.attributes.outlineLevelCol||"0",10)},c.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(c.attributes.defaultColWidth)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),i}(e("../base-xform"));r.exports=a},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,r,t){var n=e("../base-xform"),a=e("../style/color-xform"),s=e("./page-setup-properties-xform"),o=e("./outline-properties-xform"),i=function(c){Mt(l,c);var u=ir(l);function l(){var A;return Fe(this,l),(A=u.call(this)).map={tabColor:new a("tabColor"),pageSetUpPr:new s,outlinePr:new o},A}return Le(l,[{key:"tag",get:function(){return"sheetPr"}},{key:"render",value:function(A,h){if(h){A.addRollback(),A.openNode("sheetPr");var f=!1;f=this.map.tabColor.render(A,h.tabColor)||f,f=this.map.pageSetUpPr.render(A,h.pageSetup)||f,(f=this.map.outlinePr.render(A,h.outlineProperties)||f)?(A.closeNode(),A.commit()):A.rollback()}}},{key:"parseOpen",value:function(A){return this.parser?(this.parser.parseOpen(A),!0):A.name===this.tag?(this.reset(),!0):!!this.map[A.name]&&(this.parser=this.map[A.name],this.parser.parseOpen(A),!0)}},{key:"parseText",value:function(A){return!!this.parser&&(this.parser.parseText(A),!0)}},{key:"parseClose",value:function(A){return this.parser?(this.parser.parseClose(A)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}]),l}(n);r.exports=i},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(e,r,t){var n=e("../../../utils/under-dash");function a(i,c){return i?c:void 0}function s(i,c){return i===c||void 0}var o=function(i){Mt(u,i);var c=ir(u);function u(){return Fe(this,u),c.apply(this,arguments)}return Le(u,[{key:"tag",get:function(){return"sheetProtection"}},{key:"render",value:function(l,A){if(A){var h={sheet:a(A.sheet,"1"),selectLockedCells:A.selectLockedCells===!1?"1":void 0,selectUnlockedCells:A.selectUnlockedCells===!1?"1":void 0,formatCells:a(A.formatCells,"0"),formatColumns:a(A.formatColumns,"0"),formatRows:a(A.formatRows,"0"),insertColumns:a(A.insertColumns,"0"),insertRows:a(A.insertRows,"0"),insertHyperlinks:a(A.insertHyperlinks,"0"),deleteColumns:a(A.deleteColumns,"0"),deleteRows:a(A.deleteRows,"0"),sort:a(A.sort,"0"),autoFilter:a(A.autoFilter,"0"),pivotTables:a(A.pivotTables,"0")};A.sheet&&(h.algorithmName=A.algorithmName,h.hashValue=A.hashValue,h.saltValue=A.saltValue,h.spinCount=A.spinCount,h.objects=a(A.objects===!1,"1"),h.scenarios=a(A.scenarios===!1,"1")),n.some(h,function(f){return f!==void 0})&&l.leafNode(this.tag,h)}}},{key:"parseOpen",value:function(l){return l.name===this.tag&&(this.model={sheet:s(l.attributes.sheet,"1"),objects:l.attributes.objects!=="1"&&void 0,scenarios:l.attributes.scenarios!=="1"&&void 0,selectLockedCells:l.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:l.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:s(l.attributes.formatCells,"0"),formatColumns:s(l.attributes.formatColumns,"0"),formatRows:s(l.attributes.formatRows,"0"),insertColumns:s(l.attributes.insertColumns,"0"),insertRows:s(l.attributes.insertRows,"0"),insertHyperlinks:s(l.attributes.insertHyperlinks,"0"),deleteColumns:s(l.attributes.deleteColumns,"0"),deleteRows:s(l.attributes.deleteRows,"0"),sort:s(l.attributes.sort,"0"),autoFilter:s(l.attributes.autoFilter,"0"),pivotTables:s(l.attributes.pivotTables,"0")},l.attributes.algorithmName&&(this.model.algorithmName=l.attributes.algorithmName,this.model.hashValue=l.attributes.hashValue,this.model.saltValue=l.attributes.saltValue,this.model.spinCount=parseInt(l.attributes.spinCount,10)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),u}(e("../base-xform"));r.exports=o},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,r,t){var n=e("../../../utils/col-cache"),a=e("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"},o=function(i){Mt(u,i);var c=ir(u);function u(){return Fe(this,u),c.apply(this,arguments)}return Le(u,[{key:"tag",get:function(){return"sheetView"}},{key:"prepare",value:function(l){switch(l.state){case"frozen":case"split":break;default:l.state="normal"}}},{key:"render",value:function(l,A){l.openNode("sheetView",{workbookViewId:A.workbookViewId||0});var h,f,d,g,p=function(m,v,y){y&&l.addAttribute(m,v)};switch(p("rightToLeft","1",A.rightToLeft===!0),p("tabSelected","1",A.tabSelected),p("showRuler","0",A.showRuler===!1),p("showRowColHeaders","0",A.showRowColHeaders===!1),p("showGridLines","0",A.showGridLines===!1),p("zoomScale",A.zoomScale,A.zoomScale),p("zoomScaleNormal",A.zoomScaleNormal,A.zoomScaleNormal),p("view",A.style,A.style),A.state){case"frozen":f=A.xSplit||0,d=A.ySplit||0,h=A.topLeftCell||n.getAddress(d+1,f+1).address,g=(A.xSplit&&A.ySplit?"bottomRight":A.xSplit&&"topRight")||"bottomLeft",l.leafNode("pane",{xSplit:A.xSplit||void 0,ySplit:A.ySplit||void 0,topLeftCell:h,activePane:g,state:"frozen"}),l.leafNode("selection",{pane:g,activeCell:A.activeCell,sqref:A.activeCell});break;case"split":A.activePane==="topLeft"&&(A.activePane=void 0),l.leafNode("pane",{xSplit:A.xSplit||void 0,ySplit:A.ySplit||void 0,topLeftCell:A.topLeftCell,activePane:A.activePane}),l.leafNode("selection",{pane:A.activePane,activeCell:A.activeCell,sqref:A.activeCell});break;case"normal":A.activeCell&&l.leafNode("selection",{activeCell:A.activeCell,sqref:A.activeCell})}l.closeNode()}},{key:"parseOpen",value:function(l){switch(l.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(l.attributes.workbookViewId,10),rightToLeft:l.attributes.rightToLeft==="1",tabSelected:l.attributes.tabSelected==="1",showRuler:l.attributes.showRuler!=="0",showRowColHeaders:l.attributes.showRowColHeaders!=="0",showGridLines:l.attributes.showGridLines!=="0",zoomScale:parseInt(l.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(l.attributes.zoomScaleNormal||"100",10),style:l.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(l.attributes.xSplit||"0",10),ySplit:parseInt(l.attributes.ySplit||"0",10),topLeftCell:l.attributes.topLeftCell,activePane:l.attributes.activePane||"topLeft",state:l.attributes.state},!0;case"selection":var A=l.attributes.pane||"topLeft";return this.selections[A]={pane:A,activeCell:l.attributes.activeCell},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(l){var A,h;return l!=="sheetView"||(this.sheetView&&this.pane?(A=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(A.activePane=this.pane.activePane),(h=this.selections[this.pane.activePane])&&h.activeCell&&(A.activeCell=h.activeCell),this.sheetView.style&&(A.style=this.sheetView.style)):(A=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},(h=this.selections.topLeft)&&h.activeCell&&(A.activeCell=h.activeCell),this.sheetView.style&&(A.style=this.sheetView.style)),!1)}},{key:"reconcile",value:function(){}}]),u}(a);r.exports=o},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"tablePart"}},{key:"render",value:function(i,c){c&&i.leafNode(this.tag,{"r:id":c.rId})}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.model={rId:i.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],115:[function(e,r,t){var n=e("../../../utils/under-dash"),a=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),o=e("../../rel-type"),i=e("./merges"),c=e("../base-xform"),u=e("../list-xform"),l=e("./row-xform"),A=e("./col-xform"),h=e("./dimension-xform"),f=e("./hyperlink-xform"),d=e("./merge-cell-xform"),g=e("./data-validations-xform"),p=e("./sheet-properties-xform"),m=e("./sheet-format-properties-xform"),v=e("./sheet-view-xform"),y=e("./sheet-protection-xform"),I=e("./page-margins-xform"),E=e("./page-setup-xform"),k=e("./print-options-xform"),R=e("./auto-filter-xform"),T=e("./picture-xform"),j=e("./drawing-xform"),W=e("./table-part-xform"),H=e("./row-breaks-xform"),X=e("./header-footer-xform"),x=e("./cf/conditional-formattings-xform"),N=e("./ext-lst-xform"),C=function(B,S){Object.keys(S).forEach(function(O){var F=B[O],Y=S[O];F===void 0&&Y!==void 0&&(B[O]=Y)})},w=function(B,S){if(!S||!S.length)return B;if(!B||!B.length)return S;var O={},F={};return B.forEach(function(Y){O[Y.ref]=Y,Y.rules.forEach(function(M){var z=M.x14Id;z&&(F[z]=M)})}),S.forEach(function(Y){Y.rules.forEach(function(M){var z=F[M.x14Id];z?C(z,M):O[Y.ref]?O[Y.ref].rules.push(M):B.push({ref:Y.ref,rules:[M]})})}),B},Q=function(B){Mt(O,B);var S=ir(O);function O(F){var Y;Fe(this,O),Y=S.call(this);var M=F||{},z=M.maxRows,ue=M.maxCols,ae=M.ignoreNodes;return Y.ignoreNodes=ae||[],Y.map={sheetPr:new p,dimension:new h,sheetViews:new u({tag:"sheetViews",count:!1,childXform:new v}),sheetFormatPr:new m,cols:new u({tag:"cols",count:!1,childXform:new A}),sheetData:new u({tag:"sheetData",count:!1,empty:!0,childXform:new l({maxItems:ue}),maxItems:z}),autoFilter:new R,mergeCells:new u({tag:"mergeCells",count:!0,childXform:new d}),rowBreaks:new H,hyperlinks:new u({tag:"hyperlinks",count:!1,childXform:new f}),pageMargins:new I,dataValidations:new g,pageSetup:new E,headerFooter:new X,printOptions:new k,picture:new T,drawing:new j,sheetProtection:new y,tableParts:new u({tag:"tableParts",count:!0,childXform:new W}),conditionalFormatting:new x,extLst:new N},Y}return Le(O,[{key:"prepare",value:function(F,Y){var M=this;Y.merges=new i,F.hyperlinks=Y.hyperlinks=[],F.comments=Y.comments=[],Y.formulae={},Y.siFormulae=0,this.map.cols.prepare(F.cols,Y),this.map.sheetData.prepare(F.rows,Y),this.map.conditionalFormatting.prepare(F.conditionalFormattings,Y),F.mergeCells=Y.merges.mergeCells;var z=F.rels=[];function ue(Ae){return"rId".concat(Ae.length+1)}if(F.hyperlinks.forEach(function(Ae){var te=ue(z);Ae.rId=te,z.push({Id:te,Type:o.Hyperlink,Target:Ae.target,TargetMode:"External"})}),F.comments.length>0){var ae={Id:ue(z),Type:o.Comments,Target:"../comments".concat(F.id,".xml")};z.push(ae);var Ne={Id:ue(z),Type:o.VmlDrawing,Target:"../drawings/vmlDrawing".concat(F.id,".vml")};z.push(Ne),F.comments.forEach(function(Ae){Ae.refAddress=a.decodeAddress(Ae.ref)}),Y.commentRefs.push({commentName:"comments".concat(F.id),vmlDrawing:"vmlDrawing".concat(F.id)})}var Ge,Ye=[];F.media.forEach(function(Ae){if(Ae.type==="background"){var te=ue(z);Ge=Y.media[Ae.imageId],z.push({Id:te,Type:o.Image,Target:"../media/".concat(Ge.name,".").concat(Ge.extension)}),F.background={rId:te},F.image=Y.media[Ae.imageId]}else if(Ae.type==="image"){var he=F.drawing;Ge=Y.media[Ae.imageId],he||(he=F.drawing={rId:ue(z),name:"drawing".concat(++Y.drawingsCount),anchors:[],rels:[]},Y.drawings.push(he),z.push({Id:he.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/".concat(he.name,".xml")}));var de=M.preImageId===Ae.imageId?Ye[Ae.imageId]:Ye[he.rels.length];de||(de=ue(he.rels),Ye[he.rels.length]=de,he.rels.push({Id:de,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/".concat(Ge.name,".").concat(Ge.extension)}));var Ke={picture:{rId:de},range:Ae.range};if(Ae.hyperlinks&&Ae.hyperlinks.hyperlink){var le=ue(he.rels);Ye[he.rels.length]=le,Ke.picture.hyperlinks={tooltip:Ae.hyperlinks.tooltip,rId:le},he.rels.push({Id:le,Type:o.Hyperlink,Target:Ae.hyperlinks.hyperlink,TargetMode:"External"})}M.preImageId=Ae.imageId,he.anchors.push(Ke)}}),F.tables.forEach(function(Ae){var te=ue(z);Ae.rId=te,z.push({Id:te,Type:o.Table,Target:"../tables/".concat(Ae.target)}),Ae.columns.forEach(function(he){var de=he.style;de&&(he.dxfId=Y.styles.addDxfStyle(de))})}),this.map.extLst.prepare(F,Y)}},{key:"render",value:function(F,Y){F.openXml(s.StdDocAttributes),F.openNode("worksheet",O.WORKSHEET_ATTRIBUTES);var M=Y.properties?{defaultRowHeight:Y.properties.defaultRowHeight,dyDescent:Y.properties.dyDescent,outlineLevelCol:Y.properties.outlineLevelCol,outlineLevelRow:Y.properties.outlineLevelRow}:void 0;Y.properties&&Y.properties.defaultColWidth&&(M.defaultColWidth=Y.properties.defaultColWidth);var z={outlineProperties:Y.properties&&Y.properties.outlineProperties,tabColor:Y.properties&&Y.properties.tabColor,pageSetup:Y.pageSetup&&Y.pageSetup.fitToPage?{fitToPage:Y.pageSetup.fitToPage}:void 0},ue=Y.pageSetup&&Y.pageSetup.margins,ae={showRowColHeaders:Y.pageSetup&&Y.pageSetup.showRowColHeaders,showGridLines:Y.pageSetup&&Y.pageSetup.showGridLines,horizontalCentered:Y.pageSetup&&Y.pageSetup.horizontalCentered,verticalCentered:Y.pageSetup&&Y.pageSetup.verticalCentered},Ne=Y.sheetProtection;this.map.sheetPr.render(F,z),this.map.dimension.render(F,Y.dimensions),this.map.sheetViews.render(F,Y.views),this.map.sheetFormatPr.render(F,M),this.map.cols.render(F,Y.cols),this.map.sheetData.render(F,Y.rows),this.map.sheetProtection.render(F,Ne),this.map.autoFilter.render(F,Y.autoFilter),this.map.mergeCells.render(F,Y.mergeCells),this.map.conditionalFormatting.render(F,Y.conditionalFormattings),this.map.dataValidations.render(F,Y.dataValidations),this.map.hyperlinks.render(F,Y.hyperlinks),this.map.printOptions.render(F,ae),this.map.pageMargins.render(F,ue),this.map.pageSetup.render(F,Y.pageSetup),this.map.headerFooter.render(F,Y.headerFooter),this.map.rowBreaks.render(F,Y.rowBreaks),this.map.drawing.render(F,Y.drawing),this.map.picture.render(F,Y.background),this.map.tableParts.render(F,Y.tables),this.map.extLst.render(F,Y),Y.rels&&Y.rels.forEach(function(Ge){Ge.Type===o.VmlDrawing&&F.leafNode("legacyDrawing",{"r:id":Ge.Id})}),F.closeNode()}},{key:"parseOpen",value:function(F){return this.parser?(this.parser.parseOpen(F),!0):F.name==="worksheet"?(n.each(this.map,function(Y){Y.reset()}),!0):(this.map[F.name]&&!this.ignoreNodes.includes(F.name)&&(this.parser=this.map[F.name],this.parser.parseOpen(F)),!0)}},{key:"parseText",value:function(F){this.parser&&this.parser.parseText(F)}},{key:"parseClose",value:function(F){if(this.parser)return this.parser.parseClose(F)||(this.parser=void 0),!0;if(F==="worksheet"){var Y=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(Y.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(Y.outlineProperties=this.map.sheetPr.model.outlineProperties);var M={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},z=Object.assign(M,this.map.pageSetup.model,this.map.printOptions.model),ue=w(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:Y,views:this.map.sheetViews.model,pageSetup:z,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:ue},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}return!0}},{key:"reconcile",value:function(F,Y){var M=(F.relationships||[]).reduce(function(Ye,Ae){if(Ye[Ae.Id]=Ae,Ae.Type===o.Comments&&(F.comments=Y.comments[Ae.Target].comments),Ae.Type===o.VmlDrawing&&F.comments&&F.comments.length){var te=Y.vmlDrawings[Ae.Target].comments;F.comments.forEach(function(he,de){he.note=Object.assign({},he.note,te[de])})}return Ye},{});if(Y.commentsMap=(F.comments||[]).reduce(function(Ye,Ae){return Ae.ref&&(Ye[Ae.ref]=Ae),Ye},{}),Y.hyperlinkMap=(F.hyperlinks||[]).reduce(function(Ye,Ae){return Ae.rId&&(Ye[Ae.address]=M[Ae.rId].Target),Ye},{}),Y.formulae={},F.rows=F.rows&&F.rows.filter(Boolean)||[],F.rows.forEach(function(Ye){Ye.cells=Ye.cells&&Ye.cells.filter(Boolean)||[]}),this.map.cols.reconcile(F.cols,Y),this.map.sheetData.reconcile(F.rows,Y),this.map.conditionalFormatting.reconcile(F.conditionalFormattings,Y),F.media=[],F.drawing){var z=M[F.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(z){var ue=z[1];Y.drawings[ue].anchors.forEach(function(Ye){if(Ye.medium){var Ae={type:"image",imageId:Ye.medium.index,range:Ye.range,hyperlinks:Ye.picture.hyperlinks};F.media.push(Ae)}})}}var ae=F.background&&M[F.background.rId];if(ae){var Ne=ae.Target.split("/media/")[1],Ge=Y.mediaIndex&&Y.mediaIndex[Ne];Ge!==void 0&&F.media.push({type:"background",imageId:Ge})}F.tables=(F.tables||[]).map(function(Ye){var Ae=M[Ye.rId];return Y.tables[Ae.Target]}),delete F.relationships,delete F.hyperlinks,delete F.comments}}]),O}(c);Q.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},r.exports=Q},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this)).tag=i.tag,c.attr=i.attr,c}return Le(o,[{key:"render",value:function(i,c){c&&(i.openNode(this.tag),i.closeNode())}},{key:"parseOpen",value:function(i){i.name===this.tag&&(this.model=!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],117:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this)).tag=i.tag,c.attr=i.attr,c.attrs=i.attrs,c._format=i.format||function(u){try{return Number.isNaN(u.getTime())?"":u.toISOString()}catch{return""}},c._parse=i.parse||function(u){return new Date(u)},c}return Le(o,[{key:"render",value:function(i,c){c&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,this._format(c)):i.writeText(this._format(c)),i.closeNode())}},{key:"parseOpen",value:function(i){i.name===this.tag&&(this.attr?this.model=this._parse(i.attributes[this.attr]):this.text=[])}},{key:"parseText",value:function(i){this.attr||this.text.push(i)}},{key:"parseClose",value:function(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],118:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this)).tag=i.tag,c.attr=i.attr,c.attrs=i.attrs,c.zero=i.zero,c}return Le(o,[{key:"render",value:function(i,c){(c||this.zero)&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,c):i.writeText(c),i.closeNode())}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.attr?this.model=parseInt(i.attributes[this.attr],10):this.text=[],!0)}},{key:"parseText",value:function(i){this.attr||this.text.push(i)}},{key:"parseClose",value:function(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],119:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this)).tag=i.tag,c.attr=i.attr,c.attrs=i.attrs,c}return Le(o,[{key:"render",value:function(i,c){c!==void 0&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,c):i.writeText(c),i.closeNode())}},{key:"parseOpen",value:function(i){i.name===this.tag&&(this.attr?this.model=i.attributes[this.attr]:this.text=[])}},{key:"parseText",value:function(i){this.attr||this.text.push(i)}},{key:"parseClose",value:function(){return this.attr||(this.model=this.text.join("")),!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],120:[function(e,r,t){var n=e("./base-xform"),a=e("../../utils/xml-stream");function s(i,c){i.openNode(c.tag,c.$),c.c&&c.c.forEach(function(u){s(i,u)}),c.t&&i.writeText(c.t),i.closeNode()}var o=function(i){Mt(u,i);var c=ir(u);function u(l){var A;return Fe(this,u),(A=c.call(this))._model=l,A}return Le(u,[{key:"render",value:function(l){if(!this._xml){var A=new a;s(A,this._model),this._xml=A.xml}l.writeXml(this._xml)}},{key:"parseOpen",value:function(){return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(l){return l!==this._model.tag}}]),u}(n);r.exports=o},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,r,t){var n=e("./text-xform"),a=e("./rich-text-xform"),s=function(o){Mt(c,o);var i=ir(c);function c(){var u;return Fe(this,c),(u=i.call(this)).map={r:new a,t:new n},u}return Le(c,[{key:"tag",get:function(){return"rPh"}},{key:"render",value:function(u,l){if(u.openNode(this.tag,{sb:l.sb||0,eb:l.eb||0}),l&&l.hasOwnProperty("richText")&&l.richText){var A=this.map.r;l.richText.forEach(function(h){A.render(u,h)})}else l&&this.map.t.render(u,l.text);u.closeNode()}},{key:"parseOpen",value:function(u){var l=u.name;return this.parser?(this.parser.parseOpen(u),!0):l===this.tag?(this.model={sb:parseInt(u.attributes.sb,10),eb:parseInt(u.attributes.eb,10)},!0):(this.parser=this.map[l],!!this.parser&&(this.parser.parseOpen(u),!0))}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser){if(!this.parser.parseClose(u)){switch(u){case"r":var l=this.model.richText;l||(l=this.model.richText=[]),l.push(this.parser.model);break;case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}return u!==this.tag}}]),c}(e("../base-xform"));r.exports=s},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,r,t){var n=e("./text-xform"),a=e("../style/font-xform"),s=function(o){Mt(c,o);var i=ir(c);function c(u){var l;return Fe(this,c),(l=i.call(this)).model=u,l}return Le(c,[{key:"tag",get:function(){return"r"}},{key:"textXform",get:function(){return this._textXform||(this._textXform=new n)}},{key:"fontXform",get:function(){return this._fontXform||(this._fontXform=new a(c.FONT_OPTIONS))}},{key:"render",value:function(u,l){l=l||this.model,u.openNode("r"),l.font&&this.fontXform.render(u,l.font),this.textXform.render(u,l.text),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(u),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(u),!0;default:return!1}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){switch(u){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}}]),c}(e("../base-xform"));s.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},r.exports=s},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,r,t){var n=e("./text-xform"),a=e("./rich-text-xform"),s=e("./phonetic-text-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(l){var A;return Fe(this,u),(A=c.call(this)).model=l,A.map={r:new a,t:new n,rPh:new s},A}return Le(u,[{key:"tag",get:function(){return"si"}},{key:"render",value:function(l,A){var h=this;l.openNode(this.tag),A&&A.hasOwnProperty("richText")&&A.richText?A.richText.length?A.richText.forEach(function(f){h.map.r.render(l,f)}):this.map.t.render(l,""):A!=null&&this.map.t.render(l,A),l.closeNode()}},{key:"parseOpen",value:function(l){var A=l.name;return this.parser?(this.parser.parseOpen(l),!0):A===this.tag?(this.model={},!0):(this.parser=this.map[A],!!this.parser&&(this.parser.parseOpen(l),!0))}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){if(this.parser){if(!this.parser.parseClose(l)){switch(l){case"r":var A=this.model.richText;A||(A=this.model.richText=[]),A.push(this.parser.model);break;case"t":this.model=this.parser.model}this.parser=void 0}return!0}return l!==this.tag}}]),u}(e("../base-xform"));r.exports=o},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,r,t){var n=e("../../../utils/xml-stream"),a=e("../base-xform"),s=e("./shared-string-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(l){var A;return Fe(this,u),(A=c.call(this)).model=l||{values:[],count:0},A.hash=Object.create(null),A.rich=Object.create(null),A}return Le(u,[{key:"sharedStringXform",get:function(){return this._sharedStringXform||(this._sharedStringXform=new s)}},{key:"values",get:function(){return this.model.values}},{key:"uniqueCount",get:function(){return this.model.values.length}},{key:"count",get:function(){return this.model.count}},{key:"getString",value:function(l){return this.model.values[l]}},{key:"add",value:function(l){return l.richText?this.addRichText(l):this.addText(l)}},{key:"addText",value:function(l){var A=this.hash[l];return A===void 0&&(A=this.hash[l]=this.model.values.length,this.model.values.push(l)),this.model.count++,A}},{key:"addRichText",value:function(l){var A=this.sharedStringXform.toXml(l),h=this.rich[A];return h===void 0&&(h=this.rich[A]=this.model.values.length,this.model.values.push(l)),this.model.count++,h}},{key:"render",value:function(l,A){A=A||this._values,l.openXml(n.StdDocAttributes),l.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:A.count,uniqueCount:A.values.length});var h=this.sharedStringXform;A.values.forEach(function(f){h.render(l,f)}),l.closeNode()}},{key:"parseOpen",value:function(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(l),!0;default:throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(l)))}}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){if(this.parser)return this.parser.parseClose(l)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;if(l==="sst")return!1;throw new Error("Unexpected xml node in parseClose: ".concat(l))}}]),u}(a);r.exports=o},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"t"}},{key:"render",value:function(i,c){i.openNode("t"),/^\s|\n|\s$/.test(c)&&i.addAttribute("xml:space","preserve"),i.writeText(c),i.closeNode()}},{key:"model",get:function(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,function(i,c){return String.fromCharCode(parseInt(c,16))})}},{key:"parseOpen",value:function(i){return i.name==="t"&&(this._text=[],!0)}},{key:"parseText",value:function(i){this._text.push(i)}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],126:[function(e,r,t){var n=e("../../../doc/enums"),a=e("../../../utils/utils"),s=e("../base-xform"),o={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce(function(u,l){return u[l]=!0,u},{}),horizontal:function(u){return this.horizontalValues[u]?u:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce(function(u,l){return u[l]=!0,u},{}),vertical:function(u){return u==="middle"?"center":this.verticalValues[u]?u:void 0},wrapText:function(u){return!!u||void 0},shrinkToFit:function(u){return!!u||void 0},textRotation:function(u){return u==="vertical"||(u=a.validInt(u))>=-90&&u<=90?u:void 0},indent:function(u){return u=a.validInt(u),Math.max(0,u)},readingOrder:function(u){switch(u){case"ltr":return n.ReadingOrder.LeftToRight;case"rtl":return n.ReadingOrder.RightToLeft;default:return}}},i={toXml:function(u){if(u=o.textRotation(u)){if(u==="vertical")return 255;var l=Math.round(u);if(l>=0&&l<=90)return l;if(l<0&&l>=-90)return 90-l}},toModel:function(u){var l=a.validInt(u);if(l!==void 0){if(l===255)return"vertical";if(l>=0&&l<=90)return l;if(l>90&&l<=180)return 90-l}}},c=function(u){Mt(A,u);var l=ir(A);function A(){return Fe(this,A),l.apply(this,arguments)}return Le(A,[{key:"tag",get:function(){return"alignment"}},{key:"render",value:function(h,f){h.addRollback(),h.openNode("alignment");var d=!1;function g(p,m){m&&(h.addAttribute(p,m),d=!0)}g("horizontal",o.horizontal(f.horizontal)),g("vertical",o.vertical(f.vertical)),g("wrapText",!!o.wrapText(f.wrapText)&&"1"),g("shrinkToFit",!!o.shrinkToFit(f.shrinkToFit)&&"1"),g("indent",o.indent(f.indent)),g("textRotation",i.toXml(f.textRotation)),g("readingOrder",o.readingOrder(f.readingOrder)),h.closeNode(),d?h.commit():h.rollback()}},{key:"parseOpen",value:function(h){var f={},d=!1;function g(p,m,v){p&&(f[m]=v,d=!0)}g(h.attributes.horizontal,"horizontal",h.attributes.horizontal),g(h.attributes.vertical,"vertical",h.attributes.vertical==="center"?"middle":h.attributes.vertical),g(h.attributes.wrapText,"wrapText",a.parseBoolean(h.attributes.wrapText)),g(h.attributes.shrinkToFit,"shrinkToFit",a.parseBoolean(h.attributes.shrinkToFit)),g(h.attributes.indent,"indent",parseInt(h.attributes.indent,10)),g(h.attributes.textRotation,"textRotation",i.toModel(h.attributes.textRotation)),g(h.attributes.readingOrder,"readingOrder",h.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=d?f:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),A}(s);r.exports=c},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,r,t){var n=e("../base-xform"),a=e("../../../utils/utils"),s=e("./color-xform"),o=function(c){Mt(l,c);var u=ir(l);function l(A){var h;return Fe(this,l),(h=u.call(this)).name=A,h.map={color:new s},h}return Le(l,[{key:"tag",get:function(){return this.name}},{key:"render",value:function(A,h,f){var d=h&&h.color||f||this.defaultColor;A.openNode(this.name),h&&h.style&&(A.addAttribute("style",h.style),d&&this.map.color.render(A,d)),A.closeNode()}},{key:"parseOpen",value:function(A){if(this.parser)return this.parser.parseOpen(A),!0;switch(A.name){case this.name:var h=A.attributes.style;return this.model=h?{style:h}:void 0,!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(A),!0;default:return!1}}},{key:"parseText",value:function(A){this.parser&&this.parser.parseText(A)}},{key:"parseClose",value:function(A){return this.parser?(this.parser.parseClose(A)||(this.parser=void 0),!0):(A===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}},{key:"validStyle",value:function(A){return l.validStyleValues[A]}}]),l}(n);o.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce(function(c,u){return c[u]=!0,c},{});var i=function(c){Mt(l,c);var u=ir(l);function l(){var A;return Fe(this,l),(A=u.call(this)).map={top:new o("top"),left:new o("left"),bottom:new o("bottom"),right:new o("right"),diagonal:new o("diagonal")},A}return Le(l,[{key:"render",value:function(A,h){var f=h.color;function d(g,p){g&&!g.color&&h.color&&(g=bo(bo({},g),{},{color:h.color})),p.render(A,g,f)}A.openNode("border"),h.diagonal&&h.diagonal.style&&(h.diagonal.up&&A.addAttribute("diagonalUp","1"),h.diagonal.down&&A.addAttribute("diagonalDown","1")),d(h.left,this.map.left),d(h.right,this.map.right),d(h.top,this.map.top),d(h.bottom,this.map.bottom),d(h.diagonal,this.map.diagonal),A.closeNode()}},{key:"parseOpen",value:function(A){return this.parser?(this.parser.parseOpen(A),!0):A.name==="border"?(this.reset(),this.diagonalUp=a.parseBoolean(A.attributes.diagonalUp),this.diagonalDown=a.parseBoolean(A.attributes.diagonalDown),!0):(this.parser=this.map[A.name],!!this.parser&&(this.parser.parseOpen(A),!0))}},{key:"parseText",value:function(A){this.parser&&this.parser.parseText(A)}},{key:"parseClose",value:function(A){if(this.parser)return this.parser.parseClose(A)||(this.parser=void 0),!0;if(A==="border"){var h=this.model={},f=function(d,g,p){g&&(p&&Object.assign(g,p),h[d]=g)};f("left",this.map.left.model),f("right",this.map.right.model),f("top",this.map.top.model),f("bottom",this.map.bottom.model),f("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}]),l}(n);r.exports=i},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this)).name=i||"color",c}return Le(o,[{key:"tag",get:function(){return this.name}},{key:"render",value:function(i,c){return!!c&&(i.openNode(this.name),c.argb?i.addAttribute("rgb",c.argb):c.theme!==void 0?(i.addAttribute("theme",c.theme),c.tint!==void 0&&i.addAttribute("tint",c.tint)):c.indexed!==void 0?i.addAttribute("indexed",c.indexed):i.addAttribute("auto","1"),i.closeNode(),!0)}},{key:"parseOpen",value:function(i){return i.name===this.name&&(i.attributes.rgb?this.model={argb:i.attributes.rgb}:i.attributes.theme?(this.model={theme:parseInt(i.attributes.theme,10)},i.attributes.tint&&(this.model.tint=parseFloat(i.attributes.tint))):i.attributes.indexed?this.model={indexed:parseInt(i.attributes.indexed,10)}:this.model=void 0,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],129:[function(e,r,t){var n=e("../base-xform"),a=e("./alignment-xform"),s=e("./border-xform"),o=e("./fill-xform"),i=e("./font-xform"),c=e("./numfmt-xform"),u=e("./protection-xform"),l=function(A){Mt(f,A);var h=ir(f);function f(){var d;return Fe(this,f),(d=h.call(this)).map={alignment:new a,border:new s,fill:new o,font:new i,numFmt:new c,protection:new u},d}return Le(f,[{key:"tag",get:function(){return"dxf"}},{key:"render",value:function(d,g){if(d.openNode(this.tag),g.font&&this.map.font.render(d,g.font),g.numFmt&&g.numFmtId){var p={id:g.numFmtId,formatCode:g.numFmt};this.map.numFmt.render(d,p)}g.fill&&this.map.fill.render(d,g.fill),g.alignment&&this.map.alignment.render(d,g.alignment),g.border&&this.map.border.render(d,g.border),g.protection&&this.map.protection.render(d,g.protection),d.closeNode()}},{key:"parseOpen",value:function(d){return this.parser?(this.parser.parseOpen(d),!0):d.name===this.tag?(this.reset(),!0):(this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d),!0)}},{key:"parseText",value:function(d){this.parser&&this.parser.parseText(d)}},{key:"parseClose",value:function(d){return this.parser?(this.parser.parseClose(d)||(this.parser=void 0),!0):d!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}]),f}(n);r.exports=l},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(e,r,t){var n=e("../base-xform"),a=e("./color-xform"),s=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={color:new a},h}return Le(A,[{key:"tag",get:function(){return"stop"}},{key:"render",value:function(h,f){h.openNode("stop"),h.addAttribute("position",f.position),this.map.color.render(h,f.color),h.closeNode()}},{key:"parseOpen",value:function(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case"stop":return this.model={position:parseFloat(h.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(h),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(h){return!!this.parser&&(this.parser.parseClose(h)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}]),A}(n),o=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={fgColor:new a("fgColor"),bgColor:new a("bgColor")},h}return Le(A,[{key:"name",get:function(){return"pattern"}},{key:"tag",get:function(){return"patternFill"}},{key:"render",value:function(h,f){h.openNode("patternFill"),h.addAttribute("patternType",f.pattern),f.fgColor&&this.map.fgColor.render(h,f.fgColor),f.bgColor&&this.map.bgColor.render(h,f.bgColor),h.closeNode()}},{key:"parseOpen",value:function(h){return this.parser?(this.parser.parseOpen(h),!0):h.name==="patternFill"?(this.model={type:"pattern",pattern:h.attributes.patternType},!0):(this.parser=this.map[h.name],!!this.parser&&(this.parser.parseOpen(h),!0))}},{key:"parseText",value:function(h){this.parser&&this.parser.parseText(h)}},{key:"parseClose",value:function(h){return!!this.parser&&(this.parser.parseClose(h)||(this.parser.model&&(this.model[h]=this.parser.model),this.parser=void 0),!0)}}]),A}(n),i=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={stop:new s},h}return Le(A,[{key:"name",get:function(){return"gradient"}},{key:"tag",get:function(){return"gradientFill"}},{key:"render",value:function(h,f){switch(h.openNode("gradientFill"),f.gradient){case"angle":h.addAttribute("degree",f.degree);break;case"path":h.addAttribute("type","path"),f.center.left&&(h.addAttribute("left",f.center.left),f.center.right===void 0&&h.addAttribute("right",f.center.left)),f.center.right&&h.addAttribute("right",f.center.right),f.center.top&&(h.addAttribute("top",f.center.top),f.center.bottom===void 0&&h.addAttribute("bottom",f.center.top)),f.center.bottom&&h.addAttribute("bottom",f.center.bottom)}var d=this.map.stop;f.stops.forEach(function(g){d.render(h,g)}),h.closeNode()}},{key:"parseOpen",value:function(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case"gradientFill":var f=this.model={stops:[]};return h.attributes.degree?(f.gradient="angle",f.degree=parseInt(h.attributes.degree,10)):h.attributes.type==="path"&&(f.gradient="path",f.center={left:h.attributes.left?parseFloat(h.attributes.left):0,top:h.attributes.top?parseFloat(h.attributes.top):0},h.attributes.right!==h.attributes.left&&(f.center.right=h.attributes.right?parseFloat(h.attributes.right):0),h.attributes.bottom!==h.attributes.top&&(f.center.bottom=h.attributes.bottom?parseFloat(h.attributes.bottom):0)),!0;case"stop":return this.parser=this.map.stop,this.parser.parseOpen(h),!0;default:return!1}}},{key:"parseText",value:function(h){this.parser&&this.parser.parseText(h)}},{key:"parseClose",value:function(h){return!!this.parser&&(this.parser.parseClose(h)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}]),A}(n),c=function(u){Mt(A,u);var l=ir(A);function A(){var h;return Fe(this,A),(h=l.call(this)).map={patternFill:new o,gradientFill:new i},h}return Le(A,[{key:"tag",get:function(){return"fill"}},{key:"render",value:function(h,f){switch(h.addRollback(),h.openNode("fill"),f.type){case"pattern":this.map.patternFill.render(h,f);break;case"gradient":this.map.gradientFill.render(h,f);break;default:return void h.rollback()}h.closeNode(),h.commit()}},{key:"parseOpen",value:function(h){return this.parser?(this.parser.parseOpen(h),!0):h.name==="fill"?(this.model={},!0):(this.parser=this.map[h.name],!!this.parser&&(this.parser.parseOpen(h),!0))}},{key:"parseText",value:function(h){this.parser&&this.parser.parseText(h)}},{key:"parseClose",value:function(h){return!!this.parser&&(this.parser.parseClose(h)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}},{key:"validStyle",value:function(h){return A.validPatternValues[h]}}]),A}(n);c.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce(function(u,l){return u[l]=!0,u},{}),c.StopXform=s,c.PatternFillXform=o,c.GradientFillXform=i,r.exports=c},{"../base-xform":32,"./color-xform":128}],131:[function(e,r,t){var n=e("./color-xform"),a=e("../simple/boolean-xform"),s=e("../simple/integer-xform"),o=e("../simple/string-xform"),i=e("./underline-xform"),c=e("../../../utils/under-dash"),u=function(l){Mt(h,l);var A=ir(h);function h(f){var d;return Fe(this,h),(d=A.call(this)).options=f||h.OPTIONS,d.map={b:{prop:"bold",xform:new a({tag:"b",attr:"val"})},i:{prop:"italic",xform:new a({tag:"i",attr:"val"})},u:{prop:"underline",xform:new i},charset:{prop:"charset",xform:new s({tag:"charset",attr:"val"})},color:{prop:"color",xform:new n},condense:{prop:"condense",xform:new a({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new a({tag:"extend",attr:"val"})},family:{prop:"family",xform:new s({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new a({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new o({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new o({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new a({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new a({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new s({tag:"sz",attr:"val"})}},d.map[d.options.fontNameTag]={prop:"name",xform:new o({tag:d.options.fontNameTag,attr:"val"})},d}return Le(h,[{key:"tag",get:function(){return this.options.tagName}},{key:"render",value:function(f,d){var g=this.map;f.openNode(this.options.tagName),c.each(this.map,function(p,m){g[m].xform.render(f,d[p.prop])}),f.closeNode()}},{key:"parseOpen",value:function(f){return this.parser?(this.parser.parseOpen(f),!0):this.map[f.name]?(this.parser=this.map[f.name].xform,this.parser.parseOpen(f)):f.name===this.options.tagName&&(this.model={},!0)}},{key:"parseText",value:function(f){this.parser&&this.parser.parseText(f)}},{key:"parseClose",value:function(f){if(this.parser&&!this.parser.parseClose(f)){var d=this.map[f];return this.parser.model&&(this.model[d.prop]=this.parser.model),this.parser=void 0,!0}return f!==this.options.tagName}}]),h}(e("../base-xform"));u.OPTIONS={tagName:"font",fontNameTag:"name"},r.exports=u},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(e,r,t){var n=e("../../../utils/under-dash"),a=e("../../defaultnumformats"),s=e("../base-xform");function o(){var u={};return n.each(a,function(l,A){l.f&&(u[l.f]=parseInt(A,10))}),u}var i=o(),c=function(u){Mt(A,u);var l=ir(A);function A(h,f){var d;return Fe(this,A),(d=l.call(this)).id=h,d.formatCode=f,d}return Le(A,[{key:"tag",get:function(){return"numFmt"}},{key:"render",value:function(h,f){h.leafNode("numFmt",{numFmtId:f.id,formatCode:f.formatCode})}},{key:"parseOpen",value:function(h){return h.name==="numFmt"&&(this.model={id:parseInt(h.attributes.numFmtId,10),formatCode:h.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),A}(s);c.getDefaultFmtId=function(u){return i[u]},c.getDefaultFmtCode=function(u){return a[u]&&a[u].f},r.exports=c},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,r,t){var n=e("../base-xform"),a={boolean:function(o,i){return o===void 0?i:o}},s=function(o){Mt(c,o);var i=ir(c);function c(){return Fe(this,c),i.apply(this,arguments)}return Le(c,[{key:"tag",get:function(){return"protection"}},{key:"render",value:function(u,l){u.addRollback(),u.openNode("protection");var A=!1;function h(f,d){d!==void 0&&(u.addAttribute(f,d),A=!0)}h("locked",a.boolean(l.locked,!0)?void 0:"0"),h("hidden",a.boolean(l.hidden,!1)?"1":void 0),u.closeNode(),A?u.commit():u.rollback()}},{key:"parseOpen",value:function(u){var l={locked:u.attributes.locked!=="0",hidden:u.attributes.hidden==="1"},A=!l.locked||l.hidden;this.model=A?l:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),c}(n);r.exports=s},{"../base-xform":32}],134:[function(e,r,t){var n=e("../base-xform"),a=e("./alignment-xform"),s=e("./protection-xform"),o=function(i){Mt(u,i);var c=ir(u);function u(l){var A;return Fe(this,u),(A=c.call(this)).xfId=!(!l||!l.xfId),A.map={alignment:new a,protection:new s},A}return Le(u,[{key:"tag",get:function(){return"xf"}},{key:"render",value:function(l,A){l.openNode("xf",{numFmtId:A.numFmtId||0,fontId:A.fontId||0,fillId:A.fillId||0,borderId:A.borderId||0}),this.xfId&&l.addAttribute("xfId",A.xfId||0),A.numFmtId&&l.addAttribute("applyNumberFormat","1"),A.fontId&&l.addAttribute("applyFont","1"),A.fillId&&l.addAttribute("applyFill","1"),A.borderId&&l.addAttribute("applyBorder","1"),A.alignment&&l.addAttribute("applyAlignment","1"),A.protection&&l.addAttribute("applyProtection","1"),A.alignment&&this.map.alignment.render(l,A.alignment),A.protection&&this.map.protection.render(l,A.protection),l.closeNode()}},{key:"parseOpen",value:function(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"xf":return this.model={numFmtId:parseInt(l.attributes.numFmtId,10),fontId:parseInt(l.attributes.fontId,10),fillId:parseInt(l.attributes.fillId,10),borderId:parseInt(l.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(l.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(l),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(l),!0;default:return!1}}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){return this.parser?(this.parser.parseClose(l)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):l!=="xf"}}]),u}(n);r.exports=o},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,r,t){var n=e("../../../doc/enums"),a=e("../../../utils/xml-stream"),s=e("../base-xform"),o=e("../static-xform"),i=e("../list-xform"),c=e("./font-xform"),u=e("./fill-xform"),l=e("./border-xform"),A=e("./numfmt-xform"),h=e("./style-xform"),f=e("./dxf-xform"),d=164,g=function(m){Mt(y,m);var v=ir(y);function y(I){var E;return Fe(this,y),(E=v.call(this)).map={numFmts:new i({tag:"numFmts",count:!0,childXform:new A}),fonts:new i({tag:"fonts",count:!0,childXform:new c,$:{"x14ac:knownFonts":1}}),fills:new i({tag:"fills",count:!0,childXform:new u}),borders:new i({tag:"borders",count:!0,childXform:new l}),cellStyleXfs:new i({tag:"cellStyleXfs",count:!0,childXform:new h}),cellXfs:new i({tag:"cellXfs",count:!0,childXform:new h({xfId:!0})}),dxfs:new i({tag:"dxfs",always:!0,count:!0,childXform:new f}),numFmt:new A,font:new c,fill:new u,border:new l,style:new h({xfId:!0}),cellStyles:y.STATIC_XFORMS.cellStyles,tableStyles:y.STATIC_XFORMS.tableStyles,extLst:y.STATIC_XFORMS.extLst},I&&E.init(),E}return Le(y,[{key:"initIndex",value:function(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}},{key:"init",value:function(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}},{key:"render",value:function(I,E){E=E||this.model,I.openXml(a.StdDocAttributes),I.openNode("styleSheet",y.STYLESHEET_ATTRIBUTES),this.index?(E.numFmts&&E.numFmts.length&&(I.openNode("numFmts",{count:E.numFmts.length}),E.numFmts.forEach(function(k){I.writeXml(k)}),I.closeNode()),E.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),I.openNode("fonts",{count:E.fonts.length,"x14ac:knownFonts":1}),E.fonts.forEach(function(k){I.writeXml(k)}),I.closeNode(),I.openNode("fills",{count:E.fills.length}),E.fills.forEach(function(k){I.writeXml(k)}),I.closeNode(),I.openNode("borders",{count:E.borders.length}),E.borders.forEach(function(k){I.writeXml(k)}),I.closeNode(),this.map.cellStyleXfs.render(I,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),I.openNode("cellXfs",{count:E.styles.length}),E.styles.forEach(function(k){I.writeXml(k)}),I.closeNode()):(this.map.numFmts.render(I,E.numFmts),this.map.fonts.render(I,E.fonts),this.map.fills.render(I,E.fills),this.map.borders.render(I,E.borders),this.map.cellStyleXfs.render(I,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(I,E.styles)),y.STATIC_XFORMS.cellStyles.render(I),this.map.dxfs.render(I,E.dxfs),y.STATIC_XFORMS.tableStyles.render(I),y.STATIC_XFORMS.extLst.render(I),I.closeNode()}},{key:"parseOpen",value:function(I){return this.parser?(this.parser.parseOpen(I),!0):I.name==="styleSheet"?(this.initIndex(),!0):(this.parser=this.map[I.name],this.parser&&this.parser.parseOpen(I),!0)}},{key:"parseText",value:function(I){this.parser&&this.parser.parseText(I)}},{key:"parseClose",value:function(I){var E=this;if(this.parser)return this.parser.parseClose(I)||(this.parser=void 0),!0;if(I==="styleSheet"){this.model={};var k=function(T,j){j.model&&j.model.length&&(E.model[T]=j.model)};if(k("numFmts",this.map.numFmts),k("fonts",this.map.fonts),k("fills",this.map.fills),k("borders",this.map.borders),k("styles",this.map.cellXfs),k("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){var R=this.index.numFmt;this.model.numFmts.forEach(function(T){R[T.id]=T.formatCode})}return!1}return!0}},{key:"addStyleModel",value:function(I,E){if(!I)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(I))return this.weakMap.get(I);var k={};if(E=E||n.ValueType.Number,I.numFmt)k.numFmtId=this._addNumFmtStr(I.numFmt);else switch(E){case n.ValueType.Number:k.numFmtId=this._addNumFmtStr("General");break;case n.ValueType.Date:k.numFmtId=this._addNumFmtStr("mm-dd-yy")}I.font&&(k.fontId=this._addFont(I.font)),I.border&&(k.borderId=this._addBorder(I.border)),I.fill&&(k.fillId=this._addFill(I.fill)),I.alignment&&(k.alignment=I.alignment),I.protection&&(k.protection=I.protection);var R=this._addStyle(k);return this.weakMap&&this.weakMap.set(I,R),R}},{key:"getStyleModel",value:function(I){var E=this.model.styles[I];if(!E)return null;var k=this.index.model[I];if(k)return k;if(k=this.index.model[I]={},E.numFmtId){var R=this.index.numFmt[E.numFmtId]||A.getDefaultFmtCode(E.numFmtId);R&&(k.numFmt=R)}function T(j,W,H){if(H||H===0){var X=W[H];X&&(k[j]=X)}}return T("font",this.model.fonts,E.fontId),T("border",this.model.borders,E.borderId),T("fill",this.model.fills,E.fillId),E.alignment&&(k.alignment=E.alignment),E.protection&&(k.protection=E.protection),k}},{key:"addDxfStyle",value:function(I){return I.numFmt&&(I.numFmtId=this._addNumFmtStr(I.numFmt)),this.model.dxfs.push(I),this.model.dxfs.length-1}},{key:"getDxfStyle",value:function(I){return this.model.dxfs[I]}},{key:"_addStyle",value:function(I){var E=this.map.style.toXml(I),k=this.index.style[E];return k===void 0&&(k=this.index.style[E]=this.model.styles.length,this.model.styles.push(E)),k}},{key:"_addNumFmtStr",value:function(I){var E=A.getDefaultFmtId(I);if(E!==void 0||(E=this.index.numFmt[I])!==void 0)return E;E=this.index.numFmt[I]=d+this.model.numFmts.length;var k=this.map.numFmt.toXml({id:E,formatCode:I});return this.model.numFmts.push(k),E}},{key:"_addFont",value:function(I){var E=this.map.font.toXml(I),k=this.index.font[E];return k===void 0&&(k=this.index.font[E]=this.model.fonts.length,this.model.fonts.push(E)),k}},{key:"_addBorder",value:function(I){var E=this.map.border.toXml(I),k=this.index.border[E];return k===void 0&&(k=this.index.border[E]=this.model.borders.length,this.model.borders.push(E)),k}},{key:"_addFill",value:function(I){var E=this.map.fill.toXml(I),k=this.index.fill[E];return k===void 0&&(k=this.index.fill[E]=this.model.fills.length,this.model.fills.push(E)),k}}]),y}(s);g.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},g.STATIC_XFORMS={cellStyles:new o({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new o({tag:"dxfs",$:{count:0}}),tableStyles:new o({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new o({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})};var p=function(m){Mt(y,m);var v=ir(y);function y(){var I;return Fe(this,y),(I=v.call(this)).model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]},I}return Le(y,[{key:"parseStream",value:function(I){return I.autodrain(),Promise.resolve()}},{key:"addStyleModel",value:function(I,E){return E===n.ValueType.Date?this.dateStyleId:0}},{key:"dateStyleId",get:function(){if(!this._dateStyleId){var I={numFmtId:A.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(I)}return this._dateStyleId}},{key:"getStyleModel",value:function(){return{}}}]),y}(g);g.Mock=p,r.exports=g},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(i){var c;return Fe(this,o),(c=s.call(this)).model=i,c}return Le(o,[{key:"tag",get:function(){return"u"}},{key:"render",value:function(i,c){if((c=c||this.model)===!0)i.leafNode("u");else{var u=o.Attributes[c];u&&i.leafNode("u",u)}}},{key:"parseOpen",value:function(i){i.name==="u"&&(this.model=i.attributes.val||!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));n.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},r.exports=n},{"../base-xform":32}],137:[function(e,r,t){var n=e("../base-xform"),a=e("./filter-column-xform"),s=function(o){Mt(c,o);var i=ir(c);function c(){var u;return Fe(this,c),(u=i.call(this)).map={filterColumn:new a},u}return Le(c,[{key:"tag",get:function(){return"autoFilter"}},{key:"prepare",value:function(u){var l=this;u.columns.forEach(function(A,h){l.map.filterColumn.prepare(A,{index:h})})}},{key:"render",value:function(u,l){var A=this;return u.openNode(this.tag,{ref:l.autoFilterRef}),l.columns.forEach(function(h){A.map.filterColumn.render(u,h)}),u.closeNode(),!0}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;if(u.name===this.tag)return this.model={autoFilterRef:u.attributes.ref,columns:[]},!0;if(this.parser=this.map[u.name],this.parser)return this.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(u)))}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;if(u===this.tag)return!1;throw new Error("Unexpected xml node in parseClose: ".concat(u))}}]),c}(n);r.exports=s},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"customFilter"}},{key:"render",value:function(i,c){i.leafNode(this.tag,{val:c.val,operator:c.operator})}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.model={val:i.attributes.val,operator:i.attributes.operator},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],139:[function(e,r,t){var n=e("../base-xform"),a=e("../list-xform"),s=e("./custom-filter-xform"),o=e("./filter-xform"),i=function(c){Mt(l,c);var u=ir(l);function l(){var A;return Fe(this,l),(A=u.call(this)).map={customFilters:new a({tag:"customFilters",count:!1,empty:!0,childXform:new s}),filters:new a({tag:"filters",count:!1,empty:!0,childXform:new o})},A}return Le(l,[{key:"tag",get:function(){return"filterColumn"}},{key:"prepare",value:function(A,h){A.colId=h.index.toString()}},{key:"render",value:function(A,h){return h.customFilters?(A.openNode(this.tag,{colId:h.colId,hiddenButton:h.filterButton?"0":"1"}),this.map.customFilters.render(A,h.customFilters),A.closeNode(),!0):(A.leafNode(this.tag,{colId:h.colId,hiddenButton:h.filterButton?"0":"1"}),!0)}},{key:"parseOpen",value:function(A){if(this.parser)return this.parser.parseOpen(A),!0;var h=A.attributes;if(A.name===this.tag)return this.model={filterButton:h.hiddenButton==="0"},!0;if(this.parser=this.map[A.name],this.parser)return this.parseOpen(A),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(A)))}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(A){return this.parser?(this.parser.parseClose(A)||(this.parser=void 0),!0):A!==this.tag||(this.model.customFilters=this.map.customFilters.model,!1)}}]),l}(n);r.exports=i},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"filter"}},{key:"render",value:function(i,c){i.leafNode(this.tag,{val:c.val})}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.model={val:i.attributes.val},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],141:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"tableColumn"}},{key:"prepare",value:function(i,c){i.id=c.index+1}},{key:"render",value:function(i,c){return i.leafNode(this.tag,{id:c.id.toString(),name:c.name,totalsRowLabel:c.totalsRowLabel,totalsRowFunction:c.totalsRowFunction,dxfId:c.dxfId}),!0}},{key:"parseOpen",value:function(i){if(i.name===this.tag){var c=i.attributes;return this.model={name:c.name,totalsRowLabel:c.totalsRowLabel,totalsRowFunction:c.totalsRowFunction,dxfId:c.dxfId},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],142:[function(e,r,t){var n=function(a){Mt(o,a);var s=ir(o);function o(){return Fe(this,o),s.apply(this,arguments)}return Le(o,[{key:"tag",get:function(){return"tableStyleInfo"}},{key:"render",value:function(i,c){return i.leafNode(this.tag,{name:c.theme?c.theme:void 0,showFirstColumn:c.showFirstColumn?"1":"0",showLastColumn:c.showLastColumn?"1":"0",showRowStripes:c.showRowStripes?"1":"0",showColumnStripes:c.showColumnStripes?"1":"0"}),!0}},{key:"parseOpen",value:function(i){if(i.name===this.tag){var c=i.attributes;return this.model={theme:c.name?c.name:null,showFirstColumn:c.showFirstColumn==="1",showLastColumn:c.showLastColumn==="1",showRowStripes:c.showRowStripes==="1",showColumnStripes:c.showColumnStripes==="1"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),o}(e("../base-xform"));r.exports=n},{"../base-xform":32}],143:[function(e,r,t){var n=e("../../../utils/xml-stream"),a=e("../base-xform"),s=e("../list-xform"),o=e("./auto-filter-xform"),i=e("./table-column-xform"),c=e("./table-style-info-xform"),u=function(l){Mt(h,l);var A=ir(h);function h(){var f;return Fe(this,h),(f=A.call(this)).map={autoFilter:new o,tableColumns:new s({tag:"tableColumns",count:!0,empty:!0,childXform:new i}),tableStyleInfo:new c},f}return Le(h,[{key:"prepare",value:function(f,d){this.map.autoFilter.prepare(f),this.map.tableColumns.prepare(f.columns,d)}},{key:"tag",get:function(){return"table"}},{key:"render",value:function(f,d){f.openXml(n.StdDocAttributes),f.openNode(this.tag,bo(bo({},h.TABLE_ATTRIBUTES),{},{id:d.id,name:d.name,displayName:d.displayName||d.name,ref:d.tableRef,totalsRowCount:d.totalsRow?"1":void 0,totalsRowShown:d.totalsRow?void 0:"1",headerRowCount:d.headerRow?"1":"0"})),this.map.autoFilter.render(f,d),this.map.tableColumns.render(f,d.columns),this.map.tableStyleInfo.render(f,d.style),f.closeNode()}},{key:"parseOpen",value:function(f){if(this.parser)return this.parser.parseOpen(f),!0;var d=f.name,g=f.attributes;return d===this.tag?(this.reset(),this.model={name:g.name,displayName:g.displayName||g.name,tableRef:g.ref,totalsRow:g.totalsRowCount==="1",headerRow:g.headerRowCount==="1"}):(this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)),!0}},{key:"parseText",value:function(f){this.parser&&this.parser.parseText(f)}},{key:"parseClose",value:function(f){var d=this;return this.parser?(this.parser.parseClose(f)||(this.parser=void 0),!0):f!==this.tag||(this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach(function(g,p){d.model.columns[p].filterButton=g.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1)}},{key:"reconcile",value:function(f,d){f.columns.forEach(function(g){g.dxfId!==void 0&&(g.style=d.styles.getDxfStyle(g.dxfId))})}}]),h}(a);u.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},r.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(e,r,t){(function(n,a){(function(){var s=e("fs"),o=e("jszip"),i=e("readable-stream").PassThrough,c=e("../utils/zip-stream"),u=e("../utils/stream-buf"),l=e("../utils/utils"),A=e("../utils/xml-stream"),h=e("../utils/browser-buffer-decode").bufferToString,f=e("./xform/style/styles-xform"),d=e("./xform/core/core-xform"),g=e("./xform/strings/shared-strings-xform"),p=e("./xform/core/relationships-xform"),m=e("./xform/core/content-types-xform"),v=e("./xform/core/app-xform"),y=e("./xform/book/workbook-xform"),I=e("./xform/sheet/worksheet-xform"),E=e("./xform/drawing/drawing-xform"),k=e("./xform/table/table-xform"),R=e("./xform/comment/comments-xform"),T=e("./xform/comment/vml-notes-xform"),j=e("./xml/theme1");function W(X,x){return new Promise(function(N,C){s.readFile(X,x,function(w,Q){w?C(w):N(Q)})})}var H=function(){function X(x){Fe(this,X),this.workbook=x}return Le(X,[{key:"readFile",value:function(){var x=Oi(mn.mark(function C(w,Q){var B,S;return mn.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,l.fs.exists(w);case 2:if(O.sent){O.next=4;break}throw new Error("File not found: ".concat(w));case 4:return B=s.createReadStream(w),O.prev=5,O.next=8,this.read(B,Q);case 8:return S=O.sent,B.close(),O.abrupt("return",S);case 13:throw O.prev=13,O.t0=O.catch(5),B.close(),O.t0;case 17:case"end":return O.stop()}},C,this,[[5,13]])}));function N(C,w){return x.apply(this,arguments)}return N}()},{key:"parseRels",value:function(x){return new p().parseStream(x)}},{key:"parseWorkbook",value:function(x){return new y().parseStream(x)}},{key:"parseSharedStrings",value:function(x){return new g().parseStream(x)}},{key:"reconcile",value:function(x,N){var C=new y,w=new I(N),Q=new E,B=new k;C.reconcile(x);var S={media:x.media,mediaIndex:x.mediaIndex};Object.keys(x.drawings).forEach(function(Y){var M=x.drawings[Y],z=x.drawingRels[Y];z&&(S.rels=z.reduce(function(ue,ae){return ue[ae.Id]=ae,ue},{}),(M.anchors||[]).forEach(function(ue){var ae=ue.picture&&ue.picture.hyperlinks;ae&&S.rels[ae.rId]&&(ae.hyperlink=S.rels[ae.rId].Target,delete ae.rId)}),Q.reconcile(M,S))});var O={styles:x.styles};Object.values(x.tables).forEach(function(Y){B.reconcile(Y,O)});var F={styles:x.styles,sharedStrings:x.sharedStrings,media:x.media,mediaIndex:x.mediaIndex,date1904:x.properties&&x.properties.date1904,drawings:x.drawings,comments:x.comments,tables:x.tables,vmlDrawings:x.vmlDrawings};x.worksheets.forEach(function(Y){Y.relationships=x.worksheetRels[Y.sheetNo],w.reconcile(Y,F)}),delete x.worksheetHash,delete x.worksheetRels,delete x.globalRels,delete x.sharedStrings,delete x.workbookRels,delete x.sheetDefs,delete x.styles,delete x.mediaIndex,delete x.drawings,delete x.drawingRels,delete x.vmlDrawings}},{key:"_processWorksheetEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B,S,O){var F,Y;return mn.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return F=new I(S),M.next=3,F.parseStream(w);case 3:(Y=M.sent).sheetNo=B,Q.worksheetHash[O]=Y,Q.worksheets.push(Y);case 7:case"end":return M.stop()}},C)}));function N(C,w,Q,B,S){return x.apply(this,arguments)}return N}()},{key:"_processCommentEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B){var S,O;return mn.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S=new R,F.next=3,S.parseStream(w);case 3:O=F.sent,Q.comments["../".concat(B,".xml")]=O;case 5:case"end":return F.stop()}},C)}));function N(C,w,Q){return x.apply(this,arguments)}return N}()},{key:"_processTableEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B){var S,O;return mn.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S=new k,F.next=3,S.parseStream(w);case 3:O=F.sent,Q.tables["../tables/".concat(B,".xml")]=O;case 5:case"end":return F.stop()}},C)}));function N(C,w,Q){return x.apply(this,arguments)}return N}()},{key:"_processWorksheetRelsEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B){var S,O;return mn.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S=new p,F.next=3,S.parseStream(w);case 3:O=F.sent,Q.worksheetRels[B]=O;case 5:case"end":return F.stop()}},C)}));function N(C,w,Q){return x.apply(this,arguments)}return N}()},{key:"_processMediaEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B){var S,O,F;return mn.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(!((S=B.lastIndexOf("."))>=1)){Y.next=6;break}return O=B.substr(S+1),F=B.substr(0,S),Y.next=6,new Promise(function(M,z){var ue=new u;ue.on("finish",function(){Q.mediaIndex[B]=Q.media.length,Q.mediaIndex[F]=Q.media.length;var ae={type:"image",name:F,extension:O,buffer:ue.toBuffer()};Q.media.push(ae),M()}),w.on("error",function(ae){z(ae)}),w.pipe(ue)});case 6:case"end":return Y.stop()}},C)}));function N(C,w,Q){return x.apply(this,arguments)}return N}()},{key:"_processDrawingEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B){var S,O;return mn.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S=new E,F.next=3,S.parseStream(w);case 3:O=F.sent,Q.drawings[B]=O;case 5:case"end":return F.stop()}},C)}));function N(C,w,Q){return x.apply(this,arguments)}return N}()},{key:"_processDrawingRelsEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B){var S,O;return mn.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S=new p,F.next=3,S.parseStream(w);case 3:O=F.sent,Q.drawingRels[B]=O;case 5:case"end":return F.stop()}},C)}));function N(C,w,Q){return x.apply(this,arguments)}return N}()},{key:"_processVmlDrawingEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B){var S,O;return mn.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S=new T,F.next=3,S.parseStream(w);case 3:O=F.sent,Q.vmlDrawings["../drawings/".concat(B,".vml")]=O;case 5:case"end":return F.stop()}},C)}));function N(C,w,Q){return x.apply(this,arguments)}return N}()},{key:"_processThemeEntry",value:function(){var x=Oi(mn.mark(function C(w,Q,B){return mn.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,new Promise(function(O,F){var Y=new u;w.on("error",F),Y.on("error",F),Y.on("finish",function(){Q.themes[B]=Y.read().toString(),O()}),w.pipe(Y)});case 2:case"end":return S.stop()}},C)}));function N(C,w,Q){return x.apply(this,arguments)}return N}()},{key:"createInputStream",value:function(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"read",value:function(){var x=Oi(mn.mark(function C(w,Q){var B,S,O,F,Y,M,z;return mn.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:!w[Symbol.asyncIterator]&&w.pipe&&(w=w.pipe(new i)),B=[],S=!1,O=!1,ue.prev=4,Y=t0(w);case 6:return ue.next=8,Y.next();case 8:if(!(S=!(M=ue.sent).done)){ue.next=14;break}z=M.value,B.push(z);case 11:S=!1,ue.next=6;break;case 14:ue.next=20;break;case 16:ue.prev=16,ue.t0=ue.catch(4),O=!0,F=ue.t0;case 20:if(ue.prev=20,ue.prev=21,!S||Y.return==null){ue.next=25;break}return ue.next=25,Y.return();case 25:if(ue.prev=25,!O){ue.next=28;break}throw F;case 28:return ue.finish(25);case 29:return ue.finish(20);case 30:return ue.abrupt("return",this.load(a.concat(B),Q));case 31:case"end":return ue.stop()}},C,this,[[4,16,20,30],[21,,25,29]])}));function N(C,w){return x.apply(this,arguments)}return N}()},{key:"load",value:function(){var x=Oi(mn.mark(function C(w,Q){var B,S,O,F,Y,M,z,ue,ae,Ne,Ge,Ye,Ae,te,he,de,Ke;return mn.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return B=Q&&Q.base64?a.from(w.toString(),"base64"):w,S={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},le.next=4,o.loadAsync(B);case 4:O=le.sent,F=0,Y=Object.values(O.files);case 6:if(!(F0&&(z=new A,O.render(z,M),w.append(z.xml,{name:"xl/comments".concat(M.id,".xml")}),z=new A,F.render(z,M),w.append(z.xml,{name:"xl/drawings/vmlDrawing".concat(M.id,".vml")}))});case 5:case"end":return Y.stop()}},C)}));function N(C,w){return x.apply(this,arguments)}return N}()},{key:"_finalize",value:function(x){var N=this;return new Promise(function(C,w){x.on("finish",function(){C(N)}),x.on("error",w),x.finalize()})}},{key:"prepareModel",value:function(x,N){x.creator=x.creator||"ExcelJS",x.lastModifiedBy=x.lastModifiedBy||"ExcelJS",x.created=x.created||new Date,x.modified=x.modified||new Date,x.useSharedStrings=N.useSharedStrings===void 0||N.useSharedStrings,x.useStyles=N.useStyles===void 0||N.useStyles,x.sharedStrings=new g,x.styles=x.useStyles?new f(!0):new f.Mock;var C=new y,w=new I;C.prepare(x);var Q={sharedStrings:x.sharedStrings,styles:x.styles,date1904:x.properties.date1904,drawingsCount:0,media:x.media};Q.drawings=x.drawings=[],Q.commentRefs=x.commentRefs=[];var B=0;x.tables=[],x.worksheets.forEach(function(S){S.tables.forEach(function(O){B++,O.target="table".concat(B,".xml"),O.id=B,x.tables.push(O)}),w.prepare(S,Q)})}},{key:"write",value:function(){var x=Oi(mn.mark(function C(w,Q){var B,S;return mn.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return Q=Q||{},B=this.workbook.model,(S=new c.ZipWriter(Q.zip)).pipe(w),this.prepareModel(B,Q),O.next=7,this.addContentTypes(S,B);case 7:return O.next=9,this.addOfficeRels(S,B);case 9:return O.next=11,this.addWorkbookRels(S,B);case 11:return O.next=13,this.addWorksheets(S,B);case 13:return O.next=15,this.addSharedStrings(S,B);case 15:return O.next=17,this.addDrawings(S,B);case 17:return O.next=19,this.addTables(S,B);case 19:return O.next=21,Promise.all([this.addThemes(S,B),this.addStyles(S,B)]);case 21:return O.next=23,this.addMedia(S,B);case 23:return O.next=25,Promise.all([this.addApp(S,B),this.addCore(S,B)]);case 25:return O.next=27,this.addWorkbook(S,B);case 27:return O.abrupt("return",this._finalize(S));case 28:case"end":return O.stop()}},C,this)}));function N(C,w){return x.apply(this,arguments)}return N}()},{key:"writeFile",value:function(x,N){var C=this,w=s.createWriteStream(x);return new Promise(function(Q,B){w.on("finish",function(){Q()}),w.on("error",function(S){B(S)}),C.write(w,N).then(function(){w.end()}).catch(function(S){B(S)})})}},{key:"writeBuffer",value:function(){var x=Oi(mn.mark(function C(w){var Q;return mn.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return Q=new u,B.next=3,this.write(Q,w);case 3:return B.abrupt("return",Q.read());case 4:case"end":return B.stop()}},C,this)}));function N(C){return x.apply(this,arguments)}return N}()}]),X}();H.RelType=e("./rel-type"),r.exports=H}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(e,r,t){r.exports=` `},{}],146:[function(e,r,t){(function(n){(function(){Object.defineProperty(t,"__esModule",{value:!0}),t.CsvFormatterStream=void 0;var a=e("stream"),s=e("./formatter"),o=function(i){Mt(u,i);var c=ir(u);function u(l){var A;return Fe(this,u),(A=c.call(this,{writableObjectMode:l.objectMode})).hasWrittenBOM=!1,A.formatterOptions=l,A.rowFormatter=new s.RowFormatter(l),A.hasWrittenBOM=!l.writeBOM,A}return Le(u,[{key:"transform",value:function(l){return this.rowFormatter.rowTransform=l,this}},{key:"_transform",value:function(l,A,h){var f=this,d=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(l,function(g,p){return g?(d=!0,h(g)):(p&&p.forEach(function(m){f.push(n.from(m,"utf8"))}),d=!0,h())})}catch(g){if(d)throw g;h(g)}}},{key:"_flush",value:function(l){var A=this;this.rowFormatter.finish(function(h,f){return h?l(h):(f&&f.forEach(function(d){A.push(n.from(d,"utf8"))}),l())})}}]),u}(a.Transform);t.CsvFormatterStream=o}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterOptions=void 0;var n=Le(function a(){Fe(this,a);var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.objectMode=!0,this.delimiter=",",this.rowDelimiter=` `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,o||{}),(o==null?void 0:o.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(o==null?void 0:o.quote)===!0?this.quote='"':(o==null?void 0:o.quote)===!1&&(this.quote=""),typeof(o==null?void 0:o.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((s=o.writeHeaders)===null||s===void 0||s),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote="".concat(this.escape).concat(this.quote)});t.FormatterOptions=n},{}],148:[function(e,r,t){var n=function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=void 0;var a=n(e("lodash.isboolean")),s=n(e("lodash.isnil")),o=n(e("lodash.escaperegexp")),i=function(){function c(u){Fe(this,c),this._headers=null,this.formatterOptions=u,u.headers!==null&&(this.headers=u.headers),this.REPLACE_REGEXP=new RegExp(u.quote,"g");var l="[".concat(u.delimiter).concat(o.default(u.rowDelimiter),`|\r| ]`);this.ESCAPE_REGEXP=new RegExp(l)}return Le(c,[{key:"headers",set:function(u){this._headers=u}},{key:"shouldQuote",value:function(u,l){var A=l?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return a.default(A)?A:Array.isArray(A)?A[u]:this._headers!==null&&A[this._headers[u]]}},{key:"format",value:function(u,l,A){var h="".concat(s.default(u)?"":u).replace(/\0/g,""),f=this.formatterOptions;return f.quote!==""&&h.indexOf(f.quote)!==-1?this.quoteField(h.replace(this.REPLACE_REGEXP,f.escapedQuote)):h.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(l,A)?this.quoteField(h):h}},{key:"quoteField",value:function(u){var l=this.formatterOptions.quote;return"".concat(l).concat(u).concat(l)}}]),c}();t.FieldFormatter=i},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(e,r,t){var n=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowFormatter=void 0;var a=n(e("lodash.isfunction")),s=n(e("lodash.isequal")),o=e("./FieldFormatter"),i=e("../types"),c=function(){function u(l){Fe(this,u),this.rowCount=0,this.formatterOptions=l,this.fieldFormatter=new o.FieldFormatter(l),this.headers=l.headers,this.shouldWriteHeaders=l.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),l.transform&&(this.rowTransform=l.transform)}return Le(u,[{key:"rowTransform",set:function(l){if(!a.default(l))throw new TypeError("The transform should be a function");this._rowTransform=u.createTransform(l)}},{key:"format",value:function(l,A){var h=this;this.callTransformer(l,function(f,d){if(f)return A(f);if(!l)return A(null);var g=[];if(d){var p=h.checkHeaders(d),m=p.shouldFormatColumns,v=p.headers;if(h.shouldWriteHeaders&&v&&!h.hasWrittenHeaders&&(g.push(h.formatColumns(v,!0)),h.hasWrittenHeaders=!0),m){var y=h.gatherColumns(d);g.push(h.formatColumns(y,!1))}}return A(null,g)})}},{key:"finish",value:function(l){var A=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return l(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));A.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&A.push(this.formatterOptions.rowDelimiter),l(null,A)}},{key:"checkHeaders",value:function(l){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};var A=u.gatherHeaders(l);return this.headers=A,this.fieldFormatter.headers=A,this.shouldWriteHeaders?{shouldFormatColumns:!s.default(A,l),headers:A}:{shouldFormatColumns:!0,headers:null}}},{key:"gatherColumns",value:function(l){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(l)?u.isRowHashArray(l)?this.headers.map(function(A,h){var f=l[h];return f?f[1]:""}):u.isRowArray(l)&&!this.shouldWriteHeaders?l:this.headers.map(function(A,h){return l[h]}):this.headers.map(function(A){return l[A]})}},{key:"callTransformer",value:function(l,A){return this._rowTransform?this._rowTransform(l,A):A(null,l)}},{key:"formatColumns",value:function(l,A){var h=this,f=l.map(function(g,p){return h.fieldFormatter.format(g,p,A)}).join(this.formatterOptions.delimiter),d=this.rowCount;return this.rowCount+=1,d?[this.formatterOptions.rowDelimiter,f].join(""):f}}],[{key:"isRowHashArray",value:function(l){return!!Array.isArray(l)&&Array.isArray(l[0])&&l[0].length===2}},{key:"isRowArray",value:function(l){return Array.isArray(l)&&!this.isRowHashArray(l)}},{key:"gatherHeaders",value:function(l){return u.isRowHashArray(l)?l.map(function(A){return A[0]}):Array.isArray(l)?l:Object.keys(l)}},{key:"createTransform",value:function(l){return i.isSyncTransform(l)?function(A,h){var f=null;try{f=l(A)}catch(d){return h(d)}return h(null,f)}:function(A,h){l(A,h)}}}]),u}();t.RowFormatter=c},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=t.RowFormatter=void 0;var n=e("./RowFormatter");Object.defineProperty(t,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var a=e("./FieldFormatter");Object.defineProperty(t,"FieldFormatter",{enumerable:!0,get:function(){return a.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(e,r,t){(function(n){(function(){var a=Object.create?function(g,p,m,v){v===void 0&&(v=m),Object.defineProperty(g,v,{enumerable:!0,get:function(){return p[m]}})}:function(g,p,m,v){v===void 0&&(v=m),g[v]=p[m]},s=Object.create?function(g,p){Object.defineProperty(g,"default",{enumerable:!0,value:p})}:function(g,p){g.default=p},o=function(g){if(g&&g.__esModule)return g;var p={};if(g!=null)for(var m in g)m!=="default"&&Object.prototype.hasOwnProperty.call(g,m)&&a(p,g,m);return s(p,g),p},i=function(g,p){for(var m in g)m==="default"||Object.prototype.hasOwnProperty.call(p,m)||a(p,g,m)};Object.defineProperty(t,"__esModule",{value:!0}),t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=t.FormatterOptions=t.CsvFormatterStream=void 0;var c=e("util"),u=e("stream"),l=o(e("fs")),A=e("./FormatterOptions"),h=e("./CsvFormatterStream");i(e("./types"),t);var f=e("./CsvFormatterStream");Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return f.CsvFormatterStream}});var d=e("./FormatterOptions");Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return d.FormatterOptions}}),t.format=function(g){return new h.CsvFormatterStream(new A.FormatterOptions(g))},t.write=function(g,p){var m=t.format(p),v=c.promisify(function(y,I){m.write(y,void 0,I)});return g.reduce(function(y,I){return y.then(function(){return v(I)})},Promise.resolve()).then(function(){return m.end()}).catch(function(y){m.emit("error",y)}),m},t.writeToStream=function(g,p,m){return t.write(p,m).pipe(g)},t.writeToBuffer=function(g){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=[],v=new u.Writable({write:function(y,I,E){m.push(y),E()}});return new Promise(function(y,I){v.on("error",I).on("finish",function(){return y(n.concat(m))}),t.write(g,p).pipe(v)})},t.writeToString=function(g,p){return t.writeToBuffer(g,p).then(function(m){return m.toString()})},t.writeToPath=function(g,p,m){var v=l.createWriteStream(g,{encoding:"utf8"});return t.write(p,m).pipe(v)}}).call(this)}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=function(n){return n.length===1}},{}],153:[function(e,r,t){(function(n){(function(){Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=void 0;var a=e("string_decoder"),s=e("stream"),o=e("./transforms"),i=e("./parser"),c=function(u){Mt(A,u);var l=ir(A);function A(h){var f;return Fe(this,A),(f=l.call(this,{objectMode:h.objectMode})).lines="",f.rowCount=0,f.parsedRowCount=0,f.parsedLineCount=0,f.endEmitted=!1,f.headersEmitted=!1,f.parserOptions=h,f.parser=new i.Parser(h),f.headerTransformer=new o.HeaderTransformer(h),f.decoder=new a.StringDecoder(h.encoding),f.rowTransformerValidator=new o.RowTransformerValidator,f}return Le(A,[{key:"hasHitRowLimit",get:function(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}},{key:"shouldEmitRows",get:function(){return this.parsedRowCount>this.parserOptions.skipRows}},{key:"shouldSkipLine",get:function(){return this.parsedLineCount<=this.parserOptions.skipLines}},{key:"transform",value:function(h){return this.rowTransformerValidator.rowTransform=h,this}},{key:"validate",value:function(h){return this.rowTransformerValidator.rowValidator=h,this}},{key:"emit",value:function(h){var f;if(h==="end")return this.endEmitted||(this.endEmitted=!0,P(Ur(A.prototype),"emit",this).call(this,"end",this.rowCount)),!1;for(var d=arguments.length,g=new Array(d>1?d-1:0),p=1;p=g||d.hasHitRowLimit)return f();if(d.parsedLineCount+=1,d.shouldSkipLine)return v();var y=h[m];d.rowCount+=1,d.parsedRowCount+=1;var I=d.rowCount;return d.transformRow(y,function(E,k){if(E)return d.rowCount-=1,v(E);if(!k)return v(new Error("expected transform result"));if(k.isValid){if(k.row)return d.pushRow(k.row,v)}else d.emit("data-invalid",k.row,I,k.reason);return v()})})(0)}},{key:"transformRow",value:function(h,f){var d=this;try{this.headerTransformer.transform(h,function(g,p){return g?f(g):p?p.isValid?p.row?d.shouldEmitRows?d.rowTransformerValidator.transformAndValidate(p.row,f):d.skipRow(f):(d.rowCount-=1,d.parsedRowCount-=1,f(null,{row:null,isValid:!0})):d.shouldEmitRows?f(null,{isValid:!1,row:h}):d.skipRow(f):f(new Error("Expected result from header transform"))})}catch(g){f(g)}}},{key:"checkAndEmitHeaders",value:function(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}},{key:"skipRow",value:function(h){return this.rowCount-=1,h(null,{row:null,isValid:!0})}},{key:"pushRow",value:function(h,f){try{this.parserOptions.objectMode?this.push(h):this.push(JSON.stringify(h)),f()}catch(d){f(d)}}}],[{key:"wrapDoneCallback",value:function(h){var f=!1;return function(d){if(d){if(f)throw d;return f=!0,void h(d)}for(var g=arguments.length,p=new Array(g>1?g-1:0),m=1;m1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=a.default(this.delimiter),this.escapeChar=(u=this.escape)!==null&&u!==void 0?u:this.quote,this.supportsComments=!s.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter,")")),this.maxRows>0&&(this.limitRows=!0)});t.ParserOptions=o},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(e,r,t){var n=Object.create?function(f,d,g,p){p===void 0&&(p=g),Object.defineProperty(f,p,{enumerable:!0,get:function(){return d[g]}})}:function(f,d,g,p){p===void 0&&(p=g),f[p]=d[g]},a=Object.create?function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}:function(f,d){f.default=d},s=function(f){if(f&&f.__esModule)return f;var d={};if(f!=null)for(var g in f)g!=="default"&&Object.prototype.hasOwnProperty.call(f,g)&&n(d,f,g);return a(d,f),d},o=function(f,d){for(var g in f)g==="default"||Object.prototype.hasOwnProperty.call(d,g)||n(d,f,g)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=t.ParserOptions=t.CsvParserStream=void 0;var i=s(e("fs")),c=e("stream"),u=e("./ParserOptions"),l=e("./CsvParserStream");o(e("./types"),t);var A=e("./CsvParserStream");Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return A.CsvParserStream}});var h=e("./ParserOptions");Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return h.ParserOptions}}),t.parse=function(f){return new l.CsvParserStream(new u.ParserOptions(f))},t.parseStream=function(f,d){return f.pipe(new l.CsvParserStream(new u.ParserOptions(d)))},t.parseFile=function(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return i.createReadStream(f).pipe(new l.CsvParserStream(new u.ParserOptions(d)))},t.parseString=function(f,d){var g=new c.Readable;return g.push(f),g.push(null),g.pipe(new l.CsvParserStream(new u.ParserOptions(d)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var n=e("./Scanner"),a=e("./RowParser"),s=e("./Token"),o=function(){function i(c){Fe(this,i),this.parserOptions=c,this.rowParser=new a.RowParser(this.parserOptions)}return Le(i,[{key:"parse",value:function(c,u){var l=new n.Scanner({line:i.removeBOM(c),parserOptions:this.parserOptions,hasMoreData:u});return this.parserOptions.supportsComments?this.parseWithComments(l):this.parseWithoutComments(l)}},{key:"parseWithoutComments",value:function(c){for(var u=[],l=!0;l;)l=this.parseRow(c,u);return{line:c.line,rows:u}}},{key:"parseWithComments",value:function(c){for(var u=this.parserOptions,l=[],A=c.nextCharacterToken;A!==null;A=c.nextCharacterToken)if(s.Token.isTokenComment(A,u)){if(c.advancePastLine()===null)return{line:c.lineFromCursor,rows:l};if(!c.hasMoreCharacters)return{line:c.lineFromCursor,rows:l};c.truncateToCursor()}else if(!this.parseRow(c,l))break;return{line:c.line,rows:l}}},{key:"parseRow",value:function(c,u){if(!c.nextNonSpaceToken)return!1;var l=this.rowParser.parse(c);return l!==null&&(this.parserOptions.ignoreEmpty&&a.RowParser.isEmptyRow(l)||u.push(l),!0)}}],[{key:"removeBOM",value:function(c){return c&&c.charCodeAt(0)===65279?c.slice(1):c}}]),i}();t.Parser=o},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RowParser=void 0;var n=e("./column"),a=e("./Token"),s="",o=function(){function i(c){Fe(this,i),this.parserOptions=c,this.columnParser=new n.ColumnParser(c)}return Le(i,[{key:"parse",value:function(c){for(var u=this.parserOptions,l=c.hasMoreData,A=c,h=[],f=this.getStartToken(A,h);f;){if(a.Token.isTokenRowDelimiter(f))return A.advancePastToken(f),!A.hasMoreCharacters&&a.Token.isTokenCarriageReturn(f,u)&&l?null:(A.truncateToCursor(),h);if(!this.shouldSkipColumnParse(A,f,h)){var d=this.columnParser.parse(A);if(d===null)return null;h.push(d)}f=A.nextNonSpaceToken}return l?null:(A.truncateToCursor(),h)}},{key:"getStartToken",value:function(c,u){var l=c.nextNonSpaceToken;return l!==null&&a.Token.isTokenDelimiter(l,this.parserOptions)?(u.push(""),c.nextNonSpaceToken):l}},{key:"shouldSkipColumnParse",value:function(c,u,l){var A=this.parserOptions;if(a.Token.isTokenDelimiter(u,A)){c.advancePastToken(u);var h=c.nextCharacterToken;if(!c.hasMoreCharacters||h!==null&&a.Token.isTokenRowDelimiter(h)||h!==null&&a.Token.isTokenDelimiter(h,A))return l.push(""),!0}return!1}}],[{key:"isEmptyRow",value:function(c){return c.join(s).replace(/\s+/g,s)===s}}]),i}();t.RowParser=o},{"./Token":159,"./column":164}],158:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=void 0;var n=e("./Token"),a=/((?:\r\n)|\n|\r)/,s=function(){function o(i){Fe(this,o),this.cursor=0,this.line=i.line,this.lineLength=this.line.length,this.parserOptions=i.parserOptions,this.hasMoreData=i.hasMoreData,this.cursor=i.cursor||0}return Le(o,[{key:"hasMoreCharacters",get:function(){return this.lineLength>this.cursor}},{key:"nextNonSpaceToken",get:function(){var i=this.lineFromCursor,c=this.parserOptions.NEXT_TOKEN_REGEXP;if(i.search(c)===-1)return null;var u=c.exec(i);if(u==null)return null;var l=u[1],A=this.cursor+(u.index||0);return new n.Token({token:l,startCursor:A,endCursor:A+l.length-1})}},{key:"nextCharacterToken",get:function(){var i=this.cursor;return this.lineLength<=i?null:new n.Token({token:this.line[i],startCursor:i,endCursor:i})}},{key:"lineFromCursor",get:function(){return this.line.substr(this.cursor)}},{key:"advancePastLine",value:function(){var i=a.exec(this.lineFromCursor);return i?(this.cursor+=(i.index||0)+i[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}},{key:"advanceTo",value:function(i){return this.cursor=i,this}},{key:"advanceToToken",value:function(i){return this.cursor=i.startCursor,this}},{key:"advancePastToken",value:function(i){return this.cursor=i.endCursor+1,this}},{key:"truncateToCursor",value:function(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}]),o}();t.Scanner=s},{"./Token":159}],159:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Token=void 0;var n=function(){function a(s){Fe(this,a),this.token=s.token,this.startCursor=s.startCursor,this.endCursor=s.endCursor}return Le(a,null,[{key:"isTokenRowDelimiter",value:function(s){var o=s.token;return o==="\r"||o===` `||o===`\r `}},{key:"isTokenCarriageReturn",value:function(s,o){return s.token===o.carriageReturn}},{key:"isTokenComment",value:function(s,o){return o.supportsComments&&!!s&&s.token===o.comment}},{key:"isTokenEscapeCharacter",value:function(s,o){return s.token===o.escapeChar}},{key:"isTokenQuote",value:function(s,o){return s.token===o.quote}},{key:"isTokenDelimiter",value:function(s,o){return s.token===o.delimiter}}]),a}();t.Token=n},{}],160:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=void 0;var n=Le(function a(s){Fe(this,a),s.trim?this.format=function(o){return o.trim()}:s.ltrim?this.format=function(o){return o.trimLeft()}:s.rtrim?this.format=function(o){return o.trimRight()}:this.format=function(o){return o}});t.ColumnFormatter=n},{}],161:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnParser=void 0;var n=e("./NonQuotedColumnParser"),a=e("./QuotedColumnParser"),s=e("../Token"),o=function(){function i(c){Fe(this,i),this.parserOptions=c,this.quotedColumnParser=new a.QuotedColumnParser(c),this.nonQuotedColumnParser=new n.NonQuotedColumnParser(c)}return Le(i,[{key:"parse",value:function(c){var u=c.nextNonSpaceToken;return u!==null&&s.Token.isTokenQuote(u,this.parserOptions)?(c.advanceToToken(u),this.quotedColumnParser.parse(c)):this.nonQuotedColumnParser.parse(c)}}]),i}();t.ColumnParser=o},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NonQuotedColumnParser=void 0;var n=e("./ColumnFormatter"),a=e("../Token"),s=function(){function o(i){Fe(this,o),this.parserOptions=i,this.columnFormatter=new n.ColumnFormatter(i)}return Le(o,[{key:"parse",value:function(i){if(!i.hasMoreCharacters)return null;for(var c=this.parserOptions,u=[],l=i.nextCharacterToken;l&&!a.Token.isTokenDelimiter(l,c)&&!a.Token.isTokenRowDelimiter(l);l=i.nextCharacterToken)u.push(l.token),i.advancePastToken(l);return this.columnFormatter.format(u.join(""))}}]),o}();t.NonQuotedColumnParser=s},{"../Token":159,"./ColumnFormatter":160}],163:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=void 0;var n=e("./ColumnFormatter"),a=e("../Token"),s=function(){function o(i){Fe(this,o),this.parserOptions=i,this.columnFormatter=new n.ColumnFormatter(i)}return Le(o,[{key:"parse",value:function(i){if(!i.hasMoreCharacters)return null;var c=i.cursor,u=this.gatherDataBetweenQuotes(i),l=u.foundClosingQuote,A=u.col;if(!l){if(i.advanceTo(c),!i.hasMoreData)throw new Error("Parse Error: missing closing: '".concat(this.parserOptions.quote||"","' in line: at '").concat(i.lineFromCursor.replace(/[\r\n]/g,"\\n'"),"'"));return null}return this.checkForMalformedColumn(i),A}},{key:"gatherDataBetweenQuotes",value:function(i){for(var c=this.parserOptions,u=!1,l=!1,A=[],h=i.nextCharacterToken;!l&&h!==null;h=i.nextCharacterToken){var f=a.Token.isTokenQuote(h,c);if(!u&&f)u=!0;else if(u)if(a.Token.isTokenEscapeCharacter(h,c)){i.advancePastToken(h);var d=i.nextCharacterToken;d!==null&&(a.Token.isTokenQuote(d,c)||a.Token.isTokenEscapeCharacter(d,c))?(A.push(d.token),h=d):f?l=!0:A.push(h.token)}else f?l=!0:A.push(h.token);i.advancePastToken(h)}return{col:this.columnFormatter.format(A.join("")),foundClosingQuote:l}}},{key:"checkForMalformedColumn",value:function(i){var c=this.parserOptions,u=i.nextNonSpaceToken;if(u){var l=a.Token.isTokenDelimiter(u,c),A=a.Token.isTokenRowDelimiter(u);if(!l&&!A){var h=i.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error("Parse Error: expected: '".concat(c.escapedDelimiter,"' OR new line got: '").concat(u.token,"'. at '").concat(h))}i.advanceToToken(u)}else i.hasMoreData||i.advancePastLine()}}]),o}();t.QuotedColumnParser=s},{"../Token":159,"./ColumnFormatter":160}],164:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=void 0;var n=e("./ColumnParser");Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return n.ColumnParser}});var a=e("./NonQuotedColumnParser");Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return a.NonQuotedColumnParser}});var s=e("./QuotedColumnParser");Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return s.QuotedColumnParser}});var o=e("./ColumnFormatter");Object.defineProperty(t,"ColumnFormatter",{enumerable:!0,get:function(){return o.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=t.Token=t.Scanner=t.RowParser=t.Parser=void 0;var n=e("./Parser");Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return n.Parser}});var a=e("./RowParser");Object.defineProperty(t,"RowParser",{enumerable:!0,get:function(){return a.RowParser}});var s=e("./Scanner");Object.defineProperty(t,"Scanner",{enumerable:!0,get:function(){return s.Scanner}});var o=e("./Token");Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return o.Token}});var i=e("./column");Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return i.ColumnParser}}),Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return i.NonQuotedColumnParser}}),Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return i.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(e,r,t){var n=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=void 0;var a=n(e("lodash.isundefined")),s=n(e("lodash.isfunction")),o=n(e("lodash.uniq")),i=n(e("lodash.groupby")),c=function(){function u(l){Fe(this,u),this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=l,l.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(l.headers)?this.setHeaders(l.headers):s.default(l.headers)&&(this.headersTransform=l.headers)}return Le(u,[{key:"transform",value:function(l,A){return this.shouldMapRow(l)?A(null,this.processRow(l)):A(null,{row:null,isValid:!0})}},{key:"shouldMapRow",value:function(l){var A=this.parserOptions;if(!this.headersTransform&&A.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(l)){if(this.headersTransform)this.setHeaders(this.headersTransform(l));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(l)}return!1}return!0}},{key:"processRow",value:function(l){if(!this.headers)return{row:l,isValid:!0};var A=this.parserOptions;if(!A.discardUnmappedColumns&&l.length>this.headersLength){if(!A.strictColumnHandling)throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(l.length));return{row:l,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(l.length)}}return A.strictColumnHandling&&l.length1});throw new Error("Duplicate headers found ".concat(JSON.stringify(d)))}this.headers=l,this.receivedHeaders=!0,this.headersLength=((A=this.headers)===null||A===void 0?void 0:A.length)||0}}]),u}();t.HeaderTransformer=c},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(e,r,t){var n=function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowTransformerValidator=void 0;var a=n(e("lodash.isfunction")),s=e("../types"),o=function(){function i(){Fe(this,i),this._rowTransform=null,this._rowValidator=null}return Le(i,[{key:"rowTransform",set:function(c){if(!a.default(c))throw new TypeError("The transform should be a function");this._rowTransform=i.createTransform(c)}},{key:"rowValidator",set:function(c){if(!a.default(c))throw new TypeError("The validate should be a function");this._rowValidator=i.createValidator(c)}},{key:"transformAndValidate",value:function(c,u){var l=this;return this.callTransformer(c,function(A,h){return A?u(A):h?l.callValidator(h,function(f,d){return f?u(f):d&&!d.isValid?u(null,{row:h,isValid:!1,reason:d.reason}):u(null,{row:h,isValid:!0})}):u(null,{row:null,isValid:!0})})}},{key:"callTransformer",value:function(c,u){return this._rowTransform?this._rowTransform(c,u):u(null,c)}},{key:"callValidator",value:function(c,u){return this._rowValidator?this._rowValidator(c,u):u(null,{row:c,isValid:!0})}}],[{key:"createTransform",value:function(c){return s.isSyncTransform(c)?function(u,l){var A=null;try{A=c(u)}catch(h){return l(h)}return l(null,A)}:c}},{key:"createValidator",value:function(c){return s.isSyncValidate(c)?function(u,l){l(null,{row:u,isValid:c(u)})}:function(u,l){c(u,function(A,h,f){return A?l(A):l(null,h?{row:u,isValid:h,reason:f}:{row:u,isValid:!1,reason:f})})}}}]),i}();t.RowTransformerValidator=o},{"../types":169,"lodash.isfunction":446}],168:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=t.RowTransformerValidator=void 0;var n=e("./RowTransformerValidator");Object.defineProperty(t,"RowTransformerValidator",{enumerable:!0,get:function(){return n.RowTransformerValidator}});var a=e("./HeaderTransformer");Object.defineProperty(t,"HeaderTransformer",{enumerable:!0,get:function(){return a.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncValidate=t.isSyncTransform=void 0,t.isSyncTransform=function(n){return n.length===1},t.isSyncValidate=function(n){return n.length===1}},{}],170:[function(e,r,t){var n=t;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(e,r,t){var n=e("./encoders"),a=e("./decoders"),s=e("inherits");function o(i,c){this.name=i,this.body=c,this.decoders={},this.encoders={}}t.define=function(i,c){return new o(i,c)},o.prototype._createNamed=function(i){var c=this.name;function u(l){this._initNamed(l,c)}return s(u,i),u.prototype._initNamed=function(l,A){i.call(this,l,A)},new u(this)},o.prototype._getDecoder=function(i){return i=i||"der",this.decoders.hasOwnProperty(i)||(this.decoders[i]=this._createNamed(a[i])),this.decoders[i]},o.prototype.decode=function(i,c,u){return this._getDecoder(c).decode(i,u)},o.prototype._getEncoder=function(i){return i=i||"der",this.encoders.hasOwnProperty(i)||(this.encoders[i]=this._createNamed(n[i])),this.encoders[i]},o.prototype.encode=function(i,c,u){return this._getEncoder(c).encode(i,u)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(e,r,t){var n=e("inherits"),a=e("../base/reporter").Reporter,s=e("safer-buffer").Buffer;function o(c,u){a.call(this,u),s.isBuffer(c)?(this.base=c,this.offset=0,this.length=c.length):this.error("Input not Buffer")}function i(c,u){if(Array.isArray(c))this.length=0,this.value=c.map(function(l){return i.isEncoderBuffer(l)||(l=new i(l,u)),this.length+=l.length,l},this);else if(typeof c=="number"){if(!(0<=c&&c<=255))return u.error("non-byte EncoderBuffer value");this.value=c,this.length=1}else if(typeof c=="string")this.value=c,this.length=s.byteLength(c);else{if(!s.isBuffer(c))return u.error("Unsupported type: "+typeof c);this.value=c,this.length=c.length}}n(o,a),t.DecoderBuffer=o,o.isDecoderBuffer=function(c){return c instanceof o||typeof c=="object"&&s.isBuffer(c.base)&&c.constructor.name==="DecoderBuffer"&&typeof c.offset=="number"&&typeof c.length=="number"&&typeof c.save=="function"&&typeof c.restore=="function"&&typeof c.isEmpty=="function"&&typeof c.readUInt8=="function"&&typeof c.skip=="function"&&typeof c.raw=="function"},o.prototype.save=function(){return{offset:this.offset,reporter:a.prototype.save.call(this)}},o.prototype.restore=function(c){var u=new o(this.base);return u.offset=c.offset,u.length=this.offset,this.offset=c.offset,a.prototype.restore.call(this,c.reporter),u},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(c){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(c||"DecoderBuffer overrun")},o.prototype.skip=function(c,u){if(!(this.offset+c<=this.length))return this.error(u||"DecoderBuffer overrun");var l=new o(this.base);return l._reporterState=this._reporterState,l.offset=this.offset,l.length=this.offset+c,this.offset+=c,l},o.prototype.raw=function(c){return this.base.slice(c?c.offset:this.offset,this.length)},t.EncoderBuffer=i,i.isEncoderBuffer=function(c){return c instanceof i||typeof c=="object"&&c.constructor.name==="EncoderBuffer"&&typeof c.length=="number"&&typeof c.join=="function"},i.prototype.join=function(c,u){return c||(c=s.alloc(this.length)),u||(u=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(l){l.join(c,u),u+=l.length}):(typeof this.value=="number"?c[u]=this.value:typeof this.value=="string"?c.write(this.value,u):s.isBuffer(this.value)&&this.value.copy(c,u),u+=this.length)),c}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(e,r,t){var n=t;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(e,r,t){var n=e("../base/reporter").Reporter,a=e("../base/buffer").EncoderBuffer,s=e("../base/buffer").DecoderBuffer,o=e("minimalistic-assert"),i=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(i),u=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function l(h,f,d){var g={};this._baseState=g,g.name=d,g.enc=h,g.parent=f||null,g.children=null,g.tag=null,g.args=null,g.reverseArgs=null,g.choice=null,g.optional=!1,g.any=!1,g.obj=!1,g.use=null,g.useDecoder=null,g.key=null,g.default=null,g.explicit=null,g.implicit=null,g.contains=null,g.parent||(g.children=[],this._wrap())}r.exports=l;var A=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var h=this._baseState,f={};A.forEach(function(g){f[g]=h[g]});var d=new this.constructor(f.parent);return d._baseState=f,d},l.prototype._wrap=function(){var h=this._baseState;c.forEach(function(f){this[f]=function(){var d=new this.constructor(this);return h.children.push(d),d[f].apply(d,arguments)}},this)},l.prototype._init=function(h){var f=this._baseState;o(f.parent===null),h.call(this),f.children=f.children.filter(function(d){return d._baseState.parent===this},this),o.equal(f.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(h){var f=this._baseState,d=h.filter(function(g){return g instanceof this.constructor},this);h=h.filter(function(g){return!(g instanceof this.constructor)},this),d.length!==0&&(o(f.children===null),f.children=d,d.forEach(function(g){g._baseState.parent=this},this)),h.length!==0&&(o(f.args===null),f.args=h,f.reverseArgs=h.map(function(g){if(typeof g!="object"||g.constructor!==Object)return g;var p={};return Object.keys(g).forEach(function(m){m==(0|m)&&(m|=0);var v=g[m];p[v]=m}),p}))},u.forEach(function(h){l.prototype[h]=function(){var f=this._baseState;throw new Error(h+" not implemented for encoding: "+f.enc)}}),i.forEach(function(h){l.prototype[h]=function(){var f=this._baseState,d=Array.prototype.slice.call(arguments);return o(f.tag===null),f.tag=h,this._useArgs(d),this}}),l.prototype.use=function(h){o(h);var f=this._baseState;return o(f.use===null),f.use=h,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(h){var f=this._baseState;return o(f.default===null),f.default=h,f.optional=!0,this},l.prototype.explicit=function(h){var f=this._baseState;return o(f.explicit===null&&f.implicit===null),f.explicit=h,this},l.prototype.implicit=function(h){var f=this._baseState;return o(f.explicit===null&&f.implicit===null),f.implicit=h,this},l.prototype.obj=function(){var h=this._baseState,f=Array.prototype.slice.call(arguments);return h.obj=!0,f.length!==0&&this._useArgs(f),this},l.prototype.key=function(h){var f=this._baseState;return o(f.key===null),f.key=h,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(h){var f=this._baseState;return o(f.choice===null),f.choice=h,this._useArgs(Object.keys(h).map(function(d){return h[d]})),this},l.prototype.contains=function(h){var f=this._baseState;return o(f.use===null),f.contains=h,this},l.prototype._decode=function(h,f){var d=this._baseState;if(d.parent===null)return h.wrapResult(d.children[0]._decode(h,f));var g,p=d.default,m=!0,v=null;if(d.key!==null&&(v=h.enterKey(d.key)),d.optional){var y=null;if(d.explicit!==null?y=d.explicit:d.implicit!==null?y=d.implicit:d.tag!==null&&(y=d.tag),y!==null||d.any){if(m=this._peekTag(h,y,d.any),h.isError(m))return m}else{var I=h.save();try{d.choice===null?this._decodeGeneric(d.tag,h,f):this._decodeChoice(h,f),m=!0}catch{m=!1}h.restore(I)}}if(d.obj&&m&&(g=h.enterObject()),m){if(d.explicit!==null){var E=this._decodeTag(h,d.explicit);if(h.isError(E))return E;h=E}var k=h.offset;if(d.use===null&&d.choice===null){var R;d.any&&(R=h.save());var T=this._decodeTag(h,d.implicit!==null?d.implicit:d.tag,d.any);if(h.isError(T))return T;d.any?p=h.raw(R):h=T}if(f&&f.track&&d.tag!==null&&f.track(h.path(),k,h.length,"tagged"),f&&f.track&&d.tag!==null&&f.track(h.path(),h.offset,h.length,"content"),d.any||(p=d.choice===null?this._decodeGeneric(d.tag,h,f):this._decodeChoice(h,f)),h.isError(p))return p;if(d.any||d.choice!==null||d.children===null||d.children.forEach(function(W){W._decode(h,f)}),d.contains&&(d.tag==="octstr"||d.tag==="bitstr")){var j=new s(p);p=this._getUse(d.contains,h._reporterState.obj)._decode(j,f)}}return d.obj&&m&&(p=h.leaveObject(g)),d.key===null||p===null&&m!==!0?v!==null&&h.exitKey(v):h.leaveKey(v,d.key,p),p},l.prototype._decodeGeneric=function(h,f,d){var g=this._baseState;return h==="seq"||h==="set"?null:h==="seqof"||h==="setof"?this._decodeList(f,h,g.args[0],d):/str$/.test(h)?this._decodeStr(f,h,d):h==="objid"&&g.args?this._decodeObjid(f,g.args[0],g.args[1],d):h==="objid"?this._decodeObjid(f,null,null,d):h==="gentime"||h==="utctime"?this._decodeTime(f,h,d):h==="null_"?this._decodeNull(f,d):h==="bool"?this._decodeBool(f,d):h==="objDesc"?this._decodeStr(f,h,d):h==="int"||h==="enum"?this._decodeInt(f,g.args&&g.args[0],d):g.use!==null?this._getUse(g.use,f._reporterState.obj)._decode(f,d):f.error("unknown tag: "+h)},l.prototype._getUse=function(h,f){var d=this._baseState;return d.useDecoder=this._use(h,f),o(d.useDecoder._baseState.parent===null),d.useDecoder=d.useDecoder._baseState.children[0],d.implicit!==d.useDecoder._baseState.implicit&&(d.useDecoder=d.useDecoder.clone(),d.useDecoder._baseState.implicit=d.implicit),d.useDecoder},l.prototype._decodeChoice=function(h,f){var d=this._baseState,g=null,p=!1;return Object.keys(d.choice).some(function(m){var v=h.save(),y=d.choice[m];try{var I=y._decode(h,f);if(h.isError(I))return!1;g={type:m,value:I},p=!0}catch{return h.restore(v),!1}return!0},this),p?g:h.error("Choice not matched")},l.prototype._createEncoderBuffer=function(h){return new a(h,this.reporter)},l.prototype._encode=function(h,f,d){var g=this._baseState;if(g.default===null||g.default!==h){var p=this._encodeValue(h,f,d);if(p!==void 0&&!this._skipDefault(p,f,d))return p}},l.prototype._encodeValue=function(h,f,d){var g=this._baseState;if(g.parent===null)return g.children[0]._encode(h,f||new n);var p=null;if(this.reporter=f,g.optional&&h===void 0){if(g.default===null)return;h=g.default}var m=null,v=!1;if(g.any)p=this._createEncoderBuffer(h);else if(g.choice)p=this._encodeChoice(h,f);else if(g.contains)m=this._getUse(g.contains,d)._encode(h,f),v=!0;else if(g.children)m=g.children.map(function(k){if(k._baseState.tag==="null_")return k._encode(null,f,h);if(k._baseState.key===null)return f.error("Child should have a key");var R=f.enterKey(k._baseState.key);if(typeof h!="object")return f.error("Child expected, but input is not object");var T=k._encode(h[k._baseState.key],f,h);return f.leaveKey(R),T},this).filter(function(k){return k}),m=this._createEncoderBuffer(m);else if(g.tag==="seqof"||g.tag==="setof"){if(!g.args||g.args.length!==1)return f.error("Too many args for : "+g.tag);if(!Array.isArray(h))return f.error("seqof/setof, but data is not Array");var y=this.clone();y._baseState.implicit=null,m=this._createEncoderBuffer(h.map(function(k){var R=this._baseState;return this._getUse(R.args[0],h)._encode(k,f)},y))}else g.use!==null?p=this._getUse(g.use,d)._encode(h,f):(m=this._encodePrimitive(g.tag,h),v=!0);if(!g.any&&g.choice===null){var I=g.implicit!==null?g.implicit:g.tag,E=g.implicit===null?"universal":"context";I===null?g.use===null&&f.error("Tag could be omitted only for .use()"):g.use===null&&(p=this._encodeComposite(I,v,E,m))}return g.explicit!==null&&(p=this._encodeComposite(g.explicit,!1,"context",p)),p},l.prototype._encodeChoice=function(h,f){var d=this._baseState,g=d.choice[h.type];return g||o(!1,h.type+" not found in "+JSON.stringify(Object.keys(d.choice))),g._encode(h.value,f)},l.prototype._encodePrimitive=function(h,f){var d=this._baseState;if(/str$/.test(h))return this._encodeStr(f,h);if(h==="objid"&&d.args)return this._encodeObjid(f,d.reverseArgs[0],d.args[1]);if(h==="objid")return this._encodeObjid(f,null,null);if(h==="gentime"||h==="utctime")return this._encodeTime(f,h);if(h==="null_")return this._encodeNull();if(h==="int"||h==="enum")return this._encodeInt(f,d.args&&d.reverseArgs[0]);if(h==="bool")return this._encodeBool(f);if(h==="objDesc")return this._encodeStr(f,h);throw new Error("Unsupported tag: "+h)},l.prototype._isNumstr=function(h){return/^[0-9 ]*$/.test(h)},l.prototype._isPrintstr=function(h){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(h)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(e,r,t){var n=e("inherits");function a(o){this._reporterState={obj:null,path:[],options:o||{},errors:[]}}function s(o,i){this.path=o,this.rethrow(i)}t.Reporter=a,a.prototype.isError=function(o){return o instanceof s},a.prototype.save=function(){var o=this._reporterState;return{obj:o.obj,pathLen:o.path.length}},a.prototype.restore=function(o){var i=this._reporterState;i.obj=o.obj,i.path=i.path.slice(0,o.pathLen)},a.prototype.enterKey=function(o){return this._reporterState.path.push(o)},a.prototype.exitKey=function(o){var i=this._reporterState;i.path=i.path.slice(0,o-1)},a.prototype.leaveKey=function(o,i,c){var u=this._reporterState;this.exitKey(o),u.obj!==null&&(u.obj[i]=c)},a.prototype.path=function(){return this._reporterState.path.join("/")},a.prototype.enterObject=function(){var o=this._reporterState,i=o.obj;return o.obj={},i},a.prototype.leaveObject=function(o){var i=this._reporterState,c=i.obj;return i.obj=o,c},a.prototype.error=function(o){var i,c=this._reporterState,u=o instanceof s;if(i=u?o:new s(c.path.map(function(l){return"["+JSON.stringify(l)+"]"}).join(""),o.message||o,o.stack),!c.options.partial)throw i;return u||c.errors.push(i),i},a.prototype.wrapResult=function(o){var i=this._reporterState;return i.options.partial?{result:this.isError(o)?null:o,errors:i.errors}:o},n(s,Error),s.prototype.rethrow=function(o){if(this.message=o+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(i){this.stack=i.stack}return this}},{inherits:440}],176:[function(e,r,t){function n(a){var s={};return Object.keys(a).forEach(function(o){(0|o)==o&&(o|=0);var i=a[o];s[i]=o}),s}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n(t.tag)},{}],177:[function(e,r,t){var n=t;n._reverse=function(a){var s={};return Object.keys(a).forEach(function(o){(0|o)==o&&(o|=0);var i=a[o];s[i]=o}),s},n.der=e("./der")},{"./der":176}],178:[function(e,r,t){var n=e("inherits"),a=e("bn.js"),s=e("../base/buffer").DecoderBuffer,o=e("../base/node"),i=e("../constants/der");function c(h){this.enc="der",this.name=h.name,this.entity=h,this.tree=new u,this.tree._init(h.body)}function u(h){o.call(this,"der",h)}function l(h,f){var d=h.readUInt8(f);if(h.isError(d))return d;var g=i.tagClass[d>>6],p=(32&d)==0;if((31&d)==31){var m=d;for(d=0;(128&m)==128;){if(m=h.readUInt8(f),h.isError(m))return m;d<<=7,d|=127&m}}else d&=31;return{cls:g,primitive:p,tag:d,tagStr:i.tag[d]}}function A(h,f,d){var g=h.readUInt8(d);if(h.isError(g))return g;if(!f&&g===128)return null;if(!(128&g))return g;var p=127&g;if(p>4)return h.error("length octect is too long");g=0;for(var m=0;m=31?d.error("Multi-octet tag encoding unsupported"):(h||(g|=32),g|=o.tagClassByName[f||"universal"]<<6)}r.exports=i,i.prototype.encode=function(A,h){return this.tree._encode(A,h).join()},n(c,s),c.prototype._encodeComposite=function(A,h,f,d){var g=l(A,h,f,this.reporter);if(d.length<128){var p=a.alloc(2);return p[0]=g,p[1]=d.length,this._createEncoderBuffer([p,d])}for(var m=1,v=d.length;v>=256;v>>=8)m++;var y=a.alloc(2+m);y[0]=g,y[1]=128|m;for(var I=1+m,E=d.length;E>0;I--,E>>=8)y[I]=255&E;return this._createEncoderBuffer([y,d])},c.prototype._encodeStr=function(A,h){if(h==="bitstr")return this._createEncoderBuffer([0|A.unused,A.data]);if(h==="bmpstr"){for(var f=a.alloc(2*A.length),d=0;d=40)return this.reporter.error("Second objid identifier OOB");A.splice(0,2,40*A[0]+A[1])}for(var p=0,m=0;m=128;v>>=7)p++}for(var y=a.alloc(p),I=y.length-1,E=A.length-1;E>=0;E--){var k=A[E];for(y[I--]=127&k;(k>>=7)>0;)y[I--]=128|127&k}return this._createEncoderBuffer(y)},c.prototype._encodeTime=function(A,h){var f,d=new Date(A);return h==="gentime"?f=[u(d.getUTCFullYear()),u(d.getUTCMonth()+1),u(d.getUTCDate()),u(d.getUTCHours()),u(d.getUTCMinutes()),u(d.getUTCSeconds()),"Z"].join(""):h==="utctime"?f=[u(d.getUTCFullYear()%100),u(d.getUTCMonth()+1),u(d.getUTCDate()),u(d.getUTCHours()),u(d.getUTCMinutes()),u(d.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+h+" time is not supported yet"),this._encodeStr(f,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(A,h){if(typeof A=="string"){if(!h)return this.reporter.error("String int or enum given, but no values map");if(!h.hasOwnProperty(A))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(A));A=h[A]}if(typeof A!="number"&&!a.isBuffer(A)){var f=A.toArray();!A.sign&&128&f[0]&&f.unshift(0),A=a.from(f)}if(a.isBuffer(A)){var d=A.length;A.length===0&&d++;var g=a.alloc(d);return A.copy(g),A.length===0&&(g[0]=0),this._createEncoderBuffer(g)}if(A<128)return this._createEncoderBuffer(A);if(A<256)return this._createEncoderBuffer([0,A]);for(var p=1,m=A;m>=256;m>>=8)p++;for(var v=new Array(p),y=v.length-1;y>=0;y--)v[y]=255&A,A>>=8;return 128&v[0]&&v.unshift(0),this._createEncoderBuffer(a.from(v))},c.prototype._encodeBool=function(A){return this._createEncoderBuffer(A?255:0)},c.prototype._use=function(A,h){return typeof A=="function"&&(A=A(h)),A._getEncoder("der").tree},c.prototype._skipDefault=function(A,h,f){var d,g=this._baseState;if(g.default===null)return!1;var p=A.join();if(g.defaultBuffer===void 0&&(g.defaultBuffer=this._encodeValue(g.default,h,f).join()),p.length!==g.defaultBuffer.length)return!1;for(d=0;d=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function l(x,N,C){var w=u(x,C);return C-1>=N&&(w|=u(x,C-1)<<4),w}function A(x,N,C,w){for(var Q=0,B=Math.min(x.length,C),S=N;S=49?O-49+10:O>=17?O-17+10:O}return Q}i.isBN=function(x){return x instanceof i||x!==null&&typeof x=="object"&&x.constructor.wordSize===i.wordSize&&Array.isArray(x.words)},i.max=function(x,N){return x.cmp(N)>0?x:N},i.min=function(x,N){return x.cmp(N)<0?x:N},i.prototype._init=function(x,N,C){if(typeof x=="number")return this._initNumber(x,N,C);if(typeof x=="object")return this._initArray(x,N,C);N==="hex"&&(N=16),s(N===(0|N)&&N>=2&&N<=36);var w=0;(x=x.toString().replace(/\s+/g,""))[0]==="-"&&(w++,this.negative=1),w=0;w-=3)B=x[w]|x[w-1]<<8|x[w-2]<<16,this.words[Q]|=B<>>26-S&67108863,(S+=24)>=26&&(S-=26,Q++);else if(C==="le")for(w=0,Q=0;w>>26-S&67108863,(S+=24)>=26&&(S-=26,Q++);return this.strip()},i.prototype._parseHex=function(x,N,C){this.length=Math.ceil((x.length-N)/6),this.words=new Array(this.length);for(var w=0;w=N;w-=2)Q=l(x,N,w)<=18?(B-=18,S+=1,this.words[S]|=Q>>>26):B+=8;else for(w=(x.length-N)%2==0?N+1:N;w=18?(B-=18,S+=1,this.words[S]|=Q>>>26):B+=8;this.strip()},i.prototype._parseBase=function(x,N,C){this.words=[0],this.length=1;for(var w=0,Q=1;Q<=67108863;Q*=N)w++;w--,Q=Q/N|0;for(var B=x.length-C,S=B%w,O=Math.min(B,B-S)+C,F=0,Y=C;Y1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(x){for(var N=new Array(x.bitLength()),C=0;C>>Q}return N}function p(x,N,C){C.negative=N.negative^x.negative;var w=x.length+N.length|0;C.length=w,w=w-1|0;var Q=0|x.words[0],B=0|N.words[0],S=Q*B,O=67108863&S,F=S/67108864|0;C.words[0]=O;for(var Y=1;Y>>26,z=67108863&F,ue=Math.min(Y,N.length-1),ae=Math.max(0,Y-x.length+1);ae<=ue;ae++){var Ne=Y-ae|0;M+=(S=(Q=0|x.words[Ne])*(B=0|N.words[ae])+z)/67108864|0,z=67108863&S}C.words[Y]=0|z,F=0|M}return F!==0?C.words[Y]=0|F:C.length--,C.strip()}i.prototype.toString=function(x,N){var C;if(N=0|N||1,(x=x||10)===16||x==="hex"){C="";for(var w=0,Q=0,B=0;B>>24-w&16777215)!=0||B!==this.length-1?h[6-O.length]+O+C:O+C,(w+=2)>=26&&(w-=26,B--)}for(Q!==0&&(C=Q.toString(16)+C);C.length%N!=0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(x===(0|x)&&x>=2&&x<=36){var F=f[x],Y=d[x];C="";var M=this.clone();for(M.negative=0;!M.isZero();){var z=M.modn(Y).toString(x);C=(M=M.idivn(Y)).isZero()?z+C:h[F-z.length]+z+C}for(this.isZero()&&(C="0"+C);C.length%N!=0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}s(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var x=this.words[0];return this.length===2?x+=67108864*this.words[1]:this.length===3&&this.words[2]===1?x+=4503599627370496+67108864*this.words[1]:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-x:x},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(x,N){return s(c!==void 0),this.toArrayLike(c,x,N)},i.prototype.toArray=function(x,N){return this.toArrayLike(Array,x,N)},i.prototype.toArrayLike=function(x,N,C){var w=this.byteLength(),Q=C||Math.max(1,w);s(w<=Q,"byte array longer than desired length"),s(Q>0,"Requested array length <= 0"),this.strip();var B,S,O=N==="le",F=new x(Q),Y=this.clone();if(O){for(S=0;!Y.isZero();S++)B=Y.andln(255),Y.iushrn(8),F[S]=B;for(;S=4096&&(C+=13,N>>>=13),N>=64&&(C+=7,N>>>=7),N>=8&&(C+=4,N>>>=4),N>=2&&(C+=2,N>>>=2),C+N},i.prototype._zeroBits=function(x){if(x===0)return 26;var N=x,C=0;return!(8191&N)&&(C+=13,N>>>=13),!(127&N)&&(C+=7,N>>>=7),!(15&N)&&(C+=4,N>>>=4),!(3&N)&&(C+=2,N>>>=2),!(1&N)&&C++,C},i.prototype.bitLength=function(){var x=this.words[this.length-1],N=this._countBits(x);return 26*(this.length-1)+N},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var x=0,N=0;Nx.length?this.clone().ior(x):x.clone().ior(this)},i.prototype.uor=function(x){return this.length>x.length?this.clone().iuor(x):x.clone().iuor(this)},i.prototype.iuand=function(x){var N;N=this.length>x.length?x:this;for(var C=0;Cx.length?this.clone().iand(x):x.clone().iand(this)},i.prototype.uand=function(x){return this.length>x.length?this.clone().iuand(x):x.clone().iuand(this)},i.prototype.iuxor=function(x){var N,C;this.length>x.length?(N=this,C=x):(N=x,C=this);for(var w=0;wx.length?this.clone().ixor(x):x.clone().ixor(this)},i.prototype.uxor=function(x){return this.length>x.length?this.clone().iuxor(x):x.clone().iuxor(this)},i.prototype.inotn=function(x){s(typeof x=="number"&&x>=0);var N=0|Math.ceil(x/26),C=x%26;this._expand(N),C>0&&N--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-C),this.strip()},i.prototype.notn=function(x){return this.clone().inotn(x)},i.prototype.setn=function(x,N){s(typeof x=="number"&&x>=0);var C=x/26|0,w=x%26;return this._expand(C+1),this.words[C]=N?this.words[C]|1<x.length?(C=this,w=x):(C=x,w=this);for(var Q=0,B=0;B>>26;for(;Q!==0&&B>>26;if(this.length=C.length,Q!==0)this.words[this.length]=Q,this.length++;else if(C!==this)for(;Bx.length?this.clone().iadd(x):x.clone().iadd(this)},i.prototype.isub=function(x){if(x.negative!==0){x.negative=0;var N=this.iadd(x);return x.negative=1,N._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(x),this.negative=1,this._normSign();var C,w,Q=this.cmp(x);if(Q===0)return this.negative=0,this.length=1,this.words[0]=0,this;Q>0?(C=this,w=x):(C=x,w=this);for(var B=0,S=0;S>26,this.words[S]=67108863&N;for(;B!==0&&S>26,this.words[S]=67108863&N;if(B===0&&S>>13,ae=0|S[1],Ne=8191&ae,Ge=ae>>>13,Ye=0|S[2],Ae=8191&Ye,te=Ye>>>13,he=0|S[3],de=8191&he,Ke=he>>>13,le=0|S[4],Ce=8191&le,At=le>>>13,Z=0|S[5],ce=8191&Z,ye=Z>>>13,Ve=0|S[6],dt=8191&Ve,re=Ve>>>13,ot=0|S[7],pt=8191&ot,Be=ot>>>13,Ee=0|S[8],Me=8191&Ee,yt=Ee>>>13,pe=0|S[9],me=8191&pe,Re=pe>>>13,Ze=0|O[0],ke=8191&Ze,Pe=Ze>>>13,_e=0|O[1],Je=8191&_e,at=_e>>>13,Dt=0|O[2],St=8191&Dt,hr=Dt>>>13,Wt=0|O[3],Ut=8191&Wt,ur=Wt>>>13,Br=0|O[4],fr=8191&Br,Mr=Br>>>13,er=0|O[5],Tr=8191&er,fn=er>>>13,_n=0|O[6],dr=8191&_n,rn=_n>>>13,Kr=0|O[7],tr=8191&Kr,on=Kr>>>13,nn=0|O[8],An=8191&nn,bn=nn>>>13,Gn=0|O[9],Dr=8191&Gn,Nn=Gn>>>13;C.negative=x.negative^N.negative,C.length=19;var Mn=(Y+(w=Math.imul(z,ke))|0)+((8191&(Q=(Q=Math.imul(z,Pe))+Math.imul(ue,ke)|0))<<13)|0;Y=((B=Math.imul(ue,Pe))+(Q>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,w=Math.imul(Ne,ke),Q=(Q=Math.imul(Ne,Pe))+Math.imul(Ge,ke)|0,B=Math.imul(Ge,Pe);var Hn=(Y+(w=w+Math.imul(z,Je)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,at)|0)+Math.imul(ue,Je)|0))<<13)|0;Y=((B=B+Math.imul(ue,at)|0)+(Q>>>13)|0)+(Hn>>>26)|0,Hn&=67108863,w=Math.imul(Ae,ke),Q=(Q=Math.imul(Ae,Pe))+Math.imul(te,ke)|0,B=Math.imul(te,Pe),w=w+Math.imul(Ne,Je)|0,Q=(Q=Q+Math.imul(Ne,at)|0)+Math.imul(Ge,Je)|0,B=B+Math.imul(Ge,at)|0;var vi=(Y+(w=w+Math.imul(z,St)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,hr)|0)+Math.imul(ue,St)|0))<<13)|0;Y=((B=B+Math.imul(ue,hr)|0)+(Q>>>13)|0)+(vi>>>26)|0,vi&=67108863,w=Math.imul(de,ke),Q=(Q=Math.imul(de,Pe))+Math.imul(Ke,ke)|0,B=Math.imul(Ke,Pe),w=w+Math.imul(Ae,Je)|0,Q=(Q=Q+Math.imul(Ae,at)|0)+Math.imul(te,Je)|0,B=B+Math.imul(te,at)|0,w=w+Math.imul(Ne,St)|0,Q=(Q=Q+Math.imul(Ne,hr)|0)+Math.imul(Ge,St)|0,B=B+Math.imul(Ge,hr)|0;var qe=(Y+(w=w+Math.imul(z,Ut)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,ur)|0)+Math.imul(ue,Ut)|0))<<13)|0;Y=((B=B+Math.imul(ue,ur)|0)+(Q>>>13)|0)+(qe>>>26)|0,qe&=67108863,w=Math.imul(Ce,ke),Q=(Q=Math.imul(Ce,Pe))+Math.imul(At,ke)|0,B=Math.imul(At,Pe),w=w+Math.imul(de,Je)|0,Q=(Q=Q+Math.imul(de,at)|0)+Math.imul(Ke,Je)|0,B=B+Math.imul(Ke,at)|0,w=w+Math.imul(Ae,St)|0,Q=(Q=Q+Math.imul(Ae,hr)|0)+Math.imul(te,St)|0,B=B+Math.imul(te,hr)|0,w=w+Math.imul(Ne,Ut)|0,Q=(Q=Q+Math.imul(Ne,ur)|0)+Math.imul(Ge,Ut)|0,B=B+Math.imul(Ge,ur)|0;var bt=(Y+(w=w+Math.imul(z,fr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,Mr)|0)+Math.imul(ue,fr)|0))<<13)|0;Y=((B=B+Math.imul(ue,Mr)|0)+(Q>>>13)|0)+(bt>>>26)|0,bt&=67108863,w=Math.imul(ce,ke),Q=(Q=Math.imul(ce,Pe))+Math.imul(ye,ke)|0,B=Math.imul(ye,Pe),w=w+Math.imul(Ce,Je)|0,Q=(Q=Q+Math.imul(Ce,at)|0)+Math.imul(At,Je)|0,B=B+Math.imul(At,at)|0,w=w+Math.imul(de,St)|0,Q=(Q=Q+Math.imul(de,hr)|0)+Math.imul(Ke,St)|0,B=B+Math.imul(Ke,hr)|0,w=w+Math.imul(Ae,Ut)|0,Q=(Q=Q+Math.imul(Ae,ur)|0)+Math.imul(te,Ut)|0,B=B+Math.imul(te,ur)|0,w=w+Math.imul(Ne,fr)|0,Q=(Q=Q+Math.imul(Ne,Mr)|0)+Math.imul(Ge,fr)|0,B=B+Math.imul(Ge,Mr)|0;var Ft=(Y+(w=w+Math.imul(z,Tr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,fn)|0)+Math.imul(ue,Tr)|0))<<13)|0;Y=((B=B+Math.imul(ue,fn)|0)+(Q>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,w=Math.imul(dt,ke),Q=(Q=Math.imul(dt,Pe))+Math.imul(re,ke)|0,B=Math.imul(re,Pe),w=w+Math.imul(ce,Je)|0,Q=(Q=Q+Math.imul(ce,at)|0)+Math.imul(ye,Je)|0,B=B+Math.imul(ye,at)|0,w=w+Math.imul(Ce,St)|0,Q=(Q=Q+Math.imul(Ce,hr)|0)+Math.imul(At,St)|0,B=B+Math.imul(At,hr)|0,w=w+Math.imul(de,Ut)|0,Q=(Q=Q+Math.imul(de,ur)|0)+Math.imul(Ke,Ut)|0,B=B+Math.imul(Ke,ur)|0,w=w+Math.imul(Ae,fr)|0,Q=(Q=Q+Math.imul(Ae,Mr)|0)+Math.imul(te,fr)|0,B=B+Math.imul(te,Mr)|0,w=w+Math.imul(Ne,Tr)|0,Q=(Q=Q+Math.imul(Ne,fn)|0)+Math.imul(Ge,Tr)|0,B=B+Math.imul(Ge,fn)|0;var Lr=(Y+(w=w+Math.imul(z,dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,rn)|0)+Math.imul(ue,dr)|0))<<13)|0;Y=((B=B+Math.imul(ue,rn)|0)+(Q>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,w=Math.imul(pt,ke),Q=(Q=Math.imul(pt,Pe))+Math.imul(Be,ke)|0,B=Math.imul(Be,Pe),w=w+Math.imul(dt,Je)|0,Q=(Q=Q+Math.imul(dt,at)|0)+Math.imul(re,Je)|0,B=B+Math.imul(re,at)|0,w=w+Math.imul(ce,St)|0,Q=(Q=Q+Math.imul(ce,hr)|0)+Math.imul(ye,St)|0,B=B+Math.imul(ye,hr)|0,w=w+Math.imul(Ce,Ut)|0,Q=(Q=Q+Math.imul(Ce,ur)|0)+Math.imul(At,Ut)|0,B=B+Math.imul(At,ur)|0,w=w+Math.imul(de,fr)|0,Q=(Q=Q+Math.imul(de,Mr)|0)+Math.imul(Ke,fr)|0,B=B+Math.imul(Ke,Mr)|0,w=w+Math.imul(Ae,Tr)|0,Q=(Q=Q+Math.imul(Ae,fn)|0)+Math.imul(te,Tr)|0,B=B+Math.imul(te,fn)|0,w=w+Math.imul(Ne,dr)|0,Q=(Q=Q+Math.imul(Ne,rn)|0)+Math.imul(Ge,dr)|0,B=B+Math.imul(Ge,rn)|0;var kn=(Y+(w=w+Math.imul(z,tr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,on)|0)+Math.imul(ue,tr)|0))<<13)|0;Y=((B=B+Math.imul(ue,on)|0)+(Q>>>13)|0)+(kn>>>26)|0,kn&=67108863,w=Math.imul(Me,ke),Q=(Q=Math.imul(Me,Pe))+Math.imul(yt,ke)|0,B=Math.imul(yt,Pe),w=w+Math.imul(pt,Je)|0,Q=(Q=Q+Math.imul(pt,at)|0)+Math.imul(Be,Je)|0,B=B+Math.imul(Be,at)|0,w=w+Math.imul(dt,St)|0,Q=(Q=Q+Math.imul(dt,hr)|0)+Math.imul(re,St)|0,B=B+Math.imul(re,hr)|0,w=w+Math.imul(ce,Ut)|0,Q=(Q=Q+Math.imul(ce,ur)|0)+Math.imul(ye,Ut)|0,B=B+Math.imul(ye,ur)|0,w=w+Math.imul(Ce,fr)|0,Q=(Q=Q+Math.imul(Ce,Mr)|0)+Math.imul(At,fr)|0,B=B+Math.imul(At,Mr)|0,w=w+Math.imul(de,Tr)|0,Q=(Q=Q+Math.imul(de,fn)|0)+Math.imul(Ke,Tr)|0,B=B+Math.imul(Ke,fn)|0,w=w+Math.imul(Ae,dr)|0,Q=(Q=Q+Math.imul(Ae,rn)|0)+Math.imul(te,dr)|0,B=B+Math.imul(te,rn)|0,w=w+Math.imul(Ne,tr)|0,Q=(Q=Q+Math.imul(Ne,on)|0)+Math.imul(Ge,tr)|0,B=B+Math.imul(Ge,on)|0;var Bi=(Y+(w=w+Math.imul(z,An)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,bn)|0)+Math.imul(ue,An)|0))<<13)|0;Y=((B=B+Math.imul(ue,bn)|0)+(Q>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,w=Math.imul(me,ke),Q=(Q=Math.imul(me,Pe))+Math.imul(Re,ke)|0,B=Math.imul(Re,Pe),w=w+Math.imul(Me,Je)|0,Q=(Q=Q+Math.imul(Me,at)|0)+Math.imul(yt,Je)|0,B=B+Math.imul(yt,at)|0,w=w+Math.imul(pt,St)|0,Q=(Q=Q+Math.imul(pt,hr)|0)+Math.imul(Be,St)|0,B=B+Math.imul(Be,hr)|0,w=w+Math.imul(dt,Ut)|0,Q=(Q=Q+Math.imul(dt,ur)|0)+Math.imul(re,Ut)|0,B=B+Math.imul(re,ur)|0,w=w+Math.imul(ce,fr)|0,Q=(Q=Q+Math.imul(ce,Mr)|0)+Math.imul(ye,fr)|0,B=B+Math.imul(ye,Mr)|0,w=w+Math.imul(Ce,Tr)|0,Q=(Q=Q+Math.imul(Ce,fn)|0)+Math.imul(At,Tr)|0,B=B+Math.imul(At,fn)|0,w=w+Math.imul(de,dr)|0,Q=(Q=Q+Math.imul(de,rn)|0)+Math.imul(Ke,dr)|0,B=B+Math.imul(Ke,rn)|0,w=w+Math.imul(Ae,tr)|0,Q=(Q=Q+Math.imul(Ae,on)|0)+Math.imul(te,tr)|0,B=B+Math.imul(te,on)|0,w=w+Math.imul(Ne,An)|0,Q=(Q=Q+Math.imul(Ne,bn)|0)+Math.imul(Ge,An)|0,B=B+Math.imul(Ge,bn)|0;var ka=(Y+(w=w+Math.imul(z,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(z,Nn)|0)+Math.imul(ue,Dr)|0))<<13)|0;Y=((B=B+Math.imul(ue,Nn)|0)+(Q>>>13)|0)+(ka>>>26)|0,ka&=67108863,w=Math.imul(me,Je),Q=(Q=Math.imul(me,at))+Math.imul(Re,Je)|0,B=Math.imul(Re,at),w=w+Math.imul(Me,St)|0,Q=(Q=Q+Math.imul(Me,hr)|0)+Math.imul(yt,St)|0,B=B+Math.imul(yt,hr)|0,w=w+Math.imul(pt,Ut)|0,Q=(Q=Q+Math.imul(pt,ur)|0)+Math.imul(Be,Ut)|0,B=B+Math.imul(Be,ur)|0,w=w+Math.imul(dt,fr)|0,Q=(Q=Q+Math.imul(dt,Mr)|0)+Math.imul(re,fr)|0,B=B+Math.imul(re,Mr)|0,w=w+Math.imul(ce,Tr)|0,Q=(Q=Q+Math.imul(ce,fn)|0)+Math.imul(ye,Tr)|0,B=B+Math.imul(ye,fn)|0,w=w+Math.imul(Ce,dr)|0,Q=(Q=Q+Math.imul(Ce,rn)|0)+Math.imul(At,dr)|0,B=B+Math.imul(At,rn)|0,w=w+Math.imul(de,tr)|0,Q=(Q=Q+Math.imul(de,on)|0)+Math.imul(Ke,tr)|0,B=B+Math.imul(Ke,on)|0,w=w+Math.imul(Ae,An)|0,Q=(Q=Q+Math.imul(Ae,bn)|0)+Math.imul(te,An)|0,B=B+Math.imul(te,bn)|0;var Va=(Y+(w=w+Math.imul(Ne,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(Ne,Nn)|0)+Math.imul(Ge,Dr)|0))<<13)|0;Y=((B=B+Math.imul(Ge,Nn)|0)+(Q>>>13)|0)+(Va>>>26)|0,Va&=67108863,w=Math.imul(me,St),Q=(Q=Math.imul(me,hr))+Math.imul(Re,St)|0,B=Math.imul(Re,hr),w=w+Math.imul(Me,Ut)|0,Q=(Q=Q+Math.imul(Me,ur)|0)+Math.imul(yt,Ut)|0,B=B+Math.imul(yt,ur)|0,w=w+Math.imul(pt,fr)|0,Q=(Q=Q+Math.imul(pt,Mr)|0)+Math.imul(Be,fr)|0,B=B+Math.imul(Be,Mr)|0,w=w+Math.imul(dt,Tr)|0,Q=(Q=Q+Math.imul(dt,fn)|0)+Math.imul(re,Tr)|0,B=B+Math.imul(re,fn)|0,w=w+Math.imul(ce,dr)|0,Q=(Q=Q+Math.imul(ce,rn)|0)+Math.imul(ye,dr)|0,B=B+Math.imul(ye,rn)|0,w=w+Math.imul(Ce,tr)|0,Q=(Q=Q+Math.imul(Ce,on)|0)+Math.imul(At,tr)|0,B=B+Math.imul(At,on)|0,w=w+Math.imul(de,An)|0,Q=(Q=Q+Math.imul(de,bn)|0)+Math.imul(Ke,An)|0,B=B+Math.imul(Ke,bn)|0;var qo=(Y+(w=w+Math.imul(Ae,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(Ae,Nn)|0)+Math.imul(te,Dr)|0))<<13)|0;Y=((B=B+Math.imul(te,Nn)|0)+(Q>>>13)|0)+(qo>>>26)|0,qo&=67108863,w=Math.imul(me,Ut),Q=(Q=Math.imul(me,ur))+Math.imul(Re,Ut)|0,B=Math.imul(Re,ur),w=w+Math.imul(Me,fr)|0,Q=(Q=Q+Math.imul(Me,Mr)|0)+Math.imul(yt,fr)|0,B=B+Math.imul(yt,Mr)|0,w=w+Math.imul(pt,Tr)|0,Q=(Q=Q+Math.imul(pt,fn)|0)+Math.imul(Be,Tr)|0,B=B+Math.imul(Be,fn)|0,w=w+Math.imul(dt,dr)|0,Q=(Q=Q+Math.imul(dt,rn)|0)+Math.imul(re,dr)|0,B=B+Math.imul(re,rn)|0,w=w+Math.imul(ce,tr)|0,Q=(Q=Q+Math.imul(ce,on)|0)+Math.imul(ye,tr)|0,B=B+Math.imul(ye,on)|0,w=w+Math.imul(Ce,An)|0,Q=(Q=Q+Math.imul(Ce,bn)|0)+Math.imul(At,An)|0,B=B+Math.imul(At,bn)|0;var Ro=(Y+(w=w+Math.imul(de,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(de,Nn)|0)+Math.imul(Ke,Dr)|0))<<13)|0;Y=((B=B+Math.imul(Ke,Nn)|0)+(Q>>>13)|0)+(Ro>>>26)|0,Ro&=67108863,w=Math.imul(me,fr),Q=(Q=Math.imul(me,Mr))+Math.imul(Re,fr)|0,B=Math.imul(Re,Mr),w=w+Math.imul(Me,Tr)|0,Q=(Q=Q+Math.imul(Me,fn)|0)+Math.imul(yt,Tr)|0,B=B+Math.imul(yt,fn)|0,w=w+Math.imul(pt,dr)|0,Q=(Q=Q+Math.imul(pt,rn)|0)+Math.imul(Be,dr)|0,B=B+Math.imul(Be,rn)|0,w=w+Math.imul(dt,tr)|0,Q=(Q=Q+Math.imul(dt,on)|0)+Math.imul(re,tr)|0,B=B+Math.imul(re,on)|0,w=w+Math.imul(ce,An)|0,Q=(Q=Q+Math.imul(ce,bn)|0)+Math.imul(ye,An)|0,B=B+Math.imul(ye,bn)|0;var po=(Y+(w=w+Math.imul(Ce,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(Ce,Nn)|0)+Math.imul(At,Dr)|0))<<13)|0;Y=((B=B+Math.imul(At,Nn)|0)+(Q>>>13)|0)+(po>>>26)|0,po&=67108863,w=Math.imul(me,Tr),Q=(Q=Math.imul(me,fn))+Math.imul(Re,Tr)|0,B=Math.imul(Re,fn),w=w+Math.imul(Me,dr)|0,Q=(Q=Q+Math.imul(Me,rn)|0)+Math.imul(yt,dr)|0,B=B+Math.imul(yt,rn)|0,w=w+Math.imul(pt,tr)|0,Q=(Q=Q+Math.imul(pt,on)|0)+Math.imul(Be,tr)|0,B=B+Math.imul(Be,on)|0,w=w+Math.imul(dt,An)|0,Q=(Q=Q+Math.imul(dt,bn)|0)+Math.imul(re,An)|0,B=B+Math.imul(re,bn)|0;var Fo=(Y+(w=w+Math.imul(ce,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(ce,Nn)|0)+Math.imul(ye,Dr)|0))<<13)|0;Y=((B=B+Math.imul(ye,Nn)|0)+(Q>>>13)|0)+(Fo>>>26)|0,Fo&=67108863,w=Math.imul(me,dr),Q=(Q=Math.imul(me,rn))+Math.imul(Re,dr)|0,B=Math.imul(Re,rn),w=w+Math.imul(Me,tr)|0,Q=(Q=Q+Math.imul(Me,on)|0)+Math.imul(yt,tr)|0,B=B+Math.imul(yt,on)|0,w=w+Math.imul(pt,An)|0,Q=(Q=Q+Math.imul(pt,bn)|0)+Math.imul(Be,An)|0,B=B+Math.imul(Be,bn)|0;var ri=(Y+(w=w+Math.imul(dt,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(dt,Nn)|0)+Math.imul(re,Dr)|0))<<13)|0;Y=((B=B+Math.imul(re,Nn)|0)+(Q>>>13)|0)+(ri>>>26)|0,ri&=67108863,w=Math.imul(me,tr),Q=(Q=Math.imul(me,on))+Math.imul(Re,tr)|0,B=Math.imul(Re,on),w=w+Math.imul(Me,An)|0,Q=(Q=Q+Math.imul(Me,bn)|0)+Math.imul(yt,An)|0,B=B+Math.imul(yt,bn)|0;var $n=(Y+(w=w+Math.imul(pt,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(pt,Nn)|0)+Math.imul(Be,Dr)|0))<<13)|0;Y=((B=B+Math.imul(Be,Nn)|0)+(Q>>>13)|0)+($n>>>26)|0,$n&=67108863,w=Math.imul(me,An),Q=(Q=Math.imul(me,bn))+Math.imul(Re,An)|0,B=Math.imul(Re,bn);var Bs=(Y+(w=w+Math.imul(Me,Dr)|0)|0)+((8191&(Q=(Q=Q+Math.imul(Me,Nn)|0)+Math.imul(yt,Dr)|0))<<13)|0;Y=((B=B+Math.imul(yt,Nn)|0)+(Q>>>13)|0)+(Bs>>>26)|0,Bs&=67108863;var No=(Y+(w=Math.imul(me,Dr))|0)+((8191&(Q=(Q=Math.imul(me,Nn))+Math.imul(Re,Dr)|0))<<13)|0;return Y=((B=Math.imul(Re,Nn))+(Q>>>13)|0)+(No>>>26)|0,No&=67108863,F[0]=Mn,F[1]=Hn,F[2]=vi,F[3]=qe,F[4]=bt,F[5]=Ft,F[6]=Lr,F[7]=kn,F[8]=Bi,F[9]=ka,F[10]=Va,F[11]=qo,F[12]=Ro,F[13]=po,F[14]=Fo,F[15]=ri,F[16]=$n,F[17]=Bs,F[18]=No,Y!==0&&(F[19]=Y,C.length++),C};function v(x,N,C){C.negative=N.negative^x.negative,C.length=x.length+N.length;for(var w=0,Q=0,B=0;B>>26)|0)>>>26,S&=67108863}C.words[B]=O,w=S,S=Q}return w!==0?C.words[B]=w:C.length--,C.strip()}function y(x,N,C){return new I().mulp(x,N,C)}function I(x,N){this.x=x,this.y=N}Math.imul||(m=p),i.prototype.mulTo=function(x,N){var C=this.length+x.length;return this.length===10&&x.length===10?m(this,x,N):C<63?p(this,x,N):C<1024?v(this,x,N):y(this,x,N)},I.prototype.makeRBT=function(x){for(var N=new Array(x),C=i.prototype._countBits(x)-1,w=0;w>=1;return w},I.prototype.permute=function(x,N,C,w,Q,B){for(var S=0;S>>=1)Q++;return 1<>>=13,C[2*B+1]=8191&Q,Q>>>=13;for(B=2*N;B>=26,N+=w/67108864|0,N+=Q>>>26,this.words[C]=67108863&Q}return N!==0&&(this.words[C]=N,this.length++),this},i.prototype.muln=function(x){return this.clone().imuln(x)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(x){var N=g(x);if(N.length===0)return new i(1);for(var C=this,w=0;w=0);var N,C=x%26,w=(x-C)/26,Q=67108863>>>26-C<<26-C;if(C!==0){var B=0;for(N=0;N>>26-C}B&&(this.words[N]=B,this.length++)}if(w!==0){for(N=this.length-1;N>=0;N--)this.words[N+w]=this.words[N];for(N=0;N=0),w=N?(N-N%26)/26:0;var Q=x%26,B=Math.min((x-Q)/26,this.length),S=67108863^67108863>>>Q<B)for(this.length-=B,F=0;F=0&&(Y!==0||F>=w);F--){var M=0|this.words[F];this.words[F]=Y<<26-Q|M>>>Q,Y=M&S}return O&&Y!==0&&(O.words[O.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(x,N,C){return s(this.negative===0),this.iushrn(x,N,C)},i.prototype.shln=function(x){return this.clone().ishln(x)},i.prototype.ushln=function(x){return this.clone().iushln(x)},i.prototype.shrn=function(x){return this.clone().ishrn(x)},i.prototype.ushrn=function(x){return this.clone().iushrn(x)},i.prototype.testn=function(x){s(typeof x=="number"&&x>=0);var N=x%26,C=(x-N)/26,w=1<=0);var N=x%26,C=(x-N)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(N!==0&&C++,this.length=Math.min(C,this.length),N!==0){var w=67108863^67108863>>>N<=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},i.prototype.isubn=function(x){if(s(typeof x=="number"),s(x<67108864),x<0)return this.iaddn(-x);if(this.negative!==0)return this.negative=0,this.iaddn(x),this.negative=1,this;if(this.words[0]-=x,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N>26)-(O/67108864|0),this.words[w+C]=67108863&Q}for(;w>26,this.words[w+C]=67108863&Q;if(S===0)return this.strip();for(s(S===-1),S=0,w=0;w>26,this.words[w]=67108863&Q;return this.negative=1,this.strip()},i.prototype._wordDiv=function(x,N){var C=this.length-x.length,w=this.clone(),Q=x,B=0|Q.words[Q.length-1];(C=26-this._countBits(B))!=0&&(Q=Q.ushln(C),w.iushln(C),B=0|Q.words[Q.length-1]);var S,O=w.length-Q.length;if(N!=="mod"){(S=new i(null)).length=O+1,S.words=new Array(S.length);for(var F=0;F=0;M--){var z=67108864*(0|w.words[Q.length+M])+(0|w.words[Q.length+M-1]);for(z=Math.min(z/B|0,67108863),w._ishlnsubmul(Q,z,M);w.negative!==0;)z--,w.negative=0,w._ishlnsubmul(Q,1,M),w.isZero()||(w.negative^=1);S&&(S.words[M]=z)}return S&&S.strip(),w.strip(),N!=="div"&&C!==0&&w.iushrn(C),{div:S||null,mod:w}},i.prototype.divmod=function(x,N,C){return s(!x.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:this.negative!==0&&x.negative===0?(B=this.neg().divmod(x,N),N!=="mod"&&(w=B.div.neg()),N!=="div"&&(Q=B.mod.neg(),C&&Q.negative!==0&&Q.iadd(x)),{div:w,mod:Q}):this.negative===0&&x.negative!==0?(B=this.divmod(x.neg(),N),N!=="mod"&&(w=B.div.neg()),{div:w,mod:B.mod}):this.negative&x.negative?(B=this.neg().divmod(x.neg(),N),N!=="div"&&(Q=B.mod.neg(),C&&Q.negative!==0&&Q.isub(x)),{div:B.div,mod:Q}):x.length>this.length||this.cmp(x)<0?{div:new i(0),mod:this}:x.length===1?N==="div"?{div:this.divn(x.words[0]),mod:null}:N==="mod"?{div:null,mod:new i(this.modn(x.words[0]))}:{div:this.divn(x.words[0]),mod:new i(this.modn(x.words[0]))}:this._wordDiv(x,N);var w,Q,B},i.prototype.div=function(x){return this.divmod(x,"div",!1).div},i.prototype.mod=function(x){return this.divmod(x,"mod",!1).mod},i.prototype.umod=function(x){return this.divmod(x,"mod",!0).mod},i.prototype.divRound=function(x){var N=this.divmod(x);if(N.mod.isZero())return N.div;var C=N.div.negative!==0?N.mod.isub(x):N.mod,w=x.ushrn(1),Q=x.andln(1),B=C.cmp(w);return B<0||Q===1&&B===0?N.div:N.div.negative!==0?N.div.isubn(1):N.div.iaddn(1)},i.prototype.modn=function(x){s(x<=67108863);for(var N=(1<<26)%x,C=0,w=this.length-1;w>=0;w--)C=(N*C+(0|this.words[w]))%x;return C},i.prototype.idivn=function(x){s(x<=67108863);for(var N=0,C=this.length-1;C>=0;C--){var w=(0|this.words[C])+67108864*N;this.words[C]=w/x|0,N=w%x}return this.strip()},i.prototype.divn=function(x){return this.clone().idivn(x)},i.prototype.egcd=function(x){s(x.negative===0),s(!x.isZero());var N=this,C=x.clone();N=N.negative!==0?N.umod(x):N.clone();for(var w=new i(1),Q=new i(0),B=new i(0),S=new i(1),O=0;N.isEven()&&C.isEven();)N.iushrn(1),C.iushrn(1),++O;for(var F=C.clone(),Y=N.clone();!N.isZero();){for(var M=0,z=1;!(N.words[0]&z)&&M<26;++M,z<<=1);if(M>0)for(N.iushrn(M);M-- >0;)(w.isOdd()||Q.isOdd())&&(w.iadd(F),Q.isub(Y)),w.iushrn(1),Q.iushrn(1);for(var ue=0,ae=1;!(C.words[0]&ae)&&ue<26;++ue,ae<<=1);if(ue>0)for(C.iushrn(ue);ue-- >0;)(B.isOdd()||S.isOdd())&&(B.iadd(F),S.isub(Y)),B.iushrn(1),S.iushrn(1);N.cmp(C)>=0?(N.isub(C),w.isub(B),Q.isub(S)):(C.isub(N),B.isub(w),S.isub(Q))}return{a:B,b:S,gcd:C.iushln(O)}},i.prototype._invmp=function(x){s(x.negative===0),s(!x.isZero());var N=this,C=x.clone();N=N.negative!==0?N.umod(x):N.clone();for(var w,Q=new i(1),B=new i(0),S=C.clone();N.cmpn(1)>0&&C.cmpn(1)>0;){for(var O=0,F=1;!(N.words[0]&F)&&O<26;++O,F<<=1);if(O>0)for(N.iushrn(O);O-- >0;)Q.isOdd()&&Q.iadd(S),Q.iushrn(1);for(var Y=0,M=1;!(C.words[0]&M)&&Y<26;++Y,M<<=1);if(Y>0)for(C.iushrn(Y);Y-- >0;)B.isOdd()&&B.iadd(S),B.iushrn(1);N.cmp(C)>=0?(N.isub(C),Q.isub(B)):(C.isub(N),B.isub(Q))}return(w=N.cmpn(1)===0?Q:B).cmpn(0)<0&&w.iadd(x),w},i.prototype.gcd=function(x){if(this.isZero())return x.abs();if(x.isZero())return this.abs();var N=this.clone(),C=x.clone();N.negative=0,C.negative=0;for(var w=0;N.isEven()&&C.isEven();w++)N.iushrn(1),C.iushrn(1);for(;;){for(;N.isEven();)N.iushrn(1);for(;C.isEven();)C.iushrn(1);var Q=N.cmp(C);if(Q<0){var B=N;N=C,C=B}else if(Q===0||C.cmpn(1)===0)break;N.isub(C)}return C.iushln(w)},i.prototype.invm=function(x){return this.egcd(x).a.umod(x)},i.prototype.isEven=function(){return(1&this.words[0])==0},i.prototype.isOdd=function(){return(1&this.words[0])==1},i.prototype.andln=function(x){return this.words[0]&x},i.prototype.bincn=function(x){s(typeof x=="number");var N=x%26,C=(x-N)/26,w=1<>>26,S&=67108863,this.words[B]=S}return Q!==0&&(this.words[B]=Q,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(x){var N,C=x<0;if(this.negative!==0&&!C)return-1;if(this.negative===0&&C)return 1;if(this.strip(),this.length>1)N=1;else{C&&(x=-x),s(x<=67108863,"Number is too big");var w=0|this.words[0];N=w===x?0:wx.length)return 1;if(this.length=0;C--){var w=0|this.words[C],Q=0|x.words[C];if(w!==Q){wQ&&(N=1);break}}return N},i.prototype.gtn=function(x){return this.cmpn(x)===1},i.prototype.gt=function(x){return this.cmp(x)===1},i.prototype.gten=function(x){return this.cmpn(x)>=0},i.prototype.gte=function(x){return this.cmp(x)>=0},i.prototype.ltn=function(x){return this.cmpn(x)===-1},i.prototype.lt=function(x){return this.cmp(x)===-1},i.prototype.lten=function(x){return this.cmpn(x)<=0},i.prototype.lte=function(x){return this.cmp(x)<=0},i.prototype.eqn=function(x){return this.cmpn(x)===0},i.prototype.eq=function(x){return this.cmp(x)===0},i.red=function(x){return new H(x)},i.prototype.toRed=function(x){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),x.convertTo(this)._forceRed(x)},i.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(x){return this.red=x,this},i.prototype.forceRed=function(x){return s(!this.red,"Already a number in reduction context"),this._forceRed(x)},i.prototype.redAdd=function(x){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,x)},i.prototype.redIAdd=function(x){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,x)},i.prototype.redSub=function(x){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,x)},i.prototype.redISub=function(x){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,x)},i.prototype.redShl=function(x){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,x)},i.prototype.redMul=function(x){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.mul(this,x)},i.prototype.redIMul=function(x){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.imul(this,x)},i.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(x){return s(this.red&&!x.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,x)};var E={k256:null,p224:null,p192:null,p25519:null};function k(x,N){this.name=x,this.p=new i(N,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function R(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function T(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function j(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function W(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function H(x){if(typeof x=="string"){var N=i._prime(x);this.m=N.p,this.prime=N}else s(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}function X(x){H.call(this,x),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var x=new i(null);return x.words=new Array(Math.ceil(this.n/13)),x},k.prototype.ireduce=function(x){var N,C=x;do this.split(C,this.tmp),N=(C=(C=this.imulK(C)).iadd(this.tmp)).bitLength();while(N>this.n);var w=N0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},k.prototype.split=function(x,N){x.iushrn(this.n,0,N)},k.prototype.imulK=function(x){return x.imul(this.k)},o(R,k),R.prototype.split=function(x,N){for(var C=4194303,w=Math.min(x.length,9),Q=0;Q>>22,B=S}B>>>=22,x.words[Q-10]=B,B===0&&x.length>10?x.length-=10:x.length-=9},R.prototype.imulK=function(x){x.words[x.length]=0,x.words[x.length+1]=0,x.length+=2;for(var N=0,C=0;C>>=26,x.words[C]=Q,N=w}return N!==0&&(x.words[x.length++]=N),x},i._prime=function(x){if(E[x])return E[x];var N;if(x==="k256")N=new R;else if(x==="p224")N=new T;else if(x==="p192")N=new j;else{if(x!=="p25519")throw new Error("Unknown prime "+x);N=new W}return E[x]=N,N},H.prototype._verify1=function(x){s(x.negative===0,"red works only with positives"),s(x.red,"red works only with red numbers")},H.prototype._verify2=function(x,N){s((x.negative|N.negative)==0,"red works only with positives"),s(x.red&&x.red===N.red,"red works only with red numbers")},H.prototype.imod=function(x){return this.prime?this.prime.ireduce(x)._forceRed(this):x.umod(this.m)._forceRed(this)},H.prototype.neg=function(x){return x.isZero()?x.clone():this.m.sub(x)._forceRed(this)},H.prototype.add=function(x,N){this._verify2(x,N);var C=x.add(N);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},H.prototype.iadd=function(x,N){this._verify2(x,N);var C=x.iadd(N);return C.cmp(this.m)>=0&&C.isub(this.m),C},H.prototype.sub=function(x,N){this._verify2(x,N);var C=x.sub(N);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},H.prototype.isub=function(x,N){this._verify2(x,N);var C=x.isub(N);return C.cmpn(0)<0&&C.iadd(this.m),C},H.prototype.shl=function(x,N){return this._verify1(x),this.imod(x.ushln(N))},H.prototype.imul=function(x,N){return this._verify2(x,N),this.imod(x.imul(N))},H.prototype.mul=function(x,N){return this._verify2(x,N),this.imod(x.mul(N))},H.prototype.isqr=function(x){return this.imul(x,x.clone())},H.prototype.sqr=function(x){return this.mul(x,x)},H.prototype.sqrt=function(x){if(x.isZero())return x.clone();var N=this.m.andln(3);if(s(N%2==1),N===3){var C=this.m.add(new i(1)).iushrn(2);return this.pow(x,C)}for(var w=this.m.subn(1),Q=0;!w.isZero()&&w.andln(1)===0;)Q++,w.iushrn(1);s(!w.isZero());var B=new i(1).toRed(this),S=B.redNeg(),O=this.m.subn(1).iushrn(1),F=this.m.bitLength();for(F=new i(2*F*F).toRed(this);this.pow(F,O).cmp(S)!==0;)F.redIAdd(S);for(var Y=this.pow(F,w),M=this.pow(x,w.addn(1).iushrn(1)),z=this.pow(x,w),ue=Q;z.cmp(B)!==0;){for(var ae=z,Ne=0;ae.cmp(B)!==0;Ne++)ae=ae.redSqr();s(Ne=0;Q--){for(var Y=N.words[Q],M=F-1;M>=0;M--){var z=Y>>M&1;B!==w[0]&&(B=this.sqr(B)),z!==0||S!==0?(S<<=1,S|=z,(++O===C||Q===0&&M===0)&&(B=this.mul(B,w[S]),O=0,S=0)):O=0}F=26}return B},H.prototype.convertTo=function(x){var N=x.umod(this.m);return N===x?N.clone():N},H.prototype.convertFrom=function(x){var N=x.clone();return N.red=null,N},i.mont=function(x){return new X(x)},o(X,H),X.prototype.convertTo=function(x){return this.imod(x.ushln(this.shift))},X.prototype.convertFrom=function(x){var N=this.imod(x.mul(this.rinv));return N.red=null,N},X.prototype.imul=function(x,N){if(x.isZero()||N.isZero())return x.words[0]=0,x.length=1,x;var C=x.imul(N),w=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=C.isub(w).iushrn(this.shift),B=Q;return Q.cmp(this.m)>=0?B=Q.isub(this.m):Q.cmpn(0)<0&&(B=Q.iadd(this.m)),B._forceRed(this)},X.prototype.mul=function(x,N){if(x.isZero()||N.isZero())return new i(0)._forceRed(this);var C=x.mul(N),w=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=C.isub(w).iushrn(this.shift),B=Q;return Q.cmp(this.m)>=0?B=Q.isub(this.m):Q.cmpn(0)<0&&(B=Q.iadd(this.m)),B._forceRed(this)},X.prototype.invm=function(x){return this.imod(x._invmp(this.m).mul(this.r2))._forceRed(this)}})(r===void 0||r,void 0)},{buffer:188}],185:[function(e,r,t){t.byteLength=l,t.toByteArray=h,t.fromByteArray=g;for(var n=[],a=[],s=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,c=o.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var v=p.indexOf("=");return v===-1&&(v=m),[v,v===m?0:4-v%4]}function l(p){var m=u(p),v=m[0],y=m[1];return 3*(v+y)/4-y}function A(p,m,v){return 3*(m+v)/4-v}function h(p){var m,v,y=u(p),I=y[0],E=y[1],k=new s(A(p,I,E)),R=0,T=E>0?I-4:I;for(v=0;v>16&255,k[R++]=m>>8&255,k[R++]=255&m;return E===2&&(m=a[p.charCodeAt(v)]<<2|a[p.charCodeAt(v+1)]>>4,k[R++]=255&m),E===1&&(m=a[p.charCodeAt(v)]<<10|a[p.charCodeAt(v+1)]<<4|a[p.charCodeAt(v+2)]>>2,k[R++]=m>>8&255,k[R++]=255&m),k}function f(p){return n[p>>18&63]+n[p>>12&63]+n[p>>6&63]+n[63&p]}function d(p,m,v){for(var y,I=[],E=m;ER?R:k+E));return y===1?(m=p[v-1],I.push(n[m>>2]+n[m<<4&63]+"==")):y===2&&(m=(p[v-2]<<8)+p[v-1],I.push(n[m>>10]+n[m>>4&63]+n[m<<2&63]+"=")),I.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],186:[function(e,r,t){(function(n,a){function s(C,w){if(!C)throw new Error(w||"Assertion failed")}function o(C,w){C.super_=w;var Q=function(){};Q.prototype=w.prototype,C.prototype=new Q,C.prototype.constructor=C}function i(C,w,Q){if(i.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,C!==null&&(w!=="le"&&w!=="be"||(Q=w,w=10),this._init(C||0,w||10,Q||"be"))}var c;typeof n=="object"?n.exports=i:a.BN=i,i.BN=i,i.wordSize=26;try{c=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer}catch{}function u(C,w){var Q=C.charCodeAt(w);return Q>=48&&Q<=57?Q-48:Q>=65&&Q<=70?Q-55:Q>=97&&Q<=102?Q-87:void s(!1,"Invalid character in "+C)}function l(C,w,Q){var B=u(C,Q);return Q-1>=w&&(B|=u(C,Q-1)<<4),B}function A(C,w,Q,B){for(var S=0,O=0,F=Math.min(C.length,Q),Y=w;Y=49?M-49+10:M>=17?M-17+10:M,s(M>=0&&O0?C:w},i.min=function(C,w){return C.cmp(w)<0?C:w},i.prototype._init=function(C,w,Q){if(typeof C=="number")return this._initNumber(C,w,Q);if(typeof C=="object")return this._initArray(C,w,Q);w==="hex"&&(w=16),s(w===(0|w)&&w>=2&&w<=36);var B=0;(C=C.toString().replace(/\s+/g,""))[0]==="-"&&(B++,this.negative=1),B=0;B-=3)O=C[B]|C[B-1]<<8|C[B-2]<<16,this.words[S]|=O<>>26-F&67108863,(F+=24)>=26&&(F-=26,S++);else if(Q==="le")for(B=0,S=0;B>>26-F&67108863,(F+=24)>=26&&(F-=26,S++);return this._strip()},i.prototype._parseHex=function(C,w,Q){this.length=Math.ceil((C.length-w)/6),this.words=new Array(this.length);for(var B=0;B=w;B-=2)S=l(C,w,B)<=18?(O-=18,F+=1,this.words[F]|=S>>>26):O+=8;else for(B=(C.length-w)%2==0?w+1:w;B=18?(O-=18,F+=1,this.words[F]|=S>>>26):O+=8;this._strip()},i.prototype._parseBase=function(C,w,Q){this.words=[0],this.length=1;for(var B=0,S=1;S<=67108863;S*=w)B++;B--,S=S/w|0;for(var O=C.length-Q,F=O%B,Y=Math.min(O,O-F)+Q,M=0,z=Q;z1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(C,w){var Q;if(w=0|w||1,(C=C||10)===16||C==="hex"){Q="";for(var B=0,S=0,O=0;O>>24-B&16777215,(B+=2)>=26&&(B-=26,O--),Q=S!==0||O!==this.length-1?d[6-Y.length]+Y+Q:Y+Q}for(S!==0&&(Q=S.toString(16)+Q);Q.length%w!=0;)Q="0"+Q;return this.negative!==0&&(Q="-"+Q),Q}if(C===(0|C)&&C>=2&&C<=36){var M=g[C],z=p[C];Q="";var ue=this.clone();for(ue.negative=0;!ue.isZero();){var ae=ue.modrn(z).toString(C);Q=(ue=ue.idivn(z)).isZero()?ae+Q:d[M-ae.length]+ae+Q}for(this.isZero()&&(Q="0"+Q);Q.length%w!=0;)Q="0"+Q;return this.negative!==0&&(Q="-"+Q),Q}s(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var C=this.words[0];return this.length===2?C+=67108864*this.words[1]:this.length===3&&this.words[2]===1?C+=4503599627370496+67108864*this.words[1]:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-C:C},i.prototype.toJSON=function(){return this.toString(16,2)},c&&(i.prototype.toBuffer=function(C,w){return this.toArrayLike(c,C,w)}),i.prototype.toArray=function(C,w){return this.toArrayLike(Array,C,w)};var m=function(C,w){return C.allocUnsafe?C.allocUnsafe(w):new C(w)};function v(C){for(var w=new Array(C.bitLength()),Q=0;Q>>S&1}return w}function y(C,w,Q){Q.negative=w.negative^C.negative;var B=C.length+w.length|0;Q.length=B,B=B-1|0;var S=0|C.words[0],O=0|w.words[0],F=S*O,Y=67108863&F,M=F/67108864|0;Q.words[0]=Y;for(var z=1;z>>26,ae=67108863&M,Ne=Math.min(z,w.length-1),Ge=Math.max(0,z-C.length+1);Ge<=Ne;Ge++){var Ye=z-Ge|0;ue+=(F=(S=0|C.words[Ye])*(O=0|w.words[Ge])+ae)/67108864|0,ae=67108863&F}Q.words[z]=0|ae,M=0|ue}return M!==0?Q.words[z]=0|M:Q.length--,Q._strip()}i.prototype.toArrayLike=function(C,w,Q){this._strip();var B=this.byteLength(),S=Q||Math.max(1,B);s(B<=S,"byte array longer than desired length"),s(S>0,"Requested array length <= 0");var O=m(C,S);return this["_toArrayLike"+(w==="le"?"LE":"BE")](O,B),O},i.prototype._toArrayLikeLE=function(C,w){for(var Q=0,B=0,S=0,O=0;S>8&255),Q>16&255),O===6?(Q>24&255),B=0,O=0):(B=F>>>24,O+=2)}if(Q=0&&(C[Q--]=F>>8&255),Q>=0&&(C[Q--]=F>>16&255),O===6?(Q>=0&&(C[Q--]=F>>24&255),B=0,O=0):(B=F>>>24,O+=2)}if(Q>=0)for(C[Q--]=B;Q>=0;)C[Q--]=0},Math.clz32?i.prototype._countBits=function(C){return 32-Math.clz32(C)}:i.prototype._countBits=function(C){var w=C,Q=0;return w>=4096&&(Q+=13,w>>>=13),w>=64&&(Q+=7,w>>>=7),w>=8&&(Q+=4,w>>>=4),w>=2&&(Q+=2,w>>>=2),Q+w},i.prototype._zeroBits=function(C){if(C===0)return 26;var w=C,Q=0;return!(8191&w)&&(Q+=13,w>>>=13),!(127&w)&&(Q+=7,w>>>=7),!(15&w)&&(Q+=4,w>>>=4),!(3&w)&&(Q+=2,w>>>=2),!(1&w)&&Q++,Q},i.prototype.bitLength=function(){var C=this.words[this.length-1],w=this._countBits(C);return 26*(this.length-1)+w},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var C=0,w=0;wC.length?this.clone().ior(C):C.clone().ior(this)},i.prototype.uor=function(C){return this.length>C.length?this.clone().iuor(C):C.clone().iuor(this)},i.prototype.iuand=function(C){var w;w=this.length>C.length?C:this;for(var Q=0;QC.length?this.clone().iand(C):C.clone().iand(this)},i.prototype.uand=function(C){return this.length>C.length?this.clone().iuand(C):C.clone().iuand(this)},i.prototype.iuxor=function(C){var w,Q;this.length>C.length?(w=this,Q=C):(w=C,Q=this);for(var B=0;BC.length?this.clone().ixor(C):C.clone().ixor(this)},i.prototype.uxor=function(C){return this.length>C.length?this.clone().iuxor(C):C.clone().iuxor(this)},i.prototype.inotn=function(C){s(typeof C=="number"&&C>=0);var w=0|Math.ceil(C/26),Q=C%26;this._expand(w),Q>0&&w--;for(var B=0;B0&&(this.words[B]=~this.words[B]&67108863>>26-Q),this._strip()},i.prototype.notn=function(C){return this.clone().inotn(C)},i.prototype.setn=function(C,w){s(typeof C=="number"&&C>=0);var Q=C/26|0,B=C%26;return this._expand(Q+1),this.words[Q]=w?this.words[Q]|1<C.length?(Q=this,B=C):(Q=C,B=this);for(var S=0,O=0;O>>26;for(;S!==0&&O>>26;if(this.length=Q.length,S!==0)this.words[this.length]=S,this.length++;else if(Q!==this)for(;OC.length?this.clone().iadd(C):C.clone().iadd(this)},i.prototype.isub=function(C){if(C.negative!==0){C.negative=0;var w=this.iadd(C);return C.negative=1,w._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(C),this.negative=1,this._normSign();var Q,B,S=this.cmp(C);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;S>0?(Q=this,B=C):(Q=C,B=this);for(var O=0,F=0;F>26,this.words[F]=67108863&w;for(;O!==0&&F>26,this.words[F]=67108863&w;if(O===0&&F>>13,Ge=0|F[1],Ye=8191&Ge,Ae=Ge>>>13,te=0|F[2],he=8191&te,de=te>>>13,Ke=0|F[3],le=8191&Ke,Ce=Ke>>>13,At=0|F[4],Z=8191&At,ce=At>>>13,ye=0|F[5],Ve=8191&ye,dt=ye>>>13,re=0|F[6],ot=8191&re,pt=re>>>13,Be=0|F[7],Ee=8191&Be,Me=Be>>>13,yt=0|F[8],pe=8191&yt,me=yt>>>13,Re=0|F[9],Ze=8191&Re,ke=Re>>>13,Pe=0|Y[0],_e=8191&Pe,Je=Pe>>>13,at=0|Y[1],Dt=8191&at,St=at>>>13,hr=0|Y[2],Wt=8191&hr,Ut=hr>>>13,ur=0|Y[3],Br=8191&ur,fr=ur>>>13,Mr=0|Y[4],er=8191&Mr,Tr=Mr>>>13,fn=0|Y[5],_n=8191&fn,dr=fn>>>13,rn=0|Y[6],Kr=8191&rn,tr=rn>>>13,on=0|Y[7],nn=8191&on,An=on>>>13,bn=0|Y[8],Gn=8191&bn,Dr=bn>>>13,Nn=0|Y[9],Mn=8191&Nn,Hn=Nn>>>13;Q.negative=C.negative^w.negative,Q.length=19;var vi=(z+(B=Math.imul(ae,_e))|0)+((8191&(S=(S=Math.imul(ae,Je))+Math.imul(Ne,_e)|0))<<13)|0;z=((O=Math.imul(Ne,Je))+(S>>>13)|0)+(vi>>>26)|0,vi&=67108863,B=Math.imul(Ye,_e),S=(S=Math.imul(Ye,Je))+Math.imul(Ae,_e)|0,O=Math.imul(Ae,Je);var qe=(z+(B=B+Math.imul(ae,Dt)|0)|0)+((8191&(S=(S=S+Math.imul(ae,St)|0)+Math.imul(Ne,Dt)|0))<<13)|0;z=((O=O+Math.imul(Ne,St)|0)+(S>>>13)|0)+(qe>>>26)|0,qe&=67108863,B=Math.imul(he,_e),S=(S=Math.imul(he,Je))+Math.imul(de,_e)|0,O=Math.imul(de,Je),B=B+Math.imul(Ye,Dt)|0,S=(S=S+Math.imul(Ye,St)|0)+Math.imul(Ae,Dt)|0,O=O+Math.imul(Ae,St)|0;var bt=(z+(B=B+Math.imul(ae,Wt)|0)|0)+((8191&(S=(S=S+Math.imul(ae,Ut)|0)+Math.imul(Ne,Wt)|0))<<13)|0;z=((O=O+Math.imul(Ne,Ut)|0)+(S>>>13)|0)+(bt>>>26)|0,bt&=67108863,B=Math.imul(le,_e),S=(S=Math.imul(le,Je))+Math.imul(Ce,_e)|0,O=Math.imul(Ce,Je),B=B+Math.imul(he,Dt)|0,S=(S=S+Math.imul(he,St)|0)+Math.imul(de,Dt)|0,O=O+Math.imul(de,St)|0,B=B+Math.imul(Ye,Wt)|0,S=(S=S+Math.imul(Ye,Ut)|0)+Math.imul(Ae,Wt)|0,O=O+Math.imul(Ae,Ut)|0;var Ft=(z+(B=B+Math.imul(ae,Br)|0)|0)+((8191&(S=(S=S+Math.imul(ae,fr)|0)+Math.imul(Ne,Br)|0))<<13)|0;z=((O=O+Math.imul(Ne,fr)|0)+(S>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,B=Math.imul(Z,_e),S=(S=Math.imul(Z,Je))+Math.imul(ce,_e)|0,O=Math.imul(ce,Je),B=B+Math.imul(le,Dt)|0,S=(S=S+Math.imul(le,St)|0)+Math.imul(Ce,Dt)|0,O=O+Math.imul(Ce,St)|0,B=B+Math.imul(he,Wt)|0,S=(S=S+Math.imul(he,Ut)|0)+Math.imul(de,Wt)|0,O=O+Math.imul(de,Ut)|0,B=B+Math.imul(Ye,Br)|0,S=(S=S+Math.imul(Ye,fr)|0)+Math.imul(Ae,Br)|0,O=O+Math.imul(Ae,fr)|0;var Lr=(z+(B=B+Math.imul(ae,er)|0)|0)+((8191&(S=(S=S+Math.imul(ae,Tr)|0)+Math.imul(Ne,er)|0))<<13)|0;z=((O=O+Math.imul(Ne,Tr)|0)+(S>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,B=Math.imul(Ve,_e),S=(S=Math.imul(Ve,Je))+Math.imul(dt,_e)|0,O=Math.imul(dt,Je),B=B+Math.imul(Z,Dt)|0,S=(S=S+Math.imul(Z,St)|0)+Math.imul(ce,Dt)|0,O=O+Math.imul(ce,St)|0,B=B+Math.imul(le,Wt)|0,S=(S=S+Math.imul(le,Ut)|0)+Math.imul(Ce,Wt)|0,O=O+Math.imul(Ce,Ut)|0,B=B+Math.imul(he,Br)|0,S=(S=S+Math.imul(he,fr)|0)+Math.imul(de,Br)|0,O=O+Math.imul(de,fr)|0,B=B+Math.imul(Ye,er)|0,S=(S=S+Math.imul(Ye,Tr)|0)+Math.imul(Ae,er)|0,O=O+Math.imul(Ae,Tr)|0;var kn=(z+(B=B+Math.imul(ae,_n)|0)|0)+((8191&(S=(S=S+Math.imul(ae,dr)|0)+Math.imul(Ne,_n)|0))<<13)|0;z=((O=O+Math.imul(Ne,dr)|0)+(S>>>13)|0)+(kn>>>26)|0,kn&=67108863,B=Math.imul(ot,_e),S=(S=Math.imul(ot,Je))+Math.imul(pt,_e)|0,O=Math.imul(pt,Je),B=B+Math.imul(Ve,Dt)|0,S=(S=S+Math.imul(Ve,St)|0)+Math.imul(dt,Dt)|0,O=O+Math.imul(dt,St)|0,B=B+Math.imul(Z,Wt)|0,S=(S=S+Math.imul(Z,Ut)|0)+Math.imul(ce,Wt)|0,O=O+Math.imul(ce,Ut)|0,B=B+Math.imul(le,Br)|0,S=(S=S+Math.imul(le,fr)|0)+Math.imul(Ce,Br)|0,O=O+Math.imul(Ce,fr)|0,B=B+Math.imul(he,er)|0,S=(S=S+Math.imul(he,Tr)|0)+Math.imul(de,er)|0,O=O+Math.imul(de,Tr)|0,B=B+Math.imul(Ye,_n)|0,S=(S=S+Math.imul(Ye,dr)|0)+Math.imul(Ae,_n)|0,O=O+Math.imul(Ae,dr)|0;var Bi=(z+(B=B+Math.imul(ae,Kr)|0)|0)+((8191&(S=(S=S+Math.imul(ae,tr)|0)+Math.imul(Ne,Kr)|0))<<13)|0;z=((O=O+Math.imul(Ne,tr)|0)+(S>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,B=Math.imul(Ee,_e),S=(S=Math.imul(Ee,Je))+Math.imul(Me,_e)|0,O=Math.imul(Me,Je),B=B+Math.imul(ot,Dt)|0,S=(S=S+Math.imul(ot,St)|0)+Math.imul(pt,Dt)|0,O=O+Math.imul(pt,St)|0,B=B+Math.imul(Ve,Wt)|0,S=(S=S+Math.imul(Ve,Ut)|0)+Math.imul(dt,Wt)|0,O=O+Math.imul(dt,Ut)|0,B=B+Math.imul(Z,Br)|0,S=(S=S+Math.imul(Z,fr)|0)+Math.imul(ce,Br)|0,O=O+Math.imul(ce,fr)|0,B=B+Math.imul(le,er)|0,S=(S=S+Math.imul(le,Tr)|0)+Math.imul(Ce,er)|0,O=O+Math.imul(Ce,Tr)|0,B=B+Math.imul(he,_n)|0,S=(S=S+Math.imul(he,dr)|0)+Math.imul(de,_n)|0,O=O+Math.imul(de,dr)|0,B=B+Math.imul(Ye,Kr)|0,S=(S=S+Math.imul(Ye,tr)|0)+Math.imul(Ae,Kr)|0,O=O+Math.imul(Ae,tr)|0;var ka=(z+(B=B+Math.imul(ae,nn)|0)|0)+((8191&(S=(S=S+Math.imul(ae,An)|0)+Math.imul(Ne,nn)|0))<<13)|0;z=((O=O+Math.imul(Ne,An)|0)+(S>>>13)|0)+(ka>>>26)|0,ka&=67108863,B=Math.imul(pe,_e),S=(S=Math.imul(pe,Je))+Math.imul(me,_e)|0,O=Math.imul(me,Je),B=B+Math.imul(Ee,Dt)|0,S=(S=S+Math.imul(Ee,St)|0)+Math.imul(Me,Dt)|0,O=O+Math.imul(Me,St)|0,B=B+Math.imul(ot,Wt)|0,S=(S=S+Math.imul(ot,Ut)|0)+Math.imul(pt,Wt)|0,O=O+Math.imul(pt,Ut)|0,B=B+Math.imul(Ve,Br)|0,S=(S=S+Math.imul(Ve,fr)|0)+Math.imul(dt,Br)|0,O=O+Math.imul(dt,fr)|0,B=B+Math.imul(Z,er)|0,S=(S=S+Math.imul(Z,Tr)|0)+Math.imul(ce,er)|0,O=O+Math.imul(ce,Tr)|0,B=B+Math.imul(le,_n)|0,S=(S=S+Math.imul(le,dr)|0)+Math.imul(Ce,_n)|0,O=O+Math.imul(Ce,dr)|0,B=B+Math.imul(he,Kr)|0,S=(S=S+Math.imul(he,tr)|0)+Math.imul(de,Kr)|0,O=O+Math.imul(de,tr)|0,B=B+Math.imul(Ye,nn)|0,S=(S=S+Math.imul(Ye,An)|0)+Math.imul(Ae,nn)|0,O=O+Math.imul(Ae,An)|0;var Va=(z+(B=B+Math.imul(ae,Gn)|0)|0)+((8191&(S=(S=S+Math.imul(ae,Dr)|0)+Math.imul(Ne,Gn)|0))<<13)|0;z=((O=O+Math.imul(Ne,Dr)|0)+(S>>>13)|0)+(Va>>>26)|0,Va&=67108863,B=Math.imul(Ze,_e),S=(S=Math.imul(Ze,Je))+Math.imul(ke,_e)|0,O=Math.imul(ke,Je),B=B+Math.imul(pe,Dt)|0,S=(S=S+Math.imul(pe,St)|0)+Math.imul(me,Dt)|0,O=O+Math.imul(me,St)|0,B=B+Math.imul(Ee,Wt)|0,S=(S=S+Math.imul(Ee,Ut)|0)+Math.imul(Me,Wt)|0,O=O+Math.imul(Me,Ut)|0,B=B+Math.imul(ot,Br)|0,S=(S=S+Math.imul(ot,fr)|0)+Math.imul(pt,Br)|0,O=O+Math.imul(pt,fr)|0,B=B+Math.imul(Ve,er)|0,S=(S=S+Math.imul(Ve,Tr)|0)+Math.imul(dt,er)|0,O=O+Math.imul(dt,Tr)|0,B=B+Math.imul(Z,_n)|0,S=(S=S+Math.imul(Z,dr)|0)+Math.imul(ce,_n)|0,O=O+Math.imul(ce,dr)|0,B=B+Math.imul(le,Kr)|0,S=(S=S+Math.imul(le,tr)|0)+Math.imul(Ce,Kr)|0,O=O+Math.imul(Ce,tr)|0,B=B+Math.imul(he,nn)|0,S=(S=S+Math.imul(he,An)|0)+Math.imul(de,nn)|0,O=O+Math.imul(de,An)|0,B=B+Math.imul(Ye,Gn)|0,S=(S=S+Math.imul(Ye,Dr)|0)+Math.imul(Ae,Gn)|0,O=O+Math.imul(Ae,Dr)|0;var qo=(z+(B=B+Math.imul(ae,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(ae,Hn)|0)+Math.imul(Ne,Mn)|0))<<13)|0;z=((O=O+Math.imul(Ne,Hn)|0)+(S>>>13)|0)+(qo>>>26)|0,qo&=67108863,B=Math.imul(Ze,Dt),S=(S=Math.imul(Ze,St))+Math.imul(ke,Dt)|0,O=Math.imul(ke,St),B=B+Math.imul(pe,Wt)|0,S=(S=S+Math.imul(pe,Ut)|0)+Math.imul(me,Wt)|0,O=O+Math.imul(me,Ut)|0,B=B+Math.imul(Ee,Br)|0,S=(S=S+Math.imul(Ee,fr)|0)+Math.imul(Me,Br)|0,O=O+Math.imul(Me,fr)|0,B=B+Math.imul(ot,er)|0,S=(S=S+Math.imul(ot,Tr)|0)+Math.imul(pt,er)|0,O=O+Math.imul(pt,Tr)|0,B=B+Math.imul(Ve,_n)|0,S=(S=S+Math.imul(Ve,dr)|0)+Math.imul(dt,_n)|0,O=O+Math.imul(dt,dr)|0,B=B+Math.imul(Z,Kr)|0,S=(S=S+Math.imul(Z,tr)|0)+Math.imul(ce,Kr)|0,O=O+Math.imul(ce,tr)|0,B=B+Math.imul(le,nn)|0,S=(S=S+Math.imul(le,An)|0)+Math.imul(Ce,nn)|0,O=O+Math.imul(Ce,An)|0,B=B+Math.imul(he,Gn)|0,S=(S=S+Math.imul(he,Dr)|0)+Math.imul(de,Gn)|0,O=O+Math.imul(de,Dr)|0;var Ro=(z+(B=B+Math.imul(Ye,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(Ye,Hn)|0)+Math.imul(Ae,Mn)|0))<<13)|0;z=((O=O+Math.imul(Ae,Hn)|0)+(S>>>13)|0)+(Ro>>>26)|0,Ro&=67108863,B=Math.imul(Ze,Wt),S=(S=Math.imul(Ze,Ut))+Math.imul(ke,Wt)|0,O=Math.imul(ke,Ut),B=B+Math.imul(pe,Br)|0,S=(S=S+Math.imul(pe,fr)|0)+Math.imul(me,Br)|0,O=O+Math.imul(me,fr)|0,B=B+Math.imul(Ee,er)|0,S=(S=S+Math.imul(Ee,Tr)|0)+Math.imul(Me,er)|0,O=O+Math.imul(Me,Tr)|0,B=B+Math.imul(ot,_n)|0,S=(S=S+Math.imul(ot,dr)|0)+Math.imul(pt,_n)|0,O=O+Math.imul(pt,dr)|0,B=B+Math.imul(Ve,Kr)|0,S=(S=S+Math.imul(Ve,tr)|0)+Math.imul(dt,Kr)|0,O=O+Math.imul(dt,tr)|0,B=B+Math.imul(Z,nn)|0,S=(S=S+Math.imul(Z,An)|0)+Math.imul(ce,nn)|0,O=O+Math.imul(ce,An)|0,B=B+Math.imul(le,Gn)|0,S=(S=S+Math.imul(le,Dr)|0)+Math.imul(Ce,Gn)|0,O=O+Math.imul(Ce,Dr)|0;var po=(z+(B=B+Math.imul(he,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(he,Hn)|0)+Math.imul(de,Mn)|0))<<13)|0;z=((O=O+Math.imul(de,Hn)|0)+(S>>>13)|0)+(po>>>26)|0,po&=67108863,B=Math.imul(Ze,Br),S=(S=Math.imul(Ze,fr))+Math.imul(ke,Br)|0,O=Math.imul(ke,fr),B=B+Math.imul(pe,er)|0,S=(S=S+Math.imul(pe,Tr)|0)+Math.imul(me,er)|0,O=O+Math.imul(me,Tr)|0,B=B+Math.imul(Ee,_n)|0,S=(S=S+Math.imul(Ee,dr)|0)+Math.imul(Me,_n)|0,O=O+Math.imul(Me,dr)|0,B=B+Math.imul(ot,Kr)|0,S=(S=S+Math.imul(ot,tr)|0)+Math.imul(pt,Kr)|0,O=O+Math.imul(pt,tr)|0,B=B+Math.imul(Ve,nn)|0,S=(S=S+Math.imul(Ve,An)|0)+Math.imul(dt,nn)|0,O=O+Math.imul(dt,An)|0,B=B+Math.imul(Z,Gn)|0,S=(S=S+Math.imul(Z,Dr)|0)+Math.imul(ce,Gn)|0,O=O+Math.imul(ce,Dr)|0;var Fo=(z+(B=B+Math.imul(le,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(le,Hn)|0)+Math.imul(Ce,Mn)|0))<<13)|0;z=((O=O+Math.imul(Ce,Hn)|0)+(S>>>13)|0)+(Fo>>>26)|0,Fo&=67108863,B=Math.imul(Ze,er),S=(S=Math.imul(Ze,Tr))+Math.imul(ke,er)|0,O=Math.imul(ke,Tr),B=B+Math.imul(pe,_n)|0,S=(S=S+Math.imul(pe,dr)|0)+Math.imul(me,_n)|0,O=O+Math.imul(me,dr)|0,B=B+Math.imul(Ee,Kr)|0,S=(S=S+Math.imul(Ee,tr)|0)+Math.imul(Me,Kr)|0,O=O+Math.imul(Me,tr)|0,B=B+Math.imul(ot,nn)|0,S=(S=S+Math.imul(ot,An)|0)+Math.imul(pt,nn)|0,O=O+Math.imul(pt,An)|0,B=B+Math.imul(Ve,Gn)|0,S=(S=S+Math.imul(Ve,Dr)|0)+Math.imul(dt,Gn)|0,O=O+Math.imul(dt,Dr)|0;var ri=(z+(B=B+Math.imul(Z,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(Z,Hn)|0)+Math.imul(ce,Mn)|0))<<13)|0;z=((O=O+Math.imul(ce,Hn)|0)+(S>>>13)|0)+(ri>>>26)|0,ri&=67108863,B=Math.imul(Ze,_n),S=(S=Math.imul(Ze,dr))+Math.imul(ke,_n)|0,O=Math.imul(ke,dr),B=B+Math.imul(pe,Kr)|0,S=(S=S+Math.imul(pe,tr)|0)+Math.imul(me,Kr)|0,O=O+Math.imul(me,tr)|0,B=B+Math.imul(Ee,nn)|0,S=(S=S+Math.imul(Ee,An)|0)+Math.imul(Me,nn)|0,O=O+Math.imul(Me,An)|0,B=B+Math.imul(ot,Gn)|0,S=(S=S+Math.imul(ot,Dr)|0)+Math.imul(pt,Gn)|0,O=O+Math.imul(pt,Dr)|0;var $n=(z+(B=B+Math.imul(Ve,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(Ve,Hn)|0)+Math.imul(dt,Mn)|0))<<13)|0;z=((O=O+Math.imul(dt,Hn)|0)+(S>>>13)|0)+($n>>>26)|0,$n&=67108863,B=Math.imul(Ze,Kr),S=(S=Math.imul(Ze,tr))+Math.imul(ke,Kr)|0,O=Math.imul(ke,tr),B=B+Math.imul(pe,nn)|0,S=(S=S+Math.imul(pe,An)|0)+Math.imul(me,nn)|0,O=O+Math.imul(me,An)|0,B=B+Math.imul(Ee,Gn)|0,S=(S=S+Math.imul(Ee,Dr)|0)+Math.imul(Me,Gn)|0,O=O+Math.imul(Me,Dr)|0;var Bs=(z+(B=B+Math.imul(ot,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(ot,Hn)|0)+Math.imul(pt,Mn)|0))<<13)|0;z=((O=O+Math.imul(pt,Hn)|0)+(S>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,B=Math.imul(Ze,nn),S=(S=Math.imul(Ze,An))+Math.imul(ke,nn)|0,O=Math.imul(ke,An),B=B+Math.imul(pe,Gn)|0,S=(S=S+Math.imul(pe,Dr)|0)+Math.imul(me,Gn)|0,O=O+Math.imul(me,Dr)|0;var No=(z+(B=B+Math.imul(Ee,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(Ee,Hn)|0)+Math.imul(Me,Mn)|0))<<13)|0;z=((O=O+Math.imul(Me,Hn)|0)+(S>>>13)|0)+(No>>>26)|0,No&=67108863,B=Math.imul(Ze,Gn),S=(S=Math.imul(Ze,Dr))+Math.imul(ke,Gn)|0,O=Math.imul(ke,Dr);var Qs=(z+(B=B+Math.imul(pe,Mn)|0)|0)+((8191&(S=(S=S+Math.imul(pe,Hn)|0)+Math.imul(me,Mn)|0))<<13)|0;z=((O=O+Math.imul(me,Hn)|0)+(S>>>13)|0)+(Qs>>>26)|0,Qs&=67108863;var bc=(z+(B=Math.imul(Ze,Mn))|0)+((8191&(S=(S=Math.imul(Ze,Hn))+Math.imul(ke,Mn)|0))<<13)|0;return z=((O=Math.imul(ke,Hn))+(S>>>13)|0)+(bc>>>26)|0,bc&=67108863,M[0]=vi,M[1]=qe,M[2]=bt,M[3]=Ft,M[4]=Lr,M[5]=kn,M[6]=Bi,M[7]=ka,M[8]=Va,M[9]=qo,M[10]=Ro,M[11]=po,M[12]=Fo,M[13]=ri,M[14]=$n,M[15]=Bs,M[16]=No,M[17]=Qs,M[18]=bc,z!==0&&(M[19]=z,Q.length++),Q};function E(C,w,Q){Q.negative=w.negative^C.negative,Q.length=C.length+w.length;for(var B=0,S=0,O=0;O>>26)|0)>>>26,F&=67108863}Q.words[O]=Y,B=F,F=S}return B!==0?Q.words[O]=B:Q.length--,Q._strip()}function k(C,w,Q){return E(C,w,Q)}Math.imul||(I=y),i.prototype.mulTo=function(C,w){var Q=this.length+C.length;return this.length===10&&C.length===10?I(this,C,w):Q<63?y(this,C,w):Q<1024?E(this,C,w):k(this,C,w)},i.prototype.mul=function(C){var w=new i(null);return w.words=new Array(this.length+C.length),this.mulTo(C,w)},i.prototype.mulf=function(C){var w=new i(null);return w.words=new Array(this.length+C.length),k(this,C,w)},i.prototype.imul=function(C){return this.clone().mulTo(C,this)},i.prototype.imuln=function(C){var w=C<0;w&&(C=-C),s(typeof C=="number"),s(C<67108864);for(var Q=0,B=0;B>=26,Q+=S/67108864|0,Q+=O>>>26,this.words[B]=67108863&O}return Q!==0&&(this.words[B]=Q,this.length++),w?this.ineg():this},i.prototype.muln=function(C){return this.clone().imuln(C)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(C){var w=v(C);if(w.length===0)return new i(1);for(var Q=this,B=0;B=0);var w,Q=C%26,B=(C-Q)/26,S=67108863>>>26-Q<<26-Q;if(Q!==0){var O=0;for(w=0;w>>26-Q}O&&(this.words[w]=O,this.length++)}if(B!==0){for(w=this.length-1;w>=0;w--)this.words[w+B]=this.words[w];for(w=0;w=0),B=w?(w-w%26)/26:0;var S=C%26,O=Math.min((C-S)/26,this.length),F=67108863^67108863>>>S<O)for(this.length-=O,M=0;M=0&&(z!==0||M>=B);M--){var ue=0|this.words[M];this.words[M]=z<<26-S|ue>>>S,z=ue&F}return Y&&z!==0&&(Y.words[Y.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(C,w,Q){return s(this.negative===0),this.iushrn(C,w,Q)},i.prototype.shln=function(C){return this.clone().ishln(C)},i.prototype.ushln=function(C){return this.clone().iushln(C)},i.prototype.shrn=function(C){return this.clone().ishrn(C)},i.prototype.ushrn=function(C){return this.clone().iushrn(C)},i.prototype.testn=function(C){s(typeof C=="number"&&C>=0);var w=C%26,Q=(C-w)/26,B=1<=0);var w=C%26,Q=(C-w)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=Q)return this;if(w!==0&&Q++,this.length=Math.min(Q,this.length),w!==0){var B=67108863^67108863>>>w<=67108864;w++)this.words[w]-=67108864,w===this.length-1?this.words[w+1]=1:this.words[w+1]++;return this.length=Math.max(this.length,w+1),this},i.prototype.isubn=function(C){if(s(typeof C=="number"),s(C<67108864),C<0)return this.iaddn(-C);if(this.negative!==0)return this.negative=0,this.iaddn(C),this.negative=1,this;if(this.words[0]-=C,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var w=0;w>26)-(Y/67108864|0),this.words[B+Q]=67108863&S}for(;B>26,this.words[B+Q]=67108863&S;if(F===0)return this._strip();for(s(F===-1),F=0,B=0;B>26,this.words[B]=67108863&S;return this.negative=1,this._strip()},i.prototype._wordDiv=function(C,w){var Q=this.length-C.length,B=this.clone(),S=C,O=0|S.words[S.length-1];(Q=26-this._countBits(O))!=0&&(S=S.ushln(Q),B.iushln(Q),O=0|S.words[S.length-1]);var F,Y=B.length-S.length;if(w!=="mod"){(F=new i(null)).length=Y+1,F.words=new Array(F.length);for(var M=0;M=0;ue--){var ae=67108864*(0|B.words[S.length+ue])+(0|B.words[S.length+ue-1]);for(ae=Math.min(ae/O|0,67108863),B._ishlnsubmul(S,ae,ue);B.negative!==0;)ae--,B.negative=0,B._ishlnsubmul(S,1,ue),B.isZero()||(B.negative^=1);F&&(F.words[ue]=ae)}return F&&F._strip(),B._strip(),w!=="div"&&Q!==0&&B.iushrn(Q),{div:F||null,mod:B}},i.prototype.divmod=function(C,w,Q){return s(!C.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:this.negative!==0&&C.negative===0?(O=this.neg().divmod(C,w),w!=="mod"&&(B=O.div.neg()),w!=="div"&&(S=O.mod.neg(),Q&&S.negative!==0&&S.iadd(C)),{div:B,mod:S}):this.negative===0&&C.negative!==0?(O=this.divmod(C.neg(),w),w!=="mod"&&(B=O.div.neg()),{div:B,mod:O.mod}):this.negative&C.negative?(O=this.neg().divmod(C.neg(),w),w!=="div"&&(S=O.mod.neg(),Q&&S.negative!==0&&S.isub(C)),{div:O.div,mod:S}):C.length>this.length||this.cmp(C)<0?{div:new i(0),mod:this}:C.length===1?w==="div"?{div:this.divn(C.words[0]),mod:null}:w==="mod"?{div:null,mod:new i(this.modrn(C.words[0]))}:{div:this.divn(C.words[0]),mod:new i(this.modrn(C.words[0]))}:this._wordDiv(C,w);var B,S,O},i.prototype.div=function(C){return this.divmod(C,"div",!1).div},i.prototype.mod=function(C){return this.divmod(C,"mod",!1).mod},i.prototype.umod=function(C){return this.divmod(C,"mod",!0).mod},i.prototype.divRound=function(C){var w=this.divmod(C);if(w.mod.isZero())return w.div;var Q=w.div.negative!==0?w.mod.isub(C):w.mod,B=C.ushrn(1),S=C.andln(1),O=Q.cmp(B);return O<0||S===1&&O===0?w.div:w.div.negative!==0?w.div.isubn(1):w.div.iaddn(1)},i.prototype.modrn=function(C){var w=C<0;w&&(C=-C),s(C<=67108863);for(var Q=(1<<26)%C,B=0,S=this.length-1;S>=0;S--)B=(Q*B+(0|this.words[S]))%C;return w?-B:B},i.prototype.modn=function(C){return this.modrn(C)},i.prototype.idivn=function(C){var w=C<0;w&&(C=-C),s(C<=67108863);for(var Q=0,B=this.length-1;B>=0;B--){var S=(0|this.words[B])+67108864*Q;this.words[B]=S/C|0,Q=S%C}return this._strip(),w?this.ineg():this},i.prototype.divn=function(C){return this.clone().idivn(C)},i.prototype.egcd=function(C){s(C.negative===0),s(!C.isZero());var w=this,Q=C.clone();w=w.negative!==0?w.umod(C):w.clone();for(var B=new i(1),S=new i(0),O=new i(0),F=new i(1),Y=0;w.isEven()&&Q.isEven();)w.iushrn(1),Q.iushrn(1),++Y;for(var M=Q.clone(),z=w.clone();!w.isZero();){for(var ue=0,ae=1;!(w.words[0]&ae)&&ue<26;++ue,ae<<=1);if(ue>0)for(w.iushrn(ue);ue-- >0;)(B.isOdd()||S.isOdd())&&(B.iadd(M),S.isub(z)),B.iushrn(1),S.iushrn(1);for(var Ne=0,Ge=1;!(Q.words[0]&Ge)&&Ne<26;++Ne,Ge<<=1);if(Ne>0)for(Q.iushrn(Ne);Ne-- >0;)(O.isOdd()||F.isOdd())&&(O.iadd(M),F.isub(z)),O.iushrn(1),F.iushrn(1);w.cmp(Q)>=0?(w.isub(Q),B.isub(O),S.isub(F)):(Q.isub(w),O.isub(B),F.isub(S))}return{a:O,b:F,gcd:Q.iushln(Y)}},i.prototype._invmp=function(C){s(C.negative===0),s(!C.isZero());var w=this,Q=C.clone();w=w.negative!==0?w.umod(C):w.clone();for(var B,S=new i(1),O=new i(0),F=Q.clone();w.cmpn(1)>0&&Q.cmpn(1)>0;){for(var Y=0,M=1;!(w.words[0]&M)&&Y<26;++Y,M<<=1);if(Y>0)for(w.iushrn(Y);Y-- >0;)S.isOdd()&&S.iadd(F),S.iushrn(1);for(var z=0,ue=1;!(Q.words[0]&ue)&&z<26;++z,ue<<=1);if(z>0)for(Q.iushrn(z);z-- >0;)O.isOdd()&&O.iadd(F),O.iushrn(1);w.cmp(Q)>=0?(w.isub(Q),S.isub(O)):(Q.isub(w),O.isub(S))}return(B=w.cmpn(1)===0?S:O).cmpn(0)<0&&B.iadd(C),B},i.prototype.gcd=function(C){if(this.isZero())return C.abs();if(C.isZero())return this.abs();var w=this.clone(),Q=C.clone();w.negative=0,Q.negative=0;for(var B=0;w.isEven()&&Q.isEven();B++)w.iushrn(1),Q.iushrn(1);for(;;){for(;w.isEven();)w.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var S=w.cmp(Q);if(S<0){var O=w;w=Q,Q=O}else if(S===0||Q.cmpn(1)===0)break;w.isub(Q)}return Q.iushln(B)},i.prototype.invm=function(C){return this.egcd(C).a.umod(C)},i.prototype.isEven=function(){return(1&this.words[0])==0},i.prototype.isOdd=function(){return(1&this.words[0])==1},i.prototype.andln=function(C){return this.words[0]&C},i.prototype.bincn=function(C){s(typeof C=="number");var w=C%26,Q=(C-w)/26,B=1<>>26,F&=67108863,this.words[O]=F}return S!==0&&(this.words[O]=S,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(C){var w,Q=C<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;if(this._strip(),this.length>1)w=1;else{Q&&(C=-C),s(C<=67108863,"Number is too big");var B=0|this.words[0];w=B===C?0:BC.length)return 1;if(this.length=0;Q--){var B=0|this.words[Q],S=0|C.words[Q];if(B!==S){BS&&(w=1);break}}return w},i.prototype.gtn=function(C){return this.cmpn(C)===1},i.prototype.gt=function(C){return this.cmp(C)===1},i.prototype.gten=function(C){return this.cmpn(C)>=0},i.prototype.gte=function(C){return this.cmp(C)>=0},i.prototype.ltn=function(C){return this.cmpn(C)===-1},i.prototype.lt=function(C){return this.cmp(C)===-1},i.prototype.lten=function(C){return this.cmpn(C)<=0},i.prototype.lte=function(C){return this.cmp(C)<=0},i.prototype.eqn=function(C){return this.cmpn(C)===0},i.prototype.eq=function(C){return this.cmp(C)===0},i.red=function(C){return new x(C)},i.prototype.toRed=function(C){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),C.convertTo(this)._forceRed(C)},i.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(C){return this.red=C,this},i.prototype.forceRed=function(C){return s(!this.red,"Already a number in reduction context"),this._forceRed(C)},i.prototype.redAdd=function(C){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,C)},i.prototype.redIAdd=function(C){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,C)},i.prototype.redSub=function(C){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,C)},i.prototype.redISub=function(C){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,C)},i.prototype.redShl=function(C){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,C)},i.prototype.redMul=function(C){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.mul(this,C)},i.prototype.redIMul=function(C){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.imul(this,C)},i.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(C){return s(this.red&&!C.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,C)};var R={k256:null,p224:null,p192:null,p25519:null};function T(C,w){this.name=C,this.p=new i(w,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function j(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){T.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function H(){T.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function X(){T.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(C){if(typeof C=="string"){var w=i._prime(C);this.m=w.p,this.prime=w}else s(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}function N(C){x.call(this,C),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}T.prototype._tmp=function(){var C=new i(null);return C.words=new Array(Math.ceil(this.n/13)),C},T.prototype.ireduce=function(C){var w,Q=C;do this.split(Q,this.tmp),w=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength();while(w>this.n);var B=w0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},T.prototype.split=function(C,w){C.iushrn(this.n,0,w)},T.prototype.imulK=function(C){return C.imul(this.k)},o(j,T),j.prototype.split=function(C,w){for(var Q=4194303,B=Math.min(C.length,9),S=0;S>>22,O=F}O>>>=22,C.words[S-10]=O,O===0&&C.length>10?C.length-=10:C.length-=9},j.prototype.imulK=function(C){C.words[C.length]=0,C.words[C.length+1]=0,C.length+=2;for(var w=0,Q=0;Q>>=26,C.words[Q]=S,w=B}return w!==0&&(C.words[C.length++]=w),C},i._prime=function(C){if(R[C])return R[C];var w;if(C==="k256")w=new j;else if(C==="p224")w=new W;else if(C==="p192")w=new H;else{if(C!=="p25519")throw new Error("Unknown prime "+C);w=new X}return R[C]=w,w},x.prototype._verify1=function(C){s(C.negative===0,"red works only with positives"),s(C.red,"red works only with red numbers")},x.prototype._verify2=function(C,w){s((C.negative|w.negative)==0,"red works only with positives"),s(C.red&&C.red===w.red,"red works only with red numbers")},x.prototype.imod=function(C){return this.prime?this.prime.ireduce(C)._forceRed(this):(h(C,C.umod(this.m)._forceRed(this)),C)},x.prototype.neg=function(C){return C.isZero()?C.clone():this.m.sub(C)._forceRed(this)},x.prototype.add=function(C,w){this._verify2(C,w);var Q=C.add(w);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},x.prototype.iadd=function(C,w){this._verify2(C,w);var Q=C.iadd(w);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},x.prototype.sub=function(C,w){this._verify2(C,w);var Q=C.sub(w);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},x.prototype.isub=function(C,w){this._verify2(C,w);var Q=C.isub(w);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},x.prototype.shl=function(C,w){return this._verify1(C),this.imod(C.ushln(w))},x.prototype.imul=function(C,w){return this._verify2(C,w),this.imod(C.imul(w))},x.prototype.mul=function(C,w){return this._verify2(C,w),this.imod(C.mul(w))},x.prototype.isqr=function(C){return this.imul(C,C.clone())},x.prototype.sqr=function(C){return this.mul(C,C)},x.prototype.sqrt=function(C){if(C.isZero())return C.clone();var w=this.m.andln(3);if(s(w%2==1),w===3){var Q=this.m.add(new i(1)).iushrn(2);return this.pow(C,Q)}for(var B=this.m.subn(1),S=0;!B.isZero()&&B.andln(1)===0;)S++,B.iushrn(1);s(!B.isZero());var O=new i(1).toRed(this),F=O.redNeg(),Y=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new i(2*M*M).toRed(this);this.pow(M,Y).cmp(F)!==0;)M.redIAdd(F);for(var z=this.pow(M,B),ue=this.pow(C,B.addn(1).iushrn(1)),ae=this.pow(C,B),Ne=S;ae.cmp(O)!==0;){for(var Ge=ae,Ye=0;Ge.cmp(O)!==0;Ye++)Ge=Ge.redSqr();s(Ye=0;S--){for(var z=w.words[S],ue=M-1;ue>=0;ue--){var ae=z>>ue&1;O!==B[0]&&(O=this.sqr(O)),ae!==0||F!==0?(F<<=1,F|=ae,(++Y===Q||S===0&&ue===0)&&(O=this.mul(O,B[F]),Y=0,F=0)):Y=0}M=26}return O},x.prototype.convertTo=function(C){var w=C.umod(this.m);return w===C?w.clone():w},x.prototype.convertFrom=function(C){var w=C.clone();return w.red=null,w},i.mont=function(C){return new N(C)},o(N,x),N.prototype.convertTo=function(C){return this.imod(C.ushln(this.shift))},N.prototype.convertFrom=function(C){var w=this.imod(C.mul(this.rinv));return w.red=null,w},N.prototype.imul=function(C,w){if(C.isZero()||w.isZero())return C.words[0]=0,C.length=1,C;var Q=C.imul(w),B=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=Q.isub(B).iushrn(this.shift),O=S;return S.cmp(this.m)>=0?O=S.isub(this.m):S.cmpn(0)<0&&(O=S.iadd(this.m)),O._forceRed(this)},N.prototype.mul=function(C,w){if(C.isZero()||w.isZero())return new i(0)._forceRed(this);var Q=C.mul(w),B=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=Q.isub(B).iushrn(this.shift),O=S;return S.cmp(this.m)>=0?O=S.isub(this.m):S.cmpn(0)<0&&(O=S.iadd(this.m)),O._forceRed(this)},N.prototype.invm=function(C){return this.imod(C._invmp(this.m).mul(this.r2))._forceRed(this)}})(r===void 0||r,void 0)},{buffer:188}],187:[function(e,r,t){var n;function a(o){this.rand=o}if(r.exports=function(o){return n||(n=new a(null)),n.generate(o)},r.exports.Rand=a,a.prototype.generate=function(o){return this._rand(o)},a.prototype._rand=function(o){if(this.rand.getBytes)return this.rand.getBytes(o);for(var i=new Uint8Array(o),c=0;c>>24]^I[T>>>16&255]^E[j>>>8&255]^k[255&W]^A[H++],p=y[T>>>24]^I[j>>>16&255]^E[W>>>8&255]^k[255&R]^A[H++],m=y[j>>>24]^I[W>>>16&255]^E[R>>>8&255]^k[255&T]^A[H++],v=y[W>>>24]^I[R>>>16&255]^E[T>>>8&255]^k[255&j]^A[H++],R=g,T=p,j=m,W=v;return g=(f[R>>>24]<<24|f[T>>>16&255]<<16|f[j>>>8&255]<<8|f[255&W])^A[H++],p=(f[T>>>24]<<24|f[j>>>16&255]<<16|f[W>>>8&255]<<8|f[255&R])^A[H++],m=(f[j>>>24]<<24|f[W>>>16&255]<<16|f[R>>>8&255]<<8|f[255&T])^A[H++],v=(f[W>>>24]<<24|f[R>>>16&255]<<16|f[T>>>8&255]<<8|f[255&j])^A[H++],[g>>>=0,p>>>=0,m>>>=0,v>>>=0]}var i=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var l=new Array(256),A=0;A<256;A++)l[A]=A<128?A<<1:A<<1^283;for(var h=[],f=[],d=[[],[],[],[]],g=[[],[],[],[]],p=0,m=0,v=0;v<256;++v){var y=m^m<<1^m<<2^m<<3^m<<4;y=y>>>8^255&y^99,h[p]=y,f[y]=p;var I=l[p],E=l[I],k=l[E],R=257*l[y]^16843008*y;d[0][p]=R<<24|R>>>8,d[1][p]=R<<16|R>>>16,d[2][p]=R<<8|R>>>24,d[3][p]=R,R=16843009*k^65537*E^257*I^16843008*p,g[0][y]=R<<24|R>>>8,g[1][y]=R<<16|R>>>16,g[2][y]=R<<8|R>>>24,g[3][y]=R,p===0?p=m=1:(p=I^l[l[l[k^I]]],m^=l[l[m]])}return{SBOX:h,INV_SBOX:f,SUB_MIX:d,INV_SUB_MIX:g}}();function u(l){this._key=a(l),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var l=this._key,A=l.length,h=A+6,f=4*(h+1),d=[],g=0;g>>24,p=c.SBOX[p>>>24]<<24|c.SBOX[p>>>16&255]<<16|c.SBOX[p>>>8&255]<<8|c.SBOX[255&p],p^=i[g/A|0]<<24):A>6&&g%A==4&&(p=c.SBOX[p>>>24]<<24|c.SBOX[p>>>16&255]<<16|c.SBOX[p>>>8&255]<<8|c.SBOX[255&p]),d[g]=d[g-A]^p}for(var m=[],v=0;v>>24]]^c.INV_SUB_MIX[1][c.SBOX[I>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[I>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&I]]}this._nRounds=h,this._keySchedule=d,this._invKeySchedule=m},u.prototype.encryptBlockRaw=function(l){return o(l=a(l),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(l){var A=this.encryptBlockRaw(l),h=n.allocUnsafe(16);return h.writeUInt32BE(A[0],0),h.writeUInt32BE(A[1],4),h.writeUInt32BE(A[2],8),h.writeUInt32BE(A[3],12),h},u.prototype.decryptBlock=function(l){var A=(l=a(l))[1];l[1]=l[3],l[3]=A;var h=o(l,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),f=n.allocUnsafe(16);return f.writeUInt32BE(h[0],0),f.writeUInt32BE(h[3],4),f.writeUInt32BE(h[2],8),f.writeUInt32BE(h[1],12),f},u.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},r.exports.AES=u},{"safe-buffer":494}],190:[function(e,r,t){var n=e("./aes"),a=e("safe-buffer").Buffer,s=e("cipher-base"),o=e("inherits"),i=e("./ghash"),c=e("buffer-xor"),u=e("./incr32");function l(f,d){var g=0;f.length!==d.length&&g++;for(var p=Math.min(f.length,d.length),m=0;m16)throw new Error("unable to decrypt data");for(var m=-1;++m16)return p=this.cache.slice(0,16),this.cache=this.cache.slice(16),p}else if(this.cache.length>=16)return p=this.cache.slice(0,16),this.cache=this.cache.slice(16),p;return null},A.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=d,t.createDecipheriv=f},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(e,r,t){var n=e("./modes"),a=e("./authCipher"),s=e("safe-buffer").Buffer,o=e("./streamCipher"),i=e("cipher-base"),c=e("./aes"),u=e("evp_bytestokey");function l(g,p,m){i.call(this),this._cache=new h,this._cipher=new c.AES(p),this._prev=s.from(m),this._mode=g,this._autopadding=!0}e("inherits")(l,i),l.prototype._update=function(g){var p,m;this._cache.add(g);for(var v=[];p=this._cache.get();)m=this._mode.encrypt(this,p),v.push(m);return s.concat(v)};var A=s.alloc(16,16);function h(){this.cache=s.allocUnsafe(0)}function f(g,p,m){var v=n[g.toLowerCase()];if(!v)throw new TypeError("invalid suite type");if(typeof p=="string"&&(p=s.from(p)),p.length!==v.key/8)throw new TypeError("invalid key length "+p.length);if(typeof m=="string"&&(m=s.from(m)),v.mode!=="GCM"&&m.length!==v.iv)throw new TypeError("invalid iv length "+m.length);return v.type==="stream"?new o(v.module,p,m):v.type==="auth"?new a(v.module,p,m):new l(v.module,p,m)}function d(g,p){var m=n[g.toLowerCase()];if(!m)throw new TypeError("invalid suite type");var v=u(p,!1,m.key,m.iv);return f(g,v.key,v.iv)}l.prototype._final=function(){var g=this._cache.flush();if(this._autopadding)return g=this._mode.encrypt(this,g),this._cipher.scrub(),g;if(!g.equals(A))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(g){return this._autopadding=!!g,this},h.prototype.add=function(g){this.cache=s.concat([this.cache,g])},h.prototype.get=function(){if(this.cache.length>15){var g=this.cache.slice(0,16);return this.cache=this.cache.slice(16),g}return null},h.prototype.flush=function(){for(var g=16-this.cache.length,p=s.allocUnsafe(g),m=-1;++m>>0,0),u.writeUInt32BE(c[1]>>>0,4),u.writeUInt32BE(c[2]>>>0,8),u.writeUInt32BE(c[3]>>>0,12),u}function i(c){this.h=c,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}i.prototype.ghash=function(c){for(var u=-1;++u0;c--)l[c]=l[c]>>>1|(1&l[c-1])<<31;l[0]=l[0]>>>1,u&&(l[0]=l[0]^225<<24)}this.state=o(A)},i.prototype.update=function(c){var u;for(this.cache=n.concat([this.cache,c]);this.cache.length>=16;)u=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(u)},i.prototype.final=function(c,u){return this.cache.length&&this.ghash(n.concat([this.cache,a],16)),this.ghash(o([0,c,0,u])),this.state},r.exports=i},{"safe-buffer":494}],195:[function(e,r,t){function n(a){for(var s,o=a.length;o--;){if((s=a.readUInt8(o))!==255){s++,a.writeUInt8(s,o);break}a.writeUInt8(0,o)}}r.exports=n},{}],196:[function(e,r,t){var n=e("buffer-xor");t.encrypt=function(a,s){var o=n(s,a._prev);return a._prev=a._cipher.encryptBlock(o),a._prev},t.decrypt=function(a,s){var o=a._prev;a._prev=s;var i=a._cipher.decryptBlock(s);return n(i,o)}},{"buffer-xor":219}],197:[function(e,r,t){var n=e("safe-buffer").Buffer,a=e("buffer-xor");function s(o,i,c){var u=i.length,l=a(i,o._cache);return o._cache=o._cache.slice(u),o._prev=n.concat([o._prev,c?i:l]),l}t.encrypt=function(o,i,c){for(var u,l=n.allocUnsafe(0);i.length;){if(o._cache.length===0&&(o._cache=o._cipher.encryptBlock(o._prev),o._prev=n.allocUnsafe(0)),!(o._cache.length<=i.length)){l=n.concat([l,s(o,i,c)]);break}u=o._cache.length,l=n.concat([l,s(o,i.slice(0,u),c)]),i=i.slice(u)}return l}},{"buffer-xor":219,"safe-buffer":494}],198:[function(e,r,t){var n=e("safe-buffer").Buffer;function a(o,i,c){for(var u,l,A=-1,h=8,f=0;++A>A%8,o._prev=s(o._prev,c?u:l);return f}function s(o,i){var c=o.length,u=-1,l=n.allocUnsafe(o.length);for(o=n.concat([o,n.from([i])]);++u>7;return l}t.encrypt=function(o,i,c){for(var u=i.length,l=n.allocUnsafe(u),A=-1;++A=0||!l.umod(u.prime1)||!l.umod(u.prime2));return l}function c(u,l){var A=o(l),h=l.modulus.byteLength(),f=new a(u).mul(A.blinder).umod(l.modulus),d=f.toRed(a.mont(l.prime1)),g=f.toRed(a.mont(l.prime2)),p=l.coefficient,m=l.prime1,v=l.prime2,y=d.redPow(l.exponent1).fromRed(),I=g.redPow(l.exponent2).fromRed(),E=y.isub(I).imul(p).umod(m).imul(v);return I.iadd(E).imul(A.unblinder).umod(l.modulus).toArrayLike(n,"be",h)}c.getr=i,r.exports=c}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(e,r,t){r.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(e,r,t){r.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],212:[function(e,r,t){r.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],213:[function(e,r,t){var n=e("safe-buffer").Buffer,a=e("create-hash"),s=e("readable-stream"),o=e("inherits"),i=e("./sign"),c=e("./verify"),u=e("./algorithms.json");function l(d){s.Writable.call(this);var g=u[d];if(!g)throw new Error("Unknown message digest");this._hashType=g.hash,this._hash=a(g.hash),this._tag=g.id,this._signType=g.sign}function A(d){s.Writable.call(this);var g=u[d];if(!g)throw new Error("Unknown message digest");this._hash=a(g.hash),this._tag=g.id,this._signType=g.sign}function h(d){return new l(d)}function f(d){return new A(d)}Object.keys(u).forEach(function(d){u[d].id=n.from(u[d].id,"hex"),u[d.toLowerCase()]=u[d]}),o(l,s.Writable),l.prototype._write=function(d,g,p){this._hash.update(d),p()},l.prototype.update=function(d,g){return typeof d=="string"&&(d=n.from(d,g)),this._hash.update(d),this},l.prototype.sign=function(d,g){this.end();var p=this._hash.digest(),m=i(p,d,this._hashType,this._signType,this._tag);return g?m.toString(g):m},o(A,s.Writable),A.prototype._write=function(d,g,p){this._hash.update(d),p()},A.prototype.update=function(d,g){return typeof d=="string"&&(d=n.from(d,g)),this._hash.update(d),this},A.prototype.verify=function(d,g,p){typeof g=="string"&&(g=n.from(g,p)),this.end();var m=this._hash.digest();return c(g,m,d,this._signType,this._tag)},r.exports={Sign:h,Verify:f,createSign:h,createVerify:f}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(e,r,t){var n=e("safe-buffer").Buffer,a=e("create-hmac"),s=e("browserify-rsa"),o=e("elliptic").ec,i=e("bn.js"),c=e("parse-asn1"),u=e("./curves.json");function l(y,I,E,k,R){var T=c(I);if(T.curve){if(k!=="ecdsa"&&k!=="ecdsa/rsa")throw new Error("wrong private key type");return A(y,T)}if(T.type==="dsa"){if(k!=="dsa")throw new Error("wrong private key type");return h(y,T,E)}if(k!=="rsa"&&k!=="ecdsa/rsa")throw new Error("wrong private key type");y=n.concat([R,y]);for(var j=T.modulus.byteLength(),W=[0,1];y.length+W.length+10&&E.ishrn(k),E}function p(y,I){y=(y=g(y,I)).mod(I);var E=n.from(y.toArray());if(E.length=f)throw new Error("invalid sig")}r.exports=c},{"./curves.json":212,"bn.js":186,elliptic:405,"parse-asn1":459,"safe-buffer":494}],216:[function(e,r,t){},{}],217:[function(e,r,t){var n=e("buffer"),a=n.Buffer;function s(i,c){for(var u in i)c[u]=i[u]}function o(i,c,u){return a(i,c,u)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?r.exports=n:(s(n,t),t.Buffer=o),s(a,o),o.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return a(i,c,u)},o.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var l=a(i);return c!==void 0?typeof u=="string"?l.fill(c,u):l.fill(c):l.fill(0),l},o.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return a(i)},o.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(i)}},{buffer:220}],218:[function(e,r,t){var n=e("safe-buffer").Buffer,a=n.isEncoding||function(I){switch((I=""+I)&&I.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(I){if(!I)return"utf8";for(var E;;)switch(I){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return I;default:if(E)return;I=(""+I).toLowerCase(),E=!0}}function o(I){var E=s(I);if(typeof E!="string"&&(n.isEncoding===a||!a(I)))throw new Error("Unknown encoding: "+I);return E||I}function i(I){var E;switch(this.encoding=o(I),this.encoding){case"utf16le":this.text=d,this.end=g,E=4;break;case"utf8":this.fillLast=A,E=4;break;case"base64":this.text=p,this.end=m,E=3;break;default:return this.write=v,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(E)}function c(I){return I<=127?0:I>>5==6?2:I>>4==14?3:I>>3==30?4:I>>6==2?-1:-2}function u(I,E,k){var R=E.length-1;if(R=0?(T>0&&(I.lastNeed=T-1),T):--R=0?(T>0&&(I.lastNeed=T-2),T):--R=0?(T>0&&(T===2?T=0:I.lastNeed=T-3),T):0}function l(I,E,k){if((192&E[0])!=128)return I.lastNeed=0,"�";if(I.lastNeed>1&&E.length>1){if((192&E[1])!=128)return I.lastNeed=1,"�";if(I.lastNeed>2&&E.length>2&&(192&E[2])!=128)return I.lastNeed=2,"�"}}function A(I){var E=this.lastTotal-this.lastNeed,k=l(this,I);return k!==void 0?k:this.lastNeed<=I.length?(I.copy(this.lastChar,E,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(I.copy(this.lastChar,E,0,I.length),void(this.lastNeed-=I.length))}function h(I,E){var k=u(this,I,E);if(!this.lastNeed)return I.toString("utf8",E);this.lastTotal=k;var R=I.length-(k-this.lastNeed);return I.copy(this.lastChar,0,R),I.toString("utf8",E,R)}function f(I){var E=I&&I.length?this.write(I):"";return this.lastNeed?E+"�":E}function d(I,E){if((I.length-E)%2==0){var k=I.toString("utf16le",E);if(k){var R=k.charCodeAt(k.length-1);if(R>=55296&&R<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1],k.slice(0,-1)}return k}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=I[I.length-1],I.toString("utf16le",E,I.length-1)}function g(I){var E=I&&I.length?this.write(I):"";if(this.lastNeed){var k=this.lastTotal-this.lastNeed;return E+this.lastChar.toString("utf16le",0,k)}return E}function p(I,E){var k=(I.length-E)%3;return k===0?I.toString("base64",E):(this.lastNeed=3-k,this.lastTotal=3,k===1?this.lastChar[0]=I[I.length-1]:(this.lastChar[0]=I[I.length-2],this.lastChar[1]=I[I.length-1]),I.toString("base64",E,I.length-k))}function m(I){var E=I&&I.length?this.write(I):"";return this.lastNeed?E+this.lastChar.toString("base64",0,3-this.lastNeed):E}function v(I){return I.toString(this.encoding)}function y(I){return I&&I.length?this.write(I):""}t.StringDecoder=i,i.prototype.write=function(I){if(I.length===0)return"";var E,k;if(this.lastNeed){if((E=this.fillLast(I))===void 0)return"";k=this.lastNeed,this.lastNeed=0}else k=0;return ko)throw new RangeError('The value "'+Z+'" is invalid for option "size"');var ce=new Uint8Array(Z);return ce.__proto__=u.prototype,ce}function u(Z,ce,ye){if(typeof Z=="number"){if(typeof ce=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(Z)}return l(Z,ce,ye)}function l(Z,ce,ye){if(typeof Z=="string")return d(Z,ce);if(ArrayBuffer.isView(Z))return g(Z);if(Z==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Z);if(Ce(Z,ArrayBuffer)||Z&&Ce(Z.buffer,ArrayBuffer))return p(Z,ce,ye);if(typeof Z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ve=Z.valueOf&&Z.valueOf();if(Ve!=null&&Ve!==Z)return u.from(Ve,ce,ye);var dt=m(Z);if(dt)return dt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Z[Symbol.toPrimitive]=="function")return u.from(Z[Symbol.toPrimitive]("string"),ce,ye);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Z)}function A(Z){if(typeof Z!="number")throw new TypeError('"size" argument must be of type number');if(Z<0)throw new RangeError('The value "'+Z+'" is invalid for option "size"')}function h(Z,ce,ye){return A(Z),Z<=0?c(Z):ce!==void 0?typeof ye=="string"?c(Z).fill(ce,ye):c(Z).fill(ce):c(Z)}function f(Z){return A(Z),c(Z<0?0:0|v(Z))}function d(Z,ce){if(typeof ce=="string"&&ce!==""||(ce="utf8"),!u.isEncoding(ce))throw new TypeError("Unknown encoding: "+ce);var ye=0|I(Z,ce),Ve=c(ye),dt=Ve.write(Z,ce);return dt!==ye&&(Ve=Ve.slice(0,dt)),Ve}function g(Z){for(var ce=Z.length<0?0:0|v(Z.length),ye=c(ce),Ve=0;Ve=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|Z}function y(Z){return+Z!=Z&&(Z=0),u.alloc(+Z)}function I(Z,ce){if(u.isBuffer(Z))return Z.length;if(ArrayBuffer.isView(Z)||Ce(Z,ArrayBuffer))return Z.byteLength;if(typeof Z!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Z);var ye=Z.length,Ve=arguments.length>2&&arguments[2]===!0;if(!Ve&&ye===0)return 0;for(var dt=!1;;)switch(ce){case"ascii":case"latin1":case"binary":return ye;case"utf8":case"utf-8":return te(Z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ye;case"hex":return ye>>>1;case"base64":return Ke(Z).length;default:if(dt)return Ve?-1:te(Z).length;ce=(""+ce).toLowerCase(),dt=!0}}function E(Z,ce,ye){var Ve=!1;if((ce===void 0||ce<0)&&(ce=0),ce>this.length||((ye===void 0||ye>this.length)&&(ye=this.length),ye<=0)||(ye>>>=0)<=(ce>>>=0))return"";for(Z||(Z="utf8");;)switch(Z){case"hex":return F(this,ce,ye);case"utf8":case"utf-8":return w(this,ce,ye);case"ascii":return S(this,ce,ye);case"latin1":case"binary":return O(this,ce,ye);case"base64":return C(this,ce,ye);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,ce,ye);default:if(Ve)throw new TypeError("Unknown encoding: "+Z);Z=(Z+"").toLowerCase(),Ve=!0}}function k(Z,ce,ye){var Ve=Z[ce];Z[ce]=Z[ye],Z[ye]=Ve}function R(Z,ce,ye,Ve,dt){if(Z.length===0)return-1;if(typeof ye=="string"?(Ve=ye,ye=0):ye>2147483647?ye=2147483647:ye<-2147483648&&(ye=-2147483648),At(ye=+ye)&&(ye=dt?0:Z.length-1),ye<0&&(ye=Z.length+ye),ye>=Z.length){if(dt)return-1;ye=Z.length-1}else if(ye<0){if(!dt)return-1;ye=0}if(typeof ce=="string"&&(ce=u.from(ce,Ve)),u.isBuffer(ce))return ce.length===0?-1:T(Z,ce,ye,Ve,dt);if(typeof ce=="number")return ce&=255,typeof Uint8Array.prototype.indexOf=="function"?dt?Uint8Array.prototype.indexOf.call(Z,ce,ye):Uint8Array.prototype.lastIndexOf.call(Z,ce,ye):T(Z,[ce],ye,Ve,dt);throw new TypeError("val must be string, number or Buffer")}function T(Z,ce,ye,Ve,dt){var re,ot=1,pt=Z.length,Be=ce.length;if(Ve!==void 0&&((Ve=String(Ve).toLowerCase())==="ucs2"||Ve==="ucs-2"||Ve==="utf16le"||Ve==="utf-16le")){if(Z.length<2||ce.length<2)return-1;ot=2,pt/=2,Be/=2,ye/=2}function Ee(me,Re){return ot===1?me[Re]:me.readUInt16BE(Re*ot)}if(dt){var Me=-1;for(re=ye;rept&&(ye=pt-Be),re=ye;re>=0;re--){for(var yt=!0,pe=0;pedt&&(Ve=dt):Ve=dt;var re=ce.length;Ve>re/2&&(Ve=re/2);for(var ot=0;ot239?4:Ee>223?3:Ee>191?2:1;if(dt+yt<=ye)switch(yt){case 1:Ee<128&&(Me=Ee);break;case 2:(192&(re=Z[dt+1]))==128&&(Be=(31&Ee)<<6|63&re)>127&&(Me=Be);break;case 3:re=Z[dt+1],ot=Z[dt+2],(192&re)==128&&(192&ot)==128&&(Be=(15&Ee)<<12|(63&re)<<6|63&ot)>2047&&(Be<55296||Be>57343)&&(Me=Be);break;case 4:re=Z[dt+1],ot=Z[dt+2],pt=Z[dt+3],(192&re)==128&&(192&ot)==128&&(192&pt)==128&&(Be=(15&Ee)<<18|(63&re)<<12|(63&ot)<<6|63&pt)>65535&&Be<1114112&&(Me=Be)}Me===null?(Me=65533,yt=1):Me>65535&&(Me-=65536,Ve.push(Me>>>10&1023|55296),Me=56320|1023&Me),Ve.push(Me),dt+=yt}return B(Ve)}t.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=i(),u.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),u.poolSize=8192,u.from=function(Z,ce,ye){return l(Z,ce,ye)},u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,u.alloc=function(Z,ce,ye){return h(Z,ce,ye)},u.allocUnsafe=function(Z){return f(Z)},u.allocUnsafeSlow=function(Z){return f(Z)},u.isBuffer=function(Z){return Z!=null&&Z._isBuffer===!0&&Z!==u.prototype},u.compare=function(Z,ce){if(Ce(Z,Uint8Array)&&(Z=u.from(Z,Z.offset,Z.byteLength)),Ce(ce,Uint8Array)&&(ce=u.from(ce,ce.offset,ce.byteLength)),!u.isBuffer(Z)||!u.isBuffer(ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Z===ce)return 0;for(var ye=Z.length,Ve=ce.length,dt=0,re=Math.min(ye,Ve);dtce&&(Z+=" ... "),""},u.prototype.compare=function(Z,ce,ye,Ve,dt){if(Ce(Z,Uint8Array)&&(Z=u.from(Z,Z.offset,Z.byteLength)),!u.isBuffer(Z))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Z);if(ce===void 0&&(ce=0),ye===void 0&&(ye=Z?Z.length:0),Ve===void 0&&(Ve=0),dt===void 0&&(dt=this.length),ce<0||ye>Z.length||Ve<0||dt>this.length)throw new RangeError("out of range index");if(Ve>=dt&&ce>=ye)return 0;if(Ve>=dt)return-1;if(ce>=ye)return 1;if(this===Z)return 0;for(var re=(dt>>>=0)-(Ve>>>=0),ot=(ye>>>=0)-(ce>>>=0),pt=Math.min(re,ot),Be=this.slice(Ve,dt),Ee=Z.slice(ce,ye),Me=0;Me>>=0,isFinite(ye)?(ye>>>=0,Ve===void 0&&(Ve="utf8")):(Ve=ye,ye=void 0)}var dt=this.length-ce;if((ye===void 0||ye>dt)&&(ye=dt),Z.length>0&&(ye<0||ce<0)||ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ve||(Ve="utf8");for(var re=!1;;)switch(Ve){case"hex":return j(this,Z,ce,ye);case"utf8":case"utf-8":return W(this,Z,ce,ye);case"ascii":return H(this,Z,ce,ye);case"latin1":case"binary":return X(this,Z,ce,ye);case"base64":return x(this,Z,ce,ye);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,Z,ce,ye);default:if(re)throw new TypeError("Unknown encoding: "+Ve);Ve=(""+Ve).toLowerCase(),re=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;function B(Z){var ce=Z.length;if(ce<=Q)return String.fromCharCode.apply(String,Z);for(var ye="",Ve=0;VeVe)&&(ye=Ve);for(var dt="",re=ce;reye)throw new RangeError("Trying to access beyond buffer length")}function z(Z,ce,ye,Ve,dt,re){if(!u.isBuffer(Z))throw new TypeError('"buffer" argument must be a Buffer instance');if(ce>dt||ceZ.length)throw new RangeError("Index out of range")}function ue(Z,ce,ye,Ve,dt,re){if(ye+Ve>Z.length)throw new RangeError("Index out of range");if(ye<0)throw new RangeError("Index out of range")}function ae(Z,ce,ye,Ve,dt){return ce=+ce,ye>>>=0,dt||ue(Z,ce,ye,4),s.write(Z,ce,ye,Ve,23,4),ye+4}function Ne(Z,ce,ye,Ve,dt){return ce=+ce,ye>>>=0,dt||ue(Z,ce,ye,8),s.write(Z,ce,ye,Ve,52,8),ye+8}u.prototype.slice=function(Z,ce){var ye=this.length;(Z=~~Z)<0?(Z+=ye)<0&&(Z=0):Z>ye&&(Z=ye),(ce=ce===void 0?ye:~~ce)<0?(ce+=ye)<0&&(ce=0):ce>ye&&(ce=ye),ce>>=0,ce>>>=0,ye||M(Z,ce,this.length);for(var Ve=this[Z],dt=1,re=0;++re>>=0,ce>>>=0,ye||M(Z,ce,this.length);for(var Ve=this[Z+--ce],dt=1;ce>0&&(dt*=256);)Ve+=this[Z+--ce]*dt;return Ve},u.prototype.readUInt8=function(Z,ce){return Z>>>=0,ce||M(Z,1,this.length),this[Z]},u.prototype.readUInt16LE=function(Z,ce){return Z>>>=0,ce||M(Z,2,this.length),this[Z]|this[Z+1]<<8},u.prototype.readUInt16BE=function(Z,ce){return Z>>>=0,ce||M(Z,2,this.length),this[Z]<<8|this[Z+1]},u.prototype.readUInt32LE=function(Z,ce){return Z>>>=0,ce||M(Z,4,this.length),(this[Z]|this[Z+1]<<8|this[Z+2]<<16)+16777216*this[Z+3]},u.prototype.readUInt32BE=function(Z,ce){return Z>>>=0,ce||M(Z,4,this.length),16777216*this[Z]+(this[Z+1]<<16|this[Z+2]<<8|this[Z+3])},u.prototype.readIntLE=function(Z,ce,ye){Z>>>=0,ce>>>=0,ye||M(Z,ce,this.length);for(var Ve=this[Z],dt=1,re=0;++re=(dt*=128)&&(Ve-=Math.pow(2,8*ce)),Ve},u.prototype.readIntBE=function(Z,ce,ye){Z>>>=0,ce>>>=0,ye||M(Z,ce,this.length);for(var Ve=ce,dt=1,re=this[Z+--Ve];Ve>0&&(dt*=256);)re+=this[Z+--Ve]*dt;return re>=(dt*=128)&&(re-=Math.pow(2,8*ce)),re},u.prototype.readInt8=function(Z,ce){return Z>>>=0,ce||M(Z,1,this.length),128&this[Z]?-1*(255-this[Z]+1):this[Z]},u.prototype.readInt16LE=function(Z,ce){Z>>>=0,ce||M(Z,2,this.length);var ye=this[Z]|this[Z+1]<<8;return 32768&ye?4294901760|ye:ye},u.prototype.readInt16BE=function(Z,ce){Z>>>=0,ce||M(Z,2,this.length);var ye=this[Z+1]|this[Z]<<8;return 32768&ye?4294901760|ye:ye},u.prototype.readInt32LE=function(Z,ce){return Z>>>=0,ce||M(Z,4,this.length),this[Z]|this[Z+1]<<8|this[Z+2]<<16|this[Z+3]<<24},u.prototype.readInt32BE=function(Z,ce){return Z>>>=0,ce||M(Z,4,this.length),this[Z]<<24|this[Z+1]<<16|this[Z+2]<<8|this[Z+3]},u.prototype.readFloatLE=function(Z,ce){return Z>>>=0,ce||M(Z,4,this.length),s.read(this,Z,!0,23,4)},u.prototype.readFloatBE=function(Z,ce){return Z>>>=0,ce||M(Z,4,this.length),s.read(this,Z,!1,23,4)},u.prototype.readDoubleLE=function(Z,ce){return Z>>>=0,ce||M(Z,8,this.length),s.read(this,Z,!0,52,8)},u.prototype.readDoubleBE=function(Z,ce){return Z>>>=0,ce||M(Z,8,this.length),s.read(this,Z,!1,52,8)},u.prototype.writeUIntLE=function(Z,ce,ye,Ve){Z=+Z,ce>>>=0,ye>>>=0,Ve||z(this,Z,ce,ye,Math.pow(2,8*ye)-1,0);var dt=1,re=0;for(this[ce]=255&Z;++re>>=0,ye>>>=0,Ve||z(this,Z,ce,ye,Math.pow(2,8*ye)-1,0);var dt=ye-1,re=1;for(this[ce+dt]=255&Z;--dt>=0&&(re*=256);)this[ce+dt]=Z/re&255;return ce+ye},u.prototype.writeUInt8=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,1,255,0),this[ce]=255&Z,ce+1},u.prototype.writeUInt16LE=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,2,65535,0),this[ce]=255&Z,this[ce+1]=Z>>>8,ce+2},u.prototype.writeUInt16BE=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,2,65535,0),this[ce]=Z>>>8,this[ce+1]=255&Z,ce+2},u.prototype.writeUInt32LE=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,4,4294967295,0),this[ce+3]=Z>>>24,this[ce+2]=Z>>>16,this[ce+1]=Z>>>8,this[ce]=255&Z,ce+4},u.prototype.writeUInt32BE=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,4,4294967295,0),this[ce]=Z>>>24,this[ce+1]=Z>>>16,this[ce+2]=Z>>>8,this[ce+3]=255&Z,ce+4},u.prototype.writeIntLE=function(Z,ce,ye,Ve){if(Z=+Z,ce>>>=0,!Ve){var dt=Math.pow(2,8*ye-1);z(this,Z,ce,ye,dt-1,-dt)}var re=0,ot=1,pt=0;for(this[ce]=255&Z;++re>0)-pt&255;return ce+ye},u.prototype.writeIntBE=function(Z,ce,ye,Ve){if(Z=+Z,ce>>>=0,!Ve){var dt=Math.pow(2,8*ye-1);z(this,Z,ce,ye,dt-1,-dt)}var re=ye-1,ot=1,pt=0;for(this[ce+re]=255&Z;--re>=0&&(ot*=256);)Z<0&&pt===0&&this[ce+re+1]!==0&&(pt=1),this[ce+re]=(Z/ot>>0)-pt&255;return ce+ye},u.prototype.writeInt8=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,1,127,-128),Z<0&&(Z=255+Z+1),this[ce]=255&Z,ce+1},u.prototype.writeInt16LE=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,2,32767,-32768),this[ce]=255&Z,this[ce+1]=Z>>>8,ce+2},u.prototype.writeInt16BE=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,2,32767,-32768),this[ce]=Z>>>8,this[ce+1]=255&Z,ce+2},u.prototype.writeInt32LE=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,4,2147483647,-2147483648),this[ce]=255&Z,this[ce+1]=Z>>>8,this[ce+2]=Z>>>16,this[ce+3]=Z>>>24,ce+4},u.prototype.writeInt32BE=function(Z,ce,ye){return Z=+Z,ce>>>=0,ye||z(this,Z,ce,4,2147483647,-2147483648),Z<0&&(Z=4294967295+Z+1),this[ce]=Z>>>24,this[ce+1]=Z>>>16,this[ce+2]=Z>>>8,this[ce+3]=255&Z,ce+4},u.prototype.writeFloatLE=function(Z,ce,ye){return ae(this,Z,ce,!0,ye)},u.prototype.writeFloatBE=function(Z,ce,ye){return ae(this,Z,ce,!1,ye)},u.prototype.writeDoubleLE=function(Z,ce,ye){return Ne(this,Z,ce,!0,ye)},u.prototype.writeDoubleBE=function(Z,ce,ye){return Ne(this,Z,ce,!1,ye)},u.prototype.copy=function(Z,ce,ye,Ve){if(!u.isBuffer(Z))throw new TypeError("argument should be a Buffer");if(ye||(ye=0),Ve||Ve===0||(Ve=this.length),ce>=Z.length&&(ce=Z.length),ce||(ce=0),Ve>0&&Ve=this.length)throw new RangeError("Index out of range");if(Ve<0)throw new RangeError("sourceEnd out of bounds");Ve>this.length&&(Ve=this.length),Z.length-ce=0;--re)Z[re+ce]=this[re+ye];else Uint8Array.prototype.set.call(Z,this.subarray(ye,Ve),ce);return dt},u.prototype.fill=function(Z,ce,ye,Ve){if(typeof Z=="string"){if(typeof ce=="string"?(Ve=ce,ce=0,ye=this.length):typeof ye=="string"&&(Ve=ye,ye=this.length),Ve!==void 0&&typeof Ve!="string")throw new TypeError("encoding must be a string");if(typeof Ve=="string"&&!u.isEncoding(Ve))throw new TypeError("Unknown encoding: "+Ve);if(Z.length===1){var dt=Z.charCodeAt(0);(Ve==="utf8"&&dt<128||Ve==="latin1")&&(Z=dt)}}else typeof Z=="number"&&(Z&=255);if(ce<0||this.length>>=0,ye=ye===void 0?this.length:ye>>>0,Z||(Z=0),typeof Z=="number")for(re=ce;re55295&&ye<57344){if(!dt){if(ye>56319){(ce-=3)>-1&&re.push(239,191,189);continue}if(ot+1===Ve){(ce-=3)>-1&&re.push(239,191,189);continue}dt=ye;continue}if(ye<56320){(ce-=3)>-1&&re.push(239,191,189),dt=ye;continue}ye=65536+(dt-55296<<10|ye-56320)}else dt&&(ce-=3)>-1&&re.push(239,191,189);if(dt=null,ye<128){if((ce-=1)<0)break;re.push(ye)}else if(ye<2048){if((ce-=2)<0)break;re.push(ye>>6|192,63&ye|128)}else if(ye<65536){if((ce-=3)<0)break;re.push(ye>>12|224,ye>>6&63|128,63&ye|128)}else{if(!(ye<1114112))throw new Error("Invalid code point");if((ce-=4)<0)break;re.push(ye>>18|240,ye>>12&63|128,ye>>6&63|128,63&ye|128)}}return re}function he(Z){for(var ce=[],ye=0;ye>8,dt=ye%256,re.push(dt),re.push(Ve);return re}function Ke(Z){return a.toByteArray(Ye(Z))}function le(Z,ce,ye,Ve){for(var dt=0;dt=ce.length||dt>=Z.length);++dt)ce[dt+ye]=Z[dt];return dt}function Ce(Z,ce){return Z instanceof ce||Z!=null&&Z.constructor!=null&&Z.constructor.name!=null&&Z.constructor.name===ce.name}function At(Z){return Z!=Z}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(e,r,t){var n=e("safe-buffer").Buffer,a=e("stream").Transform,s=e("string_decoder").StringDecoder;function o(i){a.call(this),this.hashMode=typeof i=="string",this.hashMode?this[i]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(o,a),o.prototype.update=function(i,c,u){typeof i=="string"&&(i=n.from(i,c));var l=this._update(i);return this.hashMode?this:(u&&(l=this._toString(l,u)),l)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(i,c,u){var l;try{this.hashMode?this._update(i):this.push(this._update(i))}catch(A){l=A}finally{u(l)}},o.prototype._flush=function(i){var c;try{this.push(this.__final())}catch(u){c=u}i(c)},o.prototype._finalOrDigest=function(i){var c=this.__final()||n.alloc(0);return i&&(c=this._toString(c,i,!0)),c},o.prototype._toString=function(i,c,u){if(this._decoder||(this._decoder=new s(c),this._encoding=c),this._encoding!==c)throw new Error("can't switch encodings");var l=this._decoder.write(i);return u&&(l+=this._decoder.end()),l},r.exports=o},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(e,r,t){var n=e("../internals/is-callable"),a=e("../internals/try-to-string"),s=TypeError;r.exports=function(o){if(n(o))return o;throw new s(a(o)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(e,r,t){var n=e("../internals/is-constructor"),a=e("../internals/try-to-string"),s=TypeError;r.exports=function(o){if(n(o))return o;throw new s(a(o)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(e,r,t){var n=e("../internals/is-callable"),a=String,s=TypeError;r.exports=function(o){if(typeof o=="object"||n(o))return o;throw new s("Can't set "+a(o)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(e,r,t){var n=e("../internals/well-known-symbol"),a=e("../internals/object-create"),s=e("../internals/object-define-property").f,o=n("unscopables"),i=Array.prototype;i[o]===void 0&&s(i,o,{configurable:!0,value:a(null)}),r.exports=function(c){i[o][c]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(e,r,t){var n=e("../internals/object-is-prototype-of"),a=TypeError;r.exports=function(s,o){if(n(o,s))return s;throw new a("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(e,r,t){var n=e("../internals/is-object"),a=String,s=TypeError;r.exports=function(o){if(n(o))return o;throw new s(a(o)+" is not an object")}},{"../internals/is-object":289}],228:[function(e,r,t){var n=e("../internals/to-indexed-object"),a=e("../internals/to-absolute-index"),s=e("../internals/length-of-array-like"),o=function(i){return function(c,u,l){var A,h=n(c),f=s(h),d=a(l,f);if(i&&u!=u){for(;f>d;)if((A=h[d++])!=A)return!0}else for(;f>d;d++)if((i||d in h)&&h[d]===u)return i||d||0;return!i&&-1}};r.exports={includes:o(!0),indexOf:o(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(e,r,t){var n=e("../internals/function-bind-context"),a=e("../internals/function-uncurry-this"),s=e("../internals/indexed-object"),o=e("../internals/to-object"),i=e("../internals/length-of-array-like"),c=e("../internals/array-species-create"),u=a([].push),l=function(A){var h=A===1,f=A===2,d=A===3,g=A===4,p=A===6,m=A===7,v=A===5||p;return function(y,I,E,k){for(var R,T,j=o(y),W=s(j),H=n(I,E),X=i(W),x=0,N=k||c,C=h?N(y,X):f||m?N(y,0):void 0;X>x;x++)if((v||x in W)&&(T=H(R=W[x],x,j),A))if(h)C[x]=T;else if(T)switch(A){case 3:return!0;case 5:return R;case 6:return x;case 2:u(C,R)}else switch(A){case 4:return!1;case 7:u(C,R)}return p?-1:d||g?g:C}};r.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},{"../internals/array-species-create":233,"../internals/function-bind-context":262,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/length-of-array-like":299,"../internals/to-object":344}],230:[function(e,r,t){var n=e("../internals/to-absolute-index"),a=e("../internals/length-of-array-like"),s=e("../internals/create-property"),o=Array,i=Math.max;r.exports=function(c,u,l){for(var A=a(c),h=n(u,A),f=n(l===void 0?A:l,A),d=o(i(f-h,0)),g=0;h0&&n[0]<4?1:+(n[0]+n[1])),!a&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(a=+n[1]),r.exports=a},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(e,r,t){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(e,r,t){var n=e("../internals/global"),a=e("../internals/object-get-own-property-descriptor").f,s=e("../internals/create-non-enumerable-property"),o=e("../internals/define-built-in"),i=e("../internals/define-global-property"),c=e("../internals/copy-constructor-properties"),u=e("../internals/is-forced");r.exports=function(l,A){var h,f,d,g,p,m=l.target,v=l.global,y=l.stat;if(h=v?n:y?n[m]||i(m,{}):(n[m]||{}).prototype)for(f in A){if(g=A[f],d=l.dontCallGetSet?(p=a(h,f))&&p.value:h[f],!u(v?f:m+(y?".":"#")+f,l.forced)&&d!==void 0){if(typeof g==typeof d)continue;c(g,d)}(l.sham||d&&d.sham)&&s(g,"sham",!0),o(h,f,g,l)}}},{"../internals/copy-constructor-properties":237,"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/define-global-property":246,"../internals/global":274,"../internals/is-forced":287,"../internals/object-get-own-property-descriptor":309}],260:[function(e,r,t){r.exports=function(n){try{return!!n()}catch{return!0}}},{}],261:[function(e,r,t){var n=e("../internals/function-bind-native"),a=Function.prototype,s=a.apply,o=a.call;r.exports=typeof Reflect=="object"&&Reflect.apply||(n?o.bind(s):function(){return o.apply(s,arguments)})},{"../internals/function-bind-native":263}],262:[function(e,r,t){var n=e("../internals/function-uncurry-this-clause"),a=e("../internals/a-callable"),s=e("../internals/function-bind-native"),o=n(n.bind);r.exports=function(i,c){return a(i),c===void 0?i:s?o(i,c):function(){return i.apply(c,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(e,r,t){var n=e("../internals/fails");r.exports=!n(function(){var a=function(){}.bind();return typeof a!="function"||a.hasOwnProperty("prototype")})},{"../internals/fails":260}],264:[function(e,r,t){var n=e("../internals/function-bind-native"),a=Function.prototype.call;r.exports=n?a.bind(a):function(){return a.apply(a,arguments)}},{"../internals/function-bind-native":263}],265:[function(e,r,t){var n=e("../internals/descriptors"),a=e("../internals/has-own-property"),s=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,i=a(s,"name"),c=i&&function(){}.name==="something",u=i&&(!n||n&&o(s,"name").configurable);r.exports={EXISTS:i,PROPER:c,CONFIGURABLE:u}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(e,r,t){var n=e("../internals/function-uncurry-this"),a=e("../internals/a-callable");r.exports=function(s,o,i){try{return n(a(Object.getOwnPropertyDescriptor(s,o)[i]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(e,r,t){var n=e("../internals/classof-raw"),a=e("../internals/function-uncurry-this");r.exports=function(s){if(n(s)==="Function")return a(s)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(e,r,t){var n=e("../internals/function-bind-native"),a=Function.prototype,s=a.call,o=n&&a.bind.bind(s,s);r.exports=n?o:function(i){return function(){return s.apply(i,arguments)}}},{"../internals/function-bind-native":263}],269:[function(e,r,t){var n=e("../internals/global"),a=e("../internals/is-callable"),s=function(o){return a(o)?o:void 0};r.exports=function(o,i){return arguments.length<2?s(n[o]):n[o]&&n[o][i]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(e,r,t){var n=e("../internals/classof"),a=e("../internals/get-method"),s=e("../internals/is-null-or-undefined"),o=e("../internals/iterators"),i=e("../internals/well-known-symbol")("iterator");r.exports=function(c){if(!s(c))return a(c,i)||a(c,"@@iterator")||o[n(c)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(e,r,t){var n=e("../internals/function-call"),a=e("../internals/a-callable"),s=e("../internals/an-object"),o=e("../internals/try-to-string"),i=e("../internals/get-iterator-method"),c=TypeError;r.exports=function(u,l){var A=arguments.length<2?i(u):l;if(a(A))return s(n(A,u));throw new c(o(u)+" is not iterable")}},{"../internals/a-callable":222,"../internals/an-object":227,"../internals/function-call":264,"../internals/get-iterator-method":270,"../internals/try-to-string":349}],272:[function(e,r,t){var n=e("../internals/function-uncurry-this"),a=e("../internals/is-array"),s=e("../internals/is-callable"),o=e("../internals/classof-raw"),i=e("../internals/to-string"),c=n([].push);r.exports=function(u){if(s(u))return u;if(a(u)){for(var l=u.length,A=[],h=0;hE;E++)if((R=Q(p[E]))&&u(g,R))return R;return new d(!1)}y=l(p,I)}for(T=X?p.next:y.next;!(j=a(T,y)).done;){try{R=Q(j.value)}catch(B){h(y,"throw",B)}if(typeof R=="object"&&R&&u(g,R))return R}return new d(!1)}},{"../internals/an-object":227,"../internals/function-bind-context":262,"../internals/function-call":264,"../internals/get-iterator":271,"../internals/get-iterator-method":270,"../internals/is-array-iterator-method":283,"../internals/iterator-close":294,"../internals/length-of-array-like":299,"../internals/object-is-prototype-of":314,"../internals/try-to-string":349}],294:[function(e,r,t){var n=e("../internals/function-call"),a=e("../internals/an-object"),s=e("../internals/get-method");r.exports=function(o,i,c){var u,l;a(o);try{if(!(u=s(o,"return"))){if(i==="throw")throw c;return c}u=n(u,o)}catch(A){l=!0,u=A}if(i==="throw")throw c;if(l)throw u;return a(u),c}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(e,r,t){var n=e("../internals/iterators-core").IteratorPrototype,a=e("../internals/object-create"),s=e("../internals/create-property-descriptor"),o=e("../internals/set-to-string-tag"),i=e("../internals/iterators"),c=function(){return this};r.exports=function(u,l,A,h){var f=l+" Iterator";return u.prototype=a(n,{next:s(+!h,A)}),o(u,f,!1,!0),i[f]=c,u}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/function-call"),s=e("../internals/is-pure"),o=e("../internals/function-name"),i=e("../internals/is-callable"),c=e("../internals/iterator-create-constructor"),u=e("../internals/object-get-prototype-of"),l=e("../internals/object-set-prototype-of"),A=e("../internals/set-to-string-tag"),h=e("../internals/create-non-enumerable-property"),f=e("../internals/define-built-in"),d=e("../internals/well-known-symbol"),g=e("../internals/iterators"),p=e("../internals/iterators-core"),m=o.PROPER,v=o.CONFIGURABLE,y=p.IteratorPrototype,I=p.BUGGY_SAFARI_ITERATORS,E=d("iterator"),k="keys",R="values",T="entries",j=function(){return this};r.exports=function(W,H,X,x,N,C,w){c(X,H,x);var Q,B,S,O=function(Ne){if(Ne===N&&ue)return ue;if(!I&&Ne&&Ne in M)return M[Ne];switch(Ne){case k:case R:case T:return function(){return new X(this,Ne)}}return function(){return new X(this)}},F=H+" Iterator",Y=!1,M=W.prototype,z=M[E]||M["@@iterator"]||N&&M[N],ue=!I&&z||O(N),ae=H==="Array"&&M.entries||z;if(ae&&(Q=u(ae.call(new W)))!==Object.prototype&&Q.next&&(s||u(Q)===y||(l?l(Q,y):i(Q[E])||f(Q,E,j)),A(Q,F,!0,!0),s&&(g[F]=j)),m&&N===R&&z&&z.name!==R&&(!s&&v?h(M,"name",R):(Y=!0,ue=function(){return a(z,this)})),N)if(B={values:O(R),keys:C?ue:O(k),entries:O(T)},w)for(S in B)(I||Y||!(S in M))&&f(M,S,B[S]);else n({target:H,proto:!0,forced:I||Y},B);return s&&!w||M[E]===ue||f(M,E,ue,{name:N}),g[H]=ue,B}},{"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/export":259,"../internals/function-call":264,"../internals/function-name":265,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/iterator-create-constructor":295,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-get-prototype-of":313,"../internals/object-set-prototype-of":318,"../internals/set-to-string-tag":331,"../internals/well-known-symbol":357}],297:[function(e,r,t){var n,a,s,o=e("../internals/fails"),i=e("../internals/is-callable"),c=e("../internals/is-object"),u=e("../internals/object-create"),l=e("../internals/object-get-prototype-of"),A=e("../internals/define-built-in"),h=e("../internals/well-known-symbol"),f=e("../internals/is-pure"),d=h("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(a=l(l(s)))!==Object.prototype&&(n=a):g=!0),!c(n)||o(function(){var p={};return n[d].call(p)!==p})?n={}:f&&(n=u(n)),i(n[d])||A(n,d,function(){return this}),r.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},{"../internals/define-built-in":245,"../internals/fails":260,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-get-prototype-of":313,"../internals/well-known-symbol":357}],298:[function(e,r,t){arguments[4][276][0].apply(t,arguments)},{dup:276}],299:[function(e,r,t){var n=e("../internals/to-length");r.exports=function(a){return n(a.length)}},{"../internals/to-length":343}],300:[function(e,r,t){var n=e("../internals/function-uncurry-this"),a=e("../internals/fails"),s=e("../internals/is-callable"),o=e("../internals/has-own-property"),i=e("../internals/descriptors"),c=e("../internals/function-name").CONFIGURABLE,u=e("../internals/inspect-source"),l=e("../internals/internal-state"),A=l.enforce,h=l.get,f=String,d=Object.defineProperty,g=n("".slice),p=n("".replace),m=n([].join),v=i&&!a(function(){return d(function(){},"length",{value:8}).length!==8}),y=String(String).split("String"),I=r.exports=function(E,k,R){g(f(k),0,7)==="Symbol("&&(k="["+p(f(k),/^Symbol\(([^)]*)\)/,"$1")+"]"),R&&R.getter&&(k="get "+k),R&&R.setter&&(k="set "+k),(!o(E,"name")||c&&E.name!==k)&&(i?d(E,"name",{value:k,configurable:!0}):E.name=k),v&&R&&o(R,"arity")&&E.length!==R.arity&&d(E,"length",{value:R.arity});try{R&&o(R,"constructor")&&R.constructor?i&&d(E,"prototype",{writable:!1}):E.prototype&&(E.prototype=void 0)}catch{}var T=A(E);return o(T,"source")||(T.source=m(y,typeof k=="string"?k:"")),E};Function.prototype.toString=I(function(){return s(this)&&h(this).source||u(this)},"toString")},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-name":265,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/inspect-source":281,"../internals/internal-state":282,"../internals/is-callable":285}],301:[function(e,r,t){var n=Math.ceil,a=Math.floor;r.exports=Math.trunc||function(s){var o=+s;return(o>0?a:n)(o)}},{}],302:[function(e,r,t){var n,a,s,o,i,c=e("../internals/global"),u=e("../internals/function-bind-context"),l=e("../internals/object-get-own-property-descriptor").f,A=e("../internals/task").set,h=e("../internals/queue"),f=e("../internals/engine-is-ios"),d=e("../internals/engine-is-ios-pebble"),g=e("../internals/engine-is-webos-webkit"),p=e("../internals/engine-is-node"),m=c.MutationObserver||c.WebKitMutationObserver,v=c.document,y=c.process,I=c.Promise,E=l(c,"queueMicrotask"),k=E&&E.value;if(!k){var R=new h,T=function(){var j,W;for(p&&(j=y.domain)&&j.exit();W=R.get();)try{W()}catch(H){throw R.head&&n(),H}j&&j.enter()};f||p||g||!m||!v?!d&&I&&I.resolve?((o=I.resolve(void 0)).constructor=I,i=u(o.then,o),n=function(){i(T)}):p?n=function(){y.nextTick(T)}:(A=u(A,c),n=function(){A(T)}):(a=!0,s=v.createTextNode(""),new m(T).observe(s,{characterData:!0}),n=function(){s.data=a=!a}),k=function(j){R.head||n(),R.add(j)}}r.exports=k},{"../internals/engine-is-ios":253,"../internals/engine-is-ios-pebble":252,"../internals/engine-is-node":254,"../internals/engine-is-webos-webkit":255,"../internals/function-bind-context":262,"../internals/global":274,"../internals/object-get-own-property-descriptor":309,"../internals/queue":328,"../internals/task":339}],303:[function(e,r,t){var n=e("../internals/a-callable"),a=TypeError,s=function(o){var i,c;this.promise=new o(function(u,l){if(i!==void 0||c!==void 0)throw new a("Bad Promise constructor");i=u,c=l}),this.resolve=n(i),this.reject=n(c)};r.exports.f=function(o){return new s(o)}},{"../internals/a-callable":222}],304:[function(e,r,t){var n=e("../internals/is-regexp"),a=TypeError;r.exports=function(s){if(n(s))throw new a("The method doesn't accept regular expressions");return s}},{"../internals/is-regexp":291}],305:[function(e,r,t){var n=e("../internals/descriptors"),a=e("../internals/function-uncurry-this"),s=e("../internals/function-call"),o=e("../internals/fails"),i=e("../internals/object-keys"),c=e("../internals/object-get-own-property-symbols"),u=e("../internals/object-property-is-enumerable"),l=e("../internals/to-object"),A=e("../internals/indexed-object"),h=Object.assign,f=Object.defineProperty,d=a([].concat);r.exports=!h||o(function(){if(n&&h({b:1},h(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var g={},p={},m=Symbol("assign detection"),v="abcdefghijklmnopqrst";return g[m]=7,v.split("").forEach(function(y){p[y]=y}),h({},g)[m]!==7||i(h({},p)).join("")!==v})?function(g,p){for(var m=l(g),v=arguments.length,y=1,I=c.f,E=u.f;v>y;)for(var k,R=A(arguments[y++]),T=I?d(i(R),I(R)):i(R),j=T.length,W=0;j>W;)k=T[W++],n&&!s(E,R,k)||(m[k]=R[k]);return m}:h},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/object-get-own-property-symbols":312,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-object":344}],306:[function(e,r,t){var n,a=e("../internals/an-object"),s=e("../internals/object-define-properties"),o=e("../internals/enum-bug-keys"),i=e("../internals/hidden-keys"),c=e("../internals/html"),u=e("../internals/document-create-element"),l=e("../internals/shared-key"),A=">",h="<",f="prototype",d="script",g=l("IE_PROTO"),p=function(){},m=function(E){return h+d+A+E+h+"/"+d+A},v=function(E){E.write(m("")),E.close();var k=E.parentWindow.Object;return E=null,k},y=function(){var E,k=u("iframe"),R="java"+d+":";return k.style.display="none",c.appendChild(k),k.src=String(R),(E=k.contentWindow.document).open(),E.write(m("document.F=Object")),E.close(),E.F},I=function(){try{n=new ActiveXObject("htmlfile")}catch{}I=typeof document<"u"?document.domain&&n?v(n):y():v(n);for(var E=o.length;E--;)delete I[f][o[E]];return I()};i[g]=!0,r.exports=Object.create||function(E,k){var R;return E!==null?(p[f]=a(E),R=new p,p[f]=null,R[g]=E):R=I(),k===void 0?R:s.f(R,k)}},{"../internals/an-object":227,"../internals/document-create-element":249,"../internals/enum-bug-keys":258,"../internals/hidden-keys":276,"../internals/html":278,"../internals/object-define-properties":307,"../internals/shared-key":332}],307:[function(e,r,t){var n=e("../internals/descriptors"),a=e("../internals/v8-prototype-define-bug"),s=e("../internals/object-define-property"),o=e("../internals/an-object"),i=e("../internals/to-indexed-object"),c=e("../internals/object-keys");t.f=n&&!a?Object.defineProperties:function(u,l){o(u);for(var A,h=i(l),f=c(l),d=f.length,g=0;d>g;)s.f(u,A=f[g++],h[A]);return u}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/object-define-property":308,"../internals/object-keys":316,"../internals/to-indexed-object":341,"../internals/v8-prototype-define-bug":352}],308:[function(e,r,t){var n=e("../internals/descriptors"),a=e("../internals/ie8-dom-define"),s=e("../internals/v8-prototype-define-bug"),o=e("../internals/an-object"),i=e("../internals/to-property-key"),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,A="enumerable",h="configurable",f="writable";t.f=n?s?function(d,g,p){if(o(d),g=i(g),o(p),typeof d=="function"&&g==="prototype"&&"value"in p&&f in p&&!p[f]){var m=l(d,g);m&&m[f]&&(d[g]=p.value,p={configurable:h in p?p[h]:m[h],enumerable:A in p?p[A]:m[A],writable:!1})}return u(d,g,p)}:u:function(d,g,p){if(o(d),g=i(g),o(p),a)try{return u(d,g,p)}catch{}if("get"in p||"set"in p)throw new c("Accessors not supported");return"value"in p&&(d[g]=p.value),d}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/ie8-dom-define":279,"../internals/to-property-key":346,"../internals/v8-prototype-define-bug":352}],309:[function(e,r,t){var n=e("../internals/descriptors"),a=e("../internals/function-call"),s=e("../internals/object-property-is-enumerable"),o=e("../internals/create-property-descriptor"),i=e("../internals/to-indexed-object"),c=e("../internals/to-property-key"),u=e("../internals/has-own-property"),l=e("../internals/ie8-dom-define"),A=Object.getOwnPropertyDescriptor;t.f=n?A:function(h,f){if(h=i(h),f=c(f),l)try{return A(h,f)}catch{}if(u(h,f))return o(!a(s.f,h,f),h[f])}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/function-call":264,"../internals/has-own-property":275,"../internals/ie8-dom-define":279,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341,"../internals/to-property-key":346}],310:[function(e,r,t){var n=e("../internals/classof-raw"),a=e("../internals/to-indexed-object"),s=e("../internals/object-get-own-property-names").f,o=e("../internals/array-slice-simple"),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(u){try{return s(u)}catch{return o(i)}};r.exports.f=function(u){return i&&n(u)==="Window"?c(u):s(a(u))}},{"../internals/array-slice-simple":230,"../internals/classof-raw":235,"../internals/object-get-own-property-names":311,"../internals/to-indexed-object":341}],311:[function(e,r,t){var n=e("../internals/object-keys-internal"),a=e("../internals/enum-bug-keys").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(s){return n(s,a)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],312:[function(e,r,t){t.f=Object.getOwnPropertySymbols},{}],313:[function(e,r,t){var n=e("../internals/has-own-property"),a=e("../internals/is-callable"),s=e("../internals/to-object"),o=e("../internals/shared-key"),i=e("../internals/correct-prototype-getter"),c=o("IE_PROTO"),u=Object,l=u.prototype;r.exports=i?u.getPrototypeOf:function(A){var h=s(A);if(n(h,c))return h[c];var f=h.constructor;return a(f)&&h instanceof f?f.prototype:h instanceof u?l:null}},{"../internals/correct-prototype-getter":239,"../internals/has-own-property":275,"../internals/is-callable":285,"../internals/shared-key":332,"../internals/to-object":344}],314:[function(e,r,t){var n=e("../internals/function-uncurry-this");r.exports=n({}.isPrototypeOf)},{"../internals/function-uncurry-this":268}],315:[function(e,r,t){var n=e("../internals/function-uncurry-this"),a=e("../internals/has-own-property"),s=e("../internals/to-indexed-object"),o=e("../internals/array-includes").indexOf,i=e("../internals/hidden-keys"),c=n([].push);r.exports=function(u,l){var A,h=s(u),f=0,d=[];for(A in h)!a(i,A)&&a(h,A)&&c(d,A);for(;l.length>f;)a(h,A=l[f++])&&(~o(d,A)||c(d,A));return d}},{"../internals/array-includes":228,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/to-indexed-object":341}],316:[function(e,r,t){var n=e("../internals/object-keys-internal"),a=e("../internals/enum-bug-keys");r.exports=Object.keys||function(s){return n(s,a)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(e,r,t){var n={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,s=a&&!n.call({1:2},1);t.f=s?function(o){var i=a(this,o);return!!i&&i.enumerable}:n},{}],318:[function(e,r,t){var n=e("../internals/function-uncurry-this-accessor"),a=e("../internals/an-object"),s=e("../internals/a-possible-prototype");r.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,c={};try{(o=n(Object.prototype,"__proto__","set"))(c,[]),i=c instanceof Array}catch{}return function(u,l){return a(u),s(l),i?o(u,l):u.__proto__=l,u}}():void 0)},{"../internals/a-possible-prototype":224,"../internals/an-object":227,"../internals/function-uncurry-this-accessor":266}],319:[function(e,r,t){var n=e("../internals/descriptors"),a=e("../internals/fails"),s=e("../internals/function-uncurry-this"),o=e("../internals/object-get-prototype-of"),i=e("../internals/object-keys"),c=e("../internals/to-indexed-object"),u=s(e("../internals/object-property-is-enumerable").f),l=s([].push),A=n&&a(function(){var f=Object.create(null);return f[2]=2,!u(f,2)}),h=function(f){return function(d){for(var g,p=c(d),m=i(p),v=A&&o(p)===null,y=m.length,I=0,E=[];y>I;)g=m[I++],n&&!(v?g in p:u(p,g))||l(E,f?[g,p[g]]:p[g]);return E}};r.exports={entries:h(!0),values:h(!1)}},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/object-get-prototype-of":313,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341}],320:[function(e,r,t){var n=e("../internals/function-call"),a=e("../internals/is-callable"),s=e("../internals/is-object"),o=TypeError;r.exports=function(i,c){var u,l;if(c==="string"&&a(u=i.toString)&&!s(l=n(u,i))||a(u=i.valueOf)&&!s(l=n(u,i))||c!=="string"&&a(u=i.toString)&&!s(l=n(u,i)))return l;throw new o("Can't convert object to primitive value")}},{"../internals/function-call":264,"../internals/is-callable":285,"../internals/is-object":289}],321:[function(e,r,t){var n=e("../internals/get-built-in"),a=e("../internals/function-uncurry-this"),s=e("../internals/object-get-own-property-names"),o=e("../internals/object-get-own-property-symbols"),i=e("../internals/an-object"),c=a([].concat);r.exports=n("Reflect","ownKeys")||function(u){var l=s.f(i(u)),A=o.f;return A?c(l,A(u)):l}},{"../internals/an-object":227,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-symbols":312}],322:[function(e,r,t){var n=e("../internals/global");r.exports=n},{"../internals/global":274}],323:[function(e,r,t){r.exports=function(n){try{return{error:!1,value:n()}}catch(a){return{error:!0,value:a}}}},{}],324:[function(e,r,t){var n=e("../internals/global"),a=e("../internals/promise-native-constructor"),s=e("../internals/is-callable"),o=e("../internals/is-forced"),i=e("../internals/inspect-source"),c=e("../internals/well-known-symbol"),u=e("../internals/engine-is-browser"),l=e("../internals/engine-is-deno"),A=e("../internals/is-pure"),h=e("../internals/engine-v8-version"),f=a&&a.prototype,d=c("species"),g=!1,p=s(n.PromiseRejectionEvent),m=o("Promise",function(){var v=i(a),y=v!==String(a);if(!y&&h===66||A&&(!f.catch||!f.finally))return!0;if(!h||h<51||!/native code/.test(v)){var I=new a(function(k){k(1)}),E=function(k){k(function(){},function(){})};if((I.constructor={})[d]=E,!(g=I.then(function(){})instanceof E))return!0}return!y&&(u||l)&&!p});r.exports={CONSTRUCTOR:m,REJECTION_EVENT:p,SUBCLASSING:g}},{"../internals/engine-is-browser":250,"../internals/engine-is-deno":251,"../internals/engine-v8-version":257,"../internals/global":274,"../internals/inspect-source":281,"../internals/is-callable":285,"../internals/is-forced":287,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/well-known-symbol":357}],325:[function(e,r,t){var n=e("../internals/global");r.exports=n.Promise},{"../internals/global":274}],326:[function(e,r,t){var n=e("../internals/an-object"),a=e("../internals/is-object"),s=e("../internals/new-promise-capability");r.exports=function(o,i){if(n(o),a(i)&&i.constructor===o)return i;var c=s.f(o);return(0,c.resolve)(i),c.promise}},{"../internals/an-object":227,"../internals/is-object":289,"../internals/new-promise-capability":303}],327:[function(e,r,t){var n=e("../internals/promise-native-constructor"),a=e("../internals/check-correctness-of-iteration"),s=e("../internals/promise-constructor-detection").CONSTRUCTOR;r.exports=s||!a(function(o){n.all(o).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":234,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],328:[function(e,r,t){var n=function(){this.head=null,this.tail=null};n.prototype={add:function(a){var s={item:a,next:null},o=this.tail;o?o.next=s:this.head=s,this.tail=s},get:function(){var a=this.head;if(a)return(this.head=a.next)===null&&(this.tail=null),a.item}},r.exports=n},{}],329:[function(e,r,t){var n=e("../internals/is-null-or-undefined"),a=TypeError;r.exports=function(s){if(n(s))throw new a("Can't call method on "+s);return s}},{"../internals/is-null-or-undefined":288}],330:[function(e,r,t){var n=e("../internals/get-built-in"),a=e("../internals/define-built-in-accessor"),s=e("../internals/well-known-symbol"),o=e("../internals/descriptors"),i=s("species");r.exports=function(c){var u=n(c);o&&u&&!u[i]&&a(u,i,{configurable:!0,get:function(){return this}})}},{"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],331:[function(e,r,t){var n=e("../internals/object-define-property").f,a=e("../internals/has-own-property"),s=e("../internals/well-known-symbol")("toStringTag");r.exports=function(o,i,c){o&&!c&&(o=o.prototype),o&&!a(o,s)&&n(o,s,{configurable:!0,value:i})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],332:[function(e,r,t){var n=e("../internals/shared"),a=e("../internals/uid"),s=n("keys");r.exports=function(o){return s[o]||(s[o]=a(o))}},{"../internals/shared":334,"../internals/uid":350}],333:[function(e,r,t){var n=e("../internals/global"),a=e("../internals/define-global-property"),s="__core-js_shared__",o=n[s]||a(s,{});r.exports=o},{"../internals/define-global-property":246,"../internals/global":274}],334:[function(e,r,t){var n=e("../internals/is-pure"),a=e("../internals/shared-store");(r.exports=function(s,o){return a[s]||(a[s]=o!==void 0?o:{})})("versions",[]).push({version:"3.33.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":290,"../internals/shared-store":333}],335:[function(e,r,t){var n=e("../internals/an-object"),a=e("../internals/a-constructor"),s=e("../internals/is-null-or-undefined"),o=e("../internals/well-known-symbol")("species");r.exports=function(i,c){var u,l=n(i).constructor;return l===void 0||s(u=n(l)[o])?c:a(u)}},{"../internals/a-constructor":223,"../internals/an-object":227,"../internals/is-null-or-undefined":288,"../internals/well-known-symbol":357}],336:[function(e,r,t){var n=e("../internals/engine-v8-version"),a=e("../internals/fails"),s=e("../internals/global").String;r.exports=!!Object.getOwnPropertySymbols&&!a(function(){var o=Symbol("symbol detection");return!s(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&n&&n<41})},{"../internals/engine-v8-version":257,"../internals/fails":260,"../internals/global":274}],337:[function(e,r,t){var n=e("../internals/function-call"),a=e("../internals/get-built-in"),s=e("../internals/well-known-symbol"),o=e("../internals/define-built-in");r.exports=function(){var i=a("Symbol"),c=i&&i.prototype,u=c&&c.valueOf,l=s("toPrimitive");c&&!c[l]&&o(c,l,function(A){return n(u,this)},{arity:1})}},{"../internals/define-built-in":245,"../internals/function-call":264,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],338:[function(e,r,t){var n=e("../internals/symbol-constructor-detection");r.exports=n&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":336}],339:[function(e,r,t){var n,a,s,o,i=e("../internals/global"),c=e("../internals/function-apply"),u=e("../internals/function-bind-context"),l=e("../internals/is-callable"),A=e("../internals/has-own-property"),h=e("../internals/fails"),f=e("../internals/html"),d=e("../internals/array-slice"),g=e("../internals/document-create-element"),p=e("../internals/validate-arguments-length"),m=e("../internals/engine-is-ios"),v=e("../internals/engine-is-node"),y=i.setImmediate,I=i.clearImmediate,E=i.process,k=i.Dispatch,R=i.Function,T=i.MessageChannel,j=i.String,W=0,H={},X="onreadystatechange";h(function(){n=i.location});var x=function(Q){if(A(H,Q)){var B=H[Q];delete H[Q],B()}},N=function(Q){return function(){x(Q)}},C=function(Q){x(Q.data)},w=function(Q){i.postMessage(j(Q),n.protocol+"//"+n.host)};y&&I||(y=function(Q){p(arguments.length,1);var B=l(Q)?Q:R(Q),S=d(arguments,1);return H[++W]=function(){c(B,void 0,S)},a(W),W},I=function(Q){delete H[Q]},v?a=function(Q){E.nextTick(N(Q))}:k&&k.now?a=function(Q){k.now(N(Q))}:T&&!m?(o=(s=new T).port2,s.port1.onmessage=C,a=u(o.postMessage,o)):i.addEventListener&&l(i.postMessage)&&!i.importScripts&&n&&n.protocol!=="file:"&&!h(w)?(a=w,i.addEventListener("message",C,!1)):a=X in g("script")?function(Q){f.appendChild(g("script"))[X]=function(){f.removeChild(this),x(Q)}}:function(Q){setTimeout(N(Q),0)}),r.exports={set:y,clear:I}},{"../internals/array-slice":231,"../internals/document-create-element":249,"../internals/engine-is-ios":253,"../internals/engine-is-node":254,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-bind-context":262,"../internals/global":274,"../internals/has-own-property":275,"../internals/html":278,"../internals/is-callable":285,"../internals/validate-arguments-length":353}],340:[function(e,r,t){var n=e("../internals/to-integer-or-infinity"),a=Math.max,s=Math.min;r.exports=function(o,i){var c=n(o);return c<0?a(c+i,0):s(c,i)}},{"../internals/to-integer-or-infinity":342}],341:[function(e,r,t){var n=e("../internals/indexed-object"),a=e("../internals/require-object-coercible");r.exports=function(s){return n(a(s))}},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(e,r,t){var n=e("../internals/math-trunc");r.exports=function(a){var s=+a;return s!=s||s===0?0:n(s)}},{"../internals/math-trunc":301}],343:[function(e,r,t){var n=e("../internals/to-integer-or-infinity"),a=Math.min;r.exports=function(s){return s>0?a(n(s),9007199254740991):0}},{"../internals/to-integer-or-infinity":342}],344:[function(e,r,t){var n=e("../internals/require-object-coercible"),a=Object;r.exports=function(s){return a(n(s))}},{"../internals/require-object-coercible":329}],345:[function(e,r,t){var n=e("../internals/function-call"),a=e("../internals/is-object"),s=e("../internals/is-symbol"),o=e("../internals/get-method"),i=e("../internals/ordinary-to-primitive"),c=e("../internals/well-known-symbol"),u=TypeError,l=c("toPrimitive");r.exports=function(A,h){if(!a(A)||s(A))return A;var f,d=o(A,l);if(d){if(h===void 0&&(h="default"),f=n(d,A,h),!a(f)||s(f))return f;throw new u("Can't convert object to primitive value")}return h===void 0&&(h="number"),i(A,h)}},{"../internals/function-call":264,"../internals/get-method":273,"../internals/is-object":289,"../internals/is-symbol":292,"../internals/ordinary-to-primitive":320,"../internals/well-known-symbol":357}],346:[function(e,r,t){var n=e("../internals/to-primitive"),a=e("../internals/is-symbol");r.exports=function(s){var o=n(s,"string");return a(o)?o:o+""}},{"../internals/is-symbol":292,"../internals/to-primitive":345}],347:[function(e,r,t){var n={};n[e("../internals/well-known-symbol")("toStringTag")]="z",r.exports=String(n)==="[object z]"},{"../internals/well-known-symbol":357}],348:[function(e,r,t){var n=e("../internals/classof"),a=String;r.exports=function(s){if(n(s)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return a(s)}},{"../internals/classof":236}],349:[function(e,r,t){var n=String;r.exports=function(a){try{return n(a)}catch{return"Object"}}},{}],350:[function(e,r,t){var n=e("../internals/function-uncurry-this"),a=0,s=Math.random(),o=n(1 .toString);r.exports=function(i){return"Symbol("+(i===void 0?"":i)+")_"+o(++a+s,36)}},{"../internals/function-uncurry-this":268}],351:[function(e,r,t){var n=e("../internals/symbol-constructor-detection");r.exports=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/symbol-constructor-detection":336}],352:[function(e,r,t){var n=e("../internals/descriptors"),a=e("../internals/fails");r.exports=n&&a(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(e,r,t){var n=TypeError;r.exports=function(a,s){if(a1?arguments[1]:void 0)}}),s(o)},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],359:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/array-iteration").find,s=e("../internals/add-to-unscopables"),o="find",i=!0;o in[]&&Array(1)[o](function(){i=!1}),n({target:"Array",proto:!0,forced:i},{find:function(c){return a(this,c,arguments.length>1?arguments[1]:void 0)}}),s(o)},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],360:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/array-includes").includes,s=e("../internals/fails"),o=e("../internals/add-to-unscopables");n({target:"Array",proto:!0,forced:s(function(){return!Array(1).includes()})},{includes:function(i){return a(this,i,arguments.length>1?arguments[1]:void 0)}}),o("includes")},{"../internals/add-to-unscopables":225,"../internals/array-includes":228,"../internals/export":259,"../internals/fails":260}],361:[function(e,r,t){var n=e("../internals/to-indexed-object"),a=e("../internals/add-to-unscopables"),s=e("../internals/iterators"),o=e("../internals/internal-state"),i=e("../internals/object-define-property").f,c=e("../internals/iterator-define"),u=e("../internals/create-iter-result-object"),l=e("../internals/is-pure"),A=e("../internals/descriptors"),h="Array Iterator",f=o.set,d=o.getterFor(h);r.exports=c(Array,"Array",function(p,m){f(this,{type:h,target:n(p),index:0,kind:m})},function(){var p=d(this),m=p.target,v=p.kind,y=p.index++;if(!m||y>=m.length)return p.target=void 0,u(void 0,!0);switch(v){case"keys":return u(y,!1);case"values":return u(m[y],!1)}return u([y,m[y]],!1)},"values");var g=s.Arguments=s.Array;if(a("keys"),a("values"),a("entries"),!l&&A&&g.name!=="values")try{i(g,"name",{value:"values"})}catch{}},{"../internals/add-to-unscopables":225,"../internals/create-iter-result-object":240,"../internals/descriptors":247,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/iterator-define":296,"../internals/iterators":298,"../internals/object-define-property":308,"../internals/to-indexed-object":341}],362:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/get-built-in"),s=e("../internals/function-apply"),o=e("../internals/function-call"),i=e("../internals/function-uncurry-this"),c=e("../internals/fails"),u=e("../internals/is-callable"),l=e("../internals/is-symbol"),A=e("../internals/array-slice"),h=e("../internals/get-json-replacer-function"),f=e("../internals/symbol-constructor-detection"),d=String,g=a("JSON","stringify"),p=i(/./.exec),m=i("".charAt),v=i("".charCodeAt),y=i("".replace),I=i(1 .toString),E=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,T=!f||c(function(){var X=a("Symbol")("stringify detection");return g([X])!=="[null]"||g({a:X})!=="{}"||g(Object(X))!=="{}"}),j=c(function(){return g("\uDF06\uD834")!=='"\\udf06\\ud834"'||g("\uDEAD")!=='"\\udead"'}),W=function(X,x){var N=A(arguments),C=h(x);if(u(C)||X!==void 0&&!l(X))return N[1]=function(w,Q){if(u(C)&&(Q=o(C,this,d(w),Q)),!l(Q))return Q},s(g,null,N)},H=function(X,x,N){var C=m(N,x-1),w=m(N,x+1);return p(k,X)&&!p(R,w)||p(R,X)&&!p(k,C)?"\\u"+I(v(X,0),16):X};g&&n({target:"JSON",stat:!0,arity:3,forced:T||j},{stringify:function(X,x,N){var C=A(arguments),w=s(T?W:g,null,C);return j&&typeof w=="string"?y(w,E,H):w}})},{"../internals/array-slice":231,"../internals/export":259,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/get-json-replacer-function":272,"../internals/is-callable":285,"../internals/is-symbol":292,"../internals/symbol-constructor-detection":336}],363:[function(e,r,t){e("../internals/export")({target:"Number",stat:!0},{isNaN:function(n){return n!=n}})},{"../internals/export":259}],364:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/object-assign");n({target:"Object",stat:!0,arity:2,forced:Object.assign!==a},{assign:a})},{"../internals/export":259,"../internals/object-assign":305}],365:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/symbol-constructor-detection"),s=e("../internals/fails"),o=e("../internals/object-get-own-property-symbols"),i=e("../internals/to-object");n({target:"Object",stat:!0,forced:!a||s(function(){o.f(1)})},{getOwnPropertySymbols:function(c){var u=o.f;return u?u(i(c)):[]}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-get-own-property-symbols":312,"../internals/symbol-constructor-detection":336,"../internals/to-object":344}],366:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/to-object"),s=e("../internals/object-keys");n({target:"Object",stat:!0,forced:e("../internals/fails")(function(){s(1)})},{keys:function(o){return s(a(o))}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-keys":316,"../internals/to-object":344}],367:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/object-to-array").values;n({target:"Object",stat:!0},{values:function(s){return a(s)}})},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/function-call"),s=e("../internals/a-callable"),o=e("../internals/new-promise-capability"),i=e("../internals/perform"),c=e("../internals/iterate");n({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{all:function(u){var l=this,A=o.f(l),h=A.resolve,f=A.reject,d=i(function(){var g=s(l.resolve),p=[],m=0,v=1;c(u,function(y){var I=m++,E=!1;v++,a(g,l,y).then(function(k){E||(E=!0,p[I]=k,--v||h(p))},f)}),--v||h(p)});return d.error&&f(d.value),A.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],369:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/is-pure"),s=e("../internals/promise-constructor-detection").CONSTRUCTOR,o=e("../internals/promise-native-constructor"),i=e("../internals/get-built-in"),c=e("../internals/is-callable"),u=e("../internals/define-built-in"),l=o&&o.prototype;if(n({target:"Promise",proto:!0,forced:s,real:!0},{catch:function(h){return this.then(void 0,h)}}),!a&&c(o)){var A=i("Promise").prototype.catch;l.catch!==A&&u(l,"catch",A,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],370:[function(e,r,t){var n,a,s,o,i=e("../internals/export"),c=e("../internals/is-pure"),u=e("../internals/engine-is-node"),l=e("../internals/global"),A=e("../internals/function-call"),h=e("../internals/define-built-in"),f=e("../internals/object-set-prototype-of"),d=e("../internals/set-to-string-tag"),g=e("../internals/set-species"),p=e("../internals/a-callable"),m=e("../internals/is-callable"),v=e("../internals/is-object"),y=e("../internals/an-instance"),I=e("../internals/species-constructor"),E=e("../internals/task").set,k=e("../internals/microtask"),R=e("../internals/host-report-errors"),T=e("../internals/perform"),j=e("../internals/queue"),W=e("../internals/internal-state"),H=e("../internals/promise-native-constructor"),X=e("../internals/promise-constructor-detection"),x=e("../internals/new-promise-capability"),N="Promise",C=X.CONSTRUCTOR,w=X.REJECTION_EVENT,Q=X.SUBCLASSING,B=W.getterFor(N),S=W.set,O=H&&H.prototype,F=H,Y=O,M=l.TypeError,z=l.document,ue=l.process,ae=x.f,Ne=ae,Ge=!!(z&&z.createEvent&&l.dispatchEvent),Ye="unhandledrejection",Ae="rejectionhandled",te=0,he=1,de=2,Ke=1,le=2,Ce=function(Be){var Ee;return!(!v(Be)||!m(Ee=Be.then))&&Ee},At=function(Be,Ee){var Me,yt,pe,me=Ee.value,Re=Ee.state===he,Ze=Re?Be.ok:Be.fail,ke=Be.resolve,Pe=Be.reject,_e=Be.domain;try{Ze?(Re||(Ee.rejection===le&&dt(Ee),Ee.rejection=Ke),Ze===!0?Me=me:(_e&&_e.enter(),Me=Ze(me),_e&&(_e.exit(),pe=!0)),Me===Be.promise?Pe(new M("Promise-chain cycle")):(yt=Ce(Me))?A(yt,Me,ke,Pe):ke(Me)):Pe(me)}catch(Je){_e&&!pe&&_e.exit(),Pe(Je)}},Z=function(Be,Ee){Be.notified||(Be.notified=!0,k(function(){for(var Me,yt=Be.reactions;Me=yt.get();)At(Me,Be);Be.notified=!1,Ee&&!Be.rejection&&ye(Be)}))},ce=function(Be,Ee,Me){var yt,pe;Ge?((yt=z.createEvent("Event")).promise=Ee,yt.reason=Me,yt.initEvent(Be,!1,!0),l.dispatchEvent(yt)):yt={promise:Ee,reason:Me},!w&&(pe=l["on"+Be])?pe(yt):Be===Ye&&R("Unhandled promise rejection",Me)},ye=function(Be){A(E,l,function(){var Ee,Me=Be.facade,yt=Be.value;if(Ve(Be)&&(Ee=T(function(){u?ue.emit("unhandledRejection",yt,Me):ce(Ye,Me,yt)}),Be.rejection=u||Ve(Be)?le:Ke,Ee.error))throw Ee.value})},Ve=function(Be){return Be.rejection!==Ke&&!Be.parent},dt=function(Be){A(E,l,function(){var Ee=Be.facade;u?ue.emit("rejectionHandled",Ee):ce(Ae,Ee,Be.value)})},re=function(Be,Ee,Me){return function(yt){Be(Ee,yt,Me)}},ot=function(Be,Ee,Me){Be.done||(Be.done=!0,Me&&(Be=Me),Be.value=Ee,Be.state=de,Z(Be,!0))},pt=function Be(Ee,Me,yt){if(!Ee.done){Ee.done=!0,yt&&(Ee=yt);try{if(Ee.facade===Me)throw new M("Promise can't be resolved itself");var pe=Ce(Me);pe?k(function(){var me={done:!1};try{A(pe,Me,re(Be,me,Ee),re(ot,me,Ee))}catch(Re){ot(me,Re,Ee)}}):(Ee.value=Me,Ee.state=he,Z(Ee,!1))}catch(me){ot({done:!1},me,Ee)}}};if(C&&(Y=(F=function(Be){y(this,Y),p(Be),A(n,this);var Ee=B(this);try{Be(re(pt,Ee),re(ot,Ee))}catch(Me){ot(Ee,Me)}}).prototype,(n=function(Be){S(this,{type:N,done:!1,notified:!1,parent:!1,reactions:new j,rejection:!1,state:te,value:void 0})}).prototype=h(Y,"then",function(Be,Ee){var Me=B(this),yt=ae(I(this,F));return Me.parent=!0,yt.ok=!m(Be)||Be,yt.fail=m(Ee)&&Ee,yt.domain=u?ue.domain:void 0,Me.state===te?Me.reactions.add(yt):k(function(){At(yt,Me)}),yt.promise}),a=function(){var Be=new n,Ee=B(Be);this.promise=Be,this.resolve=re(pt,Ee),this.reject=re(ot,Ee)},x.f=ae=function(Be){return Be===F||Be===s?new a(Be):Ne(Be)},!c&&m(H)&&O!==Object.prototype)){o=O.then,Q||h(O,"then",function(Be,Ee){var Me=this;return new F(function(yt,pe){A(o,Me,yt,pe)}).then(Be,Ee)},{unsafe:!0});try{delete O.constructor}catch{}f&&f(O,Y)}i({global:!0,constructor:!0,wrap:!0,forced:C},{Promise:F}),d(F,N,!1,!0),g(N)},{"../internals/a-callable":222,"../internals/an-instance":226,"../internals/define-built-in":245,"../internals/engine-is-node":254,"../internals/export":259,"../internals/function-call":264,"../internals/global":274,"../internals/host-report-errors":277,"../internals/internal-state":282,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/microtask":302,"../internals/new-promise-capability":303,"../internals/object-set-prototype-of":318,"../internals/perform":323,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/queue":328,"../internals/set-species":330,"../internals/set-to-string-tag":331,"../internals/species-constructor":335,"../internals/task":339}],371:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/is-pure"),s=e("../internals/promise-native-constructor"),o=e("../internals/fails"),i=e("../internals/get-built-in"),c=e("../internals/is-callable"),u=e("../internals/species-constructor"),l=e("../internals/promise-resolve"),A=e("../internals/define-built-in"),h=s&&s.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!s&&o(function(){h.finally.call({then:function(){}},function(){})})},{finally:function(d){var g=u(this,i("Promise")),p=c(d);return this.then(p?function(m){return l(g,d()).then(function(){return m})}:d,p?function(m){return l(g,d()).then(function(){throw m})}:d)}}),!a&&c(s)){var f=i("Promise").prototype.finally;h.finally!==f&&A(h,"finally",f,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/fails":260,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326,"../internals/species-constructor":335}],372:[function(e,r,t){e("../modules/es.promise.constructor"),e("../modules/es.promise.all"),e("../modules/es.promise.catch"),e("../modules/es.promise.race"),e("../modules/es.promise.reject"),e("../modules/es.promise.resolve")},{"../modules/es.promise.all":368,"../modules/es.promise.catch":369,"../modules/es.promise.constructor":370,"../modules/es.promise.race":373,"../modules/es.promise.reject":374,"../modules/es.promise.resolve":375}],373:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/function-call"),s=e("../internals/a-callable"),o=e("../internals/new-promise-capability"),i=e("../internals/perform"),c=e("../internals/iterate");n({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{race:function(u){var l=this,A=o.f(l),h=A.reject,f=i(function(){var d=s(l.resolve);c(u,function(g){a(d,l,g).then(A.resolve,h)})});return f.error&&h(f.value),A.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],374:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/function-call"),s=e("../internals/new-promise-capability");n({target:"Promise",stat:!0,forced:e("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(o){var i=s.f(this);return a(i.reject,void 0,o),i.promise}})},{"../internals/export":259,"../internals/function-call":264,"../internals/new-promise-capability":303,"../internals/promise-constructor-detection":324}],375:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/get-built-in"),s=e("../internals/is-pure"),o=e("../internals/promise-native-constructor"),i=e("../internals/promise-constructor-detection").CONSTRUCTOR,c=e("../internals/promise-resolve"),u=a("Promise"),l=s&&!i;n({target:"Promise",stat:!0,forced:s||i},{resolve:function(A){return c(l&&this===u?o:this,A)}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326}],376:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/function-uncurry-this"),s=e("../internals/to-absolute-index"),o=RangeError,i=String.fromCharCode,c=String.fromCodePoint,u=a([].join);n({target:"String",stat:!0,arity:1,forced:!!c&&c.length!==1},{fromCodePoint:function(l){for(var A,h=[],f=arguments.length,d=0;f>d;){if(A=+arguments[d++],s(A,1114111)!==A)throw new o(A+" is not a valid code point");h[d]=A<65536?i(A):i(55296+((A-=65536)>>10),A%1024+56320)}return u(h,"")}})},{"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/to-absolute-index":340}],377:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/function-uncurry-this"),s=e("../internals/not-a-regexp"),o=e("../internals/require-object-coercible"),i=e("../internals/to-string"),c=e("../internals/correct-is-regexp-logic"),u=a("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(l){return!!~u(i(o(this)),i(s(l)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":238,"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/not-a-regexp":304,"../internals/require-object-coercible":329,"../internals/to-string":348}],378:[function(e,r,t){e("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":355}],379:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/global"),s=e("../internals/function-call"),o=e("../internals/function-uncurry-this"),i=e("../internals/is-pure"),c=e("../internals/descriptors"),u=e("../internals/symbol-constructor-detection"),l=e("../internals/fails"),A=e("../internals/has-own-property"),h=e("../internals/object-is-prototype-of"),f=e("../internals/an-object"),d=e("../internals/to-indexed-object"),g=e("../internals/to-property-key"),p=e("../internals/to-string"),m=e("../internals/create-property-descriptor"),v=e("../internals/object-create"),y=e("../internals/object-keys"),I=e("../internals/object-get-own-property-names"),E=e("../internals/object-get-own-property-names-external"),k=e("../internals/object-get-own-property-symbols"),R=e("../internals/object-get-own-property-descriptor"),T=e("../internals/object-define-property"),j=e("../internals/object-define-properties"),W=e("../internals/object-property-is-enumerable"),H=e("../internals/define-built-in"),X=e("../internals/define-built-in-accessor"),x=e("../internals/shared"),N=e("../internals/shared-key"),C=e("../internals/hidden-keys"),w=e("../internals/uid"),Q=e("../internals/well-known-symbol"),B=e("../internals/well-known-symbol-wrapped"),S=e("../internals/well-known-symbol-define"),O=e("../internals/symbol-define-to-primitive"),F=e("../internals/set-to-string-tag"),Y=e("../internals/internal-state"),M=e("../internals/array-iteration").forEach,z=N("hidden"),ue="Symbol",ae="prototype",Ne=Y.set,Ge=Y.getterFor(ue),Ye=Object[ae],Ae=a.Symbol,te=Ae&&Ae[ae],he=a.RangeError,de=a.TypeError,Ke=a.QObject,le=R.f,Ce=T.f,At=E.f,Z=W.f,ce=o([].push),ye=x("symbols"),Ve=x("op-symbols"),dt=x("wks"),re=!Ke||!Ke[ae]||!Ke[ae].findChild,ot=function(ke,Pe,_e){var Je=le(Ye,Pe);Je&&delete Ye[Pe],Ce(ke,Pe,_e),Je&&ke!==Ye&&Ce(Ye,Pe,Je)},pt=c&&l(function(){return v(Ce({},"a",{get:function(){return Ce(this,"a",{value:7}).a}})).a!==7})?ot:Ce,Be=function(ke,Pe){var _e=ye[ke]=v(te);return Ne(_e,{type:ue,tag:ke,description:Pe}),c||(_e.description=Pe),_e},Ee=function(ke,Pe,_e){ke===Ye&&Ee(Ve,Pe,_e),f(ke);var Je=g(Pe);return f(_e),A(ye,Je)?(_e.enumerable?(A(ke,z)&&ke[z][Je]&&(ke[z][Je]=!1),_e=v(_e,{enumerable:m(0,!1)})):(A(ke,z)||Ce(ke,z,m(1,{})),ke[z][Je]=!0),pt(ke,Je,_e)):Ce(ke,Je,_e)},Me=function(ke,Pe){f(ke);var _e=d(Pe),Je=y(_e).concat(Ze(_e));return M(Je,function(at){c&&!s(pe,_e,at)||Ee(ke,at,_e[at])}),ke},yt=function(ke,Pe){return Pe===void 0?v(ke):Me(v(ke),Pe)},pe=function(ke){var Pe=g(ke),_e=s(Z,this,Pe);return!(this===Ye&&A(ye,Pe)&&!A(Ve,Pe))&&(!(_e||!A(this,Pe)||!A(ye,Pe)||A(this,z)&&this[z][Pe])||_e)},me=function(ke,Pe){var _e=d(ke),Je=g(Pe);if(_e!==Ye||!A(ye,Je)||A(Ve,Je)){var at=le(_e,Je);return!at||!A(ye,Je)||A(_e,z)&&_e[z][Je]||(at.enumerable=!0),at}},Re=function(ke){var Pe=At(d(ke)),_e=[];return M(Pe,function(Je){A(ye,Je)||A(C,Je)||ce(_e,Je)}),_e},Ze=function(ke){var Pe=ke===Ye,_e=At(Pe?Ve:d(ke)),Je=[];return M(_e,function(at){!A(ye,at)||Pe&&!A(Ye,at)||ce(Je,ye[at])}),Je};u||(Ae=function(){if(h(te,this))throw new de("Symbol is not a constructor");var ke=arguments.length&&arguments[0]!==void 0?p(arguments[0]):void 0,Pe=w(ke),_e=function Je(at){this===Ye&&s(Je,Ve,at),A(this,z)&&A(this[z],Pe)&&(this[z][Pe]=!1);var Dt=m(1,at);try{pt(this,Pe,Dt)}catch(St){if(!(St instanceof he))throw St;ot(this,Pe,Dt)}};return c&&re&&pt(Ye,Pe,{configurable:!0,set:_e}),Be(Pe,ke)},H(te=Ae[ae],"toString",function(){return Ge(this).tag}),H(Ae,"withoutSetter",function(ke){return Be(w(ke),ke)}),W.f=pe,T.f=Ee,j.f=Me,R.f=me,I.f=E.f=Re,k.f=Ze,B.f=function(ke){return Be(Q(ke),ke)},c&&(X(te,"description",{configurable:!0,get:function(){return Ge(this).description}}),i||H(Ye,"propertyIsEnumerable",pe,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:Ae}),M(y(dt),function(ke){S(ke)}),n({target:ue,stat:!0,forced:!u},{useSetter:function(){re=!0},useSimple:function(){re=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!c},{create:yt,defineProperty:Ee,defineProperties:Me,getOwnPropertyDescriptor:me}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:Re}),O(),F(Ae,ue),C[z]=!0},{"../internals/an-object":227,"../internals/array-iteration":229,"../internals/create-property-descriptor":242,"../internals/define-built-in":245,"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/export":259,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-define-properties":307,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-names-external":310,"../internals/object-get-own-property-symbols":312,"../internals/object-is-prototype-of":314,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/set-to-string-tag":331,"../internals/shared":334,"../internals/shared-key":332,"../internals/symbol-constructor-detection":336,"../internals/symbol-define-to-primitive":337,"../internals/to-indexed-object":341,"../internals/to-property-key":346,"../internals/to-string":348,"../internals/uid":350,"../internals/well-known-symbol":357,"../internals/well-known-symbol-define":355,"../internals/well-known-symbol-wrapped":356}],380:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/get-built-in"),s=e("../internals/has-own-property"),o=e("../internals/to-string"),i=e("../internals/shared"),c=e("../internals/symbol-registry-detection"),u=i("string-to-symbol-registry"),l=i("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(A){var h=o(A);if(s(u,h))return u[h];var f=a("Symbol")(h);return u[h]=f,l[f]=h,f}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/to-string":348}],381:[function(e,r,t){e("../modules/es.symbol.constructor"),e("../modules/es.symbol.for"),e("../modules/es.symbol.key-for"),e("../modules/es.json.stringify"),e("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":362,"../modules/es.object.get-own-property-symbols":365,"../modules/es.symbol.constructor":379,"../modules/es.symbol.for":380,"../modules/es.symbol.key-for":382}],382:[function(e,r,t){var n=e("../internals/export"),a=e("../internals/has-own-property"),s=e("../internals/is-symbol"),o=e("../internals/try-to-string"),i=e("../internals/shared"),c=e("../internals/symbol-registry-detection"),u=i("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(l){if(!s(l))throw new TypeError(o(l)+" is not a symbol");if(a(u,l))return u[l]}})},{"../internals/export":259,"../internals/has-own-property":275,"../internals/is-symbol":292,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/try-to-string":349}],383:[function(e,r,t){function n(v){return Array.isArray?Array.isArray(v):m(v)==="[object Array]"}function a(v){return typeof v=="boolean"}function s(v){return v===null}function o(v){return v==null}function i(v){return typeof v=="number"}function c(v){return typeof v=="string"}function u(v){return typeof v=="symbol"}function l(v){return v===void 0}function A(v){return m(v)==="[object RegExp]"}function h(v){return typeof v=="object"&&v!==null}function f(v){return m(v)==="[object Date]"}function d(v){return m(v)==="[object Error]"||v instanceof Error}function g(v){return typeof v=="function"}function p(v){return v===null||typeof v=="boolean"||typeof v=="number"||typeof v=="string"||typeof v=="symbol"||v===void 0}function m(v){return Object.prototype.toString.call(v)}t.isArray=n,t.isBoolean=a,t.isNull=s,t.isNullOrUndefined=o,t.isNumber=i,t.isString=c,t.isSymbol=u,t.isUndefined=l,t.isRegExp=A,t.isObject=h,t.isDate=f,t.isError=d,t.isFunction=g,t.isPrimitive=p,t.isBuffer=e("buffer").Buffer.isBuffer},{buffer:220}],384:[function(e,r,t){(function(n){(function(){var a=e("elliptic"),s=e("bn.js");r.exports=function(u){return new i(u)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function i(u){this.curveType=o[u],this.curveType||(this.curveType={name:u}),this.curve=new a.ec(this.curveType.name),this.keys=void 0}function c(u,l,A){Array.isArray(u)||(u=u.toArray());var h=new n(u);if(A&&h.lengthd?f=(h==="rmd160"?new c:u(h)).update(f).digest():f.lengthi?l=u(l):l.length=B?Q:""+Array(B+1-O.length).join(S)+Q},R={s:k,z:function(Q){var B=-Q.utcOffset(),S=Math.abs(B),O=Math.floor(S/60),F=S%60;return(B<=0?"+":"-")+k(O,2,"0")+":"+k(F,2,"0")},m:function Q(B,S){if(B.date()1)return Q(M[0])}else{var z=B.name;j[z]=B,F=z}return!O&&F&&(T=F),F||!O&&T},x=function(Q,B){if(H(Q))return Q.clone();var S=typeof B=="object"?B:{};return S.date=Q,S.args=arguments,new C(S)},N=R;N.l=X,N.i=H,N.w=function(Q,B){return x(Q,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var C=function(){function Q(S){this.$L=X(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[W]=!0}var B=Q.prototype;return B.parse=function(S){this.$d=function(O){var F=O.date,Y=O.utc;if(F===null)return new Date(NaN);if(N.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var M=F.match(y);if(M){var z=M[2]-1||0,ue=(M[7]||"0").substring(0,3);return Y?new Date(Date.UTC(M[1],z,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ue)):new Date(M[1],z,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ue)}}return new Date(F)}(S),this.init()},B.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},B.$utils=function(){return N},B.isValid=function(){return this.$d.toString()!==v},B.isSame=function(S,O){var F=x(S);return this.startOf(O)<=F&&F<=this.endOf(O)},B.isAfter=function(S,O){return x(S)68?1900:2e3)},h=function(v){return function(y){this[v]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var I=y.match(/([+-]|\d\d)/g),E=60*I[1]+(+I[2]||0);return E===0?0:I[0]==="+"?-E:E}(v)}],d=function(v){var y=l[v];return y&&(y.indexOf?y:y.s.concat(y.f))},g=function(v,y){var I,E=l.meridiem;if(E){for(var k=1;k<=24;k+=1)if(v.indexOf(E(k,0,y))>-1){I=k>12;break}}else I=v===(y?"pm":"PM");return I},p={A:[u,function(v){this.afternoon=g(v,!1)}],a:[u,function(v){this.afternoon=g(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[i,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[c,h("seconds")],ss:[c,h("seconds")],m:[c,h("minutes")],mm:[c,h("minutes")],H:[c,h("hours")],h:[c,h("hours")],HH:[c,h("hours")],hh:[c,h("hours")],D:[c,h("day")],DD:[i,h("day")],Do:[u,function(v){var y=l.ordinal,I=v.match(/\d+/);if(this.day=I[0],y)for(var E=1;E<=31;E+=1)y(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],M:[c,h("month")],MM:[i,h("month")],MMM:[u,function(v){var y=d("months"),I=(d("monthsShort")||y.map(function(E){return E.slice(0,3)})).indexOf(v)+1;if(I<1)throw new Error;this.month=I%12||I}],MMMM:[u,function(v){var y=d("months").indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,h("year")],YY:[i,function(v){this.year=A(v)}],YYYY:[/\d{4}/,h("year")],Z:f,ZZ:f};function m(v){var y,I;y=v,I=l&&l.formats;for(var E=(v=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(X,x,N){var C=N&&N.toUpperCase();return x||I[N]||s[N]||I[C].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,Q,B){return Q||B.slice(1)})})).match(o),k=E.length,R=0;R-1)return new Date((O==="X"?1e3:1)*S);var Y=m(O)(S),M=Y.year,z=Y.month,ue=Y.day,ae=Y.hours,Ne=Y.minutes,Ge=Y.seconds,Ye=Y.milliseconds,Ae=Y.zone,te=new Date,he=ue||(M||z?1:te.getDate()),de=M||te.getFullYear(),Ke=0;M&&!z||(Ke=z>0?z-1:te.getMonth());var le=ae||0,Ce=Ne||0,At=Ge||0,Z=Ye||0;return Ae?new Date(Date.UTC(de,Ke,he,le,Ce,At,Z+60*Ae.offset*1e3)):F?new Date(Date.UTC(de,Ke,he,le,Ce,At,Z)):new Date(de,Ke,he,le,Ce,At,Z)}catch{return new Date("")}}(T,H,j),this.init(),C&&C!==!0&&(this.$L=this.locale(C).$L),N&&T!=this.format(H)&&(this.$d=new Date("")),l={}}else if(H instanceof Array)for(var w=H.length,Q=1;Q<=w;Q+=1){W[1]=H[Q-1];var B=I.apply(this,W);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}Q===w&&(this.$d=new Date(""))}else k.call(this,R)}}},typeof t=="object"&&r!==void 0?r.exports=a():(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_customParseFormat=a()},{}],393:[function(e,r,t){var n,a;n=void 0,a=function(){var s="minute",o=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(c,u,l){var A=u.prototype;l.utc=function(v){return new u({date:v,utc:!0,args:arguments})},A.utc=function(v){var y=l(this.toDate(),{locale:this.$L,utc:!0});return v?y.add(this.utcOffset(),s):y},A.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var h=A.parse;A.parse=function(v){v.utc&&(this.$u=!0),this.$utils().u(v.$offset)||(this.$offset=v.$offset),h.call(this,v)};var f=A.init;A.init=function(){if(this.$u){var v=this.$d;this.$y=v.getUTCFullYear(),this.$M=v.getUTCMonth(),this.$D=v.getUTCDate(),this.$W=v.getUTCDay(),this.$H=v.getUTCHours(),this.$m=v.getUTCMinutes(),this.$s=v.getUTCSeconds(),this.$ms=v.getUTCMilliseconds()}else f.call(this)};var d=A.utcOffset;A.utcOffset=function(v,y){var I=this.$utils().u;if(I(v))return this.$u?0:I(this.$offset)?d.call(this):this.$offset;if(typeof v=="string"&&(v=function(T){T===void 0&&(T="");var j=T.match(o);if(!j)return null;var W=(""+j[0]).match(i)||["-",0,0],H=W[0],X=60*+W[1]+ +W[2];return X===0?0:H==="+"?X:-X}(v))===null)return this;var E=Math.abs(v)<=16?60*v:v,k=this;if(y)return k.$offset=E,k.$u=v===0,k;if(v!==0){var R=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(k=this.local().add(E+R,s)).$offset=E,k.$x.$localOffset=R}else k=this.utc();return k};var g=A.format;A.format=function(v){var y=v||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,y)},A.valueOf=function(){var v=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*v},A.isUTC=function(){return!!this.$u},A.toISOString=function(){return this.toDate().toISOString()},A.toString=function(){return this.toDate().toUTCString()};var p=A.toDate;A.toDate=function(v){return v==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=A.diff;A.diff=function(v,y,I){if(v&&this.$u===v.$u)return m.call(this,v,y,I);var E=this.local(),k=l(v).local();return m.call(E,k,y,I)}}},typeof t=="object"&&r!==void 0?r.exports=a():(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_utc=a()},{}],394:[function(e,r,t){t.utils=e("./des/utils"),t.Cipher=e("./des/cipher"),t.DES=e("./des/des"),t.CBC=e("./des/cbc"),t.EDE=e("./des/ede")},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(e,r,t){var n=e("minimalistic-assert"),a=e("inherits"),s={};function o(c){n.equal(c.length,8,"Invalid IV length"),this.iv=new Array(8);for(var u=0;u0;c--)o+=this._buffer(s,o),i+=this._flushBuffer(u,i);return o+=this._buffer(s,o),u},a.prototype.final=function(s){var o,i;return s&&(o=this.update(s)),i=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),o?o.concat(i):i},a.prototype._pad=function(s,o){if(o===0)return!1;for(;o>>1];h=s.r28shl(h,g),f=s.r28shl(f,g),s.pc2(h,f,l.keys,d)}},c.prototype._update=function(l,A,h,f){var d=this._desState,g=s.readUInt32BE(l,A),p=s.readUInt32BE(l,A+4);s.ip(g,p,d.tmp,0),g=d.tmp[0],p=d.tmp[1],this.type==="encrypt"?this._encrypt(d,g,p,d.tmp,0):this._decrypt(d,g,p,d.tmp,0),g=d.tmp[0],p=d.tmp[1],s.writeUInt32BE(h,g,f),s.writeUInt32BE(h,p,f+4)},c.prototype._pad=function(l,A){if(this.padding===!1)return!1;for(var h=l.length-A,f=A;f>>0,g=E}s.rip(p,g,f,d)},c.prototype._decrypt=function(l,A,h,f,d){for(var g=h,p=A,m=l.keys.length-2;m>=0;m-=2){var v=l.keys[m],y=l.keys[m+1];s.expand(g,l.tmp,0),v^=l.tmp[0],y^=l.tmp[1];var I=s.substitute(v,y),E=g;g=(p^s.permute(I))>>>0,p=E}s.rip(g,p,f,d)}},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(e,r,t){var n=e("minimalistic-assert"),a=e("inherits"),s=e("./cipher"),o=e("./des");function i(u,l){n.equal(l.length,24,"Invalid key length");var A=l.slice(0,8),h=l.slice(8,16),f=l.slice(16,24);this.ciphers=u==="encrypt"?[o.create({type:"encrypt",key:A}),o.create({type:"decrypt",key:h}),o.create({type:"encrypt",key:f})]:[o.create({type:"decrypt",key:f}),o.create({type:"encrypt",key:h}),o.create({type:"decrypt",key:A})]}function c(u){s.call(this,u);var l=new i(this.type,this.options.key);this._edeState=l}a(c,s),r.exports=c,c.create=function(u){return new c(u)},c.prototype._update=function(u,l,A,h){var f=this._edeState;f.ciphers[0]._update(u,l,A,h),f.ciphers[1]._update(A,h,A,h),f.ciphers[2]._update(A,h,A,h)},c.prototype._pad=o.prototype._pad,c.prototype._unpad=o.prototype._unpad},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(e,r,t){t.readUInt32BE=function(o,i){return(o[0+i]<<24|o[1+i]<<16|o[2+i]<<8|o[3+i])>>>0},t.writeUInt32BE=function(o,i,c){o[0+c]=i>>>24,o[1+c]=i>>>16&255,o[2+c]=i>>>8&255,o[3+c]=255&i},t.ip=function(o,i,c,u){for(var l=0,A=0,h=6;h>=0;h-=2){for(var f=0;f<=24;f+=8)l<<=1,l|=i>>>f+h&1;for(f=0;f<=24;f+=8)l<<=1,l|=o>>>f+h&1}for(h=6;h>=0;h-=2){for(f=1;f<=25;f+=8)A<<=1,A|=i>>>f+h&1;for(f=1;f<=25;f+=8)A<<=1,A|=o>>>f+h&1}c[u+0]=l>>>0,c[u+1]=A>>>0},t.rip=function(o,i,c,u){for(var l=0,A=0,h=0;h<4;h++)for(var f=24;f>=0;f-=8)l<<=1,l|=i>>>f+h&1,l<<=1,l|=o>>>f+h&1;for(h=4;h<8;h++)for(f=24;f>=0;f-=8)A<<=1,A|=i>>>f+h&1,A<<=1,A|=o>>>f+h&1;c[u+0]=l>>>0,c[u+1]=A>>>0},t.pc1=function(o,i,c,u){for(var l=0,A=0,h=7;h>=5;h--){for(var f=0;f<=24;f+=8)l<<=1,l|=i>>f+h&1;for(f=0;f<=24;f+=8)l<<=1,l|=o>>f+h&1}for(f=0;f<=24;f+=8)l<<=1,l|=i>>f+h&1;for(h=1;h<=3;h++){for(f=0;f<=24;f+=8)A<<=1,A|=i>>f+h&1;for(f=0;f<=24;f+=8)A<<=1,A|=o>>f+h&1}for(f=0;f<=24;f+=8)A<<=1,A|=o>>f+h&1;c[u+0]=l>>>0,c[u+1]=A>>>0},t.r28shl=function(o,i){return o<>>28-i};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(o,i,c,u){for(var l=0,A=0,h=n.length>>>1,f=0;f>>n[f]&1;for(f=h;f>>n[f]&1;c[u+0]=l>>>0,c[u+1]=A>>>0},t.expand=function(o,i,c){var u=0,l=0;u=(1&o)<<5|o>>>27;for(var A=23;A>=15;A-=4)u<<=6,u|=o>>>A&63;for(A=11;A>=3;A-=4)l|=o>>>A&63,l<<=6;l|=(31&o)<<1|o>>>31,i[c+0]=u>>>0,i[c+1]=l>>>0};var a=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(o,i){for(var c=0,u=0;u<4;u++)c<<=4,c|=a[64*u+(o>>>18-6*u&63)];for(u=0;u<4;u++)c<<=4,c|=a[256+64*u+(i>>>18-6*u&63)];return c>>>0};var s=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(o){for(var i=0,c=0;c>>s[c]&1;return i>>>0},t.padSplit=function(o,i,c){for(var u=o.toString(2);u.lengthy;)E.ishrn(1);if(E.isEven()&&E.iadd(i),E.testn(1)||E.iadd(c),I.cmp(c)){if(!I.cmp(u))for(;E.mod(l).cmp(A);)E.iadd(f)}else for(;E.mod(s).cmp(h);)E.iadd(f);if(p(k=E.shrn(1))&&p(E)&&m(k)&&m(E)&&o.test(k)&&o.test(E))return E}}},{"bn.js":404,"miller-rabin":451,randombytes:475}],403:[function(e,r,t){r.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],404:[function(e,r,t){arguments[4][184][0].apply(t,arguments)},{buffer:188,dup:184}],405:[function(e,r,t){var n=t;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":421,"./elliptic/curve":408,"./elliptic/curves":411,"./elliptic/ec":412,"./elliptic/eddsa":415,"./elliptic/utils":419,brorand:187}],406:[function(e,r,t){var n=e("bn.js"),a=e("../utils"),s=a.getNAF,o=a.getJSF,i=a.assert;function c(l,A){this.type=l,this.p=new n(A.p,16),this.red=A.prime?n.red(A.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=A.n&&new n(A.n,16),this.g=A.g&&this.pointFromJSON(A.g,A.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var h=this.n&&this.p.div(this.n);!h||h.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(l,A){this.curve=l,this.type=A,this.precomputed=null}r.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(l,A){i(l.precomputed);var h=l._getDoubles(),f=s(A,1,this._bitLength),d=(1<=g;v--)p=(p<<1)+f[v];m.push(p)}for(var y=this.jpoint(null,null,null),I=this.jpoint(null,null,null),E=d;E>0;E--){for(g=0;g=0;m--){for(var v=0;m>=0&&g[m]===0;m--)v++;if(m>=0&&v++,p=p.dblp(v),m<0)break;var y=g[m];i(y!==0),p=l.type==="affine"?y>0?p.mixedAdd(d[y-1>>1]):p.mixedAdd(d[-y-1>>1].neg()):y>0?p.add(d[y-1>>1]):p.add(d[-y-1>>1].neg())}return l.type==="affine"?p.toP():p},c.prototype._wnafMulAdd=function(l,A,h,f,d){var g,p,m,v=this._wnafT1,y=this._wnafT2,I=this._wnafT3,E=0;for(g=0;g=1;g-=2){var R=g-1,T=g;if(v[R]===1&&v[T]===1){var j=[A[R],null,null,A[T]];A[R].y.cmp(A[T].y)===0?(j[1]=A[R].add(A[T]),j[2]=A[R].toJ().mixedAdd(A[T].neg())):A[R].y.cmp(A[T].y.redNeg())===0?(j[1]=A[R].toJ().mixedAdd(A[T]),j[2]=A[R].add(A[T].neg())):(j[1]=A[R].toJ().mixedAdd(A[T]),j[2]=A[R].toJ().mixedAdd(A[T].neg()));var W=[-3,-1,-5,-7,0,7,5,1,3],H=o(h[R],h[T]);for(E=Math.max(H[0].length,E),I[R]=new Array(E),I[T]=new Array(E),p=0;p=0;g--){for(var w=0;g>=0;){var Q=!0;for(p=0;p=0&&w++,N=N.dblp(w),g<0)break;for(p=0;p0?m=y[p][B-1>>1]:B<0&&(m=y[p][-B-1>>1].neg()),N=m.type==="affine"?N.mixedAdd(m):N.add(m))}}for(g=0;g=Math.ceil((l.bitLength()+1)/A.step)},u.prototype._getDoubles=function(l,A){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var h=[this],f=this,d=0;d":""},u.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},u.prototype._extDbl=function(){var l=this.x.redSqr(),A=this.y.redSqr(),h=this.z.redSqr();h=h.redIAdd(h);var f=this.curve._mulA(l),d=this.x.redAdd(this.y).redSqr().redISub(l).redISub(A),g=f.redAdd(A),p=g.redSub(h),m=f.redSub(A),v=d.redMul(p),y=g.redMul(m),I=d.redMul(m),E=p.redMul(g);return this.curve.point(v,y,E,I)},u.prototype._projDbl=function(){var l,A,h,f,d,g,p=this.x.redAdd(this.y).redSqr(),m=this.x.redSqr(),v=this.y.redSqr();if(this.curve.twisted){var y=(f=this.curve._mulA(m)).redAdd(v);this.zOne?(l=p.redSub(m).redSub(v).redMul(y.redSub(this.curve.two)),A=y.redMul(f.redSub(v)),h=y.redSqr().redSub(y).redSub(y)):(d=this.z.redSqr(),g=y.redSub(d).redISub(d),l=p.redSub(m).redISub(v).redMul(g),A=y.redMul(f.redSub(v)),h=y.redMul(g))}else f=m.redAdd(v),d=this.curve._mulC(this.z).redSqr(),g=f.redSub(d).redSub(d),l=this.curve._mulC(p.redISub(f)).redMul(g),A=this.curve._mulC(f).redMul(m.redISub(v)),h=f.redMul(g);return this.curve.point(l,A,h)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(l){var A=this.y.redSub(this.x).redMul(l.y.redSub(l.x)),h=this.y.redAdd(this.x).redMul(l.y.redAdd(l.x)),f=this.t.redMul(this.curve.dd).redMul(l.t),d=this.z.redMul(l.z.redAdd(l.z)),g=h.redSub(A),p=d.redSub(f),m=d.redAdd(f),v=h.redAdd(A),y=g.redMul(p),I=m.redMul(v),E=g.redMul(v),k=p.redMul(m);return this.curve.point(y,I,k,E)},u.prototype._projAdd=function(l){var A,h,f=this.z.redMul(l.z),d=f.redSqr(),g=this.x.redMul(l.x),p=this.y.redMul(l.y),m=this.curve.d.redMul(g).redMul(p),v=d.redSub(m),y=d.redAdd(m),I=this.x.redAdd(this.y).redMul(l.x.redAdd(l.y)).redISub(g).redISub(p),E=f.redMul(v).redMul(I);return this.curve.twisted?(A=f.redMul(y).redMul(p.redSub(this.curve._mulA(g))),h=v.redMul(y)):(A=f.redMul(y).redMul(p.redSub(g)),h=this.curve._mulC(v).redMul(y)),this.curve.point(E,A,h)},u.prototype.add=function(l){return this.isInfinity()?l:l.isInfinity()?this:this.curve.extended?this._extAdd(l):this._projAdd(l)},u.prototype.mul=function(l){return this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve._wnafMul(this,l)},u.prototype.mulAdd=function(l,A,h){return this.curve._wnafMulAdd(1,[this,A],[l,h],2,!1)},u.prototype.jmulAdd=function(l,A,h){return this.curve._wnafMulAdd(1,[this,A],[l,h],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var l=this.z.redInvm();return this.x=this.x.redMul(l),this.y=this.y.redMul(l),this.t&&(this.t=this.t.redMul(l)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(l){return this===l||this.getX().cmp(l.getX())===0&&this.getY().cmp(l.getY())===0},u.prototype.eqXToP=function(l){var A=l.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(A)===0)return!0;for(var h=l.clone(),f=this.curve.redN.redMul(this.z);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return!1;if(A.redIAdd(f),this.x.cmp(A)===0)return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],408:[function(e,r,t){var n=t;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":406,"./edwards":407,"./mont":409,"./short":410}],409:[function(e,r,t){var n=e("bn.js"),a=e("inherits"),s=e("./base"),o=e("../utils");function i(u){s.call(this,"mont",u),this.a=new n(u.a,16).toRed(this.red),this.b=new n(u.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(u,l,A){s.BasePoint.call(this,u,"projective"),l===null&&A===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(l,16),this.z=new n(A,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(i,s),r.exports=i,i.prototype.validate=function(u){var l=u.normalize().x,A=l.redSqr(),h=A.redMul(l).redAdd(A.redMul(this.a)).redAdd(l);return h.redSqrt().redSqr().cmp(h)===0},a(c,s.BasePoint),i.prototype.decodePoint=function(u,l){return this.point(o.toArray(u,l),1)},i.prototype.point=function(u,l){return new c(this,u,l)},i.prototype.pointFromJSON=function(u){return c.fromJSON(this,u)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(u,l){return new c(u,l[0],l[1]||u.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return this.z.cmpn(0)===0},c.prototype.dbl=function(){var u=this.x.redAdd(this.z).redSqr(),l=this.x.redSub(this.z).redSqr(),A=u.redSub(l),h=u.redMul(l),f=A.redMul(l.redAdd(this.curve.a24.redMul(A)));return this.curve.point(h,f)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(u,l){var A=this.x.redAdd(this.z),h=this.x.redSub(this.z),f=u.x.redAdd(u.z),d=u.x.redSub(u.z).redMul(A),g=f.redMul(h),p=l.z.redMul(d.redAdd(g).redSqr()),m=l.x.redMul(d.redISub(g).redSqr());return this.curve.point(p,m)},c.prototype.mul=function(u){for(var l=u.clone(),A=this,h=this.curve.point(null,null),f=this,d=[];l.cmpn(0)!==0;l.iushrn(1))d.push(l.andln(1));for(var g=d.length-1;g>=0;g--)d[g]===0?(A=A.diffAdd(h,f),h=h.dbl()):(h=A.diffAdd(h,f),A=A.dbl());return h},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(u){return this.getX().cmp(u.getX())===0},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],410:[function(e,r,t){var n=e("../utils"),a=e("bn.js"),s=e("inherits"),o=e("./base"),i=n.assert;function c(A){o.call(this,"short",A),this.a=new a(A.a,16).toRed(this.red),this.b=new a(A.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(A),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(A,h,f,d){o.BasePoint.call(this,A,"affine"),h===null&&f===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(h,16),this.y=new a(f,16),d&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(A,h,f,d){o.BasePoint.call(this,A,"jacobian"),h===null&&f===null&&d===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(h,16),this.y=new a(f,16),this.z=new a(d,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(c,o),r.exports=c,c.prototype._getEndomorphism=function(A){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var h,f;if(A.beta)h=new a(A.beta,16).toRed(this.red);else{var d=this._getEndoRoots(this.p);h=(h=d[0].cmp(d[1])<0?d[0]:d[1]).toRed(this.red)}if(A.lambda)f=new a(A.lambda,16);else{var g=this._getEndoRoots(this.n);this.g.mul(g[0]).x.cmp(this.g.x.redMul(h))===0?f=g[0]:(f=g[1],i(this.g.mul(f).x.cmp(this.g.x.redMul(h))===0))}return{beta:h,lambda:f,basis:A.basis?A.basis.map(function(p){return{a:new a(p.a,16),b:new a(p.b,16)}}):this._getEndoBasis(f)}}},c.prototype._getEndoRoots=function(A){var h=A===this.p?this.red:a.mont(A),f=new a(2).toRed(h).redInvm(),d=f.redNeg(),g=new a(3).toRed(h).redNeg().redSqrt().redMul(f);return[d.redAdd(g).fromRed(),d.redSub(g).fromRed()]},c.prototype._getEndoBasis=function(A){for(var h,f,d,g,p,m,v,y,I,E=this.n.ushrn(Math.floor(this.n.bitLength()/2)),k=A,R=this.n.clone(),T=new a(1),j=new a(0),W=new a(0),H=new a(1),X=0;k.cmpn(0)!==0;){var x=R.div(k);y=R.sub(x.mul(k)),I=W.sub(x.mul(T));var N=H.sub(x.mul(j));if(!d&&y.cmp(E)<0)h=v.neg(),f=T,d=y.neg(),g=I;else if(d&&++X==2)break;v=y,R=k,k=y,W=T,T=I,H=j,j=N}p=y.neg(),m=I;var C=d.sqr().add(g.sqr());return p.sqr().add(m.sqr()).cmp(C)>=0&&(p=h,m=f),d.negative&&(d=d.neg(),g=g.neg()),p.negative&&(p=p.neg(),m=m.neg()),[{a:d,b:g},{a:p,b:m}]},c.prototype._endoSplit=function(A){var h=this.endo.basis,f=h[0],d=h[1],g=d.b.mul(A).divRound(this.n),p=f.b.neg().mul(A).divRound(this.n),m=g.mul(f.a),v=p.mul(d.a),y=g.mul(f.b),I=p.mul(d.b);return{k1:A.sub(m).sub(v),k2:y.add(I).neg()}},c.prototype.pointFromX=function(A,h){(A=new a(A,16)).red||(A=A.toRed(this.red));var f=A.redSqr().redMul(A).redIAdd(A.redMul(this.a)).redIAdd(this.b),d=f.redSqrt();if(d.redSqr().redSub(f).cmp(this.zero)!==0)throw new Error("invalid point");var g=d.fromRed().isOdd();return(h&&!g||!h&&g)&&(d=d.redNeg()),this.point(A,d)},c.prototype.validate=function(A){if(A.inf)return!0;var h=A.x,f=A.y,d=this.a.redMul(h),g=h.redSqr().redMul(h).redIAdd(d).redIAdd(this.b);return f.redSqr().redISub(g).cmpn(0)===0},c.prototype._endoWnafMulAdd=function(A,h,f){for(var d=this._endoWnafT1,g=this._endoWnafT2,p=0;p":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(A){if(this.inf)return A;if(A.inf)return this;if(this.eq(A))return this.dbl();if(this.neg().eq(A))return this.curve.point(null,null);if(this.x.cmp(A.x)===0)return this.curve.point(null,null);var h=this.y.redSub(A.y);h.cmpn(0)!==0&&(h=h.redMul(this.x.redSub(A.x).redInvm()));var f=h.redSqr().redISub(this.x).redISub(A.x),d=h.redMul(this.x.redSub(f)).redISub(this.y);return this.curve.point(f,d)},u.prototype.dbl=function(){if(this.inf)return this;var A=this.y.redAdd(this.y);if(A.cmpn(0)===0)return this.curve.point(null,null);var h=this.curve.a,f=this.x.redSqr(),d=A.redInvm(),g=f.redAdd(f).redIAdd(f).redIAdd(h).redMul(d),p=g.redSqr().redISub(this.x.redAdd(this.x)),m=g.redMul(this.x.redSub(p)).redISub(this.y);return this.curve.point(p,m)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(A){return A=new a(A,16),this.isInfinity()?this:this._hasDoubles(A)?this.curve._fixedNafMul(this,A):this.curve.endo?this.curve._endoWnafMulAdd([this],[A]):this.curve._wnafMul(this,A)},u.prototype.mulAdd=function(A,h,f){var d=[this,h],g=[A,f];return this.curve.endo?this.curve._endoWnafMulAdd(d,g):this.curve._wnafMulAdd(1,d,g,2)},u.prototype.jmulAdd=function(A,h,f){var d=[this,h],g=[A,f];return this.curve.endo?this.curve._endoWnafMulAdd(d,g,!0):this.curve._wnafMulAdd(1,d,g,2,!0)},u.prototype.eq=function(A){return this===A||this.inf===A.inf&&(this.inf||this.x.cmp(A.x)===0&&this.y.cmp(A.y)===0)},u.prototype.neg=function(A){if(this.inf)return this;var h=this.curve.point(this.x,this.y.redNeg());if(A&&this.precomputed){var f=this.precomputed,d=function(g){return g.neg()};h.precomputed={naf:f.naf&&{wnd:f.naf.wnd,points:f.naf.points.map(d)},doubles:f.doubles&&{step:f.doubles.step,points:f.doubles.points.map(d)}}}return h},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(l,o.BasePoint),c.prototype.jpoint=function(A,h,f){return new l(this,A,h,f)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var A=this.z.redInvm(),h=A.redSqr(),f=this.x.redMul(h),d=this.y.redMul(h).redMul(A);return this.curve.point(f,d)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(A){if(this.isInfinity())return A;if(A.isInfinity())return this;var h=A.z.redSqr(),f=this.z.redSqr(),d=this.x.redMul(h),g=A.x.redMul(f),p=this.y.redMul(h.redMul(A.z)),m=A.y.redMul(f.redMul(this.z)),v=d.redSub(g),y=p.redSub(m);if(v.cmpn(0)===0)return y.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var I=v.redSqr(),E=I.redMul(v),k=d.redMul(I),R=y.redSqr().redIAdd(E).redISub(k).redISub(k),T=y.redMul(k.redISub(R)).redISub(p.redMul(E)),j=this.z.redMul(A.z).redMul(v);return this.curve.jpoint(R,T,j)},l.prototype.mixedAdd=function(A){if(this.isInfinity())return A.toJ();if(A.isInfinity())return this;var h=this.z.redSqr(),f=this.x,d=A.x.redMul(h),g=this.y,p=A.y.redMul(h).redMul(this.z),m=f.redSub(d),v=g.redSub(p);if(m.cmpn(0)===0)return v.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var y=m.redSqr(),I=y.redMul(m),E=f.redMul(y),k=v.redSqr().redIAdd(I).redISub(E).redISub(E),R=v.redMul(E.redISub(k)).redISub(g.redMul(I)),T=this.z.redMul(m);return this.curve.jpoint(k,R,T)},l.prototype.dblp=function(A){if(A===0)return this;if(this.isInfinity())return this;if(!A)return this.dbl();var h;if(this.curve.zeroA||this.curve.threeA){var f=this;for(h=0;h=0)return!1;if(f.redIAdd(g),this.x.cmp(f)===0)return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],411:[function(e,r,t){var n,a=t,s=e("hash.js"),o=e("./curve"),i=e("./utils").assert;function c(l){l.type==="short"?this.curve=new o.short(l):l.type==="edwards"?this.curve=new o.edwards(l):this.curve=new o.mont(l),this.g=this.curve.g,this.n=this.curve.n,this.hash=l.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(l,A){Object.defineProperty(a,l,{configurable:!0,enumerable:!0,get:function(){var h=new c(A);return Object.defineProperty(a,l,{configurable:!0,enumerable:!0,value:h}),h}})}a.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:s.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:s.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1")}catch{n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":408,"./precomputed/secp256k1":418,"./utils":419,"hash.js":426}],412:[function(e,r,t){var n=e("bn.js"),a=e("hmac-drbg"),s=e("../utils"),o=e("../curves"),i=e("brorand"),c=s.assert,u=e("./key"),l=e("./signature");function A(h){if(!(this instanceof A))return new A(h);typeof h=="string"&&(c(Object.prototype.hasOwnProperty.call(o,h),"Unknown curve "+h),h=o[h]),h instanceof o.PresetCurve&&(h={curve:h}),this.curve=h.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=h.curve.g,this.g.precompute(h.curve.n.bitLength()+1),this.hash=h.hash||h.curve.hash}r.exports=A,A.prototype.keyPair=function(h){return new u(this,h)},A.prototype.keyFromPrivate=function(h,f){return u.fromPrivate(this,h,f)},A.prototype.keyFromPublic=function(h,f){return u.fromPublic(this,h,f)},A.prototype.genKeyPair=function(h){h||(h={});for(var f=new a({hash:this.hash,pers:h.pers,persEnc:h.persEnc||"utf8",entropy:h.entropy||i(this.hash.hmacStrength),entropyEnc:h.entropy&&h.entropyEnc||"utf8",nonce:this.n.toArray()}),d=this.n.byteLength(),g=this.n.sub(new n(2));;){var p=new n(f.generate(d));if(!(p.cmp(g)>0))return p.iaddn(1),this.keyFromPrivate(p)}},A.prototype._truncateToN=function(h,f){var d=8*h.byteLength()-this.n.bitLength();return d>0&&(h=h.ushrn(d)),!f&&h.cmp(this.n)>=0?h.sub(this.n):h},A.prototype.sign=function(h,f,d,g){typeof d=="object"&&(g=d,d=null),g||(g={}),f=this.keyFromPrivate(f,d),h=this._truncateToN(new n(h,16));for(var p=this.n.byteLength(),m=f.getPrivate().toArray("be",p),v=h.toArray("be",p),y=new a({hash:this.hash,entropy:m,nonce:v,pers:g.pers,persEnc:g.persEnc||"utf8"}),I=this.n.sub(new n(1)),E=0;;E++){var k=g.k?g.k(E):new n(y.generate(this.n.byteLength()));if(!((k=this._truncateToN(k,!0)).cmpn(1)<=0||k.cmp(I)>=0)){var R=this.g.mul(k);if(!R.isInfinity()){var T=R.getX(),j=T.umod(this.n);if(j.cmpn(0)!==0){var W=k.invm(this.n).mul(j.mul(f.getPrivate()).iadd(h));if((W=W.umod(this.n)).cmpn(0)!==0){var H=(R.getY().isOdd()?1:0)|(T.cmp(j)!==0?2:0);return g.canonical&&W.cmp(this.nh)>0&&(W=this.n.sub(W),H^=1),new l({r:j,s:W,recoveryParam:H})}}}}}},A.prototype.verify=function(h,f,d,g){h=this._truncateToN(new n(h,16)),d=this.keyFromPublic(d,g);var p=(f=new l(f,"hex")).r,m=f.s;if(p.cmpn(1)<0||p.cmp(this.n)>=0||m.cmpn(1)<0||m.cmp(this.n)>=0)return!1;var v,y=m.invm(this.n),I=y.mul(h).umod(this.n),E=y.mul(p).umod(this.n);return this.curve._maxwellTrick?!(v=this.g.jmulAdd(I,d.getPublic(),E)).isInfinity()&&v.eqXToP(p):!(v=this.g.mulAdd(I,d.getPublic(),E)).isInfinity()&&v.getX().umod(this.n).cmp(p)===0},A.prototype.recoverPubKey=function(h,f,d,g){c((3&d)===d,"The recovery param is more than two bits"),f=new l(f,g);var p=this.n,m=new n(h),v=f.r,y=f.s,I=1&d,E=d>>1;if(v.cmp(this.curve.p.umod(this.curve.n))>=0&&E)throw new Error("Unable to find sencond key candinate");v=E?this.curve.pointFromX(v.add(this.curve.n),I):this.curve.pointFromX(v,I);var k=f.r.invm(p),R=p.sub(m).mul(k).umod(p),T=y.mul(k).umod(p);return this.g.mulAdd(R,v,T)},A.prototype.getKeyRecoveryParam=function(h,f,d,g){if((f=new l(f,g)).recoveryParam!==null)return f.recoveryParam;for(var p=0;p<4;p++){var m;try{m=this.recoverPubKey(h,f,p)}catch{continue}if(m.eq(d))return p}throw new Error("Unable to find valid recovery factor")}},{"../curves":411,"../utils":419,"./key":413,"./signature":414,"bn.js":420,brorand:187,"hmac-drbg":438}],413:[function(e,r,t){var n=e("bn.js"),a=e("../utils").assert;function s(o,i){this.ec=o,this.priv=null,this.pub=null,i.priv&&this._importPrivate(i.priv,i.privEnc),i.pub&&this._importPublic(i.pub,i.pubEnc)}r.exports=s,s.fromPublic=function(o,i,c){return i instanceof s?i:new s(o,{pub:i,pubEnc:c})},s.fromPrivate=function(o,i,c){return i instanceof s?i:new s(o,{priv:i,privEnc:c})},s.prototype.validate=function(){var o=this.getPublic();return o.isInfinity()?{result:!1,reason:"Invalid public key"}:o.validate()?o.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},s.prototype.getPublic=function(o,i){return typeof o=="string"&&(i=o,o=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),i?this.pub.encode(i,o):this.pub},s.prototype.getPrivate=function(o){return o==="hex"?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(o,i){this.priv=new n(o,i||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(o,i){if(o.x||o.y)return this.ec.curve.type==="mont"?a(o.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||a(o.x&&o.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(o.x,o.y));this.pub=this.ec.curve.decodePoint(o,i)},s.prototype.derive=function(o){return o.validate()||a(o.validate(),"public point not validated"),o.mul(this.priv).getX()},s.prototype.sign=function(o,i,c){return this.ec.sign(o,this,i,c)},s.prototype.verify=function(o,i){return this.ec.verify(o,i,this)},s.prototype.inspect=function(){return""}},{"../utils":419,"bn.js":420}],414:[function(e,r,t){var n=e("bn.js"),a=e("../utils"),s=a.assert;function o(A,h){if(A instanceof o)return A;this._importDER(A,h)||(s(A.r&&A.s,"Signature without r or s"),this.r=new n(A.r,16),this.s=new n(A.s,16),A.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=A.recoveryParam)}function i(){this.place=0}function c(A,h){var f=A[h.place++];if(!(128&f))return f;var d=15&f;if(d===0||d>4)return!1;for(var g=0,p=0,m=h.place;p>>=0;return!(g<=127)&&(h.place=m,g)}function u(A){for(var h=0,f=A.length-1;!A[h]&&!(128&A[h+1])&&h>>3);for(A.push(128|f);--f;)A.push(h>>>(f<<3)&255);A.push(h)}}r.exports=o,o.prototype._importDER=function(A,h){A=a.toArray(A,h);var f=new i;if(A[f.place++]!==48)return!1;var d=c(A,f);if(d===!1||d+f.place!==A.length||A[f.place++]!==2)return!1;var g=c(A,f);if(g===!1)return!1;var p=A.slice(f.place,g+f.place);if(f.place+=g,A[f.place++]!==2)return!1;var m=c(A,f);if(m===!1||A.length!==m+f.place)return!1;var v=A.slice(f.place,m+f.place);if(p[0]===0){if(!(128&p[1]))return!1;p=p.slice(1)}if(v[0]===0){if(!(128&v[1]))return!1;v=v.slice(1)}return this.r=new n(p),this.s=new n(v),this.recoveryParam=null,!0},o.prototype.toDER=function(A){var h=this.r.toArray(),f=this.s.toArray();for(128&h[0]&&(h=[0].concat(h)),128&f[0]&&(f=[0].concat(f)),h=u(h),f=u(f);!(f[0]||128&f[1]);)f=f.slice(1);var d=[2];l(d,h.length),(d=d.concat(h)).push(2),l(d,f.length);var g=d.concat(f),p=[48];return l(p,g.length),p=p.concat(g),a.encode(p,A)}},{"../utils":419,"bn.js":420}],415:[function(e,r,t){var n=e("hash.js"),a=e("../curves"),s=e("../utils"),o=s.assert,i=s.parseBytes,c=e("./key"),u=e("./signature");function l(A){if(o(A==="ed25519","only tested with ed25519 so far"),!(this instanceof l))return new l(A);A=a[A].curve,this.curve=A,this.g=A.g,this.g.precompute(A.n.bitLength()+1),this.pointClass=A.point().constructor,this.encodingLength=Math.ceil(A.n.bitLength()/8),this.hash=n.sha512}r.exports=l,l.prototype.sign=function(A,h){A=i(A);var f=this.keyFromSecret(h),d=this.hashInt(f.messagePrefix(),A),g=this.g.mul(d),p=this.encodePoint(g),m=this.hashInt(p,f.pubBytes(),A).mul(f.priv()),v=d.add(m).umod(this.curve.n);return this.makeSignature({R:g,S:v,Rencoded:p})},l.prototype.verify=function(A,h,f){A=i(A),h=this.makeSignature(h);var d=this.keyFromPublic(f),g=this.hashInt(h.Rencoded(),d.pubBytes(),A),p=this.g.mul(h.S());return h.R().add(d.pub().mul(g)).eq(p)},l.prototype.hashInt=function(){for(var A=this.hash(),h=0;h(p>>1)-1?(p>>1)-I:I,m.isubn(y)):y=0,g[v]=y,m.iushrn(1)}return g}function c(h,f){var d=[[],[]];h=h.clone(),f=f.clone();for(var g,p=0,m=0;h.cmpn(-p)>0||f.cmpn(-m)>0;){var v,y,I=h.andln(3)+p&3,E=f.andln(3)+m&3;I===3&&(I=-1),E===3&&(E=-1),v=1&I?(g=h.andln(7)+p&7)!=3&&g!==5||E!==2?I:-I:0,d[0].push(v),y=1&E?(g=f.andln(7)+m&7)!=3&&g!==5||I!==2?E:-E:0,d[1].push(y),2*p===v+1&&(p=1-p),2*m===y+1&&(m=1-m),h.iushrn(1),f.iushrn(1)}return d}function u(h,f,d){var g="_"+f;h.prototype[f]=function(){return this[g]!==void 0?this[g]:this[g]=d.call(this)}}function l(h){return typeof h=="string"?n.toArray(h,"hex"):h}function A(h){return new a(h,"hex","le")}n.assert=s,n.toArray=o.toArray,n.zero2=o.zero2,n.toHex=o.toHex,n.encode=o.encode,n.getNAF=i,n.getJSF=c,n.cachedProperty=u,n.parseBytes=l,n.intFromLE=A},{"bn.js":420,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],420:[function(e,r,t){arguments[4][184][0].apply(t,arguments)},{buffer:188,dup:184}],421:[function(e,r,t){r.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],422:[function(e,r,t){var n=Object.create||T,a=Object.keys||j,s=Function.prototype.bind||W;function o(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}r.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var i,c=10;try{var u={};Object.defineProperty&&Object.defineProperty(u,"x",{value:0}),i=u.x===0}catch{i=!1}function l(H){return H._maxListeners===void 0?o.defaultMaxListeners:H._maxListeners}function A(H,X,x){if(X)H.call(x);else for(var N=H.length,C=k(H,N),w=0;w0&&Q.length>C){Q.warned=!0;var B=new Error("Possible EventEmitter memory leak detected. "+Q.length+' "'+String(X)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');B.name="MaxListenersExceededWarning",B.emitter=H,B.type=X,B.count=Q.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",B.name,B.message)}}else Q=w[X]=x,++H._eventsCount;return H}function m(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var H=new Array(arguments.length),X=0;X1&&(X=arguments[1]),X instanceof Error)throw X;var S=new Error('Unhandled "error" event. ('+X+")");throw S.context=X,S}if(!(x=Q[H]))return!1;var O=typeof x=="function";switch(N=arguments.length){case 1:A(x,O,this);break;case 2:h(x,O,this,arguments[1]);break;case 3:f(x,O,this,arguments[1],arguments[2]);break;case 4:d(x,O,this,arguments[1],arguments[2],arguments[3]);break;default:for(C=new Array(N-1),w=1;w=0;w--)if(x[w]===X||x[w].listener===X){Q=x[w].listener,C=w;break}if(C<0)return this;C===0?x.shift():E(x,C),x.length===1&&(N[H]=x[0]),N.removeListener&&this.emit("removeListener",H,Q||X)}return this},o.prototype.removeAllListeners=function(H){var X,x,N;if(!(x=this._events))return this;if(!x.removeListener)return arguments.length===0?(this._events=n(null),this._eventsCount=0):x[H]&&(--this._eventsCount==0?this._events=n(null):delete x[H]),this;if(arguments.length===0){var C,w=a(x);for(N=0;N=0;N--)this.removeListener(H,X[N]);return this},o.prototype.listeners=function(H){return y(this,H,!0)},o.prototype.rawListeners=function(H){return y(this,H,!1)},o.listenerCount=function(H,X){return typeof H.listenerCount=="function"?H.listenerCount(X):I.call(H,X)},o.prototype.listenerCount=I,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],423:[function(e,r,t){var n=e("safe-buffer").Buffer,a=e("md5.js");function s(o,i,c,u){if(n.isBuffer(o)||(o=n.from(o,"binary")),i&&(n.isBuffer(i)||(i=n.from(i,"binary")),i.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var l=c/8,A=n.alloc(l),h=n.alloc(u||0),f=n.alloc(0);l>0||u>0;){var d=new a;d.update(f),d.update(o),i&&d.update(i),f=d.digest();var g=0;if(l>0){var p=A.length-l;g=Math.min(l,f.length),f.copy(A,p,0,g),l-=g}if(g0){var m=h.length-u,v=Math.min(u,f.length-g);f.copy(h,m,g,g+v),u-=v}}return f.fill(0),{key:A,iv:h}}r.exports=s},{"md5.js":450,"safe-buffer":494}],424:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=t.ParserOptions=t.parseFile=t.parseStream=t.parseString=t.parse=t.FormatterOptions=t.CsvFormatterStream=t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=void 0;var n=e("@fast-csv/format");Object.defineProperty(t,"format",{enumerable:!0,get:function(){return n.format}}),Object.defineProperty(t,"write",{enumerable:!0,get:function(){return n.write}}),Object.defineProperty(t,"writeToStream",{enumerable:!0,get:function(){return n.writeToStream}}),Object.defineProperty(t,"writeToBuffer",{enumerable:!0,get:function(){return n.writeToBuffer}}),Object.defineProperty(t,"writeToString",{enumerable:!0,get:function(){return n.writeToString}}),Object.defineProperty(t,"writeToPath",{enumerable:!0,get:function(){return n.writeToPath}}),Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return n.CsvFormatterStream}}),Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return n.FormatterOptions}});var a=e("@fast-csv/parse");Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return a.parse}}),Object.defineProperty(t,"parseString",{enumerable:!0,get:function(){return a.parseString}}),Object.defineProperty(t,"parseStream",{enumerable:!0,get:function(){return a.parseStream}}),Object.defineProperty(t,"parseFile",{enumerable:!0,get:function(){return a.parseFile}}),Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return a.ParserOptions}}),Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return a.CsvParserStream}})},{"@fast-csv/format":151,"@fast-csv/parse":155}],425:[function(e,r,t){var n=e("safe-buffer").Buffer,a=e("readable-stream").Transform;function s(i,c){if(!n.isBuffer(i)&&typeof i!="string")throw new TypeError(c+" must be a string or a buffer")}function o(i){a.call(this),this._block=n.allocUnsafe(i),this._blockSize=i,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,a),o.prototype._transform=function(i,c,u){var l=null;try{this.update(i,c)}catch(A){l=A}u(l)},o.prototype._flush=function(i){var c=null;try{this.push(this.digest())}catch(u){c=u}i(c)},o.prototype.update=function(i,c){if(s(i,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(i)||(i=n.from(i,c));for(var u=this._block,l=0;this._blockOffset+i.length-l>=this._blockSize;){for(var A=this._blockOffset;A0;++h)this._length[h]+=f,(f=this._length[h]/4294967296|0)>0&&(this._length[h]-=4294967296*f);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(i){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var c=this._digest();i!==void 0&&(c=c.toString(i)),this._block.fill(0),this._blockOffset=0;for(var u=0;u<4;++u)this._length[u]=0;return c},o.prototype._digest=function(){throw new Error("_digest is not implemented")},r.exports=o},{inherits:440,"readable-stream":491,"safe-buffer":494}],426:[function(e,r,t){var n=t;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":437}],427:[function(e,r,t){var n=e("./utils"),a=e("minimalistic-assert");function s(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=s,s.prototype.update=function(o,i){if(o=n.toArray(o,i),this.pending?this.pending=this.pending.concat(o):this.pending=o,this.pendingTotal+=o.length,this.pending.length>=this._delta8){var c=(o=this.pending).length%this._delta8;this.pending=o.slice(o.length-c,o.length),this.pending.length===0&&(this.pending=null),o=n.join32(o,0,o.length-c,this.endian);for(var u=0;u>>24&255,u[l++]=o>>>16&255,u[l++]=o>>>8&255,u[l++]=255&o}else for(u[l++]=255&o,u[l++]=o>>>8&255,u[l++]=o>>>16&255,u[l++]=o>>>24&255,u[l++]=0,u[l++]=0,u[l++]=0,u[l++]=0,A=8;Athis.blockSize&&(o=new this.Hash().update(o).digest()),a(o.length<=this.blockSize);for(var i=o.length;i>>3}function A(h){return n(h,17)^n(h,19)^h>>>10}t.ft_1=a,t.ch32=s,t.maj32=o,t.p32=i,t.s0_256=c,t.s1_256=u,t.g0_256=l,t.g1_256=A},{"../utils":437}],437:[function(e,r,t){var n=e("minimalistic-assert"),a=e("inherits");function s(C,w){return(64512&C.charCodeAt(w))==55296&&!(w<0||w+1>=C.length)&&(64512&C.charCodeAt(w+1))==56320}function o(C,w){if(Array.isArray(C))return C.slice();if(!C)return[];var Q=[];if(typeof C=="string")if(w){if(w==="hex")for((C=C.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(C="0"+C),S=0;S>6|192,Q[B++]=63&O|128):s(C,S)?(O=65536+((1023&O)<<10)+(1023&C.charCodeAt(++S)),Q[B++]=O>>18|240,Q[B++]=O>>12&63|128,Q[B++]=O>>6&63|128,Q[B++]=63&O|128):(Q[B++]=O>>12|224,Q[B++]=O>>6&63|128,Q[B++]=63&O|128)}else for(S=0;S>>24|C>>>8&65280|C<<8&16711680|(255&C)<<24)>>>0}function u(C,w){for(var Q="",B=0;B>>0}return O}function f(C,w){for(var Q=new Array(4*C.length),B=0,S=0;B>>24,Q[S+1]=O>>>16&255,Q[S+2]=O>>>8&255,Q[S+3]=255&O):(Q[S+3]=O>>>24,Q[S+2]=O>>>16&255,Q[S+1]=O>>>8&255,Q[S]=255&O)}return Q}function d(C,w){return C>>>w|C<<32-w}function g(C,w){return C<>>32-w}function p(C,w){return C+w>>>0}function m(C,w,Q){return C+w+Q>>>0}function v(C,w,Q,B){return C+w+Q+B>>>0}function y(C,w,Q,B,S){return C+w+Q+B+S>>>0}function I(C,w,Q,B){var S=C[w],O=B+C[w+1]>>>0,F=(O>>0,C[w+1]=O}function E(C,w,Q,B){return(w+B>>>0>>0}function k(C,w,Q,B){return w+B>>>0}function R(C,w,Q,B,S,O,F,Y){var M=0,z=w;return M+=(z=z+B>>>0)>>0)>>0)>>0}function T(C,w,Q,B,S,O,F,Y){return w+B+O+Y>>>0}function j(C,w,Q,B,S,O,F,Y,M,z){var ue=0,ae=w;return ue+=(ae=ae+B>>>0)>>0)>>0)>>0)>>0}function W(C,w,Q,B,S,O,F,Y,M,z){return w+B+O+Y+z>>>0}function H(C,w,Q){return(w<<32-Q|C>>>Q)>>>0}function X(C,w,Q){return(C<<32-Q|w>>>Q)>>>0}function x(C,w,Q){return C>>>Q}function N(C,w,Q){return(C<<32-Q|w>>>Q)>>>0}t.inherits=a,t.toArray=o,t.toHex=i,t.htonl=c,t.toHex32=u,t.zero2=l,t.zero8=A,t.join32=h,t.split32=f,t.rotr32=d,t.rotl32=g,t.sum32=p,t.sum32_3=m,t.sum32_4=v,t.sum32_5=y,t.sum64=I,t.sum64_hi=E,t.sum64_lo=k,t.sum64_4_hi=R,t.sum64_4_lo=T,t.sum64_5_hi=j,t.sum64_5_lo=W,t.rotr64_hi=H,t.rotr64_lo=X,t.shr64_hi=x,t.shr64_lo=N},{inherits:440,"minimalistic-assert":453}],438:[function(e,r,t){var n=e("hash.js"),a=e("minimalistic-crypto-utils"),s=e("minimalistic-assert");function o(i){if(!(this instanceof o))return new o(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var c=a.toArray(i.entropy,i.entropyEnc||"hex"),u=a.toArray(i.nonce,i.nonceEnc||"hex"),l=a.toArray(i.pers,i.persEnc||"hex");s(c.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(c,u,l)}r.exports=o,o.prototype._init=function(i,c,u){var l=i.concat(c).concat(u);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var A=0;A=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(i.concat(u||[])),this._reseed=1},o.prototype.generate=function(i,c,u,l){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof c!="string"&&(l=u,u=c,c=null),u&&(u=a.toArray(u,l||"hex"),this._update(u));for(var A=[];A.length */t.read=function(n,a,s,o,i){var c,u,l=8*i-o-1,A=(1<>1,f=-7,d=s?i-1:0,g=s?-1:1,p=n[a+d];for(d+=g,c=p&(1<<-f)-1,p>>=-f,f+=l;f>0;c=256*c+n[a+d],d+=g,f-=8);for(u=c&(1<<-f)-1,c>>=-f,f+=o;f>0;u=256*u+n[a+d],d+=g,f-=8);if(c===0)c=1-h;else{if(c===A)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,o),c-=h}return(p?-1:1)*u*Math.pow(2,c-o)},t.write=function(n,a,s,o,i,c){var u,l,A,h=8*c-i-1,f=(1<>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=o?0:c-1,m=o?1:-1,v=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(l=isNaN(a)?1:0,u=f):(u=Math.floor(Math.log(a)/Math.LN2),a*(A=Math.pow(2,-u))<1&&(u--,A*=2),(a+=u+d>=1?g/A:g*Math.pow(2,1-d))*A>=2&&(u++,A/=2),u+d>=f?(l=0,u=f):u+d>=1?(l=(a*A-1)*Math.pow(2,i),u+=d):(l=a*Math.pow(2,d-1)*Math.pow(2,i),u=0));i>=8;n[s+p]=255&l,p+=m,l/=256,i-=8);for(u=u<0;n[s+p]=255&u,p+=m,u/=256,h-=8);n[s+p-m]|=128*v}},{}],440:[function(e,r,t){typeof Object.create=="function"?r.exports=function(n,a){a&&(n.super_=a,n.prototype=Object.create(a.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:r.exports=function(n,a){if(a){n.super_=a;var s=function(){};s.prototype=a.prototype,n.prototype=new s,n.prototype.constructor=n}}},{}],441:[function(e,r,t){(function(n,a,s,o,i,c,u,l){(function(){/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */(function(A){typeof t=="object"&&r!==void 0?r.exports=A():(typeof window<"u"?window:a!==void 0?a:typeof self<"u"?self:this).JSZip=A()})(function(){return function A(h,f,d){function g(v,y){if(!f[v]){if(!h[v]){var I=typeof e=="function"&&e;if(!y&&I)return I(v,!0);if(p)return p(v,!0);var E=new Error("Cannot find module '"+v+"'");throw E.code="MODULE_NOT_FOUND",E}var k=f[v]={exports:{}};h[v][0].call(k.exports,function(R){return g(h[v][1][R]||R)},k,k.exports,A,h,f,d)}return f[v].exports}for(var p=typeof e=="function"&&e,m=0;m>2,k=(3&v)<<4|y>>4,R=1>6:64,T=2>4,y=(15&E)<<4|(k=p.indexOf(m.charAt(T++)))>>2,I=(3&k)<<6|(R=p.indexOf(m.charAt(T++))),H[j++]=v,k!==64&&(H[j++]=y),R!==64&&(H[j++]=I);return H}},{"./support":30,"./utils":32}],2:[function(A,h,f){var d=A("./external"),g=A("./stream/DataWorker"),p=A("./stream/Crc32Probe"),m=A("./stream/DataLengthProbe");function v(y,I,E,k,R){this.compressedSize=y,this.uncompressedSize=I,this.crc32=E,this.compression=k,this.compressedContent=R}v.prototype={getContentWorker:function(){var y=new g(d.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),I=this;return y.on("end",function(){if(this.streamInfo.data_length!==I.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new g(d.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},v.createWorkerFrom=function(y,I,E){return y.pipe(new p).pipe(new m("uncompressedSize")).pipe(I.compressWorker(E)).pipe(new m("compressedSize")).withStreamInfo("compression",I)},h.exports=v},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(A,h,f){var d=A("./stream/GenericWorker");f.STORE={magic:"\0\0",compressWorker:function(){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},f.DEFLATE=A("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(A,h,f){var d=A("./utils"),g=function(){for(var p,m=[],v=0;v<256;v++){p=v;for(var y=0;y<8;y++)p=1&p?3988292384^p>>>1:p>>>1;m[v]=p}return m}();h.exports=function(p,m){return p!==void 0&&p.length?d.getTypeOf(p)!=="string"?function(v,y,I,E){var k=g,R=E+I;v^=-1;for(var T=E;T>>8^k[255&(v^y[T])];return-1^v}(0|m,p,p.length,0):function(v,y,I,E){var k=g,R=E+I;v^=-1;for(var T=E;T>>8^k[255&(v^y.charCodeAt(T))];return-1^v}(0|m,p,p.length,0):0}},{"./utils":32}],5:[function(A,h,f){f.base64=!1,f.binary=!1,f.dir=!1,f.createFolders=!0,f.date=null,f.compression=null,f.compressionOptions=null,f.comment=null,f.unixPermissions=null,f.dosPermissions=null},{}],6:[function(A,h,f){var d=null;d=typeof Promise<"u"?Promise:A("lie"),h.exports={Promise:d}},{lie:37}],7:[function(A,h,f){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",g=A("pako"),p=A("./utils"),m=A("./stream/GenericWorker"),v=d?"uint8array":"array";function y(I,E){m.call(this,"FlateWorker/"+I),this._pako=null,this._pakoAction=I,this._pakoOptions=E,this.meta={}}f.magic="\b\0",p.inherits(y,m),y.prototype.processChunk=function(I){this.meta=I.meta,this._pako===null&&this._createPako(),this._pako.push(p.transformTo(v,I.data),!1)},y.prototype.flush=function(){m.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new g[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var I=this;this._pako.onData=function(E){I.push({data:E,meta:I.meta})}},f.compressWorker=function(I){return new y("Deflate",I)},f.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(A,h,f){function d(k,R){var T,j="";for(T=0;T>>=8;return j}function g(k,R,T,j,W,H){var X,x,N=k.file,C=k.compression,w=H!==v.utf8encode,Q=p.transformTo("string",H(N.name)),B=p.transformTo("string",v.utf8encode(N.name)),S=N.comment,O=p.transformTo("string",H(S)),F=p.transformTo("string",v.utf8encode(S)),Y=B.length!==N.name.length,M=F.length!==S.length,z="",ue="",ae="",Ne=N.dir,Ge=N.date,Ye={crc32:0,compressedSize:0,uncompressedSize:0};R&&!T||(Ye.crc32=k.crc32,Ye.compressedSize=k.compressedSize,Ye.uncompressedSize=k.uncompressedSize);var Ae=0;R&&(Ae|=8),w||!Y&&!M||(Ae|=2048);var te,he,de,Ke=0,le=0;Ne&&(Ke|=16),W==="UNIX"?(le=798,Ke|=(te=N.unixPermissions,he=Ne,de=te,te||(de=he?16893:33204),(65535&de)<<16)):(le=20,Ke|=function(At){return 63&(At||0)}(N.dosPermissions)),X=Ge.getUTCHours(),X<<=6,X|=Ge.getUTCMinutes(),X<<=5,X|=Ge.getUTCSeconds()/2,x=Ge.getUTCFullYear()-1980,x<<=4,x|=Ge.getUTCMonth()+1,x<<=5,x|=Ge.getUTCDate(),Y&&(ue=d(1,1)+d(y(Q),4)+B,z+="up"+d(ue.length,2)+ue),M&&(ae=d(1,1)+d(y(O),4)+F,z+="uc"+d(ae.length,2)+ae);var Ce="";return Ce+=` \0`,Ce+=d(Ae,2),Ce+=C.magic,Ce+=d(X,2),Ce+=d(x,2),Ce+=d(Ye.crc32,4),Ce+=d(Ye.compressedSize,4),Ce+=d(Ye.uncompressedSize,4),Ce+=d(Q.length,2),Ce+=d(z.length,2),{fileRecord:I.LOCAL_FILE_HEADER+Ce+Q+z,dirRecord:I.CENTRAL_FILE_HEADER+d(le,2)+Ce+d(O.length,2)+"\0\0\0\0"+d(Ke,4)+d(j,4)+Q+z+O}}var p=A("../utils"),m=A("../stream/GenericWorker"),v=A("../utf8"),y=A("../crc32"),I=A("../signature");function E(k,R,T,j){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=R,this.zipPlatform=T,this.encodeFileName=j,this.streamFiles=k,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}p.inherits(E,m),E.prototype.push=function(k){var R=k.meta.percent||0,T=this.entriesCount,j=this._sources.length;this.accumulate?this.contentBuffer.push(k):(this.bytesWritten+=k.data.length,m.prototype.push.call(this,{data:k.data,meta:{currentFile:this.currentFile,percent:T?(R+100*(T-j-1))/T:100}}))},E.prototype.openedSource=function(k){this.currentSourceOffset=this.bytesWritten,this.currentFile=k.file.name;var R=this.streamFiles&&!k.file.dir;if(R){var T=g(k,R,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:T.fileRecord,meta:{percent:0}})}else this.accumulate=!0},E.prototype.closedSource=function(k){this.accumulate=!1;var R,T=this.streamFiles&&!k.file.dir,j=g(k,T,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(j.dirRecord),T)this.push({data:(R=k,I.DATA_DESCRIPTOR+d(R.crc32,4)+d(R.compressedSize,4)+d(R.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:j.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},E.prototype.flush=function(){for(var k=this.bytesWritten,R=0;R=this.index;m--)v=(v<<8)+this.byteAt(m);return this.index+=p,v},readString:function(p){return d.transformTo("string",this.readData(p))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var p=this.readInt(4);return new Date(Date.UTC(1980+(p>>25&127),(p>>21&15)-1,p>>16&31,p>>11&31,p>>5&63,(31&p)<<1))}},h.exports=g},{"../utils":32}],19:[function(A,h,f){var d=A("./Uint8ArrayReader");function g(p){d.call(this,p)}A("../utils").inherits(g,d),g.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},h.exports=g},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(A,h,f){var d=A("./DataReader");function g(p){d.call(this,p)}A("../utils").inherits(g,d),g.prototype.byteAt=function(p){return this.data.charCodeAt(this.zero+p)},g.prototype.lastIndexOfSignature=function(p){return this.data.lastIndexOf(p)-this.zero},g.prototype.readAndCheckSignature=function(p){return p===this.readData(4)},g.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},h.exports=g},{"../utils":32,"./DataReader":18}],21:[function(A,h,f){var d=A("./ArrayReader");function g(p){d.call(this,p)}A("../utils").inherits(g,d),g.prototype.readData=function(p){if(this.checkOffset(p),p===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},h.exports=g},{"../utils":32,"./ArrayReader":17}],22:[function(A,h,f){var d=A("../utils"),g=A("../support"),p=A("./ArrayReader"),m=A("./StringReader"),v=A("./NodeBufferReader"),y=A("./Uint8ArrayReader");h.exports=function(I){var E=d.getTypeOf(I);return d.checkSupport(E),E!=="string"||g.uint8array?E==="nodebuffer"?new v(I):g.uint8array?new y(d.transformTo("uint8array",I)):new p(d.transformTo("array",I)):new m(I)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(A,h,f){f.LOCAL_FILE_HEADER="PK",f.CENTRAL_FILE_HEADER="PK",f.CENTRAL_DIRECTORY_END="PK",f.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",f.ZIP64_CENTRAL_DIRECTORY_END="PK",f.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(A,h,f){var d=A("./GenericWorker"),g=A("../utils");function p(m){d.call(this,"ConvertWorker to "+m),this.destType=m}g.inherits(p,d),p.prototype.processChunk=function(m){this.push({data:g.transformTo(this.destType,m.data),meta:m.meta})},h.exports=p},{"../utils":32,"./GenericWorker":28}],25:[function(A,h,f){var d=A("./GenericWorker"),g=A("../crc32");function p(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}A("../utils").inherits(p,d),p.prototype.processChunk=function(m){this.streamInfo.crc32=g(m.data,this.streamInfo.crc32||0),this.push(m)},h.exports=p},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(A,h,f){var d=A("../utils"),g=A("./GenericWorker");function p(m){g.call(this,"DataLengthProbe for "+m),this.propName=m,this.withStreamInfo(m,0)}d.inherits(p,g),p.prototype.processChunk=function(m){if(m){var v=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=v+m.data.length}g.prototype.processChunk.call(this,m)},h.exports=p},{"../utils":32,"./GenericWorker":28}],27:[function(A,h,f){var d=A("../utils"),g=A("./GenericWorker");function p(m){g.call(this,"DataWorker");var v=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(y){v.dataIsReady=!0,v.data=y,v.max=y&&y.length||0,v.type=d.getTypeOf(y),v.isPaused||v._tickAndRepeat()},function(y){v.error(y)})}d.inherits(p,g),p.prototype.cleanUp=function(){g.prototype.cleanUp.call(this),this.data=null},p.prototype.resume=function(){return!!g.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},p.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},p.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=null,v=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":m=this.data.substring(this.index,v);break;case"uint8array":m=this.data.subarray(this.index,v);break;case"array":case"nodebuffer":m=this.data.slice(this.index,v)}return this.index=v,this.push({data:m,meta:{percent:this.max?this.index/this.max*100:0}})},h.exports=p},{"../utils":32,"./GenericWorker":28}],28:[function(A,h,f){function d(g){this.name=g||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(g){this.emit("data",g)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(g){this.emit("error",g)}return!0},error:function(g){return!this.isFinished&&(this.isPaused?this.generatedError=g:(this.isFinished=!0,this.emit("error",g),this.previous&&this.previous.error(g),this.cleanUp()),!0)},on:function(g,p){return this._listeners[g].push(p),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(g,p){if(this._listeners[g])for(var m=0;m "+g:g}},h.exports=d},{}],29:[function(A,h,f){var d=A("../utils"),g=A("./ConvertWorker"),p=A("./GenericWorker"),m=A("../base64"),v=A("../support"),y=A("../external"),I=null;if(v.nodestream)try{I=A("../nodejs/NodejsStreamOutputAdapter")}catch{}function E(R,T){return new y.Promise(function(j,W){var H=[],X=R._internalType,x=R._outputType,N=R._mimeType;R.on("data",function(C,w){H.push(C),T&&T(w)}).on("error",function(C){H=[],W(C)}).on("end",function(){try{var C=function(w,Q,B){switch(w){case"blob":return d.newBlob(d.transformTo("arraybuffer",Q),B);case"base64":return m.encode(Q);default:return d.transformTo(w,Q)}}(x,function(w,Q){var B,S=0,O=null,F=0;for(B=0;B"u")f.blob=!1;else{var d=new ArrayBuffer(0);try{f.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);g.append(d),f.blob=g.getBlob("application/zip").size===0}catch{f.blob=!1}}}try{f.nodestream=!!A("readable-stream").Readable}catch{f.nodestream=!1}},{"readable-stream":16}],31:[function(A,h,f){for(var d=A("./utils"),g=A("./support"),p=A("./nodejsUtils"),m=A("./stream/GenericWorker"),v=new Array(256),y=0;y<256;y++)v[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;function I(){m.call(this,"utf-8 decode"),this.leftOver=null}function E(){m.call(this,"utf-8 encode")}v[254]=v[254]=1,f.utf8encode=function(k){return g.nodebuffer?p.newBufferFrom(k,"utf-8"):function(R){var T,j,W,H,X,x=R.length,N=0;for(H=0;H>>6:(j<65536?T[X++]=224|j>>>12:(T[X++]=240|j>>>18,T[X++]=128|j>>>12&63),T[X++]=128|j>>>6&63),T[X++]=128|63&j);return T}(k)},f.utf8decode=function(k){return g.nodebuffer?d.transformTo("nodebuffer",k).toString("utf-8"):function(R){var T,j,W,H,X=R.length,x=new Array(2*X);for(T=j=0;T>10&1023,x[j++]=56320|1023&W)}return x.length!==j&&(x.subarray?x=x.subarray(0,j):x.length=j),d.applyFromCharCode(x)}(k=d.transformTo(g.uint8array?"uint8array":"array",k))},d.inherits(I,m),I.prototype.processChunk=function(k){var R=d.transformTo(g.uint8array?"uint8array":"array",k.data);if(this.leftOver&&this.leftOver.length){if(g.uint8array){var T=R;(R=new Uint8Array(T.length+this.leftOver.length)).set(this.leftOver,0),R.set(T,this.leftOver.length)}else R=this.leftOver.concat(R);this.leftOver=null}var j=function(H,X){var x;for((X=X||H.length)>H.length&&(X=H.length),x=X-1;0<=x&&(192&H[x])==128;)x--;return x<0||x===0?X:x+v[H[x]]>X?x:X}(R),W=R;j!==R.length&&(g.uint8array?(W=R.subarray(0,j),this.leftOver=R.subarray(j,R.length)):(W=R.slice(0,j),this.leftOver=R.slice(j,R.length))),this.push({data:f.utf8decode(W),meta:k.meta})},I.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:f.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},f.Utf8DecodeWorker=I,d.inherits(E,m),E.prototype.processChunk=function(k){this.push({data:f.utf8encode(k.data),meta:k.meta})},f.Utf8EncodeWorker=E},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(A,h,f){var d=A("./support"),g=A("./base64"),p=A("./nodejsUtils"),m=A("./external");function v(T){return T}function y(T,j){for(var W=0;W>8;this.dir=!!(16&this.externalFileAttributes),k==0&&(this.dosPermissions=63&this.externalFileAttributes),k==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var k=d(this.extraFields[1].value);this.uncompressedSize===g.MAX_VALUE_32BITS&&(this.uncompressedSize=k.readInt(8)),this.compressedSize===g.MAX_VALUE_32BITS&&(this.compressedSize=k.readInt(8)),this.localHeaderOffset===g.MAX_VALUE_32BITS&&(this.localHeaderOffset=k.readInt(8)),this.diskNumberStart===g.MAX_VALUE_32BITS&&(this.diskNumberStart=k.readInt(4))}},readExtraFields:function(k){var R,T,j,W=k.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});k.index+4>>6:(k<65536?E[j++]=224|k>>>12:(E[j++]=240|k>>>18,E[j++]=128|k>>>12&63),E[j++]=128|k>>>6&63),E[j++]=128|63&k);return E},f.buf2binstring=function(I){return y(I,I.length)},f.binstring2buf=function(I){for(var E=new d.Buf8(I.length),k=0,R=E.length;k>10&1023,H[R++]=56320|1023&T)}return y(H,R)},f.utf8border=function(I,E){var k;for((E=E||I.length)>I.length&&(E=I.length),k=E-1;0<=k&&(192&I[k])==128;)k--;return k<0||k===0?E:k+m[I[k]]>E?k:E}},{"./common":41}],43:[function(A,h,f){h.exports=function(d,g,p,m){for(var v=65535&d|0,y=d>>>16&65535|0,I=0;p!==0;){for(p-=I=2e3>>1:g>>>1;p[m]=g}return p}();h.exports=function(g,p,m,v){var y=d,I=v+m;g^=-1;for(var E=v;E>>8^y[255&(g^p[E])];return-1^g}},{}],46:[function(A,h,f){var d,g=A("../utils/common"),p=A("./trees"),m=A("./adler32"),v=A("./crc32"),y=A("./messages"),I=0,E=4,k=0,R=-2,T=-1,j=4,W=2,H=8,X=9,x=286,N=30,C=19,w=2*x+1,Q=15,B=3,S=258,O=S+B+1,F=42,Y=113,M=1,z=2,ue=3,ae=4;function Ne(re,ot){return re.msg=y[ot],ot}function Ge(re){return(re<<1)-(4re.avail_out&&(pt=re.avail_out),pt!==0&&(g.arraySet(re.output,ot.pending_buf,ot.pending_out,pt,re.next_out),re.next_out+=pt,ot.pending_out+=pt,re.total_out+=pt,re.avail_out-=pt,ot.pending-=pt,ot.pending===0&&(ot.pending_out=0))}function te(re,ot){p._tr_flush_block(re,0<=re.block_start?re.block_start:-1,re.strstart-re.block_start,ot),re.block_start=re.strstart,Ae(re.strm)}function he(re,ot){re.pending_buf[re.pending++]=ot}function de(re,ot){re.pending_buf[re.pending++]=ot>>>8&255,re.pending_buf[re.pending++]=255&ot}function Ke(re,ot){var pt,Be,Ee=re.max_chain_length,Me=re.strstart,yt=re.prev_length,pe=re.nice_match,me=re.strstart>re.w_size-O?re.strstart-(re.w_size-O):0,Re=re.window,Ze=re.w_mask,ke=re.prev,Pe=re.strstart+S,_e=Re[Me+yt-1],Je=Re[Me+yt];re.prev_length>=re.good_match&&(Ee>>=2),pe>re.lookahead&&(pe=re.lookahead);do if(Re[(pt=ot)+yt]===Je&&Re[pt+yt-1]===_e&&Re[pt]===Re[Me]&&Re[++pt]===Re[Me+1]){Me+=2,pt++;do;while(Re[++Me]===Re[++pt]&&Re[++Me]===Re[++pt]&&Re[++Me]===Re[++pt]&&Re[++Me]===Re[++pt]&&Re[++Me]===Re[++pt]&&Re[++Me]===Re[++pt]&&Re[++Me]===Re[++pt]&&Re[++Me]===Re[++pt]&&Meme&&--Ee!=0);return yt<=re.lookahead?yt:re.lookahead}function le(re){var ot,pt,Be,Ee,Me,yt,pe,me,Re,Ze,ke=re.w_size;do{if(Ee=re.window_size-re.lookahead-re.strstart,re.strstart>=ke+(ke-O)){for(g.arraySet(re.window,re.window,ke,ke,0),re.match_start-=ke,re.strstart-=ke,re.block_start-=ke,ot=pt=re.hash_size;Be=re.head[--ot],re.head[ot]=ke<=Be?Be-ke:0,--pt;);for(ot=pt=ke;Be=re.prev[--ot],re.prev[ot]=ke<=Be?Be-ke:0,--pt;);Ee+=ke}if(re.strm.avail_in===0)break;if(yt=re.strm,pe=re.window,me=re.strstart+re.lookahead,Ze=void 0,(Re=Ee)<(Ze=yt.avail_in)&&(Ze=Re),pt=Ze===0?0:(yt.avail_in-=Ze,g.arraySet(pe,yt.input,yt.next_in,Ze,me),yt.state.wrap===1?yt.adler=m(yt.adler,pe,Ze,me):yt.state.wrap===2&&(yt.adler=v(yt.adler,pe,Ze,me)),yt.next_in+=Ze,yt.total_in+=Ze,Ze),re.lookahead+=pt,re.lookahead+re.insert>=B)for(Me=re.strstart-re.insert,re.ins_h=re.window[Me],re.ins_h=(re.ins_h<=B&&(re.ins_h=(re.ins_h<=B)if(Be=p._tr_tally(re,re.strstart-re.match_start,re.match_length-B),re.lookahead-=re.match_length,re.match_length<=re.max_lazy_match&&re.lookahead>=B){for(re.match_length--;re.strstart++,re.ins_h=(re.ins_h<=B&&(re.ins_h=(re.ins_h<=B&&re.match_length<=re.prev_length){for(Ee=re.strstart+re.lookahead-B,Be=p._tr_tally(re,re.strstart-1-re.prev_match,re.prev_length-B),re.lookahead-=re.prev_length-1,re.prev_length-=2;++re.strstart<=Ee&&(re.ins_h=(re.ins_h<re.pending_buf_size-5&&(pt=re.pending_buf_size-5);;){if(re.lookahead<=1){if(le(re),re.lookahead===0&&ot===I)return M;if(re.lookahead===0)break}re.strstart+=re.lookahead,re.lookahead=0;var Be=re.block_start+pt;if((re.strstart===0||re.strstart>=Be)&&(re.lookahead=re.strstart-Be,re.strstart=Be,te(re,!1),re.strm.avail_out===0)||re.strstart-re.block_start>=re.w_size-O&&(te(re,!1),re.strm.avail_out===0))return M}return re.insert=0,ot===E?(te(re,!0),re.strm.avail_out===0?ue:ae):(re.strstart>re.block_start&&(te(re,!1),re.strm.avail_out),M)}),new Z(4,4,8,4,Ce),new Z(4,5,16,8,Ce),new Z(4,6,32,32,Ce),new Z(4,4,16,16,At),new Z(8,16,32,32,At),new Z(8,16,128,128,At),new Z(8,32,128,256,At),new Z(32,128,258,1024,At),new Z(32,258,258,4096,At)],f.deflateInit=function(re,ot){return dt(re,ot,H,15,8,0)},f.deflateInit2=dt,f.deflateReset=Ve,f.deflateResetKeep=ye,f.deflateSetHeader=function(re,ot){return re&&re.state?re.state.wrap!==2?R:(re.state.gzhead=ot,k):R},f.deflate=function(re,ot){var pt,Be,Ee,Me;if(!re||!re.state||5>8&255),he(Be,Be.gzhead.time>>16&255),he(Be,Be.gzhead.time>>24&255),he(Be,Be.level===9?2:2<=Be.strategy||Be.level<2?4:0),he(Be,255&Be.gzhead.os),Be.gzhead.extra&&Be.gzhead.extra.length&&(he(Be,255&Be.gzhead.extra.length),he(Be,Be.gzhead.extra.length>>8&255)),Be.gzhead.hcrc&&(re.adler=v(re.adler,Be.pending_buf,Be.pending,0)),Be.gzindex=0,Be.status=69):(he(Be,0),he(Be,0),he(Be,0),he(Be,0),he(Be,0),he(Be,Be.level===9?2:2<=Be.strategy||Be.level<2?4:0),he(Be,3),Be.status=Y);else{var yt=H+(Be.w_bits-8<<4)<<8;yt|=(2<=Be.strategy||Be.level<2?0:Be.level<6?1:Be.level===6?2:3)<<6,Be.strstart!==0&&(yt|=32),yt+=31-yt%31,Be.status=Y,de(Be,yt),Be.strstart!==0&&(de(Be,re.adler>>>16),de(Be,65535&re.adler)),re.adler=1}if(Be.status===69)if(Be.gzhead.extra){for(Ee=Be.pending;Be.gzindex<(65535&Be.gzhead.extra.length)&&(Be.pending!==Be.pending_buf_size||(Be.gzhead.hcrc&&Be.pending>Ee&&(re.adler=v(re.adler,Be.pending_buf,Be.pending-Ee,Ee)),Ae(re),Ee=Be.pending,Be.pending!==Be.pending_buf_size));)he(Be,255&Be.gzhead.extra[Be.gzindex]),Be.gzindex++;Be.gzhead.hcrc&&Be.pending>Ee&&(re.adler=v(re.adler,Be.pending_buf,Be.pending-Ee,Ee)),Be.gzindex===Be.gzhead.extra.length&&(Be.gzindex=0,Be.status=73)}else Be.status=73;if(Be.status===73)if(Be.gzhead.name){Ee=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>Ee&&(re.adler=v(re.adler,Be.pending_buf,Be.pending-Ee,Ee)),Ae(re),Ee=Be.pending,Be.pending===Be.pending_buf_size)){Me=1;break}Me=Be.gzindexEe&&(re.adler=v(re.adler,Be.pending_buf,Be.pending-Ee,Ee)),Me===0&&(Be.gzindex=0,Be.status=91)}else Be.status=91;if(Be.status===91)if(Be.gzhead.comment){Ee=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>Ee&&(re.adler=v(re.adler,Be.pending_buf,Be.pending-Ee,Ee)),Ae(re),Ee=Be.pending,Be.pending===Be.pending_buf_size)){Me=1;break}Me=Be.gzindexEe&&(re.adler=v(re.adler,Be.pending_buf,Be.pending-Ee,Ee)),Me===0&&(Be.status=103)}else Be.status=103;if(Be.status===103&&(Be.gzhead.hcrc?(Be.pending+2>Be.pending_buf_size&&Ae(re),Be.pending+2<=Be.pending_buf_size&&(he(Be,255&re.adler),he(Be,re.adler>>8&255),re.adler=0,Be.status=Y)):Be.status=Y),Be.pending!==0){if(Ae(re),re.avail_out===0)return Be.last_flush=-1,k}else if(re.avail_in===0&&Ge(ot)<=Ge(pt)&&ot!==E)return Ne(re,-5);if(Be.status===666&&re.avail_in!==0)return Ne(re,-5);if(re.avail_in!==0||Be.lookahead!==0||ot!==I&&Be.status!==666){var pe=Be.strategy===2?function(me,Re){for(var Ze;;){if(me.lookahead===0&&(le(me),me.lookahead===0)){if(Re===I)return M;break}if(me.match_length=0,Ze=p._tr_tally(me,0,me.window[me.strstart]),me.lookahead--,me.strstart++,Ze&&(te(me,!1),me.strm.avail_out===0))return M}return me.insert=0,Re===E?(te(me,!0),me.strm.avail_out===0?ue:ae):me.last_lit&&(te(me,!1),me.strm.avail_out===0)?M:z}(Be,ot):Be.strategy===3?function(me,Re){for(var Ze,ke,Pe,_e,Je=me.window;;){if(me.lookahead<=S){if(le(me),me.lookahead<=S&&Re===I)return M;if(me.lookahead===0)break}if(me.match_length=0,me.lookahead>=B&&0me.lookahead&&(me.match_length=me.lookahead)}if(me.match_length>=B?(Ze=p._tr_tally(me,1,me.match_length-B),me.lookahead-=me.match_length,me.strstart+=me.match_length,me.match_length=0):(Ze=p._tr_tally(me,0,me.window[me.strstart]),me.lookahead--,me.strstart++),Ze&&(te(me,!1),me.strm.avail_out===0))return M}return me.insert=0,Re===E?(te(me,!0),me.strm.avail_out===0?ue:ae):me.last_lit&&(te(me,!1),me.strm.avail_out===0)?M:z}(Be,ot):d[Be.level].func(Be,ot);if(pe!==ue&&pe!==ae||(Be.status=666),pe===M||pe===ue)return re.avail_out===0&&(Be.last_flush=-1),k;if(pe===z&&(ot===1?p._tr_align(Be):ot!==5&&(p._tr_stored_block(Be,0,0,!1),ot===3&&(Ye(Be.head),Be.lookahead===0&&(Be.strstart=0,Be.block_start=0,Be.insert=0))),Ae(re),re.avail_out===0))return Be.last_flush=-1,k}return ot!==E?k:Be.wrap<=0?1:(Be.wrap===2?(he(Be,255&re.adler),he(Be,re.adler>>8&255),he(Be,re.adler>>16&255),he(Be,re.adler>>24&255),he(Be,255&re.total_in),he(Be,re.total_in>>8&255),he(Be,re.total_in>>16&255),he(Be,re.total_in>>24&255)):(de(Be,re.adler>>>16),de(Be,65535&re.adler)),Ae(re),0=pt.w_size&&(Me===0&&(Ye(pt.head),pt.strstart=0,pt.block_start=0,pt.insert=0),Re=new g.Buf8(pt.w_size),g.arraySet(Re,ot,Ze-pt.w_size,pt.w_size,0),ot=Re,Ze=pt.w_size),yt=re.avail_in,pe=re.next_in,me=re.input,re.avail_in=Ze,re.next_in=0,re.input=ot,le(pt);pt.lookahead>=B;){for(Be=pt.strstart,Ee=pt.lookahead-(B-1);pt.ins_h=(pt.ins_h<>>=B=Q>>>24,X-=B,(B=Q>>>16&255)==0)z[y++]=65535&Q;else{if(!(16&B)){if(!(64&B)){Q=x[(65535&Q)+(H&(1<>>=B,X-=B),X<15&&(H+=M[m++]<>>=B=Q>>>24,X-=B,!(16&(B=Q>>>16&255))){if(!(64&B)){Q=N[(65535&Q)+(H&(1<>>=B,X-=B,(B=y-I)>3,H&=(1<<(X-=S<<3))-1,d.next_in=m,d.next_out=y,d.avail_in=m>>24&255)+(F>>>8&65280)+((65280&F)<<8)+((255&F)<<24)}function H(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function X(F){var Y;return F&&F.state?(Y=F.state,F.total_in=F.total_out=Y.total=0,F.msg="",Y.wrap&&(F.adler=1&Y.wrap),Y.mode=R,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new d.Buf32(T),Y.distcode=Y.distdyn=new d.Buf32(j),Y.sane=1,Y.back=-1,E):k}function x(F){var Y;return F&&F.state?((Y=F.state).wsize=0,Y.whave=0,Y.wnext=0,X(F)):k}function N(F,Y){var M,z;return F&&F.state?(z=F.state,Y<0?(M=0,Y=-Y):(M=1+(Y>>4),Y<48&&(Y&=15)),Y&&(Y<8||15=ae.wsize?(d.arraySet(ae.window,Y,M-ae.wsize,ae.wsize,0),ae.wnext=0,ae.whave=ae.wsize):(z<(ue=ae.wsize-ae.wnext)&&(ue=z),d.arraySet(ae.window,Y,M-z,ue,ae.wnext),(z-=ue)?(d.arraySet(ae.window,Y,M-z,z,0),ae.wnext=z,ae.whave=ae.wsize):(ae.wnext+=ue,ae.wnext===ae.wsize&&(ae.wnext=0),ae.whave>>8&255,M.check=p(M.check,Me,2,0),te=Ae=0,M.mode=2;break}if(M.flags=0,M.head&&(M.head.done=!1),!(1&M.wrap)||(((255&Ae)<<8)+(Ae>>8))%31){F.msg="incorrect header check",M.mode=30;break}if((15&Ae)!=8){F.msg="unknown compression method",M.mode=30;break}if(te-=4,re=8+(15&(Ae>>>=4)),M.wbits===0)M.wbits=re;else if(re>M.wbits){F.msg="invalid window size",M.mode=30;break}M.dmax=1<>8&1),512&M.flags&&(Me[0]=255&Ae,Me[1]=Ae>>>8&255,M.check=p(M.check,Me,2,0)),te=Ae=0,M.mode=3;case 3:for(;te<32;){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>>8&255,Me[2]=Ae>>>16&255,Me[3]=Ae>>>24&255,M.check=p(M.check,Me,4,0)),te=Ae=0,M.mode=4;case 4:for(;te<16;){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>8),512&M.flags&&(Me[0]=255&Ae,Me[1]=Ae>>>8&255,M.check=p(M.check,Me,2,0)),te=Ae=0,M.mode=5;case 5:if(1024&M.flags){for(;te<16;){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>>8&255,M.check=p(M.check,Me,2,0)),te=Ae=0}else M.head&&(M.head.extra=null);M.mode=6;case 6:if(1024&M.flags&&(Ge<(Ke=M.length)&&(Ke=Ge),Ke&&(M.head&&(re=M.head.extra_len-M.length,M.head.extra||(M.head.extra=new Array(M.head.extra_len)),d.arraySet(M.head.extra,z,ae,Ke,re)),512&M.flags&&(M.check=p(M.check,z,Ke,ae)),Ge-=Ke,ae+=Ke,M.length-=Ke),M.length))break e;M.length=0,M.mode=7;case 7:if(2048&M.flags){if(Ge===0)break e;for(Ke=0;re=z[ae+Ke++],M.head&&re&&M.length<65536&&(M.head.name+=String.fromCharCode(re)),re&&Ke>9&1,M.head.done=!0),F.adler=M.check=0,M.mode=12;break;case 10:for(;te<32;){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>>=7&te,te-=7&te,M.mode=27;break}for(;te<3;){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>>=1)){case 0:M.mode=14;break;case 1:if(S(M),M.mode=20,Y!==6)break;Ae>>>=2,te-=2;break e;case 2:M.mode=17;break;case 3:F.msg="invalid block type",M.mode=30}Ae>>>=2,te-=2;break;case 14:for(Ae>>>=7&te,te-=7&te;te<32;){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>>16^65535)){F.msg="invalid stored block lengths",M.mode=30;break}if(M.length=65535&Ae,te=Ae=0,M.mode=15,Y===6)break e;case 15:M.mode=16;case 16:if(Ke=M.length){if(Ge>>=5,te-=5,M.ndist=1+(31&Ae),Ae>>>=5,te-=5,M.ncode=4+(15&Ae),Ae>>>=4,te-=4,286>>=3,te-=3}for(;M.have<19;)M.lens[yt[M.have++]]=0;if(M.lencode=M.lendyn,M.lenbits=7,pt={bits:M.lenbits},ot=v(0,M.lens,0,19,M.lencode,0,M.work,pt),M.lenbits=pt.bits,ot){F.msg="invalid code lengths set",M.mode=30;break}M.have=0,M.mode=19;case 19:for(;M.have>>16&255,ce=65535&Ee,!((At=Ee>>>24)<=te);){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>>=At,te-=At,M.lens[M.have++]=ce;else{if(ce===16){for(Be=At+2;te>>=At,te-=At,M.have===0){F.msg="invalid bit length repeat",M.mode=30;break}re=M.lens[M.have-1],Ke=3+(3&Ae),Ae>>>=2,te-=2}else if(ce===17){for(Be=At+3;te>>=At)),Ae>>>=3,te-=3}else{for(Be=At+7;te>>=At)),Ae>>>=7,te-=7}if(M.have+Ke>M.nlen+M.ndist){F.msg="invalid bit length repeat",M.mode=30;break}for(;Ke--;)M.lens[M.have++]=re}}if(M.mode===30)break;if(M.lens[256]===0){F.msg="invalid code -- missing end-of-block",M.mode=30;break}if(M.lenbits=9,pt={bits:M.lenbits},ot=v(y,M.lens,0,M.nlen,M.lencode,0,M.work,pt),M.lenbits=pt.bits,ot){F.msg="invalid literal/lengths set",M.mode=30;break}if(M.distbits=6,M.distcode=M.distdyn,pt={bits:M.distbits},ot=v(I,M.lens,M.nlen,M.ndist,M.distcode,0,M.work,pt),M.distbits=pt.bits,ot){F.msg="invalid distances set",M.mode=30;break}if(M.mode=20,Y===6)break e;case 20:M.mode=21;case 21:if(6<=Ge&&258<=Ye){F.next_out=Ne,F.avail_out=Ye,F.next_in=ae,F.avail_in=Ge,M.hold=Ae,M.bits=te,m(F,de),Ne=F.next_out,ue=F.output,Ye=F.avail_out,ae=F.next_in,z=F.input,Ge=F.avail_in,Ae=M.hold,te=M.bits,M.mode===12&&(M.back=-1);break}for(M.back=0;Z=(Ee=M.lencode[Ae&(1<>>16&255,ce=65535&Ee,!((At=Ee>>>24)<=te);){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>ye)])>>>16&255,ce=65535&Ee,!(ye+(At=Ee>>>24)<=te);){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>>=ye,te-=ye,M.back+=ye}if(Ae>>>=At,te-=At,M.back+=At,M.length=ce,Z===0){M.mode=26;break}if(32&Z){M.back=-1,M.mode=12;break}if(64&Z){F.msg="invalid literal/length code",M.mode=30;break}M.extra=15&Z,M.mode=22;case 22:if(M.extra){for(Be=M.extra;te>>=M.extra,te-=M.extra,M.back+=M.extra}M.was=M.length,M.mode=23;case 23:for(;Z=(Ee=M.distcode[Ae&(1<>>16&255,ce=65535&Ee,!((At=Ee>>>24)<=te);){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>ye)])>>>16&255,ce=65535&Ee,!(ye+(At=Ee>>>24)<=te);){if(Ge===0)break e;Ge--,Ae+=z[ae++]<>>=ye,te-=ye,M.back+=ye}if(Ae>>>=At,te-=At,M.back+=At,64&Z){F.msg="invalid distance code",M.mode=30;break}M.offset=ce,M.extra=15&Z,M.mode=24;case 24:if(M.extra){for(Be=M.extra;te>>=M.extra,te-=M.extra,M.back+=M.extra}if(M.offset>M.dmax){F.msg="invalid distance too far back",M.mode=30;break}M.mode=25;case 25:if(Ye===0)break e;if(Ke=de-Ye,M.offset>Ke){if((Ke=M.offset-Ke)>M.whave&&M.sane){F.msg="invalid distance too far back",M.mode=30;break}le=Ke>M.wnext?(Ke-=M.wnext,M.wsize-Ke):M.wnext-Ke,Ke>M.length&&(Ke=M.length),Ce=M.window}else Ce=ue,le=Ne-M.offset,Ke=M.length;for(Yew?(B=le[Ce+j[Y]],te[he+j[Y]]):(B=96,0),H=1<>Ne)+(X-=H)]=Q<<24|B<<16|S|0,X!==0;);for(H=1<>=1;if(H!==0?(Ae&=H-1,Ae+=H):Ae=0,Y++,--de[F]==0){if(F===z)break;F=I[E+j[Y]]}if(ue>>7)]}function he(Ee,Me){Ee.pending_buf[Ee.pending++]=255&Me,Ee.pending_buf[Ee.pending++]=Me>>>8&255}function de(Ee,Me,yt){Ee.bi_valid>W-yt?(Ee.bi_buf|=Me<>W-Ee.bi_valid,Ee.bi_valid+=yt-W):(Ee.bi_buf|=Me<>>=1,yt<<=1,0<--Me;);return yt>>>1}function Ce(Ee,Me,yt){var pe,me,Re=new Array(j+1),Ze=0;for(pe=1;pe<=j;pe++)Re[pe]=Ze=Ze+yt[pe-1]<<1;for(me=0;me<=Me;me++){var ke=Ee[2*me+1];ke!==0&&(Ee[2*me]=le(Re[ke]++,ke))}}function At(Ee){var Me;for(Me=0;Me>1;1<=yt;yt--)ye(Ee,Re,yt);for(me=Pe;yt=Ee.heap[1],Ee.heap[1]=Ee.heap[Ee.heap_len--],ye(Ee,Re,1),pe=Ee.heap[1],Ee.heap[--Ee.heap_max]=yt,Ee.heap[--Ee.heap_max]=pe,Re[2*me]=Re[2*yt]+Re[2*pe],Ee.depth[me]=(Ee.depth[yt]>=Ee.depth[pe]?Ee.depth[yt]:Ee.depth[pe])+1,Re[2*yt+1]=Re[2*pe+1]=me,Ee.heap[1]=me++,ye(Ee,Re,1),2<=Ee.heap_len;);Ee.heap[--Ee.heap_max]=Ee.heap[1],function(Je,at){var Dt,St,hr,Wt,Ut,ur,Br=at.dyn_tree,fr=at.max_code,Mr=at.stat_desc.static_tree,er=at.stat_desc.has_stree,Tr=at.stat_desc.extra_bits,fn=at.stat_desc.extra_base,_n=at.stat_desc.max_length,dr=0;for(Wt=0;Wt<=j;Wt++)Je.bl_count[Wt]=0;for(Br[2*Je.heap[Je.heap_max]+1]=0,Dt=Je.heap_max+1;Dt>=7;me>>=1)if(1&_e&&ke.dyn_ltree[2*Pe]!==0)return g;if(ke.dyn_ltree[18]!==0||ke.dyn_ltree[20]!==0||ke.dyn_ltree[26]!==0)return p;for(Pe=32;Pe>>3,(Re=Ee.static_len+3+7>>>3)<=me&&(me=Re)):me=Re=yt+5,yt+4<=me&&Me!==-1?Be(Ee,Me,yt,pe):Ee.strategy===4||Re===me?(de(Ee,2+(pe?1:0),3),Ve(Ee,O,F)):(de(Ee,4+(pe?1:0),3),function(ke,Pe,_e,Je){var at;for(de(ke,Pe-257,5),de(ke,_e-1,5),de(ke,Je-4,4),at=0;at>>8&255,Ee.pending_buf[Ee.d_buf+2*Ee.last_lit+1]=255&Me,Ee.pending_buf[Ee.l_buf+Ee.last_lit]=255&yt,Ee.last_lit++,Me===0?Ee.dyn_ltree[2*yt]++:(Ee.matches++,Me--,Ee.dyn_ltree[2*(M[yt]+I+1)]++,Ee.dyn_dtree[2*te(Me)]++),Ee.last_lit===Ee.lit_bufsize-1},f._tr_align=function(Ee){var Me;de(Ee,2,3),Ke(Ee,X,O),(Me=Ee).bi_valid===16?(he(Me,Me.bi_buf),Me.bi_buf=0,Me.bi_valid=0):8<=Me.bi_valid&&(Me.pending_buf[Me.pending++]=255&Me.bi_buf,Me.bi_buf>>=8,Me.bi_valid-=8)}},{"../utils/common":41}],53:[function(A,h,f){h.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(A,h,f){(function(d){(function(g,p){if(!g.setImmediate){var m,v,y,I,E=1,k={},R=!1,T=g.document,j=Object.getPrototypeOf&&Object.getPrototypeOf(g);j=j&&j.setTimeout?j:g,m={}.toString.call(g.process)==="[object process]"?function(x){n.nextTick(function(){H(x)})}:function(){if(g.postMessage&&!g.importScripts){var x=!0,N=g.onmessage;return g.onmessage=function(){x=!1},g.postMessage("","*"),g.onmessage=N,x}}()?(I="setImmediate$"+Math.random()+"$",g.addEventListener?g.addEventListener("message",X,!1):g.attachEvent("onmessage",X),function(x){g.postMessage(I+x,"*")}):g.MessageChannel?((y=new MessageChannel).port1.onmessage=function(x){H(x.data)},function(x){y.port2.postMessage(x)}):T&&"onreadystatechange"in T.createElement("script")?(v=T.documentElement,function(x){var N=T.createElement("script");N.onreadystatechange=function(){H(x),N.onreadystatechange=null,v.removeChild(N),N=null},v.appendChild(N)}):function(x){setTimeout(H,0,x)},j.setImmediate=function(x){typeof x!="function"&&(x=new Function(""+x));for(var N=new Array(arguments.length-1),C=0;C"u"?d===void 0?this:d:self)}).call(this,a!==void 0?a:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}).call(this)}).call(this,e("_process"),mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(e,r,t){(function(n){(function(){var a=1/0,s="[object Symbol]",o=/[\\^$.*+?()[\]{}|]/g,i=RegExp(o.source),c=typeof n=="object"&&n&&n.Object===Object&&n,u=typeof self=="object"&&self&&self.Object===Object&&self,l=c||u||Function("return this")(),A=Object.prototype.toString,h=l.Symbol,f=h?h.prototype:void 0,d=f?f.toString:void 0;function g(I){if(typeof I=="string")return I;if(m(I))return d?d.call(I):"";var E=I+"";return E=="0"&&1/I==-a?"-0":E}function p(I){return!!I&&typeof I=="object"}function m(I){return typeof I=="symbol"||p(I)&&A.call(I)==s}function v(I){return I==null?"":g(I)}function y(I){return(I=v(I))&&i.test(I)?I.replace(o,"\\$&"):I}r.exports=y}).call(this)}).call(this,mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(e,r,t){(function(n){(function(){var a=200,s="Expected a function",o="__lodash_hash_undefined__",i=1,c=2,u=1/0,l=9007199254740991,A="[object Arguments]",h="[object Array]",f="[object Boolean]",d="[object Date]",g="[object Error]",p="[object Function]",m="[object GeneratorFunction]",v="[object Map]",y="[object Number]",I="[object Object]",E="[object Promise]",k="[object RegExp]",R="[object Set]",T="[object String]",j="[object Symbol]",W="[object WeakMap]",H="[object ArrayBuffer]",X="[object DataView]",x="[object Float64Array]",N="[object Int8Array]",C="[object Int16Array]",w="[object Int32Array]",Q="[object Uint8Array]",B="[object Uint8ClampedArray]",S="[object Uint16Array]",O="[object Uint32Array]",F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,M=/^\./,z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ue=/[\\^$.*+?()[\]{}|]/g,ae=/\\(\\)?/g,Ne=/^\[object .+?Constructor\]$/,Ge=/^(?:0|[1-9]\d*)$/,Ye={};Ye["[object Float32Array]"]=Ye[x]=Ye[N]=Ye[C]=Ye[w]=Ye[Q]=Ye[B]=Ye[S]=Ye[O]=!0,Ye[A]=Ye[h]=Ye[H]=Ye[f]=Ye[X]=Ye[d]=Ye[g]=Ye[p]=Ye[v]=Ye[y]=Ye[I]=Ye[k]=Ye[R]=Ye[T]=Ye[W]=!1;var Ae=typeof n=="object"&&n&&n.Object===Object&&n,te=typeof self=="object"&&self&&self.Object===Object&&self,he=Ae||te||Function("return this")(),de=typeof t=="object"&&t&&!t.nodeType&&t,Ke=de&&typeof r=="object"&&r&&!r.nodeType&&r,le=Ke&&Ke.exports===de&&Ae.process,Ce=function(){try{return le&&le.binding("util")}catch{}}(),At=Ce&&Ce.isTypedArray;function Z(ie,xe,tt,Bt){for(var Gt=-1,Xt=ie?ie.length:0;++Gt-1}function Ft(ie,xe){var tt=this.__data__,Bt=Na(tt,ie);return Bt<0?tt.push([ie,xe]):tt[Bt][1]=xe,this}function Lr(ie){var xe=-1,tt=ie?ie.length:0;for(this.clear();++xeqr))return!1;var Zn=Xt.get(ie);if(Zn&&Xt.get(xe))return Zn==xe;var Yn=-1,Xn=!0,ni=Gt&i?new Ro:void 0;for(Xt.set(ie,xe),Xt.set(xe,ie);++Yn-1&&ie%1==0&&ie-1&&ie%1==0&&ie<=l}function Qo(ie){var xe=typeof ie;return!!ie&&(xe=="object"||xe=="function")}function Ua(ie){return!!ie&&typeof ie=="object"}function ha(ie){return typeof ie=="symbol"||Ua(ie)&&_e.call(ie)==j}var ns=At?dt(At):ts;function vs(ie){return ie==null?"":ks(ie)}function G(ie,xe,tt){var Bt=ie==null?void 0:Wo(ie,xe);return Bt===void 0?tt:Bt}function J(ie,xe){return ie!=null&&vh(ie,xe,lh)}function oe(ie){return Aa(ie)?oA(ie):Mo(ie)}function Se(ie){return ie}function et(ie){return Jc(ie)?ye($e(ie)):Cc(ie)}r.exports=mr}).call(this)}).call(this,mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(e,r,t){var n="[object Boolean]",a=Object.prototype.toString;function s(i){return i===!0||i===!1||o(i)&&a.call(i)==n}function o(i){return!!i&&typeof i=="object"}r.exports=s},{}],445:[function(e,r,t){(function(n){(function(){var a=200,s="__lodash_hash_undefined__",o=1,i=2,c=9007199254740991,u="[object Arguments]",l="[object Array]",A="[object AsyncFunction]",h="[object Boolean]",f="[object Date]",d="[object Error]",g="[object Function]",p="[object GeneratorFunction]",m="[object Map]",v="[object Number]",y="[object Null]",I="[object Object]",E="[object Promise]",k="[object Proxy]",R="[object RegExp]",T="[object Set]",j="[object String]",W="[object Symbol]",H="[object Undefined]",X="[object WeakMap]",x="[object ArrayBuffer]",N="[object DataView]",C="[object Float64Array]",w="[object Int8Array]",Q="[object Int16Array]",B="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",F="[object Uint16Array]",Y="[object Uint32Array]",M=/[\\^$.*+?()[\]{}|]/g,z=/^\[object .+?Constructor\]$/,ue=/^(?:0|[1-9]\d*)$/,ae={};ae["[object Float32Array]"]=ae[C]=ae[w]=ae[Q]=ae[B]=ae[S]=ae[O]=ae[F]=ae[Y]=!0,ae[u]=ae[l]=ae[x]=ae[h]=ae[N]=ae[f]=ae[d]=ae[g]=ae[m]=ae[v]=ae[I]=ae[R]=ae[T]=ae[j]=ae[X]=!1;var Ne=typeof n=="object"&&n&&n.Object===Object&&n,Ge=typeof self=="object"&&self&&self.Object===Object&&self,Ye=Ne||Ge||Function("return this")(),Ae=typeof t=="object"&&t&&!t.nodeType&&t,te=Ae&&typeof r=="object"&&r&&!r.nodeType&&r,he=te&&te.exports===Ae,de=he&&Ne.process,Ke=function(){try{return de&&de.binding&&de.binding("util")}catch{}}(),le=Ke&&Ke.isTypedArray;function Ce($e,wt){for(var mr=-1,pn=$e==null?0:$e.length,ra=0,ui=[];++mr-1}function Lr($e,wt){var mr=this.__data__,pn=uu(mr,$e);return pn<0?(++this.size,mr.push([$e,wt])):mr[pn][1]=wt,this}function kn($e){var wt=-1,mr=$e==null?0:$e.length;for(this.clear();++wtAa))return!1;var Zi=ui.get($e);if(Zi&&ui.get(wt))return Zi==wt;var Yi=-1,Qo=!0,Ua=mr&i?new po:void 0;for(ui.set($e,wt),ui.set(wt,$e);++Yi-1&&$e%1==0&&$e-1&&$e%1==0&&$e<=c}function wl($e){var wt=typeof $e;return $e!=null&&(wt=="object"||wt=="function")}function hu($e){return $e!=null&&typeof $e=="object"}var Bl=le?ye(le):bl;function Ql($e){return xs($e)?Na($e):Ah($e)}function uA(){return[]}function rs(){return!1}r.exports=vh}).call(this)}).call(this,mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(e,r,t){(function(n){(function(){var a="[object AsyncFunction]",s="[object Function]",o="[object GeneratorFunction]",i="[object Null]",c="[object Proxy]",u="[object Undefined]",l=typeof n=="object"&&n&&n.Object===Object&&n,A=typeof self=="object"&&self&&self.Object===Object&&self,h=l||A||Function("return this")(),f=Object.prototype,d=f.hasOwnProperty,g=f.toString,p=h.Symbol,m=p?p.toStringTag:void 0;function v(R){return R==null?R===void 0?u:i:m&&m in Object(R)?y(R):I(R)}function y(R){var T=d.call(R,m),j=R[m];try{R[m]=void 0;var W=!0}catch{}var H=g.call(R);return W&&(T?R[m]=j:delete R[m]),H}function I(R){return g.call(R)}function E(R){if(!k(R))return!1;var T=v(R);return T==s||T==o||T==a||T==c}function k(R){var T=typeof R;return R!=null&&(T=="object"||T=="function")}r.exports=E}).call(this)}).call(this,mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(e,r,t){function n(a){return a==null}r.exports=n},{}],448:[function(e,r,t){function n(a){return a===void 0}r.exports=n},{}],449:[function(e,r,t){(function(n){(function(){var a=200,s="__lodash_hash_undefined__",o=1/0,i="[object Function]",c="[object GeneratorFunction]",u=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,A=typeof n=="object"&&n&&n.Object===Object&&n,h=typeof self=="object"&&self&&self.Object===Object&&self,f=A||h||Function("return this")();function d(_e,Je){return!(!_e||!_e.length)&&m(_e,Je,0)>-1}function g(_e,Je,at){for(var Dt=-1,St=_e?_e.length:0;++Dt-1}function he(_e,Je){var at=this.__data__,Dt=dt(at,_e);return Dt<0?at.push([_e,Je]):at[Dt][1]=Je,this}function de(_e){var Je=-1,at=_e?_e.length:0;for(this.clear();++Je=a){var Br=Je?null:pt(_e);if(Br)return k(Br);Wt=!1,St=y,ur=new ce}else ur=Je?[]:Ut;e:for(;++Dt>>32-d}function u(f,d,g,p,m,v,y){return c(f+(d&g|~d&p)+m+v|0,y)+d|0}function l(f,d,g,p,m,v,y){return c(f+(d&p|g&~p)+m+v|0,y)+d|0}function A(f,d,g,p,m,v,y){return c(f+(d^g^p)+m+v|0,y)+d|0}function h(f,d,g,p,m,v,y){return c(f+(g^(d|~p))+m+v|0,y)+d|0}n(i,a),i.prototype._update=function(){for(var f=o,d=0;d<16;++d)f[d]=this._block.readInt32LE(4*d);var g=this._a,p=this._b,m=this._c,v=this._d;g=u(g,p,m,v,f[0],3614090360,7),v=u(v,g,p,m,f[1],3905402710,12),m=u(m,v,g,p,f[2],606105819,17),p=u(p,m,v,g,f[3],3250441966,22),g=u(g,p,m,v,f[4],4118548399,7),v=u(v,g,p,m,f[5],1200080426,12),m=u(m,v,g,p,f[6],2821735955,17),p=u(p,m,v,g,f[7],4249261313,22),g=u(g,p,m,v,f[8],1770035416,7),v=u(v,g,p,m,f[9],2336552879,12),m=u(m,v,g,p,f[10],4294925233,17),p=u(p,m,v,g,f[11],2304563134,22),g=u(g,p,m,v,f[12],1804603682,7),v=u(v,g,p,m,f[13],4254626195,12),m=u(m,v,g,p,f[14],2792965006,17),g=l(g,p=u(p,m,v,g,f[15],1236535329,22),m,v,f[1],4129170786,5),v=l(v,g,p,m,f[6],3225465664,9),m=l(m,v,g,p,f[11],643717713,14),p=l(p,m,v,g,f[0],3921069994,20),g=l(g,p,m,v,f[5],3593408605,5),v=l(v,g,p,m,f[10],38016083,9),m=l(m,v,g,p,f[15],3634488961,14),p=l(p,m,v,g,f[4],3889429448,20),g=l(g,p,m,v,f[9],568446438,5),v=l(v,g,p,m,f[14],3275163606,9),m=l(m,v,g,p,f[3],4107603335,14),p=l(p,m,v,g,f[8],1163531501,20),g=l(g,p,m,v,f[13],2850285829,5),v=l(v,g,p,m,f[2],4243563512,9),m=l(m,v,g,p,f[7],1735328473,14),g=A(g,p=l(p,m,v,g,f[12],2368359562,20),m,v,f[5],4294588738,4),v=A(v,g,p,m,f[8],2272392833,11),m=A(m,v,g,p,f[11],1839030562,16),p=A(p,m,v,g,f[14],4259657740,23),g=A(g,p,m,v,f[1],2763975236,4),v=A(v,g,p,m,f[4],1272893353,11),m=A(m,v,g,p,f[7],4139469664,16),p=A(p,m,v,g,f[10],3200236656,23),g=A(g,p,m,v,f[13],681279174,4),v=A(v,g,p,m,f[0],3936430074,11),m=A(m,v,g,p,f[3],3572445317,16),p=A(p,m,v,g,f[6],76029189,23),g=A(g,p,m,v,f[9],3654602809,4),v=A(v,g,p,m,f[12],3873151461,11),m=A(m,v,g,p,f[15],530742520,16),g=h(g,p=A(p,m,v,g,f[2],3299628645,23),m,v,f[0],4096336452,6),v=h(v,g,p,m,f[7],1126891415,10),m=h(m,v,g,p,f[14],2878612391,15),p=h(p,m,v,g,f[5],4237533241,21),g=h(g,p,m,v,f[12],1700485571,6),v=h(v,g,p,m,f[3],2399980690,10),m=h(m,v,g,p,f[10],4293915773,15),p=h(p,m,v,g,f[1],2240044497,21),g=h(g,p,m,v,f[8],1873313359,6),v=h(v,g,p,m,f[15],4264355552,10),m=h(m,v,g,p,f[6],2734768916,15),p=h(p,m,v,g,f[13],1309151649,21),g=h(g,p,m,v,f[4],4149444226,6),v=h(v,g,p,m,f[11],3174756917,10),m=h(m,v,g,p,f[2],718787259,15),p=h(p,m,v,g,f[9],3951481745,21),this._a=this._a+g|0,this._b=this._b+p|0,this._c=this._c+m|0,this._d=this._d+v|0},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var f=s.allocUnsafe(16);return f.writeInt32LE(this._a,0),f.writeInt32LE(this._b,4),f.writeInt32LE(this._c,8),f.writeInt32LE(this._d,12),f},r.exports=i},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(e,r,t){var n=e("bn.js"),a=e("brorand");function s(o){this.rand=o||new a.Rand}r.exports=s,s.create=function(o){return new s(o)},s.prototype._randbelow=function(o){var i=o.bitLength(),c=Math.ceil(i/8);do var u=new n(this.rand.generate(c));while(u.cmp(o)>=0);return u},s.prototype._randrange=function(o,i){var c=i.sub(o);return o.add(this._randbelow(c))},s.prototype.test=function(o,i,c){var u=o.bitLength(),l=n.mont(o),A=new n(1).toRed(l);i||(i=Math.max(1,u/48|0));for(var h=o.subn(1),f=0;!h.testn(f);f++);for(var d=o.shrn(f),g=h.toRed(l),p=!0;i>0;i--){var m=this._randrange(new n(2),h);c&&c(m);var v=m.toRed(l).redPow(d);if(v.cmp(A)!==0&&v.cmp(g)!==0){for(var y=1;y0;i--){var g=this._randrange(new n(2),A),p=o.gcd(g);if(p.cmpn(1)!==0)return p;var m=g.toRed(u).redPow(f);if(m.cmp(l)!==0&&m.cmp(d)!==0){for(var v=1;v>8,f=255&A;h?u.push(h,f):u.push(f)}return u}function s(i){return i.length===1?"0"+i:i}function o(i){for(var c="",u=0;u=6?"utf-8":"binary":"utf-8",r.exports=s}).call(this)}).call(this,e("_process"),mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(e,r,t){var n=Math.pow(2,30)-1;r.exports=function(a,s){if(typeof a!="number")throw new TypeError("Iterations not a number");if(a<0)throw new TypeError("Bad iterations");if(typeof s!="number")throw new TypeError("Key length not a number");if(s<0||s>n||s!=s)throw new TypeError("Bad key length")}},{}],464:[function(e,r,t){var n=e("create-hash/md5"),a=e("ripemd160"),s=e("sha.js"),o=e("safe-buffer").Buffer,i=e("./precondition"),c=e("./default-encoding"),u=e("./to-buffer"),l=o.alloc(128),A={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(g,p,m){var v=f(g),y=g==="sha512"||g==="sha384"?128:64;p.length>y?p=v(p):p.length1)for(var I=1;I=g.length){y++;break}var I=g.slice(2,v-1);if((m.toString("hex")!=="0002"&&!p||m.toString("hex")!=="0001"&&p)&&y++,I.length<8&&y++,y)throw new Error("decryption error");return g.slice(v)}function f(d,g){d=l.from(d),g=l.from(g);var p=0,m=d.length;d.length!==g.length&&(p++,m=Math.min(d.length,g.length));for(var v=-1;++vI||new o(g).cmp(y.modulus)>=0)throw new Error("decryption error");v=p?u(new o(g),y):i(g,y);var E=l.alloc(I-v.length);if(v=l.concat([E,v],I),m===4)return A(y,v);if(m===1)return h(y,v,p);if(m===3)return v;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(e,r,t){var n=e("parse-asn1"),a=e("randombytes"),s=e("create-hash"),o=e("./mgf"),i=e("./xor"),c=e("bn.js"),u=e("./withPublic"),l=e("browserify-rsa"),A=e("safe-buffer").Buffer;function h(g,p){var m=g.modulus.byteLength(),v=p.length,y=s("sha1").update(A.alloc(0)).digest(),I=y.length,E=2*I;if(v>m-E-2)throw new Error("message too long");var k=A.alloc(m-v-E-2),R=m-I-1,T=a(I),j=i(A.concat([y,k,A.alloc(1,1),p],R),o(T,R)),W=i(T,o(j,I));return new c(A.concat([A.alloc(1),W,j],m))}function f(g,p,m){var v,y=p.length,I=g.modulus.byteLength();if(y>I-11)throw new Error("message too long");return v=m?A.alloc(I-y-3,255):d(I-y-3),new c(A.concat([A.from([0,m?1:2]),v,A.alloc(1),p],I))}function d(g){for(var p,m=A.allocUnsafe(g),v=0,y=a(2*g),I=0;v=0)throw new Error("data too long for modulus")}return m?l(y,I):u(y,I)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(e,r,t){var n=e("bn.js"),a=e("safe-buffer").Buffer;function s(o,i){return a.from(o.toRed(n.mont(i.modulus)).redPow(new n(i.publicExponent)).fromRed().toArray())}r.exports=s},{"bn.js":470,"safe-buffer":494}],474:[function(e,r,t){r.exports=function(n,a){for(var s=n.length,o=-1;++oo)throw new RangeError("requested too many random bytes");var f=c.allocUnsafe(A);if(A>0)if(A>s)for(var d=0;dA||m<0)throw new TypeError("offset must be a uint32");if(m>u||m>v)throw new RangeError("offset out of range")}function f(m,v,y){if(typeof m!="number"||m!=m)throw new TypeError("size must be a number");if(m>A||m<0)throw new TypeError("size must be a uint32");if(m+v>y||m>u)throw new RangeError("buffer too small")}function d(m,v,y,I){if(!(c.isBuffer(m)||m instanceof a.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof v=="function")I=v,v=0,y=m.length;else if(typeof y=="function")I=y,y=m.length-v;else if(typeof I!="function")throw new TypeError('"cb" argument must be a function');return h(v,m.length),f(y,v,m.length),g(m,v,y,I)}function g(m,v,y,I){if(n.browser){var E=m.buffer,k=new Uint8Array(E,v,y);return l.getRandomValues(k),I?void n.nextTick(function(){I(null,m)}):m}if(!I)return i(y).copy(m,v),m;i(y,function(R,T){if(R)return I(R);T.copy(m,v),I(null,m)})}function p(m,v,y){if(v===void 0&&(v=0),!(c.isBuffer(m)||m instanceof a.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(v,m.length),y===void 0&&(y=m.length-v),f(y,v,m.length),g(m,v,y)}l&&l.getRandomValues||!n.browser?(t.randomFill=d,t.randomFillSync=p):(t.randomFill=s,t.randomFillSync=s)}).call(this)}).call(this,e("_process"),mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(e,r,t){function n(l,A){l.prototype=Object.create(A.prototype),l.prototype.constructor=l,l.__proto__=A}var a={};function s(l,A,h){function f(g,p,m){return typeof A=="string"?A:A(g,p,m)}h||(h=Error);var d=function(g){function p(m,v,y){return g.call(this,f(m,v,y))||this}return n(p,g),p}(h);d.prototype.name=h.name,d.prototype.code=l,a[l]=d}function o(l,A){if(Array.isArray(l)){var h=l.length;return l=l.map(function(f){return String(f)}),h>2?"one of ".concat(A," ").concat(l.slice(0,h-1).join(", "),", or ")+l[h-1]:h===2?"one of ".concat(A," ").concat(l[0]," or ").concat(l[1]):"of ".concat(A," ").concat(l[0])}return"of ".concat(A," ").concat(String(l))}function i(l,A,h){return l.substr(!h||h<0?0:+h,A.length)===A}function c(l,A,h){return(h===void 0||h>l.length)&&(h=l.length),l.substring(h-A.length,h)===A}function u(l,A,h){return typeof h!="number"&&(h=0),!(h+A.length>l.length)&&l.indexOf(A,h)!==-1}s("ERR_INVALID_OPT_VALUE",function(l,A){return'The value "'+A+'" is invalid for option "'+l+'"'},TypeError),s("ERR_INVALID_ARG_TYPE",function(l,A,h){var f,d;if(typeof A=="string"&&i(A,"not ")?(f="must not be",A=A.replace(/^not /,"")):f="must be",c(l," argument"))d="The ".concat(l," ").concat(f," ").concat(o(A,"type"));else{var g=u(l,".")?"property":"argument";d='The "'.concat(l,'" ').concat(g," ").concat(f," ").concat(o(A,"type"))}return d+=". Received type ".concat(typeof h)},TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r.exports.codes=a},{}],478:[function(e,r,t){(function(n){(function(){var a=Object.keys||function(f){var d=[];for(var g in f)d.push(g);return d};r.exports=l;var s=e("./_stream_readable"),o=e("./_stream_writable");e("inherits")(l,s);for(var i=a(o.prototype),c=0;c0)if(typeof Ce=="string"||Ve.objectMode||Object.getPrototypeOf(Ce)===c.prototype||(Ce=l(Ce)),Z)Ve.endEmitted?j(le,new T):C(le,Ve,Ce,!0);else if(Ve.ended)j(le,new k);else{if(Ve.destroyed)return!1;Ve.reading=!1,Ve.decoder&&!At?(Ce=Ve.decoder.write(Ce),Ve.objectMode||Ce.length!==0?C(le,Ve,Ce,!1):M(le,Ve)):C(le,Ve,Ce,!1)}else Z||(Ve.reading=!1,M(le,Ve));return!Ve.ended&&(Ve.length=Q?le=Q:(le--,le|=le>>>1,le|=le>>>2,le|=le>>>4,le|=le>>>8,le|=le>>>16,le++),le}function S(le,Ce){return le<=0||Ce.length===0&&Ce.ended?0:Ce.objectMode?1:le!=le?Ce.flowing&&Ce.length?Ce.buffer.head.data.length:Ce.length:(le>Ce.highWaterMark&&(Ce.highWaterMark=B(le)),le<=Ce.length?le:Ce.ended?Ce.length:(Ce.needReadable=!0,0))}function O(le,Ce){if(h("onEofChunk"),!Ce.ended){if(Ce.decoder){var At=Ce.decoder.end();At&&At.length&&(Ce.buffer.push(At),Ce.length+=Ce.objectMode?1:At.length)}Ce.ended=!0,Ce.sync?F(le):(Ce.needReadable=!1,Ce.emittedReadable||(Ce.emittedReadable=!0,Y(le)))}}function F(le){var Ce=le._readableState;h("emitReadable",Ce.needReadable,Ce.emittedReadable),Ce.needReadable=!1,Ce.emittedReadable||(h("emitReadable",Ce.flowing),Ce.emittedReadable=!0,n.nextTick(Y,le))}function Y(le){var Ce=le._readableState;h("emitReadable_",Ce.destroyed,Ce.length,Ce.ended),Ce.destroyed||!Ce.length&&!Ce.ended||(le.emit("readable"),Ce.emittedReadable=!1),Ce.needReadable=!Ce.flowing&&!Ce.ended&&Ce.length<=Ce.highWaterMark,Ae(le)}function M(le,Ce){Ce.readingMore||(Ce.readingMore=!0,n.nextTick(z,le,Ce))}function z(le,Ce){for(;!Ce.reading&&!Ce.ended&&(Ce.length0,Ce.resumeScheduled&&!Ce.paused?Ce.flowing=!0:le.listenerCount("data")>0&&le.resume()}function Ne(le){h("readable nexttick read 0"),le.read(0)}function Ge(le,Ce){Ce.resumeScheduled||(Ce.resumeScheduled=!0,n.nextTick(Ye,le,Ce))}function Ye(le,Ce){h("resume",Ce.reading),Ce.reading||le.read(0),Ce.resumeScheduled=!1,le.emit("resume"),Ae(le),Ce.flowing&&!Ce.reading&&le.read(0)}function Ae(le){var Ce=le._readableState;for(h("flow",Ce.flowing);Ce.flowing&&le.read()!==null;);}function te(le,Ce){return Ce.length===0?null:(Ce.objectMode?At=Ce.buffer.shift():!le||le>=Ce.length?(At=Ce.decoder?Ce.buffer.join(""):Ce.buffer.length===1?Ce.buffer.first():Ce.buffer.concat(Ce.length),Ce.buffer.clear()):At=Ce.buffer.consume(le,Ce.decoder),At);var At}function he(le){var Ce=le._readableState;h("endReadable",Ce.endEmitted),Ce.endEmitted||(Ce.ended=!0,n.nextTick(de,Ce,le))}function de(le,Ce){if(h("endReadableNT",le.endEmitted,le.length),!le.endEmitted&&le.length===0&&(le.endEmitted=!0,Ce.readable=!1,Ce.emit("end"),le.autoDestroy)){var At=Ce._writableState;(!At||At.autoDestroy&&At.finished)&&Ce.destroy()}}function Ke(le,Ce){for(var At=0,Z=le.length;At=Ce.highWaterMark:Ce.length>0)||Ce.ended))return h("read: emitReadable",Ce.length,Ce.ended),Ce.length===0&&Ce.ended?he(this):F(this),null;if((le=S(le,Ce))===0&&Ce.ended)return Ce.length===0&&he(this),null;var Z,ce=Ce.needReadable;return h("need readable",ce),(Ce.length===0||Ce.length-le0?te(le,Ce):null)===null?(Ce.needReadable=Ce.length<=Ce.highWaterMark,le=0):(Ce.length-=le,Ce.awaitDrain=0),Ce.length===0&&(Ce.ended||(Ce.needReadable=!0),At!==le&&Ce.ended&&he(this)),Z!==null&&this.emit("data",Z),Z},x.prototype._read=function(le){j(this,new R("_read()"))},x.prototype.pipe=function(le,Ce){var At=this,Z=this._readableState;switch(Z.pipesCount){case 0:Z.pipes=le;break;case 1:Z.pipes=[Z.pipes,le];break;default:Z.pipes.push(le)}Z.pipesCount+=1,h("pipe count=%d opts=%j",Z.pipesCount,Ce);var ce=Ce&&Ce.end===!1||le===n.stdout||le===n.stderr?yt:Ve;function ye(pe,me){h("onunpipe"),pe===At&&me&&me.hasUnpiped===!1&&(me.hasUnpiped=!0,ot())}function Ve(){h("onend"),le.end()}Z.endEmitted?n.nextTick(ce):At.once("end",ce),le.on("unpipe",ye);var dt=ue(At);le.on("drain",dt);var re=!1;function ot(){h("cleanup"),le.removeListener("close",Ee),le.removeListener("finish",Me),le.removeListener("drain",dt),le.removeListener("error",Be),le.removeListener("unpipe",ye),At.removeListener("end",Ve),At.removeListener("end",yt),At.removeListener("data",pt),re=!0,!Z.awaitDrain||le._writableState&&!le._writableState.needDrain||dt()}function pt(pe){h("ondata");var me=le.write(pe);h("dest.write",me),me===!1&&((Z.pipesCount===1&&Z.pipes===le||Z.pipesCount>1&&Ke(Z.pipes,le)!==-1)&&!re&&(h("false write response, pause",Z.awaitDrain),Z.awaitDrain++),At.pause())}function Be(pe){h("onerror",pe),yt(),le.removeListener("error",Be),o(le,"error")===0&&j(le,pe)}function Ee(){le.removeListener("finish",Me),yt()}function Me(){h("onfinish"),le.removeListener("close",Ee),yt()}function yt(){h("unpipe"),At.unpipe(le)}return At.on("data",pt),H(le,"error",Be),le.once("close",Ee),le.once("finish",Me),le.emit("pipe",At),Z.flowing||(h("pipe resume"),At.resume()),le},x.prototype.unpipe=function(le){var Ce=this._readableState,At={hasUnpiped:!1};if(Ce.pipesCount===0)return this;if(Ce.pipesCount===1)return le&&le!==Ce.pipes||(le||(le=Ce.pipes),Ce.pipes=null,Ce.pipesCount=0,Ce.flowing=!1,le&&le.emit("unpipe",this,At)),this;if(!le){var Z=Ce.pipes,ce=Ce.pipesCount;Ce.pipes=null,Ce.pipesCount=0,Ce.flowing=!1;for(var ye=0;ye0,Z.flowing!==!1&&this.resume()):le==="readable"&&(Z.endEmitted||Z.readableListening||(Z.readableListening=Z.needReadable=!0,Z.flowing=!1,Z.emittedReadable=!1,h("on readable",Z.length,Z.reading),Z.length?F(this):Z.reading||n.nextTick(Ne,this))),At},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(le,Ce){var At=i.prototype.removeListener.call(this,le,Ce);return le==="readable"&&n.nextTick(ae,this),At},x.prototype.removeAllListeners=function(le){var Ce=i.prototype.removeAllListeners.apply(this,arguments);return le!=="readable"&&le!==void 0||n.nextTick(ae,this),Ce},x.prototype.resume=function(){var le=this._readableState;return le.flowing||(h("resume"),le.flowing=!le.readableListening,Ge(this,le)),le.paused=!1,this},x.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(le){var Ce=this,At=this._readableState,Z=!1;for(var ce in le.on("end",function(){if(h("wrapped end"),At.decoder&&!At.ended){var Ve=At.decoder.end();Ve&&Ve.length&&Ce.push(Ve)}Ce.push(null)}),le.on("data",function(Ve){h("wrapped data"),At.decoder&&(Ve=At.decoder.write(Ve)),At.objectMode&&Ve==null||(At.objectMode||Ve&&Ve.length)&&(Ce.push(Ve)||(Z=!0,le.pause()))}),le)this[ce]===void 0&&typeof le[ce]=="function"&&(this[ce]=function(Ve){return function(){return le[Ve].apply(le,arguments)}}(ce));for(var ye=0;ye-1))throw new T(Ae);return this._writableState.defaultEncoding=Ae,this},Object.defineProperty(X.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),X.prototype._write=function(Ae,te,he){he(new v("_write()"))},X.prototype._writev=null,X.prototype.end=function(Ae,te,he){var de=this._writableState;return typeof Ae=="function"?(he=Ae,Ae=null,te=null):typeof te=="function"&&(he=te,te=null),Ae!=null&&this.write(Ae,te),de.corked&&(de.corked=1,this.uncork()),de.ending||Ge(this,de,he),this},Object.defineProperty(X.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Ae){this._writableState&&(this._writableState.destroyed=Ae)}}),X.prototype.destroy=d.destroy,X.prototype._undestroy=d.undestroy,X.prototype._destroy=function(Ae,te){te(Ae)}}).call(this)}).call(this,e("_process"),mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,inherits:440,"util-deprecate":524}],483:[function(e,r,t){(function(n){(function(){var a;function s(R,T,j){return(T=o(T))in R?Object.defineProperty(R,T,{value:j,enumerable:!0,configurable:!0,writable:!0}):R[T]=j,R}function o(R){var T=i(R,"string");return typeof T=="symbol"?T:String(T)}function i(R,T){if(typeof R!="object"||R===null)return R;var j=R[Symbol.toPrimitive];if(j!==void 0){var W=j.call(R,T||"default");if(typeof W!="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return(T==="string"?String:Number)(R)}var c=e("./end-of-stream"),u=Symbol("lastResolve"),l=Symbol("lastReject"),A=Symbol("error"),h=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),g=Symbol("stream");function p(R,T){return{value:R,done:T}}function m(R){var T=R[u];if(T!==null){var j=R[g].read();j!==null&&(R[f]=null,R[u]=null,R[l]=null,T(p(j,!1)))}}function v(R){n.nextTick(m,R)}function y(R,T){return function(j,W){R.then(function(){T[h]?j(p(void 0,!0)):T[d](j,W)},W)}}var I=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((s(a={get stream(){return this[g]},next:function(){var R=this,T=this[A];if(T!==null)return Promise.reject(T);if(this[h])return Promise.resolve(p(void 0,!0));if(this[g].destroyed)return new Promise(function(X,x){n.nextTick(function(){R[A]?x(R[A]):X(p(void 0,!0))})});var j,W=this[f];if(W)j=new Promise(y(W,this));else{var H=this[g].read();if(H!==null)return Promise.resolve(p(H,!1));j=new Promise(this[d])}return this[f]=j,j}},Symbol.asyncIterator,function(){return this}),s(a,"return",function(){var R=this;return new Promise(function(T,j){R[g].destroy(null,function(W){W?j(W):T(p(void 0,!0))})})}),a),I),k=function(R){var T,j=Object.create(E,(s(T={},g,{value:R,writable:!0}),s(T,u,{value:null,writable:!0}),s(T,l,{value:null,writable:!0}),s(T,A,{value:null,writable:!0}),s(T,h,{value:R._readableState.endEmitted,writable:!0}),s(T,d,{value:function(W,H){var X=j[g].read();X?(j[f]=null,j[u]=null,j[l]=null,W(p(X,!1))):(j[u]=W,j[l]=H)},writable:!0}),T));return j[f]=null,c(R,function(W){if(W&&W.code!=="ERR_STREAM_PREMATURE_CLOSE"){var H=j[l];return H!==null&&(j[f]=null,j[u]=null,j[l]=null,H(W)),void(j[A]=W)}var X=j[u];X!==null&&(j[f]=null,j[u]=null,j[l]=null,X(p(void 0,!0))),j[h]=!0}),R.on("readable",v.bind(null,j)),j};r.exports=k}).call(this)}).call(this,e("_process"))},{"./end-of-stream":486,_process:467}],484:[function(e,r,t){function n(g,p){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(g);p&&(v=v.filter(function(y){return Object.getOwnPropertyDescriptor(g,y).enumerable})),m.push.apply(m,v)}return m}function a(g){for(var p=1;p0?this.tail.next=m:this.head=m,this.tail=m,++this.length}},{key:"unshift",value:function(p){var m={data:p,next:this.head};this.length===0&&(this.tail=m),this.head=m,++this.length}},{key:"shift",value:function(){if(this.length!==0){var p=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,p}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(p){if(this.length===0)return"";for(var m=this.head,v=""+m.data;m=m.next;)v+=p+m.data;return v}},{key:"concat",value:function(p){if(this.length===0)return A.alloc(0);for(var m=A.allocUnsafe(p>>>0),v=this.head,y=0;v;)d(v.data,m,y),y+=v.data.length,v=v.next;return m}},{key:"consume",value:function(p,m){var v;return pI.length?I.length:p;if(E===I.length?y+=I:y+=I.slice(0,p),(p-=E)==0){E===I.length?(++v,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=I.slice(E));break}++v}return this.length-=v,y}},{key:"_getBuffer",value:function(p){var m=A.allocUnsafe(p),v=this.head,y=1;for(v.data.copy(m),p-=v.data.length;v=v.next;){var I=v.data,E=p>I.length?I.length:p;if(I.copy(m,m.length-p,0,E),(p-=E)==0){E===I.length?(++y,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=I.slice(E));break}++y}return this.length-=y,m}},{key:f,value:function(p,m){return h(this,a(a({},m),{},{depth:0,customInspect:!1}))}}]),g}()},{buffer:220,util:188}],485:[function(e,r,t){(function(n){(function(){function a(l,A){var h=this,f=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return f||d?(A?A(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(c,this,l)):n.nextTick(c,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(g){!A&&g?h._writableState?h._writableState.errorEmitted?n.nextTick(o,h):(h._writableState.errorEmitted=!0,n.nextTick(s,h,g)):n.nextTick(s,h,g):A?(n.nextTick(o,h),A(g)):n.nextTick(o,h)}),this)}function s(l,A){c(l,A),o(l)}function o(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function c(l,A){l.emit("error",A)}function u(l,A){var h=l._readableState,f=l._writableState;h&&h.autoDestroy||f&&f.autoDestroy?l.destroy(A):l.emit("error",A)}r.exports={destroy:a,undestroy:i,errorOrDestroy:u}}).call(this)}).call(this,e("_process"))},{_process:467}],486:[function(e,r,t){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function a(c){var u=!1;return function(){if(!u){u=!0;for(var l=arguments.length,A=new Array(l),h=0;h0,function(T){v||(v=T),T&&I.forEach(A),R||(I.forEach(A),y(v))})});return p.reduce(h)}r.exports=d},{"../../../errors":477,"./end-of-stream":486}],489:[function(e,r,t){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;function a(o,i,c){return o.highWaterMark!=null?o.highWaterMark:i?o[c]:null}function s(o,i,c,u){var l=a(i,u,c);if(l!=null){if(!isFinite(l)||Math.floor(l)!==l||l<0)throw new n(u?c:"highWaterMark",l);return Math.floor(l)}return o.objectMode?16:16384}r.exports={getHighWaterMark:s}},{"../../../errors":477}],490:[function(e,r,t){r.exports=e("events").EventEmitter},{events:422}],491:[function(e,r,t){(t=r.exports=e("./lib/_stream_readable.js")).Stream=t,t.Readable=t,t.Writable=e("./lib/_stream_writable.js"),t.Duplex=e("./lib/_stream_duplex.js"),t.Transform=e("./lib/_stream_transform.js"),t.PassThrough=e("./lib/_stream_passthrough.js"),t.finished=e("./lib/internal/streams/end-of-stream.js"),t.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(e,r,t){var n=function(a){var s,o=Object.prototype,i=o.hasOwnProperty,c=Object.defineProperty||function(F,Y,M){F[Y]=M.value},u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",A=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function f(F,Y,M){return Object.defineProperty(F,Y,{value:M,enumerable:!0,configurable:!0,writable:!0}),F[Y]}try{f({},"")}catch{f=function(Y,M,z){return Y[M]=z}}function d(F,Y,M,z){var ue=Y&&Y.prototype instanceof E?Y:E,ae=Object.create(ue.prototype),Ne=new B(z||[]);return c(ae,"_invoke",{value:N(F,M,Ne)}),ae}function g(F,Y,M){try{return{type:"normal",arg:F.call(Y,M)}}catch(z){return{type:"throw",arg:z}}}a.wrap=d;var p="suspendedStart",m="suspendedYield",v="executing",y="completed",I={};function E(){}function k(){}function R(){}var T={};f(T,l,function(){return this});var j=Object.getPrototypeOf,W=j&&j(j(S([])));W&&W!==o&&i.call(W,l)&&(T=W);var H=R.prototype=E.prototype=Object.create(T);function X(F){["next","throw","return"].forEach(function(Y){f(F,Y,function(M){return this._invoke(Y,M)})})}function x(F,Y){function M(ae,Ne,Ge,Ye){var Ae=g(F[ae],F,Ne);if(Ae.type!=="throw"){var te=Ae.arg,he=te.value;return he&&typeof he=="object"&&i.call(he,"__await")?Y.resolve(he.__await).then(function(de){M("next",de,Ge,Ye)},function(de){M("throw",de,Ge,Ye)}):Y.resolve(he).then(function(de){te.value=de,Ge(te)},function(de){return M("throw",de,Ge,Ye)})}Ye(Ae.arg)}var z;function ue(ae,Ne){function Ge(){return new Y(function(Ye,Ae){M(ae,Ne,Ye,Ae)})}return z=z?z.then(Ge,Ge):Ge()}c(this,"_invoke",{value:ue})}function N(F,Y,M){var z=p;return function(ue,ae){if(z===v)throw new Error("Generator is already running");if(z===y){if(ue==="throw")throw ae;return O()}for(M.method=ue,M.arg=ae;;){var Ne=M.delegate;if(Ne){var Ge=C(Ne,M);if(Ge){if(Ge===I)continue;return Ge}}if(M.method==="next")M.sent=M._sent=M.arg;else if(M.method==="throw"){if(z===p)throw z=y,M.arg;M.dispatchException(M.arg)}else M.method==="return"&&M.abrupt("return",M.arg);z=v;var Ye=g(F,Y,M);if(Ye.type==="normal"){if(z=M.done?y:m,Ye.arg===I)continue;return{value:Ye.arg,done:M.done}}Ye.type==="throw"&&(z=y,M.method="throw",M.arg=Ye.arg)}}}function C(F,Y){var M=Y.method,z=F.iterator[M];if(z===s)return Y.delegate=null,M==="throw"&&F.iterator.return&&(Y.method="return",Y.arg=s,C(F,Y),Y.method==="throw")||M!=="return"&&(Y.method="throw",Y.arg=new TypeError("The iterator does not provide a '"+M+"' method")),I;var ue=g(z,F.iterator,Y.arg);if(ue.type==="throw")return Y.method="throw",Y.arg=ue.arg,Y.delegate=null,I;var ae=ue.arg;return ae?ae.done?(Y[F.resultName]=ae.value,Y.next=F.nextLoc,Y.method!=="return"&&(Y.method="next",Y.arg=s),Y.delegate=null,I):ae:(Y.method="throw",Y.arg=new TypeError("iterator result is not an object"),Y.delegate=null,I)}function w(F){var Y={tryLoc:F[0]};1 in F&&(Y.catchLoc=F[1]),2 in F&&(Y.finallyLoc=F[2],Y.afterLoc=F[3]),this.tryEntries.push(Y)}function Q(F){var Y=F.completion||{};Y.type="normal",delete Y.arg,F.completion=Y}function B(F){this.tryEntries=[{tryLoc:"root"}],F.forEach(w,this),this.reset(!0)}function S(F){if(F){var Y=F[l];if(Y)return Y.call(F);if(typeof F.next=="function")return F;if(!isNaN(F.length)){var M=-1,z=function ue(){for(;++M=0;--z){var ue=this.tryEntries[z],ae=ue.completion;if(ue.tryLoc==="root")return M("end");if(ue.tryLoc<=this.prev){var Ne=i.call(ue,"catchLoc"),Ge=i.call(ue,"finallyLoc");if(Ne&&Ge){if(this.prev=0;--M){var z=this.tryEntries[M];if(z.tryLoc<=this.prev&&i.call(z,"finallyLoc")&&this.prev=0;--Y){var M=this.tryEntries[Y];if(M.finallyLoc===F)return this.complete(M.completion,M.afterLoc),Q(M),I}},catch:function(F){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var M=this.tryEntries[Y];if(M.tryLoc===F){var z=M.completion;if(z.type==="throw"){var ue=z.arg;Q(M)}return ue}}throw new Error("illegal catch attempt")},delegateYield:function(F,Y,M){return this.delegate={iterator:S(F),resultName:Y,nextLoc:M},this.method==="next"&&(this.arg=s),I}},a}(typeof r=="object"?r.exports:{});try{regeneratorRuntime=n}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},{}],493:[function(e,r,t){var n=e("buffer").Buffer,a=e("inherits"),s=e("hash-base"),o=new Array(16),i=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],A=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function f(){s.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(I,E){return I<>>32-E}function g(I,E,k,R,T,j,W,H){return d(I+(E^k^R)+j+W|0,H)+T|0}function p(I,E,k,R,T,j,W,H){return d(I+(E&k|~E&R)+j+W|0,H)+T|0}function m(I,E,k,R,T,j,W,H){return d(I+((E|~k)^R)+j+W|0,H)+T|0}function v(I,E,k,R,T,j,W,H){return d(I+(E&R|k&~R)+j+W|0,H)+T|0}function y(I,E,k,R,T,j,W,H){return d(I+(E^(k|~R))+j+W|0,H)+T|0}a(f,s),f.prototype._update=function(){for(var I=o,E=0;E<16;++E)I[E]=this._block.readInt32LE(4*E);for(var k=0|this._a,R=0|this._b,T=0|this._c,j=0|this._d,W=0|this._e,H=0|this._a,X=0|this._b,x=0|this._c,N=0|this._d,C=0|this._e,w=0;w<80;w+=1){var Q,B;w<16?(Q=g(k,R,T,j,W,I[i[w]],A[0],u[w]),B=y(H,X,x,N,C,I[c[w]],h[0],l[w])):w<32?(Q=p(k,R,T,j,W,I[i[w]],A[1],u[w]),B=v(H,X,x,N,C,I[c[w]],h[1],l[w])):w<48?(Q=m(k,R,T,j,W,I[i[w]],A[2],u[w]),B=m(H,X,x,N,C,I[c[w]],h[2],l[w])):w<64?(Q=v(k,R,T,j,W,I[i[w]],A[3],u[w]),B=p(H,X,x,N,C,I[c[w]],h[3],l[w])):(Q=y(k,R,T,j,W,I[i[w]],A[4],u[w]),B=g(H,X,x,N,C,I[c[w]],h[4],l[w])),k=W,W=j,j=d(T,10),T=R,R=Q,H=C,C=N,N=d(x,10),x=X,X=B}var S=this._b+T+N|0;this._b=this._c+j+C|0,this._c=this._d+W+H|0,this._d=this._e+k+X|0,this._e=this._a+R+x|0,this._a=S},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var I=n.alloc?n.alloc(20):new n(20);return I.writeInt32LE(this._a,0),I.writeInt32LE(this._b,4),I.writeInt32LE(this._c,8),I.writeInt32LE(this._d,12),I.writeInt32LE(this._e,16),I},r.exports=f},{buffer:220,"hash-base":425,inherits:440}],494:[function(e,r,t){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var n=e("buffer"),a=n.Buffer;function s(i,c){for(var u in i)c[u]=i[u]}function o(i,c,u){return a(i,c,u)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?r.exports=n:(s(n,t),t.Buffer=o),o.prototype=Object.create(a.prototype),s(a,o),o.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return a(i,c,u)},o.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var l=a(i);return c!==void 0?typeof u=="string"?l.fill(c,u):l.fill(c):l.fill(0),l},o.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return a(i)},o.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(i)}},{buffer:220}],495:[function(e,r,t){(function(n){(function(){var a,s=e("buffer"),o=s.Buffer,i={};for(a in s)s.hasOwnProperty(a)&&a!=="SlowBuffer"&&a!=="Buffer"&&(i[a]=s[a]);var c=i.Buffer={};for(a in o)o.hasOwnProperty(a)&&a!=="allocUnsafe"&&a!=="allocUnsafeSlow"&&(c[a]=o[a]);if(i.Buffer.prototype=o.prototype,c.from&&c.from!==Uint8Array.from||(c.from=function(u,l,A){if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof u);if(u&&u.length===void 0)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);return o(u,l,A)}),c.alloc||(c.alloc=function(u,l,A){if(typeof u!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof u);if(u<0||u>=2*(1<<30))throw new RangeError('The value "'+u+'" is invalid for option "size"');var h=o(u);return l&&l.length!==0?typeof A=="string"?h.fill(l,A):h.fill(l):h.fill(0),h}),!i.kStringMaxLength)try{i.kStringMaxLength=n.binding("buffer").kStringMaxLength}catch{}i.constants||(i.constants={MAX_LENGTH:i.kMaxLength},i.kStringMaxLength&&(i.constants.MAX_STRING_LENGTH=i.kStringMaxLength)),r.exports=i}).call(this)}).call(this,e("_process"))},{_process:467,buffer:220}],496:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0});var n=e("xmlchars/xml/1.0/ed5"),a=e("xmlchars/xml/1.1/ed2"),s=e("xmlchars/xmlns/1.0/ed3"),o=n.isS,i=n.isChar,c=n.isNameStartChar,u=n.isNameChar,l=n.S_LIST,A=n.NAME_RE,h=a.isChar,f=s.isNCNameStartChar,d=s.isNCNameChar,g=s.NC_NAME_RE,p="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",v={__proto__:null,xml:p,xmlns:m},y={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},I=-1,E=-2,k=0,R=1,T=2,j=3,W=4,H=5,X=6,x=7,N=8,C=9,w=10,Q=11,B=12,S=13,O=14,F=15,Y=16,M=17,z=18,ue=19,ae=20,Ne=21,Ge=22,Ye=23,Ae=24,te=25,he=26,de=27,Ke=28,le=29,Ce=30,At=31,Z=32,ce=33,ye=34,Ve=35,dt=36,re=37,ot=38,pt=39,Be=40,Ee=41,Me=42,yt=43,pe=44,me=9,Re=10,Ze=13,ke=32,Pe=33,_e=34,Je=38,at=39,Dt=45,St=47,hr=59,Wt=60,Ut=61,ur=62,Br=63,fr=91,Mr=93,er=133,Tr=8232,fn=function(vi){return vi===_e||vi===at},_n=[_e,at],dr=[].concat(_n,[fr,ur]),rn=[].concat(_n,[Wt,Mr]),Kr=[Ut,Br].concat(Et(l)),tr=[].concat(Et(l),[ur,Je,Wt]);function on(vi,qe,bt){switch(qe){case"xml":bt!==p&&vi.fail("xml prefix must be bound to ".concat(p,"."));break;case"xmlns":bt!==m&&vi.fail("xmlns prefix must be bound to ".concat(m,"."))}switch(bt){case m:vi.fail(qe===""?"the default namespace may not be set to ".concat(bt,"."):'may not assign a prefix (even "xmlns") to the URI '.concat(m,"."));break;case p:switch(qe){case"xml":break;case"":vi.fail("the default namespace may not be set to ".concat(bt,"."));break;default:vi.fail("may not assign the xml namespace to another prefix.")}}}function nn(vi,qe){for(var bt=0,Ft=Object.keys(qe);bt0&&(Ft+=":"),Ft+="".concat(this.line,":").concat(this.column)),Ft.length>0&&(Ft+=": "),new Error(Ft+qe)}},{key:"fail",value:function(qe){var bt=this.makeError(qe),Ft=this.errorHandler;if(Ft===void 0)throw bt;return Ft(bt),this}},{key:"write",value:function(qe){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");var bt=!1;qe===null?(bt=!0,qe=""):typeof qe=="object"&&(qe=qe.toString()),this.carriedFromPrevious!==void 0&&(qe="".concat(this.carriedFromPrevious).concat(qe),this.carriedFromPrevious=void 0);var Ft=qe.length,Lr=qe.charCodeAt(Ft-1);!bt&&(Lr===Ze||Lr>=55296&&Lr<=56319)&&(this.carriedFromPrevious=qe[Ft-1],Ft--,qe=qe.slice(0,Ft));var kn=this.stateTable;for(this.chunk=qe,this.i=0;this.i=qe.length)return I;var Ft=qe.charCodeAt(bt);if(this.column++,Ft<55296){if(Ft>=ke||Ft===me)return Ft;switch(Ft){case Re:return this.line++,this.column=0,this.positionAtNewLine=this.position,Re;case Ze:return qe.charCodeAt(bt+1)===Re&&(this.i=bt+2),this.line++,this.column=0,this.positionAtNewLine=this.position,E;default:return this.fail("disallowed character."),Ft}}if(Ft>56319)return Ft>=57344&&Ft<=65533||this.fail("disallowed character."),Ft;var Lr=65536+1024*(Ft-55296)+(qe.charCodeAt(bt+1)-56320);return this.i=bt+2,Lr>1114111&&this.fail("disallowed character."),Lr}},{key:"getCode11",value:function(){var qe=this.chunk,bt=this.i;if(this.prevI=bt,this.i=bt+1,bt>=qe.length)return I;var Ft=qe.charCodeAt(bt);if(this.column++,Ft<55296){if(Ft>31&&Ft<127||Ft>159&&Ft!==Tr||Ft===me)return Ft;switch(Ft){case Re:return this.line++,this.column=0,this.positionAtNewLine=this.position,Re;case Ze:var Lr=qe.charCodeAt(bt+1);Lr!==Re&&Lr!==er||(this.i=bt+2);case er:case Tr:return this.line++,this.column=0,this.positionAtNewLine=this.position,E;default:return this.fail("disallowed character."),Ft}}if(Ft>56319)return Ft>=57344&&Ft<=65533||this.fail("disallowed character."),Ft;var kn=65536+1024*(Ft-55296)+(qe.charCodeAt(bt+1)-56320);return this.i=bt+2,kn>1114111&&this.fail("disallowed character."),kn}},{key:"getCodeNorm",value:function(){var qe=this.getCode();return qe===E?Re:qe}},{key:"unget",value:function(){this.i=this.prevI,this.column--}},{key:"captureTo",value:function(qe){for(var bt=this.i,Ft=this.chunk;;){var Lr=this.getCode(),kn=Lr===E,Bi=kn?Re:Lr;if(Bi===I||qe.includes(Bi))return this.text+=Ft.slice(bt,this.prevI),Bi;kn&&(this.text+="".concat(Ft.slice(bt,this.prevI),` `),bt=this.i)}}},{key:"captureToChar",value:function(qe){for(var bt=this.i,Ft=this.chunk;;){var Lr=this.getCode();switch(Lr){case E:this.text+="".concat(Ft.slice(bt,this.prevI),` `),bt=this.i,Lr=Re;break;case I:return this.text+=Ft.slice(bt),!1}if(Lr===qe)return this.text+=Ft.slice(bt,this.prevI),!0}}},{key:"captureNameChars",value:function(){for(var qe=this.chunk,bt=this.i;;){var Ft=this.getCode();if(Ft===I)return this.name+=qe.slice(bt),I;if(!u(Ft))return this.name+=qe.slice(bt,this.prevI),Ft===E?Re:Ft}}},{key:"skipSpaces",value:function(){for(;;){var qe=this.getCodeNorm();if(qe===I||!o(qe))return qe}}},{key:"setXMLVersion",value:function(qe){this.currentXMLVersion=qe,qe==="1.0"?(this.isChar=i,this.getCode=this.getCode10):(this.isChar=h,this.getCode=this.getCode11)}},{key:"sBegin",value:function(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=R}},{key:"sBeginWhitespace",value:function(){var qe=this.i,bt=this.skipSpaces();switch(this.prevI!==qe&&(this.xmlDeclPossible=!1),bt){case Wt:if(this.state=F,this.text.length!==0)throw new Error("no-empty text at start");break;case I:break;default:this.unget(),this.state=S,this.xmlDeclPossible=!1}}},{key:"sDoctype",value:function(){var qe,bt=this.captureTo(dr);switch(bt){case ur:(qe=this.doctypeHandler)===null||qe===void 0||qe.call(this,this.text),this.text="",this.state=S,this.doctype=!0;break;case I:break;default:this.text+=String.fromCodePoint(bt),bt===fr?this.state=W:fn(bt)&&(this.state=j,this.q=bt)}}},{key:"sDoctypeQuote",value:function(){var qe=this.q;this.captureToChar(qe)&&(this.text+=String.fromCodePoint(qe),this.q=null,this.state=T)}},{key:"sDTD",value:function(){var qe=this.captureTo(rn);qe!==I&&(this.text+=String.fromCodePoint(qe),qe===Mr?this.state=T:qe===Wt?this.state=X:fn(qe)&&(this.state=H,this.q=qe))}},{key:"sDTDQuoted",value:function(){var qe=this.q;this.captureToChar(qe)&&(this.text+=String.fromCodePoint(qe),this.state=W,this.q=null)}},{key:"sDTDOpenWaka",value:function(){var qe=this.getCodeNorm();switch(this.text+=String.fromCodePoint(qe),qe){case Pe:this.state=x,this.openWakaBang="";break;case Br:this.state=Q;break;default:this.state=W}}},{key:"sDTDOpenWakaBang",value:function(){var qe=String.fromCodePoint(this.getCodeNorm()),bt=this.openWakaBang+=qe;this.text+=qe,bt!=="-"&&(this.state=bt==="--"?N:W,this.openWakaBang="")}},{key:"sDTDComment",value:function(){this.captureToChar(Dt)&&(this.text+="-",this.state=C)}},{key:"sDTDCommentEnding",value:function(){var qe=this.getCodeNorm();this.text+=String.fromCodePoint(qe),this.state=qe===Dt?w:N}},{key:"sDTDCommentEnded",value:function(){var qe=this.getCodeNorm();this.text+=String.fromCodePoint(qe),qe===ur?this.state=W:(this.fail("malformed comment."),this.state=N)}},{key:"sDTDPI",value:function(){this.captureToChar(Br)&&(this.text+="?",this.state=B)}},{key:"sDTDPIEnding",value:function(){var qe=this.getCodeNorm();this.text+=String.fromCodePoint(qe),qe===ur&&(this.state=W)}},{key:"sText",value:function(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}},{key:"sEntity",value:function(){var qe=this.i,bt=this.chunk;e:for(;;)switch(this.getCode()){case E:this.entity+="".concat(bt.slice(qe,this.prevI),` `),qe=this.i;break;case hr:var Ft=this.entityReturnState,Lr=this.entity+bt.slice(qe,this.prevI);this.state=Ft;var kn=void 0;Lr===""?(this.fail("empty entity name."),kn="&;"):(kn=this.parseEntity(Lr),this.entity=""),Ft===S&&this.textHandler===void 0||(this.text+=kn);break e;case I:this.entity+=bt.slice(qe);break e}}},{key:"sOpenWaka",value:function(){var qe=this.getCode();if(c(qe))this.state=ye,this.unget(),this.xmlDeclPossible=!1;else switch(qe){case St:this.state=yt,this.xmlDeclPossible=!1;break;case Pe:this.state=Y,this.openWakaBang="",this.xmlDeclPossible=!1;break;case Br:this.state=Ye;break;default:this.fail("disallowed character in tag name"),this.state=S,this.xmlDeclPossible=!1}}},{key:"sOpenWakaBang",value:function(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=ae,this.openWakaBang="";break;case"--":this.state=M,this.openWakaBang="";break;case"DOCTYPE":this.state=T,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}},{key:"sComment",value:function(){this.captureToChar(Dt)&&(this.state=z)}},{key:"sCommentEnding",value:function(){var qe,bt=this.getCodeNorm();bt===Dt?(this.state=ue,(qe=this.commentHandler)===null||qe===void 0||qe.call(this,this.text),this.text=""):(this.text+="-".concat(String.fromCodePoint(bt)),this.state=M)}},{key:"sCommentEnded",value:function(){var qe=this.getCodeNorm();qe!==ur?(this.fail("malformed comment."),this.text+="--".concat(String.fromCodePoint(qe)),this.state=M):this.state=S}},{key:"sCData",value:function(){this.captureToChar(Mr)&&(this.state=Ne)}},{key:"sCDataEnding",value:function(){var qe=this.getCodeNorm();qe===Mr?this.state=Ge:(this.text+="]".concat(String.fromCodePoint(qe)),this.state=ae)}},{key:"sCDataEnding2",value:function(){var qe,bt=this.getCodeNorm();switch(bt){case ur:(qe=this.cdataHandler)===null||qe===void 0||qe.call(this,this.text),this.text="",this.state=S;break;case Mr:this.text+="]";break;default:this.text+="]]".concat(String.fromCodePoint(bt)),this.state=ae}}},{key:"sPIFirstChar",value:function(){var qe=this.getCodeNorm();this.nameStartCheck(qe)?(this.piTarget+=String.fromCodePoint(qe),this.state=Ae):qe===Br||o(qe)?(this.fail("processing instruction without a target."),this.state=qe===Br?he:te):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(qe),this.state=Ae)}},{key:"sPIRest",value:function(){for(var qe=this.chunk,bt=this.i;;){var Ft=this.getCodeNorm();if(Ft===I)return void(this.piTarget+=qe.slice(bt));if(!this.nameCheck(Ft)){this.piTarget+=qe.slice(bt,this.prevI);var Lr=Ft===Br;Lr||o(Ft)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=Lr?ce:de):this.state=Lr?he:te:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(Ft));break}}}},{key:"sPIBody",value:function(){if(this.text.length===0){var qe=this.getCodeNorm();qe===Br?this.state=he:o(qe)||(this.text=String.fromCodePoint(qe))}else this.captureToChar(Br)&&(this.state=he)}},{key:"sPIEnding",value:function(){var qe,bt=this.getCodeNorm();if(bt===ur){var Ft=this.piTarget;Ft.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(qe=this.piHandler)===null||qe===void 0||qe.call(this,{target:Ft,body:this.text}),this.piTarget=this.text="",this.state=S}else bt===Br?this.text+="?":(this.text+="?".concat(String.fromCodePoint(bt)),this.state=te);this.xmlDeclPossible=!1}},{key:"sXMLDeclNameStart",value:function(){var qe=this.skipSpaces();qe!==Br?qe!==I&&(this.state=Ke,this.name=String.fromCodePoint(qe)):this.state=ce}},{key:"sXMLDeclName",value:function(){var qe=this.captureTo(Kr);if(qe===Br)return this.state=ce,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(o(qe)||qe===Ut){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail("expected the name ".concat(this.xmlDeclExpects[0],"."));break;default:this.fail("expected one of ".concat(this.xmlDeclExpects.join(", ")))}this.state=qe===Ut?Ce:le}}},{key:"sXMLDeclEq",value:function(){var qe=this.getCodeNorm();if(qe===Br)return this.state=ce,void this.fail("XML declaration is incomplete.");o(qe)||(qe!==Ut&&this.fail("value required."),this.state=Ce)}},{key:"sXMLDeclValueStart",value:function(){var qe=this.getCodeNorm();if(qe===Br)return this.state=ce,void this.fail("XML declaration is incomplete.");o(qe)||(fn(qe)?this.q=qe:(this.fail("value must be quoted."),this.q=ke),this.state=At)}},{key:"sXMLDeclValue",value:function(){var qe=this.captureTo([this.q,Br]);if(qe===Br)return this.state=ce,this.text="",void this.fail("XML declaration is incomplete.");if(qe!==I){var bt=this.text;switch(this.text="",this.name){case"version":this.xmlDeclExpects=["encoding","standalone"];var Ft=bt;this.xmlDecl.version=Ft,/^1\.[0-9]+$/.test(Ft)?this.opt.forceXMLVersion||this.setXMLVersion(Ft):this.fail("version number must match /^1\\.[0-9]+$/.");break;case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(bt)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=bt;break;case"standalone":bt!=="yes"&&bt!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=bt}this.name="",this.state=Z}}},{key:"sXMLDeclSeparator",value:function(){var qe=this.getCodeNorm();qe!==Br?(o(qe)||(this.fail("whitespace required."),this.unget()),this.state=de):this.state=ce}},{key:"sXMLDeclEnding",value:function(){var qe;this.getCodeNorm()===ur?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(qe=this.xmldeclHandler)===null||qe===void 0||qe.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=S):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}},{key:"sOpenTag",value:function(){var qe,bt=this.captureNameChars();if(bt!==I){var Ft=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=Ft.ns=Object.create(null)),(qe=this.openTagStartHandler)===null||qe===void 0||qe.call(this,Ft),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),bt){case ur:this.openTag();break;case St:this.state=Ve;break;default:o(bt)||this.fail("disallowed character in tag name."),this.state=dt}}}},{key:"sOpenTagSlash",value:function(){this.getCode()===ur?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=dt)}},{key:"sAttrib",value:function(){var qe=this.skipSpaces();qe!==I&&(c(qe)?(this.unget(),this.state=re):qe===ur?this.openTag():qe===St?this.state=Ve:this.fail("disallowed character in attribute name."))}},{key:"sAttribName",value:function(){var qe=this.captureNameChars();qe===Ut?this.state=pt:o(qe)?this.state=ot:qe===ur?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):qe!==I&&this.fail("disallowed character in attribute name.")}},{key:"sAttribNameSawWhite",value:function(){var qe=this.skipSpaces();switch(qe){case I:return;case Ut:this.state=pt;break;default:this.fail("attribute without value."),this.text="",this.name="",qe===ur?this.openTag():c(qe)?(this.unget(),this.state=re):(this.fail("disallowed character in attribute name."),this.state=dt)}}},{key:"sAttribValue",value:function(){var qe=this.getCodeNorm();fn(qe)?(this.q=qe,this.state=Be):o(qe)||(this.fail("unquoted attribute value."),this.state=Me,this.unget())}},{key:"sAttribValueQuoted",value:function(){for(var qe=this.q,bt=this.chunk,Ft=this.i;;)switch(this.getCode()){case qe:return this.pushAttrib(this.name,this.text+bt.slice(Ft,this.prevI)),this.name=this.text="",this.q=null,void(this.state=Ee);case Je:return this.text+=bt.slice(Ft,this.prevI),this.state=O,void(this.entityReturnState=Be);case Re:case E:case me:this.text+="".concat(bt.slice(Ft,this.prevI)," "),Ft=this.i;break;case Wt:return this.text+=bt.slice(Ft,this.prevI),void this.fail("disallowed character.");case I:return void(this.text+=bt.slice(Ft))}}},{key:"sAttribValueClosed",value:function(){var qe=this.getCodeNorm();o(qe)?this.state=dt:qe===ur?this.openTag():qe===St?this.state=Ve:c(qe)?(this.fail("no whitespace between attributes."),this.unget(),this.state=re):this.fail("disallowed character in attribute name.")}},{key:"sAttribValueUnquoted",value:function(){var qe=this.captureTo(tr);switch(qe){case Je:this.state=O,this.entityReturnState=Me;break;case Wt:this.fail("disallowed character.");break;case I:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",qe===ur?this.openTag():this.state=dt}}},{key:"sCloseTag",value:function(){var qe=this.captureNameChars();qe===ur?this.closeTag():o(qe)?this.state=pe:qe!==I&&this.fail("disallowed character in closing tag.")}},{key:"sCloseTagSawWhite",value:function(){switch(this.skipSpaces()){case ur:this.closeTag();break;case I:break;default:this.fail("disallowed character in closing tag.")}}},{key:"handleTextInRoot",value:function(){var qe=this.i,bt=this.forbiddenState,Ft=this.chunk,Lr=this.textHandler;e:for(;;)switch(this.getCode()){case Wt:if(this.state=F,Lr!==void 0){var kn=this.text,Bi=Ft.slice(qe,this.prevI);kn.length!==0?(Lr(kn+Bi),this.text=""):Bi.length!==0&&Lr(Bi)}bt=Gn;break e;case Je:this.state=O,this.entityReturnState=S,Lr!==void 0&&(this.text+=Ft.slice(qe,this.prevI)),bt=Gn;break e;case Mr:switch(bt){case Gn:bt=Dr;break;case Dr:bt=Nn;break;case Nn:break;default:throw new Error("impossible state")}break;case ur:bt===Nn&&this.fail('the string "]]>" is disallowed in char data.'),bt=Gn;break;case E:Lr!==void 0&&(this.text+="".concat(Ft.slice(qe,this.prevI),` `)),qe=this.i,bt=Gn;break;case I:Lr!==void 0&&(this.text+=Ft.slice(qe));break e;default:bt=Gn}this.forbiddenState=bt}},{key:"handleTextOutsideRoot",value:function(){var qe=this.i,bt=this.chunk,Ft=this.textHandler,Lr=!1;e:for(;;){var kn=this.getCode();switch(kn){case Wt:if(this.state=F,Ft!==void 0){var Bi=this.text,ka=bt.slice(qe,this.prevI);Bi.length!==0?(Ft(Bi+ka),this.text=""):ka.length!==0&&Ft(ka)}break e;case Je:this.state=O,this.entityReturnState=S,Ft!==void 0&&(this.text+=bt.slice(qe,this.prevI)),Lr=!0;break e;case E:Ft!==void 0&&(this.text+="".concat(bt.slice(qe,this.prevI),` `)),qe=this.i;break;case I:Ft!==void 0&&(this.text+=bt.slice(qe));break e;default:o(kn)||(Lr=!0)}}Lr&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}},{key:"pushAttribNS",value:function(qe,bt){var Ft,Lr=this.qname(qe),kn=Lr.prefix,Bi=Lr.local,ka={name:qe,prefix:kn,local:Bi,value:bt};if(this.attribList.push(ka),(Ft=this.attributeHandler)===null||Ft===void 0||Ft.call(this,ka),kn==="xmlns"){var Va=bt.trim();this.currentXMLVersion==="1.0"&&Va===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[Bi]=Va,on(this,Bi,Va)}else if(qe==="xmlns"){var qo=bt.trim();this.topNS[""]=qo,on(this,"",qo)}}},{key:"pushAttribPlain",value:function(qe,bt){var Ft,Lr={name:qe,value:bt};this.attribList.push(Lr),(Ft=this.attributeHandler)===null||Ft===void 0||Ft.call(this,Lr)}},{key:"end",value:function(){var qe,bt;this.sawRoot||this.fail("document must contain a root element.");for(var Ft=this.tags;Ft.length>0;){var Lr=Ft.pop();this.fail("unclosed tag: ".concat(Lr.name))}this.state!==k&&this.state!==S&&this.fail("unexpected end.");var kn=this.text;return kn.length!==0&&((qe=this.textHandler)===null||qe===void 0||qe.call(this,kn),this.text=""),this._closed=!0,(bt=this.endHandler)===null||bt===void 0||bt.call(this),this._init(),this}},{key:"resolve",value:function(qe){var bt,Ft,Lr=this.topNS[qe];if(Lr!==void 0)return Lr;for(var kn=this.tags,Bi=kn.length-1;Bi>=0;Bi--)if((Lr=kn[Bi].ns[qe])!==void 0)return Lr;return(Lr=this.ns[qe])!==void 0?Lr:(Ft=(bt=this.opt).resolvePrefix)===null||Ft===void 0?void 0:Ft.call(bt,qe)}},{key:"qname",value:function(qe){var bt=qe.indexOf(":");if(bt===-1)return{prefix:"",local:qe};var Ft=qe.slice(bt+1),Lr=qe.slice(0,bt);return(Lr===""||Ft===""||Ft.includes(":"))&&this.fail("malformed name: ".concat(qe,".")),{prefix:Lr,local:Ft}}},{key:"processAttribsNS",value:function(){var qe,bt=this.attribList,Ft=this.tag,Lr=this.qname(Ft.name),kn=Lr.prefix,Bi=Lr.local;Ft.prefix=kn,Ft.local=Bi;var ka=Ft.uri=(qe=this.resolve(kn))!==null&&qe!==void 0?qe:"";if(kn!==""&&(kn==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),ka===""&&(this.fail("unbound namespace prefix: ".concat(JSON.stringify(kn),".")),Ft.uri=kn)),bt.length!==0){var Va,qo=Ft.attributes,Ro=new Set,po=nd(bt);try{for(po.s();!(Va=po.n()).done;){var Fo=Va.value,ri=Fo.name,$n=Fo.prefix,Bs=Fo.local,No=void 0,Qs=void 0;$n===""?(No=ri==="xmlns"?m:"",Qs=ri):((No=this.resolve($n))===void 0&&(this.fail("unbound namespace prefix: ".concat(JSON.stringify($n),".")),No=$n),Qs="{".concat(No,"}").concat(Bs)),Ro.has(Qs)&&this.fail("duplicate attribute: ".concat(Qs,".")),Ro.add(Qs),Fo.uri=No,qo[ri]=Fo}}catch(bc){po.e(bc)}finally{po.f()}this.attribList=[]}}},{key:"processAttribsPlain",value:function(){var qe,bt=this.attribList,Ft=this.tag.attributes,Lr=nd(bt);try{for(Lr.s();!(qe=Lr.n()).done;){var kn=qe.value,Bi=kn.name,ka=kn.value;Ft[Bi]!==void 0&&this.fail("duplicate attribute: ".concat(Bi,".")),Ft[Bi]=ka}}catch(Va){Lr.e(Va)}finally{Lr.f()}this.attribList=[]}},{key:"openTag",value:function(){var qe;this.processAttribs();var bt=this.tags,Ft=this.tag;Ft.isSelfClosing=!1,(qe=this.openTagHandler)===null||qe===void 0||qe.call(this,Ft),bt.push(Ft),this.state=S,this.name=""}},{key:"openSelfClosingTag",value:function(){var qe,bt,Ft;this.processAttribs();var Lr=this.tags,kn=this.tag;kn.isSelfClosing=!0,(qe=this.openTagHandler)===null||qe===void 0||qe.call(this,kn),(bt=this.closeTagHandler)===null||bt===void 0||bt.call(this,kn),(this.tag=(Ft=Lr[Lr.length-1])!==null&&Ft!==void 0?Ft:null)===null&&(this.closedRoot=!0),this.state=S,this.name=""}},{key:"closeTag",value:function(){var qe=this.tags,bt=this.name;if(this.state=S,this.name="",bt==="")return this.fail("weird empty close tag."),void(this.text+="");for(var Ft=this.closeTagHandler,Lr=qe.length;Lr-- >0;){var kn=this.tag=qe.pop();if(this.topNS=kn.ns,Ft==null||Ft(kn),kn.name===bt)break;this.fail("unexpected close tag.")}Lr===0?this.closedRoot=!0:Lr<0&&(this.fail("unmatched closing tag: ".concat(bt,".")),this.text+=""))}},{key:"parseEntity",value:function(qe){if(qe[0]!=="#"){var bt=this.ENTITIES[qe];return bt!==void 0?bt:(this.fail(this.isName(qe)?"undefined entity.":"disallowed character in entity name."),"&".concat(qe,";"))}var Ft=NaN;return qe[1]==="x"&&/^#x[0-9a-f]+$/i.test(qe)?Ft=parseInt(qe.slice(2),16):/^#[0-9]+$/.test(qe)&&(Ft=parseInt(qe.slice(1),10)),this.isChar(Ft)?String.fromCodePoint(Ft):(this.fail("malformed character entity."),"&".concat(qe,";"))}}]),vi}();t.SaxesParser=Hn},{"xmlchars/xml/1.0/ed5":543,"xmlchars/xml/1.1/ed2":544,"xmlchars/xmlns/1.0/ed3":545}],497:[function(e,r,t){var n=e("safe-buffer").Buffer;function a(s,o){this._block=n.alloc(s),this._finalSize=o,this._blockSize=s,this._len=0}a.prototype.update=function(s,o){typeof s=="string"&&(o=o||"utf8",s=n.from(s,o));for(var i=this._block,c=this._blockSize,u=s.length,l=this._len,A=0;A=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var c=(4294967295&i)>>>0,u=(i-c)/4294967296;this._block.writeUInt32BE(u,this._blockSize-8),this._block.writeUInt32BE(c,this._blockSize-4)}this._update(this._block);var l=this._hash();return s?l.toString(s):l},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},r.exports=a},{"safe-buffer":494}],498:[function(e,r,t){var n=r.exports=function(a){a=a.toLowerCase();var s=n[a];if(!s)throw new Error(a+" is not supported (we accept pull requests)");return new s};n.sha=e("./sha"),n.sha1=e("./sha1"),n.sha224=e("./sha224"),n.sha256=e("./sha256"),n.sha384=e("./sha384"),n.sha512=e("./sha512")},{"./sha":499,"./sha1":500,"./sha224":501,"./sha256":502,"./sha384":503,"./sha512":504}],499:[function(e,r,t){var n=e("inherits"),a=e("./hash"),s=e("safe-buffer").Buffer,o=[1518500249,1859775393,-1894007588,-899497514],i=new Array(80);function c(){this.init(),this._w=i,a.call(this,64,56)}function u(h){return h<<5|h>>>27}function l(h){return h<<30|h>>>2}function A(h,f,d,g){return h===0?f&d|~f&g:h===2?f&d|f&g|d&g:f^d^g}n(c,a),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(h){for(var f=this._w,d=0|this._a,g=0|this._b,p=0|this._c,m=0|this._d,v=0|this._e,y=0;y<16;++y)f[y]=h.readInt32BE(4*y);for(;y<80;++y)f[y]=f[y-3]^f[y-8]^f[y-14]^f[y-16];for(var I=0;I<80;++I){var E=~~(I/20),k=u(d)+A(E,g,p,m)+v+f[I]+o[E]|0;v=m,m=p,p=l(g),g=d,d=k}this._a=d+this._a|0,this._b=g+this._b|0,this._c=p+this._c|0,this._d=m+this._d|0,this._e=v+this._e|0},c.prototype._hash=function(){var h=s.allocUnsafe(20);return h.writeInt32BE(0|this._a,0),h.writeInt32BE(0|this._b,4),h.writeInt32BE(0|this._c,8),h.writeInt32BE(0|this._d,12),h.writeInt32BE(0|this._e,16),h},r.exports=c},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(e,r,t){var n=e("inherits"),a=e("./hash"),s=e("safe-buffer").Buffer,o=[1518500249,1859775393,-1894007588,-899497514],i=new Array(80);function c(){this.init(),this._w=i,a.call(this,64,56)}function u(f){return f<<1|f>>>31}function l(f){return f<<5|f>>>27}function A(f){return f<<30|f>>>2}function h(f,d,g,p){return f===0?d&g|~d&p:f===2?d&g|d&p|g&p:d^g^p}n(c,a),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(f){for(var d=this._w,g=0|this._a,p=0|this._b,m=0|this._c,v=0|this._d,y=0|this._e,I=0;I<16;++I)d[I]=f.readInt32BE(4*I);for(;I<80;++I)d[I]=u(d[I-3]^d[I-8]^d[I-14]^d[I-16]);for(var E=0;E<80;++E){var k=~~(E/20),R=l(g)+h(k,p,m,v)+y+d[E]+o[k]|0;y=v,v=m,m=A(p),p=g,g=R}this._a=g+this._a|0,this._b=p+this._b|0,this._c=m+this._c|0,this._d=v+this._d|0,this._e=y+this._e|0},c.prototype._hash=function(){var f=s.allocUnsafe(20);return f.writeInt32BE(0|this._a,0),f.writeInt32BE(0|this._b,4),f.writeInt32BE(0|this._c,8),f.writeInt32BE(0|this._d,12),f.writeInt32BE(0|this._e,16),f},r.exports=c},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(e,r,t){var n=e("inherits"),a=e("./sha256"),s=e("./hash"),o=e("safe-buffer").Buffer,i=new Array(64);function c(){this.init(),this._w=i,s.call(this,64,56)}n(c,a),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var u=o.allocUnsafe(28);return u.writeInt32BE(this._a,0),u.writeInt32BE(this._b,4),u.writeInt32BE(this._c,8),u.writeInt32BE(this._d,12),u.writeInt32BE(this._e,16),u.writeInt32BE(this._f,20),u.writeInt32BE(this._g,24),u},r.exports=c},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(e,r,t){var n=e("inherits"),a=e("./hash"),s=e("safe-buffer").Buffer,o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],i=new Array(64);function c(){this.init(),this._w=i,a.call(this,64,56)}function u(g,p,m){return m^g&(p^m)}function l(g,p,m){return g&p|m&(g|p)}function A(g){return(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10)}function h(g){return(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7)}function f(g){return(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3}function d(g){return(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10}n(c,a),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(g){for(var p=this._w,m=0|this._a,v=0|this._b,y=0|this._c,I=0|this._d,E=0|this._e,k=0|this._f,R=0|this._g,T=0|this._h,j=0;j<16;++j)p[j]=g.readInt32BE(4*j);for(;j<64;++j)p[j]=d(p[j-2])+p[j-7]+f(p[j-15])+p[j-16]|0;for(var W=0;W<64;++W){var H=T+h(E)+u(E,k,R)+o[W]+p[W]|0,X=A(m)+l(m,v,y)|0;T=R,R=k,k=E,E=I+H|0,I=y,y=v,v=m,m=H+X|0}this._a=m+this._a|0,this._b=v+this._b|0,this._c=y+this._c|0,this._d=I+this._d|0,this._e=E+this._e|0,this._f=k+this._f|0,this._g=R+this._g|0,this._h=T+this._h|0},c.prototype._hash=function(){var g=s.allocUnsafe(32);return g.writeInt32BE(this._a,0),g.writeInt32BE(this._b,4),g.writeInt32BE(this._c,8),g.writeInt32BE(this._d,12),g.writeInt32BE(this._e,16),g.writeInt32BE(this._f,20),g.writeInt32BE(this._g,24),g.writeInt32BE(this._h,28),g},r.exports=c},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(e,r,t){var n=e("inherits"),a=e("./sha512"),s=e("./hash"),o=e("safe-buffer").Buffer,i=new Array(160);function c(){this.init(),this._w=i,s.call(this,128,112)}n(c,a),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var u=o.allocUnsafe(48);function l(A,h,f){u.writeInt32BE(A,f),u.writeInt32BE(h,f+4)}return l(this._ah,this._al,0),l(this._bh,this._bl,8),l(this._ch,this._cl,16),l(this._dh,this._dl,24),l(this._eh,this._el,32),l(this._fh,this._fl,40),u},r.exports=c},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(e,r,t){var n=e("inherits"),a=e("./hash"),s=e("safe-buffer").Buffer,o=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],i=new Array(160);function c(){this.init(),this._w=i,a.call(this,128,112)}function u(v,y,I){return I^v&(y^I)}function l(v,y,I){return v&y|I&(v|y)}function A(v,y){return(v>>>28|y<<4)^(y>>>2|v<<30)^(y>>>7|v<<25)}function h(v,y){return(v>>>14|y<<18)^(v>>>18|y<<14)^(y>>>9|v<<23)}function f(v,y){return(v>>>1|y<<31)^(v>>>8|y<<24)^v>>>7}function d(v,y){return(v>>>1|y<<31)^(v>>>8|y<<24)^(v>>>7|y<<25)}function g(v,y){return(v>>>19|y<<13)^(y>>>29|v<<3)^v>>>6}function p(v,y){return(v>>>19|y<<13)^(y>>>29|v<<3)^(v>>>6|y<<26)}function m(v,y){return v>>>0>>0?1:0}n(c,a),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(v){for(var y=this._w,I=0|this._ah,E=0|this._bh,k=0|this._ch,R=0|this._dh,T=0|this._eh,j=0|this._fh,W=0|this._gh,H=0|this._hh,X=0|this._al,x=0|this._bl,N=0|this._cl,C=0|this._dl,w=0|this._el,Q=0|this._fl,B=0|this._gl,S=0|this._hl,O=0;O<32;O+=2)y[O]=v.readInt32BE(4*O),y[O+1]=v.readInt32BE(4*O+4);for(;O<160;O+=2){var F=y[O-30],Y=y[O-30+1],M=f(F,Y),z=d(Y,F),ue=g(F=y[O-4],Y=y[O-4+1]),ae=p(Y,F),Ne=y[O-14],Ge=y[O-14+1],Ye=y[O-32],Ae=y[O-32+1],te=z+Ge|0,he=M+Ne+m(te,z)|0;he=(he=he+ue+m(te=te+ae|0,ae)|0)+Ye+m(te=te+Ae|0,Ae)|0,y[O]=he,y[O+1]=te}for(var de=0;de<160;de+=2){he=y[de],te=y[de+1];var Ke=l(I,E,k),le=l(X,x,N),Ce=A(I,X),At=A(X,I),Z=h(T,w),ce=h(w,T),ye=o[de],Ve=o[de+1],dt=u(T,j,W),re=u(w,Q,B),ot=S+ce|0,pt=H+Z+m(ot,S)|0;pt=(pt=(pt=pt+dt+m(ot=ot+re|0,re)|0)+ye+m(ot=ot+Ve|0,Ve)|0)+he+m(ot=ot+te|0,te)|0;var Be=At+le|0,Ee=Ce+Ke+m(Be,At)|0;H=W,S=B,W=j,B=Q,j=T,Q=w,T=R+pt+m(w=C+ot|0,C)|0,R=k,C=N,k=E,N=x,E=I,x=X,I=pt+Ee+m(X=ot+Be|0,ot)|0}this._al=this._al+X|0,this._bl=this._bl+x|0,this._cl=this._cl+N|0,this._dl=this._dl+C|0,this._el=this._el+w|0,this._fl=this._fl+Q|0,this._gl=this._gl+B|0,this._hl=this._hl+S|0,this._ah=this._ah+I+m(this._al,X)|0,this._bh=this._bh+E+m(this._bl,x)|0,this._ch=this._ch+k+m(this._cl,N)|0,this._dh=this._dh+R+m(this._dl,C)|0,this._eh=this._eh+T+m(this._el,w)|0,this._fh=this._fh+j+m(this._fl,Q)|0,this._gh=this._gh+W+m(this._gl,B)|0,this._hh=this._hh+H+m(this._hl,S)|0},c.prototype._hash=function(){var v=s.allocUnsafe(64);function y(I,E,k){v.writeInt32BE(I,k),v.writeInt32BE(E,k+4)}return y(this._ah,this._al,0),y(this._bh,this._bl,8),y(this._ch,this._cl,16),y(this._dh,this._dl,24),y(this._eh,this._el,32),y(this._fh,this._fl,40),y(this._gh,this._gl,48),y(this._hh,this._hl,56),v},r.exports=c},{"./hash":497,inherits:440,"safe-buffer":494}],505:[function(e,r,t){r.exports=a;var n=e("events").EventEmitter;function a(){n.call(this)}e("inherits")(a,n),a.Readable=e("readable-stream/readable.js"),a.Writable=e("readable-stream/writable.js"),a.Duplex=e("readable-stream/duplex.js"),a.Transform=e("readable-stream/transform.js"),a.PassThrough=e("readable-stream/passthrough.js"),a.Stream=a,a.prototype.pipe=function(s,o){var i=this;function c(g){s.writable&&s.write(g)===!1&&i.pause&&i.pause()}function u(){i.readable&&i.resume&&i.resume()}i.on("data",c),s.on("drain",u),s._isStdio||o&&o.end===!1||(i.on("end",A),i.on("close",h));var l=!1;function A(){l||(l=!0,s.end())}function h(){l||(l=!0,typeof s.destroy=="function"&&s.destroy())}function f(g){if(d(),n.listenerCount(this,"error")===0)throw g}function d(){i.removeListener("data",c),s.removeListener("drain",u),i.removeListener("end",A),i.removeListener("close",h),i.removeListener("error",f),s.removeListener("error",f),i.removeListener("end",d),i.removeListener("close",d),s.removeListener("close",d)}return i.on("error",f),s.on("error",f),i.on("end",d),i.on("close",d),s.on("close",d),s.emit("pipe",i),s}},{events:422,inherits:440,"readable-stream/duplex.js":507,"readable-stream/passthrough.js":516,"readable-stream/readable.js":517,"readable-stream/transform.js":518,"readable-stream/writable.js":519}],506:[function(e,r,t){var n={}.toString;r.exports=Array.isArray||function(a){return n.call(a)=="[object Array]"}},{}],507:[function(e,r,t){r.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(e,r,t){var n=e("process-nextick-args"),a=Object.keys||function(d){var g=[];for(var p in d)g.push(p);return g};r.exports=A;var s=Object.create(e("core-util-is"));s.inherits=e("inherits");var o=e("./_stream_readable"),i=e("./_stream_writable");s.inherits(A,o);for(var c=a(i.prototype),u=0;u0?(typeof de=="string"||Z.objectMode||Object.getPrototypeOf(de)===l.prototype||(de=h(de)),le?Z.endEmitted?he.emit("error",new Error("stream.unshift() after end event")):j(he,Z,de,!0):Z.ended?he.emit("error",new Error("stream.push() after EOF")):(Z.reading=!1,Z.decoder&&!Ke?(de=Z.decoder.write(de),Z.objectMode||de.length!==0?j(he,Z,de,!1):B(he,Z)):j(he,Z,de,!1))):le||(Z.reading=!1)),H(Z)}function j(he,de,Ke,le){de.flowing&&de.length===0&&!de.sync?(he.emit("data",Ke),he.read(0)):(de.length+=de.objectMode?1:Ke.length,le?de.buffer.unshift(Ke):de.buffer.push(Ke),de.needReadable&&w(he)),B(he,de)}function W(he,de){var Ke;return f(de)||typeof de=="string"||de===void 0||he.objectMode||(Ke=new TypeError("Invalid non-string/buffer chunk")),Ke}function H(he){return!he.ended&&(he.needReadable||he.length=X?he=X:(he--,he|=he>>>1,he|=he>>>2,he|=he>>>4,he|=he>>>8,he|=he>>>16,he++),he}function N(he,de){return he<=0||de.length===0&&de.ended?0:de.objectMode?1:he!=he?de.flowing&&de.length?de.buffer.head.data.length:de.length:(he>de.highWaterMark&&(de.highWaterMark=x(he)),he<=de.length?he:de.ended?de.length:(de.needReadable=!0,0))}function C(he,de){if(!de.ended){if(de.decoder){var Ke=de.decoder.end();Ke&&Ke.length&&(de.buffer.push(Ke),de.length+=de.objectMode?1:Ke.length)}de.ended=!0,w(he)}}function w(he){var de=he._readableState;de.needReadable=!1,de.emittedReadable||(p("emitReadable",de.flowing),de.emittedReadable=!0,de.sync?s.nextTick(Q,he):Q(he))}function Q(he){p("emit readable"),he.emit("readable"),z(he)}function B(he,de){de.readingMore||(de.readingMore=!0,s.nextTick(S,he,de))}function S(he,de){for(var Ke=de.length;!de.reading&&!de.flowing&&!de.ended&&de.length=de.length?(Ke=de.decoder?de.buffer.join(""):de.buffer.length===1?de.buffer.head.data:de.buffer.concat(de.length),de.buffer.clear()):Ke=ae(he,de.buffer,de.decoder),Ke);var Ke}function ae(he,de,Ke){var le;return heAt.length?At.length:he;if(Z===At.length?Ce+=At:Ce+=At.slice(0,he),(he-=Z)==0){Z===At.length?(++le,Ke.next?de.head=Ke.next:de.head=de.tail=null):(de.head=Ke,Ke.data=At.slice(Z));break}++le}return de.length-=le,Ce}function Ge(he,de){var Ke=l.allocUnsafe(he),le=de.head,Ce=1;for(le.data.copy(Ke),he-=le.data.length;le=le.next;){var At=le.data,Z=he>At.length?At.length:he;if(At.copy(Ke,Ke.length-he,0,Z),(he-=Z)==0){Z===At.length?(++Ce,le.next?de.head=le.next:de.head=de.tail=null):(de.head=le,le.data=At.slice(Z));break}++Ce}return de.length-=Ce,Ke}function Ye(he){var de=he._readableState;if(de.length>0)throw new Error('"endReadable()" called on non-empty stream');de.endEmitted||(de.ended=!0,s.nextTick(Ae,de,he))}function Ae(he,de){he.endEmitted||he.length!==0||(he.endEmitted=!0,de.readable=!1,de.emit("end"))}function te(he,de){for(var Ke=0,le=he.length;Ke=de.highWaterMark||de.ended))return p("read: emitReadable",de.length,de.ended),de.length===0&&de.ended?Ye(this):w(this),null;if((he=N(he,de))===0&&de.ended)return de.length===0&&Ye(this),null;var le,Ce=de.needReadable;return p("need readable",Ce),(de.length===0||de.length-he0?ue(he,de):null)===null?(de.needReadable=!0,he=0):de.length-=he,de.length===0&&(de.ended||(de.needReadable=!0),Ke!==he&&de.ended&&Ye(this)),le!==null&&this.emit("data",le),le},R.prototype._read=function(he){this.emit("error",new Error("_read() is not implemented"))},R.prototype.pipe=function(he,de){var Ke=this,le=this._readableState;switch(le.pipesCount){case 0:le.pipes=he;break;case 1:le.pipes=[le.pipes,he];break;default:le.pipes.push(he)}le.pipesCount+=1,p("pipe count=%d opts=%j",le.pipesCount,de);var Ce=de&&de.end===!1||he===n.stdout||he===n.stderr?Ee:Z;function At(Me,yt){p("onunpipe"),Me===Ke&&yt&&yt.hasUnpiped===!1&&(yt.hasUnpiped=!0,Ve())}function Z(){p("onend"),he.end()}le.endEmitted?s.nextTick(Ce):Ke.once("end",Ce),he.on("unpipe",At);var ce=O(Ke);he.on("drain",ce);var ye=!1;function Ve(){p("cleanup"),he.removeListener("close",pt),he.removeListener("finish",Be),he.removeListener("drain",ce),he.removeListener("error",ot),he.removeListener("unpipe",At),Ke.removeListener("end",Z),Ke.removeListener("end",Ee),Ke.removeListener("data",re),ye=!0,!le.awaitDrain||he._writableState&&!he._writableState.needDrain||ce()}var dt=!1;function re(Me){p("ondata"),dt=!1,he.write(Me)!==!1||dt||((le.pipesCount===1&&le.pipes===he||le.pipesCount>1&&te(le.pipes,he)!==-1)&&!ye&&(p("false write response, pause",le.awaitDrain),le.awaitDrain++,dt=!0),Ke.pause())}function ot(Me){p("onerror",Me),Ee(),he.removeListener("error",ot),c(he,"error")===0&&he.emit("error",Me)}function pt(){he.removeListener("finish",Be),Ee()}function Be(){p("onfinish"),he.removeListener("close",pt),Ee()}function Ee(){p("unpipe"),Ke.unpipe(he)}return Ke.on("data",re),E(he,"error",ot),he.once("close",pt),he.once("finish",Be),he.emit("pipe",Ke),le.flowing||(p("pipe resume"),Ke.resume()),he},R.prototype.unpipe=function(he){var de=this._readableState,Ke={hasUnpiped:!1};if(de.pipesCount===0)return this;if(de.pipesCount===1)return he&&he!==de.pipes||(he||(he=de.pipes),de.pipes=null,de.pipesCount=0,de.flowing=!1,he&&he.emit("unpipe",this,Ke)),this;if(!he){var le=de.pipes,Ce=de.pipesCount;de.pipes=null,de.pipesCount=0,de.flowing=!1;for(var At=0;At-1?s:o.nextTick;E.WritableState=I;var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var A={deprecate:e("util-deprecate")},h=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,d=(a!==void 0?a:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function g(M){return f.from(M)}function p(M){return f.isBuffer(M)||M instanceof d}var m,v=e("./internal/streams/destroy");function y(){}function I(M,z){c=c||e("./_stream_duplex"),M=M||{};var ue=z instanceof c;this.objectMode=!!M.objectMode,ue&&(this.objectMode=this.objectMode||!!M.writableObjectMode);var ae=M.highWaterMark,Ne=M.writableHighWaterMark,Ge=this.objectMode?16:16384;this.highWaterMark=ae||ae===0?ae:ue&&(Ne||Ne===0)?Ne:Ge,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ye=M.decodeStrings===!1;this.decodeStrings=!Ye,this.defaultEncoding=M.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ae){x(z,Ae)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function E(M){if(c=c||e("./_stream_duplex"),!(m.call(E,this)||this instanceof c))return new E(M);this._writableState=new I(M,this),this.writable=!0,M&&(typeof M.write=="function"&&(this._write=M.write),typeof M.writev=="function"&&(this._writev=M.writev),typeof M.destroy=="function"&&(this._destroy=M.destroy),typeof M.final=="function"&&(this._final=M.final)),h.call(this)}function k(M,z){var ue=new Error("write after end");M.emit("error",ue),o.nextTick(z,ue)}function R(M,z,ue,ae){var Ne=!0,Ge=!1;return ue===null?Ge=new TypeError("May not write null values to stream"):typeof ue=="string"||ue===void 0||z.objectMode||(Ge=new TypeError("Invalid non-string/buffer chunk")),Ge&&(M.emit("error",Ge),o.nextTick(ae,Ge),Ne=!1),Ne}function T(M,z,ue){return M.objectMode||M.decodeStrings===!1||typeof z!="string"||(z=f.from(z,ue)),z}function j(M,z,ue,ae,Ne,Ge){if(!ue){var Ye=T(z,ae,Ne);ae!==Ye&&(ue=!0,Ne="buffer",ae=Ye)}var Ae=z.objectMode?1:ae.length;z.length+=Ae;var te=z.length-1))throw new TypeError("Unknown encoding: "+M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(M,z,ue){ue(new Error("_write() is not implemented"))},E.prototype._writev=null,E.prototype.end=function(M,z,ue){var ae=this._writableState;typeof M=="function"?(ue=M,M=null,z=null):typeof z=="function"&&(ue=z,z=null),M!=null&&this.write(M,z),ae.corked&&(ae.corked=1,this.uncork()),ae.ending||F(this,ae,ue)},Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(M){this._writableState&&(this._writableState.destroyed=M)}}),E.prototype.destroy=v.destroy,E.prototype._undestroy=v.undestroy,E.prototype._destroy=function(M,z){this.end(),z(M)}}).call(this)}).call(this,e("_process"),mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{"./_stream_duplex":508,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,inherits:440,"process-nextick-args":466,"safe-buffer":520,timers:523,"util-deprecate":524}],513:[function(e,r,t){function n(i,c){if(!(i instanceof c))throw new TypeError("Cannot call a class as a function")}var a=e("safe-buffer").Buffer,s=e("util");function o(i,c,u){i.copy(c,u)}r.exports=function(){function i(){n(this,i),this.head=null,this.tail=null,this.length=0}return i.prototype.push=function(c){var u={data:c,next:null};this.length>0?this.tail.next=u:this.head=u,this.tail=u,++this.length},i.prototype.unshift=function(c){var u={data:c,next:this.head};this.length===0&&(this.tail=u),this.head=u,++this.length},i.prototype.shift=function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}},i.prototype.clear=function(){this.head=this.tail=null,this.length=0},i.prototype.join=function(c){if(this.length===0)return"";for(var u=this.head,l=""+u.data;u=u.next;)l+=c+u.data;return l},i.prototype.concat=function(c){if(this.length===0)return a.alloc(0);for(var u=a.allocUnsafe(c>>>0),l=this.head,A=0;l;)o(l.data,u,A),A+=l.data.length,l=l.next;return u},i}(),s&&s.inspect&&s.inspect.custom&&(r.exports.prototype[s.inspect.custom]=function(){var i=s.inspect({length:this.length});return this.constructor.name+" "+i})},{"safe-buffer":520,util:188}],514:[function(e,r,t){var n=e("process-nextick-args");function a(i,c){var u=this,l=this._readableState&&this._readableState.destroyed,A=this._writableState&&this._writableState.destroyed;return l||A?(c?c(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(o,this,i)):n.nextTick(o,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,function(h){!c&&h?u._writableState?u._writableState.errorEmitted||(u._writableState.errorEmitted=!0,n.nextTick(o,u,h)):n.nextTick(o,u,h):c&&c(h)}),this)}function s(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(i,c){i.emit("error",c)}r.exports={destroy:a,undestroy:s}},{"process-nextick-args":466}],515:[function(e,r,t){arguments[4][490][0].apply(t,arguments)},{dup:490,events:422}],516:[function(e,r,t){r.exports=e("./readable").PassThrough},{"./readable":517}],517:[function(e,r,t){(t=r.exports=e("./lib/_stream_readable.js")).Stream=t,t.Readable=t,t.Writable=e("./lib/_stream_writable.js"),t.Duplex=e("./lib/_stream_duplex.js"),t.Transform=e("./lib/_stream_transform.js"),t.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":508,"./lib/_stream_passthrough.js":509,"./lib/_stream_readable.js":510,"./lib/_stream_transform.js":511,"./lib/_stream_writable.js":512}],518:[function(e,r,t){r.exports=e("./readable").Transform},{"./readable":517}],519:[function(e,r,t){r.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(e,r,t){arguments[4][217][0].apply(t,arguments)},{buffer:220,dup:217}],521:[function(e,r,t){arguments[4][218][0].apply(t,arguments)},{dup:218,"safe-buffer":520}],522:[function(e,r,t){arguments[4][218][0].apply(t,arguments)},{dup:218,"safe-buffer":494}],523:[function(e,r,t){(function(n,a){(function(){var s=e("process/browser.js").nextTick,o=Function.prototype.apply,i=Array.prototype.slice,c={},u=0;function l(A,h){this._id=A,this._clearFn=h}t.setTimeout=function(){return new l(o.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new l(o.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(A){A.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(A,h){clearTimeout(A._idleTimeoutId),A._idleTimeout=h},t.unenroll=function(A){clearTimeout(A._idleTimeoutId),A._idleTimeout=-1},t._unrefActive=t.active=function(A){clearTimeout(A._idleTimeoutId);var h=A._idleTimeout;h>=0&&(A._idleTimeoutId=setTimeout(function(){A._onTimeout&&A._onTimeout()},h))},t.setImmediate=typeof n=="function"?n:function(A){var h=u++,f=!(arguments.length<2)&&i.call(arguments,1);return c[h]=!0,s(function(){c[h]&&(f?A.apply(null,f):A.call(null),t.clearImmediate(h))}),h},t.clearImmediate=typeof a=="function"?a:function(A){delete c[A]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":467,timers:523}],524:[function(e,r,t){(function(n){(function(){function a(o,i){if(s("noDeprecation"))return o;var c=!1;function u(){if(!c){if(s("throwDeprecation"))throw new Error(i);s("traceDeprecation")?console.trace(i):console.warn(i),c=!0}return o.apply(this,arguments)}return u}function s(o){try{if(!n.localStorage)return!1}catch{return!1}var i=n.localStorage[o];return i!=null&&String(i).toLowerCase()==="true"}r.exports=a}).call(this)}).call(this,mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],525:[function(e,r,t){typeof Object.create=="function"?r.exports=function(n,a){n.super_=a,n.prototype=Object.create(a.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:r.exports=function(n,a){n.super_=a;var s=function(){};s.prototype=a.prototype,n.prototype=new s,n.prototype.constructor=n}},{}],526:[function(e,r,t){r.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}},{}],527:[function(e,r,t){(function(n,a){(function(){var s=/%[sdj%]/g;t.format=function(F){if(!R(F)){for(var Y=[],M=0;M=ue)return Ge;switch(Ge){case"%s":return String(z[M++]);case"%d":return Number(z[M++]);case"%j":try{return JSON.stringify(z[M++])}catch{return"[Circular]"}default:return Ge}}),Ne=z[M];M=3&&(M.depth=arguments[2]),arguments.length>=4&&(M.colors=arguments[3]),y(Y)?M.showHidden=Y:Y&&t._extend(M,Y),j(M.showHidden)&&(M.showHidden=!1),j(M.depth)&&(M.depth=2),j(M.colors)&&(M.colors=!1),j(M.customInspect)&&(M.customInspect=!0),M.colors&&(M.stylize=u),h(M,F,M.depth)}function u(F,Y){var M=c.styles[Y];return M?"\x1B["+c.colors[M][0]+"m"+F+"\x1B["+c.colors[M][1]+"m":F}function l(F,Y){return F}function A(F){var Y={};return F.forEach(function(M,z){Y[M]=!0}),Y}function h(F,Y,M){if(F.customInspect&&Y&&N(Y.inspect)&&Y.inspect!==t.inspect&&(!Y.constructor||Y.constructor.prototype!==Y)){var z=Y.inspect(M,F);return R(z)||(z=h(F,z,M)),z}var ue=f(F,Y);if(ue)return ue;var ae=Object.keys(Y),Ne=A(ae);if(F.showHidden&&(ae=Object.getOwnPropertyNames(Y)),x(Y)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return d(Y);if(ae.length===0){if(N(Y)){var Ge=Y.name?": "+Y.name:"";return F.stylize("[Function"+Ge+"]","special")}if(W(Y))return F.stylize(RegExp.prototype.toString.call(Y),"regexp");if(X(Y))return F.stylize(Date.prototype.toString.call(Y),"date");if(x(Y))return d(Y)}var Ye,Ae="",te=!1,he=["{","}"];return v(Y)&&(te=!0,he=["[","]"]),N(Y)&&(Ae=" [Function"+(Y.name?": "+Y.name:"")+"]"),W(Y)&&(Ae=" "+RegExp.prototype.toString.call(Y)),X(Y)&&(Ae=" "+Date.prototype.toUTCString.call(Y)),x(Y)&&(Ae=" "+d(Y)),ae.length!==0||te&&Y.length!=0?M<0?W(Y)?F.stylize(RegExp.prototype.toString.call(Y),"regexp"):F.stylize("[Object]","special"):(F.seen.push(Y),Ye=te?g(F,Y,M,Ne,ae):ae.map(function(de){return p(F,Y,M,Ne,de,te)}),F.seen.pop(),m(Ye,Ae,he)):he[0]+Ae+he[1]}function f(F,Y){if(j(Y))return F.stylize("undefined","undefined");if(R(Y)){var M="'"+JSON.stringify(Y).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(M,"string")}return k(Y)?F.stylize(""+Y,"number"):y(Y)?F.stylize(""+Y,"boolean"):I(Y)?F.stylize("null","null"):void 0}function d(F){return"["+Error.prototype.toString.call(F)+"]"}function g(F,Y,M,z,ue){for(var ae=[],Ne=0,Ge=Y.length;Ne-1&&(Ge=ae?Ge.split(` `).map(function(Ae){return" "+Ae}).join(` `).substr(2):` `+Ge.split(` `).map(function(Ae){return" "+Ae}).join(` `)):Ge=F.stylize("[Circular]","special")),j(Ne)){if(ae&&ue.match(/^\d+$/))return Ge;(Ne=JSON.stringify(""+ue)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ne=Ne.substr(1,Ne.length-2),Ne=F.stylize(Ne,"name")):(Ne=Ne.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ne=F.stylize(Ne,"string"))}return Ne+": "+Ge}function m(F,Y,M){return F.reduce(function(z,ue){return ue.indexOf(` `),z+ue.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?M[0]+(Y===""?"":Y+` `)+" "+F.join(`, `)+" "+M[1]:M[0]+Y+" "+F.join(", ")+" "+M[1]}function v(F){return Array.isArray(F)}function y(F){return typeof F=="boolean"}function I(F){return F===null}function E(F){return F==null}function k(F){return typeof F=="number"}function R(F){return typeof F=="string"}function T(F){return typeof F=="symbol"}function j(F){return F===void 0}function W(F){return H(F)&&w(F)==="[object RegExp]"}function H(F){return typeof F=="object"&&F!==null}function X(F){return H(F)&&w(F)==="[object Date]"}function x(F){return H(F)&&(w(F)==="[object Error]"||F instanceof Error)}function N(F){return typeof F=="function"}function C(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||F===void 0}function w(F){return Object.prototype.toString.call(F)}function Q(F){return F<10?"0"+F.toString(10):F.toString(10)}t.debuglog=function(F){if(j(o)&&(o=n.env.NODE_DEBUG||""),F=F.toUpperCase(),!i[F])if(new RegExp("\\b"+F+"\\b","i").test(o)){var Y=n.pid;i[F]=function(){var M=t.format.apply(t,arguments);console.error("%s %d: %s",F,Y,M)}}else i[F]=function(){};return i[F]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=v,t.isBoolean=y,t.isNull=I,t.isNullOrUndefined=E,t.isNumber=k,t.isString=R,t.isSymbol=T,t.isUndefined=j,t.isRegExp=W,t.isObject=H,t.isDate=X,t.isError=x,t.isFunction=N,t.isPrimitive=C,t.isBuffer=e("./support/isBuffer");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var F=new Date,Y=[Q(F.getHours()),Q(F.getMinutes()),Q(F.getSeconds())].join(":");return[F.getDate(),B[F.getMonth()],Y].join(" ")}function O(F,Y){return Object.prototype.hasOwnProperty.call(F,Y)}t.log=function(){console.log("%s - %s",S(),t.format.apply(t,arguments))},t.inherits=e("inherits"),t._extend=function(F,Y){if(!Y||!H(Y))return F;for(var M=Object.keys(Y),z=M.length;z--;)F[M[z]]=Y[M[z]];return F}}).call(this)}).call(this,e("_process"),mi!==void 0?mi:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return A.default}});var n=h(e("./v1.js")),a=h(e("./v3.js")),s=h(e("./v4.js")),o=h(e("./v5.js")),i=h(e("./nil.js")),c=h(e("./version.js")),u=h(e("./validate.js")),l=h(e("./stringify.js")),A=h(e("./parse.js"));function h(f){return f&&f.__esModule?f:{default:f}}},{"./nil.js":530,"./parse.js":531,"./stringify.js":535,"./v1.js":536,"./v3.js":537,"./v4.js":539,"./v5.js":540,"./validate.js":541,"./version.js":542}],529:[function(e,r,t){function n(p){if(typeof p=="string"){var m=unescape(encodeURIComponent(p));p=new Uint8Array(m.length);for(var v=0;v>5]>>>I%32&255,k=parseInt(y.charAt(E>>>4&15)+y.charAt(15&E),16);m.push(k)}return m}function s(p){return 14+(p+64>>>9<<4)+1}function o(p,m){p[m>>5]|=128<>5]|=(255&p[y/8])<>16)+(m>>16)+(v>>16)<<16|65535&v}function u(p,m){return p<>>32-m}function l(p,m,v,y,I,E){return c(u(c(c(m,p),c(y,E)),I),v)}function A(p,m,v,y,I,E,k){return l(m&v|~m&y,p,m,I,E,k)}function h(p,m,v,y,I,E,k){return l(m&y|v&~y,p,m,I,E,k)}function f(p,m,v,y,I,E,k){return l(m^v^y,p,m,I,E,k)}function d(p,m,v,y,I,E,k){return l(v^(m|~y),p,m,I,E,k)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var g=n;t.default=g},{}],530:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="00000000-0000-0000-0000-000000000000";t.default=n},{}],531:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(e("./validate.js"));function a(i){return i&&i.__esModule?i:{default:i}}function s(i){if(!(0,n.default)(i))throw TypeError("Invalid UUID");var c,u=new Uint8Array(16);return u[0]=(c=parseInt(i.slice(0,8),16))>>>24,u[1]=c>>>16&255,u[2]=c>>>8&255,u[3]=255&c,u[4]=(c=parseInt(i.slice(9,13),16))>>>8,u[5]=255&c,u[6]=(c=parseInt(i.slice(14,18),16))>>>8,u[7]=255&c,u[8]=(c=parseInt(i.slice(19,23),16))>>>8,u[9]=255&c,u[10]=(c=parseInt(i.slice(24,36),16))/1099511627776&255,u[11]=c/4294967296&255,u[12]=c>>>24&255,u[13]=c>>>16&255,u[14]=c>>>8&255,u[15]=255&c,u}var o=s;t.default=o},{"./validate.js":541}],532:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t.default=n},{}],533:[function(e,r,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var a=new Uint8Array(16);function s(){if(!n&&!(n=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}},{}],534:[function(e,r,t){function n(i,c,u,l){switch(i){case 0:return c&u^~c&l;case 1:case 3:return c^u^l;case 2:return c&u^c&l^u&l}}function a(i,c){return i<>>32-c}function s(i){var c=[1518500249,1859775393,2400959708,3395469782],u=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){var l=unescape(encodeURIComponent(i));i=[];for(var A=0;A>>0;W=j,j=T,T=a(R,30)>>>0,R=k,k=x}u[0]=u[0]+k>>>0,u[1]=u[1]+R>>>0,u[2]=u[2]+T>>>0,u[3]=u[3]+j>>>0,u[4]=u[4]+W>>>0}return[u[0]>>24&255,u[0]>>16&255,u[0]>>8&255,255&u[0],u[1]>>24&255,u[1]>>16&255,u[1]>>8&255,255&u[1],u[2]>>24&255,u[2]>>16&255,u[2]>>8&255,255&u[2],u[3]>>24&255,u[3]>>16&255,u[3]>>8&255,255&u[3],u[4]>>24&255,u[4]>>16&255,u[4]>>8&255,255&u[4]]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s;t.default=o},{}],535:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(e("./validate.js"));function a(u){return u&&u.__esModule?u:{default:u}}for(var s=[],o=0;o<256;++o)s.push((o+256).toString(16).substr(1));function i(u){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=(s[u[l+0]]+s[u[l+1]]+s[u[l+2]]+s[u[l+3]]+"-"+s[u[l+4]]+s[u[l+5]]+"-"+s[u[l+6]]+s[u[l+7]]+"-"+s[u[l+8]]+s[u[l+9]]+"-"+s[u[l+10]]+s[u[l+11]]+s[u[l+12]]+s[u[l+13]]+s[u[l+14]]+s[u[l+15]]).toLowerCase();if(!(0,n.default)(A))throw TypeError("Stringified UUID is invalid");return A}var c=i;t.default=c},{"./validate.js":541}],536:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a,s=i(e("./rng.js")),o=i(e("./stringify.js"));function i(h){return h&&h.__esModule?h:{default:h}}var c=0,u=0;function l(h,f,d){var g=f&&d||0,p=f||new Array(16),m=(h=h||{}).node||n,v=h.clockseq!==void 0?h.clockseq:a;if(m==null||v==null){var y=h.random||(h.rng||s.default)();m==null&&(m=n=[1|y[0],y[1],y[2],y[3],y[4],y[5]]),v==null&&(v=a=16383&(y[6]<<8|y[7]))}var I=h.msecs!==void 0?h.msecs:Date.now(),E=h.nsecs!==void 0?h.nsecs:u+1,k=I-c+(E-u)/1e4;if(k<0&&h.clockseq===void 0&&(v=v+1&16383),(k<0||I>c)&&h.nsecs===void 0&&(E=0),E>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=I,u=E,a=v;var R=(1e4*(268435455&(I+=122192928e5))+E)%4294967296;p[g++]=R>>>24&255,p[g++]=R>>>16&255,p[g++]=R>>>8&255,p[g++]=255&R;var T=I/4294967296*1e4&268435455;p[g++]=T>>>8&255,p[g++]=255&T,p[g++]=T>>>24&15|16,p[g++]=T>>>16&255,p[g++]=v>>>8|128,p[g++]=255&v;for(var j=0;j<6;++j)p[g+j]=m[j];return f||(0,o.default)(p)}var A=l;t.default=A},{"./rng.js":533,"./stringify.js":535}],537:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(e("./v35.js")),a=s(e("./md5.js"));function s(i){return i&&i.__esModule?i:{default:i}}var o=(0,n.default)("v3",48,a.default);t.default=o},{"./md5.js":529,"./v35.js":538}],538:[function(e,r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=u,t.URL=t.DNS=void 0;var n=s(e("./stringify.js")),a=s(e("./parse.js"));function s(l){return l&&l.__esModule?l:{default:l}}function o(l){l=unescape(encodeURIComponent(l));for(var A=[],h=0;h=o&&A<=55295||A===a||A===s||A===n||A>=57344&&A<=65533||A>=65536&&A<=1114111}function c(A){return A===o||A===a||A===s||A===n}function u(A){return A>=65&&A<=90||A>=97&&A<=122||A===58||A===95||A===8204||A===8205||A>=192&&A<=214||A>=216&&A<=246||A>=248&&A<=767||A>=880&&A<=893||A>=895&&A<=8191||A>=8304&&A<=8591||A>=11264&&A<=12271||A>=12289&&A<=55295||A>=63744&&A<=64975||A>=65008&&A<=65533||A>=65536&&A<=983039}function l(A){return u(A)||A>=48&&A<=57||A===45||A===46||A===183||A>=768&&A<=879||A>=8255&&A<=8256}t.S_LIST=[o,a,s,n],t.isChar=i,t.isS=c,t.isNameStartChar=u,t.isNameChar=l},{}],544:[function(e,r,t){/** * Character classes and associated utilities for the 2nd edition of XML 1.1. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="-퟿-�𐀀-􏿿",t.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",t.S=` \r `,t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.RESTRICTED_CHAR_RE=new RegExp("^["+t.RESTRICTED_CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u");var n=9,a=10,s=13,o=32;function i(f){return f>=1&&f<=55295||f>=57344&&f<=65533||f>=65536&&f<=1114111}function c(f){return f>=1&&f<=8||f===11||f===12||f>=14&&f<=31||f>=127&&f<=132||f>=134&&f<=159}function u(f){return f===9||f===10||f===13||f>31&&f<127||f===133||f>159&&f<=55295||f>=57344&&f<=65533||f>=65536&&f<=1114111}function l(f){return f===o||f===a||f===s||f===n}function A(f){return f>=65&&f<=90||f>=97&&f<=122||f===58||f===95||f===8204||f===8205||f>=192&&f<=214||f>=216&&f<=246||f>=248&&f<=767||f>=880&&f<=893||f>=895&&f<=8191||f>=8304&&f<=8591||f>=11264&&f<=12271||f>=12289&&f<=55295||f>=63744&&f<=64975||f>=65008&&f<=65533||f>=65536&&f<=983039}function h(f){return A(f)||f>=48&&f<=57||f===45||f===46||f===183||f>=768&&f<=879||f>=8255&&f<=8256}t.S_LIST=[o,a,s,n],t.isChar=i,t.isRestrictedChar=c,t.isCharAndNotRestricted=u,t.isS=l,t.isNameStartChar=A,t.isNameChar=h},{}],545:[function(e,r,t){function n(s){return s>=65&&s<=90||s===95||s>=97&&s<=122||s>=192&&s<=214||s>=216&&s<=246||s>=248&&s<=767||s>=880&&s<=893||s>=895&&s<=8191||s>=8204&&s<=8205||s>=8304&&s<=8591||s>=11264&&s<=12271||s>=12289&&s<=55295||s>=63744&&s<=64975||s>=65008&&s<=65533||s>=65536&&s<=983039}function a(s){return n(s)||s===45||s===46||s>=48&&s<=57||s===183||s>=768&&s<=879||s>=8255&&s<=8256}/** * Character class utilities for XML NS 1.0 edition 3. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */Object.defineProperty(t,"__esModule",{value:!0}),t.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NC_NAME_CHAR="-"+t.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.NC_NAME_START_CHAR_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]$","u"),t.NC_NAME_CHAR_RE=new RegExp("^["+t.NC_NAME_CHAR+"]$","u"),t.NC_NAME_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]["+t.NC_NAME_CHAR+"]*$","u"),t.isNCNameStartChar=n,t.isNCNameChar=a},{}]},{},[15])(15);var _1=k1.exports;function D1(){return(D1=Oi(mn.mark(function e(r,t){return mn.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(t){n.next=2;break}return n.abrupt("return");case 2:t instanceof ArrayBuffer&&(t=new Blob([t])),M2(r,URL.createObjectURL(t));case 4:case"end":return n.stop()}},e)}))).apply(this,arguments)}function M2(e,r){var t=document.createElement("a");t.download=e,t.style.display="none",t.href=r,document.body.appendChild(t),t.click(),document.body.removeChild(t)}function n0(e){return(n0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}var T2=/^\s+/,id=/\s+$/;function On(e,r){if(r=r||{},(e=e||"")instanceof On)return e;if(!(this instanceof On))return new On(e,r);var t=function(n){var a={r:0,g:0,b:0},s=1,o=null,i=null,c=null,u=!1,l=!1;typeof n=="string"&&(n=function(d){d=d.replace(T2,"").replace(id,"").toLowerCase();var g,p=!1;if(Uh[d])d=Uh[d],p=!0;else if(d=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(g=Nc.rgb.exec(d))?{r:g[1],g:g[2],b:g[3]}:(g=Nc.rgba.exec(d))?{r:g[1],g:g[2],b:g[3],a:g[4]}:(g=Nc.hsl.exec(d))?{h:g[1],s:g[2],l:g[3]}:(g=Nc.hsla.exec(d))?{h:g[1],s:g[2],l:g[3],a:g[4]}:(g=Nc.hsv.exec(d))?{h:g[1],s:g[2],v:g[3]}:(g=Nc.hsva.exec(d))?{h:g[1],s:g[2],v:g[3],a:g[4]}:(g=Nc.hex8.exec(d))?{r:ss(g[1]),g:ss(g[2]),b:ss(g[3]),a:O1(g[4]),format:p?"name":"hex8"}:(g=Nc.hex6.exec(d))?{r:ss(g[1]),g:ss(g[2]),b:ss(g[3]),format:p?"name":"hex"}:(g=Nc.hex4.exec(d))?{r:ss(g[1]+""+g[1]),g:ss(g[2]+""+g[2]),b:ss(g[3]+""+g[3]),a:O1(g[4]+""+g[4]),format:p?"name":"hex8"}:(g=Nc.hex3.exec(d))?{r:ss(g[1]+""+g[1]),g:ss(g[2]+""+g[2]),b:ss(g[3]+""+g[3]),format:p?"name":"hex"}:!1}(n)),n0(n)=="object"&&(Su(n.r)&&Su(n.g)&&Su(n.b)?(A=n.r,h=n.g,f=n.b,a={r:255*Pa(A,255),g:255*Pa(h,255),b:255*Pa(f,255)},u=!0,l=String(n.r).substr(-1)==="%"?"prgb":"rgb"):Su(n.h)&&Su(n.s)&&Su(n.v)?(o=jh(n.s),i=jh(n.v),a=function(d,g,p){d=6*Pa(d,360),g=Pa(g,100),p=Pa(p,100);var m=Math.floor(d),v=d-m,y=p*(1-g),I=p*(1-v*g),E=p*(1-(1-v)*g),k=m%6,R=[p,I,y,y,E,p][k],T=[E,p,p,I,y,y][k],j=[y,y,E,p,p,I][k];return{r:255*R,g:255*T,b:255*j}}(n.h,o,i),u=!0,l="hsv"):Su(n.h)&&Su(n.s)&&Su(n.l)&&(o=jh(n.s),c=jh(n.l),a=function(d,g,p){var m,v,y;function I(R,T,j){return j<0&&(j+=1),j>1&&(j-=1),j<1/6?R+6*(T-R)*j:j<.5?T:j<2/3?R+(T-R)*(2/3-j)*6:R}if(d=Pa(d,360),g=Pa(g,100),p=Pa(p,100),g===0)m=v=y=p;else{var E=p<.5?p*(1+g):p+g-p*g,k=2*p-E;m=I(k,E,d+1/3),v=I(k,E,d),y=I(k,E,d-1/3)}return{r:255*m,g:255*v,b:255*y}}(n.h,o,c),u=!0,l="hsl"),n.hasOwnProperty("a")&&(s=n.a));var A,h,f;return s=L1(s),{ok:u,format:n.format||l,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:s}}(e);this._originalInput=e,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||t.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}function R1(e,r,t){e=Pa(e,255),r=Pa(r,255),t=Pa(t,255);var n,a,s=Math.max(e,r,t),o=Math.min(e,r,t),i=(s+o)/2;if(s==o)n=a=0;else{var c=s-o;switch(a=i>.5?c/(2-s-o):c/(s+o),s){case e:n=(r-t)/c+(r>1)+720)%360;--r;)n.h=(n.h+a)%360,s.push(On(n));return s}function W2(e,r){r=r||6;for(var t=On(e).toHsv(),n=t.h,a=t.s,s=t.v,o=[],i=1/r;r--;)o.push(On({h:n,s:a,v:s})),s=(s+i)%1;return o}On.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,r,t,n=this.toRgb();return e=n.r/255,r=n.g/255,t=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L1(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=F1(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=F1(this._r,this._g,this._b),r=Math.round(360*e.h),t=Math.round(100*e.s),n=Math.round(100*e.v);return this._a==1?"hsv("+r+", "+t+"%, "+n+"%)":"hsva("+r+", "+t+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=R1(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=R1(this._r,this._g,this._b),r=Math.round(360*e.h),t=Math.round(100*e.s),n=Math.round(100*e.l);return this._a==1?"hsl("+r+", "+t+"%, "+n+"%)":"hsla("+r+", "+t+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return N1(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(r,t,n,a,s){var o=[Fc(Math.round(r).toString(16)),Fc(Math.round(t).toString(16)),Fc(Math.round(n).toString(16)),Fc(od(a))];return s&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*Pa(this._r,255))+"%",g:Math.round(100*Pa(this._g,255))+"%",b:Math.round(100*Pa(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*Pa(this._r,255))+"%, "+Math.round(100*Pa(this._g,255))+"%, "+Math.round(100*Pa(this._b,255))+"%)":"rgba("+Math.round(100*Pa(this._r,255))+"%, "+Math.round(100*Pa(this._g,255))+"%, "+Math.round(100*Pa(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(K2[N1(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var r="#"+M1(this._r,this._g,this._b,this._a),t=r,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=On(e);t="#"+M1(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+t+")"},toString:function(e){var r=!!e;e=e||this._format;var t=!1,n=this._a<1&&this._a>=0;return r||!n||e!=="hex"&&e!=="hex6"&&e!=="hex3"&&e!=="hex4"&&e!=="hex8"&&e!=="name"?(e==="rgb"&&(t=this.toRgbString()),e==="prgb"&&(t=this.toPercentageRgbString()),e!=="hex"&&e!=="hex6"||(t=this.toHexString()),e==="hex3"&&(t=this.toHexString(!0)),e==="hex4"&&(t=this.toHex8String(!0)),e==="hex8"&&(t=this.toHex8String()),e==="name"&&(t=this.toName()),e==="hsl"&&(t=this.toHslString()),e==="hsv"&&(t=this.toHsvString()),t||this.toHexString()):e==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return On(this.toString())},_applyModification:function(e,r){var t=e.apply(null,[this].concat([].slice.call(r)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(G2,arguments)},brighten:function(){return this._applyModification(U2,arguments)},darken:function(){return this._applyModification(j2,arguments)},desaturate:function(){return this._applyModification(L2,arguments)},saturate:function(){return this._applyModification(O2,arguments)},greyscale:function(){return this._applyModification(P2,arguments)},spin:function(){return this._applyModification(H2,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(q2,arguments)},complement:function(){return this._applyCombination(Y2,arguments)},monochromatic:function(){return this._applyCombination(W2,arguments)},splitcomplement:function(){return this._applyCombination(J2,arguments)},triad:function(){return this._applyCombination(T1,[3])},tetrad:function(){return this._applyCombination(T1,[4])}},On.fromRatio=function(e,r){if(n0(e)=="object"){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=n==="a"?e[n]:jh(e[n]));e=t}return On(e,r)},On.equals=function(e,r){return!(!e||!r)&&On(e).toRgbString()==On(r).toRgbString()},On.random=function(){return On.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},On.mix=function(e,r,t){t=t===0?0:t||50;var n=On(e).toRgb(),a=On(r).toRgb(),s=t/100;return On({r:(a.r-n.r)*s+n.r,g:(a.g-n.g)*s+n.g,b:(a.b-n.b)*s+n.b,a:(a.a-n.a)*s+n.a})},On.readability=function(e,r){var t=On(e),n=On(r);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)},On.isReadable=function(e,r,t){var n,a,s=On.readability(e,r);switch(a=!1,(n=function(o){var i,c;return i=((o=o||{level:"AA",size:"small"}).level||"AA").toUpperCase(),c=(o.size||"small").toLowerCase(),i!=="AA"&&i!=="AAA"&&(i="AA"),c!=="small"&&c!=="large"&&(c="small"),{level:i,size:c}}(t)).level+n.size){case"AAsmall":case"AAAlarge":a=s>=4.5;break;case"AAlarge":a=s>=3;break;case"AAAsmall":a=s>=7}return a},On.mostReadable=function(e,r,t){var n,a,s,o,i=null,c=0;a=(t=t||{}).includeFallbackColors,s=t.level,o=t.size;for(var u=0;uc&&(c=n,i=On(r[u]));return On.isReadable(e,i,{level:s,size:o})||!a?i:(t.includeFallbackColors=!1,On.mostReadable(e,["#fff","#000"],t))};var Uh=On.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K2=On.hexNames=function(e){var r={};for(var t in e)e.hasOwnProperty(t)&&(r[e[t]]=t);return r}(Uh);function L1(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Pa(e,r){(function(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1})(e)&&(e="100%");var t=function(n){return typeof n=="string"&&n.indexOf("%")!=-1}(e);return e=Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function ad(e){return Math.min(1,Math.max(0,e))}function ss(e){return parseInt(e,16)}function Fc(e){return e.length==1?"0"+e:""+e}function jh(e){return e<=1&&(e=100*e+"%"),e}function od(e){return Math.round(255*parseFloat(e)).toString(16)}function O1(e){return ss(e)/255}var ol,sd,Hh,Nc=(sd="[\\s|\\(]+("+(ol="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+ol+")[,|\\s]+("+ol+")\\s*\\)?",Hh="[\\s|\\(]+("+ol+")[,|\\s]+("+ol+")[,|\\s]+("+ol+")[,|\\s]+("+ol+")\\s*\\)?",{CSS_UNIT:new RegExp(ol),rgb:new RegExp("rgb"+sd),rgba:new RegExp("rgba"+Hh),hsl:new RegExp("hsl"+sd),hsla:new RegExp("hsla"+Hh),hsv:new RegExp("hsv"+sd),hsva:new RegExp("hsva"+Hh),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Su(e){return!!Nc.CSS_UNIT.exec(e)}var i0={exports:{}};(function(e,r){(function(){var t,n="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",o=16,i=32,c=64,u=128,l=256,A=1/0,h=9007199254740991,f=NaN,d=4294967295,g=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",c],["rearg",l]],p="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",I="[object Error]",E="[object Function]",k="[object GeneratorFunction]",R="[object Map]",T="[object Number]",j="[object Object]",W="[object Promise]",H="[object RegExp]",X="[object Set]",x="[object String]",N="[object Symbol]",C="[object WeakMap]",w="[object ArrayBuffer]",Q="[object DataView]",B="[object Float32Array]",S="[object Float64Array]",O="[object Int8Array]",F="[object Int16Array]",Y="[object Int32Array]",M="[object Uint8Array]",z="[object Uint8ClampedArray]",ue="[object Uint16Array]",ae="[object Uint32Array]",Ne=/\b__p \+= '';/g,Ge=/\b(__p \+=) '' \+/g,Ye=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ae=/&(?:amp|lt|gt|quot|#39);/g,te=/[&<>"']/g,he=RegExp(Ae.source),de=RegExp(te.source),Ke=/<%-([\s\S]+?)%>/g,le=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ce=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ye=/[\\^$.*+?()[\]{}|]/g,Ve=RegExp(ye.source),dt=/^\s+/,re=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pt=/\{\n\/\* \[wrapped with (.+)\] \*/,Be=/,? & /,Ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Me=/[()=,{}\[\]\/\s]/,yt=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,Re=/^[-+]0x[0-9a-f]+$/i,Ze=/^0b[01]+$/i,ke=/^\[object .+?Constructor\]$/,Pe=/^0o[0-7]+$/i,_e=/^(?:0|[1-9]\d*)$/,Je=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,at=/($^)/,Dt=/['\n\r\u2028\u2029\\]/g,St="\\ud800-\\udfff",hr="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Wt="\\u2700-\\u27bf",Ut="a-z\\xdf-\\xf6\\xf8-\\xff",ur="A-Z\\xc0-\\xd6\\xd8-\\xde",Br="\\ufe0e\\ufe0f",fr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Mr="['’]",er="["+St+"]",Tr="["+fr+"]",fn="["+hr+"]",_n="\\d+",dr="["+Wt+"]",rn="["+Ut+"]",Kr="[^"+St+fr+_n+Wt+Ut+ur+"]",tr="\\ud83c[\\udffb-\\udfff]",on="[^"+St+"]",nn="(?:\\ud83c[\\udde6-\\uddff]){2}",An="[\\ud800-\\udbff][\\udc00-\\udfff]",bn="["+ur+"]",Gn="\\u200d",Dr="(?:"+rn+"|"+Kr+")",Nn="(?:"+bn+"|"+Kr+")",Mn="(?:['’](?:d|ll|m|re|s|t|ve))?",Hn="(?:['’](?:D|LL|M|RE|S|T|VE))?",vi="(?:"+fn+"|"+tr+")?",qe="["+Br+"]?",bt=qe+vi+("(?:"+Gn+"(?:"+[on,nn,An].join("|")+")"+qe+vi+")*"),Ft="(?:"+[dr,nn,An].join("|")+")"+bt,Lr="(?:"+[on+fn+"?",fn,nn,An,er].join("|")+")",kn=RegExp(Mr,"g"),Bi=RegExp(fn,"g"),ka=RegExp(tr+"(?="+tr+")|"+Lr+bt,"g"),Va=RegExp([bn+"?"+rn+"+"+Mn+"(?="+[Tr,bn,"$"].join("|")+")",Nn+"+"+Hn+"(?="+[Tr,bn+Dr,"$"].join("|")+")",bn+"?"+Dr+"+"+Mn,bn+"+"+Hn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_n,Ft].join("|"),"g"),qo=RegExp("["+Gn+St+hr+Br+"]"),Ro=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,po=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fo=-1,ri={};ri[B]=ri[S]=ri[O]=ri[F]=ri[Y]=ri[M]=ri[z]=ri[ue]=ri[ae]=!0,ri[p]=ri[m]=ri[w]=ri[v]=ri[Q]=ri[y]=ri[I]=ri[E]=ri[R]=ri[T]=ri[j]=ri[H]=ri[X]=ri[x]=ri[C]=!1;var $n={};$n[p]=$n[m]=$n[w]=$n[Q]=$n[v]=$n[y]=$n[B]=$n[S]=$n[O]=$n[F]=$n[Y]=$n[R]=$n[T]=$n[j]=$n[H]=$n[X]=$n[x]=$n[N]=$n[M]=$n[z]=$n[ue]=$n[ae]=!0,$n[I]=$n[E]=$n[C]=!1;var Bs={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},No=parseFloat,Qs=parseInt,bc=typeof mi=="object"&&mi&&mi.Object===Object&&mi,oA=typeof self=="object"&&self&&self.Object===Object&&self,Na=bc||oA||Function("return this")(),uu=r&&!r.nodeType&&r,Hc=uu&&e&&!e.nodeType&&e,lu=Hc&&Hc.exports===uu,yl=lu&&bc.process,Wo=function(){try{var J=Hc&&Hc.require&&Hc.require("util").types;return J||yl&&yl.binding&&yl.binding("util")}catch{}}(),Il=Wo&&Wo.isArrayBuffer,lh=Wo&&Wo.isDate,bl=Wo&&Wo.isMap,Ah=Wo&&Wo.isRegExp,sA=Wo&&Wo.isSet,hh=Wo&&Wo.isTypedArray;function ts(J,oe,Se){switch(Se.length){case 0:return J.call(oe);case 1:return J.call(oe,Se[0]);case 2:return J.call(oe,Se[0],Se[1]);case 3:return J.call(oe,Se[0],Se[1],Se[2])}return J.apply(oe,Se)}function fh(J,oe,Se,et){for(var ie=-1,xe=J==null?0:J.length;++ie-1}function Cl(J,oe,Se){for(var et=-1,ie=J==null?0:J.length;++et-1;);return Se}function pn(J,oe){for(var Se=J.length;Se--&&xs(oe,J[Se],0)>-1;);return Se}var ra=wl({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ui=wl({"&":"&","<":"<",">":">",'"':""","'":"'"});function Hi(J){return"\\"+Bs[J]}function Aa(J){return qo.test(J)}function ao(J){var oe=-1,Se=Array(J.size);return J.forEach(function(et,ie){Se[++oe]=[ie,et]}),Se}function Zi(J,oe){return function(Se){return J(oe(Se))}}function Yi(J,oe){for(var Se=-1,et=J.length,ie=0,xe=[];++Se",""":'"',"'":"'"}),G=function J(oe){var Se,et=(oe=oe==null?Na:G.defaults(Na.Object(),oe,G.pick(Na,po))).Array,ie=oe.Date,xe=oe.Error,tt=oe.Function,Bt=oe.Math,Gt=oe.Object,Xt=oe.RegExp,Yr=oe.String,qr=oe.TypeError,Bn=et.prototype,Zn=tt.prototype,Yn=Gt.prototype,Xn=oe["__core-js_shared__"],ni=Zn.toString,Cn=Yn.hasOwnProperty,ja=0,Za=(Se=/[^.]+$/.exec(Xn&&Xn.keys&&Xn.keys.IE_PROTO||""))?"Symbol(src)_1."+Se:"",Ha=Yn.toString,Xi=ni.call(Gt),Ko=Na._,js=Xt("^"+ni.call(Cn).replace(ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hu=lu?oe.Buffer:t,qc=oe.Symbol,ig=oe.Uint8Array,iI=Hu?Hu.allocUnsafe:t,$i=Zi(Gt.getPrototypeOf,Gt),Ki=Gt.create,oo=Yn.propertyIsEnumerable,Qi=Bn.splice,ko=qc?qc.isConcatSpreadable:t,Xa=qc?qc.iterator:t,zo=qc?qc.toStringTag:t,fa=function(){try{var b=Df(Gt,"defineProperty");return b({},"",{}),b}catch{}}(),vo=oe.clearTimeout!==Na.clearTimeout&&oe.clearTimeout,Wc=ie&&ie.now!==Na.Date.now&&ie.now,Fp=oe.setTimeout!==Na.setTimeout&&oe.setTimeout,aI=Bt.ceil,oI=Bt.floor,pw=Gt.getOwnPropertySymbols,t4=Hu?Hu.isBuffer:t,r3=oe.isFinite,r4=Bn.join,n4=Zi(Gt.keys,Gt),is=Bt.max,Hs=Bt.min,i4=ie.now,a4=oe.parseInt,n3=Bt.random,o4=Bn.reverse,vw=Df(oe,"DataView"),Np=Df(oe,"Map"),mw=Df(oe,"Promise"),ag=Df(oe,"Set"),Mp=Df(oe,"WeakMap"),Tp=Df(Gt,"create"),sI=Mp&&new Mp,og={},s4=Rf(vw),c4=Rf(Np),u4=Rf(mw),l4=Rf(ag),A4=Rf(Mp),cI=qc?qc.prototype:t,Lp=cI?cI.valueOf:t,i3=cI?cI.toString:t;function Te(b){if(xo(b)&&!Ii(b)&&!(b instanceof Pi)){if(b instanceof fu)return b;if(Cn.call(b,"__wrapped__"))return o5(b)}return new fu(b)}var sg=function(){function b(){}return function(_){if(!mo(_))return{};if(Ki)return Ki(_);b.prototype=_;var q=new b;return b.prototype=t,q}}();function uI(){}function fu(b,_){this.__wrapped__=b,this.__actions__=[],this.__chain__=!!_,this.__index__=0,this.__values__=t}function Pi(b){this.__wrapped__=b,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function kf(b){var _=-1,q=b==null?0:b.length;for(this.clear();++_=_?b:_)),b}function du(b,_,q,se,be,ze){var ft,Ct=1&_,Ot=2&_,gr=4&_;if(q&&(ft=be?q(b,se,be,ze):q(b)),ft!==t)return ft;if(!mo(b))return b;var vr=Ii(b);if(vr){if(ft=function(kr){var an=kr.length,oi=new kr.constructor(an);return an&&typeof kr[0]=="string"&&Cn.call(kr,"index")&&(oi.index=kr.index,oi.input=kr.input),oi}(b),!Ct)return wc(b,ft)}else{var jr=Ys(b),Rn=jr==E||jr==k;if(Ch(b))return D3(b,Ct);if(jr==j||jr==p||Rn&&!be){if(ft=Ot||Rn?{}:V3(b),!Ct)return Ot?function(kr,an){return xl(kr,K3(kr),an)}(b,function(kr,an){return kr&&xl(an,Qc(an),kr)}(ft,b)):function(kr,an){return xl(kr,Hw(kr),an)}(b,s3(ft,b))}else{if(!$n[jr])return be?b:{};ft=function(kr,an,oi){var dn=kr.constructor;switch(an){case w:return Tw(kr);case v:case y:return new dn(+kr);case Q:return function(fi,na){var Jn=na?Tw(fi.buffer):fi.buffer;return new fi.constructor(Jn,fi.byteOffset,fi.byteLength)}(kr,oi);case B:case S:case O:case F:case Y:case M:case z:case ue:case ae:return R3(kr,oi);case R:return new dn;case T:case x:return new dn(kr);case H:return function(fi){var na=new fi.constructor(fi.source,me.exec(fi));return na.lastIndex=fi.lastIndex,na}(kr);case X:return new dn;case N:return Ci=kr,Lp?Gt(Lp.call(Ci)):{}}var Ci}(b,jr,Ct)}}ze||(ze=new Yu);var Tn=ze.get(b);if(Tn)return Tn;ze.set(b,ft),w5(b)?b.forEach(function(kr){ft.add(du(kr,_,q,kr,b,ze))}):C5(b)&&b.forEach(function(kr,an){ft.set(an,du(kr,_,q,an,b,ze))});var zn=vr?t:(gr?Ot?Gw:Pw:Ot?Qc:ms)(b);return Mo(zn||b,function(kr,an){zn&&(kr=b[an=kr]),Op(ft,an,du(kr,_,q,an,b,ze))}),ft}function c3(b,_,q){var se=q.length;if(b==null)return!se;for(b=Gt(b);se--;){var be=q[se],ze=_[be],ft=b[be];if(ft===t&&!(be in b)||!ze(ft))return!1}return!0}function u3(b,_,q){if(typeof b!="function")throw new qr(n);return Jp(function(){b.apply(t,q)},_)}function Pp(b,_,q,se){var be=-1,ze=ks,ft=!0,Ct=b.length,Ot=[],gr=_.length;if(!Ct)return Ot;q&&(_=Ia(_,rs(q))),se?(ze=Cl,ft=!1):_.length>=200&&(ze=wt,ft=!1,_=new xf(_));e:for(;++be-1},lA.prototype.set=function(b,_){var q=this.__data__,se=lI(q,b);return se<0?(++this.size,q.push([b,_])):q[se][1]=_,this},AA.prototype.clear=function(){this.size=0,this.__data__={hash:new kf,map:new(Np||lA),string:new kf}},AA.prototype.delete=function(b){var _=CI(this,b).delete(b);return this.size-=_?1:0,_},AA.prototype.get=function(b){return CI(this,b).get(b)},AA.prototype.has=function(b){return CI(this,b).has(b)},AA.prototype.set=function(b,_){var q=CI(this,b),se=q.size;return q.set(b,_),this.size+=q.size==se?0:1,this},xf.prototype.add=xf.prototype.push=function(b){return this.__data__.set(b,a),this},xf.prototype.has=function(b){return this.__data__.has(b)},Yu.prototype.clear=function(){this.__data__=new lA,this.size=0},Yu.prototype.delete=function(b){var _=this.__data__,q=_.delete(b);return this.size=_.size,q},Yu.prototype.get=function(b){return this.__data__.get(b)},Yu.prototype.has=function(b){return this.__data__.has(b)},Yu.prototype.set=function(b,_){var q=this.__data__;if(q instanceof lA){var se=q.__data__;if(!Np||se.length<199)return se.push([b,_]),this.size=++q.size,this;q=this.__data__=new AA(se)}return q.set(b,_),this.size=q.size,this};var mh=T3(kl),l3=T3(Cw,!0);function g4(b,_){var q=!0;return mh(b,function(se,be,ze){return q=!!_(se,be,ze)}),q}function AI(b,_,q){for(var se=-1,be=b.length;++se0&&q(Ct)?_>1?Ss(Ct,_-1,q,se,be):Ec(be,Ct):se||(be[be.length]=Ct)}return be}var bw=L3(),h3=L3(!0);function kl(b,_){return b&&bw(b,_,ms)}function Cw(b,_){return b&&h3(b,_,ms)}function hI(b,_){return Cc(_,function(q){return pA(b[q])})}function _f(b,_){for(var q=0,se=(_=Ih(_,b)).length;b!=null&&q_}function p4(b,_){return b!=null&&Cn.call(b,_)}function v4(b,_){return b!=null&&_ in Gt(b)}function ww(b,_,q){for(var se=q?Cl:ks,be=b[0].length,ze=b.length,ft=ze,Ct=et(ze),Ot=1/0,gr=[];ft--;){var vr=b[ft];ft&&_&&(vr=Ia(vr,rs(_))),Ot=Hs(vr.length,Ot),Ct[ft]=!q&&(_||be>=120&&vr.length>=120)?new xf(ft&&vr):t}vr=b[0];var jr=-1,Rn=Ct[0];e:for(;++jr=Tn?zn:zn*(Ot[gr]=="desc"?-1:1)}return ft.index-Ct.index}(be,ze,q)})}function C3(b,_,q){for(var se=-1,be=_.length,ze={};++se-1;)Ct!==b&&Qi.call(Ct,Ot,1),Qi.call(b,Ot,1);return b}function E3(b,_){for(var q=b?_.length:0,se=q-1;q--;){var be=_[q];if(q==se||be!==ze){var ze=be;gA(be)?Qi.call(b,be,1):Rw(b,be)}}return b}function Sw(b,_){return b+oI(n3()*(_-b+1))}function _w(b,_){var q="";if(!b||_<1||_>h)return q;do _%2&&(q+=b),(_=oI(_/2))&&(b+=b);while(_);return q}function Di(b,_){return Ww($3(b,_,kc),b+"")}function y4(b){return o3(hg(b))}function I4(b,_){var q=hg(b);return EI(q,Sf(_,0,q.length))}function jp(b,_,q,se){if(!mo(b))return b;for(var be=-1,ze=(_=Ih(_,b)).length,ft=ze-1,Ct=b;Ct!=null&&++bebe?0:be+_),(q=q>be?be:q)<0&&(q+=be),be=_>q?0:q-_>>>0,_>>>=0;for(var ze=et(be);++se>>1,ft=b[ze];ft!==null&&!zc(ft)&&(q?ft<=_:ft<_)?se=ze+1:be=ze}return be}return Dw(b,_,kc,q)}function Dw(b,_,q,se){var be=0,ze=b==null?0:b.length;if(ze===0)return 0;for(var ft=(_=q(_))!=_,Ct=_===null,Ot=zc(_),gr=_===t;be=200){var gr=_?null:B4(b);if(gr)return Qo(gr);ft=!1,be=wt,Ot=new xf}else Ot=_?[]:Ct;e:for(;++se=se?b:gu(b,_,q)}var _3=vo||function(b){return Na.clearTimeout(b)};function D3(b,_){if(_)return b.slice();var q=b.length,se=iI?iI(q):new b.constructor(q);return b.copy(se),se}function Tw(b){var _=new b.constructor(b.byteLength);return new ig(_).set(new ig(b)),_}function R3(b,_){var q=_?Tw(b.buffer):b.buffer;return new b.constructor(q,b.byteOffset,b.length)}function F3(b,_){if(b!==_){var q=b!==t,se=b===null,be=b==b,ze=zc(b),ft=_!==t,Ct=_===null,Ot=_==_,gr=zc(_);if(!Ct&&!gr&&!ze&&b>_||ze&&ft&&Ot&&!Ct&&!gr||se&&ft&&Ot||!q&&Ot||!be)return 1;if(!se&&!ze&&!gr&&b<_||gr&&q&&be&&!se&&!ze||Ct&&q&&be||!ft&&be||!Ot)return-1}return 0}function N3(b,_,q,se){for(var be=-1,ze=b.length,ft=q.length,Ct=-1,Ot=_.length,gr=is(ze-ft,0),vr=et(Ot+gr),jr=!se;++Ct1?q[be-1]:t,ft=be>2?q[2]:t;for(ze=b.length>3&&typeof ze=="function"?(be--,ze):t,ft&&cc(q[0],q[1],ft)&&(ze=be<3?t:ze,be=1),_=Gt(_);++se-1?be[ze?_[ft]:ft]:t}}function G3(b){return dA(function(_){var q=_.length,se=q,be=fu.prototype.thru;for(b&&_.reverse();se--;){var ze=_[se];if(typeof ze!="function")throw new qr(n);if(be&&!ft&&bI(ze)=="wrapper")var ft=new fu([],!0)}for(se=ft?se:q;++se1&&dn.reverse(),vr&&OtCt))return!1;var gr=ze.get(b),vr=ze.get(_);if(gr&&vr)return gr==_&&vr==b;var jr=-1,Rn=!0,Tn=2&q?new xf:t;for(ze.set(b,_),ze.set(_,b);++jr-1&&b%1==0&&b<_}function cc(b,_,q){if(!mo(q))return!1;var se=typeof _;return!!(se=="number"?Bc(q)&&gA(_,q.length):se=="string"&&_ in q)&&Ju(q[_],b)}function Yw(b,_){if(Ii(b))return!1;var q=typeof b;return!(q!="number"&&q!="symbol"&&q!="boolean"&&b!=null&&!zc(b))||Z.test(b)||!At.test(b)||_!=null&&b in Gt(_)}function Jw(b){var _=bI(b),q=Te[_];if(typeof q!="function"||!(_ in Pi.prototype))return!1;if(b===q)return!0;var se=Uw(q);return!!se&&b===se[0]}(vw&&Ys(new vw(new ArrayBuffer(1)))!=Q||Np&&Ys(new Np)!=R||mw&&Ys(mw.resolve())!=W||ag&&Ys(new ag)!=X||Mp&&Ys(new Mp)!=C)&&(Ys=function(b){var _=sc(b),q=_==j?b.constructor:t,se=q?Rf(q):"";if(se)switch(se){case s4:return Q;case c4:return R;case u4:return W;case l4:return X;case A4:return C}return _});var x4=Xn?pA:lB;function Yp(b){var _=b&&b.constructor;return b===(typeof _=="function"&&_.prototype||Yn)}function Z3(b){return b==b&&!mo(b)}function X3(b,_){return function(q){return q!=null&&q[b]===_&&(_!==t||b in Gt(q))}}function $3(b,_,q){return _=is(_===t?b.length-1:_,0),function(){for(var se=arguments,be=-1,ze=is(se.length-_,0),ft=et(ze);++be1?"& ":"")+ze[Ct],ze=ze.join(ft>2?", ":" "),be.replace(ot,`{ /* [wrapped with `+ze+`] */ `)}(se,function(be,ze){return Mo(g,function(ft){var Ct="_."+ft[0];ze&ft[1]&&!ks(be,Ct)&&be.push(Ct)}),be.sort()}(function(be){var ze=be.match(pt);return ze?ze[1].split(Be):[]}(se),q)))}function n5(b){var _=0,q=0;return function(){var se=i4(),be=16-(se-q);if(q=se,be>0){if(++_>=800)return arguments[0]}else _=0;return b.apply(t,arguments)}}function EI(b,_){var q=-1,se=b.length,be=se-1;for(_=_===t?se:_;++q<_;){var ze=Sw(q,be),ft=b[ze];b[ze]=b[q],b[q]=ft}return b.length=_,b}var i5,Kw,zw,a5=(i5=function(b){var _=[];return b.charCodeAt(0)===46&&_.push(""),b.replace(ce,function(q,se,be,ze){_.push(be?ze.replace(yt,"$1"):se||q)}),_},Kw=kI(i5,function(b){return zw.size===500&&zw.clear(),b}),zw=Kw.cache,Kw);function Sl(b){if(typeof b=="string"||zc(b))return b;var _=b+"";return _=="0"&&1/b==-1/0?"-0":_}function Rf(b){if(b!=null){try{return ni.call(b)}catch{}try{return b+""}catch{}}return""}function o5(b){if(b instanceof Pi)return b.clone();var _=new fu(b.__wrapped__,b.__chain__);return _.__actions__=wc(b.__actions__),_.__index__=b.__index__,_.__values__=b.__values__,_}var S4=Di(function(b,_){return To(b)?Pp(b,Ss(_,1,To,!0)):[]}),_4=Di(function(b,_){var q=pu(_);return To(q)&&(q=t),To(b)?Pp(b,Ss(_,1,To,!0),ii(q,2)):[]}),D4=Di(function(b,_){var q=pu(_);return To(q)&&(q=t),To(b)?Pp(b,Ss(_,1,To,!0),t,q):[]});function s5(b,_,q){var se=b==null?0:b.length;if(!se)return-1;var be=q==null?0:ki(q);return be<0&&(be=is(se+be,0)),Yc(b,ii(_,3),be)}function c5(b,_,q){var se=b==null?0:b.length;if(!se)return-1;var be=se-1;return q!==t&&(be=ki(q),be=q<0?is(se+be,0):Hs(be,se-1)),Yc(b,ii(_,3),be,!0)}function u5(b){return b!=null&&b.length?Ss(b,1):[]}function l5(b){return b&&b.length?b[0]:t}var R4=Di(function(b){var _=Ia(b,Nw);return _.length&&_[0]===b[0]?ww(_):[]}),F4=Di(function(b){var _=pu(b),q=Ia(b,Nw);return _===pu(q)?_=t:q.pop(),q.length&&q[0]===b[0]?ww(q,ii(_,2)):[]}),N4=Di(function(b){var _=pu(b),q=Ia(b,Nw);return(_=typeof _=="function"?_:t)&&q.pop(),q.length&&q[0]===b[0]?ww(q,t,_):[]});function pu(b){var _=b==null?0:b.length;return _?b[_-1]:t}var M4=Di(A5);function A5(b,_){return b&&b.length&&_&&_.length?xw(b,_):b}var T4=dA(function(b,_){var q=b==null?0:b.length,se=Iw(b,_);return E3(b,Ia(_,function(be){return gA(be,q)?+be:be}).sort(F3)),se});function Vw(b){return b==null?b:o4.call(b)}var L4=Di(function(b){return yh(Ss(b,1,To,!0))}),O4=Di(function(b){var _=pu(b);return To(_)&&(_=t),yh(Ss(b,1,To,!0),ii(_,2))}),P4=Di(function(b){var _=pu(b);return _=typeof _=="function"?_:t,yh(Ss(b,1,To,!0),t,_)});function Zw(b){if(!b||!b.length)return[];var _=0;return b=Cc(b,function(q){if(To(q))return _=is(q.length,_),!0}),Ql(_,function(q){return Ia(b,Jc(q))})}function h5(b,_){if(!b||!b.length)return[];var q=Zw(b);return _==null?q:Ia(q,function(se){return ts(_,t,se)})}var G4=Di(function(b,_){return To(b)?Pp(b,_):[]}),U4=Di(function(b){return Fw(Cc(b,To))}),j4=Di(function(b){var _=pu(b);return To(_)&&(_=t),Fw(Cc(b,To),ii(_,2))}),H4=Di(function(b){var _=pu(b);return _=typeof _=="function"?_:t,Fw(Cc(b,To),t,_)}),Y4=Di(Zw),J4=Di(function(b){var _=b.length,q=_>1?b[_-1]:t;return q=typeof q=="function"?(b.pop(),q):t,h5(b,q)});function f5(b){var _=Te(b);return _.__chain__=!0,_}function wI(b,_){return _(b)}var q4=dA(function(b){var _=b.length,q=_?b[0]:0,se=this.__wrapped__,be=function(ze){return Iw(ze,b)};return!(_>1||this.__actions__.length)&&se instanceof Pi&&gA(q)?((se=se.slice(q,+q+(_?1:0))).__actions__.push({func:wI,args:[be],thisArg:t}),new fu(se,this.__chain__).thru(function(ze){return _&&!ze.length&&ze.push(t),ze})):this.thru(be)}),W4=pI(function(b,_,q){Cn.call(b,q)?++b[q]:hA(b,q,1)}),K4=P3(s5),z4=P3(c5);function d5(b,_){return(Ii(b)?Mo:mh)(b,ii(_,3))}function g5(b,_){return(Ii(b)?Au:l3)(b,ii(_,3))}var V4=pI(function(b,_,q){Cn.call(b,q)?b[q].push(_):hA(b,q,[_])}),Z4=Di(function(b,_,q){var se=-1,be=typeof _=="function",ze=Bc(b)?et(b.length):[];return mh(b,function(ft){ze[++se]=be?ts(_,ft,q):Gp(ft,_,q)}),ze}),X4=pI(function(b,_,q){hA(b,q,_)});function BI(b,_){return(Ii(b)?Ia:v3)(b,ii(_,3))}var $4=pI(function(b,_,q){b[q?0:1].push(_)},function(){return[[],[]]}),ek=Di(function(b,_){if(b==null)return[];var q=_.length;return q>1&&cc(b,_[0],_[1])?_=[]:q>2&&cc(_[0],_[1],_[2])&&(_=[_[0]]),b3(b,Ss(_,1),[])}),QI=Wc||function(){return Na.Date.now()};function p5(b,_,q){return _=q?t:_,_=b&&_==null?b.length:_,fA(b,u,t,t,t,t,_)}function v5(b,_){var q;if(typeof _!="function")throw new qr(n);return b=ki(b),function(){return--b>0&&(q=_.apply(this,arguments)),b<=1&&(_=t),q}}var Xw=Di(function(b,_,q){var se=1;if(q.length){var be=Yi(q,lg(Xw));se|=i}return fA(b,se,_,q,be)}),m5=Di(function(b,_,q){var se=3;if(q.length){var be=Yi(q,lg(m5));se|=i}return fA(_,se,b,q,be)});function y5(b,_,q){var se,be,ze,ft,Ct,Ot,gr=0,vr=!1,jr=!1,Rn=!0;if(typeof b!="function")throw new qr(n);function Tn(dn){var Ci=se,fi=be;return se=be=t,gr=dn,ft=b.apply(fi,Ci)}function zn(dn){var Ci=dn-Ot;return Ot===t||Ci>=_||Ci<0||jr&&dn-gr>=ze}function kr(){var dn=QI();if(zn(dn))return an(dn);Ct=Jp(kr,function(Ci){var fi=_-(Ci-Ot);return jr?Hs(fi,ze-(Ci-gr)):fi}(dn))}function an(dn){return Ct=t,Rn&&se?Tn(dn):(se=be=t,ft)}function oi(){var dn=QI(),Ci=zn(dn);if(se=arguments,be=this,Ot=dn,Ci){if(Ct===t)return function(fi){return gr=fi,Ct=Jp(kr,_),vr?Tn(fi):ft}(Ot);if(jr)return _3(Ct),Ct=Jp(kr,_),Tn(Ot)}return Ct===t&&(Ct=Jp(kr,_)),ft}return _=vu(_)||0,mo(q)&&(vr=!!q.leading,ze=(jr="maxWait"in q)?is(vu(q.maxWait)||0,_):ze,Rn="trailing"in q?!!q.trailing:Rn),oi.cancel=function(){Ct!==t&&_3(Ct),gr=0,se=Ot=be=Ct=t},oi.flush=function(){return Ct===t?ft:an(QI())},oi}var tk=Di(function(b,_){return u3(b,1,_)}),rk=Di(function(b,_,q){return u3(b,vu(_)||0,q)});function kI(b,_){if(typeof b!="function"||_!=null&&typeof _!="function")throw new qr(n);var q=function se(){var be=arguments,ze=_?_.apply(this,be):be[0],ft=se.cache;if(ft.has(ze))return ft.get(ze);var Ct=b.apply(this,be);return se.cache=ft.set(ze,Ct)||ft,Ct};return q.cache=new(kI.Cache||AA),q}function xI(b){if(typeof b!="function")throw new qr(n);return function(){var _=arguments;switch(_.length){case 0:return!b.call(this);case 1:return!b.call(this,_[0]);case 2:return!b.call(this,_[0],_[1]);case 3:return!b.call(this,_[0],_[1],_[2])}return!b.apply(this,_)}}kI.Cache=AA;var nk=w4(function(b,_){var q=(_=_.length==1&&Ii(_[0])?Ia(_[0],rs(ii())):Ia(Ss(_,1),rs(ii()))).length;return Di(function(se){for(var be=-1,ze=Hs(se.length,q);++be=_}),Ff=d3(function(){return arguments}())?d3:function(b){return xo(b)&&Cn.call(b,"callee")&&!oo.call(b,"callee")},Ii=et.isArray,sk=Il?rs(Il):function(b){return xo(b)&&sc(b)==w};function Bc(b){return b!=null&&SI(b.length)&&!pA(b)}function To(b){return xo(b)&&Bc(b)}var Ch=t4||lB,ck=lh?rs(lh):function(b){return xo(b)&&sc(b)==y};function eB(b){if(!xo(b))return!1;var _=sc(b);return _==I||_=="[object DOMException]"||typeof b.message=="string"&&typeof b.name=="string"&&!qp(b)}function pA(b){if(!mo(b))return!1;var _=sc(b);return _==E||_==k||_=="[object AsyncFunction]"||_=="[object Proxy]"}function b5(b){return typeof b=="number"&&b==ki(b)}function SI(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=h}function mo(b){var _=typeof b;return b!=null&&(_=="object"||_=="function")}function xo(b){return b!=null&&typeof b=="object"}var C5=bl?rs(bl):function(b){return xo(b)&&Ys(b)==R};function E5(b){return typeof b=="number"||xo(b)&&sc(b)==T}function qp(b){if(!xo(b)||sc(b)!=j)return!1;var _=$i(b);if(_===null)return!0;var q=Cn.call(_,"constructor")&&_.constructor;return typeof q=="function"&&q instanceof q&&ni.call(q)==Xi}var tB=Ah?rs(Ah):function(b){return xo(b)&&sc(b)==H},w5=sA?rs(sA):function(b){return xo(b)&&Ys(b)==X};function _I(b){return typeof b=="string"||!Ii(b)&&xo(b)&&sc(b)==x}function zc(b){return typeof b=="symbol"||xo(b)&&sc(b)==N}var Ag=hh?rs(hh):function(b){return xo(b)&&SI(b.length)&&!!ri[sc(b)]},uk=II(kw),lk=II(function(b,_){return b<=_});function B5(b){if(!b)return[];if(Bc(b))return _I(b)?ha(b):wc(b);if(Xa&&b[Xa])return function(q){for(var se,be=[];!(se=q.next()).done;)be.push(se.value);return be}(b[Xa]());var _=Ys(b);return(_==R?ao:_==X?Qo:hg)(b)}function vA(b){return b?(b=vu(b))===A||b===-1/0?17976931348623157e292*(b<0?-1:1):b==b?b:0:b===0?b:0}function ki(b){var _=vA(b),q=_%1;return _==_?q?_-q:_:0}function Q5(b){return b?Sf(ki(b),0,d):0}function vu(b){if(typeof b=="number")return b;if(zc(b))return f;if(mo(b)){var _=typeof b.valueOf=="function"?b.valueOf():b;b=mo(_)?_+"":_}if(typeof b!="string")return b===0?b:+b;b=uA(b);var q=Ze.test(b);return q||Pe.test(b)?Qs(b.slice(2),q?2:8):Re.test(b)?f:+b}function k5(b){return xl(b,Qc(b))}function ba(b){return b==null?"":Kc(b)}var Ak=cg(function(b,_){if(Yp(_)||Bc(_))xl(_,ms(_),b);else for(var q in _)Cn.call(_,q)&&Op(b,q,_[q])}),x5=cg(function(b,_){xl(_,Qc(_),b)}),DI=cg(function(b,_,q,se){xl(_,Qc(_),b,se)}),hk=cg(function(b,_,q,se){xl(_,ms(_),b,se)}),fk=dA(Iw),dk=Di(function(b,_){b=Gt(b);var q=-1,se=_.length,be=se>2?_[2]:t;for(be&&cc(_[0],_[1],be)&&(se=1);++q1),ze}),xl(b,Gw(b),q),se&&(q=du(q,7,Q4));for(var be=_.length;be--;)Rw(q,_[be]);return q}),bk=dA(function(b,_){return b==null?{}:function(q,se){return C3(q,se,function(be,ze){return nB(q,ze)})}(b,_)});function _5(b,_){if(b==null)return{};var q=Ia(Gw(b),function(se){return[se]});return _=ii(_),C3(b,q,function(se,be){return _(se,be[0])})}var D5=Y3(ms),R5=Y3(Qc);function hg(b){return b==null?[]:$e(b,ms(b))}var Ck=ug(function(b,_,q){return _=_.toLowerCase(),b+(q?F5(_):_)});function F5(b){return iB(ba(b).toLowerCase())}function N5(b){return(b=ba(b))&&b.replace(Je,ra).replace(Bi,"")}var Ek=ug(function(b,_,q){return b+(q?"-":"")+_.toLowerCase()}),wk=ug(function(b,_,q){return b+(q?" ":"")+_.toLowerCase()}),Bk=O3("toLowerCase"),Qk=ug(function(b,_,q){return b+(q?"_":"")+_.toLowerCase()}),kk=ug(function(b,_,q){return b+(q?" ":"")+iB(_)}),xk=ug(function(b,_,q){return b+(q?" ":"")+_.toUpperCase()}),iB=O3("toUpperCase");function M5(b,_,q){return b=ba(b),(_=q?t:_)===t?function(se){return Ro.test(se)}(b)?function(se){return se.match(Va)||[]}(b):function(se){return se.match(Ee)||[]}(b):b.match(_)||[]}var T5=Di(function(b,_){try{return ts(b,t,_)}catch(q){return eB(q)?q:new xe(q)}}),Sk=dA(function(b,_){return Mo(_,function(q){q=Sl(q),hA(b,q,Xw(b[q],b))}),b});function aB(b){return function(){return b}}var _k=G3(),Dk=G3(!0);function kc(b){return b}function oB(b){return p3(typeof b=="function"?b:du(b,1))}var Rk=Di(function(b,_){return function(q){return Gp(q,b,_)}}),Fk=Di(function(b,_){return function(q){return Gp(b,q,_)}});function sB(b,_,q){var se=ms(_),be=hI(_,se);q!=null||mo(_)&&(be.length||!se.length)||(q=_,_=b,b=this,be=hI(_,ms(_)));var ze=!(mo(q)&&"chain"in q&&!q.chain),ft=pA(b);return Mo(be,function(Ct){var Ot=_[Ct];b[Ct]=Ot,ft&&(b.prototype[Ct]=function(){var gr=this.__chain__;if(ze||gr){var vr=b(this.__wrapped__);return(vr.__actions__=wc(this.__actions__)).push({func:Ot,args:arguments,thisArg:b}),vr.__chain__=gr,vr}return Ot.apply(b,Ec([this.value()],arguments))})}),b}function cB(){}var Nk=Lw(Ia),Mk=Lw(dh),Tk=Lw(oc);function L5(b){return Yw(b)?Jc(Sl(b)):function(_){return function(q){return _f(q,_)}}(b)}var Lk=j3(),Ok=j3(!0);function uB(){return[]}function lB(){return!1}var Pk=mI(function(b,_){return b+_},0),Gk=Ow("ceil"),Uk=mI(function(b,_){return b/_},1),jk=Ow("floor"),AB,Hk=mI(function(b,_){return b*_},1),Yk=Ow("round"),Jk=mI(function(b,_){return b-_},0);return Te.after=function(b,_){if(typeof _!="function")throw new qr(n);return b=ki(b),function(){if(--b<1)return _.apply(this,arguments)}},Te.ary=p5,Te.assign=Ak,Te.assignIn=x5,Te.assignInWith=DI,Te.assignWith=hk,Te.at=fk,Te.before=v5,Te.bind=Xw,Te.bindAll=Sk,Te.bindKey=m5,Te.castArray=function(){if(!arguments.length)return[];var b=arguments[0];return Ii(b)?b:[b]},Te.chain=f5,Te.chunk=function(b,_,q){_=(q?cc(b,_,q):_===t)?1:is(ki(_),0);var se=b==null?0:b.length;if(!se||_<1)return[];for(var be=0,ze=0,ft=et(aI(se/_));begr?0:gr+Ct),(Ot=Ot===t||Ot>gr?gr:ki(Ot))<0&&(Ot+=gr),Ot=Ct>Ot?0:Q5(Ot);Ct>>0)?(b=ba(b))&&(typeof _=="string"||_!=null&&!tB(_))&&!(_=Kc(_))&&Aa(b)?bh(ha(b),0,q):b.split(_,q):[]},Te.spread=function(b,_){if(typeof b!="function")throw new qr(n);return _=_==null?0:is(ki(_),0),Di(function(q){var se=q[_],be=bh(q,0,_);return se&&Ec(be,se),ts(b,this,be)})},Te.tail=function(b){var _=b==null?0:b.length;return _?gu(b,1,_):[]},Te.take=function(b,_,q){return b&&b.length?gu(b,0,(_=q||_===t?1:ki(_))<0?0:_):[]},Te.takeRight=function(b,_,q){var se=b==null?0:b.length;return se?gu(b,(_=se-(_=q||_===t?1:ki(_)))<0?0:_,se):[]},Te.takeRightWhile=function(b,_){return b&&b.length?gI(b,ii(_,3),!1,!0):[]},Te.takeWhile=function(b,_){return b&&b.length?gI(b,ii(_,3)):[]},Te.tap=function(b,_){return _(b),b},Te.throttle=function(b,_,q){var se=!0,be=!0;if(typeof b!="function")throw new qr(n);return mo(q)&&(se="leading"in q?!!q.leading:se,be="trailing"in q?!!q.trailing:be),y5(b,_,{leading:se,maxWait:_,trailing:be})},Te.thru=wI,Te.toArray=B5,Te.toPairs=D5,Te.toPairsIn=R5,Te.toPath=function(b){return Ii(b)?Ia(b,Sl):zc(b)?[b]:wc(a5(ba(b)))},Te.toPlainObject=k5,Te.transform=function(b,_,q){var se=Ii(b),be=se||Ch(b)||Ag(b);if(_=ii(_,4),q==null){var ze=b&&b.constructor;q=be?se?new ze:[]:mo(b)&&pA(ze)?sg($i(b)):{}}return(be?Mo:kl)(b,function(ft,Ct,Ot){return _(q,ft,Ct,Ot)}),q},Te.unary=function(b){return p5(b,1)},Te.union=L4,Te.unionBy=O4,Te.unionWith=P4,Te.uniq=function(b){return b&&b.length?yh(b):[]},Te.uniqBy=function(b,_){return b&&b.length?yh(b,ii(_,2)):[]},Te.uniqWith=function(b,_){return _=typeof _=="function"?_:t,b&&b.length?yh(b,t,_):[]},Te.unset=function(b,_){return b==null||Rw(b,_)},Te.unzip=Zw,Te.unzipWith=h5,Te.update=function(b,_,q){return b==null?b:k3(b,_,Mw(q))},Te.updateWith=function(b,_,q,se){return se=typeof se=="function"?se:t,b==null?b:k3(b,_,Mw(q),se)},Te.values=hg,Te.valuesIn=function(b){return b==null?[]:$e(b,Qc(b))},Te.without=G4,Te.words=M5,Te.wrap=function(b,_){return $w(Mw(_),b)},Te.xor=U4,Te.xorBy=j4,Te.xorWith=H4,Te.zip=Y4,Te.zipObject=function(b,_){return S3(b||[],_||[],Op)},Te.zipObjectDeep=function(b,_){return S3(b||[],_||[],jp)},Te.zipWith=J4,Te.entries=D5,Te.entriesIn=R5,Te.extend=x5,Te.extendWith=DI,sB(Te,Te),Te.add=Pk,Te.attempt=T5,Te.camelCase=Ck,Te.capitalize=F5,Te.ceil=Gk,Te.clamp=function(b,_,q){return q===t&&(q=_,_=t),q!==t&&(q=(q=vu(q))==q?q:0),_!==t&&(_=(_=vu(_))==_?_:0),Sf(vu(b),_,q)},Te.clone=function(b){return du(b,4)},Te.cloneDeep=function(b){return du(b,5)},Te.cloneDeepWith=function(b,_){return du(b,5,_=typeof _=="function"?_:t)},Te.cloneWith=function(b,_){return du(b,4,_=typeof _=="function"?_:t)},Te.conformsTo=function(b,_){return _==null||c3(b,_,ms(_))},Te.deburr=N5,Te.defaultTo=function(b,_){return b==null||b!=b?_:b},Te.divide=Uk,Te.endsWith=function(b,_,q){b=ba(b),_=Kc(_);var se=b.length,be=q=q===t?se:Sf(ki(q),0,se);return(q-=_.length)>=0&&b.slice(q,be)==_},Te.eq=Ju,Te.escape=function(b){return(b=ba(b))&&de.test(b)?b.replace(te,ui):b},Te.escapeRegExp=function(b){return(b=ba(b))&&Ve.test(b)?b.replace(ye,"\\$&"):b},Te.every=function(b,_,q){var se=Ii(b)?dh:g4;return q&&cc(b,_,q)&&(_=t),se(b,ii(_,3))},Te.find=K4,Te.findIndex=s5,Te.findKey=function(b,_){return ju(b,ii(_,3),kl)},Te.findLast=z4,Te.findLastIndex=c5,Te.findLastKey=function(b,_){return ju(b,ii(_,3),Cw)},Te.floor=jk,Te.forEach=d5,Te.forEachRight=g5,Te.forIn=function(b,_){return b==null?b:bw(b,ii(_,3),Qc)},Te.forInRight=function(b,_){return b==null?b:h3(b,ii(_,3),Qc)},Te.forOwn=function(b,_){return b&&kl(b,ii(_,3))},Te.forOwnRight=function(b,_){return b&&Cw(b,ii(_,3))},Te.get=rB,Te.gt=ak,Te.gte=ok,Te.has=function(b,_){return b!=null&&z3(b,_,p4)},Te.hasIn=nB,Te.head=l5,Te.identity=kc,Te.includes=function(b,_,q,se){b=Bc(b)?b:hg(b),q=q&&!se?ki(q):0;var be=b.length;return q<0&&(q=is(be+q,0)),_I(b)?q<=be&&b.indexOf(_,q)>-1:!!be&&xs(b,_,q)>-1},Te.indexOf=function(b,_,q){var se=b==null?0:b.length;if(!se)return-1;var be=q==null?0:ki(q);return be<0&&(be=is(se+be,0)),xs(b,_,be)},Te.inRange=function(b,_,q){return _=vA(_),q===t?(q=_,_=0):q=vA(q),function(se,be,ze){return se>=Hs(be,ze)&&se=-9007199254740991&&b<=h},Te.isSet=w5,Te.isString=_I,Te.isSymbol=zc,Te.isTypedArray=Ag,Te.isUndefined=function(b){return b===t},Te.isWeakMap=function(b){return xo(b)&&Ys(b)==C},Te.isWeakSet=function(b){return xo(b)&&sc(b)=="[object WeakSet]"},Te.join=function(b,_){return b==null?"":r4.call(b,_)},Te.kebabCase=Ek,Te.last=pu,Te.lastIndexOf=function(b,_,q){var se=b==null?0:b.length;if(!se)return-1;var be=se;return q!==t&&(be=(be=ki(q))<0?is(se+be,0):Hs(be,se-1)),_==_?function(ze,ft,Ct){for(var Ot=Ct+1;Ot--;)if(ze[Ot]===ft)return Ot;return Ot}(b,_,be):Yc(b,vh,be,!0)},Te.lowerCase=wk,Te.lowerFirst=Bk,Te.lt=uk,Te.lte=lk,Te.max=function(b){return b&&b.length?AI(b,kc,Ew):t},Te.maxBy=function(b,_){return b&&b.length?AI(b,ii(_,2),Ew):t},Te.mean=function(b){return El(b,kc)},Te.meanBy=function(b,_){return El(b,ii(_,2))},Te.min=function(b){return b&&b.length?AI(b,kc,kw):t},Te.minBy=function(b,_){return b&&b.length?AI(b,ii(_,2),kw):t},Te.stubArray=uB,Te.stubFalse=lB,Te.stubObject=function(){return{}},Te.stubString=function(){return""},Te.stubTrue=function(){return!0},Te.multiply=Hk,Te.nth=function(b,_){return b&&b.length?I3(b,ki(_)):t},Te.noConflict=function(){return Na._===this&&(Na._=Ko),this},Te.noop=cB,Te.now=QI,Te.pad=function(b,_,q){b=ba(b);var se=(_=ki(_))?Ua(b):0;if(!_||se>=_)return b;var be=(_-se)/2;return yI(oI(be),q)+b+yI(aI(be),q)},Te.padEnd=function(b,_,q){b=ba(b);var se=(_=ki(_))?Ua(b):0;return _&&se<_?b+yI(_-se,q):b},Te.padStart=function(b,_,q){b=ba(b);var se=(_=ki(_))?Ua(b):0;return _&&se<_?yI(_-se,q)+b:b},Te.parseInt=function(b,_,q){return q||_==null?_=0:_&&(_=+_),a4(ba(b).replace(dt,""),_||0)},Te.random=function(b,_,q){if(q&&typeof q!="boolean"&&cc(b,_,q)&&(_=q=t),q===t&&(typeof _=="boolean"?(q=_,_=t):typeof b=="boolean"&&(q=b,b=t)),b===t&&_===t?(b=0,_=1):(b=vA(b),_===t?(_=b,b=0):_=vA(_)),b>_){var se=b;b=_,_=se}if(q||b%1||_%1){var be=n3();return Hs(b+be*(_-b+No("1e-"+((be+"").length-1))),_)}return Sw(b,_)},Te.reduce=function(b,_,q){var se=Ii(b)?cA:hu,be=arguments.length<3;return se(b,ii(_,4),q,be,mh)},Te.reduceRight=function(b,_,q){var se=Ii(b)?gh:hu,be=arguments.length<3;return se(b,ii(_,4),q,be,l3)},Te.repeat=function(b,_,q){return _=(q?cc(b,_,q):_===t)?1:ki(_),_w(ba(b),_)},Te.replace=function(){var b=arguments,_=ba(b[0]);return b.length<3?_:_.replace(b[1],b[2])},Te.result=function(b,_,q){var se=-1,be=(_=Ih(_,b)).length;for(be||(be=1,b=t);++seh)return[];var q=d,se=Hs(b,d);_=ii(_),b-=d;for(var be=Ql(se,_);++q=ze)return b;var Ct=q-Ua(se);if(Ct<1)return se;var Ot=ft?bh(ft,0,Ct).join(""):b.slice(0,Ct);if(be===t)return Ot+se;if(ft&&(Ct+=Ot.length-Ct),tB(be)){if(b.slice(Ct).search(be)){var gr,vr=Ot;for(be.global||(be=Xt(be.source,ba(me.exec(be))+"g")),be.lastIndex=0;gr=be.exec(vr);)var jr=gr.index;Ot=Ot.slice(0,jr===t?Ct:jr)}}else if(b.indexOf(Kc(be),Ct)!=Ct){var Rn=Ot.lastIndexOf(be);Rn>-1&&(Ot=Ot.slice(0,Rn))}return Ot+se},Te.unescape=function(b){return(b=ba(b))&&he.test(b)?b.replace(Ae,vs):b},Te.uniqueId=function(b){var _=++ja;return ba(b)+_},Te.upperCase=xk,Te.upperFirst=iB,Te.each=d5,Te.eachRight=g5,Te.first=l5,sB(Te,(AB={},kl(Te,function(b,_){Cn.call(Te.prototype,_)||(AB[_]=b)}),AB),{chain:!1}),Te.VERSION="4.17.21",Mo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(b){Te[b].placeholder=Te}),Mo(["drop","take"],function(b,_){Pi.prototype[b]=function(q){q=q===t?1:is(ki(q),0);var se=this.__filtered__&&!_?new Pi(this):this.clone();return se.__filtered__?se.__takeCount__=Hs(q,se.__takeCount__):se.__views__.push({size:Hs(q,d),type:b+(se.__dir__<0?"Right":"")}),se},Pi.prototype[b+"Right"]=function(q){return this.reverse()[b](q).reverse()}}),Mo(["filter","map","takeWhile"],function(b,_){var q=_+1,se=q==1||q==3;Pi.prototype[b]=function(be){var ze=this.clone();return ze.__iteratees__.push({iteratee:ii(be,3),type:q}),ze.__filtered__=ze.__filtered__||se,ze}}),Mo(["head","last"],function(b,_){var q="take"+(_?"Right":"");Pi.prototype[b]=function(){return this[q](1).value()[0]}}),Mo(["initial","tail"],function(b,_){var q="drop"+(_?"":"Right");Pi.prototype[b]=function(){return this.__filtered__?new Pi(this):this[q](1)}}),Pi.prototype.compact=function(){return this.filter(kc)},Pi.prototype.find=function(b){return this.filter(b).head()},Pi.prototype.findLast=function(b){return this.reverse().find(b)},Pi.prototype.invokeMap=Di(function(b,_){return typeof b=="function"?new Pi(this):this.map(function(q){return Gp(q,b,_)})}),Pi.prototype.reject=function(b){return this.filter(xI(ii(b)))},Pi.prototype.slice=function(b,_){b=ki(b);var q=this;return q.__filtered__&&(b>0||_<0)?new Pi(q):(b<0?q=q.takeRight(-b):b&&(q=q.drop(b)),_!==t&&(q=(_=ki(_))<0?q.dropRight(-_):q.take(_-b)),q)},Pi.prototype.takeRightWhile=function(b){return this.reverse().takeWhile(b).reverse()},Pi.prototype.toArray=function(){return this.take(d)},kl(Pi.prototype,function(b,_){var q=/^(?:filter|find|map|reject)|While$/.test(_),se=/^(?:head|last)$/.test(_),be=Te[se?"take"+(_=="last"?"Right":""):_],ze=se||/^find/.test(_);be&&(Te.prototype[_]=function(){var ft=this.__wrapped__,Ct=se?[1]:arguments,Ot=ft instanceof Pi,gr=Ct[0],vr=Ot||Ii(ft),jr=function(oi){var dn=be.apply(Te,Ec([oi],Ct));return se&&Rn?dn[0]:dn};vr&&q&&typeof gr=="function"&&gr.length!=1&&(Ot=vr=!1);var Rn=this.__chain__,Tn=!!this.__actions__.length,zn=ze&&!Rn,kr=Ot&&!Tn;if(!ze&&vr){ft=kr?ft:new Pi(this);var an=b.apply(ft,Ct);return an.__actions__.push({func:wI,args:[jr],thisArg:t}),new fu(an,Rn)}return zn&&kr?b.apply(this,Ct):(an=this.thru(jr),zn?se?an.value()[0]:an.value():an)})}),Mo(["pop","push","shift","sort","splice","unshift"],function(b){var _=Bn[b],q=/^(?:push|sort|unshift)$/.test(b)?"tap":"thru",se=/^(?:pop|shift)$/.test(b);Te.prototype[b]=function(){var be=arguments;if(se&&!this.__chain__){var ze=this.value();return _.apply(Ii(ze)?ze:[],be)}return this[q](function(ft){return _.apply(Ii(ft)?ft:[],be)})}}),kl(Pi.prototype,function(b,_){var q=Te[_];if(q){var se=q.name+"";Cn.call(og,se)||(og[se]=[]),og[se].push({name:_,func:q})}}),og[vI(t,2).name]=[{name:"wrapper",func:t}],Pi.prototype.clone=function(){var b=new Pi(this.__wrapped__);return b.__actions__=wc(this.__actions__),b.__dir__=this.__dir__,b.__filtered__=this.__filtered__,b.__iteratees__=wc(this.__iteratees__),b.__takeCount__=this.__takeCount__,b.__views__=wc(this.__views__),b},Pi.prototype.reverse=function(){if(this.__filtered__){var b=new Pi(this);b.__dir__=-1,b.__filtered__=!0}else(b=this.clone()).__dir__*=-1;return b},Pi.prototype.value=function(){var b=this.__wrapped__.value(),_=this.__dir__,q=Ii(b),se=_<0,be=q?b.length:0,ze=function(na,Jn,si){for(var as=-1,Lo=si.length;++as=this.__values__.length;return{done:b,value:b?t:this.__values__[this.__index__++]}},Te.prototype.plant=function(b){for(var _,q=this;q instanceof uI;){var se=o5(q);se.__index__=0,se.__values__=t,_?be.__wrapped__=se:_=se;var be=se;q=q.__wrapped__}return be.__wrapped__=b,_},Te.prototype.reverse=function(){var b=this.__wrapped__;if(b instanceof Pi){var _=b;return this.__actions__.length&&(_=new Pi(this)),(_=_.reverse()).__actions__.push({func:wI,args:[Vw],thisArg:t}),new fu(_,this.__chain__)}return this.thru(Vw)},Te.prototype.toJSON=Te.prototype.valueOf=Te.prototype.value=function(){return x3(this.__wrapped__,this.__actions__)},Te.prototype.first=Te.prototype.head,Xa&&(Te.prototype[Xa]=function(){return this}),Te}();Hc?((Hc.exports=G)._=G,uu._=G):Na._=G}).call(mi)})(i0,i0.exports);var cd=i0.exports;function a0(e){for(var r=(e=e.replace("#","")).match(/../g),t=0;t<3;t++)r[t]=parseInt(r[t],16);return r}function P1(e,r,t){for(var n=[e.toString(16),r.toString(16),t.toString(16)],a=0;a<3;a++)n[a].length==1&&(n[a]="0"+n[a]);return"#"+n.join("")}var ud={exports:{}};(function(e,r){e.exports=function(){var t=1e3,n=6e4,a=36e5,s="millisecond",o="second",i="minute",c="hour",u="day",l="week",A="month",h="quarter",f="year",d="date",g="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var C=["th","st","nd","rd"],w=N%100;return"["+N+(C[(w-20)%10]||C[w]||C[0])+"]"}},y=function(N,C,w){var Q=String(N);return!Q||Q.length>=C?N:""+Array(C+1-Q.length).join(w)+N},I={s:y,z:function(N){var C=-N.utcOffset(),w=Math.abs(C),Q=Math.floor(w/60),B=w%60;return(C<=0?"+":"-")+y(Q,2,"0")+":"+y(B,2,"0")},m:function N(C,w){if(C.date()1)return N(O[0])}else{var F=C.name;k[F]=C,B=F}return!Q&&B&&(E=B),B||!Q&&E},W=function(N,C){if(T(N))return N.clone();var w=typeof C=="object"?C:{};return w.date=N,w.args=arguments,new X(w)},H=I;H.l=j,H.i=T,H.w=function(N,C){return W(N,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var X=function(){function N(w){this.$L=j(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[R]=!0}var C=N.prototype;return C.parse=function(w){this.$d=function(Q){var B=Q.date,S=Q.utc;if(B===null)return new Date(NaN);if(H.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var O=B.match(p);if(O){var F=O[2]-1||0,Y=(O[7]||"0").substring(0,3);return S?new Date(Date.UTC(O[1],F,O[3]||1,O[4]||0,O[5]||0,O[6]||0,Y)):new Date(O[1],F,O[3]||1,O[4]||0,O[5]||0,O[6]||0,Y)}}return new Date(B)}(w),this.init()},C.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},C.$utils=function(){return H},C.isValid=function(){return this.$d.toString()!==g},C.isSame=function(w,Q){var B=W(w);return this.startOf(Q)<=B&&B<=this.endOf(Q)},C.isAfter=function(w,Q){return W(w)>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return r.join("")}var sl,Yh=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1);return r==255&&t==254?function(n){for(var a=[],s=0;s>1;++s)a[s]=String.fromCharCode(n.charCodeAt(2*s)+(n.charCodeAt(2*s+1)<<8));return a.join("")}(e.slice(2)):r==254&&t==255?U1(e.slice(2)):r==65279?e.slice(1):e},Ad=function(e){return String.fromCharCode(e)},j1=function(e){return String.fromCharCode(e)},cl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function YA(e){for(var r="",t=0,n=0,a=0,s=0,o=0,i=0,c=0,u=0;u>2,o=(3&t)<<4|(n=e.charCodeAt(u++))>>4,i=(15&n)<<2|(a=e.charCodeAt(u++))>>6,c=63&a,isNaN(n)?i=c=64:isNaN(a)&&(c=64),r+=cl.charAt(s)+cl.charAt(o)+cl.charAt(i)+cl.charAt(c);return r}function $s(e){var r="",t=0,n=0,a=0,s=0,o=0,i=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c>4,r+=String.fromCharCode(t),n=(15&s)<<4|(o=cl.indexOf(e.charAt(c++)))>>2,o!==64&&(r+=String.fromCharCode(n)),a=(3&o)<<6|(i=cl.indexOf(e.charAt(c++))),i!==64&&(r+=String.fromCharCode(a));return r}var wi=function(){return typeof Buffer<"u"&&typeof process<"u"&&process.versions!==void 0&&!!process.versions.node}(),_u=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(r,t){return t?new Buffer(r,t):new Buffer(r)}:Buffer.from.bind(Buffer)}return function(){}}();function ul(e){return wi?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function H1(e){return wi?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var ec=function(e){return wi?_u(e,"binary"):e.split("").map(function(r){return 255&r.charCodeAt(0)})};function hd(e){if(typeof ArrayBuffer>"u")return ec(e);for(var r=new ArrayBuffer(e.length),t=new Uint8Array(r),n=0;n!=e.length;++n)t[n]=255&e.charCodeAt(n);return r}function Du(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var r=[],t=0;t"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return u0(new Uint8Array(e));for(var r=new Array(e.length),t=0;t=0;)r+=e.charAt(t--);return r}function Tc(e,r){var t=""+e;return t.length>=r?t:no("0",r-t.length)+t}function l0(e,r){var t=""+e;return t.length>=r?t:no(" ",r-t.length)+t}function fd(e,r){var t=""+e;return t.length>=r?t:t+no(" ",r-t.length)}var Y1=Math.pow(2,32);function Gl(e,r){return e>Y1||e<-Y1?function(t,n){var a=""+Math.round(t);return a.length>=n?a:no("0",n-a.length)+a}(e,r):function(t,n){var a=""+t;return a.length>=n?a:no("0",n-a.length)+a}(Math.round(e),r)}function dd(e,r){return r=r||0,e.length>=7+r&&(32|e.charCodeAt(r))==103&&(32|e.charCodeAt(r+1))==101&&(32|e.charCodeAt(r+2))==110&&(32|e.charCodeAt(r+3))==101&&(32|e.charCodeAt(r+4))==114&&(32|e.charCodeAt(r+5))==97&&(32|e.charCodeAt(r+6))==108}var J1=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],A0=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],ai={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},q1={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},V2={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function gd(e,r,t){for(var n=e<0?-1:1,a=e*n,s=0,o=1,i=0,c=1,u=0,l=0,A=Math.floor(a);ur&&(u>r?(l=c,i=s):(l=u,i=o)),!t)return[0,n*i,l];var h=Math.floor(n*i/l);return[h,n*i-h*l,l]}function Ul(e,r,t){if(e>2958465||e<0)return null;var n=0|e,a=Math.floor(86400*(e-n)),s=0,o=[],i={D:n,T:a,u:86400*(e-n)-a,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(i.u)<1e-6&&(i.u=0),r&&r.date1904&&(n+=1462),i.u>.9999&&(i.u=0,++a==86400&&(i.T=a=0,++n,++i.D)),n===60)o=t?[1317,10,29]:[1900,2,29],s=3;else if(n===0)o=t?[1317,8,29]:[1900,1,0],s=6;else{n>60&&--n;var c=new Date(1900,0,1);c.setDate(c.getDate()+n-1),o=[c.getFullYear(),c.getMonth()+1,c.getDate()],s=c.getDay(),n<60&&(s=(s+6)%7),t&&(s=function(u,l){l[0]-=581;var A=u.getDay();return u<60&&(A=(A+6)%7),A}(c,o))}return i.y=o[0],i.m=o[1],i.d=o[2],i.S=a%60,a=Math.floor(a/60),i.M=a%60,a=Math.floor(a/60),i.H=a,i.q=s,i}var W1=new Date(1899,11,31,0,0,0),Z2=W1.getTime(),X2=new Date(1900,2,1,0,0,0);function K1(e,r){var t=e.getTime();return r?t-=1262304e5:e>=X2&&(t+=864e5),(t-(Z2+6e4*(e.getTimezoneOffset()-W1.getTimezoneOffset())))/864e5}function h0(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function qh(e){var r,t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E);return r=t>=-4&&t<=-1?e.toPrecision(10+t):Math.abs(t)<=9?function(n){var a=n<0?12:11,s=h0(n.toFixed(12));return s.length<=a||(s=n.toPrecision(10)).length<=a?s:n.toExponential(5)}(e):t===10?e.toFixed(10).substr(0,12):function(n){var a=h0(n.toFixed(11));return a.length>(n<0?12:11)||a==="0"||a==="-0"?n.toPrecision(6):a}(e),h0(function(n){return n.indexOf("E")==-1?n:n.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(r.toUpperCase()))}function jl(e,r){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(0|e)===e?e.toString(10):qh(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return Cs(14,K1(e,r&&r.date1904),r)}throw new Error("unsupported value in General format: "+e)}function z1(e,r,t,n){var a,s="",o=0,i=0,c=t.y,u=0;switch(e){case 98:c=t.y+543;case 121:switch(r.length){case 1:case 2:a=c%100,u=2;break;default:a=c%1e4,u=4}break;case 109:switch(r.length){case 1:case 2:a=t.m,u=r.length;break;case 3:return A0[t.m-1][1];case 5:return A0[t.m-1][0];default:return A0[t.m-1][2]}break;case 100:switch(r.length){case 1:case 2:a=t.d,u=r.length;break;case 3:return J1[t.q][0];default:return J1[t.q][1]}break;case 104:switch(r.length){case 1:case 2:a=1+(t.H+11)%12,u=r.length;break;default:throw"bad hour format: "+r}break;case 72:switch(r.length){case 1:case 2:a=t.H,u=r.length;break;default:throw"bad hour format: "+r}break;case 77:switch(r.length){case 1:case 2:a=t.M,u=r.length;break;default:throw"bad minute format: "+r}break;case 115:if(r!="s"&&r!="ss"&&r!=".0"&&r!=".00"&&r!=".000")throw"bad second format: "+r;return t.u!==0||r!="s"&&r!="ss"?(i=n>=2?n===3?1e3:100:n===1?10:1,(o=Math.round(i*(t.S+t.u)))>=60*i&&(o=0),r==="s"?o===0?"0":""+o/i:(s=Tc(o,2+n),r==="ss"?s.substr(0,2):"."+s.substr(2,r.length-1))):Tc(t.S,r.length);case 90:switch(r){case"[h]":case"[hh]":a=24*t.D+t.H;break;case"[m]":case"[mm]":a=60*(24*t.D+t.H)+t.M;break;case"[s]":case"[ss]":a=60*(60*(24*t.D+t.H)+t.M)+Math.round(t.S+t.u);break;default:throw"bad abstime format: "+r}u=r.length===3?1:2;break;case 101:a=c,u=1}return u>0?Tc(a,u):""}function iu(e){if(e.length<=3)return e;for(var r=e.length%3,t=e.substr(0,r);r!=e.length;r+=3)t+=(t.length>0?",":"")+e.substr(r,3);return t}var pd=/%/g;function vd(e,r){var t,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(r==0)return"0.0E+0";if(r<0)return"-"+vd(e,-r);var a=e.indexOf(".");a===-1&&(a=e.indexOf("E"));var s=Math.floor(Math.log(r)*Math.LOG10E)%a;if(s<0&&(s+=a),(t=(r/Math.pow(10,s)).toPrecision(n+1+(a+s)%a)).indexOf("e")===-1){var o=Math.floor(Math.log(r)*Math.LOG10E);for(t.indexOf(".")===-1?t=t.charAt(0)+"."+t.substr(1)+"E+"+(o-t.length+s):t+="E+"+(o-s);t.substr(0,2)==="0.";)t=(t=t.charAt(0)+t.substr(2,a)+"."+t.substr(2+a)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(i,c,u,l){return c+u+l.substr(0,(a+s)%a)+"."+l.substr(s)+"E"})}else t=r.toExponential(n);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}var md=/# (\?+)( ?)\/( ?)(\d+)/,yd=/^#*0*\.([0#]+)/,f0=/\).*[0#]/,Hl=/\(###\) ###\\?-####/;function cs(e){for(var r,t="",n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function V1(e,r){var t=Math.pow(10,r);return""+Math.round(e*t)/t}function d0(e,r){var t=e-Math.floor(e),n=Math.pow(10,r);return r<(""+Math.round(t*n)).length?0:Math.round(t*n)}function tc(e,r,t){if(e.charCodeAt(0)===40&&!r.match(f0)){var n=r.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?tc("n",n,t):"("+tc("n",n,-t)+")"}if(r.charCodeAt(r.length-1)===44)return function(d,g,p){for(var m=g.length-1;g.charCodeAt(m-1)===44;)--m;return Ru(d,g.substr(0,m),p/Math.pow(10,3*(g.length-m)))}(e,r,t);if(r.indexOf("%")!==-1)return function(d,g,p){var m=g.replace(pd,""),v=g.length-m.length;return Ru(d,m,p*Math.pow(10,2*v))+no("%",v)}(e,r,t);if(r.indexOf("E")!==-1)return vd(r,t);if(r.charCodeAt(0)===36)return"$"+tc(e,r.substr(r.charAt(1)==" "?2:1),t);var a,s,o,i,c=Math.abs(t),u=t<0?"-":"";if(r.match(/^00+$/))return u+Gl(c,r.length);if(r.match(/^[#?]+$/))return(a=Gl(t,0))==="0"&&(a=""),a.length>r.length?a:cs(r.substr(0,r.length-a.length))+a;if(s=r.match(md))return function(d,g,p){var m=parseInt(d[4],10),v=Math.round(g*m),y=Math.floor(v/m),I=v-y*m,E=m;return p+(y===0?"":""+y)+" "+(I===0?no(" ",d[1].length+1+d[4].length):l0(I,d[1].length)+d[2]+"/"+d[3]+Tc(E,d[4].length))}(s,c,u);if(r.match(/^#+0+$/))return u+Gl(c,r.length-r.indexOf("0"));if(s=r.match(yd))return a=V1(t,s[1].length).replace(/^([^\.]+)$/,"$1."+cs(s[1])).replace(/\.$/,"."+cs(s[1])).replace(/\.(\d*)$/,function(d,g){return"."+g+no("0",cs(s[1]).length-g.length)}),r.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(r=r.replace(/^#+([0.])/,"$1"),s=r.match(/^(0*)\.(#*)$/))return u+V1(c,s[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=r.match(/^#{1,3},##0(\.?)$/))return u+iu(Gl(c,0));if(s=r.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+tc(e,r,-t):iu(""+(Math.floor(t)+function(d,g){return g<(""+Math.round((d-Math.floor(d))*Math.pow(10,g))).length?1:0}(t,s[1].length)))+"."+Tc(d0(t,s[1].length),s[1].length);if(s=r.match(/^#,#*,#0/))return tc(e,r.replace(/^#,#*,/,""),t);if(s=r.match(/^([0#]+)(\\?-([0#]+))+$/))return a=Pl(tc(e,r.replace(/[\\-]/g,""),t)),o=0,Pl(Pl(r.replace(/\\/g,"")).replace(/[0#]/g,function(d){return o-2147483648?""+(d>=0?0|d:d-1|0):""+Math.floor(d)}(t)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(d){return"00,"+(d.length<3?Tc(0,3-d.length):"")+d})+"."+Tc(o,s[1].length);switch(r){case"###,##0.00":return tc(e,"#,##0.00",t);case"###,###":case"##,###":case"#,###":var f=iu(Gl(c,0));return f!=="0"?u+f:"";case"###,###.00":return tc(e,"###,##0.00",t).replace(/^0\./,".");case"#,###.00":return tc(e,"#,##0.00",t).replace(/^0\./,".")}throw new Error("unsupported format |"+r+"|")}function g0(e,r){var t,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(r==0)return"0.0E+0";if(r<0)return"-"+g0(e,-r);var a=e.indexOf(".");a===-1&&(a=e.indexOf("E"));var s=Math.floor(Math.log(r)*Math.LOG10E)%a;if(s<0&&(s+=a),!(t=(r/Math.pow(10,s)).toPrecision(n+1+(a+s)%a)).match(/[Ee]/)){var o=Math.floor(Math.log(r)*Math.LOG10E);t.indexOf(".")===-1?t=t.charAt(0)+"."+t.substr(1)+"E+"+(o-t.length+s):t+="E+"+(o-s),t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(i,c,u,l){return c+u+l.substr(0,(a+s)%a)+"."+l.substr(s)+"E"})}else t=r.toExponential(n);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}function Lc(e,r,t){if(e.charCodeAt(0)===40&&!r.match(f0)){var n=r.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?Lc("n",n,t):"("+Lc("n",n,-t)+")"}if(r.charCodeAt(r.length-1)===44)return function(d,g,p){for(var m=g.length-1;g.charCodeAt(m-1)===44;)--m;return Ru(d,g.substr(0,m),p/Math.pow(10,3*(g.length-m)))}(e,r,t);if(r.indexOf("%")!==-1)return function(d,g,p){var m=g.replace(pd,""),v=g.length-m.length;return Ru(d,m,p*Math.pow(10,2*v))+no("%",v)}(e,r,t);if(r.indexOf("E")!==-1)return g0(r,t);if(r.charCodeAt(0)===36)return"$"+Lc(e,r.substr(r.charAt(1)==" "?2:1),t);var a,s,o,i,c=Math.abs(t),u=t<0?"-":"";if(r.match(/^00+$/))return u+Tc(c,r.length);if(r.match(/^[#?]+$/))return a=""+t,t===0&&(a=""),a.length>r.length?a:cs(r.substr(0,r.length-a.length))+a;if(s=r.match(md))return function(d,g,p){return p+(g===0?"":""+g)+no(" ",d[1].length+2+d[4].length)}(s,c,u);if(r.match(/^#+0+$/))return u+Tc(c,r.length-r.indexOf("0"));if(s=r.match(yd))return a=(a=(""+t).replace(/^([^\.]+)$/,"$1."+cs(s[1])).replace(/\.$/,"."+cs(s[1]))).replace(/\.(\d*)$/,function(d,g){return"."+g+no("0",cs(s[1]).length-g.length)}),r.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(r=r.replace(/^#+([0.])/,"$1"),s=r.match(/^(0*)\.(#*)$/))return u+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=r.match(/^#{1,3},##0(\.?)$/))return u+iu(""+c);if(s=r.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+Lc(e,r,-t):iu(""+t)+"."+no("0",s[1].length);if(s=r.match(/^#,#*,#0/))return Lc(e,r.replace(/^#,#*,/,""),t);if(s=r.match(/^([0#]+)(\\?-([0#]+))+$/))return a=Pl(Lc(e,r.replace(/[\\-]/g,""),t)),o=0,Pl(Pl(r.replace(/\\/g,"")).replace(/[0#]/g,function(d){return o-1||t=="\\"&&e.charAt(r+1)=="-"&&"0#".indexOf(e.charAt(r+2))>-1););break;case"?":for(;e.charAt(++r)===t;);break;case"*":++r,e.charAt(r)!=" "&&e.charAt(r)!="*"||++r;break;case"(":case")":++r;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;r-1;);break;default:++r}return!1}var X1=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function $1(e,r){if(r==null)return!1;var t=parseFloat(r[2]);switch(r[1]){case"=":if(e==t)return!0;break;case">":if(e>t)return!0;break;case"<":if(e":if(e!=t)return!0;break;case">=":if(e>=t)return!0;break;case"<=":if(e<=t)return!0}return!1}function Yl(e,r){var t=function(c){for(var u=[],l=!1,A=0,h=0;A-1&&--n,t.length>4)throw new Error("cannot find right format for |"+t.join("|")+"|");if(typeof r!="number")return[4,t.length===4||a>-1?t[t.length-1]:"@"];switch(t.length){case 1:t=a>-1?["General","General","General",t[0]]:[t[0],t[0],t[0],"@"];break;case 2:t=a>-1?[t[0],t[0],t[0],t[1]]:[t[0],t[1],t[0],"@"];break;case 3:t=a>-1?[t[0],t[1],t[0],t[2]]:[t[0],t[1],t[2],"@"]}var s=r>0?t[0]:r<0?t[1]:t[2];if(t[0].indexOf("[")===-1&&t[1].indexOf("[")===-1)return[n,s];if(t[0].match(/\[[=<>]/)!=null||t[1].match(/\[[=<>]/)!=null){var o=t[0].match(X1),i=t[1].match(X1);return $1(r,o)?[n,t[0]]:$1(r,i)?[n,t[1]]:[n,t[o!=null&&i!=null?2:1]]}return[n,s]}function Cs(e,r,t){t==null&&(t={});var n="";switch(typeof e){case"string":n=e=="m/d/yy"&&t.dateNF?t.dateNF:e;break;case"number":(n=e==14&&t.dateNF?t.dateNF:(t.table!=null?t.table:ai)[e])==null&&(n=t.table&&t.table[q1[e]]||ai[q1[e]]),n==null&&(n=V2[e]||"General")}if(dd(n,0))return jl(r,t);r instanceof Date&&(r=K1(r,t.date1904));var a=Yl(n,r);if(dd(a[1]))return jl(r,t);if(r===!0)r="TRUE";else if(r===!1)r="FALSE";else if(r===""||r==null)return"";return function(s,o,i,c){for(var u,l,A,h=[],f="",d=0,g="",p="t",m="H";d=12?"P":"A"),I.t="T",m="h",d+=3):s.substr(d,5).toUpperCase()==="AM/PM"?(u!=null&&(I.v=u.H>=12?"PM":"AM"),I.t="T",d+=5,m="h"):s.substr(d,5).toUpperCase()==="上午/下午"?(u!=null&&(I.v=u.H>=12?"下午":"上午"),I.t="T",d+=5,m="h"):(I.t="t",++d),u==null&&I.t==="T")return"";h[h.length]=I,p=g;break;case"[":for(f=g;s.charAt(d++)!=="]"&&d-1&&(f=(f.match(/\$([^-\[\]]*)/)||[])[1]||"$",JA(s)||(h[h.length]={t:"t",v:f}));break;case".":if(u!=null){for(f=g;++d-1;)f+=g;h[h.length]={t:"n",v:f};break;case"?":for(f=g;s.charAt(++d)===g;)f+=g;h[h.length]={t:g,v:f},p=g;break;case"*":++d,s.charAt(d)!=" "&&s.charAt(d)!="*"||++d;break;case"(":case")":h[h.length]={t:c===1?"t":g,v:g},++d;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(f=g;d-1;)f+=s.charAt(d);h[h.length]={t:"D",v:f};break;case" ":h[h.length]={t:g,v:g},++d;break;case"$":h[h.length]={t:"t",v:"$"},++d;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(g)===-1)throw new Error("unrecognized character "+g+" in "+s);h[h.length]={t:"t",v:g},++d}var E,k=0,R=0;for(d=h.length-1,p="t";d>=0;--d)switch(h[d].t){case"h":case"H":h[d].t=m,p="h",k<1&&(k=1);break;case"s":(E=h[d].v.match(/\.0+$/))&&(R=Math.max(R,E[0].length-1)),k<3&&(k=3);case"d":case"y":case"M":case"e":p=h[d].t;break;case"m":p==="s"&&(h[d].t="M",k<2&&(k=2));break;case"X":break;case"Z":k<1&&h[d].v.match(/[Hh]/)&&(k=1),k<2&&h[d].v.match(/[Mm]/)&&(k=2),k<3&&h[d].v.match(/[Ss]/)&&(k=3)}switch(k){case 0:break;case 1:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M),u.M>=60&&(u.M=0,++u.H);break;case 2:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M)}var T,j="";for(d=0;d0){j.charCodeAt(0)==40?(W=o<0&&j.charCodeAt(0)===45?-o:o,H=Ru("n",j,W)):(H=Ru("n",j,W=o<0&&c>1?-o:o),W<0&&h[0]&&h[0].t=="t"&&(H=H.substr(1),h[0].v="-"+h[0].v)),T=H.length-1;var x=h.length;for(d=0;d-1){x=d;break}var N=h.length;if(x===h.length&&H.indexOf("E")===-1){for(d=h.length-1;d>=0;--d)h[d]!=null&&"n?".indexOf(h[d].t)!==-1&&(T>=h[d].v.length-1?(T-=h[d].v.length,h[d].v=H.substr(T+1,h[d].v.length)):T<0?h[d].v="":(h[d].v=H.substr(0,T+1),T=-1),h[d].t="t",N=d);T>=0&&N=0;--d)if(h[d]!=null&&"n?".indexOf(h[d].t)!==-1){for(l=h[d].v.indexOf(".")>-1&&d===x?h[d].v.indexOf(".")-1:h[d].v.length-1,X=h[d].v.substr(l+1);l>=0;--l)T>=0&&(h[d].v.charAt(l)==="0"||h[d].v.charAt(l)==="#")&&(X=H.charAt(T--)+X);h[d].v=X,h[d].t="t",N=d}for(T>=0&&N-1&&d===x?h[d].v.indexOf(".")+1:0,X=h[d].v.substr(0,l);l-1&&(W=c>1&&o<0&&d>0&&h[d-1].v==="-"?-o:o,h[d].v=Ru(h[d].t,h[d].v,W),h[d].t="t");var C="";for(d=0;d!==h.length;++d)h[d]!=null&&(C+=h[d].v);return C}(a[1],r,t,a[0])}function Fu(e,r){if(typeof r!="number"){r=+r||-1;for(var t=0;t<392;++t)if(ai[t]!=null){if(ai[t]==e){r=t;break}}else r<0&&(r=t);r<0&&(r=391)}return ai[r]=e,r}function Id(e){for(var r=0;r!=392;++r)e[r]!==void 0&&Fu(e[r],r)}function qA(){var e;e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',ai=e}var $2={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},ev=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,eb=function(){var e={};e.version="1.2.0";var r=function(){for(var v=0,y=new Array(256),I=0;I!=256;++I)v=1&(v=1&(v=1&(v=1&(v=1&(v=1&(v=1&(v=1&(v=I)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1,y[I]=v;return typeof Int32Array<"u"?new Int32Array(y):y}(),t=function(v){var y=0,I=0,E=0,k=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(E=0;E!=256;++E)k[E]=v[E];for(E=0;E!=256;++E)for(I=v[E],y=256+E;y<4096;y+=256)I=k[y]=I>>>8^v[255&I];var R=[];for(E=1;E!=16;++E)R[E-1]=typeof Int32Array<"u"?k.subarray(256*E,256*E+256):k.slice(256*E,256*E+256);return R}(r),n=t[0],a=t[1],s=t[2],o=t[3],i=t[4],c=t[5],u=t[6],l=t[7],A=t[8],h=t[9],f=t[10],d=t[11],g=t[12],p=t[13],m=t[14];return e.table=r,e.bstr=function(v,y){for(var I=-1^y,E=0,k=v.length;E>>8^r[255&(I^v.charCodeAt(E++))];return~I},e.buf=function(v,y){for(var I=-1^y,E=v.length-15,k=0;k>8&255]^g[v[k++]^I>>16&255]^d[v[k++]^I>>>24]^f[v[k++]]^h[v[k++]]^A[v[k++]]^l[v[k++]]^u[v[k++]]^c[v[k++]]^i[v[k++]]^o[v[k++]]^s[v[k++]]^a[v[k++]]^n[v[k++]]^r[v[k++]];for(E+=15;k>>8^r[255&(I^v[k++])];return~I},e.str=function(v,y){for(var I=-1^y,E=0,k=v.length,R=0,T=0;E>>8^r[255&(I^R)]:R<2048?I=(I=I>>>8^r[255&(I^(192|R>>6&31))])>>>8^r[255&(I^(128|63&R))]:R>=55296&&R<57344?(R=64+(1023&R),T=1023&v.charCodeAt(E++),I=(I=(I=(I=I>>>8^r[255&(I^(240|R>>8&7))])>>>8^r[255&(I^(128|R>>2&63))])>>>8^r[255&(I^(128|T>>6&15|(3&R)<<4))])>>>8^r[255&(I^(128|63&T))]):I=(I=(I=I>>>8^r[255&(I^(224|R>>12&15))])>>>8^r[255&(I^(128|R>>6&63))])>>>8^r[255&(I^(128|63&R))];return~I},e}(),Pn=function(){var e,r={};function t(pe){if(pe.charAt(pe.length-1)=="/")return pe.slice(0,-1).indexOf("/")===-1?pe:t(pe.slice(0,-1));var me=pe.lastIndexOf("/");return me===-1?pe:pe.slice(0,me+1)}function n(pe){if(pe.charAt(pe.length-1)=="/")return n(pe.slice(0,-1));var me=pe.lastIndexOf("/");return me===-1?pe:pe.slice(me+1)}function a(pe,me){typeof me=="string"&&(me=new Date(me));var Re=me.getHours();Re=(Re=Re<<6|me.getMinutes())<<5|me.getSeconds()>>>1,pe.write_shift(2,Re);var Ze=me.getFullYear()-1980;Ze=(Ze=Ze<<4|me.getMonth()+1)<<5|me.getDate(),pe.write_shift(2,Ze)}function s(pe){$o(pe,0);for(var me={},Re=0;pe.l<=pe.length-4;){var Ze=pe.read_shift(2),ke=pe.read_shift(2),Pe=pe.l+ke,_e={};Ze===21589&&(1&(Re=pe.read_shift(1))&&(_e.mtime=pe.read_shift(4)),ke>5&&(2&Re&&(_e.atime=pe.read_shift(4)),4&Re&&(_e.ctime=pe.read_shift(4))),_e.mtime&&(_e.mt=new Date(1e3*_e.mtime))),pe.l=Pe,me[Ze]=_e}return me}function o(){return e||(e={})}function i(pe,me){if(pe[0]==80&&pe[1]==75)return dt(pe,me);if((32|pe[0])==109&&(32|pe[1])==105)return function(dr,rn){if(k(dr.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var Kr=rn&&rn.root||"",tr=(wi&&Buffer.isBuffer(dr)?dr.toString("binary"):k(dr)).split(`\r `),on=0,nn="";for(on=0;on0&&(Kr=(Kr=Kr.slice(0,Kr.length-1)).slice(0,Kr.lastIndexOf("/")+1),nn.slice(0,Kr.length)!=Kr););var An=(tr[1]||"").match(/boundary="(.*?)"/);if(!An)throw new Error("MAD cannot find boundary");var bn="--"+(An[1]||""),Gn=[],Dr=[],Nn={FileIndex:Gn,FullPaths:Dr};h(Nn);var Mn,Hn=0;for(on=0;on=on&&(Hn-=on),!An[Hn]){Gn=[];var qe=[];for(Mn=Hn;Mn>=0;){qe[Mn]=!0,An[Mn]=!0,bn[bn.length]=Mn,Gn.push(dr[Mn]);var bt=Kr[Math.floor(4*Mn/tr)];if(tr<4+(vi=4*Mn&Dr))throw new Error("FAT boundary crossed: "+Mn+" 4 "+tr);if(!dr[bt]||qe[Mn=Wl(dr[bt],vi)])break}nn[Hn]={nodes:bn,data:bv([Gn])}}return nn}(fr,Pe,Dt,at);Mr[Pe].name="!Directory",Ze>0&&_e!==m&&(Mr[_e].name="!MiniFAT"),Mr[Dt[0]].name="!FAT",Mr.fat_addrs=Dt,Mr.ssz=at;var er=[],Tr=[],fn=[];(function(dr,rn,Kr,tr,on,nn,An,bn){for(var Gn,Dr=0,Nn=tr.length?2:0,Mn=rn[dr].data,Hn=0,vi=0;Hn0&&Dr!==m&&(rn[Dr].name="!StreamData")):bt.size>=4096?(bt.storage="fat",rn[bt.start]===void 0&&(rn[bt.start]=l(Kr,bt.start,rn.fat_addrs,rn.ssz)),rn[bt.start].name=bt.name,bt.content=rn[bt.start].data.slice(0,bt.size)):(bt.storage="minifat",bt.size<0?bt.size=0:Dr!==m&&bt.start!==m&&rn[Dr]&&(bt.content=c(bt,rn[Dr].data,(rn[bn]||{}).data))),bt.content&&$o(bt.content,0),nn[Gn]=bt,An.push(bt)}})(Pe,Mr,fr,er,Ze,{},Tr,_e),function(dr,rn,Kr){for(var tr=0,on=0,nn=0,An=0,bn=0,Gn=Kr.length,Dr=[],Nn=[];tr0&&_e>=0;)Pe.push(me.slice(_e*p,_e*p+p)),ke-=p,_e=Wl(Re,4*_e);return Pe.length===0?Kt(0):jo(Pe).slice(0,pe.size)}function u(pe,me,Re,Ze,ke){var Pe=m;if(pe===m){if(me!==0)throw new Error("DIFAT chain shorter than expected")}else if(pe!==-1){var _e=Re[pe],Je=(Ze>>>2)-1;if(!_e)return;for(var at=0;at=0;){ke[at]=!0,Pe[Pe.length]=at,_e.push(pe[at]);var St=Re[Math.floor(4*at/Ze)];if(Ze<4+(Dt=4*at&Je))throw new Error("FAT boundary crossed: "+at+" 4 "+Ze);if(!pe[St])break;at=Wl(pe[St],Dt)}return{nodes:Pe,data:bv([_e])}}function A(pe,me){return new Date(1e3*(ic(pe,me+4)/1e7*Math.pow(2,32)+ic(pe,me)/1e7-11644473600))}function h(pe,me){var Re=me||{},Ze=Re.root||"Root Entry";if(pe.FullPaths||(pe.FullPaths=[]),pe.FileIndex||(pe.FileIndex=[]),pe.FullPaths.length!==pe.FileIndex.length)throw new Error("inconsistent CFB structure");pe.FullPaths.length===0&&(pe.FullPaths[0]=Ze+"/",pe.FileIndex[0]={name:Ze,type:5}),Re.CLSID&&(pe.FileIndex[0].clsid=Re.CLSID),function(ke){var Pe="Sh33tJ5";if(!Pn.find(ke,"/"+Pe)){var _e=Kt(4);_e[0]=55,_e[1]=_e[3]=50,_e[2]=54,ke.FileIndex.push({name:Pe,type:2,content:_e,size:4,L:69,R:69,C:69}),ke.FullPaths.push(ke.FullPaths[0]+Pe),f(ke)}}(pe)}function f(pe,me){h(pe);for(var Re=!1,Ze=!1,ke=pe.FullPaths.length-1;ke>=0;--ke){var Pe=pe.FileIndex[ke];switch(Pe.type){case 0:Ze?Re=!0:(pe.FileIndex.pop(),pe.FullPaths.pop());break;case 1:case 2:case 5:Ze=!0,isNaN(Pe.R*Pe.L*Pe.C)&&(Re=!0),Pe.R>-1&&Pe.L>-1&&Pe.R==Pe.L&&(Re=!0);break;default:Re=!0}}if(Re||me){var _e=new Date(1987,1,19),Je=0,at=Object.create?Object.create(null):{},Dt=[];for(ke=0;ke1?1:-1,hr.size=0,hr.type=5;else if(Wt.slice(-1)=="/"){for(Je=ke+1;Je=Dt.length?-1:Je,Je=ke+1;Je=Dt.length?-1:Je,hr.type=1}else t(pe.FullPaths[ke+1]||"")==t(Wt)&&(hr.R=ke+1),hr.type=2}}}function d(pe,me){var Re=me||{};if(Re.fileType=="mad")return function(Ut,ur){for(var Br=ur||{},fr=Br.boundary||"SheetJS",Mr=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(fr="------="+fr).slice(2)+'"',"","",""],er=Ut.FullPaths[0],Tr=er,fn=Ut.FileIndex[0],_n=1;_n=32&&on<128&&++Kr;var An=Kr>=4*tr/5;Mr.push(fr),Mr.push("Content-Location: "+(Br.root||"file:///C:/SheetJS/")+Tr),Mr.push("Content-Transfer-Encoding: "+(An?"quoted-printable":"base64")),Mr.push("Content-Type: "+pt(fn,Tr)),Mr.push(""),Mr.push(An?Ee(rn):Be(rn))}return Mr.push(fr+`--\r `),Mr.join(`\r `)}(pe,Re);if(f(pe),Re.fileType==="zip")return function(Ut,ur){var Br=ur||{},fr=[],Mr=[],er=Kt(1),Tr=Br.compression?8:0,fn=0,_n=0,dr=0,rn=0,Kr=0,tr=Ut.FullPaths[0],on=tr,nn=Ut.FileIndex[0],An=[],bn=0;for(_n=1;_n0&&(er<4096?ur+=er+63>>6:Br+=er+511>>9)}}for(var Tr=Ut.FullPaths.length+3>>2,fn=ur+127>>7,_n=(ur+7>>3)+Br+Tr+fn,dr=_n+127>>7,rn=dr<=109?0:Math.ceil((dr-109)/127);_n+dr+rn+127>>7>dr;)rn=++dr<=109?0:Math.ceil((dr-109)/127);var Kr=[1,rn,dr,fn,Tr,Br,ur,0];return Ut.FileIndex[0].size=ur<<6,Kr[7]=(Ut.FileIndex[0].start=Kr[0]+Kr[1]+Kr[2]+Kr[3]+Kr[4]+Kr[5])+(Kr[6]+7>>3),Kr}(pe),ke=Kt(Ze[7]<<9),Pe=0,_e=0;for(Pe=0;Pe<8;++Pe)ke.write_shift(1,y[Pe]);for(Pe=0;Pe<8;++Pe)ke.write_shift(2,0);for(ke.write_shift(2,62),ke.write_shift(2,3),ke.write_shift(2,65534),ke.write_shift(2,9),ke.write_shift(2,6),Pe=0;Pe<3;++Pe)ke.write_shift(2,0);for(ke.write_shift(4,0),ke.write_shift(4,Ze[2]),ke.write_shift(4,Ze[0]+Ze[1]+Ze[2]+Ze[3]-1),ke.write_shift(4,0),ke.write_shift(4,4096),ke.write_shift(4,Ze[3]?Ze[0]+Ze[1]+Ze[2]-1:m),ke.write_shift(4,Ze[3]),ke.write_shift(-4,Ze[1]?Ze[0]-1:m),ke.write_shift(4,Ze[1]),Pe=0;Pe<109;++Pe)ke.write_shift(-4,Pe>9)));for(Je(Ze[6]+7>>3);511&ke.l;)ke.write_shift(-4,E.ENDOFCHAIN);for(_e=Pe=0,at=0;at=4096||(St.start=_e,Je(Dt+63>>6)));for(;511&ke.l;)ke.write_shift(-4,E.ENDOFCHAIN);for(Pe=0;Pe=4096)if(ke.l=St.start+1<<9,wi&&Buffer.isBuffer(St.content))St.content.copy(ke,ke.l,0,St.size),ke.l+=St.size+511&-512;else{for(at=0;at0&&St.size<4096)if(wi&&Buffer.isBuffer(St.content))St.content.copy(ke,ke.l,0,St.size),ke.l+=St.size+63&-64;else{for(at=0;at>16|X>>8|X));function w(pe,me){var Re=N[255&pe];return me<=8?Re>>>8-me:(Re=Re<<8|N[pe>>8&255],me<=16?Re>>>16-me:(Re=Re<<8|N[pe>>16&255])>>>24-me)}function Q(pe,me){var Re=7&me,Ze=me>>>3;return(pe[Ze]|(Re<=6?0:pe[Ze+1]<<8))>>>Re&3}function B(pe,me){var Re=7&me,Ze=me>>>3;return(pe[Ze]|(Re<=5?0:pe[Ze+1]<<8))>>>Re&7}function S(pe,me){var Re=7&me,Ze=me>>>3;return(pe[Ze]|(Re<=3?0:pe[Ze+1]<<8))>>>Re&31}function O(pe,me){var Re=7&me,Ze=me>>>3;return(pe[Ze]|(Re<=1?0:pe[Ze+1]<<8))>>>Re&127}function F(pe,me,Re){var Ze=7&me,ke=me>>>3,Pe=(1<>>Ze;return Re<8-Ze?_e&Pe:(_e|=pe[ke+1]<<8-Ze,Re<16-Ze?_e&Pe:(_e|=pe[ke+2]<<16-Ze,Re<24-Ze?_e&Pe:(_e|=pe[ke+3]<<24-Ze)&Pe))}function Y(pe,me,Re){var Ze=7&me,ke=me>>>3;return Ze<=5?pe[ke]|=(7&Re)<>8-Ze),me+3}function M(pe,me,Re){return Re=(1&Re)<<(7&me),pe[me>>>3]|=Re,me+1}function z(pe,me,Re){var Ze=me>>>3;return Re<<=7&me,pe[Ze]|=255&Re,Re>>>=8,pe[Ze+1]=Re,me+8}function ue(pe,me,Re){var Ze=me>>>3;return Re<<=7&me,pe[Ze]|=255&Re,Re>>>=8,pe[Ze+1]=255&Re,pe[Ze+2]=Re>>>8,me+16}function ae(pe,me){var Re=pe.length,Ze=2*Re>me?2*Re:me+5,ke=0;if(Re>=me)return pe;if(wi){var Pe=H1(Ze);if(pe.copy)pe.copy(Pe);else for(;ke>Ze-hr,_e=(1<=0;--_e)me[Je|_e<0;)Je[Je.l++]=_e[at++]}return Je.l}(ke,Pe):function(_e,Je){for(var at=0,Dt=0,St=x?new Uint16Array(32768):[];Dt<_e.length;){var hr=Math.min(65535,_e.length-Dt);if(hr<10){for(7&(at=Y(Je,at,+(Dt+hr==_e.length)))&&(at+=8-(7&at)),Je.l=at/8|0,Je.write_shift(2,hr),Je.write_shift(2,65535&~hr);hr-- >0;)Je[Je.l++]=_e[Dt++];at=8*Je.l}else{at=Y(Je,at,+(Dt+hr==_e.length)+2);for(var Wt=0;hr-- >0;){var Ut=_e[Dt],ur=-1,Br=0;if((ur=St[Wt=32767&(Wt<<5^Ut)])&&((ur|=-32768&Dt)>Dt&&(ur-=32768),ur2){(Ut=Ze[Br])<=22?at=z(Je,at,N[Ut+1]>>1)-1:(z(Je,at,3),z(Je,at+=5,N[Ut-23]>>5),at+=3);var fr=Ut<8?0:Ut-4>>2;fr>0&&(ue(Je,at,Br-j[Ut]),at+=fr),Ut=pe[Dt-ur],at=z(Je,at,N[Ut]>>3),at-=3;var Mr=Ut<4?0:Ut-2>>1;Mr>0&&(ue(Je,at,Dt-ur-W[Ut]),at+=Mr);for(var er=0;er>>3;return(Tr[dr]|(_n<=4?0:Tr[dr+1]<<8))>>>_n&15}(pe,me+=5)+4;me+=4;for(var Pe=0,_e=x?new Uint8Array(19):Ne(19),Je=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],at=1,Dt=x?new Uint8Array(8):Ne(8),St=x?new Uint8Array(8):Ne(8),hr=_e.length,Wt=0;Wt>8-ur;for(var Br=(1<<7-ur)-1;Br>=0;--Br)Ce[Ut|Br<>>=3){case 16:for(Pe=3+Q(pe,me),me+=2,Ut=fr[fr.length-1];Pe-- >0;)fr.push(Ut);break;case 17:for(Pe=3+B(pe,me),me+=3;Pe-- >0;)fr.push(0);break;case 18:for(Pe=11+O(pe,me),me+=7;Pe-- >0;)fr.push(0);break;default:fr.push(Ut),at>>0,St=0,hr=0;!(1&_e);)if(_e=B(Ze,Pe),Pe+=3,_e>>>1!=0)for(_e>>1==1?(St=9,hr=5):(Pe=ce(Ze,Pe),St=At,hr=Z);;){!ke&&Dt>>1==1?Ye[Wt]:Ke[Wt];if(Pe+=15&Ut,((Ut>>>=4)>>>8&255)==0)Je[at++]=Ut;else{if(Ut==256)break;var ur=(Ut-=257)<8?0:Ut-4>>2;ur>5&&(ur=0);var Br=at+j[Ut];ur>0&&(Br+=F(Ze,Pe,ur),Pe+=ur),Wt=F(Ze,Pe,hr),Pe+=15&(Ut=_e>>>1==1?Ae[Wt]:le[Wt]);var fr=(Ut>>>=4)<4?0:Ut-2>>1,Mr=W[Ut];for(fr>0&&(Mr+=F(Ze,Pe,fr),Pe+=fr),!ke&&Dt>>3]|Ze[1+(Pe>>>3)]<<8;if(Pe+=32,er>0)for(!ke&&Dt0;)Je[at++]=Ze[Pe>>>3],Pe+=8}return ke?[Je,Pe+7>>>3]:[Je.slice(0,at),Pe+7>>>3]}(pe.slice(pe.l||0),me);return pe.l+=Re[1],Re[0]}function Ve(pe,me){if(!pe)throw new Error(me);typeof console<"u"&&console.error(me)}function dt(pe,me){var Re=pe;$o(Re,0);var Ze={FileIndex:[],FullPaths:[]};h(Ze,{root:me.root});for(var ke=Re.length-4;(Re[ke]!=80||Re[ke+1]!=75||Re[ke+2]!=5||Re[ke+3]!=6)&&ke>=0;)--ke;Re.l=ke+4,Re.l+=4;var Pe=Re.read_shift(2);Re.l+=6;var _e=Re.read_shift(4);for(Re.l=_e,ke=0;ke>>=5);Tr>>>=4,fn.setMilliseconds(0),fn.setFullYear(Tr+1980),fn.setMonth(dr-1),fn.setDate(_n);var rn=31&er,Kr=63&(er>>>=5);return er>>>=6,fn.setHours(er),fn.setMinutes(Kr),fn.setSeconds(rn<<1),fn}(pe);if(8257&Pe)throw new Error("Unsupported ZIP encryption");pe.read_shift(4);for(var at=pe.read_shift(4),Dt=pe.read_shift(4),St=pe.read_shift(2),hr=pe.read_shift(2),Wt="",Ut=0;Ut"u")throw new Error("Unsupported");return new Uint8Array(r)}(e):e}function Wh(e,r,t){if(typeof Deno<"u"){if(t&&typeof r=="string")switch(t){case"utf8":r=new TextEncoder(t).encode(r);break;case"binary":r=hd(r);break;default:throw new Error("Unsupported encoding "+t)}return Deno.writeFileSync(e,r)}var n=t=="utf8"?Oc(r):r;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var a=new Blob([tv(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(a,e);if(typeof saveAs<"u")return saveAs(a,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var s=URL.createObjectURL(a);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),chrome.downloads.download({url:s,filename:e,saveAs:!0});var o=document.createElement("a");if(o.download!=null)return o.download=e,o.href=s,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),s}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var i=File(e);return i.open("w"),i.encoding="binary",Array.isArray(r)&&(r=Du(r)),i.write(r),i.close(),r}catch(c){if(!c.message||!c.message.match(/onstruct/))throw c}throw new Error("cannot save file "+e)}function za(e){for(var r=Object.keys(e),t=[],n=0;n3&&(n=!0),a[s].slice(a[s].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+a[s].slice(a[s].length-1));case"D":t*=24;case"H":t*=60;case"M":if(!n)throw new Error("Unsupported ISO Duration Field: M");t*=60}r+=t*parseInt(a[s],10)}return r}var av=new Date("2017-02-19T19:06:09.000Z"),ov=isNaN(av.getFullYear())?new Date("2/19/17"):av,rb=ov.getFullYear()==2017;function Ga(e,r){var t=new Date(e);if(rb)return r>0?t.setTime(t.getTime()+60*t.getTimezoneOffset()*1e3):r<0&&t.setTime(t.getTime()-60*t.getTimezoneOffset()*1e3),t;if(e instanceof Date)return e;if(ov.getFullYear()==1917&&!isNaN(t.getFullYear())){var n=t.getFullYear();return e.indexOf(""+n)>-1||t.setFullYear(t.getFullYear()+100),t}var a=e.match(/\d+/g)||["2017","2","19","0","0","0"],s=new Date(+a[0],+a[1]-1,+a[2],+a[3]||0,+a[4]||0,+a[5]||0);return e.indexOf("Z")>-1&&(s=new Date(s.getTime()-60*s.getTimezoneOffset()*1e3)),s}function Jl(e,r){if(wi&&Buffer.isBuffer(e)){if(r){if(e[0]==255&&e[1]==254)return Oc(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return Oc(U1(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(r){if(e[0]==255&&e[1]==254)return Oc(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return Oc(new TextDecoder("utf-16be").decode(e.slice(2)))}var t={"€":"€","‚":"‚",ƒ:"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰",Š:"Š","‹":"‹",Œ:"Œ",Ž:"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™",š:"š","›":"›",œ:"œ",ž:"ž",Ÿ:"Ÿ"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(s){return t[s]||s})}catch{}for(var n=[],a=0;a!=e.length;++a)n.push(String.fromCharCode(e[a]));return n.join("")}function Ra(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=Ra(e[t]));return r}function no(e,r){for(var t="";t.length3&&nb.indexOf(o)==-1)return t}else if(o.match(/[a-z]/))return t;return n<0||n>8099?t:(a>0||s>1)&&n!=101?r:e.match(/[^-0-9:,\/\\]/)?t:r}var ib=function(){var e="abacaba".split(/(:?b)/i).length==5;return function(r,t,n){if(e||typeof t=="string")return r.split(t);for(var a=r.split(t),s=[a[0]],o=1;o>6&31,c[o++]=128|63&l;else if(l>=55296&&l<57344){l=64+(1023&l);var A=1023&a.charCodeAt(++u);c[o++]=240|l>>8&7,c[o++]=128|l>>2&63,c[o++]=128|A>>6&15|(3&l)<<4,c[o++]=128|63&A}else c[o++]=224|l>>12&15,c[o++]=128|l>>6&63,c[o++]=128|63&l;o>i&&(s.push(c.slice(0,o)),o=0,c=ul(65535),i=65530)}return s.push(c.slice(0,o)),jo(s)}(t),Pn.utils.cfb_add(e,r,n);Pn.utils.cfb_add(e,r,t)}else e.file(r,t)}function m0(){return Pn.utils.cfb_new()}function Av(e,r){switch(r.type){case"base64":return Pn.read(e,{type:"base64"});case"binary":return Pn.read(e,{type:"binary"});case"buffer":case"array":return Pn.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+r.type)}function Vh(e,r){if(e.charAt(0)=="/")return e.slice(1);var t=r.split("/");r.slice(-1)!="/"&&t.pop();for(var n=e.split("/");n.length!==0;){var a=n.shift();a===".."?t.pop():a!=="."&&t.push(a)}return t.join("/")}var fo=`\r `,ab=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,hv=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/gm,us=fo.match(hv)?hv:/<[^>]*>/g,ob=/<\w*:/,sb=/<(\/?)\w+:/;function ci(e,r,t){for(var n={},a=0,s=0;a!==e.length&&(s=e.charCodeAt(a))!==32&&s!==10&&s!==13;++a);if(r||(n[0]=e.slice(0,a)),a===e.length)return n;var o=e.match(ab),i=0,c="",u=0,l="",A="",h=1;if(o)for(u=0;u!=o.length;++u){for(A=o[u],s=0;s!=A.length&&A.charCodeAt(s)!==61;++s);for(l=A.slice(0,s).trim();A.charCodeAt(s+1)==32;)++s;for(h=(a=A.charCodeAt(s+1))==34||a==39?1:0,c=A.slice(s+1+h,A.length-h),i=0;i!=l.length&&l.charCodeAt(i)!==58;++i);if(i===l.length)l.indexOf("_")>0&&(l=l.slice(0,l.indexOf("_"))),n[l]=c,t||(n[l.toLowerCase()]=c);else{var f=(i===5&&l.slice(0,5)==="xmlns"?"xmlns":"")+l.slice(i+1);if(n[f]&&l.slice(i-3,i)=="ext")continue;n[f]=c,t||(n[f.toLowerCase()]=c)}}return n}function au(e){return e.replace(sb,"<$1")}var y0={""":'"',"'":"'",">":">","<":"<","&":"&"},I0=bd(y0),Mi=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/gi,r=/_x([\da-fA-F]{4})_/gi;return function t(n){var a=n+"",s=a.indexOf("-1?16:10))||i}).replace(r,function(i,c){return String.fromCharCode(parseInt(c,16))});var o=a.indexOf("]]>");return t(a.slice(0,s))+a.slice(s+9,o)+t(a.slice(o+3))}}(),b0=/[&<>'"]/g,cb=/[\u0000-\u0008\u000b-\u001f]/g;function ca(e){return(e+"").replace(b0,function(r){return I0[r]}).replace(cb,function(r){return"_x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+"_"})}function fv(e){return ca(e).replace(/ /g,"_x0020_")}var dv=/[\u0000-\u001f]/g;function C0(e){return(e+"").replace(b0,function(r){return I0[r]}).replace(/\n/g,"
").replace(dv,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}var gv=function(){var e=/&#(\d+);/g;function r(t,n){return String.fromCharCode(parseInt(n,10))}return function(t){return t.replace(e,r)}}();function Fa(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function E0(e){for(var r="",t=0,n=0,a=0,s=0,o=0,i=0;t191&&n<224?(o=(31&n)<<6,o|=63&a,r+=String.fromCharCode(o)):(s=e.charCodeAt(t++),n<240?r+=String.fromCharCode((15&n)<<12|(63&a)<<6|63&s):(i=((7&n)<<18|(63&a)<<12|(63&s)<<6|63&(o=e.charCodeAt(t++)))-65536,r+=String.fromCharCode(55296+(i>>>10&1023)),r+=String.fromCharCode(56320+(1023&i)))));return r}function pv(e){var r,t,n,a=ul(2*e.length),s=1,o=0,i=0;for(t=0;t>>10&1023),r=56320+(1023&r)),i!==0&&(a[o++]=255&i,a[o++]=i>>>8,i=0),a[o++]=r%256,a[o++]=r>>>8;return a.slice(0,o).toString("ucs2")}function vv(e){return _u(e,"binary").toString("utf8")}var wd="foo bar baz☃🍣",ua=wi&&(vv(wd)==E0(wd)&&vv||pv(wd)==E0(wd)&&pv)||E0,Oc=wi?function(e){return _u(e,"utf8").toString("binary")}:function(e){for(var r=[],t=0,n=0,a=0;t>6))),r.push(String.fromCharCode(128+(63&n)));break;case(n>=55296&&n<57344):n-=55296,a=e.charCodeAt(t++)-56320+(n<<10),r.push(String.fromCharCode(240+(a>>18&7))),r.push(String.fromCharCode(144+(a>>12&63))),r.push(String.fromCharCode(128+(a>>6&63))),r.push(String.fromCharCode(128+(63&a)));break;default:r.push(String.fromCharCode(224+(n>>12))),r.push(String.fromCharCode(128+(n>>6&63))),r.push(String.fromCharCode(128+(63&n)))}return r.join("")},Zh=function(){var e={};return function(r,t){var n=r+"|"+(t||"");return e[n]?e[n]:e[n]=new RegExp("<(?:\\w+:)?"+r+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)",t||"")}}(),ub=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(r){return[new RegExp("&"+r[0]+";","ig"),r[1]]});return function(r){for(var t=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+/g,` `).replace(/<[^>]*>/g,""),n=0;n([\\s\\S]*?)","g")}}(),Ab=/<\/?(?:vt:)?variant>/g,hb=/<(?:vt:)([^>]*)>([\s\S]*)"+r+""}function Xh(e){return za(e).map(function(r){return" "+r+'="'+e[r]+'"'}).join("")}function Zr(e,r,t){return"<"+e+(t!=null?Xh(t):"")+(r!=null?(r.match(yv)?' xml:space="preserve"':"")+">"+r+""}function Bd(e,r){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throw t}return""}function w0(e){if(wi&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e=="string")return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return ua(Du(u0(e)));throw new Error("Bad input format: expected Buffer or string")}var $h=/<(\/?)([^\s?>:\/]+)(?:[\s?:\/][^>]*)?>/gm,_o={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},ql=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],nc={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"},Iv=function(e){for(var r=[],t=0;t0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(r){return Buffer.isBuffer(r)?r:_u(r)})):Iv(e)}:Iv,Cv=function(e,r,t){for(var n=[],a=r;a0?ef(e,r+4,r+4+t-1):""},kv=Qv,xv=function(e,r){var t=ic(e,r);return t>0?ef(e,r+4,r+4+t-1):""},Sv=xv,_v=function(e,r){var t=2*ic(e,r);return t>0?ef(e,r+4,r+4+t-1):""},Dv=_v,Rv=function(e,r){var t=ic(e,r);return t>0?B0(e,r+4,r+4+t):""},Fv=Rv,Nv=function(e,r){var t=ic(e,r);return t>0?ef(e,r+4,r+4+t):""},Mv=Nv,Tv=function(e,r){return function(t,n){for(var a=1-2*(t[n+7]>>>7),s=((127&t[n+7])<<4)+(t[n+6]>>>4&15),o=15&t[n+6],i=5;i>=0;--i)o=256*o+t[n+i];return s==2047?o==0?a*(1/0):NaN:(s==0?s=-1022:(s-=1023,o+=Math.pow(2,52)),a*Math.pow(2,s-52)*o)}(e,r)},Qd=Tv,Q0=function(e){return Array.isArray(e)||typeof Uint8Array<"u"&&e instanceof Uint8Array};wi&&(kv=function(e,r){if(!Buffer.isBuffer(e))return Qv(e,r);var t=e.readUInt32LE(r);return t>0?e.toString("utf8",r+4,r+4+t-1):""},Sv=function(e,r){if(!Buffer.isBuffer(e))return xv(e,r);var t=e.readUInt32LE(r);return t>0?e.toString("utf8",r+4,r+4+t-1):""},Dv=function(e,r){if(!Buffer.isBuffer(e))return _v(e,r);var t=2*e.readUInt32LE(r);return e.toString("utf16le",r+4,r+4+t-1)},Fv=function(e,r){if(!Buffer.isBuffer(e))return Rv(e,r);var t=e.readUInt32LE(r);return e.toString("utf16le",r+4,r+4+t)},Mv=function(e,r){if(!Buffer.isBuffer(e))return Nv(e,r);var t=e.readUInt32LE(r);return e.toString("utf8",r+4,r+4+t)},Qd=function(e,r){return Buffer.isBuffer(e)?e.readDoubleLE(r):Tv(e,r)},Q0=function(e){return Buffer.isBuffer(e)||Array.isArray(e)||typeof Uint8Array<"u"&&e instanceof Uint8Array});var WA=function(e,r){return e[r]},ou=function(e,r){return 256*e[r+1]+e[r]},fb=function(e,r){var t=256*e[r+1]+e[r];return t<32768?t:-1*(65535-t+1)},ic=function(e,r){return e[r+3]*(1<<24)+(e[r+2]<<16)+(e[r+1]<<8)+e[r]},Wl=function(e,r){return e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]},db=function(e,r){return e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]};function KA(e,r){var t,n,a,s,o,i,c="",u=[];switch(r){case"dbcs":if(i=this.l,wi&&Buffer.isBuffer(this))c=this.slice(this.l,this.l+2*e).toString("utf16le");else for(o=0;o0?Wl:db)(this,this.l),this.l+=4,t):(n=ic(this,this.l),this.l+=4,n);case 8:case-8:if(r==="f")return n=e==8?Qd(this,this.l):Qd([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,n;e=8;case 16:c=wv(this,this.l,e)}}return this.l+=e,c}var gb=function(e,r,t){e[t]=255&r,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24&255},pb=function(e,r,t){e[t]=255&r,e[t+1]=r>>8&255,e[t+2]=r>>16&255,e[t+3]=r>>24&255},vb=function(e,r,t){e[t]=255&r,e[t+1]=r>>>8&255};function Lv(e,r,t){var n=0,a=0;if(t==="dbcs"){for(a=0;a!=r.length;++a)vb(this,r.charCodeAt(a),this.l+2*a);n=2*r.length}else if(t==="sbcs"){for(r=r.replace(/[^\x00-\x7F]/g,"_"),a=0;a!=r.length;++a)this[this.l+a]=255&r.charCodeAt(a);n=r.length}else{if(t==="hex"){for(;a>8}for(;this.l>>=8,this[this.l+1]=255&r;break;case 3:n=3,this[this.l]=255&r,r>>>=8,this[this.l+1]=255&r,r>>>=8,this[this.l+2]=255&r;break;case 4:n=4,gb(this,r,this.l);break;case 8:if(n=8,t==="f"){(function(i,c,u){var l=(c<0||1/c==-1/0?1:0)<<7,A=0,h=0,f=l?-c:c;isFinite(f)?f==0?A=h=0:(A=Math.floor(Math.log(f)/Math.LN2),h=f*Math.pow(2,52-A),A<=-1023&&(!isFinite(h)||h>4|l})(this,r,this.l);break}case 16:break;case-4:n=4,pb(this,r,this.l)}}return this.l+=n,this}function Ov(e,r){var t=wv(this,this.l,e.length>>1);if(t!==e)throw new Error(r+"Expected "+e+" saw "+t);this.l+=e.length>>1}function $o(e,r){e.l=r,e.read_shift=KA,e.chk=Ov,e.write_shift=Lv}function ls(e,r){e.l+=r}function Kt(e){var r=ul(e);return $o(r,0),r}function Mu(e,r,t){if(e){var n,a,s;$o(e,e.l||0);for(var o=e.length,i=0,c=0;e.ln.l&&((n=n.slice(0,n.l)).l=n.length),n.length>0&&e.push(n),n=null)},s=function(o){return n&&o=128?1:0)+1,n>=128&&++a,n>=16384&&++a,n>=2097152&&++a;var o=e.next(a);s<=127?o.write_shift(1,s):(o.write_shift(1,128+(127&s)),o.write_shift(1,s>>7));for(var i=0;i!=4;++i){if(!(n>=128)){o.write_shift(1,n);break}o.write_shift(1,128+(127&n)),n>>=7}n>0&&Q0(t)&&e.push(t)}}function tf(e,r,t){var n=Ra(e);if(r.s?(n.cRel&&(n.c+=r.s.c),n.rRel&&(n.r+=r.s.r)):(n.cRel&&(n.c+=r.c),n.rRel&&(n.r+=r.r)),!t||t.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function Pv(e,r,t){var n=Ra(e);return n.s=tf(n.s,r.s,t),n.e=tf(n.e,r.s,t),n}function rf(e,r){if(e.cRel&&e.c<0)for(e=Ra(e);e.c<0;)e.c+=r>8?16384:256;if(e.rRel&&e.r<0)for(e=Ra(e);e.r<0;)e.r+=r>8?1048576:r>5?65536:16384;var t=In(e);return e.cRel||e.cRel==null||(t=t.replace(/^([A-Z])/,"$$$1")),e.rRel||e.rRel==null||(t=function(n){return n.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(t)),t}function k0(e,r){return e.s.r!=0||e.s.rRel||e.e.r!=(r.biff>=12?1048575:r.biff>=8?65536:16384)||e.e.rRel?e.s.c!=0||e.s.cRel||e.e.c!=(r.biff>=12?16383:255)||e.e.cRel?rf(e.s,r.biff)+":"+rf(e.e,r.biff):(e.s.rRel?"":"$")+Ho(e.s.r)+":"+(e.e.rRel?"":"$")+Ho(e.e.r):(e.s.cRel?"":"$")+Eo(e.s.c)+":"+(e.e.cRel?"":"$")+Eo(e.e.c)}function Gv(e){return parseInt(e.replace(/\$(\d+)$/,"$1"),10)-1}function Ho(e){return""+(e+1)}function Uv(e){for(var r=e.replace(/^\$([A-Z])/,"$1"),t=0,n=0;n!==r.length;++n)t=26*t+r.charCodeAt(n)-64;return t-1}function Eo(e){if(e<0)throw new Error("invalid column "+e);var r="";for(++e;e;e=Math.floor((e-1)/26))r=String.fromCharCode((e-1)%26+65)+r;return r}function Do(e){for(var r=0,t=0,n=0;n=48&&a<=57?r=10*r+(a-48):a>=65&&a<=90&&(t=26*t+(a-64))}return{c:t-1,r:r-1}}function In(e){for(var r=e.c+1,t="";r;r=(r-1)/26|0)t=String.fromCharCode((r-1)%26+65)+t;return t+(e.r+1)}function Es(e){var r=e.indexOf(":");return r==-1?{s:Do(e),e:Do(e)}:{s:Do(e.slice(0,r)),e:Do(e.slice(r+1))}}function _i(e,r){return r===void 0||typeof r=="number"?_i(e.s,e.e):(typeof e!="string"&&(e=In(e)),typeof r!="string"&&(r=In(r)),e==r?e:e+":"+r)}function ea(e){var r={s:{c:0,r:0},e:{c:0,r:0}},t=0,n=0,a=0,s=e.length;for(t=0;n26);++n)t=26*t+a;for(r.s.c=--t,t=0;n9);++n)t=10*t+a;if(r.s.r=--t,n===s||a!=10)return r.e.c=r.s.c,r.e.r=r.s.r,r;for(++n,t=0;n!=s&&!((a=e.charCodeAt(n)-64)<1||a>26);++n)t=26*t+a;for(r.e.c=--t,t=0;n!=s&&!((a=e.charCodeAt(n)-48)<0||a>9);++n)t=10*t+a;return r.e.r=--t,r}function mb(e,r){var t=e.t=="d"&&r instanceof Date;if(e.z!=null)try{return e.w=Cs(e.z,t?Zo(r):r)}catch{}try{return e.w=Cs((e.XF||{}).numFmtId||(t?14:0),t?Zo(r):r)}catch{return""+r}}function ll(e,r,t){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&t&&t.dateNF&&(e.z=t.dateNF),e.t=="e"?Lu[e.v]||e.v:mb(e,r??e.v))}function Kl(e,r){var t=r&&r.sheet?r.sheet:"Sheet1",n={};return n[t]=e,{SheetNames:[t],Sheets:n}}function Al(e,r){return function(t,n,a){var s=a||{},o=t?Array.isArray(t):s.dense,i=t||(o?[]:{}),c=0,u=0;if(i&&s.origin!=null){if(typeof s.origin=="number")c=s.origin;else{var l=typeof s.origin=="string"?Do(s.origin):s.origin;c=l.r,u=l.c}i["!ref"]||(i["!ref"]="A1:A1")}var A={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var h=ea(i["!ref"]);A.s.c=h.s.c,A.s.r=h.s.r,A.e.c=Math.max(A.e.c,h.e.c),A.e.r=Math.max(A.e.r,h.e.r),c==-1&&(A.e.r=c=h.e.r+1)}for(var f=0;f!=n.length;++f)if(n[f]){if(!Array.isArray(n[f]))throw new Error("aoa_to_sheet expects an array of arrays");for(var d=0;d!=n[f].length;++d)if(n[f][d]!==void 0){var g={v:n[f][d]},p=c+f,m=u+d;if(A.s.r>p&&(A.s.r=p),A.s.c>m&&(A.s.c=m),A.e.r0&&r.write_shift(0,e,"dbcs"),t?r.slice(0,r.l):r}function yb(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function x0(e,r){var t=e.l,n=e.read_shift(1),a=As(e),s=[],o={t:a,h:a};if(1&n){for(var i=e.read_shift(4),c=0;c!=i;++c)s.push(yb(e));o.r=s}else o.r=[{ich:0,ifnt:0}];return e.l=t+r,o}var S0=x0;function jv(e,r){var t=!1;return r==null&&(t=!0,r=Kt(23+4*e.t.length)),r.write_shift(1,1),Yo(e.t,r),r.write_shift(4,1),function(n,a){a||(a=Kt(4)),a.write_shift(2,n.ich||0),a.write_shift(2,n.ifnt||0)}({ich:0,ifnt:0},r),t?r.slice(0,r.l):r}function pc(e){var r=e.read_shift(4),t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:r,iStyleRef:t}}function Tu(e,r){return r==null&&(r=Kt(8)),r.write_shift(-4,e.c),r.write_shift(3,e.iStyleRef||e.s),r.write_shift(1,0),r}function hl(e){var r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:r}}function zl(e,r){return r==null&&(r=Kt(4)),r.write_shift(3,e.iStyleRef||e.s),r.write_shift(1,0),r}var Ib=As,Hv=Yo;function _0(e){var r=e.read_shift(4);return r===0||r===4294967295?"":e.read_shift(r,"dbcs")}function kd(e,r){var t=!1;return r==null&&(t=!0,r=Kt(127)),r.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&r.write_shift(0,e,"dbcs"),t?r.slice(0,r.l):r}var bb=As,D0=_0,R0=kd;function F0(e){var r=e.slice(e.l,e.l+4),t=1&r[0],n=2&r[0];e.l+=4;var a=n===0?Qd([0,0,0,0,252&r[0],r[1],r[2],r[3]],0):Wl(r,0)>>2;return t?a/100:a}function N0(e,r){r==null&&(r=Kt(4));var t=0,n=0,a=100*e;if(e==(0|e)&&e>=-(1<<29)&&e<1<<29?n=1:a==(0|a)&&a>=-(1<<29)&&a<1<<29&&(n=1,t=1),!n)throw new Error("unsupported RkNumber "+e);r.write_shift(-4,((t?a:e)<<2)+(t+2))}function Yv(e){var r={s:{},e:{}};return r.s.r=e.read_shift(4),r.e.r=e.read_shift(4),r.s.c=e.read_shift(4),r.e.c=e.read_shift(4),r}var Vl=Yv,zA=function(e,r){return r||(r=Kt(16)),r.write_shift(4,e.s.r),r.write_shift(4,e.e.r),r.write_shift(4,e.s.c),r.write_shift(4,e.e.c),r};function hs(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function Zl(e,r){return(r||Kt(8)).write_shift(8,e,"f")}function nf(e,r){if(r||(r=Kt(8)),!e||e.auto)return r.write_shift(4,0),r.write_shift(4,0),r;e.index!=null?(r.write_shift(1,2),r.write_shift(1,e.index)):e.theme!=null?(r.write_shift(1,6),r.write_shift(1,e.theme)):(r.write_shift(1,5),r.write_shift(1,0));var t=e.tint||0;if(t>0?t*=32767:t<0&&(t*=32768),r.write_shift(2,t),e.rgb&&e.theme==null){var n=e.rgb||"FFFFFF";typeof n=="number"&&(n=("000000"+n.toString(16)).slice(-6)),r.write_shift(1,parseInt(n.slice(0,2),16)),r.write_shift(1,parseInt(n.slice(2,4),16)),r.write_shift(1,parseInt(n.slice(4,6),16)),r.write_shift(1,255)}else r.write_shift(2,0),r.write_shift(1,0),r.write_shift(1,0);return r}function M0(e,r){var t=e.read_shift(4);switch(t){case 0:return"";case 4294967295:case 4294967294:return{2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"}[e.read_shift(4)]||""}if(t>400)throw new Error("Unsupported Clipboard: "+t.toString(16));return e.l-=4,e.read_shift(0,r==1?"lpstr":"lpwstr")}var T0=2,Ps=3,Jv=12,Jo=80,qv=81,Cb=[Jo,qv],L0={1:{n:"CodePage",t:T0},2:{n:"Category",t:Jo},3:{n:"PresentationFormat",t:Jo},4:{n:"ByteCount",t:Ps},5:{n:"LineCount",t:Ps},6:{n:"ParagraphCount",t:Ps},7:{n:"SlideCount",t:Ps},8:{n:"NoteCount",t:Ps},9:{n:"HiddenCount",t:Ps},10:{n:"MultimediaClipCount",t:Ps},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:Jo},15:{n:"Company",t:Jo},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:Ps},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:Ps,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:Jo},27:{n:"ContentStatus",t:Jo},28:{n:"Language",t:Jo},29:{n:"Version",t:Jo},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},O0={1:{n:"CodePage",t:T0},2:{n:"Title",t:Jo},3:{n:"Subject",t:Jo},4:{n:"Author",t:Jo},5:{n:"Keywords",t:Jo},6:{n:"Comments",t:Jo},7:{n:"Template",t:Jo},8:{n:"LastAuthor",t:Jo},9:{n:"RevNumber",t:Jo},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:Ps},15:{n:"WordCount",t:Ps},16:{n:"CharCount",t:Ps},17:{n:"Thumbnail",t:71},18:{n:"Application",t:Jo},19:{n:"DocSecurity",t:Ps},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},Wv={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},xd=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function Eb(e){return e.map(function(r){return[r>>16&255,r>>8&255,255&r]})}var VA=Ra(Eb([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),Lu={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},Kv={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},P0={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},fl={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function zv(e,r){var t,n=function(c){for(var u=[],l=za(c),A=0;A!==l.length;++A)u[c[l[A]]]==null&&(u[c[l[A]]]=[]),u[c[l[A]]].push(l[A]);return u}(P0),a=[];a[a.length]=fo,a[a.length]=Zr("Types",null,{xmlns:_o.CT,"xmlns:xsd":_o.xsd,"xmlns:xsi":_o.xsi}),a=a.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(c){return Zr("Default",null,{Extension:c[0],ContentType:c[1]})}));var s=function(c){e[c]&&e[c].length>0&&(t=e[c][0],a[a.length]=Zr("Override",null,{PartName:(t[0]=="/"?"":"/")+t,ContentType:fl[c][r.bookType]||fl[c].xlsx}))},o=function(c){(e[c]||[]).forEach(function(u){a[a.length]=Zr("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:fl[c][r.bookType]||fl[c].xlsx})})},i=function(c){(e[c]||[]).forEach(function(u){a[a.length]=Zr("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:n[c][0]})})};return s("workbooks"),o("sheets"),o("charts"),i("themes"),["strs","styles"].forEach(s),["coreprops","extprops","custprops"].forEach(i),i("vba"),i("comments"),i("threadedcomments"),i("drawings"),o("metadata"),i("people"),a.length>2&&(a[a.length]="",a[1]=a[1].replace("/>",">")),a.join("")}var Si={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function af(e){var r=e.lastIndexOf("/");return e.slice(0,r+1)+"_rels/"+e.slice(r+1)+".rels"}function Xl(e,r){var t={"!id":{}};if(!e)return t;r.charAt(0)!=="/"&&(r="/"+r);var n={};return(e.match(us)||[]).forEach(function(a){var s=ci(a);if(s[0]==="2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}function ta(e,r,t,n,a,s){if(a||(a={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),r<0)for(r=e["!idx"];e["!id"]["rId"+r];++r);if(e["!idx"]=r+1,a.Id="rId"+r,a.Type=n,a.Target=t,s?a.TargetMode=s:[Si.HLINK,Si.XPATH,Si.XMISS].indexOf(a.Type)>-1&&(a.TargetMode="External"),e["!id"][a.Id])throw new Error("Cannot rewrite rId "+r);return e["!id"][a.Id]=a,e[("/"+a.Target).replace("//","/")]=a,r}var wb="application/vnd.oasis.opendocument.spreadsheet";function Vv(e,r,t){return[' `,' `,` `].join("")}function Zv(){return'SheetJS '+o0.version+""}var vc=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],Bb=function(){for(var e=new Array(vc.length),r=0;r]*>([\\s\\S]*?)")}return e}();function Xv(e){var r={};e=ua(e);for(var t=0;t0&&(r[n[1]]=Mi(a[1])),n[2]==="date"&&r[n[1]]&&(r[n[1]]=Ga(r[n[1]]))}return r}function G0(e,r,t,n,a){a[e]==null&&r!=null&&r!==""&&(a[e]=r,r=ca(r),n[n.length]=t?Zr(e,r,t):Xo(e,r))}function $v(e,r){var t=r||{},n=[fo,Zr("cp:coreProperties",null,{"xmlns:cp":_o.CORE_PROPS,"xmlns:dc":_o.dc,"xmlns:dcterms":_o.dcterms,"xmlns:dcmitype":_o.dcmitype,"xmlns:xsi":_o.xsi})],a={};if(!e&&!t.Props)return n.join("");e&&(e.CreatedDate!=null&&G0("dcterms:created",typeof e.CreatedDate=="string"?e.CreatedDate:Bd(e.CreatedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},n,a),e.ModifiedDate!=null&&G0("dcterms:modified",typeof e.ModifiedDate=="string"?e.ModifiedDate:Bd(e.ModifiedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},n,a));for(var s=0;s!=vc.length;++s){var o=vc[s],i=t.Props&&t.Props[o[1]]!=null?t.Props[o[1]]:e?e[o[1]]:null;i===!0?i="1":i===!1?i="0":typeof i=="number"&&(i=String(i)),i!=null&&G0(o[0],i,null,n,a)}return n.length>2&&(n[n.length]="",n[1]=n[1].replace("/>",">")),n.join("")}var $l=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],em=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function tm(e,r,t,n){var a=[];if(typeof e=="string")a=mv(e,n);else for(var s=0;s0)for(var u=0;u!==a.length;u+=2){switch(c=+a[u+1].v,a[u].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":t.Worksheets=c,t.SheetNames=o.slice(i,i+c);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":t.NamedRanges=c,t.DefinedNames=o.slice(i,i+c);break;case"Charts":case"Diagramme":t.Chartsheets=c,t.ChartNames=o.slice(i,i+c)}i+=c}}function rm(e){var r=[],t=Zr;return e||(e={}),e.Application="SheetJS",r[r.length]=fo,r[r.length]=Zr("Properties",null,{xmlns:_o.EXT_PROPS,"xmlns:vt":_o.vt}),$l.forEach(function(n){if(e[n[1]]!==void 0){var a;switch(n[2]){case"string":a=ca(String(e[n[1]]));break;case"bool":a=e[n[1]]?"true":"false"}a!==void 0&&(r[r.length]=t(n[0],a))}}),r[r.length]=t("HeadingPairs",t("vt:vector",t("vt:variant","Worksheets")+t("vt:variant",t("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),r[r.length]=t("TitlesOfParts",t("vt:vector",e.SheetNames.map(function(n){return""+ca(n)+""}).join(""),{size:e.Worksheets,baseType:"lpstr"})),r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}var Qb=/<[^>]+>[^<]*/g;function nm(e){var r=[fo,Zr("Properties",null,{xmlns:_o.CUST_PROPS,"xmlns:vt":_o.vt})];if(!e)return r.join("");var t=1;return za(e).forEach(function(n){++t,r[r.length]=Zr("property",function(a,s){switch(typeof a){case"string":var o=Zr("vt:lpwstr",ca(a));return s&&(o=o.replace(/"/g,"_x0022_")),o;case"number":return Zr((0|a)==a?"vt:i4":"vt:r8",ca(String(a)));case"boolean":return Zr("vt:bool",a?"true":"false")}if(a instanceof Date)return Zr("vt:filetime",Bd(a));throw new Error("Unable to serialize "+a)}(e[n],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:ca(n)})}),r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}var U0,j0={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function im(e,r,t){U0||(U0=bd(j0)),e[r=U0[r]||r]=t}function H0(e){var r=e.read_shift(4),t=e.read_shift(4);return new Date(1e3*(t/1e7*Math.pow(2,32)+r/1e7-11644473600)).toISOString().replace(/\.000/,"")}function am(e,r,t){var n=e.l,a=e.read_shift(0,"lpstr-cp");if(t)for(;e.l-n&3;)++e.l;return a}function om(e,r,t){var n=e.read_shift(0,"lpwstr");return t&&(e.l+=4-(n.length+1&3)&3),n}function sm(e,r,t){return r===31?om(e):am(e,0,t)}function cm(e,r,t){return sm(e,r,t===!1?0:4)}function kb(e){var r=e.l,t=Sd(e,qv);return e[e.l]==0&&e[e.l+1]==0&&e.l-r&2&&(e.l+=2),[t,Sd(e,Ps)]}function um(e,r){for(var t=e.read_shift(4),n={},a=0;a!=t;++a){var s=e.read_shift(4),o=e.read_shift(4);n[s]=e.read_shift(o,r===1200?"utf16le":"utf8").replace(bs,"").replace(Jh,"!"),r===1200&&o%2&&(e.l+=2)}return 3&e.l&&(e.l=e.l>>3<<2),n}function Y0(e){var r=e.read_shift(4),t=e.slice(e.l,e.l+r);return e.l+=r,(3&r)>0&&(e.l+=4-(3&r)&3),t}function Sd(e,r,t){var n,a=e.read_shift(2),s=t||{};if(e.l+=2,r!==Jv&&a!==r&&Cb.indexOf(r)===-1&&((65534&r)!=4126||(65534&a)!=4126))throw new Error("Expected type "+r+" saw "+a);switch(r===Jv?a:r){case 2:return n=e.read_shift(2,"i"),s.raw||(e.l+=2),n;case 3:return n=e.read_shift(4,"i");case 11:return e.read_shift(4)!==0;case 19:return n=e.read_shift(4);case 30:return am(e,0,4).replace(bs,"");case 31:return om(e);case 64:return H0(e);case 65:return Y0(e);case 71:return function(o){var i={};return i.Size=o.read_shift(4),o.l+=i.Size+3-(i.Size-1)%4,i}(e);case 80:return cm(e,a,!s.raw).replace(bs,"");case 81:return function(o,i){if(!i)throw new Error("VtUnalignedString must have positive length");return sm(o,i,0)}(e,a).replace(bs,"");case 4108:return function(o){for(var i=o.read_shift(4),c=[],u=0;u0&&(o%=Math.pow(2,32),i+=c);var u=Kt(8);return u.write_shift(4,o),u.write_shift(4,i),u}(r);break;case 31:case 80:for((n=Kt(4+2*(r.length+1)+(r.length%2?0:2))).write_shift(4,r.length+1),n.write_shift(0,r,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+r)}return jo([t,n])}function J0(e,r){var t=e.l,n=e.read_shift(4),a=e.read_shift(4),s=[],o=0,i=0,c=-1,u={};for(o=0;o!=a;++o){var l=e.read_shift(4),A=e.read_shift(4);s[o]=[l,A+t]}s.sort(function(v,y){return v[1]-y[1]});var h={};for(o=0;o!=a;++o){if(e.l!==s[o][1]){var f=!0;if(o>0&&r)switch(r[s[o-1][0]].t){case 2:e.l+2===s[o][1]&&(e.l+=2,f=!1);break;case 80:case 4108:e.l<=s[o][1]&&(e.l=s[o][1],f=!1)}if((!r||o==0)&&e.l<=s[o][1]&&(f=!1,e.l=s[o][1]),f)throw new Error("Read Error: Expected address "+s[o][1]+" at "+e.l+" :"+o)}if(r){var d=r[s[o][0]];if(h[d.n]=Sd(e,d.t,{raw:!0}),d.p==="version"&&(h[d.n]=String(h[d.n]>>16)+"."+("0000"+String(65535&h[d.n])).slice(-4)),d.n=="CodePage")switch(h[d.n]){case 0:h[d.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:Mc(i=h[d.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+h[d.n])}}else if(s[o][0]===1){if(i=h.CodePage=Sd(e,T0),Mc(i),c!==-1){var g=e.l;e.l=s[c][1],u=um(e,i),e.l=g}}else if(s[o][0]===0){if(i===0){c=o,e.l=s[o+1][1];continue}u=um(e,i)}else{var p,m=u[s[o][0]];switch(e[e.l]){case 65:e.l+=4,p=Y0(e);break;case 30:case 31:e.l+=4,p=cm(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,p=e.read_shift(4,"i");break;case 19:e.l+=4,p=e.read_shift(4);break;case 5:e.l+=4,p=e.read_shift(8,"f");break;case 11:e.l+=4,p=go(e,4);break;case 64:e.l+=4,p=Ga(H0(e));break;default:throw new Error("unparsed value: "+e[e.l])}h[m]=p}}return e.l=t+n,h}var Am=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function xb(e){switch(typeof e){case"boolean":return 11;case"number":return(0|e)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64}return-1}function hm(e,r,t){var n=Kt(8),a=[],s=[],o=8,i=0,c=Kt(8),u=Kt(8);if(c.write_shift(4,2),c.write_shift(4,1200),u.write_shift(4,1),s.push(c),a.push(u),o+=8+c.length,!r){(u=Kt(8)).write_shift(4,0),a.unshift(u);var l=[Kt(4)];for(l[0].write_shift(4,e.length),i=0;i-1||em.indexOf(e[i][0])>-1)&&e[i][1]!=null){var h=e[i][1],f=0;if(r){var d=t[f=+r[e[i][0]]];if(d.p=="version"&&typeof h=="string"){var g=h.split(".");h=(+g[0]<<16)+(+g[1]||0)}c=lm(d.t,h)}else{var p=xb(h);p==-1&&(p=31,h=String(h)),c=lm(p,h)}s.push(c),(u=Kt(8)).write_shift(4,r?f:2+i),a.push(u),o+=8+c.length}var m=8*(s.length+1);for(i=0;i=12?2:1),a="sbcs-cont";return t&&t.biff,t&&t.biff!=8?t.biff==12&&(a="wstr"):e.read_shift(1)&&(a="dbcs-cont"),t.biff>=2&&t.biff<=5&&(a="cpstr"),n?e.read_shift(n,a):""}function Sb(e){var r,t=e.read_shift(2),n=e.read_shift(1),a=4&n,s=8&n,o=1+(1&n),i=0,c={};s&&(i=e.read_shift(2)),a&&(r=e.read_shift(4));var u=o==2?"dbcs-cont":"sbcs-cont",l=t===0?"":e.read_shift(t,u);return s&&(e.l+=4*i),a&&(e.l+=r),c.t=l,s||(c.raw=""+c.t+"",c.r=c.t),c}function gm(e){var r=e.t||"",t=Kt(3);t.write_shift(2,r.length),t.write_shift(1,1);var n=Kt(2*r.length);return n.write_shift(2*r.length,r,"utf16le"),jo([t,n])}function eA(e,r,t){if(t){if(t.biff>=2&&t.biff<=5)return e.read_shift(r,"cpstr");if(t.biff>=12)return e.read_shift(r,"dbcs-cont")}return e.read_shift(1)===0?e.read_shift(r,"sbcs-cont"):e.read_shift(r,"dbcs-cont")}function of(e,r,t){var n=e.read_shift(t&&t.biff==2?1:2);return n===0?(e.l++,""):eA(e,n,t)}function tA(e,r,t){if(t.biff>5)return of(e,0,t);var n=e.read_shift(1);return n===0?(e.l++,""):e.read_shift(n,t.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function eh(e,r,t){return t||(t=Kt(3+2*e.length)),t.write_shift(2,e.length),t.write_shift(1,1),t.write_shift(31,e,"utf16le"),t}function _b(e,r){var t=e.read_shift(16);switch(t){case"e0c9ea79f9bace118c8200aa004ba90b":return function(n){var a=n.read_shift(4),s=n.l,o=!1;a>24&&(n.l+=a-24,n.read_shift(16)==="795881f43b1d7f48af2c825dc4852763"&&(o=!0),n.l=s);var i=n.read_shift((o?a-24:a)>>1,"utf16le").replace(bs,"");return o&&(n.l+=24),i}(e);case"0303000000000000c000000000000046":return function(n){for(var a=n.read_shift(2),s="";a-- >0;)s+="../";var o=n.read_shift(0,"lpstr-ansi");if(n.l+=2,n.read_shift(2)!=57005)throw new Error("Bad FileMoniker");if(n.read_shift(4)===0)return s+o.replace(/\\/g,"/");var i=n.read_shift(4);if(n.read_shift(2)!=3)throw new Error("Bad FileMoniker");return s+n.read_shift(i>>1,"utf16le").replace(bs,"")}(e);default:throw new Error("Unsupported Moniker "+t)}}function sf(e){var r=e.read_shift(4);return r>0?e.read_shift(r,"utf16le").replace(bs,""):""}function pm(e,r){r||(r=Kt(6+2*e.length)),r.write_shift(4,1+e.length);for(var t=0;t-1?31:23;switch(n.charAt(0)){case"#":s=28;break;case".":s&=-3}r.write_shift(4,2),r.write_shift(4,s);var o=[8,6815827,6619237,4849780,83];for(t=0;t-1?n.slice(0,a):n;for(r.write_shift(4,2*(i.length+1)),t=0;t-1?n.slice(a+1):"",r)}else{for(o="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),t=0;t8?4:2;return[e.read_shift(n),e.read_shift(n,"i"),e.read_shift(n,"i")]}function W0(e){return[e.read_shift(2),F0(e)]}function _d(e){var r=e.read_shift(2),t=e.read_shift(2);return{s:{c:e.read_shift(2),r},e:{c:e.read_shift(2),r:t}}}function ym(e,r){return r||(r=Kt(8)),r.write_shift(2,e.s.r),r.write_shift(2,e.e.r),r.write_shift(2,e.s.c),r.write_shift(2,e.e.c),r}function Im(e){var r=e.read_shift(2),t=e.read_shift(2);return{s:{c:e.read_shift(1),r},e:{c:e.read_shift(1),r:t}}}var K0=Im;function bm(e){e.l+=4;var r=e.read_shift(2),t=e.read_shift(2),n=e.read_shift(2);return e.l+=12,[t,r,n]}function fs(e){e.l+=2,e.l+=e.read_shift(2)}var Fb={0:fs,4:fs,5:fs,6:fs,7:function(e){return e.l+=4,e.cf=e.read_shift(2),{}},8:fs,9:fs,10:fs,11:fs,12:fs,13:function(e){var r={};return e.l+=4,e.l+=16,r.fSharedNote=e.read_shift(2),e.l+=4,r},14:fs,15:fs,16:fs,17:fs,18:fs,19:fs,20:fs,21:bm};function Dd(e,r){var t={BIFFVer:0,dt:0};switch(t.BIFFVer=e.read_shift(2),(r-=2)>=2&&(t.dt=e.read_shift(2),e.l-=2),t.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(r>6)throw new Error("Unexpected BIFF Ver "+t.BIFFVer)}return e.read_shift(r),t}function Rd(e,r,t){var n=1536,a=16;switch(t.bookType){case"biff8":case"xla":break;case"biff5":n=1280,a=8;break;case"biff4":n=4,a=6;break;case"biff3":n=3,a=6;break;case"biff2":n=2,a=4;break;default:throw new Error("unsupported BIFF version")}var s=Kt(a);return s.write_shift(2,n),s.write_shift(2,r),a>4&&s.write_shift(2,29282),a>6&&s.write_shift(2,1997),a>8&&(s.write_shift(2,49161),s.write_shift(2,1),s.write_shift(2,1798),s.write_shift(2,0)),s}function Nb(e,r){var t=!r||r.biff>=8?2:1,n=Kt(8+t*e.name.length);n.write_shift(4,e.pos),n.write_shift(1,e.hs||0),n.write_shift(1,e.dt),n.write_shift(1,e.name.length),r.biff>=8&&n.write_shift(1,1),n.write_shift(t*e.name.length,e.name,r.biff<8?"sbcs":"utf16le");var a=n.slice(0,n.l);return a.l=n.l,a}function Cm(e,r,t){var n=0;t&&t.biff==2||(n=e.read_shift(2));var a=e.read_shift(2);return t&&t.biff==2&&(n=1-(a>>15),a&=32767),[{Unsynced:1&n,DyZero:(2&n)>>1,ExAsc:(4&n)>>2,ExDsc:(8&n)>>3},a]}function Mb(e,r,t,n){var a=t&&t.biff==5;n||(n=Kt(a?3+r.length:5+2*r.length)),n.write_shift(2,e),n.write_shift(a?1:2,r.length),a||n.write_shift(1,1),n.write_shift((a?1:2)*r.length,r,a?"sbcs":"utf16le");var s=n.length>n.l?n.slice(0,n.l):n;return s.l==null&&(s.l=s.length),s}var Tb=tA;function Em(e,r,t){var n=e.l+r,a=t.biff!=8&&t.biff?2:4,s=e.read_shift(a),o=e.read_shift(a),i=e.read_shift(2),c=e.read_shift(2);return e.l=n,{s:{r:s,c:i},e:{r:o,c}}}function wm(e,r,t,n){var a=t&&t.biff==5;n||(n=Kt(a?16:20)),n.write_shift(2,0),e.style?(n.write_shift(2,e.numFmtId||0),n.write_shift(2,65524)):(n.write_shift(2,e.numFmtId||0),n.write_shift(2,r<<4));var s=0;return e.numFmtId>0&&a&&(s|=1024),n.write_shift(4,s),n.write_shift(4,0),a||n.write_shift(4,0),n.write_shift(2,0),n}function Bm(e,r,t){var n=su(e);t.biff!=2&&r!=9||++e.l;var a=function(s){var o=s.read_shift(1);return s.read_shift(1)===1?o:o===1}(e);return n.val=a,n.t=a===!0||a===!1?"b":"e",n}var Qm=function(e,r,t){return r===0?"":tA(e,0,t)};function km(e,r,t){var n,a=e.read_shift(2),s={fBuiltIn:1&a,fWantAdvise:a>>>1&1,fWantPict:a>>>2&1,fOle:a>>>3&1,fOleLink:a>>>4&1,cf:a>>>5&1023,fIcon:a>>>15&1};return t.sbcch===14849&&(n=function(o,i,c){o.l+=4,i-=4;var u=o.l+i,l=$A(o,0,c),A=o.read_shift(2);if(A!==(u-=o.l))throw new Error("Malformed AddinUdf: padding = "+u+" != "+A);return o.l+=A,l}(e,r-2,t)),s.body=n||e.read_shift(r-2),typeof n=="string"&&(s.Name=n),s}var Lb=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function xm(e,r,t){var n=e.l+r,a=e.read_shift(2),s=e.read_shift(1),o=e.read_shift(1),i=e.read_shift(t&&t.biff==2?1:2),c=0;(!t||t.biff>=5)&&(t.biff!=5&&(e.l+=2),c=e.read_shift(2),t.biff==5&&(e.l+=2),e.l+=4);var u=eA(e,o,t);32&a&&(u=Lb[u.charCodeAt(0)]);var l=n-e.l;t&&t.biff==2&&--l;var A=n!=e.l&&i!==0&&l>0?function(h,f,d,g){var p,m=h.l+f,v=vf(h,g,d);return m!==h.l&&(p=pf(h,m-h.l,v,d)),[v,p]}(e,l,t,i):[];return{chKey:s,Name:u,itab:c,rgce:A}}function Sm(e,r,t){if(t.biff<8)return function(o,i,c){o[o.l+1]==3&&o[o.l]++;var u=$A(o,0,c);return u.charCodeAt(0)==3?u.slice(1):u}(e,0,t);for(var n=[],a=e.l+r,s=e.read_shift(t.biff>8?4:2);s--!=0;)n.push(Rb(e,t.biff,t));if(e.l!=a)throw new Error("Bad ExternSheet: "+e.l+" != "+a);return n}function _m(e,r,t){var n=K0(e);switch(t.biff){case 2:e.l++,r-=7;break;case 3:case 4:e.l+=2,r-=8;break;default:e.l+=6,r-=12}return[n,PC(e,r,t)]}var Ob={8:function(e,r){var t=e.l+r;e.l+=10;var n=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var a=e.read_shift(1);return e.l+=a,e.l=t,{fmt:n}}};function Pb(e){var r=Kt(24),t=Do(e[0]);r.write_shift(2,t.r),r.write_shift(2,t.r),r.write_shift(2,t.c),r.write_shift(2,t.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),a=0;a<16;++a)r.write_shift(1,parseInt(n[a],16));return jo([r,Db(e[1])])}function Gb(e){var r=e[1].Tooltip,t=Kt(10+2*(r.length+1));t.write_shift(2,2048);var n=Do(e[0]);t.write_shift(2,n.r),t.write_shift(2,n.r),t.write_shift(2,n.c),t.write_shift(2,n.c);for(var a=0;a=12?4:2,a=e.read_shift(n),s=e.read_shift(n),o=e.read_shift(n),i=e.read_shift(n),c=e.read_shift(2);n==2&&(e.l+=2);var u={s:a,e:s,w:o,ixfe:i,flags:c};return(t.biff>=5||!t.biff)&&(u.level=c>>8&7),u}var Ub=su,jb=XA,Hb=of,Yb=[2,3,48,49,131,139,140,245],z0=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},r=bd({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function t(a,s){var o=s||{};o.dateNF||(o.dateNF="yyyymmdd");var i=Al(function(c,u){var l=[],A=ul(1);switch(u.type){case"base64":A=ec($s(c));break;case"binary":A=ec(c);break;case"buffer":case"array":A=c}$o(A,0);var h=A.read_shift(1),f=!!(136&h),d=!1,g=!1;switch(h){case 2:case 3:case 131:case 139:case 245:break;case 48:case 49:d=!0,f=!0;break;case 140:g=!0;break;default:throw new Error("DBF Unsupported Version: "+h.toString(16))}var p=0,m=521;h==2&&(p=A.read_shift(2)),A.l+=3,h!=2&&(p=A.read_shift(4)),p>1048576&&(p=1e6),h!=2&&(m=A.read_shift(2));var v=A.read_shift(2),y=u.codepage||1252;h!=2&&(A.l+=16,A.read_shift(1),A[A.l]!==0&&(y=e[A[A.l]]),A.l+=1,A.l+=2),g&&(A.l+=36);for(var I=[],E={},k=Math.min(A.length,h==2?521:m-10-(d?264:0)),R=g?32:11;A.l0;)if(A[A.l]!==42)for(++A.l,l[++T]=[],j=0,j=0;j!=I.length;++j){var W=A.slice(A.l,A.l+I[j].len);A.l+=I[j].len,$o(W,0);var H=sl.utils.decode(y,W);switch(I[j].type){case"C":H.trim().length&&(l[T][j]=H.replace(/\s+$/,""));break;case"D":H.length===8?l[T][j]=new Date(+H.slice(0,4),+H.slice(4,6)-1,+H.slice(6,8)):l[T][j]=H;break;case"F":l[T][j]=parseFloat(H.trim());break;case"+":case"I":l[T][j]=g?2147483648^W.read_shift(-4,"i"):W.read_shift(4,"i");break;case"L":switch(H.trim().toUpperCase()){case"Y":case"T":l[T][j]=!0;break;case"N":case"F":l[T][j]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+H+"|")}break;case"M":if(!f)throw new Error("DBF Unexpected MEMO for type "+h.toString(16));l[T][j]="##MEMO##"+(g?parseInt(H.trim(),10):W.read_shift(4));break;case"N":(H=H.replace(/\u0000/g,"").trim())&&H!="."&&(l[T][j]=+H||0);break;case"@":l[T][j]=new Date(W.read_shift(-8,"f")-621356832e5);break;case"T":l[T][j]=new Date(864e5*(W.read_shift(4)-2440588)+W.read_shift(4));break;case"Y":l[T][j]=W.read_shift(4,"i")/1e4+W.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":l[T][j]=-W.read_shift(-8,"f");break;case"B":if(d&&I[j].len==8){l[T][j]=W.read_shift(8,"f");break}case"G":case"P":W.l+=I[j].len;break;case"0":if(I[j].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+I[j].type)}}else A.l+=v;if(h!=2&&A.l=0&&Mc(+o.codepage),o.type=="string")throw new Error("Cannot write DBF to JS string");var i=Os(),c=Ky(a,{header:1,raw:!0,cellDates:!0}),u=c[0],l=c.slice(1),A=a["!cols"]||[],h=0,f=0,d=0,g=1;for(h=0;h250&&(k=250),(E=((A[h]||{}).DBF||{}).type)=="C"&&A[h].DBF.len>k&&(k=A[h].DBF.len),I=="B"&&E=="N"&&(I="N",y[h]=A[h].DBF.dec,k=A[h].DBF.len),v[h]=I=="C"||E=="N"?k:n[I]||0,g+=v[h],m[h]=I}else m[h]="?"}var T=i.next(32);for(T.write_shift(4,318902576),T.write_shift(4,l.length),T.write_shift(2,296+32*d),T.write_shift(2,g),h=0;h<4;++h)T.write_shift(4,0);for(T.write_shift(4,0|(+r[G1]||3)<<8),h=0,f=0;h":190,"?":191,"{":223},r=new RegExp("\x1BN("+za(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),t=function(i,c){var u=e[c];return typeof u=="number"?j1(u):u},n=function(i,c,u){var l=c.charCodeAt(0)-32<<4|u.charCodeAt(0)-48;return l==59?i:j1(l)};function a(i,c){var u,l=i.split(/[\n\r]+/),A=-1,h=-1,f=0,d=0,g=[],p=[],m=null,v={},y=[],I=[],E=[],k=0;for(+c.codepage>=0&&Mc(+c.codepage);f!==l.length;++f){k=0;var R,T=l[f].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(r,t),j=T.replace(/;;/g,"\0").split(";").map(function(O){return O.replace(/\u0000/g,";")}),W=j[0];if(T.length>0)switch(W){case"ID":case"E":case"B":case"O":case"W":break;case"P":j[1].charAt(0)=="P"&&p.push(T.slice(3).replace(/;;/g,";"));break;case"C":var H=!1,X=!1,x=!1,N=!1,C=-1,w=-1;for(d=1;d-1&&g[C][w];if(!B||!B[1])throw new Error("SYLK shared formula cannot find base");g[A][h][1]=Vm(B[1],{r:A-C,c:h-w})}break;case"F":var S=0;for(d=1;d0?(y[A].hpt=k,y[A].hpx=gl(k)):k===0&&(y[A].hidden=!0);break;default:if(c&&c.WTF)throw new Error("SYLK bad record "+T)}S<1&&(m=null);break;default:if(c&&c.WTF)throw new Error("SYLK bad record "+T)}}return y.length>0&&(v["!rows"]=y),I.length>0&&(v["!cols"]=I),c&&c.sheetRows&&(g=g.slice(0,c.sheetRows)),[g,v]}function s(i,c){var u=function(f,d){switch(d.type){case"base64":return a($s(f),d);case"binary":return a(f,d);case"buffer":return a(wi&&Buffer.isBuffer(f)?f.toString("binary"):Du(f),d);case"array":return a(Jl(f),d)}throw new Error("Unrecognized type "+d.type)}(i,c),l=u[0],A=u[1],h=Al(l,c);return za(A).forEach(function(f){h[f]=A[f]}),h}function o(i,c,u,l){var A="C;Y"+(u+1)+";X"+(l+1)+";K";switch(i.t){case"n":A+=i.v||0,i.f&&!i.F&&(A+=";E"+ip(i.f,{r:u,c:l}));break;case"b":A+=i.v?"TRUE":"FALSE";break;case"e":A+=i.w||i.v;break;case"d":A+='"'+(i.w||i.v)+'"';break;case"s":A+='"'+i.v.replace(/"/g,"").replace(/;/g,";;")+'"'}return A}return e["|"]=254,{to_workbook:function(i,c){return Kl(s(i,c),c)},to_sheet:s,from_sheet:function(i,c){var u,l,A=["ID;PWXL;N;E"],h=[],f=ea(i["!ref"]),d=Array.isArray(i),g=`\r `;A.push("P;PGeneral"),A.push("F;P0;DG0G8;M255"),i["!cols"]&&(l=A,i["!cols"].forEach(function(y,I){var E="F;W"+(I+1)+" "+(I+1)+" ";y.hidden?E+="0":(typeof y.width!="number"||y.wpx||(y.wpx=Af(y.width)),typeof y.wpx!="number"||y.wch||(y.wch=rh(y.wpx)),typeof y.wch=="number"&&(E+=Math.round(y.wch))),E.charAt(E.length-1)!=" "&&l.push(E)})),i["!rows"]&&function(y,I){I.forEach(function(E,k){var R="F;";E.hidden?R+="M0;":E.hpt?R+="M"+20*E.hpt+";":E.hpx&&(R+="M"+20*hf(E.hpx)+";"),R.length>2&&y.push(R+"R"+(k+1))})}(A,i["!rows"]),A.push("B;Y"+(f.e.r-f.s.r+1)+";X"+(f.e.c-f.s.c+1)+";D"+[f.s.c,f.s.r,f.e.c,f.e.r].join(" "));for(var p=f.s.r;p<=f.e.r;++p)for(var m=f.s.c;m<=f.e.c;++m){var v=In({r:p,c:m});(u=d?(i[p]||[])[m]:i[v])&&(u.v!=null||u.f&&!u.F)&&h.push(o(u,0,p,m))}return A.join(g)+g+h.join(g)+g+"E"+g}}}(),Rm=function(){function e(t,n){for(var a=t.split(` `),s=-1,o=-1,i=0,c=[];i!==a.length;++i)if(a[i].trim()!=="BOT"){if(!(s<0)){for(var u=a[i].trim().split(","),l=u[0],A=u[1],h=a[++i]||"";1&(h.match(/["]/g)||[]).length&&i=0?O=ae:Q=ae}}),F>=0&&O==-1&&Q>=0&&(O=Q,Q=-1);var Y=(""+(w>=0?w:new Date().getFullYear())).slice(-4)+"-"+("00"+(Q>=1?Q:1)).slice(-2)+"-"+("00"+(B>=1?B:1)).slice(-2);Y.length==7&&(Y="0"+Y),Y.length==8&&(Y="20"+Y);var M=("00"+(S>=0?S:0)).slice(-2)+":"+("00"+(O>=0?O:0)).slice(-2)+":"+("00"+(F>=0?F:0)).slice(-2);return S==-1&&O==-1&&F==-1?Y:w==-1&&Q==-1&&B==-1?M:Y+"T"+M}(0,u.dateNF,W.match(T)||[]),X=1),u.cellDates?(H.t="d",H.v=Ga(W,X)):(H.t="n",H.v=Zo(Ga(W,X))),u.cellText!==!1&&(H.w=Cs(H.z,H.v instanceof Date?Zo(H.v):H.v)),u.cellNF||delete H.z}else H.t="s",H.v=W;else H.t="n",u.cellText!==!1&&(H.w=W),H.v=g;if(H.t=="z"||(u.dense?(A[f]||(A[f]=[]),A[f][d]=H):A[In({c:d,r:f})]=H),p=m+1,E=i.charCodeAt(p),h.e.c0&&j(),A["!ref"]=_i(h),A}function s(i,c){return c&&c.PRN?c.FS||i.slice(0,4)=="sep="||i.indexOf(" ")>=0||i.indexOf(",")>=0||i.indexOf(";")>=0?a(i,c):Al(function(u,l){var A=l||{},h=[];if(!u||u.length===0)return h;for(var f=u.split(/[\r\n]/),d=f.length-1;d>=0&&f[d].length===0;)--d;for(var g=10,p=0,m=0;m<=d;++m)(p=f[m].indexOf(" "))==-1?p=f[m].length:p++,g=Math.max(g,p);for(m=0;m<=d;++m){h[m]=[];var v=0;for(e(f[m].slice(0,g).trim(),h,m,v,A),v=1;v<=(f[m].length-g)/10+1;++v)e(f[m].slice(g+10*(v-1),g+10*v).trim(),h,m,v,A)}return A.sheetRows&&(h=h.slice(0,A.sheetRows)),h}(i,c),c):a(i,c)}function o(i,c){var u="",l=c.type=="string"?[0,0,0,0]:wp(i,c);switch(c.type){case"base64":u=$s(i);break;case"binary":case"string":u=i;break;case"buffer":u=c.codepage==65001?i.toString("utf8"):c.codepage&&sl!==void 0?sl.utils.decode(c.codepage,i):wi&&Buffer.isBuffer(i)?i.toString("binary"):Du(i);break;case"array":u=Jl(i);break;default:throw new Error("Unrecognized type "+c.type)}return l[0]==239&&l[1]==187&&l[2]==191?u=ua(u.slice(3)):c.type!="string"&&c.type!="buffer"&&c.codepage==65001?u=ua(u):c.type=="binary"&&sl!==void 0&&c.codepage&&(u=sl.utils.decode(c.codepage,sl.utils.encode(28591,u))),u.slice(0,19)=="socialcalc:version:"?Z0.to_sheet(c.type=="string"?u:ua(u),c):s(u,c)}return{to_workbook:function(i,c){return Kl(o(i,c),c)},to_sheet:o,from_sheet:function(i){for(var c,u=[],l=ea(i["!ref"]),A=Array.isArray(i),h=l.s.r;h<=l.e.r;++h){for(var f=[],d=l.s.c;d<=l.e.c;++d){var g=In({r:h,c:d});if((c=A?(i[h]||[])[d]:i[g])&&c.v!=null){for(var p=(c.w||(ll(c),c.w)||"").slice(0,10);p.length<10;)p+=" ";f.push(p+(d===0?" ":""))}else f.push(" ")}u.push(f.join(""))}return u.join(` `)}}}(),nA=function(){function e(y,I,E){if(y){$o(y,y.l||0);for(var k=E.Enum||m;y.l=16&&y[14]==5&&y[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(y[2]==2)E.Enum=m,e(y,function(B,S,O){switch(O){case 0:E.vers=B,B>=4096&&(E.qpro=!0);break;case 6:x=B;break;case 204:B&&(T=B);break;case 222:T=B;break;case 15:case 51:E.qpro||(B[1].v=B[1].v.slice(1));case 13:case 14:case 16:O==14&&(112&B[2])==112&&(15&B[2])>1&&(15&B[2])<15&&(B[1].z=E.dateNF||ai[14],E.cellDates&&(B[1].t="d",B[1].v=Kh(B[1].v))),E.qpro&&B[3]>j&&(k["!ref"]=_i(x),W[R]=k,H.push(R),k=E.dense?[]:{},x={s:{r:0,c:0},e:{r:0,c:0}},j=B[3],R=T||"Sheet"+(j+1),T="");var F=E.dense?(k[B[0].r]||[])[B[0].c]:k[In(B[0])];if(F){F.t=B[1].t,F.v=B[1].v,B[1].z!=null&&(F.z=B[1].z),B[1].f!=null&&(F.f=B[1].f);break}E.dense?(k[B[0].r]||(k[B[0].r]=[]),k[B[0].r][B[0].c]=B[1]):k[In(B[0])]=B[1]}},E);else{if(y[2]!=26&&y[2]!=14)throw new Error("Unrecognized LOTUS BOF "+y[2]);E.Enum=v,y[2]==14&&(E.qpro=!0,y.l=0),e(y,function(B,S,O){switch(O){case 204:R=B;break;case 22:B[1].v=B[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(B[3]>j&&(k["!ref"]=_i(x),W[R]=k,H.push(R),k=E.dense?[]:{},x={s:{r:0,c:0},e:{r:0,c:0}},j=B[3],R="Sheet"+(j+1)),N>0&&B[0].r>=N)break;E.dense?(k[B[0].r]||(k[B[0].r]=[]),k[B[0].r][B[0].c]=B[1]):k[In(B[0])]=B[1],x.e.c=128?95:T)}return k.write_shift(1,0),k}function s(y,I,E){var k=Kt(7);return k.write_shift(1,255),k.write_shift(2,I),k.write_shift(2,y),k.write_shift(2,E,"i"),k}function o(y,I,E){var k=Kt(13);return k.write_shift(1,255),k.write_shift(2,I),k.write_shift(2,y),k.write_shift(8,E,"f"),k}function i(y,I,E){var k=32768&I;return I=(k?y:0)+((I&=-32769)>=8192?I-16384:I),(k?"":"$")+(E?Eo(I):Ho(I))}var c={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},u=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function l(y){var I=[{c:0,r:0},{t:"n",v:0},0];return I[0].r=y.read_shift(2),I[3]=y[y.l++],I[0].c=y[y.l++],I}function A(y,I,E,k){var R=Kt(6+k.length);R.write_shift(2,y),R.write_shift(1,E),R.write_shift(1,I),R.write_shift(1,39);for(var T=0;T=128?95:j)}return R.write_shift(1,0),R}function h(y,I){var E=l(y),k=y.read_shift(4),R=y.read_shift(4),T=y.read_shift(2);if(T==65535)return k===0&&R===3221225472?(E[1].t="e",E[1].v=15):k===0&&R===3489660928?(E[1].t="e",E[1].v=42):E[1].v=0,E;var j=32768&T;return T=(32767&T)-16446,E[1].v=(1-2*j)*(R*Math.pow(2,T+32)+k*Math.pow(2,T)),E}function f(y,I,E,k){var R=Kt(14);if(R.write_shift(2,y),R.write_shift(1,E),R.write_shift(1,I),k==0)return R.write_shift(4,0),R.write_shift(4,0),R.write_shift(2,65535),R;var T,j=0,W=0,H=0;return k<0&&(j=1,k=-k),W=0|Math.log2(k),!(2147483648&(H=(k/=Math.pow(2,W-31))>>>0))&&(++W,H=(k/=2)>>>0),k-=H,H|=2147483648,H>>>=0,T=(k*=Math.pow(2,32))>>>0,R.write_shift(4,T),R.write_shift(4,H),W+=16383+(j?32768:0),R.write_shift(2,W),R}function d(y,I){var E=l(y),k=y.read_shift(8,"f");return E[1].v=k,E}function g(y,I){return y[y.l+I-1]==0?y.read_shift(I,"cstr"):""}function p(y,I){var E=Kt(5+y.length);E.write_shift(2,14e3),E.write_shift(2,I);for(var k=0;k127?95:R}return E[E.l++]=0,E}var m={0:{n:"BOF",f:wo},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function(y,I,E){var k={s:{c:0,r:0},e:{c:0,r:0}};return I==8&&E.qpro?(k.s.c=y.read_shift(1),y.l++,k.s.r=y.read_shift(2),k.e.c=y.read_shift(1),y.l++,k.e.r=y.read_shift(2),k):(k.s.c=y.read_shift(2),k.s.r=y.read_shift(2),I==12&&E.qpro&&(y.l+=2),k.e.c=y.read_shift(2),k.e.r=y.read_shift(2),I==12&&E.qpro&&(y.l+=2),k.s.c==65535&&(k.s.c=k.e.c=k.s.r=k.e.r=0),k)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function(y,I,E){var k=t(y,0,E);return k[1].v=y.read_shift(2,"i"),k}},14:{n:"NUMBER",f:function(y,I,E){var k=t(y,0,E);return k[1].v=y.read_shift(8,"f"),k}},15:{n:"LABEL",f:n},16:{n:"FORMULA",f:function(y,I,E){var k=y.l+I,R=t(y,0,E);if(R[1].v=y.read_shift(8,"f"),E.qpro)y.l=k;else{var T=y.read_shift(2);(function(j,W){$o(j,0);for(var H=[],X=0,x="",N="",C="",w="";j.lH.length)return void console.error("WK1 bad formula parse 0x"+Q.toString(16)+":|"+H.join("|")+"|");var F=H.slice(-X);H.length-=X,H.push(c[Q][0]+"("+F.join(",")+")")}}}H.length==1?W[1].f=""+H[0]:console.error("WK1 bad formula parse |"+H.join("|")+"|")})(y.slice(y.l,y.l+T),R),y.l+=T}return R}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:n},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:g},222:{n:"SHEETNAMELP",f:function(y,I){var E=y[y.l++];E>I-1&&(E=I-1);for(var k="";k.length>1;if(1&E[1].v)switch(7&k){case 0:k=5e3*(k>>3);break;case 1:k=500*(k>>3);break;case 2:k=(k>>3)/20;break;case 3:k=(k>>3)/200;break;case 4:k=(k>>3)/2e3;break;case 5:k=(k>>3)/2e4;break;case 6:k=(k>>3)/16;break;case 7:k=(k>>3)/64}return E[1].v=k,E}},25:{n:"FORMULA19",f:function(y,I){var E=h(y);return y.l+=I-14,E}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function(y,I){for(var E={},k=y.l+I;y.l>6,E}},38:{n:"??"},39:{n:"NUMBER27",f:d},40:{n:"FORMULA28",f:function(y,I){var E=d(y);return y.l+=I-10,E}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:g},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function(y,I,E){if(E.qpro&&!(I<21)){var k=y.read_shift(1);return y.l+=17,y.l+=1,y.l+=2,[k,y.read_shift(I-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:function(y,I){var E=I||{};if(+E.codepage>=0&&Mc(+E.codepage),E.type=="string")throw new Error("Cannot write WK1 to JS string");var k,R,T=Os(),j=ea(y["!ref"]),W=Array.isArray(y),H=[];en(T,0,(k=1030,(R=Kt(2)).write_shift(2,k),R)),en(T,6,function(B){var S=Kt(8);return S.write_shift(2,B.s.c),S.write_shift(2,B.s.r),S.write_shift(2,B.e.c),S.write_shift(2,B.e.r),S}(j));for(var X=Math.min(j.e.r,8191),x=j.s.r;x<=X;++x)for(var N=Ho(x),C=j.s.c;C<=j.e.c;++C){x===j.s.r&&(H[C]=Eo(C));var w=H[C]+N,Q=W?(y[x]||[])[C]:y[w];Q&&Q.t!="z"&&(Q.t=="n"?(0|Q.v)==Q.v&&Q.v>=-32768&&Q.v<=32767?en(T,13,s(x,C,Q.v)):en(T,14,o(x,C,Q.v)):en(T,15,a(x,C,ll(Q).slice(0,239))))}return en(T,1),T.end()},book_to_wk3:function(y,I){var E=I||{};if(+E.codepage>=0&&Mc(+E.codepage),E.type=="string")throw new Error("Cannot write WK3 to JS string");var k=Os();en(k,0,function(O){var F=Kt(26);F.write_shift(2,4096),F.write_shift(2,4),F.write_shift(4,0);for(var Y=0,M=0,z=0,ue=0;ue8191&&(Y=8191),F.write_shift(2,Y),F.write_shift(1,z),F.write_shift(1,M),F.write_shift(2,0),F.write_shift(2,0),F.write_shift(1,1),F.write_shift(1,2),F.write_shift(4,0),F.write_shift(4,0),F}(y));for(var R=0,T=0;R":case"":l.shadow=1;break;case"":break;case"":case"":l.outline=1;break;case"":break;case"":case"":l.strike=1;break;case"":break;case"":case"":l.u=1;break;case"":break;case"":case"":l.b=1;break;case"":break;case"":case"":l.i=1;break;case"":break;case"":case"":case"":break;case"":case"":case"":break;case"":case"":case"":case"":case"":case"":case"":case"":break;case"":f=!1;break;default:if(d[0].charCodeAt(1)!==47&&!f)throw new Error("Unrecognized rich format "+d[0])}}return l}(c[1])),i}var n=/<(?:\w+:)?r>/g,a=/<\/(?:\w+:)?r>/;return function(s){return s.replace(n,"").split(a).map(t).filter(function(o){return o.v})}}(),qb=function(){var e=/(\r\n|\n)/g;function r(t){var n=[[],t.v,[]];return t.v?(t.s&&function(a,s,o){var i=[];a.u&&i.push("text-decoration: underline;"),a.uval&&i.push("text-underline-style:"+a.uval+";"),a.sz&&i.push("font-size:"+a.sz+"pt;"),a.outline&&i.push("text-effect: outline;"),a.shadow&&i.push("text-shadow: auto;"),s.push(''),a.b&&(s.push(""),o.push("")),a.i&&(s.push(""),o.push("")),a.strike&&(s.push(""),o.push(""));var c=a.valign||"";c=="superscript"||c=="super"?c="sup":c=="subscript"&&(c="sub"),c!=""&&(s.push("<"+c+">"),o.push("")),o.push("")}(t.s,n[0],n[2]),n[0].join("")+n[1].replace(e,"
")+n[2].join("")):""}return function(t){return t.map(r).join("")}}(),Wb=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,X0=/<(?:\w+:)?r>/,Kb=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function Fd(e,r){var t=!r||r.cellHTML,n={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(n.t=Mi(ua(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),n.r=ua(e),t&&(n.h=C0(n.t))):e.match(X0)&&(n.r=ua(e),n.t=Mi(ua((e.replace(Kb,"").match(Wb)||[]).join("").replace(us,""))),t&&(n.h=qb(Jb(n.r)))),n):{t:""}}var zb=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,Vb=/<(?:\w+:)?(?:si|sstItem)>/g,Zb=/<\/(?:\w+:)?(?:si|sstItem)>/,Xb=/^\s|\s$|[\t\n\r]/;function Fm(e,r){if(!r.bookSST)return"";var t=[fo];t[t.length]=Zr("sst",null,{xmlns:ql[0],count:e.Count,uniqueCount:e.Unique});for(var n=0;n!=e.length;++n)if(e[n]!=null){var a=e[n],s="";a.r?s+=a.r:(s+=""),s+="",t[t.length]=s}return t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}var cf=function(e,r){var t=!1;return r==null&&(t=!0,r=Kt(15+4*e.t.length)),r.write_shift(1,0),Yo(e.t,r),t?r.slice(0,r.l):r};function $b(e){var r=Os();wr(r,159,function(n,a){return a||(a=Kt(8)),a.write_shift(4,n.Count),a.write_shift(4,n.Unique),a}(e));for(var t=0;t=4&&(e.l+=r-4),t}function eC(e){for(var r=e.read_shift(4),t=e.l+r-4,n={},a=e.read_shift(4),s=[];a-- >0;)s.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(n.name=e.read_shift(0,"lpp4"),n.comps=s,e.l!=t)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+t);return n}function Mm(e){var r=function(t){var n={};return t.read_shift(4),t.l+=4,n.id=t.read_shift(0,"lpp4"),n.name=t.read_shift(0,"lpp4"),n.R=Pu(t,4),n.U=Pu(t,4),n.W=Pu(t,4),n}(e);if(r.ename=e.read_shift(0,"8lpp4"),r.blksz=e.read_shift(4),r.cmode=e.read_shift(4),e.read_shift(4)!=4)throw new Error("Bad !Primary record");return r}function Tm(e,r){var t=e.l+r,n={};n.Flags=63&e.read_shift(4),e.l+=4,n.AlgID=e.read_shift(4);var a=!1;switch(n.AlgID){case 26126:case 26127:case 26128:a=n.Flags==36;break;case 26625:a=n.Flags==4;break;case 0:a=n.Flags==16||n.Flags==4||n.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+n.AlgID}if(!a)throw new Error("Encryption Flags/AlgID mismatch");return n.AlgIDHash=e.read_shift(4),n.KeySize=e.read_shift(4),n.ProviderType=e.read_shift(4),e.l+=8,n.CSPName=e.read_shift(t-e.l>>1,"utf16le"),e.l=t,n}function $0(e,r){var t={},n=e.l+r;return e.l+=4,t.Salt=e.slice(e.l,e.l+16),e.l+=16,t.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),t.VerifierHash=e.slice(e.l,n),e.l=n,t}function tC(e){if((63&e.read_shift(4))!=36)throw new Error("EncryptionInfo mismatch");var r=e.read_shift(4);return{t:"Std",h:Tm(e,r),v:$0(e,e.length-e.l)}}function Lm(){throw new Error("File is password-protected: ECMA-376 Extensible")}function rC(e){var r=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var t=e.read_shift(e.length-e.l,"utf8"),n={};return t.replace(us,function(a){var s=ci(a);switch(au(s[0])){case"":case"":case"":break;case"":case"=0;--t)n=((16384&n?1:0)|n<<1&32767)^r[t];return 52811^n}var Om=function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],r=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],t=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],n=function(a,s){return 255&((o=a^s)/2|128*o);var o};return function(a){for(var s,o,i,c=Nm(a),u=function(f){for(var d=r[f.length-1],g=104,p=f.length-1;p>=0;--p)for(var m=f[p],v=0;v!=7;++v)64&m&&(d^=t[g]),m*=2,--g;return d}(c),l=c.length,A=ul(16),h=0;h!=16;++h)A[h]=0;for((1&l)==1&&(s=u>>8,A[l]=n(e[0],s),--l,s=255&u,o=c[c.length-1],A[l]=n(o,s));l>0;)s=u>>8,A[--l]=n(c[l],s),s=255&u,A[--l]=n(c[l],s);for(l=15,i=15-c.length;i>0;)s=u>>8,A[l]=n(e[i],s),--i,s=255&u,A[--l]=n(c[l],s),--l,--i;return A}}(),nC=function(e){var r=0,t=Om(e);return function(n){var a=function(s,o,i,c,u){var l,A;for(u||(u=o),c||(c=Om(s)),l=0;l!=o.length;++l)A=o[l],A=255&((A^=c[i])>>5|A<<3),u[l]=A,++i;return[u,i,c]}("",n,r,t);return r=a[1],a[0]}};function iC(e,r,t){var n=t||{};return n.Info=e.read_shift(2),e.l-=2,n.Info===1?n.Data=function(a){var s={},o=s.EncryptionVersionInfo=Pu(a,4);if(o.Major!=1||o.Minor!=1)throw"unrecognized version code "+o.Major+" : "+o.Minor;return s.Salt=a.read_shift(16),s.EncryptedVerifier=a.read_shift(16),s.EncryptedVerifierHash=a.read_shift(16),s}(e):n.Data=function(a,s){var o={},i=o.EncryptionVersionInfo=Pu(a,4);if(s-=4,i.Minor!=2)throw new Error("unrecognized minor version code: "+i.Minor);if(i.Major>4||i.Major<2)throw new Error("unrecognized major version code: "+i.Major);o.Flags=a.read_shift(4),s-=4;var c=a.read_shift(4);return s-=4,o.EncryptionHeader=Tm(a,c),s-=c,o.EncryptionVerifier=$0(a,s),o}(e,r),n}var uf=function(){function e(t,n){switch(n.type){case"base64":return r($s(t),n);case"binary":return r(t,n);case"buffer":return r(wi&&Buffer.isBuffer(t)?t.toString("binary"):Du(t),n);case"array":return r(Jl(t),n)}throw new Error("Unrecognized type "+n.type)}function r(t,n){var a=(n||{}).dense?[]:{},s=t.match(/\\trowd.*?\\row\b/g);if(!s.length)throw new Error("RTF missing table");var o={s:{c:0,r:0},e:{c:0,r:s.length-1}};return s.forEach(function(i,c){Array.isArray(a)&&(a[c]=[]);for(var u,l=/\\\w+\b/g,A=0,h=-1;u=l.exec(i);){if(u[0]==="\\cell"){var f=i.slice(A,l.lastIndex-u[0].length);if(f[0]==" "&&(f=f.slice(1)),++h,f.length){var d={v:f,t:"s"};Array.isArray(a)?a[c][h]=d:a[In({r:c,c:h})]=d}}A=l.lastIndex}h>o.e.c&&(o.e.c=h)}),a["!ref"]=_i(o),a}return{to_workbook:function(t,n){return Kl(e(t,n),n)},to_sheet:e,from_sheet:function(t){for(var n,a=["{\\rtf1\\ansi"],s=ea(t["!ref"]),o=Array.isArray(t),i=s.s.r;i<=s.e.r;++i){a.push("\\trowd\\trautofit1");for(var c=s.s.c;c<=s.e.c;++c)a.push("\\cellx"+(c+1));for(a.push("\\pard\\intbl"),c=s.s.c;c<=s.e.c;++c){var u=In({r:i,c});(n=o?(t[i]||[])[c]:t[u])&&(n.v!=null||n.f&&!n.F)&&(a.push(" "+(n.w||(ll(n),n.w))),a.push("\\cell"))}a.push("\\pard\\intbl\\row")}return a.join("")+"}"}}}();function lf(e){for(var r=0,t=1;r!=3;++r)t=256*t+(e[r]>255?255:e[r]<0?0:e[r]);return t.toString(16).toUpperCase().slice(1)}function Md(e,r){if(r===0)return e;var t,n,a=function(s){var o=s[0]/255,i=s[1]/255,c=s[2]/255,u=Math.max(o,i,c),l=Math.min(o,i,c),A=u-l;if(A===0)return[0,0,o];var h,f=0,d=u+l;switch(h=A/(d>1?2-d:d),u){case o:f=((i-c)/A+6)%6;break;case i:f=(c-o)/A+2;break;case c:f=(o-i)/A+4}return[f/6,h,d/2]}((n=(t=e).slice(t[0]==="#"?1:0).slice(0,6),[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]));return a[2]=r<0?a[2]*(1+r):1-(1-a[2])*(1-r),lf(function(s){var o,i=s[0],c=s[1],u=s[2],l=2*c*(u<.5?u:1-u),A=u-l/2,h=[A,A,A],f=6*i;if(c!==0)switch(0|f){case 0:case 6:o=l*f,h[0]+=l,h[1]+=o;break;case 1:o=l*(2-f),h[0]+=o,h[1]+=l;break;case 2:o=l*(f-2),h[1]+=l,h[2]+=o;break;case 3:o=l*(4-f),h[1]+=o,h[2]+=l;break;case 4:o=l*(f-4),h[2]+=l,h[0]+=o;break;case 5:o=l*(6-f),h[2]+=o,h[0]+=l}for(var d=0;d!=3;++d)h[d]=Math.round(255*h[d]);return h}(a))}var Pm=6,aC=15,oC=1,ds=Pm;function Af(e){return Math.floor((e+Math.round(128/ds)/256)*ds)}function rh(e){return Math.floor((e-5)/ds*100+.5)/100}function Td(e){return Math.round((e*ds+5)/ds*256)/256}function ep(e){return Td(rh(Af(e)))}function Ld(e){var r=Math.abs(e-ep(e)),t=ds;if(r>.005)for(ds=oC;ds]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,r=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,t=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,n=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,a=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(s,o,i){var c,u={};return s&&((c=(s=s.replace(//gm,"").replace(//gm,"")).match(e))&&function(l,A,h){A.NumberFmt=[];for(var f=za(ai),d=0;d":case"":case"":case"":break;case"0){if(v>392){for(v=392;v>60&&A.NumberFmt[v]!=null;--v);A.NumberFmt[v]=m}Fu(m,v)}break;default:if(h.WTF)throw new Error("unrecognized "+p[0]+" in numFmts")}}}(c,u,i),(c=s.match(n))&&function(l,A,h,f){A.Fonts=[];var d={},g=!1;(l[0].match(us)||[]).forEach(function(p){var m=ci(p);switch(au(m[0])){case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":break;case"":case"":A.Fonts.push(d),d={};break;case"":d.bold=1;break;case"":d.italic=1;break;case"":d.underline=1;break;case"":d.strike=1;break;case"":d.outline=1;break;case"":d.shadow=1;break;case"":d.condense=1;break;case"":d.extend=1;break;case"":case"":g=!1;break;default:if(f&&f.WTF&&!g)throw new Error("unrecognized "+m[0]+" in fonts")}})}(c,u,o,i),(c=s.match(t))&&function(l,A,h,f){A.Fills=[];var d={},g=!1;(l[0].match(us)||[]).forEach(function(p){var m=ci(p);switch(au(m[0])){case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":break;case"":case"":d={},A.Fills.push(d);break;case"":A.Fills.push(d),d={};break;case"":m.patternType&&(d.patternType=m.patternType);break;case"":g=!1;break;default:if(f&&f.WTF&&!g)throw new Error("unrecognized "+m[0]+" in fills")}})}(c,u,0,i),(c=s.match(a))&&function(l,A,h,f){A.Borders=[];var d={},g=!1;(l[0].match(us)||[]).forEach(function(p){var m=ci(p);switch(au(m[0])){case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":break;case"":case"":d={},m.diagonalUp&&(d.diagonalUp=Fa(m.diagonalUp)),m.diagonalDown&&(d.diagonalDown=Fa(m.diagonalDown)),A.Borders.push(d);break;case"":g=!1;break;default:if(f&&f.WTF&&!g)throw new Error("unrecognized "+m[0]+" in borders")}})}(c,u,0,i),(c=s.match(r))&&function(l,A,h){var f;A.CellXf=[];var d=!1;(l[0].match(us)||[]).forEach(function(g){var p=ci(g),m=0;switch(au(p[0])){case"":case"":case"":case"":case"":case"":case"":case"":case"":break;case"":for(delete(f=p)[0],m=0;m392){for(m=392;m>60;--m)if(A.NumberFmt[f.numFmtId]==A.NumberFmt[m]){f.numFmtId=m;break}}A.CellXf.push(f);break;case"":var v={};p.vertical&&(v.vertical=p.vertical),p.horizontal&&(v.horizontal=p.horizontal),p.textRotation!=null&&(v.textRotation=p.textRotation),p.indent&&(v.indent=p.indent),p.wrapText&&(v.wrapText=Fa(p.wrapText)),f.alignment=v;break;case"":case"":d=!1;break;default:if(h&&h.WTF&&!d)throw new Error("unrecognized "+p[0]+" in cellXfs")}})}(c,u,i)),u}}();function Ud(e,r){var t,n=[fo,Zr("styleSheet",null,{xmlns:ql[0],"xmlns:vt":_o.vt})];return e.SSF&&(t=function(a){var s=[""];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(o){for(var i=o[0];i<=o[1];++i)a[i]!=null&&(s[s.length]=Zr("numFmt",null,{numFmtId:i,formatCode:ca(a[i])}))}),s.length===1?"":(s[s.length]="",s[0]=Zr("numFmts",null,{count:s.length-2}).replace("/>",">"),s.join(""))}(e.SSF))!=null&&(n[n.length]=t),n[n.length]='',n[n.length]='',n[n.length]='',n[n.length]='',(t=function(a){var s=[];return s[s.length]=Zr("cellXfs",null),a.forEach(function(o){s[s.length]=Zr("xf",null,o)}),s[s.length]="",s.length===2?"":(s[0]=Zr("cellXfs",null,{count:s.length-2}).replace("/>",">"),s.join(""))}(r.cellXfs))&&(n[n.length]=t),n[n.length]='',n[n.length]='',n[n.length]='',n.length>2&&(n[n.length]="",n[1]=n[1].replace("/>",">")),n.join("")}function cC(e,r,t){t||(t=Kt(6+4*r.length)),t.write_shift(2,e),Yo(r,t);var n=t.length>t.l?t.slice(0,t.l):t;return t.l==null&&(t.l=t.length),n}function uC(e,r){r||(r=Kt(153)),r.write_shift(2,20*e.sz),function(a,s){s||(s=Kt(2));var o=(a.italic?2:0)|(a.strike?8:0)|(a.outline?16:0)|(a.shadow?32:0)|(a.condense?64:0)|(a.extend?128:0);s.write_shift(1,o),s.write_shift(1,0)}(e,r),r.write_shift(2,e.bold?700:400);var t=0;e.vertAlign=="superscript"?t=1:e.vertAlign=="subscript"&&(t=2),r.write_shift(2,t),r.write_shift(1,e.underline||0),r.write_shift(1,e.family||0),r.write_shift(1,e.charset||0),r.write_shift(1,0),nf(e.color,r);var n=0;return e.scheme=="major"&&(n=1),e.scheme=="minor"&&(n=2),r.write_shift(1,n),Yo(e.name,r),r.length>r.l?r.slice(0,r.l):r}var jd,lC=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],AC=ls;function tp(e,r){r||(r=Kt(84)),jd||(jd=bd(lC));var t=jd[e.patternType];t==null&&(t=40),r.write_shift(4,t);var n=0;if(t!=40)for(nf({auto:1},r),nf({auto:1},r);n<12;++n)r.write_shift(4,0);else{for(;n<4;++n)r.write_shift(4,0);for(;n<12;++n)r.write_shift(4,0)}return r.length>r.l?r.slice(0,r.l):r}function Um(e,r,t){return t||(t=Kt(16)),t.write_shift(2,r||0),t.write_shift(2,e.numFmtId||0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t}function ff(e,r){return r||(r=Kt(10)),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(4,0),r.write_shift(4,0),r}var jm=ls;function hC(e){var r;wr(e,613,Pc(1)),wr(e,46,(r||(r=Kt(51)),r.write_shift(1,0),ff(0,r),ff(0,r),ff(0,r),ff(0,r),ff(0,r),r.length>r.l?r.slice(0,r.l):r)),wr(e,614)}function fC(e){var r,t;wr(e,619,Pc(1)),wr(e,48,(r={xfId:0,builtinId:0,name:"Normal"},t||(t=Kt(52)),t.write_shift(4,r.xfId),t.write_shift(2,1),t.write_shift(1,+r.builtinId),t.write_shift(1,0),kd(r.name||"",t),t.length>t.l?t.slice(0,t.l):t)),wr(e,620)}function dC(e){wr(e,508,function(r,t,n){var a=Kt(2052);return a.write_shift(4,r),kd(t,a),kd(n,a),a.length>a.l?a.slice(0,a.l):a}(0,"TableStyleMedium9","PivotStyleMedium4")),wr(e,509)}function gC(e,r){var t=Os();return wr(t,278),function(n,a){if(a){var s=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(o){for(var i=o[0];i<=o[1];++i)a[i]!=null&&++s}),s!=0&&(wr(n,615,Pc(s)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(o){for(var i=o[0];i<=o[1];++i)a[i]!=null&&wr(n,44,cC(i,a[i]))}),wr(n,616))}}(t,e.SSF),function(n){wr(n,611,Pc(1)),wr(n,43,uC({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),wr(n,612)}(t),function(n){wr(n,603,Pc(2)),wr(n,45,tp({patternType:"none"})),wr(n,45,tp({patternType:"gray125"})),wr(n,604)}(t),hC(t),function(n){wr(n,626,Pc(1)),wr(n,47,Um({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),wr(n,627)}(t),function(n,a){wr(n,617,Pc(a.length)),a.forEach(function(s){wr(n,47,Um(s,0))}),wr(n,618)}(t,r.cellXfs),fC(t),function(n){wr(n,505,Pc(0)),wr(n,506)}(t),dC(t),wr(t,279),t.end()}var pC=["","","","","","","","","","","",""];function vC(e,r,t){r.themeElements.clrScheme=[];var n={};(e[0].match(us)||[]).forEach(function(a){var s=ci(a);switch(s[0]){case"":break;case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":s[0].charAt(1)==="/"?(r.themeElements.clrScheme[pC.indexOf(s[0])]=n,n={}):n.name=s[0].slice(3,s[0].length-1);break;default:if(t&&t.WTF)throw new Error("Unrecognized "+s[0]+" in clrScheme")}})}function Hd(){}function Hm(){}var mC=/]*)>[\s\S]*<\/a:clrScheme>/,yC=/]*)>[\s\S]*<\/a:fontScheme>/,IC=/]*)>[\s\S]*<\/a:fmtScheme>/,bC=/]*)>[\s\S]*<\/a:themeElements>/;function Ym(e,r){var t;e&&e.length!==0||(e=rp());var n={};if(!(t=e.match(bC)))throw new Error("themeElements not found in theme");return function(a,s,o){var i;s.themeElements={},[["clrScheme",mC,vC],["fontScheme",yC,Hd],["fmtScheme",IC,Hm]].forEach(function(c){if(!(i=a.match(c[1])))throw new Error(c[0]+" not found in themeElements");c[2](i,s,o)})}(t[0],n,r),n.raw=e,n}function rp(e,r){if(r&&r.themeXLSX)return r.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var t=[fo];return t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t.join("")}function Jm(e){var r={};switch(r.xclrType=e.read_shift(2),r.nTintShade=e.read_shift(2),r.xclrType){case 0:case 4:e.l+=4;break;case 1:r.xclrValue=function(t,n){return ls(t,n)}(e,4);break;case 2:r.xclrValue=vm(e);break;case 3:r.xclrValue=function(t){return t.read_shift(4)}(e)}return e.l+=8,r}function CC(e){var r=e.read_shift(2),t=e.read_shift(2)-4,n=[r];switch(r){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:n[1]=Jm(e);break;case 6:n[1]=function(a,s){return ls(a,s)}(e,t);break;case 14:case 15:n[1]=e.read_shift(t===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+r+" "+t)}return n}function EC(){var e,r,t=Os();return wr(t,332),wr(t,334,Pc(1)),wr(t,335,((r=Kt(12+2*(e={name:"XLDAPR",version:12e4,flags:3496657072}).name.length)).write_shift(4,e.flags),r.write_shift(4,e.version),Yo(e.name,r),r.slice(0,r.l))),wr(t,336),wr(t,339,function(n,a){var s=Kt(8+2*a.length);return s.write_shift(4,n),Yo(a,s),s.slice(0,s.l)}(1,"XLDAPR")),wr(t,52),wr(t,35,Pc(514)),wr(t,4096,Pc(0)),wr(t,4097,mc(1)),wr(t,36),wr(t,53),wr(t,340),wr(t,337,function(n,a){var s=Kt(8);return s.write_shift(4,n),s.write_shift(4,a?1:0),s}(1,!0)),wr(t,51,function(n){var a=Kt(4+8*n.length);a.write_shift(4,n.length);for(var s=0;s `),e.join("")}var nh=1024;function Wm(e,r){for(var t=[21600,21600],n=["m0,0l0",t[1],t[0],t[1],t[0],"0xe"].join(","),a=[Zr("xml",null,{"xmlns:v":nc.v,"xmlns:o":nc.o,"xmlns:x":nc.x,"xmlns:mv":nc.mv}).replace(/\/>/,">"),Zr("o:shapelayout",Zr("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),Zr("v:shapetype",[Zr("v:stroke",null,{joinstyle:"miter"}),Zr("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:t.join(","),path:n})];nh<1e3*e;)nh+=1e3;return r.forEach(function(s){var o=Do(s[0]),i={color2:"#BEFF82",type:"gradient"};i.type=="gradient"&&(i.angle="-180");var c=i.type=="gradient"?Zr("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,u=Zr("v:fill",c,i);++nh,a=a.concat(["",u,Zr("v:shadow",null,{on:"t",obscured:"t"}),Zr("v:path",null,{"o:connecttype":"none"}),'
','',"","",Xo("x:Anchor",[o.c+1,0,o.r+1,0,o.c+3,20,o.r+5,20].join(",")),Xo("x:AutoFill","False"),Xo("x:Row",String(o.r)),Xo("x:Column",String(o.c)),s[1].hidden?"":"","",""])}),a.push(""),a.join("")}function Km(e,r,t,n){var a,s=Array.isArray(e);r.forEach(function(o){var i=Do(o.ref);if(s?(e[i.r]||(e[i.r]=[]),a=e[i.r][i.c]):a=e[o.ref],!a){a={t:"z"},s?e[i.r][i.c]=a:e[o.ref]=a;var c=ea(e["!ref"]||"BDWGO1000001:A1");c.s.r>i.r&&(c.s.r=i.r),c.e.ri.c&&(c.s.c=i.c),c.e.c=0;--A){if(!t&&a.c[A].T)return;t&&!a.c[A].T&&a.c.splice(A,1)}if(t&&n){for(A=0;A"),e.forEach(function(n){n[1].forEach(function(a){var s=ca(a.a);t.indexOf(s)==-1&&(t.push(s),r.push(""+s+"")),a.T&&a.ID&&t.indexOf("tc="+a.ID)==-1&&(t.push("tc="+a.ID),r.push("tc="+a.ID+""))})}),t.length==0&&(t.push("SheetJ5"),r.push("SheetJ5")),r.push(""),r.push(""),e.forEach(function(n){var a=0,s=[];if(n[1][0]&&n[1][0].T&&n[1][0].ID?a=t.indexOf("tc="+n[1][0].ID):n[1].forEach(function(c){c.a&&(a=t.indexOf(ca(c.a))),s.push(c.t||"")}),r.push(''),s.length<=1)r.push(Xo("t",ca(s[0]||"")));else{for(var o=`Comment: `+s[0]+` `,i=1;i")}),r.push(""),r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}function wC(e,r,t){var n=[fo,Zr("ThreadedComments",null,{xmlns:_o.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(a){var s="";(a[1]||[]).forEach(function(o,i){if(o.T){o.a&&r.indexOf(o.a)==-1&&r.push(o.a);var c={ref:a[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+t.tcid++).slice(-12)+"}"};i==0?s=c.id:c.parentId=s,o.ID=c.id,o.a&&(c.personId="{54EE7950-7262-4200-6969-"+("000000000000"+r.indexOf(o.a)).slice(-12)+"}"),n.push(Zr("threadedComment",Xo("text",o.t||""),c))}else delete o.ID})}),n.push(""),n.join("")}var BC=As;function QC(e){var r=Os(),t=[];return wr(r,628),wr(r,630),e.forEach(function(n){n[1].forEach(function(a){t.indexOf(a.a)>-1||(t.push(a.a.slice(0,54)),wr(r,632,function(s){return Yo(s.slice(0,54))}(a.a)))})}),wr(r,631),wr(r,633),e.forEach(function(n){n[1].forEach(function(a){a.iauthor=t.indexOf(a.a);var s={s:Do(n[0]),e:Do(n[0])};wr(r,635,function(o,i){return i==null&&(i=Kt(36)),i.write_shift(4,o[1].iauthor),zA(o[0],i),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i}([s,a])),a.t&&a.t.length>0&&wr(r,637,jv(a)),wr(r,636),delete a.iauthor})}),wr(r,634),wr(r,629),r.end()}var kC="application/vnd.ms-office.vbaProject",zm=["xlsb","xlsm","xlam","biff8","xla"],ih=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,r={r:0,c:0};function t(n,a,s,o){var i=!1,c=!1;s.length==0?c=!0:s.charAt(0)=="["&&(c=!0,s=s.slice(1,-1)),o.length==0?i=!0:o.charAt(0)=="["&&(i=!0,o=o.slice(1,-1));var u=s.length>0?0|parseInt(s,10):0,l=o.length>0?0|parseInt(o,10):0;return i?l+=r.c:--l,c?u+=r.r:--u,a+(i?"":"$")+Eo(l)+(c?"":"$")+Ho(u)}return function(n,a){return r=a,n.replace(e,t)}}(),np=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,ip=function(){return function(e,r){return e.replace(np,function(t,n,a,s,o,i){var c=Uv(s)-(a?0:r.c),u=Gv(i)-(o?0:r.r);return n+"R"+(u==0?"":o?u+1:"["+u+"]")+"C"+(c==0?"":a?c+1:"["+c+"]")})}}();function Vm(e,r){return e.replace(np,function(t,n,a,s,o,i){return n+(a=="$"?a+s:Eo(Uv(s)+r.c))+(o=="$"?o+i:Ho(Gv(i)+r.r))})}function xC(e,r,t){var n=Es(r).s,a=Do(t);return Vm(e,{r:a.r-n.r,c:a.c-n.c})}function ap(e){return e.replace(/_xlfn\./g,"")}function Bo(e){e.l+=1}function pl(e,r){var t=e.read_shift(r==1?1:2);return[16383&t,t>>14&1,t>>15&1]}function Zm(e,r,t){var n=2;if(t){if(t.biff>=2&&t.biff<=5)return Xm(e);t.biff==12&&(n=4)}var a=e.read_shift(n),s=e.read_shift(n),o=pl(e,2),i=pl(e,2);return{s:{r:a,c:o[0],cRel:o[1],rRel:o[2]},e:{r:s,c:i[0],cRel:i[1],rRel:i[2]}}}function Xm(e){var r=pl(e,2),t=pl(e,2),n=e.read_shift(1),a=e.read_shift(1);return{s:{r:r[0],c:n,cRel:r[1],rRel:r[2]},e:{r:t[0],c:a,cRel:t[1],rRel:t[2]}}}function $m(e,r,t){if(t&&t.biff>=2&&t.biff<=5)return function(s){var o=pl(s,2),i=s.read_shift(1);return{r:o[0],c:i,cRel:o[1],rRel:o[2]}}(e);var n=e.read_shift(t&&t.biff==12?4:2),a=pl(e,2);return{r:n,c:a[0],cRel:a[1],rRel:a[2]}}function SC(e){var r=e.read_shift(2),t=e.read_shift(2);return{r,c:255&t,fQuoted:!!(16384&t),cRel:t>>15,rRel:t>>15}}function ey(e){var r=1&e[e.l+1];return e.l+=4,[r,1]}function ty(e){return[e.read_shift(1),e.read_shift(1)]}function _C(e,r){var t=[e.read_shift(1)];if(r==12)switch(t[0]){case 2:t[0]=4;break;case 4:t[0]=16;break;case 0:t[0]=1;break;case 1:t[0]=2}switch(t[0]){case 4:t[1]=go(e,1)?"TRUE":"FALSE",r!=12&&(e.l+=7);break;case 37:case 16:t[1]=Lu[e[e.l]],e.l+=r==12?4:8;break;case 0:e.l+=8;break;case 1:t[1]=hs(e);break;case 2:t[1]=tA(e,0,{biff:r>0&&r<8?2:r});break;default:throw new Error("Bad SerAr: "+t[0])}return t}function DC(e,r,t){for(var n=e.read_shift(t.biff==12?4:2),a=[],s=0;s!=n;++s)a.push((t.biff==12?Vl:_d)(e));return a}function RC(e,r,t){var n=0,a=0;t.biff==12?(n=e.read_shift(4),a=e.read_shift(4)):(a=1+e.read_shift(1),n=1+e.read_shift(2)),t.biff>=2&&t.biff<8&&(--n,--a==0&&(a=256));for(var s=0,o=[];s!=n&&(o[s]=[]);++s)for(var i=0;i!=a;++i)o[s][i]=_C(e,t.biff);return o}function gf(e,r,t){return e.l+=2,[SC(e)]}function op(e){return e.l+=6,[]}function ry(e){return e.l+=2,[wo(e),1&e.read_shift(2)]}var FC=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"],ny={1:{n:"PtgExp",f:function(e,r,t){return e.l++,t&&t.biff==12?[e.read_shift(4,"i"),0]:[e.read_shift(2),e.read_shift(t&&t.biff==2?1:2)]}},2:{n:"PtgTbl",f:ls},3:{n:"PtgAdd",f:Bo},4:{n:"PtgSub",f:Bo},5:{n:"PtgMul",f:Bo},6:{n:"PtgDiv",f:Bo},7:{n:"PtgPower",f:Bo},8:{n:"PtgConcat",f:Bo},9:{n:"PtgLt",f:Bo},10:{n:"PtgLe",f:Bo},11:{n:"PtgEq",f:Bo},12:{n:"PtgGe",f:Bo},13:{n:"PtgGt",f:Bo},14:{n:"PtgNe",f:Bo},15:{n:"PtgIsect",f:Bo},16:{n:"PtgUnion",f:Bo},17:{n:"PtgRange",f:Bo},18:{n:"PtgUplus",f:Bo},19:{n:"PtgUminus",f:Bo},20:{n:"PtgPercent",f:Bo},21:{n:"PtgParen",f:Bo},22:{n:"PtgMissArg",f:Bo},23:{n:"PtgStr",f:function(e,r,t){return e.l++,$A(e,0,t)}},26:{n:"PtgSheet",f:function(e,r,t){return e.l+=5,e.l+=2,e.l+=t.biff==2?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function(e,r,t){return e.l+=t.biff==2?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function(e){return e.l++,Lu[e.read_shift(1)]}},29:{n:"PtgBool",f:function(e){return e.l++,e.read_shift(1)!==0}},30:{n:"PtgInt",f:function(e){return e.l++,e.read_shift(2)}},31:{n:"PtgNum",f:function(e){return e.l++,hs(e)}},32:{n:"PtgArray",f:function(e,r,t){var n=(96&e[e.l++])>>5;return e.l+=t.biff==2?6:t.biff==12?14:7,[n]}},33:{n:"PtgFunc",f:function(e,r,t){var n=(96&e[e.l])>>5;e.l+=1;var a=e.read_shift(t&&t.biff<=3?1:2);return[qC[a],oy[a],n]}},34:{n:"PtgFuncVar",f:function(e,r,t){var n=e[e.l++],a=e.read_shift(1),s=t&&t.biff<=3?[n==88?-1:0,e.read_shift(1)]:function(o){return[o[o.l+1]>>7,32767&o.read_shift(2)]}(e);return[a,(s[0]===0?oy:JC)[s[1]]]}},35:{n:"PtgName",f:function(e,r,t){var n=e.read_shift(1)>>>5&3,a=!t||t.biff>=8?4:2,s=e.read_shift(a);switch(t.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12}return[n,0,s]}},36:{n:"PtgRef",f:function(e,r,t){var n=(96&e[e.l])>>5;return e.l+=1,[n,$m(e,0,t)]}},37:{n:"PtgArea",f:function(e,r,t){return[(96&e[e.l++])>>5,Zm(e,t.biff>=2&&t.biff,t)]}},38:{n:"PtgMemArea",f:function(e,r,t){var n=e.read_shift(1)>>>5&3;return e.l+=t&&t.biff==2?3:4,[n,e.read_shift(t&&t.biff==2?1:2)]}},39:{n:"PtgMemErr",f:ls},40:{n:"PtgMemNoMem",f:ls},41:{n:"PtgMemFunc",f:function(e,r,t){return[e.read_shift(1)>>>5&3,e.read_shift(t&&t.biff==2?1:2)]}},42:{n:"PtgRefErr",f:function(e,r,t){var n=e.read_shift(1)>>>5&3;return e.l+=4,t.biff<8&&e.l--,t.biff==12&&(e.l+=2),[n]}},43:{n:"PtgAreaErr",f:function(e,r,t){var n=(96&e[e.l++])>>5;return e.l+=t&&t.biff>8?12:t.biff<8?6:8,[n]}},44:{n:"PtgRefN",f:function(e,r,t){var n=(96&e[e.l])>>5;e.l+=1;var a=function(s,o,i){var c=i&&i.biff?i.biff:8;if(c>=2&&c<=5)return function(f){var d=f.read_shift(2),g=f.read_shift(1),p=(32768&d)>>15,m=(16384&d)>>14;return d&=16383,p==1&&d>=8192&&(d-=16384),m==1&&g>=128&&(g-=256),{r:d,c:g,cRel:m,rRel:p}}(s);var u=s.read_shift(c>=12?4:2),l=s.read_shift(2),A=(16384&l)>>14,h=(32768&l)>>15;if(l&=16383,h==1)for(;u>524287;)u-=1048576;if(A==1)for(;l>8191;)l-=16384;return{r:u,c:l,cRel:A,rRel:h}}(e,0,t);return[n,a]}},45:{n:"PtgAreaN",f:function(e,r,t){var n=(96&e[e.l++])>>5,a=function(s,o,i){if(i.biff<8)return Xm(s);var c=s.read_shift(i.biff==12?4:2),u=s.read_shift(i.biff==12?4:2),l=pl(s,2),A=pl(s,2);return{s:{r:c,c:l[0],cRel:l[1],rRel:l[2]},e:{r:u,c:A[0],cRel:A[1],rRel:A[2]}}}(e,0,t);return[n,a]}},46:{n:"PtgMemAreaN",f:function(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},57:{n:"PtgNameX",f:function(e,r,t){return t.biff==5?function(n){var a=n.read_shift(1)>>>5&3,s=n.read_shift(2,"i");n.l+=8;var o=n.read_shift(2);return n.l+=12,[a,s,o]}(e):[e.read_shift(1)>>>5&3,e.read_shift(2),e.read_shift(4)]}},58:{n:"PtgRef3d",f:function(e,r,t){var n=(96&e[e.l])>>5;e.l+=1;var a=e.read_shift(2);return t&&t.biff==5&&(e.l+=12),[n,a,$m(e,0,t)]}},59:{n:"PtgArea3d",f:function(e,r,t){var n=(96&e[e.l++])>>5,a=e.read_shift(2,"i");if(t)switch(t.biff){case 5:e.l+=12;break}return[n,a,Zm(e,0,t)]}},60:{n:"PtgRefErr3d",f:function(e,r,t){var n=(96&e[e.l++])>>5,a=e.read_shift(2),s=4;if(t)switch(t.biff){case 5:s=15;break;case 12:s=6}return e.l+=s,[n,a]}},61:{n:"PtgAreaErr3d",f:function(e,r,t){var n=(96&e[e.l++])>>5,a=e.read_shift(2),s=8;if(t)switch(t.biff){case 5:e.l+=12,s=6;break;case 12:s=12}return e.l+=s,[n,a]}},255:{}},NC={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},MC={1:{n:"PtgElfLel",f:ry},2:{n:"PtgElfRw",f:gf},3:{n:"PtgElfCol",f:gf},6:{n:"PtgElfRwV",f:gf},7:{n:"PtgElfColV",f:gf},10:{n:"PtgElfRadical",f:gf},11:{n:"PtgElfRadicalS",f:op},13:{n:"PtgElfColS",f:op},15:{n:"PtgElfColSV",f:op},16:{n:"PtgElfRadicalLel",f:ry},25:{n:"PtgList",f:function(e){e.l+=2;var r=e.read_shift(2),t=e.read_shift(2),n=e.read_shift(4),a=e.read_shift(2),s=e.read_shift(2);return{ixti:r,coltype:3&t,rt:FC[t>>2&31],idx:n,c:a,C:s}}},29:{n:"PtgSxName",f:function(e){return e.l+=2,[e.read_shift(4)]}},255:{}},TC={0:{n:"PtgAttrNoop",f:function(e){return e.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function(e,r,t){var n=255&e[e.l+1]?1:0;return e.l+=t&&t.biff==2?3:4,[n]}},2:{n:"PtgAttrIf",f:function(e,r,t){var n=255&e[e.l+1]?1:0;return e.l+=2,[n,e.read_shift(t&&t.biff==2?1:2)]}},4:{n:"PtgAttrChoose",f:function(e,r,t){e.l+=2;for(var n=e.read_shift(t&&t.biff==2?1:2),a=[],s=0;s<=n;++s)a.push(e.read_shift(t&&t.biff==2?1:2));return a}},8:{n:"PtgAttrGoto",f:function(e,r,t){var n=255&e[e.l+1]?1:0;return e.l+=2,[n,e.read_shift(t&&t.biff==2?1:2)]}},16:{n:"PtgAttrSum",f:function(e,r,t){e.l+=t&&t.biff==2?3:4}},32:{n:"PtgAttrBaxcel",f:ey},33:{n:"PtgAttrBaxcel",f:ey},64:{n:"PtgAttrSpace",f:function(e){return e.read_shift(2),ty(e)}},65:{n:"PtgAttrSpaceSemi",f:function(e){return e.read_shift(2),ty(e)}},128:{n:"PtgAttrIfError",f:function(e){var r=255&e[e.l+1]?1:0;return e.l+=2,[r,e.read_shift(2)]}},255:{}};function pf(e,r,t,n){if(n.biff<8)return ls(e,r);for(var a=e.l+r,s=[],o=0;o!==t.length;++o)switch(t[o][0]){case"PtgArray":t[o][1]=RC(e,0,n),s.push(t[o][1]);break;case"PtgMemArea":t[o][2]=DC(e,t[o][1],n),s.push(t[o][2]);break;case"PtgExp":n&&n.biff==12&&(t[o][1][1]=e.read_shift(4),s.push(t[o][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+t[o][0]}return(r=a-e.l)!==0&&s.push(ls(e,r)),s}function vf(e,r,t){for(var n,a,s=e.l+r,o=[];s!=e.l;)r=s-e.l,a=e[e.l],n=ny[a]||ny[NC[a]],a!==24&&a!==25||(n=(a===24?MC:TC)[e[e.l+1]]),n&&n.f?o.push([n.n,n.f(e,r,t)]):ls(e,r);return o}function LC(e){for(var r=[],t=0;t=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function iy(e,r,t){if(!e)return"SH33TJSERR0";if(t.biff>8&&(!e.XTI||!e.XTI[r]))return e.SheetNames[r];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[r];if(t.biff<8)return r>1e4&&(r-=65536),r<0&&(r=-r),r==0?"":e.XTI[r-1];if(!n)return"SH33TJSERR1";var a="";if(t.biff>8)switch(e[n[0]][0]){case 357:return a=n[1]==-1?"#REF":e.SheetNames[n[1]],n[1]==n[2]?a:a+":"+e.SheetNames[n[2]];case 358:return t.SID!=null?e.SheetNames[t.SID]:"SH33TJSSAME"+e[n[0]][0];default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return a=n[1]==-1?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?a:a+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(s){return s.Name}).join(";;");default:return e[n[0]][0][3]?(a=n[1]==-1?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?a:a+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function ay(e,r,t){var n=iy(e,r,t);return n=="#REF"?n:function(a,s){if(!(a||s&&s.biff<=5&&s.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(a)?"'"+a+"'":a}(n,t)}function gs(e,r,t,n,a){var s,o,i,c,u=a&&a.biff||8,l={s:{c:0,r:0},e:{c:0,r:0}},A=[],h=0,f=0,d="";if(!e[0]||!e[0][0])return"";for(var g=-1,p="",m=0,v=e[0].length;m=0){switch(e[0][g][1][0]){case 0:p=no(" ",e[0][g][1][1]);break;case 1:p=no("\r",e[0][g][1][1]);break;default:if(p="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}o+=p,g=-1}A.push(o+OC[y[0]]+s);break;case"PtgIsect":s=A.pop(),o=A.pop(),A.push(o+" "+s);break;case"PtgUnion":s=A.pop(),o=A.pop(),A.push(o+","+s);break;case"PtgRange":s=A.pop(),o=A.pop(),A.push(o+":"+s);break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":i=tf(y[1][1],l,a),A.push(rf(i,u));break;case"PtgRefN":i=t?tf(y[1][1],t,a):y[1][1],A.push(rf(i,u));break;case"PtgRef3d":h=y[1][1],i=tf(y[1][2],l,a),d=ay(n,h,a),A.push(d+"!"+rf(i,u));break;case"PtgFunc":case"PtgFuncVar":var I=y[1][0],E=y[1][1];I||(I=0);var k=(I&=127)==0?[]:A.slice(-I);A.length-=I,E==="User"&&(E=k.shift()),A.push(E+"("+k.join(",")+")");break;case"PtgBool":A.push(y[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":A.push(y[1]);break;case"PtgNum":A.push(String(y[1]));break;case"PtgStr":A.push('"'+y[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":c=Pv(y[1][1],t?{s:t}:l,a),A.push(k0(c,a));break;case"PtgArea":c=Pv(y[1][1],l,a),A.push(k0(c,a));break;case"PtgArea3d":h=y[1][1],c=y[1][2],d=ay(n,h,a),A.push(d+"!"+k0(c,a));break;case"PtgAttrSum":A.push("SUM("+A.pop()+")");break;case"PtgName":f=y[1][2];var R=(n.names||[])[f-1]||(n[0]||[])[f],T=R?R.Name:"SH33TJSNAME"+String(f);T&&T.slice(0,6)=="_xlfn."&&!a.xlfn&&(T=T.slice(6)),A.push(T);break;case"PtgNameX":var j,W=y[1][1];if(f=y[1][2],!(a.biff<=5)){var H="";if(((n[W]||[])[0]||[])[0]==14849||(((n[W]||[])[0]||[])[0]==1025?n[W][f]&&n[W][f].itab>0&&(H=n.SheetNames[n[W][f].itab-1]+"!"):H=n.SheetNames[f-1]+"!"),n[W]&&n[W][f])H+=n[W][f].Name;else if(n[0]&&n[0][f])H+=n[0][f].Name;else{var X=(iy(n,W,a)||"").split(";;");X[f-1]?H=X[f-1]:H+="SH33TJSERRX"}A.push(H);break}W<0&&(W=-W),n[W]&&(j=n[W][f]),j||(j={Name:"SH33TJSERRY"}),A.push(j.Name);break;case"PtgParen":var x="(",N=")";if(g>=0){switch(p="",e[0][g][1][0]){case 2:x=no(" ",e[0][g][1][1])+x;break;case 3:x=no("\r",e[0][g][1][1])+x;break;case 4:N=no(" ",e[0][g][1][1])+N;break;case 5:N=no("\r",e[0][g][1][1])+N;break;default:if(a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}g=-1}A.push(x+A.pop()+N);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":A.push("#REF!");break;case"PtgExp":i={c:y[1][1],r:y[1][0]};var C={c:t.c,r:t.r};if(n.sharedf[In(i)]){var w=n.sharedf[In(i)];A.push(gs(w,l,C,n,a))}else{var Q=!1;for(s=0;s!=n.arrayf.length;++s)if(o=n.arrayf[s],!(i.co[0].e.c||i.ro[0].e.r)){A.push(gs(o[1],l,C,n,a)),Q=!0;break}Q||A.push(y[1])}break;case"PtgArray":A.push("{"+LC(y[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":g=m;break;case"PtgMissArg":A.push("");break;case"PtgList":A.push("Table"+y[1].idx+"[#"+y[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(y))}if(a.biff!=3&&g>=0&&["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(e[0][m][0])==-1){var B=!0;switch((y=e[0][g])[1][0]){case 4:B=!1;case 0:p=no(" ",y[1][1]);break;case 5:B=!1;case 1:p=no("\r",y[1][1]);break;default:if(p="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+y[1][0])}A.push((B?p:"")+A.pop()+(B?"":p)),g=-1}}if(A.length>1&&a.WTF)throw new Error("bad formula stack");return A[0]}function PC(e,r,t){var n,a=e.l+r,s=t.biff==2?1:2,o=e.read_shift(s);if(o==65535)return[[],ls(e,r-2)];var i=vf(e,o,t);return r!==o+s&&(n=pf(e,r-o-s,i,t)),e.l=a,[i,n]}function GC(e,r,t){var n,a=e.l+r,s=e.read_shift(2),o=vf(e,s,t);return s==65535?[[],ls(e,r-2)]:(r!==s+2&&(n=pf(e,a-s-2,o,t)),[o,n])}function sp(e,r,t){var n=e.l+r,a=su(e);t.biff==2&&++e.l;var s=function(c){var u;if(ou(c,c.l+6)!==65535)return[hs(c),"n"];switch(c[c.l]){case 0:return c.l+=8,["String","s"];case 1:return u=c[c.l+2]===1,c.l+=8,[u,"b"];case 2:return u=c[c.l+2],c.l+=8,[u,"e"];case 3:return c.l+=8,["","s"]}return[]}(e),o=e.read_shift(1);t.biff!=2&&(e.read_shift(1),t.biff>=5&&e.read_shift(4));var i=function(c,u,l){var A,h=c.l+u,f=l.biff==2?1:2,d=c.read_shift(f);if(d==65535)return[[],ls(c,u-2)];var g=vf(c,d,l);return u!==d+f&&(A=pf(c,u-d-f,g,l)),c.l=h,[g,A]}(e,n-e.l,t);return{cell:a,val:s[0],formula:i,shared:o>>3&1,tt:s[1]}}function UC(e,r,t,n,a){var s=rA(r,t,a),o=function(l){if(l==null){var A=Kt(8);return A.write_shift(1,3),A.write_shift(1,0),A.write_shift(2,0),A.write_shift(2,0),A.write_shift(2,65535),A}return Zl(typeof l=="number"?l:0)}(e.v),i=Kt(6);i.write_shift(2,33),i.write_shift(4,0);for(var c=Kt(e.bf.length),u=0;u0?pf(e,s,a,t):null]}var jC=Yd,Jd=Yd,HC=Yd,YC=Yd,JC={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},oy={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},qC={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function sy(e){return e.slice(0,3)=="of:"&&(e=e.slice(3)),e.charCodeAt(0)==61&&(e=e.slice(1)).charCodeAt(0)==61&&(e=e.slice(1)),(e=(e=(e=e.replace(/COM\.MICROSOFT\./g,"")).replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(r,t){return t.replace(/\./g,"")})).replace(/\[.(#[A-Z]*[?!])\]/g,"$1")).replace(/[;~]/g,",").replace(/\|/g,";")}function cp(e){var r=e.split(":");return[r[0].split(".")[0],r[0].split(".")[1]+(r.length>1?":"+(r[1].split(".")[1]||r[1].split(".")[0]):"")]}var ah={},oh={},mf=typeof Map<"u";function up(e,r,t){var n=0,a=e.length;if(t){if(mf?t.has(r):Object.prototype.hasOwnProperty.call(t,r)){for(var s=mf?t.get(r):t[r];n-1?(t.width=Td(n),t.customWidth=1):r.width!=null&&(t.width=r.width),r.hidden&&(t.hidden=!0),r.level!=null&&(t.outlineLevel=t.level=r.level),t}function iA(e,r){if(e){var t=[.7,.7,.75,.75,.3,.3];r=="xlml"&&(t=[1,1,1,1,.5,.5]),e.left==null&&(e.left=t[0]),e.right==null&&(e.right=t[1]),e.top==null&&(e.top=t[2]),e.bottom==null&&(e.bottom=t[3]),e.header==null&&(e.header=t[4]),e.footer==null&&(e.footer=t[5])}}function vl(e,r,t){var n=t.revssf[r.z!=null?r.z:"General"],a=60,s=e.length;if(n==null&&t.ssf){for(;a<392;++a)if(t.ssf[a]==null){Fu(r.z,a),t.ssf[a]=r.z,t.revssf[r.z]=n=a;break}}for(a=0;a!=s;++a)if(e[a].numFmtId===n)return a;return e[s]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},s}function cy(e,r,t,n,a,s){try{n.cellNF&&(e.z=ai[r])}catch(i){if(n.WTF)throw i}if(e.t!=="z"||n.cellStyles){if(e.t==="d"&&typeof e.v=="string"&&(e.v=Ga(e.v)),(!n||n.cellText!==!1)&&e.t!=="z")try{if(ai[r]==null&&Fu($2[r]||"General",r),e.t==="e")e.w=e.w||Lu[e.v];else if(r===0)if(e.t==="n")(0|e.v)===e.v?e.w=e.v.toString(10):e.w=qh(e.v);else if(e.t==="d"){var o=Zo(e.v);e.w=(0|o)===o?o.toString(10):qh(o)}else{if(e.v===void 0)return"";e.w=jl(e.v,oh)}else e.t==="d"?e.w=Cs(r,Zo(e.v),oh):e.w=Cs(r,e.v,oh)}catch(i){if(n.WTF)throw i}if(n.cellStyles&&t!=null)try{e.s=s.Fills[t],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=Md(a.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),n.WTF&&(e.s.fgColor.raw_rgb=a.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=Md(a.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),n.WTF&&(e.s.bgColor.raw_rgb=a.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(i){if(n.WTF&&s.Fills)throw i}}}function uy(e,r,t){if(e&&e["!ref"]){var n=ea(e["!ref"]);if(n.e.c/g,WC=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,Ay=/<(?:\w:)?hyperlink [^>]*>/gm,KC=/"(\w*:\w*)"/,sh=/<(?:\w:)?col\b[^>]*[\/]?>/g,zC=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,VC=/<(?:\w:)?pageMargins[^>]*\/>/g,hy=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,ZC=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,XC=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function fy(e,r,t,n,a,s,o){if(!e)return e;n||(n={"!id":{}});var i=r.dense?[]:{},c={s:{r:2e6,c:2e6},e:{r:0,c:0}},u="",l="",A=e.match(WC);A?(u=e.slice(0,A.index),l=e.slice(A.index+A[0].length)):u=l=e;var h=u.match(hy);h?lp(h[0],i,a,t):(h=u.match(ZC))&&function(W,H,X,x,N){lp(W.slice(0,W.indexOf(">")),X,x,N)}(h[0],h[1],i,a,t);var f=(u.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(f>0){var d=u.slice(f,f+50).match(KC);d&&function(W,H){var X=ea(H);X.s.r<=X.e.r&&X.s.c<=X.e.c&&X.s.r>=0&&X.s.c>=0&&(W["!ref"]=_i(X))}(i,d[1])}var g=u.match(XC);g&&g[1]&&function(W,H){H.Views||(H.Views=[{}]),(W.match(eE)||[]).forEach(function(X,x){var N=ci(X);H.Views[x]||(H.Views[x]={}),+N.zoomScale&&(H.Views[x].zoom=+N.zoomScale),Fa(N.rightToLeft)&&(H.Views[x].RTL=!0)})}(g[1],a);var p=[];if(r.cellStyles){var m=u.match(sh);m&&function(W,H){for(var X=!1,x=0;x!=H.length;++x){var N=ci(H[x],!0);N.hidden&&(N.hidden=Fa(N.hidden));var C=parseInt(N.min,10)-1,w=parseInt(N.max,10)-1;for(N.outlineLevel&&(N.level=+N.outlineLevel||0),delete N.min,delete N.max,N.width=+N.width,!X&&N.width&&(X=!0,Ld(N.width)),dl(N);C<=w;)W[C++]=Ra(N)}}(p,m)}A&&dy(A[1],i,r,c,s,o);var v=l.match(zC);v&&(i["!autofilter"]=function(W){var H={ref:(W.match(/ref="([^"]*)"/)||[])[1]};return H}(v[0]));var y=[],I=l.match(ly);if(I)for(f=0;f!=I.length;++f)y[f]=ea(I[f].slice(I[f].indexOf('"')+1));var E=l.match(Ay);E&&function(W,H,X){for(var x=Array.isArray(W),N=0;N!=H.length;++N){var C=ci(ua(H[N]),!0);if(!C.ref)return;var w=((X||{})["!id"]||[])[C.id];w?(C.Target=w.Target,C.location&&(C.Target+="#"+Mi(C.location))):(C.Target="#"+Mi(C.location),w={Target:C.Target,TargetMode:"Internal"}),C.Rel=w,C.tooltip&&(C.Tooltip=C.tooltip,delete C.tooltip);for(var Q=ea(C.ref),B=Q.s.r;B<=Q.e.r;++B)for(var S=Q.s.c;S<=Q.e.c;++S){var O=In({c:S,r:B});x?(W[B]||(W[B]=[]),W[B][S]||(W[B][S]={t:"z",v:void 0}),W[B][S].l=C):(W[O]||(W[O]={t:"z",v:void 0}),W[O].l=C)}}}(i,E,n);var k,R,T=l.match(VC);if(T&&(i["!margins"]=(k=ci(T[0]),R={},["left","right","top","bottom","header","footer"].forEach(function(W){k[W]&&(R[W]=parseFloat(k[W]))}),R)),!i["!ref"]&&c.e.c>=c.s.c&&c.e.r>=c.s.r&&(i["!ref"]=_i(c)),r.sheetRows>0&&i["!ref"]){var j=ea(i["!ref"]);r.sheetRows<=+j.e.r&&(j.e.r=r.sheetRows-1,j.e.r>c.e.r&&(j.e.r=c.e.r),j.e.rc.e.c&&(j.e.c=c.e.c),j.e.c0&&(i["!cols"]=p),y.length>0&&(i["!merges"]=y),i}function lp(e,r,t,n){var a=ci(e);t.Sheets[n]||(t.Sheets[n]={}),a.codeName&&(t.Sheets[n].CodeName=Mi(ua(a.codeName)))}var aA=["objects","scenarios","selectLockedCells","selectUnlockedCells"],$C=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"],eE=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function tE(e,r,t,n){if(e.c&&t["!comments"].push([r,e.c]),e.v===void 0&&typeof e.f!="string"||e.t==="z"&&!e.f)return"";var a="",s=e.t,o=e.v;if(e.t!=="z")switch(e.t){case"b":a=e.v?"1":"0";break;case"n":a=""+e.v;break;case"e":a=Lu[e.v];break;case"d":n&&n.cellDates?a=Ga(e.v,-1).toISOString():((e=Ra(e)).t="n",a=""+(e.v=Zo(Ga(e.v)))),e.z===void 0&&(e.z=ai[14]);break;default:a=e.v}var i=Xo("v",ca(a)),c={r},u=vl(n.cellXfs,e,n);switch(u!==0&&(c.s=u),e.t){case"n":case"z":break;case"d":c.t="d";break;case"b":c.t="b";break;case"e":c.t="e";break;default:if(e.v==null){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(n&&n.bookSST){i=Xo("v",""+up(n.Strings,e.v,n.revStrings)),c.t="s";break}c.t="str"}if(e.t!=s&&(e.t=s,e.v=o),typeof e.f=="string"&&e.f){var l=e.F&&e.F.slice(0,r.length)==r?{t:"array",ref:e.F}:null;i=Zr("f",ca(e.f),l)+(e.v!=null?i:"")}return e.l&&t["!links"].push([r,e.l]),e.D&&(c.cm=1),Zr("c",i,c)}var dy=function(){var e=/<(?:\w+:)?c[ \/>]/,r=/<\/(?:\w+:)?row>/,t=/r=["']([^"']*)["']/,n=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,a=/ref=["']([^"']*)["']/,s=Zh("v"),o=Zh("f");return function(i,c,u,l,A,h){for(var f,d,g,p,m,v=0,y="",I=[],E=[],k=0,R=0,T=0,j="",W=0,H=0,X=0,x=0,N=Array.isArray(h.CellXf),C=[],w=[],Q=Array.isArray(c),B=[],S={},O=!1,F=!!u.sheetStubs,Y=i.split(r),M=0,z=Y.length;M!=z;++M){var ue=(y=Y[M].trim()).length;if(ue!==0){var ae=0;e:for(v=0;v":if(y[v-1]!="/"){++v;break e}if(u&&u.cellStyles){if(W=(d=ci(y.slice(ae,v),!0)).r!=null?parseInt(d.r,10):W+1,H=-1,u.sheetRows&&u.sheetRows=v)break;if(W=(d=ci(y.slice(ae,v),!0)).r!=null?parseInt(d.r,10):W+1,H=-1,!(u.sheetRows&&u.sheetRowsW-1&&(l.s.r=W-1),l.e.r":"")+y,E!=null&&E.length===2){for(k=0,j=E[1],R=0;R!=j.length&&!((T=j.charCodeAt(R)-64)<1||T>26);++R)k=26*k+T;H=--k}else++H;for(R=0;R!=y.length&&y.charCodeAt(R)!==62;++R);if(++R,(d=ci(y.slice(0,R),!0)).r||(d.r=In({r:W-1,c:H})),f={t:""},(E=(j=y.slice(R)).match(s))!=null&&E[1]!==""&&(f.v=Mi(E[1])),u.cellFormula){if((E=j.match(o))!=null&&E[1]!==""){if(f.f=Mi(ua(E[1])).replace(/\r\n/g,` `),u.xlfn||(f.f=ap(f.f)),E[0].indexOf('t="array"')>-1)f.F=(j.match(a)||[])[1],f.F.indexOf(":")>-1&&C.push([ea(f.F),f.F]);else if(E[0].indexOf('t="shared"')>-1){p=ci(E[0]);var Ge=Mi(ua(E[1]));u.xlfn||(Ge=ap(Ge)),w[parseInt(p.si,10)]=[p,Ge,d.r]}}else(E=j.match(/]*\/>/))&&w[(p=ci(E[0])).si]&&(f.f=xC(w[p.si][1],w[p.si][2],d.r));var Ye=Do(d.r);for(R=0;R=C[R][0].s.r&&Ye.r<=C[R][0].e.r&&Ye.c>=C[R][0].s.c&&Ye.c<=C[R][0].e.c&&(f.F=C[R][1])}if(d.t==null&&f.v===void 0)if(f.f||f.F)f.v=0,f.t="n";else{if(!F)continue;f.t="z"}else f.t=d.t||"n";switch(l.s.c>H&&(l.s.c=H),l.e.c0&&(c["!rows"]=B)}}();function gy(e,r,t,n){var a,s=[fo,Zr("worksheet",null,{xmlns:ql[0],"xmlns:r":_o.r})],o=t.SheetNames[e],i="",c=t.Sheets[o];c==null&&(c={});var u=c["!ref"]||"A1",l=ea(u);if(l.e.c>16383||l.e.r>1048575){if(r.WTF)throw new Error("Range "+u+" exceeds format limit A1:XFD1048576");l.e.c=Math.min(l.e.c,16383),l.e.r=Math.min(l.e.c,1048575),u=_i(l)}n||(n={}),c["!comments"]=[];var A=[];(function(p,m,v,y,I){var E=!1,k={},R=null;if(y.bookType!=="xlsx"&&m.vbaraw){var T=m.SheetNames[v];try{m.Workbook&&(T=m.Workbook.Sheets[v].CodeName||T)}catch{}E=!0,k.codeName=Oc(ca(T))}if(p&&p["!outline"]){var j={summaryBelow:1,summaryRight:1};p["!outline"].above&&(j.summaryBelow=0),p["!outline"].left&&(j.summaryRight=0),R=(R||"")+Zr("outlinePr",null,j)}(E||R)&&(I[I.length]=Zr("sheetPr",R,k))})(c,t,e,r,s),s[s.length]=Zr("dimension",null,{ref:u}),s[s.length]=function(p,m,v,y){var I={workbookViewId:"0"};return(((y||{}).Workbook||{}).Views||[])[0]&&(I.rightToLeft=y.Workbook.Views[0].RTL?"1":"0"),Zr("sheetViews",Zr("sheetView",null,I),{})}(0,0,0,t),r.sheetFormat&&(s[s.length]=Zr("sheetFormatPr",null,{defaultRowHeight:r.sheetFormat.defaultRowHeight||"16",baseColWidth:r.sheetFormat.baseColWidth||"10",outlineLevelRow:r.sheetFormat.outlineLevelRow||"7"})),c["!cols"]!=null&&c["!cols"].length>0&&(s[s.length]=function(p,m){for(var v,y=[""],I=0;I!=m.length;++I)(v=m[I])&&(y[y.length]=Zr("col",null,qd(I,v)));return y[y.length]="",y.join("")}(0,c["!cols"])),s[a=s.length]="",c["!links"]=[],c["!ref"]!=null&&(i=function(p,m,v,y){var I,E,k=[],R=[],T=ea(p["!ref"]),j="",W="",H=[],X=0,x=0,N=p["!rows"],C=Array.isArray(p),w={r:W},Q=-1;for(x=T.s.c;x<=T.e.c;++x)H[x]=Eo(x);for(X=T.s.r;X<=T.e.r;++X){for(R=[],W=Ho(X),x=T.s.c;x<=T.e.c;++x){I=H[x]+W;var B=C?(p[X]||[])[x]:p[I];B!==void 0&&(j=tE(B,I,p,m))!=null&&R.push(j)}(R.length>0||N&&N[X])&&(w={r:W},N&&N[X]&&((E=N[X]).hidden&&(w.hidden=1),Q=-1,E.hpx?Q=hf(E.hpx):E.hpt&&(Q=E.hpt),Q>-1&&(w.ht=Q,w.customHeight=1),E.level&&(w.outlineLevel=E.level)),k[k.length]=Zr("row",R.join(""),w))}if(N)for(;X-1&&(w.ht=Q,w.customHeight=1),E.level&&(w.outlineLevel=E.level),k[k.length]=Zr("row","",w));return k.join("")}(c,r),i.length>0&&(s[s.length]=i)),s.length>a+1&&(s[s.length]="",s[a]=s[a].replace("/>",">")),c["!protect"]&&(s[s.length]=function(p){var m={sheet:1};return aA.forEach(function(v){p[v]!=null&&p[v]&&(m[v]="1")}),$C.forEach(function(v){p[v]==null||p[v]||(m[v]="0")}),p.password&&(m.password=Nd(p.password).toString(16).toUpperCase()),Zr("sheetProtection",null,m)}(c["!protect"])),c["!autofilter"]!=null&&(s[s.length]=function(p,m,v,y){var I=typeof p.ref=="string"?p.ref:_i(p.ref);v.Workbook||(v.Workbook={Sheets:[]}),v.Workbook.Names||(v.Workbook.Names=[]);var E=v.Workbook.Names,k=Es(I);k.s.r==k.e.r&&(k.e.r=Es(m["!ref"]).e.r,I=_i(k));for(var R=0;R0&&(s[s.length]=function(p){if(p.length===0)return"";for(var m='',v=0;v!=p.length;++v)m+='';return m+""}(c["!merges"]));var h,f,d=-1,g=-1;return c["!links"].length>0&&(s[s.length]="",c["!links"].forEach(function(p){p[1].Target&&(h={ref:p[0]},p[1].Target.charAt(0)!="#"&&(g=ta(n,-1,ca(p[1].Target).replace(/#.*$/,""),Si.HLINK),h["r:id"]="rId"+g),(d=p[1].Target.indexOf("#"))>-1&&(h.location=ca(p[1].Target.slice(d+1))),p[1].Tooltip&&(h.tooltip=ca(p[1].Tooltip)),s[s.length]=Zr("hyperlink",null,h))}),s[s.length]=""),delete c["!links"],c["!margins"]!=null&&(s[s.length]=(iA(f=c["!margins"]),Zr("pageMargins",null,f))),r&&!r.ignoreEC&&r.ignoreEC!=null||(s[s.length]=Xo("ignoredErrors",Zr("ignoredError",null,{numberStoredAsText:1,sqref:u}))),A.length>0&&(g=ta(n,-1,"../drawings/drawing"+(e+1)+".xml",Si.DRAW),s[s.length]=Zr("drawing",null,{"r:id":"rId"+g}),c["!drawing"]=A),c["!comments"].length>0&&(g=ta(n,-1,"../drawings/vmlDrawing"+(e+1)+".vml",Si.VML),s[s.length]=Zr("legacyDrawing",null,{"r:id":"rId"+g}),c["!legacy"]=g),s.length>1&&(s[s.length]="",s[1]=s[1].replace("/>",">")),s.join("")}function rE(e,r,t,n){var a=function(s,o,i){var c=Kt(145),u=(i["!rows"]||[])[s]||{};c.write_shift(4,s),c.write_shift(4,0);var l=320;u.hpx?l=20*hf(u.hpx):u.hpt&&(l=20*u.hpt),c.write_shift(2,l),c.write_shift(1,0);var A=0;u.level&&(A|=u.level),u.hidden&&(A|=16),(u.hpx||u.hpt)&&(A|=32),c.write_shift(1,A),c.write_shift(1,0);var h=0,f=c.l;c.l+=4;for(var d={r:s,c:0},g=0;g<16;++g)if(!(o.s.c>g+1<<10||o.e.cc.l?c.slice(0,c.l):c}(n,t,r);(a.length>17||(r["!rows"]||[])[n])&&wr(e,0,a)}var nE=Vl,iE=zA;function py(e){return[hl(e),hs(e),"n"]}var aE=Vl,oE=zA,vy=["left","right","top","bottom","header","footer"];function sE(e,r,t,n,a,s,o){if(r.v===void 0)return!1;var i="";switch(r.t){case"b":i=r.v?"1":"0";break;case"d":(r=Ra(r)).z=r.z||ai[14],r.v=Zo(Ga(r.v)),r.t="n";break;case"n":case"e":i=""+r.v;break;default:i=r.v}var c={r:t,c:n};switch(c.s=vl(a.cellXfs,r,a),r.l&&s["!links"].push([In(c),r.l]),r.c&&s["!comments"].push([In(c),r.c]),r.t){case"s":case"str":return a.bookSST?(i=up(a.Strings,r.v,a.revStrings),c.t="s",c.v=i,o?wr(e,18,function(u,l,A){return A==null&&(A=Kt(8)),zl(l,A),A.write_shift(4,l.v),A}(0,c)):wr(e,7,function(u,l,A){return A==null&&(A=Kt(12)),Tu(l,A),A.write_shift(4,l.v),A}(0,c))):(c.t="str",o?wr(e,17,function(u,l,A){return A==null&&(A=Kt(8+4*u.v.length)),zl(l,A),Yo(u.v,A),A.length>A.l?A.slice(0,A.l):A}(r,c)):wr(e,6,function(u,l,A){return A==null&&(A=Kt(12+4*u.v.length)),Tu(l,A),Yo(u.v,A),A.length>A.l?A.slice(0,A.l):A}(r,c))),!0;case"n":return r.v==(0|r.v)&&r.v>-1e3&&r.v<1e3?o?wr(e,13,function(u,l,A){return A==null&&(A=Kt(8)),zl(l,A),N0(u.v,A),A}(r,c)):wr(e,2,function(u,l,A){return A==null&&(A=Kt(12)),Tu(l,A),N0(u.v,A),A}(r,c)):o?wr(e,16,function(u,l,A){return A==null&&(A=Kt(12)),zl(l,A),Zl(u.v,A),A}(r,c)):wr(e,5,function(u,l,A){return A==null&&(A=Kt(16)),Tu(l,A),Zl(u.v,A),A}(r,c)),!0;case"b":return c.t="b",o?wr(e,15,function(u,l,A){return A==null&&(A=Kt(5)),zl(l,A),A.write_shift(1,u.v?1:0),A}(r,c)):wr(e,4,function(u,l,A){return A==null&&(A=Kt(9)),Tu(l,A),A.write_shift(1,u.v?1:0),A}(r,c)),!0;case"e":return c.t="e",o?wr(e,14,function(u,l,A){return A==null&&(A=Kt(8)),zl(l,A),A.write_shift(1,u.v),A.write_shift(2,0),A.write_shift(1,0),A}(r,c)):wr(e,3,function(u,l,A){return A==null&&(A=Kt(9)),Tu(l,A),A.write_shift(1,u.v),A}(r,c)),!0}return o?wr(e,12,function(u,l,A){return A==null&&(A=Kt(4)),zl(l,A)}(0,c)):wr(e,1,function(u,l,A){return A==null&&(A=Kt(8)),Tu(l,A)}(0,c)),!0}function cE(e,r){var t,n;r&&r["!merges"]&&(wr(e,177,(t=r["!merges"].length,n==null&&(n=Kt(4)),n.write_shift(4,t),n)),r["!merges"].forEach(function(a){wr(e,176,oE(a))}),wr(e,178))}function uE(e,r){r&&r["!cols"]&&(wr(e,390),r["!cols"].forEach(function(t,n){t&&wr(e,60,function(a,s,o){o==null&&(o=Kt(18));var i=qd(a,s);o.write_shift(-4,a),o.write_shift(-4,a),o.write_shift(4,256*(i.width||10)),o.write_shift(4,0);var c=0;return s.hidden&&(c|=1),typeof i.width=="number"&&(c|=2),s.level&&(c|=s.level<<8),o.write_shift(2,c),o}(n,t))}),wr(e,391))}function my(e,r){var t,n;r&&r["!ref"]&&(wr(e,648),wr(e,649,(t=ea(r["!ref"]),(n=Kt(24)).write_shift(4,4),n.write_shift(4,1),zA(t,n),n)),wr(e,650))}function yy(e,r,t){r["!links"].forEach(function(n){if(n[1].Target){var a=ta(t,-1,n[1].Target.replace(/#.*$/,""),Si.HLINK);wr(e,494,function(s,o){var i=Kt(50+4*(s[1].Target.length+(s[1].Tooltip||"").length));zA({s:Do(s[0]),e:Do(s[0])},i),R0("rId"+o,i);var c=s[1].Target.indexOf("#");return Yo((c==-1?"":s[1].Target.slice(c+1))||"",i),Yo(s[1].Tooltip||"",i),Yo("",i),i.slice(0,i.l)}(n,a))}}),delete r["!links"]}function lE(e,r,t){wr(e,133),wr(e,137,function(n,a,s){s==null&&(s=Kt(30));var o=924;return(((a||{}).Views||[])[0]||{}).RTL&&(o|=32),s.write_shift(2,o),s.write_shift(4,0),s.write_shift(4,0),s.write_shift(4,0),s.write_shift(1,0),s.write_shift(1,0),s.write_shift(2,0),s.write_shift(2,100),s.write_shift(2,0),s.write_shift(2,0),s.write_shift(2,0),s.write_shift(4,0),s}(0,t)),wr(e,138),wr(e,134)}function AE(e,r){var t,n;r["!protect"]&&wr(e,535,(t=r["!protect"],n==null&&(n=Kt(66)),n.write_shift(2,t.password?Nd(t.password):0),n.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(a){a[1]?n.write_shift(4,t[a[0]]==null||t[a[0]]?0:1):n.write_shift(4,t[a[0]]!=null&&t[a[0]]?0:1)}),n))}function hE(e,r,t,n){var a=Os(),s=t.SheetNames[e],o=t.Sheets[s]||{},i=s;try{t&&t.Workbook&&(i=t.Workbook.Sheets[e].CodeName||i)}catch{}var c,u,l=ea(o["!ref"]||"A1");if(l.e.c>16383||l.e.r>1048575){if(r.WTF)throw new Error("Range "+(o["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");l.e.c=Math.min(l.e.c,16383),l.e.r=Math.min(l.e.c,1048575)}return o["!links"]=[],o["!comments"]=[],wr(a,129),(t.vbaraw||o["!outline"])&&wr(a,147,function(A,h,f){f==null&&(f=Kt(84+4*A.length));var d=192;h&&(h.above&&(d&=-65),h.left&&(d&=-129)),f.write_shift(1,d);for(var g=1;g<3;++g)f.write_shift(1,0);return nf({auto:1},f),f.write_shift(-4,-1),f.write_shift(-4,-1),Hv(A,f),f.slice(0,f.l)}(i,o["!outline"])),wr(a,148,iE(l)),lE(a,0,t.Workbook),uE(a,o),function(A,h,f,d){var g,p=ea(h["!ref"]||"A1"),m="",v=[];wr(A,145);var y=Array.isArray(h),I=p.e.r;h["!rows"]&&(I=Math.max(p.e.r,h["!rows"].length-1));for(var E=p.s.r;E<=I;++E){m=Ho(E),rE(A,h,p,E);var k=!1;if(E<=p.e.r)for(var R=p.s.c;R<=p.e.c;++R){E===p.s.r&&(v[R]=Eo(R)),g=v[R]+m;var T=y?(h[E]||[])[R]:h[g];k=!!T&&sE(A,T,E,R,d,h,k)}}wr(A,146)}(a,o,0,r),AE(a,o),function(A,h,f,d){if(h["!autofilter"]){var g=h["!autofilter"],p=typeof g.ref=="string"?g.ref:_i(g.ref);f.Workbook||(f.Workbook={Sheets:[]}),f.Workbook.Names||(f.Workbook.Names=[]);var m=f.Workbook.Names,v=Es(p);v.s.r==v.e.r&&(v.e.r=Es(h["!ref"]).e.r,p=_i(v));for(var y=0;y0){var g=ta(d,-1,"../drawings/vmlDrawing"+(f+1)+".vml",Si.VML);wr(A,551,R0("rId"+g)),h["!legacy"]=g}}(a,o,e,n),wr(a,130),a.end()}function fE(e,r,t,n,a,s){var o=s||{"!type":"chart"};if(!e)return s;var i=0,c=0,u="A",l={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(A){var h=function(f){var d,g=[],p=f.match(/^/);(f.match(/(.*?)<\/c:pt>/gm)||[]).forEach(function(v){var y=v.match(/(.*)<\/c:v><\/c:pt>/);y&&(g[+y[1]]=p?+y[2]:y[2])});var m=Mi((f.match(/([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(f.match(/(.*?)<\/c:f>/gm)||[]).forEach(function(v){d=v.replace(/<.*?>/g,"")}),[g,m,d]}(A);l.s.r=l.s.c=0,l.e.c=i,u=Eo(i),h[0].forEach(function(f,d){o[u+Ho(d)]={t:"n",v:f,z:h[1]},c=d}),l.e.r0&&(o["!ref"]=_i(l)),o}var Ap=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],dE=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],gE=[],pE=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function Iy(e,r){for(var t=0;t!=e.length;++t)for(var n=e[t],a=0;a!=r.length;++a){var s=r[a];if(n[s[0]]==null)n[s[0]]=s[1];else switch(s[2]){case"bool":typeof n[s[0]]=="string"&&(n[s[0]]=Fa(n[s[0]]));break;case"int":typeof n[s[0]]=="string"&&(n[s[0]]=parseInt(n[s[0]],10))}}}function by(e,r){for(var t=0;t!=r.length;++t){var n=r[t];if(e[n[0]]==null)e[n[0]]=n[1];else switch(n[2]){case"bool":typeof e[n[0]]=="string"&&(e[n[0]]=Fa(e[n[0]]));break;case"int":typeof e[n[0]]=="string"&&(e[n[0]]=parseInt(e[n[0]],10))}}}function Cy(e){by(e.WBProps,Ap),by(e.CalcPr,pE),Iy(e.WBView,dE),Iy(e.Sheets,gE),oh.date1904=Fa(e.WBProps.date1904)}var vE="][*?/\\".split("");function Ey(e,r){if(e.length>31){if(r)return!1;throw new Error("Sheet names cannot exceed 31 chars")}var t=!0;return vE.forEach(function(n){if(e.indexOf(n)!=-1){if(!r)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");t=!1}}),t}function mE(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var r,t,n,a=e.Workbook&&e.Workbook.Sheets||[];r=e.SheetNames,t=a,n=!!e.vbaraw,r.forEach(function(o,i){Ey(o);for(var c=0;c22)throw new Error("Bad Code Name: Worksheet"+u)}});for(var s=0;s0,n={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(Ap.forEach(function(i){e.Workbook.WBProps[i[0]]!=null&&e.Workbook.WBProps[i[0]]!=i[1]&&(n[i[0]]=e.Workbook.WBProps[i[0]])}),e.Workbook.WBProps.CodeName&&(n.codeName=e.Workbook.WBProps.CodeName,delete n.CodeName)),r[r.length]=Zr("workbookPr",null,n);var a=e.Workbook&&e.Workbook.Sheets||[],s=0;if(a&&a[0]&&a[0].Hidden){for(r[r.length]="",s=0;s!=e.SheetNames.length&&a[s]&&a[s].Hidden;++s);s==e.SheetNames.length&&(s=0),r[r.length]='',r[r.length]=""}for(r[r.length]="",s=0;s!=e.SheetNames.length;++s){var o={name:ca(e.SheetNames[s].slice(0,31))};if(o.sheetId=""+(s+1),o["r:id"]="rId"+(s+1),a[s])switch(a[s].Hidden){case 1:o.state="hidden";break;case 2:o.state="veryHidden"}r[r.length]=Zr("sheet",null,o)}return r[r.length]="",t&&(r[r.length]="",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(i){var c={name:i.Name};i.Comment&&(c.comment=i.Comment),i.Sheet!=null&&(c.localSheetId=""+i.Sheet),i.Hidden&&(c.hidden="1"),i.Ref&&(r[r.length]=Zr("definedName",ca(i.Ref),c))}),r[r.length]=""),r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}function IE(e,r){var t={};return e.read_shift(4),t.ArchID=e.read_shift(4),e.l+=r-8,t}function By(e,r){if(r.Workbook&&r.Workbook.Sheets){for(var t,n,a=r.Workbook.Sheets,s=0,o=-1,i=-1;so||(wr(e,135),wr(e,158,(t=o,n||(n=Kt(29)),n.write_shift(-4,0),n.write_shift(-4,460),n.write_shift(4,28800),n.write_shift(4,17600),n.write_shift(4,500),n.write_shift(4,t),n.write_shift(4,t),n.write_shift(1,120),n.length>n.l?n.slice(0,n.l):n)),wr(e,136))}}function Qy(e,r){var t=Os();return wr(t,131),wr(t,128,function(n,a){a||(a=Kt(127));for(var s=0;s!=4;++s)a.write_shift(4,0);return Yo("SheetJS",a),Yo(o0.version,a),Yo(o0.version,a),Yo("7262",a),a.length>a.l?a.slice(0,a.l):a}()),wr(t,153,function(n,a){a||(a=Kt(72));var s=0;return n&&n.filterPrivacy&&(s|=8),a.write_shift(4,s),a.write_shift(4,0),Hv(n&&n.CodeName||"ThisWorkbook",a),a.slice(0,a.l)}(e.Workbook&&e.Workbook.WBProps||null)),By(t,e),function(n,a){wr(n,143);for(var s=0;s!=a.SheetNames.length;++s)wr(n,156,(o={Hidden:a.Workbook&&a.Workbook.Sheets&&a.Workbook.Sheets[s]&&a.Workbook.Sheets[s].Hidden||0,iTabID:s+1,strRelID:"rId"+(s+1),name:a.SheetNames[s]},(i=void 0)||(i=Kt(127)),i.write_shift(4,o.Hidden),i.write_shift(4,o.iTabID),R0(o.strRelID,i),Yo(o.name.slice(0,31),i),i.length>i.l?i.slice(0,i.l):i));var o,i;wr(n,144)}(t,e),wr(t,132),t.end()}function hp(e,r,t){return r.slice(-4)===".bin"?function(n,a){var s={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},o=[],i=!1;a||(a={}),a.biff=12;var c=[],u=[[]];return u.SheetNames=[],u.XTI=[],Ef[16]={n:"BrtFRTArchID$",f:IE},Mu(n,function(l,A,h){switch(h){case 156:u.SheetNames.push(l.name),s.Sheets.push(l);break;case 153:s.WBProps=l;break;case 39:l.Sheet!=null&&(a.SID=l.Sheet),l.Ref=gs(l.Ptg,0,null,u,a),delete a.SID,delete l.Ptg,c.push(l);break;case 1036:case 361:case 2071:case 158:case 143:case 664:case 353:case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:case 16:break;case 357:case 358:case 355:case 667:u[0].length?u.push([h,l]):u[0]=[h,l],u[u.length-1].XTI=[];break;case 362:u.length===0&&(u[0]=[],u[0].XTI=[]),u[u.length-1].XTI=u[u.length-1].XTI.concat(l),u.XTI=u.XTI.concat(l);break;case 35:case 37:o.push(h),i=!0;break;case 36:case 38:o.pop(),i=!1;break;default:if(!A.T){if(!i||a.WTF&&o[o.length-1]!=37&&o[o.length-1]!=35)throw new Error("Unexpected record 0x"+h.toString(16))}}},a),Cy(s),s.Names=c,s.supbooks=u,s}(e,t):function(n,a){if(!n)throw new Error("Could not find file");var s={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},o=!1,i="xmlns",c={},u=0;if(n.replace(us,function(l,A){var h=ci(l);switch(au(h[0])){case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":Ap.forEach(function(f){if(h[f[0]]!=null)switch(f[2]){case"bool":s.WBProps[f[0]]=Fa(h[f[0]]);break;case"int":s.WBProps[f[0]]=parseInt(h[f[0]],10);break;default:s.WBProps[f[0]]=h[f[0]]}}),h.codeName&&(s.WBProps.CodeName=ua(h.codeName));break;case"":delete h[0],s.WBView.push(h);break;case"":case"":o=!0;break;case"":case"":case"":o=!1;break;case"":c.Ref=Mi(ua(n.slice(u,A))),s.Names.push(c);break;case"":delete h[0],s.CalcPr=h;break;default:if(!o&&a.WTF)throw new Error("unrecognized "+h[0]+" in workbook")}return l}),ql.indexOf(s.xmlns)===-1)throw new Error("Unknown Namespace: "+s.xmlns);return Cy(s),s}(e,t)}function bE(e,r,t,n,a,s,o,i){return r.slice(-4)===".bin"?function(c,u,l,A,h,f,d){if(!c)return c;var g=u||{};A||(A={"!id":{}});var p,m,v,y,I,E,k,R,T,j,W=g.dense?[]:{},H={s:{r:2e6,c:2e6},e:{r:0,c:0}},X=!1,x=!1,N=[];g.biff=12,g["!row"]=0;var C=0,w=!1,Q=[],B={},S=g.supbooks||h.supbooks||[[]];if(S.sharedf=B,S.arrayf=Q,S.SheetNames=h.SheetNames||h.Sheets.map(function(ae){return ae.name}),!g.supbooks&&(g.supbooks=S,h.Names))for(var O=0;O=Ye[0].s.r&&m.r<=Ye[0].e.r&&E>=Ye[0].s.c&&E<=Ye[0].e.c&&(v.F=_i(Ye[0]),w=!0)}!w&&ae.length>3&&(v.f=ae[3])}if(H.s.r>m.r&&(H.s.r=m.r),H.s.c>E&&(H.s.c=E),H.e.rm.r&&(H.s.r=m.r),H.s.c>E&&(H.s.c=E),H.e.r=ae.s;)Y[ae.e--]={width:ae.w/256,hidden:!!(1&ae.flags),level:ae.level},z||(z=!0,Ld(ae.w/256)),dl(Y[ae.e+1]);break;case 161:W["!autofilter"]={ref:_i(ae)};break;case 476:W["!margins"]=ae;break;case 147:h.Sheets[l]||(h.Sheets[l]={}),ae.name&&(h.Sheets[l].CodeName=ae.name),(ae.above||ae.left)&&(W["!outline"]={above:ae.above,left:ae.left});break;case 137:h.Views||(h.Views=[{}]),h.Views[0]||(h.Views[0]={}),ae.RTL&&(h.Views[0].RTL=!0);break;case 485:case 64:case 1053:case 151:case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:case 37:X=!0;break;case 36:case 38:X=!1;break;default:if(!Ne.T){if(!X||g.WTF)throw new Error("Unexpected record 0x"+Ge.toString(16))}}},g),delete g.supbooks,delete g["!row"],!W["!ref"]&&(H.s.r<2e6||p&&(p.e.r>0||p.e.c>0||p.s.r>0||p.s.c>0))&&(W["!ref"]=_i(p||H)),g.sheetRows&&W["!ref"]){var ue=ea(W["!ref"]);g.sheetRows<=+ue.e.r&&(ue.e.r=g.sheetRows-1,ue.e.r>H.e.r&&(ue.e.r=H.e.r),ue.e.rH.e.c&&(ue.e.c=H.e.c),ue.e.c0&&(W["!merges"]=N),Y.length>0&&(W["!cols"]=Y),M.length>0&&(W["!rows"]=M),W}(e,n,t,a,s,o,i):fy(e,n,t,a,s,o,i)}function CE(e,r,t,n,a,s,o,i){return r.slice(-4)===".bin"?function(c,u,l,A,h){if(!c)return c;A||(A={"!id":{}});var f={"!type":"chart","!drawel":null,"!rel":""},d=!1;return Mu(c,function(g,p,m){switch(m){case 550:f["!rel"]=g;break;case 651:h.Sheets[l]||(h.Sheets[l]={}),g.name&&(h.Sheets[l].CodeName=g.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:case 37:case 38:break;case 35:d=!0;break;case 36:d=!1;break;default:if(!(p.T>0)){if(!(p.T<0)){if(!d||u.WTF)throw new Error("Unexpected record 0x"+m.toString(16))}}}},u),A["!id"][f["!rel"]]&&(f["!drawel"]=A["!id"][f["!rel"]]),f}(e,n,t,a,s):function(c,u,l,A,h){if(!c)return c;A||(A={"!id":{}});var f,d={"!type":"chart","!drawel":null,"!rel":""},g=c.match(hy);return g&&lp(g[0],0,h,l),(f=c.match(/drawing r:id="(.*?)"/))&&(d["!rel"]=f[1]),A["!id"][d["!rel"]]&&(d["!drawel"]=A["!id"][d["!rel"]]),d}(e,0,t,a,s)}function ky(e,r,t,n){return r.slice(-4)===".bin"?function(a,s,o){var i={NumberFmt:[]};for(var c in ai)i.NumberFmt[c]=ai[c];i.CellXf=[],i.Fonts=[];var u=[],l=!1;return Mu(a,function(A,h,f){switch(f){case 44:i.NumberFmt[A[0]]=A[1],Fu(A[1],A[0]);break;case 43:i.Fonts.push(A),A.color.theme!=null&&s&&s.themeElements&&s.themeElements.clrScheme&&(A.color.rgb=Md(s.themeElements.clrScheme[A.color.theme].rgb,A.color.tint||0));break;case 1025:case 45:case 46:case 48:case 507:case 572:case 475:case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 47:u[u.length-1]==617&&i.CellXf.push(A);break;case 35:l=!0;break;case 36:l=!1;break;case 37:u.push(f),l=!0;break;case 38:u.pop(),l=!1;break;default:if(h.T>0)u.push(f);else if(h.T<0)u.pop();else if(!l||o.WTF&&u[u.length-1]!=37)throw new Error("Unexpected record 0x"+f.toString(16))}}),i}(e,t,n):Gd(e,t,n)}function yf(e,r,t){return r.slice(-4)===".bin"?function(n,a){var s=[],o=!1;return Mu(n,function(i,c,u){switch(u){case 159:s.Count=i[0],s.Unique=i[1];break;case 19:s.push(i);break;case 160:return!0;case 35:o=!0;break;case 36:o=!1;break;default:if(c.T,!o||a.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}),s}(e,t):function(n,a){var s=[],o="";if(!n)return s;var i=n.match(zb);if(i){o=i[2].replace(Vb,"").split(Zb);for(var c=0;c!=o.length;++c){var u=Fd(o[c].trim(),a);u!=null&&(s[s.length]=u)}i=ci(i[1]),s.Count=i.count,s.Unique=i.uniqueCount}return s}(e,t)}function xy(e,r,t){return r.slice(-4)===".bin"?function(n,a){var s=[],o=[],i={},c=!1;return Mu(n,function(u,l,A){switch(A){case 632:o.push(u);break;case 635:i=u;break;case 637:i.t=u.t,i.h=u.h,i.r=u.r;break;case 636:if(i.author=o[i.iauthor],delete i.iauthor,a.sheetRows&&i.rfx&&a.sheetRows<=i.rfx.r)break;i.t||(i.t=""),delete i.rfx,s.push(i);break;case 3072:case 37:case 38:break;case 35:c=!0;break;case 36:c=!1;break;default:if(!l.T){if(!c||a.WTF)throw new Error("Unexpected record 0x"+A.toString(16))}}}),s}(e,t):function(n,a){if(n.match(/<(?:\w+:)?comments *\/>/))return[];var s=[],o=[],i=n.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);i&&i[1]&&i[1].split(/<\/\w*:?author>/).forEach(function(u){if(u!==""&&u.trim()!==""){var l=u.match(/<(?:\w+:)?author[^>]*>(.*)/);l&&s.push(l[1])}});var c=n.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return c&&c[1]&&c[1].split(/<\/\w*:?comment>/).forEach(function(u){if(u!==""&&u.trim()!==""){var l=u.match(/<(?:\w+:)?comment[^>]*>/);if(l){var A=ci(l[0]),h={author:A.authorId&&s[A.authorId]||"sheetjsghost",ref:A.ref,guid:A.guid},f=Do(A.ref);if(!(a.sheetRows&&a.sheetRows<=f.r)){var d=u.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),g=!!d&&!!d[1]&&Fd(d[1])||{r:"",t:"",h:""};h.r=g.r,g.r==""&&(g.t=g.h=""),h.t=(g.t||"").replace(/\r\n/g,` `).replace(/\r/g,` `),a.cellHTML&&(h.h=g.h),o.push(h)}}}}),o}(e,t)}function EE(e,r,t){return r.slice(-4)===".bin"?function(n,a,s){var o=[];return Mu(n,function(i,c,u){if(u===63)o.push(i);else if(!c.T)throw new Error("Unexpected record 0x"+u.toString(16))}),o}(e):function(n){var a=[];if(!n)return a;var s=1;return(n.match(us)||[]).forEach(function(o){var i=ci(o);switch(i[0]){case"":case"":break;case"":case"":case"":case"":case"":case"":case"":case"":case"":case"":break;case"":case"":u=2;break;case"":c=!1;break;case"-1?Mi(r||e).replace(/<.*?>/g,""):n.r;break;case"DateTime":e.slice(-1)!="Z"&&(e+="Z"),n.v=(Ga(e)-new Date(Date.UTC(1899,11,30)))/864e5,n.v!=n.v?n.v=Mi(e):n.v<60&&(n.v=n.v-1),l&&l!="General"||(l="yyyy-mm-dd");case"Number":n.v===void 0&&(n.v=+e),n.t||(n.t="n");break;case"Error":n.t="e",n.v=Kv[e],u.cellText!==!1&&(n.w=e);break;default:e==""&&r==""?n.t="z":(n.t="s",n.v=gv(r||e))}if(_E(n,l,u),u.cellFormula!==!1)if(n.Formula){var g=Mi(n.Formula);g.charCodeAt(0)==61&&(g=g.slice(1)),n.f=ih(g,a),delete n.Formula,n.ArrayRange=="RC"?n.F=ih("RC:RC",a):n.ArrayRange&&(n.F=ih(n.ArrayRange,a),c.push([ea(n.F),n.F]))}else for(d=0;d=c[d][0].s.r&&a.r<=c[d][0].e.r&&a.c>=c[d][0].s.c&&a.c<=c[d][0].e.c&&(n.F=c[d][1]);u.cellStyles&&(f.forEach(function(p){!h.patternType&&p.patternType&&(h.patternType=p.patternType)}),n.s=h),n.StyleID!==void 0&&(n.ixfe=n.StyleID)}function Ry(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,` `).replace(/\r/g,` `),e.v=e.w=e.ixfe=void 0}function fp(e,r){var t=r||{};qA();var n=Yh(w0(e));t.type!="binary"&&t.type!="array"&&t.type!="base64"||(n=ua(n));var a,s=n.slice(0,1024).toLowerCase(),o=!1;if((1023&(s=s.replace(/".*?"/g,"")).indexOf(">"))>Math.min(1023&s.indexOf(","),1023&s.indexOf(";"))){var i=Ra(t);return i.type="string",th.to_workbook(n,i)}if(s.indexOf("=0&&(o=!0)}),o)return function(Z,ce){var ye=Z.match(/[\s\S]*?<\/table>/gi);if(!ye||ye.length==0)throw new Error("Invalid HTML: could not find ");if(ye.length==1)return Kl(Ty(ye[0],ce),ce);var Ve={SheetNames:[],Sheets:{}};return ye.forEach(function(dt,re){Zy(Ve,Ty(dt,ce),"Sheet"+(re+1))}),Ve}(n,t);If={"General Number":"General","General Date":ai[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":ai[15],"Short Date":ai[14],"Long Time":ai[19],"Medium Time":ai[18],"Short Time":ai[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:ai[2],Standard:ai[4],Percent:ai[10],Scientific:ai[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var c,u,l=[],A={},h=[],f=t.dense?[]:{},d="",g={},p={},m=Gc(''),v=0,y=0,I=0,E={s:{r:2e6,c:2e6},e:{r:0,c:0}},k={},R={},T="",j=0,W=[],H={},X={},x=0,N=[],C=[],w={},Q=[],B=!1,S=[],O=[],F={},Y=0,M=0,z={Sheets:[],WBProps:{date1904:!1}},ue={};$h.lastIndex=0,n=n.replace(//gm,"");for(var ae="";a=$h.exec(n);)switch(a[3]=(ae=a[3]).toLowerCase()){case"data":if(ae=="data"){if(a[1]==="/"){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else a[0].charAt(a[0].length-2)!=="/"&&l.push([a[3],!0]);break}if(l[l.length-1][1])break;a[1]==="/"?DE(n.slice(v,a.index),T,m,l[l.length-1][0]=="comment"?w:g,{c:y,r:I},k,Q[y],p,S,t):(T="",m=Gc(a[0]),v=a.index+a[0].length);break;case"cell":if(a[1]==="/")if(C.length>0&&(g.c=C),(!t.sheetRows||t.sheetRows>I)&&g.v!==void 0&&(t.dense?(f[I]||(f[I]=[]),f[I][y]=g):f[Eo(y)+Ho(I)]=g),g.HRef&&(g.l={Target:Mi(g.HRef)},g.HRefScreenTip&&(g.l.Tooltip=g.HRefScreenTip),delete g.HRef,delete g.HRefScreenTip),(g.MergeAcross||g.MergeDown)&&(Y=y+(0|parseInt(g.MergeAcross,10)),M=I+(0|parseInt(g.MergeDown,10)),W.push({s:{c:y,r:I},e:{c:Y,r:M}})),t.sheetStubs)if(g.MergeAcross||g.MergeDown){for(var Ne=y;Ne<=Y;++Ne)for(var Ge=I;Ge<=M;++Ge)(Ne>y||Ge>I)&&(t.dense?(f[Ge]||(f[Ge]=[]),f[Ge][Ne]={t:"z"}):f[Eo(Ne)+Ho(Ge)]={t:"z"});y=Y+1}else++y;else g.MergeAcross?y=Y+1:++y;else(g=xE(a[0])).Index&&(y=+g.Index-1),yE.e.c&&(E.e.c=y),a[0].slice(-2)==="/>"&&++y,C=[];break;case"row":a[1]==="/"||a[0].slice(-2)==="/>"?(IE.e.r&&(E.e.r=I),a[0].slice(-2)==="/>"&&(p=Gc(a[0])).Index&&(I=+p.Index-1),y=0,++I):((p=Gc(a[0])).Index&&(I=+p.Index-1),F={},(p.AutoFitHeight=="0"||p.Height)&&(F.hpx=parseInt(p.Height,10),F.hpt=hf(F.hpx),O[I]=F),p.Hidden=="1"&&(F.hidden=!0,O[I]=F));break;case"worksheet":if(a[1]==="/"){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"));h.push(d),E.s.r<=E.e.r&&E.s.c<=E.e.c&&(f["!ref"]=_i(E),t.sheetRows&&t.sheetRows<=E.e.r&&(f["!fullref"]=f["!ref"],E.e.r=t.sheetRows-1,f["!ref"]=_i(E))),W.length&&(f["!merges"]=W),Q.length>0&&(f["!cols"]=Q),O.length>0&&(f["!rows"]=O),A[d]=f}else E={s:{r:2e6,c:2e6},e:{r:0,c:0}},I=y=0,l.push([a[3],!1]),c=Gc(a[0]),d=Mi(c.Name),f=t.dense?[]:{},W=[],S=[],O=[],ue={name:d,Hidden:0},z.Sheets.push(ue);break;case"table":if(a[1]==="/"){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else{if(a[0].slice(-2)=="/>")break;l.push([a[3],!1]),Q=[],B=!1}break;case"style":a[1]==="/"?Dy(k,R,t):R=Gc(a[0]);break;case"numberformat":R.nf=Mi(Gc(a[0]).Format||"General"),If[R.nf]&&(R.nf=If[R.nf]);for(var Ye=0;Ye!=392&&ai[Ye]!=R.nf;++Ye);if(Ye==392){for(Ye=57;Ye!=392;++Ye)if(ai[Ye]==null){Fu(R.nf,Ye);break}}break;case"column":if(l[l.length-1][0]!=="table")break;if((u=Gc(a[0])).Hidden&&(u.hidden=!0,delete u.Hidden),u.Width&&(u.wpx=parseInt(u.Width,10)),!B&&u.wpx>10){B=!0,ds=Pm;for(var Ae=0;Ae0&&(de.Sheet=z.Sheets.length-1),z.Names.push(de);break;case"namedcell":case"b":case"i":case"u":case"s":case"em":case"h2":case"h3":case"sub":case"sup":case"span":case"alignment":case"borders":case"border":case"protection":case"paragraphs":case"name":case"pixelsperinch":case"null":break;case"font":if(a[0].slice(-2)==="/>")break;a[1]==="/"?T+=n.slice(j,a.index):j=a.index+a[0].length;break;case"interior":if(!t.cellStyles)break;R.Interior=Gc(a[0]);break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if(a[0].slice(-2)==="/>")break;a[1]==="/"?im(H,ae,n.slice(x,a.index)):x=a.index+a[0].length;break;case"styles":case"workbook":if(a[1]==="/"){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else l.push([a[3],!1]);break;case"comment":if(a[1]==="/"){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"));Ry(w),C.push(w)}else l.push([a[3],!1]),w={a:(c=Gc(a[0])).Author};break;case"autofilter":if(a[1]==="/"){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else if(a[0].charAt(a[0].length-2)!=="/"){var Ke=Gc(a[0]);f["!autofilter"]={ref:ih(Ke.Range).replace(/\$/g,"")},l.push([a[3],!0])}break;case"datavalidation":if(a[1]==="/"){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else a[0].charAt(a[0].length-2)!=="/"&&l.push([a[3],!0]);break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if(a[1]==="/"){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else a[0].charAt(a[0].length-2)!=="/"&&l.push([a[3],!0]);break;default:if(l.length==0&&a[3]=="document"||l.length==0&&a[3]=="uof")return zd(n,t);var le=!0;switch(l[l.length-1][0]){case"officedocumentsettings":switch(a[3]){case"allowpng":case"removepersonalinformation":case"downloadcomponents":case"locationofcomponents":case"colors":case"color":case"index":case"rgb":case"targetscreensize":case"readonlyrecommended":break;default:le=!1}break;case"componentoptions":switch(a[3]){case"toolbar":case"hideofficelogo":case"spreadsheetautofit":case"label":case"caption":case"maxheight":case"maxwidth":case"nextsheetnumber":break;default:le=!1}break;case"excelworkbook":switch(a[3]){case"date1904":z.WBProps.date1904=!0;break;case"windowheight":case"windowwidth":case"windowtopx":case"windowtopy":case"tabratio":case"protectstructure":case"protectwindow":case"protectwindows":case"activesheet":case"displayinknotes":case"firstvisiblesheet":case"supbook":case"sheetname":case"sheetindex":case"sheetindexfirst":case"sheetindexlast":case"dll":case"acceptlabelsinformulas":case"donotsavelinkvalues":case"iteration":case"maxiterations":case"maxchange":case"path":case"xct":case"count":case"selectedsheets":case"calculation":case"uncalced":case"startupprompt":case"crn":case"externname":case"formula":case"colfirst":case"collast":case"wantadvise":case"boolean":case"error":case"text":case"ole":case"noautorecover":case"publishobjects":case"donotcalculatebeforesave":case"number":case"refmoder1c1":case"embedsavesmarttags":break;default:le=!1}break;case"workbookoptions":switch(a[3]){case"owcversion":case"height":case"width":break;default:le=!1}break;case"worksheetoptions":switch(a[3]){case"visible":if(a[0].slice(-2)!=="/>")if(a[1]==="/")switch(n.slice(x,a.index)){case"SheetHidden":ue.Hidden=1;break;case"SheetVeryHidden":ue.Hidden=2}else x=a.index+a[0].length;break;case"header":f["!margins"]||iA(f["!margins"]={},"xlml"),isNaN(+ci(a[0]).Margin)||(f["!margins"].header=+ci(a[0]).Margin);break;case"footer":f["!margins"]||iA(f["!margins"]={},"xlml"),isNaN(+ci(a[0]).Margin)||(f["!margins"].footer=+ci(a[0]).Margin);break;case"pagemargins":var Ce=ci(a[0]);f["!margins"]||iA(f["!margins"]={},"xlml"),isNaN(+Ce.Top)||(f["!margins"].top=+Ce.Top),isNaN(+Ce.Left)||(f["!margins"].left=+Ce.Left),isNaN(+Ce.Right)||(f["!margins"].right=+Ce.Right),isNaN(+Ce.Bottom)||(f["!margins"].bottom=+Ce.Bottom);break;case"displayrighttoleft":z.Views||(z.Views=[]),z.Views[0]||(z.Views[0]={}),z.Views[0].RTL=!0;break;case"freezepanes":case"frozennosplit":case"splithorizontal":case"splitvertical":case"donotdisplaygridlines":case"activerow":case"activecol":case"toprowbottompane":case"leftcolumnrightpane":case"unsynced":case"print":case"printerrors":case"panes":case"scale":case"pane":case"number":case"layout":case"pagesetup":case"selected":case"protectobjects":case"enableselection":case"protectscenarios":case"validprinterinfo":case"horizontalresolution":case"verticalresolution":case"numberofcopies":case"activepane":case"toprowvisible":case"leftcolumnvisible":case"fittopage":case"rangeselection":case"papersizeindex":case"pagelayoutzoom":case"pagebreakzoom":case"filteron":case"fitwidth":case"fitheight":case"commentslayout":case"zoom":case"lefttoright":case"gridlines":case"allowsort":case"allowfilter":case"allowinsertrows":case"allowdeleterows":case"allowinsertcols":case"allowdeletecols":case"allowinserthyperlinks":case"allowformatcells":case"allowsizecols":case"allowsizerows":case"tabcolorindex":case"donotdisplayheadings":case"showpagelayoutzoom":case"blackandwhite":case"donotdisplayzeros":case"displaypagebreak":case"rowcolheadings":case"donotdisplayoutline":case"noorientation":case"allowusepivottables":case"zeroheight":case"viewablerange":case"selection":case"protectcontents":break;case"nosummaryrowsbelowdetail":f["!outline"]||(f["!outline"]={}),f["!outline"].above=!0;break;case"nosummarycolumnsrightdetail":f["!outline"]||(f["!outline"]={}),f["!outline"].left=!0;break;default:le=!1}break;case"pivottable":case"pivotcache":switch(a[3]){case"immediateitemsondrop":case"showpagemultipleitemlabel":case"compactrowindent":case"location":case"pivotfield":case"orientation":case"layoutform":case"layoutsubtotallocation":case"layoutcompactrow":case"position":case"pivotitem":case"datatype":case"datafield":case"sourcename":case"parentfield":case"ptlineitems":case"ptlineitem":case"countofsameitems":case"item":case"itemtype":case"ptsource":case"cacheindex":case"consolidationreference":case"filename":case"reference":case"nocolumngrand":case"norowgrand":case"blanklineafteritems":case"hidden":case"subtotal":case"basefield":case"mapchilditems":case"function":case"refreshonfileopen":case"printsettitles":case"mergelabels":case"defaultversion":case"refreshname":case"refreshdate":case"refreshdatecopy":case"versionlastrefresh":case"versionlastupdate":case"versionupdateablemin":case"versionrefreshablemin":case"calculation":break;default:le=!1}break;case"pagebreaks":switch(a[3]){case"colbreaks":case"colbreak":case"rowbreaks":case"rowbreak":case"colstart":case"colend":case"rowend":break;default:le=!1}break;case"autofilter":switch(a[3]){case"autofiltercolumn":case"autofiltercondition":case"autofilterand":case"autofilteror":break;default:le=!1}break;case"querytable":switch(a[3]){case"id":case"autoformatfont":case"autoformatpattern":case"querysource":case"querytype":case"enableredirections":case"refreshedinxl9":case"urlstring":case"htmltables":case"connection":case"commandtext":case"refreshinfo":case"notitles":case"nextid":case"columninfo":case"overwritecells":case"donotpromptforfile":case"textwizardsettings":case"source":case"number":case"decimal":case"thousandseparator":case"trailingminusnumbers":case"formatsettings":case"fieldtype":case"delimiters":case"tab":case"comma":case"autoformatname":case"versionlastedit":case"versionlastrefresh":break;default:le=!1}break;case"datavalidation":switch(a[3]){case"range":case"type":case"min":case"max":case"sort":case"descending":case"order":case"casesensitive":case"value":case"errorstyle":case"errormessage":case"errortitle":case"inputmessage":case"inputtitle":case"combohide":case"inputhide":case"condition":case"qualifier":case"useblank":case"value1":case"value2":case"format":case"cellrangelist":break;default:le=!1}break;case"sorting":case"conditionalformatting":switch(a[3]){case"range":case"type":case"min":case"max":case"sort":case"descending":case"order":case"casesensitive":case"value":case"errorstyle":case"errormessage":case"errortitle":case"cellrangelist":case"inputmessage":case"inputtitle":case"combohide":case"inputhide":case"condition":case"qualifier":case"useblank":case"value1":case"value2":case"format":break;default:le=!1}break;case"mapinfo":case"schema":case"data":switch(a[3]){case"map":case"entry":case"range":case"xpath":case"field":case"xsdtype":case"filteron":case"aggregate":case"elementtype":case"attributetype":case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":case"row":break;default:le=!1}break;case"smarttags":break;default:le=!1}if(le||a[3].match(/!\[CDATA/))break;if(!l[l.length-1][1])throw"Unrecognized tag: "+a[3]+"|"+l.join("|");if(l[l.length-1][0]==="customdocumentproperties"){if(a[0].slice(-2)==="/>")break;a[1]==="/"?SE(X,ae,N,n.slice(x,a.index)):(N=a,x=a.index+a[0].length);break}if(t.WTF)throw"Unrecognized tag: "+a[3]+"|"+l.join("|")}var At={};return t.bookSheets||t.bookProps||(At.Sheets=A),At.SheetNames=h,At.Workbook=z,At.SSF=Ra(ai),At.Props=H,At.Custprops=X,At}function bf(e,r){switch(Cp(r=r||{}),r.type||"base64"){case"base64":return fp($s(e),r);case"binary":case"buffer":case"file":return fp(e,r);case"array":return fp(Du(e),r)}}function dp(e,r){var t=[];return e.Props&&t.push(function(n,a){var s=[];return za(j0).map(function(o){for(var i=0;i'+i.join("")+""}(e.Props,e.Custprops)),t.join("")}function Wd(e){return Zr("NamedRange",null,{"ss:Name":e.Name,"ss:RefersTo":"="+ip(e.Ref,{r:0,c:0})})}function Fy(e,r,t,n,a,s,o){if(!e||e.v==null&&e.f==null)return"";var i={};if(e.f&&(i["ss:Formula"]="="+ca(ip(e.f,o))),e.F&&e.F.slice(0,r.length)==r){var c=Do(e.F.slice(r.length+1));i["ss:ArrayRange"]="RC:R"+(c.r==o.r?"":"["+(c.r-o.r)+"]")+"C"+(c.c==o.c?"":"["+(c.c-o.c)+"]")}if(e.l&&e.l.Target&&(i["ss:HRef"]=ca(e.l.Target),e.l.Tooltip&&(i["x:HRefScreenTip"]=ca(e.l.Tooltip))),t["!merges"])for(var u=t["!merges"],l=0;l!=u.length;++l)u[l].s.c==o.c&&u[l].s.r==o.r&&(u[l].e.c>u[l].s.c&&(i["ss:MergeAcross"]=u[l].e.c-u[l].s.c),u[l].e.r>u[l].s.r&&(i["ss:MergeDown"]=u[l].e.r-u[l].s.r));var A="",h="";switch(e.t){case"z":if(!n.sheetStubs)return"";break;case"n":A="Number",h=String(e.v);break;case"b":A="Boolean",h=e.v?"1":"0";break;case"e":A="Error",h=Lu[e.v];break;case"d":A="DateTime",h=new Date(e.v).toISOString(),e.z==null&&(e.z=e.z||ai[14]);break;case"s":A="String",h=((e.v||"")+"").replace(b0,function(p){return I0[p]}).replace(dv,function(p){return"&#x"+p.charCodeAt(0).toString(16).toUpperCase()+";"})}var f=vl(n.cellXfs,e,n);i["ss:StyleID"]="s"+(21+f),i["ss:Index"]=o.c+1;var d=e.v!=null?h:"",g=e.t=="z"?"":''+d+"";return(e.c||[]).length>0&&(g+=e.c.map(function(p){var m=Zr("ss:Data",(p.t||"").replace(/(\r\n|[\r\n])/g," "),{xmlns:"http://www.w3.org/TR/REC-html40"});return Zr("Comment",m,{"ss:Author":p.a})}).join("")),Zr("Cell",g,i)}function Ny(e,r){var t='"}function RE(e,r,t){var n=[],a=t.SheetNames[e],s=t.Sheets[a],o=s?function(i,c,u,l){if(!i||!((l||{}).Workbook||{}).Names)return"";for(var A=l.Workbook.Names,h=[],f=0;f0&&n.push(""+o+""),o=s?function(i,c,u,l){if(!i["!ref"])return"";var A=ea(i["!ref"]),h=i["!merges"]||[],f=0,d=[];i["!cols"]&&i["!cols"].forEach(function(R,T){dl(R);var j=!!R.width,W=qd(T,R),H={"ss:Index":T+1};j&&(H["ss:Width"]=Af(W.width)),R.hidden&&(H["ss:Hidden"]="1"),d.push(Zr("Column",null,H))});for(var g=Array.isArray(i),p=A.s.r;p<=A.e.r;++p){for(var m=[Ny(p,(i["!rows"]||[])[p])],v=A.s.c;v<=A.e.c;++v){var y=!1;for(f=0;f!=h.length;++f)if(!(h[f].s.c>v||h[f].s.r>p||h[f].e.c"),m.length>2&&d.push(m.join(""))}return d.join("")}(s,r):"",o.length>0&&n.push("
"+o+"
"),n.push(function(i,c,u,l){if(!i)return"";var A=[];if(i["!margins"]&&(A.push(""),i["!margins"].header&&A.push(Zr("Header",null,{"x:Margin":i["!margins"].header})),i["!margins"].footer&&A.push(Zr("Footer",null,{"x:Margin":i["!margins"].footer})),A.push(Zr("PageMargins",null,{"x:Bottom":i["!margins"].bottom||"0.75","x:Left":i["!margins"].left||"0.7","x:Right":i["!margins"].right||"0.7","x:Top":i["!margins"].top||"0.75"})),A.push("")),l&&l.Workbook&&l.Workbook.Sheets&&l.Workbook.Sheets[u])if(l.Workbook.Sheets[u].Hidden)A.push(Zr("Visible",l.Workbook.Sheets[u].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var h=0;h")}return((((l||{}).Workbook||{}).Views||[])[0]||{}).RTL&&A.push(""),i["!protect"]&&(A.push(Xo("ProtectContents","True")),i["!protect"].objects&&A.push(Xo("ProtectObjects","True")),i["!protect"].scenarios&&A.push(Xo("ProtectScenarios","True")),i["!protect"].selectLockedCells==null||i["!protect"].selectLockedCells?i["!protect"].selectUnlockedCells==null||i["!protect"].selectUnlockedCells||A.push(Xo("EnableSelection","UnlockedCells")):A.push(Xo("EnableSelection","NoSelection")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(f){i["!protect"][f[0]]&&A.push("<"+f[1]+"/>")})),A.length==0?"":Zr("WorksheetOptions",A.join(""),{xmlns:nc.x})}(s,0,e,t)),n.join("")}function Gu(e,r){r||(r={}),e.SSF||(e.SSF=Ra(ai)),e.SSF&&(qA(),Id(e.SSF),r.revssf=Cd(e.SSF),r.revssf[e.SSF[65535]]=0,r.ssf=e.SSF,r.cellXfs=[],vl(r.cellXfs,{},{revssf:{General:0}}));var t=[];t.push(dp(e,r)),t.push(""),t.push(""),t.push("");for(var n=0;n'];return s.cellXfs.forEach(function(i,c){var u=[];u.push(Zr("NumberFormat",null,{"ss:Format":ca(ai[i.numFmtId])}));var l={"ss:ID":"s"+(21+c)};o.push(Zr("Style",u.join(""),l))}),Zr("Styles",o.join(""))}(0,r),t[3]=function(a){if(!((a||{}).Workbook||{}).Names)return"";for(var s=a.Workbook.Names,o=[],i=0;i40?r:(t.l-=4,r.Reserved1=t.read_shift(0,"lpstr-ansi"),t.length-t.l<=4||(n=t.read_shift(4))!==1907505652?r:(r.UnicodeClipboardFormat=function(a){return M0(a,2)}(t),(n=t.read_shift(4))==0||n>40?r:(t.l-=4,void(r.Reserved2=t.read_shift(0,"lpwstr")))))}var NE=[60,1084,2066,2165,2175];function ME(e,r,t,n,a){var s=n,o=[],i=t.slice(t.l,t.l+s);if(a&&a.enc&&a.enc.insitu&&i.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:case 133:break;default:a.enc.insitu(i)}o.push(i),t.l+=s;for(var c=ou(t,t.l),u=pp[c],l=0;u!=null&&NE.indexOf(c)>-1;)s=ou(t,t.l+2),l=t.l+4,c==2066?l+=4:c!=2165&&c!=2175||(l+=12),i=t.slice(l,t.l+4+s),o.push(i),t.l+=4+s,u=pp[c=ou(t,t.l)];var A=jo(o);$o(A,0);var h=0;A.lens=[];for(var f=0;f1||pe.sheetRows&&Me.r>=pe.sheetRows)){if(pe.cellStyles&&yt.XF&&yt.XF.data&&function(Re,Ze,ke){var Pe,_e=Ze.XF.data;_e&&_e.patternType&&ke&&ke.cellStyles&&(Ze.s={},Ze.s.patternType=_e.patternType,(Pe=lf(W(_e.icvFore)))&&(Ze.s.fgColor={rgb:Pe}),(Pe=lf(W(_e.icvBack)))&&(Ze.s.bgColor={rgb:Pe}))}(0,yt,pe),delete yt.ixfe,delete yt.XF,t=Me,y=In(Me),d&&d.s&&d.e||(d={s:{r:0,c:0},e:{r:0,c:0}}),Me.rd.e.r&&(d.e.r=Me.r+1),Me.c+1>d.e.c&&(d.e.c=Me.c+1),pe.cellFormula&&yt.f){for(var me=0;meMe.c||E[me][0].s.r>Me.r||E[me][0].e.c>8)!==Ne)throw new Error("rt mismatch: "+Ae+"!="+Ne);Ye.r==12&&(e.l+=10,Ge-=10)}var te={};if(te=Ne===10?Ye.f(e,Ge,X):ME(Ne,Ye,e,Ge,X),F==0&&[9,521,1033,2057].indexOf(O)===-1)continue;switch(Ne){case 34:l.opts.Date1904=T.WBProps.date1904=te;break;case 134:l.opts.WriteProtect=!0;break;case 47:if(X.enc||(e.l=0),X.enc=te,!r.password)throw new Error("File is password-protected");if(te.valid==null)throw new Error("Encryption scheme unsupported");if(!te.valid)throw new Error("Password is incorrect");break;case 92:X.lastuser=te;break;case 66:var he=Number(te);switch(he){case 21010:he=1200;break;case 32768:he=1e4;break;case 32769:he=1252}Mc(X.codepage=he),ue=!0;break;case 317:X.rrtabid=te;break;case 25:X.winlocked=te;break;case 439:l.opts.RefreshAll=te;break;case 12:l.opts.CalcCount=te;break;case 16:l.opts.CalcDelta=te;break;case 17:l.opts.CalcIter=te;break;case 13:l.opts.CalcMode=te;break;case 14:l.opts.CalcPrecision=te;break;case 95:l.opts.CalcSaveRecalc=te;break;case 15:X.CalcRefMode=te;break;case 2211:l.opts.FullCalc=te;break;case 129:te.fDialog&&(h["!type"]="dialog"),te.fBelow||((h["!outline"]||(h["!outline"]={})).above=!0),te.fRight||((h["!outline"]||(h["!outline"]={})).left=!0);break;case 224:k.push(te);break;case 430:B.push([te]),B[B.length-1].XTI=[];break;case 35:case 547:B[B.length-1].push(te);break;case 24:case 536:S={Name:te.Name,Ref:gs(te.rgce,0,null,B,X)},te.itab>0&&(S.Sheet=te.itab-1),B.names.push(S),B[0]||(B[0]=[],B[0].XTI=[]),B[B.length-1].push(te),te.Name=="_xlnm._FilterDatabase"&&te.itab>0&&te.rgce&&te.rgce[0]&&te.rgce[0][0]&&te.rgce[0][0][0]=="PtgArea3d"&&(z[te.itab-1]={ref:_i(te.rgce[0][0][1][2])});break;case 22:X.ExternCount=te;break;case 23:B.length==0&&(B[0]=[],B[0].XTI=[]),B[B.length-1].XTI=B[B.length-1].XTI.concat(te),B.XTI=B.XTI.concat(te);break;case 2196:if(X.biff<8)break;S!=null&&(S.Comment=te[1]);break;case 18:h["!protect"]=te;break;case 19:te!==0&&X.WTF&&console.error("Password verifier: "+te);break;case 133:f[te.pos]=te,X.snames.push(te.name);break;case 10:if(--F)break;if(d.e){if(d.e.r>0&&d.e.c>0){if(d.e.r--,d.e.c--,h["!ref"]=_i(d),r.sheetRows&&r.sheetRows<=d.e.r){var de=d.e.r;d.e.r=r.sheetRows-1,h["!fullref"]=h["!ref"],h["!ref"]=_i(d),d.e.r=de}d.e.r++,d.e.c++}x.length>0&&(h["!merges"]=x),N.length>0&&(h["!objects"]=N),C.length>0&&(h["!cols"]=C),w.length>0&&(h["!rows"]=w),T.Sheets.push(j)}m===""?v=h:A[m]=h,h=r.dense?[]:{};break;case 9:case 521:case 1033:case 2057:if(X.biff===8&&(X.biff={9:2,521:3,1033:4}[Ne]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[te.BIFFVer]||8),X.biffguess=te.BIFFVer==0,te.BIFFVer==0&&te.dt==4096&&(X.biff=5,ue=!0,Mc(X.codepage=28591)),X.biff==8&&te.BIFFVer==0&&te.dt==16&&(X.biff=2),F++)break;if(h=r.dense?[]:{},X.biff<8&&!ue&&(ue=!0,Mc(X.codepage=r.codepage||1252)),X.biff<5||te.BIFFVer==0&&te.dt==4096){m===""&&(m="Sheet1"),d={s:{r:0,c:0},e:{r:0,c:0}};var Ke={pos:e.l-Ge,name:m};f[Ke.pos]=Ke,X.snames.push(m)}else m=(f[ae]||{name:""}).name;te.dt==32&&(h["!type"]="chart"),te.dt==64&&(h["!type"]="macro"),x=[],N=[],X.arrayf=E=[],C=[],w=[],Q=!1,j={Hidden:(f[ae]||{hs:0}).hs,name:m};break;case 515:case 3:case 2:h["!type"]=="chart"&&(r.dense?(h[te.r]||[])[te.c]:h[In({c:te.c,r:te.r})])&&++te.c,i={ixfe:te.ixfe,XF:k[te.ixfe]||{},v:te.val,t:"n"},Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H({c:te.c,r:te.r},i,r);break;case 5:case 517:i={ixfe:te.ixfe,XF:k[te.ixfe],v:te.val,t:te.t},Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H({c:te.c,r:te.r},i,r);break;case 638:i={ixfe:te.ixfe,XF:k[te.ixfe],v:te.rknum,t:"n"},Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H({c:te.c,r:te.r},i,r);break;case 189:for(var le=te.c;le<=te.C;++le){var Ce=te.rkrec[le-te.c][0];i={ixfe:Ce,XF:k[Ce],v:te.rkrec[le-te.c][1],t:"n"},Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H({c:le,r:te.r},i,r)}break;case 6:case 518:case 1030:if(te.val=="String"){g=te;break}if((i=Kd(te.val,te.cell.ixfe,te.tt)).XF=k[i.ixfe],r.cellFormula){var At=te.formula;if(At&&At[0]&&At[0][0]&&At[0][0][0]=="PtgExp"){var Z=At[0][0][1][0],ce=At[0][0][1][1],ye=In({r:Z,c:ce});I[ye]?i.f=""+gs(te.formula,0,te.cell,B,X):i.F=((r.dense?(h[Z]||[])[ce]:h[ye])||{}).F}else i.f=""+gs(te.formula,0,te.cell,B,X)}Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H(te.cell,i,r),g=te;break;case 7:case 519:if(!g)throw new Error("String record expects Formula");g.val=te,(i=Kd(te,g.cell.ixfe,"s")).XF=k[i.ixfe],r.cellFormula&&(i.f=""+gs(g.formula,0,g.cell,B,X)),Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H(g.cell,i,r),g=null;break;case 33:case 545:E.push(te);var Ve=In(te[0].s);if(n=r.dense?(h[te[0].s.r]||[])[te[0].s.c]:h[Ve],r.cellFormula&&n){if(!g||!Ve||!n)break;n.f=""+gs(te[1],0,te[0],B,X),n.F=_i(te[0])}break;case 1212:if(!r.cellFormula)break;if(y){if(!g)break;I[In(g.cell)]=te[0],((n=r.dense?(h[g.cell.r]||[])[g.cell.c]:h[In(g.cell)])||{}).f=""+gs(te[0],0,t,B,X)}break;case 253:i=Kd(p[te.isst].t,te.ixfe,"s"),p[te.isst].h&&(i.h=p[te.isst].h),i.XF=k[i.ixfe],Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H({c:te.c,r:te.r},i,r);break;case 513:r.sheetStubs&&(i={ixfe:te.ixfe,XF:k[te.ixfe],t:"z"},Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H({c:te.c,r:te.r},i,r));break;case 190:if(r.sheetStubs)for(var dt=te.c;dt<=te.C;++dt){var re=te.ixfe[dt-te.c];i={ixfe:re,XF:k[re],t:"z"},Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H({c:dt,r:te.r},i,r)}break;case 214:case 516:case 4:(i=Kd(te.val,te.ixfe,"s")).XF=k[i.ixfe],Y>0&&(i.z=M[i.ixfe>>8&63]),Uc(i,r,l.opts.Date1904),H({c:te.c,r:te.r},i,r);break;case 0:case 512:F===1&&(d=te);break;case 252:p=te;break;case 1054:if(X.biff==4){M[Y++]=te[1];for(var ot=0;ot=163&&Fu(te[1],Y+163)}else Fu(te[1],te[0]);break;case 30:M[Y++]=te;for(var pt=0;pt=163&&Fu(te,Y+163);break;case 229:x=x.concat(te);break;case 93:N[te.cmo[0]]=X.lastobj=te;break;case 438:X.lastobj.TxO=te;break;case 127:X.lastobj.ImData=te;break;case 440:for(o=te[0].s.r;o<=te[0].e.r;++o)for(s=te[0].s.c;s<=te[0].e.c;++s)(n=r.dense?(h[o]||[])[s]:h[In({c:s,r:o})])&&(n.l=te[1]);break;case 2048:for(o=te[0].s.r;o<=te[0].e.r;++o)for(s=te[0].s.c;s<=te[0].e.c;++s)(n=r.dense?(h[o]||[])[s]:h[In({c:s,r:o})])&&n.l&&(n.l.Tooltip=te[1]);break;case 28:if(X.biff<=5&&X.biff>=2)break;n=r.dense?(h[te[0].r]||[])[te[0].c]:h[In(te[0])];var Be=N[te[2]];n||(r.dense?(h[te[0].r]||(h[te[0].r]=[]),n=h[te[0].r][te[0].c]={t:"z"}):n=h[In(te[0])]={t:"z"},d.e.r=Math.max(d.e.r,te[0].r),d.s.r=Math.min(d.s.r,te[0].r),d.e.c=Math.max(d.e.c,te[0].c),d.s.c=Math.min(d.s.c,te[0].c)),n.c||(n.c=[]),a={a:te[1],t:Be.TxO.t},n.c.push(a);break;case 2173:k[te.ixfe],te.ext.forEach(function(Me){Me[0]});break;case 125:if(!X.cellStyles)break;for(;te.e>=te.s;)C[te.e--]={width:te.w/256,level:te.level||0,hidden:!!(1&te.flags)},Q||(Q=!0,Ld(te.w/256)),dl(C[te.e+1]);break;case 520:var Ee={};te.level!=null&&(w[te.r]=Ee,Ee.level=te.level),te.hidden&&(w[te.r]=Ee,Ee.hidden=!0),te.hpt&&(w[te.r]=Ee,Ee.hpt=te.hpt,Ee.hpx=gl(te.hpt));break;case 38:case 39:case 40:case 41:h["!margins"]||iA(h["!margins"]={}),h["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[Ne]]=te;break;case 161:h["!margins"]||iA(h["!margins"]={}),h["!margins"].header=te.header,h["!margins"].footer=te.footer;break;case 574:te.RTL&&(T.Views[0].RTL=!0);break;case 146:R=te;break;case 2198:u=te;break;case 140:c=te;break;case 442:m?j.CodeName=te||j.name:T.WBProps.CodeName=te||"ThisWorkbook"}}else Ye||console.error("Missing Info for XLS Record 0x"+Ne.toString(16)),e.l+=Ge}return l.SheetNames=za(f).sort(function(Me,yt){return Number(Me)-Number(yt)}).map(function(Me){return f[Me].name}),r.bookSheets||(l.Sheets=A),!l.SheetNames.length&&v["!ref"]?(l.SheetNames.push("Sheet1"),l.Sheets&&(l.Sheets.Sheet1=v)):l.Preamble=v,l.Sheets&&z.forEach(function(Me,yt){l.Sheets[l.SheetNames[yt]]["!autofilter"]=Me}),l.Strings=p,l.SSF=Ra(ai),X.enc&&(l.Encryption=X.enc),u&&(l.Themes=u),l.Metadata={},c!==void 0&&(l.Metadata.Country=c),B.names.length>0&&(T.Names=B.names),l.Workbook=T,l}var Cf={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function gp(e,r){var t,n,a,s;if(r||(r={}),Cp(r),c0(),r.codepage&&HA(r.codepage),e.FullPaths){if(Pn.find(e,"/encryption"))throw new Error("File is password-protected");t=Pn.find(e,"!CompObj"),n=Pn.find(e,"/Workbook")||Pn.find(e,"/Book")}else{switch(r.type){case"base64":e=ec($s(e));break;case"binary":e=ec(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e))}$o(e,0),n={content:e}}if(t&&FE(t),r.bookProps&&!r.bookSheets)a={};else{var o=wi?"buffer":"array";if(n&&n.content)a=TE(n.content,r);else if((s=Pn.find(e,"PerfectOffice_MAIN"))&&s.content)a=nA.to_workbook(s.content,(r.type=o,r));else{if(!(s=Pn.find(e,"NativeContent_MAIN"))||!s.content)throw(s=Pn.find(e,"MN0"))&&s.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");a=nA.to_workbook(s.content,(r.type=o,r))}r.bookVBA&&e.FullPaths&&Pn.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(a.vbaraw=function(c){var u=Pn.utils.cfb_new({root:"R"});return c.FullPaths.forEach(function(l,A){if(l.slice(-1)!=="/"&&l.match(/_VBA_PROJECT_CUR/)){var h=l.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");Pn.utils.cfb_add(u,h,c.FileIndex[A].content)}}),Pn.write(u)}(e))}var i={};return e.FullPaths&&function(c,u,l){var A=Pn.find(c,"/!DocumentSummaryInformation");if(A&&A.size>0)try{var h=fm(A,L0,Cf.DSI);for(var f in h)u[f]=h[f]}catch(m){if(l.WTF)throw m}var d=Pn.find(c,"/!SummaryInformation");if(d&&d.size>0)try{var g=fm(d,O0,Cf.SI);for(var p in g)u[p]==null&&(u[p]=g[p])}catch(m){if(l.WTF)throw m}u.HeadingPairs&&u.TitlesOfParts&&(tm(u.HeadingPairs,u.TitlesOfParts,u,l),delete u.HeadingPairs,delete u.TitlesOfParts)}(e,i,r),a.Props=a.Custprops=i,r.bookFiles&&(a.cfb=e),a}function LE(e,r){var t=r||{},n=Pn.utils.cfb_new({root:"R"}),a="/Workbook";switch(t.bookType||"xls"){case"xls":t.bookType="biff8";case"xla":t.bookType||(t.bookType="xla");case"biff8":a="/Workbook",t.biff=8;break;case"biff5":a="/Book",t.biff=5;break;default:throw new Error("invalid type "+t.bookType+" for XLS CFB")}return Pn.utils.cfb_add(n,a,My(e,t)),t.biff==8&&(e.Props||e.Custprops)&&function(s,o){var i,c=[],u=[],l=[],A=0,h=rv(L0,"n"),f=rv(O0,"n");if(s.Props)for(i=za(s.Props),A=0;A-1||em.indexOf(l[A][0])>-1||l[A][1]!=null&&d.push(l[A]);u.length&&Pn.utils.cfb_add(o,"/SummaryInformation",q0(u,Cf.SI,f,O0)),(c.length||d.length)&&Pn.utils.cfb_add(o,"/DocumentSummaryInformation",q0(c,Cf.DSI,h,L0,d.length?d:null,Cf.UDI))}(e,n),t.biff==8&&e.vbaraw&&function(s,o){o.FullPaths.forEach(function(i,c){if(c!=0){var u=i.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");u.slice(-1)!=="/"&&Pn.utils.cfb_add(s,u,o.FileIndex[c].content)}})}(n,Pn.read(e.vbaraw,{type:typeof e.vbaraw=="string"?"binary":"buffer"})),n}var Ef={0:{f:function(e,r){var t={},n=e.l+r;t.r=e.read_shift(4),e.l+=4;var a=e.read_shift(2);e.l+=1;var s=e.read_shift(1);return e.l=n,7&s&&(t.level=7&s),16&s&&(t.hidden=!0),32&s&&(t.hpt=a/20),t}},1:{f:function(e){return[pc(e)]}},2:{f:function(e){return[pc(e),F0(e),"n"]}},3:{f:function(e){return[pc(e),e.read_shift(1),"e"]}},4:{f:function(e){return[pc(e),e.read_shift(1),"b"]}},5:{f:function(e){return[pc(e),hs(e),"n"]}},6:{f:function(e){return[pc(e),As(e),"str"]}},7:{f:function(e){return[pc(e),e.read_shift(4),"s"]}},8:{f:function(e,r,t){var n=e.l+r,a=pc(e);a.r=t["!row"];var s=[a,As(e),"str"];if(t.cellFormula){e.l+=2;var o=Jd(e,n-e.l,t);s[3]=gs(o,0,a,t.supbooks,t)}else e.l=n;return s}},9:{f:function(e,r,t){var n=e.l+r,a=pc(e);a.r=t["!row"];var s=[a,hs(e),"n"];if(t.cellFormula){e.l+=2;var o=Jd(e,n-e.l,t);s[3]=gs(o,0,a,t.supbooks,t)}else e.l=n;return s}},10:{f:function(e,r,t){var n=e.l+r,a=pc(e);a.r=t["!row"];var s=[a,e.read_shift(1),"b"];if(t.cellFormula){e.l+=2;var o=Jd(e,n-e.l,t);s[3]=gs(o,0,a,t.supbooks,t)}else e.l=n;return s}},11:{f:function(e,r,t){var n=e.l+r,a=pc(e);a.r=t["!row"];var s=[a,e.read_shift(1),"e"];if(t.cellFormula){e.l+=2;var o=Jd(e,n-e.l,t);s[3]=gs(o,0,a,t.supbooks,t)}else e.l=n;return s}},12:{f:function(e){return[hl(e)]}},13:{f:function(e){return[hl(e),F0(e),"n"]}},14:{f:function(e){return[hl(e),e.read_shift(1),"e"]}},15:{f:function(e){return[hl(e),e.read_shift(1),"b"]}},16:{f:py},17:{f:function(e){return[hl(e),As(e),"str"]}},18:{f:function(e){return[hl(e),e.read_shift(4),"s"]}},19:{f:x0},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:function(e,r,t){var n=e.l+r;e.l+=4,e.l+=1;var a=e.read_shift(4),s=bb(e),o=HC(e,0,t),i=_0(e);e.l=n;var c={Name:s,Ptg:o};return a<268435455&&(c.Sheet=a),i&&(c.Comment=i),c}},40:{},42:{},43:{f:function(e,r,t){var n={};n.sz=e.read_shift(2)/20;var a=function(c){var u=c.read_shift(1);return c.l++,{fBold:1&u,fItalic:2&u,fUnderline:4&u,fStrikeout:8&u,fOutline:16&u,fShadow:32&u,fCondense:64&u,fExtend:128&u}}(e);switch(a.fItalic&&(n.italic=1),a.fCondense&&(n.condense=1),a.fExtend&&(n.extend=1),a.fShadow&&(n.shadow=1),a.fOutline&&(n.outline=1),a.fStrikeout&&(n.strike=1),e.read_shift(2)===700&&(n.bold=1),e.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript"}var s=e.read_shift(1);s!=0&&(n.underline=s);var o=e.read_shift(1);o>0&&(n.family=o);var i=e.read_shift(1);switch(i>0&&(n.charset=i),e.l++,n.color=function(c){var u={},l=c.read_shift(1)>>>1,A=c.read_shift(1),h=c.read_shift(2,"i"),f=c.read_shift(1),d=c.read_shift(1),g=c.read_shift(1);switch(c.l++,l){case 0:u.auto=1;break;case 1:u.index=A;var p=VA[A];p&&(u.rgb=lf(p));break;case 2:u.rgb=lf([f,d,g]);break;case 3:u.theme=A}return h!=0&&(u.tint=h>0?h/32767:h/32768),u}(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor"}return n.name=As(e),n}},44:{f:function(e,r){return[e.read_shift(2),As(e)]}},45:{f:AC},46:{f:jm},47:{f:function(e,r){var t=e.l+r,n=e.read_shift(2),a=e.read_shift(2);return e.l=t,{ixfe:n,numFmtId:a}}},48:{},49:{f:function(e){return e.read_shift(4,"i")}},50:{},51:{f:function(e){for(var r=[],t=e.read_shift(4);t-- >0;)r.push([e.read_shift(4),e.read_shift(4)]);return r}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:Dm},62:{f:function(e){return[pc(e),x0(e),"is"]}},63:{f:function(e){var r={};r.i=e.read_shift(4);var t={};t.r=e.read_shift(4),t.c=e.read_shift(4),r.r=In(t);var n=e.read_shift(1);return 2&n&&(r.l="1"),8&n&&(r.a="1"),r}},64:{f:function(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:ls,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function(e){var r=e.read_shift(2);return e.l+=28,{RTL:32&r}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function(e,r){var t={},n=e[e.l];return++e.l,t.above=!(64&n),t.left=!(128&n),e.l+=18,t.name=Ib(e),t}},148:{f:nE,p:16},151:{f:function(){}},152:{},153:{f:function(e,r){var t={},n=e.read_shift(4);t.defaultThemeVersion=e.read_shift(4);var a=r>8?As(e):"";return a.length>0&&(t.CodeName=a),t.autoCompressPictures=!!(65536&n),t.backupFile=!!(64&n),t.checkCompatibility=!!(4096&n),t.date1904=!!(1&n),t.filterPrivacy=!!(8&n),t.hidePivotFieldList=!!(1024&n),t.promptedSolutions=!!(16&n),t.publishItems=!!(2048&n),t.refreshAllConnections=!!(262144&n),t.saveExternalLinkValues=!!(128&n),t.showBorderUnselectedTables=!!(4&n),t.showInkAnnotation=!!(32&n),t.showObjects=["all","placeholders","none"][n>>13&3],t.showPivotChartFilter=!!(32768&n),t.updateLinks=["userSet","never","always"][n>>8&3],t}},154:{},155:{},156:{f:function(e,r){var t={};return t.Hidden=e.read_shift(4),t.iTabID=e.read_shift(4),t.strRelID=D0(e),t.name=As(e),t}},157:{},158:{},159:{T:1,f:function(e){return[e.read_shift(4),e.read_shift(4)]}},160:{T:-1},161:{T:1,f:Vl},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:aE},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function(e,r){return{flags:e.read_shift(4),version:e.read_shift(4),name:As(e)}}},336:{T:-1},337:{f:function(e){return e.l+=4,e.read_shift(4)!=0},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:D0},357:{},358:{},359:{},360:{T:1},361:{},362:{f:Sm},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function(e,r,t){var n=e.l+r,a=Yv(e),s=e.read_shift(1),o=[a];if(o[2]=s,t.cellFormula){var i=jC(e,n-e.l,t);o[1]=i}else e.l=n;return o}},427:{f:function(e,r,t){var n=e.l+r,a=[Vl(e)];if(t.cellFormula){var s=YC(e,n-e.l,t);a[1]=s,e.l=n}else e.l=n;return a}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function(e){var r={};return vy.forEach(function(t){r[t]=hs(e)}),r}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function(e,r){var t=e.l+r,n=Vl(e),a=_0(e),s=As(e),o=As(e),i=As(e);e.l=t;var c={rfx:n,relId:a,loc:s,display:i};return o&&(c.Tooltip=o),c}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:D0},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:BC},633:{T:1},634:{T:-1},635:{T:1,f:function(e){var r={};r.iauthor=e.read_shift(4);var t=Vl(e);return r.rfx=t.s,r.ref=In(t.s),e.l+=16,r}},636:{T:-1},637:{f:S0},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function(e,r){return e.l+=10,{name:As(e)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},pp={6:{f:sp},10:{f:Ou},12:{f:wo},13:{f:wo},14:{f:go},15:{f:go},16:{f:hs},17:{f:go},18:{f:go},19:{f:wo},20:{f:Qm},21:{f:Qm},23:{f:Sm},24:{f:xm},25:{f:go},26:{},27:{},28:{f:function(e,r,t){return function(n,a,s){if(!(s.biff<8)){var o=n.read_shift(2),i=n.read_shift(2),c=n.read_shift(2),u=n.read_shift(2),l=tA(n,0,s);return s.biff<8&&n.read_shift(1),[{r:o,c:i},l,u,c]}}(e,0,t)}},29:{},34:{f:go},35:{f:km},38:{f:hs},39:{f:hs},40:{f:hs},41:{f:hs},42:{f:go},43:{f:go},47:{f:function(e,r,t){var n={Type:t.biff>=8?e.read_shift(2):0};return n.Type?iC(e,r-2,n):function(a,s,o,i){var c={key:wo(a),verificationBytes:wo(a)};o.password&&(c.verifier=Nd(o.password)),i.valid=c.verificationBytes===c.verifier,i.valid&&(i.insitu=nC(o.password))}(e,t.biff,t,n),n}},49:{f:function(e,r,t){var n={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(t&&t.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10}return n.name=$A(e,0,t),n}},51:{f:wo},60:{},61:{f:function(e){return{Pos:[e.read_shift(2),e.read_shift(2)],Dim:[e.read_shift(2),e.read_shift(2)],Flags:e.read_shift(2),CurTab:e.read_shift(2),FirstTab:e.read_shift(2),Selected:e.read_shift(2),TabRatio:e.read_shift(2)}}},64:{f:go},65:{f:function(){}},66:{f:wo},77:{},80:{},81:{},82:{},85:{f:wo},89:{},90:{},91:{},92:{f:function(e,r,t){if(t.enc)return e.l+=r,"";var n=e.l,a=tA(e,0,t);return e.read_shift(r+n-e.l),a}},93:{f:function(e,r,t){if(t&&t.biff<8)return function(s,o,i){s.l+=4;var c=s.read_shift(2),u=s.read_shift(2),l=s.read_shift(2);s.l+=2,s.l+=2,s.l+=2,s.l+=2,s.l+=2,s.l+=2,s.l+=2,s.l+=2,s.l+=2,s.l+=6,o-=36;var A=[];return A.push((Ob[c]||ls)(s,o,i)),{cmo:[u,c,l],ft:A}}(e,r,t);var n=bm(e),a=function(s,o){for(var i=s.l+o,c=[];s.l7||r[1]>7)throw new Error("Bad Gutters: "+r.join("|"));return r}},129:{f:function(e,r,t){var n=t&&t.biff==8||r==2?e.read_shift(2):(e.l+=r,0);return{fDialog:16&n,fBelow:64&n,fRight:128&n}}},130:{f:wo},131:{f:go},132:{f:go},133:{f:function(e,r,t){var n=e.read_shift(4),a=3&e.read_shift(1),s=e.read_shift(1);switch(s){case 0:s="Worksheet";break;case 1:s="Macrosheet";break;case 2:s="Chartsheet";break;case 6:s="VBAModule"}var o=$A(e,0,t);return o.length===0&&(o="Sheet1"),{pos:n,hs:a,dt:s,name:o}}},134:{},140:{f:function(e){var r,t=[0,0];return r=e.read_shift(2),t[0]=Wv[r]||r,r=e.read_shift(2),t[1]=Wv[r]||r,t}},141:{f:wo},144:{},146:{f:function(e){for(var r=e.read_shift(2),t=[];r-- >0;)t.push(mm(e));return t}},151:{},152:{},153:{},154:{},155:{},156:{f:wo},157:{},158:{},160:{f:jb},161:{f:function(e,r){var t={};return r<32||(e.l+=16,t.header=hs(e),t.footer=hs(e),e.l+=2),t}},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:function(e,r){for(var t=e.l+r-2,n=e.read_shift(2),a=e.read_shift(2),s=[];e.l>2&1,n.data=function(a,s,o,i){var c={},u=a.read_shift(4),l=a.read_shift(4),A=a.read_shift(4),h=a.read_shift(2);return c.patternType=xd[A>>26],i.cellStyles&&(c.alc=7&u,c.fWrap=u>>3&1,c.alcV=u>>4&7,c.fJustLast=u>>7&1,c.trot=u>>8&255,c.cIndent=u>>16&15,c.fShrinkToFit=u>>20&1,c.iReadOrder=u>>22&2,c.fAtrNum=u>>26&1,c.fAtrFnt=u>>27&1,c.fAtrAlc=u>>28&1,c.fAtrBdr=u>>29&1,c.fAtrPat=u>>30&1,c.fAtrProt=u>>31&1,c.dgLeft=15&l,c.dgRight=l>>4&15,c.dgTop=l>>8&15,c.dgBottom=l>>12&15,c.icvLeft=l>>16&127,c.icvRight=l>>23&127,c.grbitDiag=l>>30&3,c.icvTop=127&A,c.icvBottom=A>>7&127,c.icvDiag=A>>14&127,c.dgDiag=A>>21&15,c.icvFore=127&h,c.icvBack=h>>7&127,c.fsxButton=h>>14&1),c}(e,0,n.fStyle,t),n}},225:{f:function(e,r){return r===0||e.read_shift(2),1200}},226:{f:Ou},227:{},229:{f:function(e,r){for(var t=[],n=e.read_shift(2);n--;)t.push(_d(e));return t}},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:function(e,r){for(var t=e.l+r,n=e.read_shift(4),a=e.read_shift(4),s=[],o=0;o!=a&&e.l255)throw new Error("Unexpected SupBook type: "+s);for(var o=eA(e,s),i=[];n>e.l;)i.push(of(e));return[s,a,o,i]}},431:{f:go},432:{},433:{},434:{},437:{},438:{f:function(e,r,t){var n=e.l,a="";try{e.l+=4;var s=(t.lastobj||{cmo:[0,0]}).cmo[1];[0,5,7,11,12,14].indexOf(s)==-1?e.l+=6:function(l){var A=l.read_shift(1);l.l++;var h=l.read_shift(2);return l.l+=2,[A,h]}(e);var o=e.read_shift(2);e.read_shift(2),wo(e);var i=e.read_shift(2);e.l+=i;for(var c=1;c=(u?o:2*o))break}if(a.length!==o&&a.length!==2*o)throw new Error("cchText: "+o+" != "+a.length);return e.l=n+r,{t:a}}catch{return e.l=n+r,{t:a}}}},439:{f:go},440:{f:function(e,r){var t=_d(e);e.l+=16;var n=function(a,s){var o=a.l+s,i=a.read_shift(4);if(i!==2)throw new Error("Unrecognized streamVersion: "+i);var c=a.read_shift(2);a.l+=2;var u,l,A,h,f,d,g="";16&c&&(u=sf(a,a.l)),128&c&&(l=sf(a,a.l)),(257&c)==257&&(A=sf(a,a.l)),(257&c)==1&&(h=_b(a,a.l)),8&c&&(g=sf(a,a.l)),32&c&&(f=a.read_shift(16)),64&c&&(d=H0(a)),a.l=o;var p=l||A||h||"";p&&g&&(p+="#"+g),p||(p="#"+g),2&c&&p.charAt(0)=="/"&&p.charAt(1)!="/"&&(p="file://"+p);var m={Target:p};return f&&(m.guid=f),d&&(m.time=d),u&&(m.Tooltip=u),m}(e,r-24);return[t,n]}},441:{},442:{f:of},443:{},444:{f:wo},445:{},446:{},448:{f:Ou},449:{f:function(e){return e.read_shift(2),e.read_shift(4)},r:2},450:{f:Ou},512:{f:Em},513:{f:Ub},515:{f:function(e,r,t){t.biffguess&&t.biff==2&&(t.biff=5);var n=su(e),a=hs(e);return n.val=a,n}},516:{f:function(e,r,t){t.biffguess&&t.biff==2&&(t.biff=5),e.l;var n=su(e);t.biff==2&&e.l++;var a=of(e,e.l,t);return n.val=a,n}},517:{f:Bm},519:{f:Hb},520:{f:function(e){var r={};r.r=e.read_shift(2),r.c=e.read_shift(2),r.cnt=e.read_shift(2)-r.c;var t=e.read_shift(2);e.l+=4;var n=e.read_shift(1);return e.l+=3,7&n&&(r.level=7&n),32&n&&(r.hidden=!0),64&n&&(r.hpt=t/20),r}},523:{},545:{f:_m},549:{f:Cm},566:{},574:{f:function(e,r,t){return t&&t.biff>=2&&t.biff<5?{}:{RTL:64&e.read_shift(2)}}},638:{f:function(e){var r=e.read_shift(2),t=e.read_shift(2),n=W0(e);return{r,c:t,ixfe:n[0],rknum:n[1]}}},659:{},1048:{},1054:{f:function(e,r,t){return[e.read_shift(2),tA(e,0,t)]}},1084:{},1212:{f:function(e,r,t){var n=Im(e);e.l++;var a=e.read_shift(1);return[GC(e,r-=8,t),a,n]}},2048:{f:function(e,r){e.read_shift(2);var t=_d(e),n=e.read_shift((r-10)/2,"dbcs-cont");return[t,n=n.replace(bs,"")]}},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:Dd},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:Ou},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:function(e){e.l+=2;var r={cxfs:0,crc:0};return r.cxfs=e.read_shift(2),r.crc=e.read_shift(4),r},r:12},2173:{f:function(e,r){e.l,e.l+=2;var t=e.read_shift(2);e.l+=2;for(var n=e.read_shift(2),a=[];n-- >0;)a.push(CC(e,e.l));return{ixfe:t,ext:a}},r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:go,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:function(e,r,t){if(!(t.biff<8)){var n=e.read_shift(2),a=e.read_shift(2);return[eA(e,n,t),eA(e,a,t)]}e.l+=r},r:12},2197:{},2198:{f:function(e,r,t){var n=e.l+r;if(e.read_shift(4)!==124226)if(t.cellStyles){var a,s=e.slice(e.l);e.l=n;try{a=Av(s,{type:"array"})}catch{return}var o=rc(a,"theme/theme/theme1.xml",!0);if(o)return Ym(o,t)}else e.l=n},r:12},2199:{},2200:{},2201:{},2202:{f:function(e){return[e.read_shift(4)!==0,e.read_shift(4)!==0,e.read_shift(4)]},r:12},2203:{f:Ou},2204:{},2205:{},2206:{},2207:{},2211:{f:function(e){var r=function(t){var n=t.read_shift(2),a=t.read_shift(2);return t.l+=8,{type:n,flags:a}}(e);if(r.type!=2211)throw new Error("Invalid Future Record "+r.type);return e.read_shift(4)!==0}},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:wo},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:function(e,r,t){var n={area:!1};if(t.biff!=5)return e.l+=r,n;var a=e.read_shift(1);return e.l+=3,16&a&&(n.area=!0),n}},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:function(e){for(var r=e.read_shift(2),t=[];r-- >0;)t.push(mm(e));return t}},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:Em},1:{},2:{f:function(e){var r=su(e);++e.l;var t=e.read_shift(2);return r.t="n",r.val=t,r}},3:{f:function(e){var r=su(e);++e.l;var t=hs(e);return r.t="n",r.val=t,r}},4:{f:function(e,r,t){t.biffguess&&t.biff==5&&(t.biff=2);var n=su(e);++e.l;var a=tA(e,0,t);return n.t="str",n.val=a,n}},5:{f:Bm},7:{f:function(e){var r=e.read_shift(1);return r===0?(e.l++,""):e.read_shift(r,"sbcs-cont")}},8:{},9:{f:Dd},11:{},22:{f:wo},30:{f:Tb},31:{},32:{},33:{f:_m},36:{},37:{f:Cm},50:{f:function(e,r){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=r-13}},62:{},52:{},67:{},68:{f:wo},69:{},86:{},126:{},127:{f:function(e){var r=e.read_shift(2),t=e.read_shift(2),n=e.read_shift(4),a={fmt:r,env:t,len:n,data:e.slice(e.l,e.l+n)};return e.l+=n,a}},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:function(e,r,t){var n=e.l+r,a=su(e),s=e.read_shift(2),o=eA(e,s,t);return e.l=n,a.t="str",a.val=o,a}},223:{},234:{},354:{},421:{},518:{f:sp},521:{f:Dd},536:{f:xm},547:{f:km},561:{},579:{},1030:{f:sp},1033:{f:Dd},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function en(e,r,t,n){var a=r;if(!isNaN(a)){var s=n||(t||[]).length||0,o=e.next(4);o.write_shift(2,a),o.write_shift(2,s),s>0&&Q0(t)&&e.push(t)}}function Gs(e,r,t){return e||(e=Kt(7)),e.write_shift(2,r),e.write_shift(2,t),e.write_shift(2,0),e.write_shift(1,0),e}function OE(e,r,t,n){if(r.v!=null)switch(r.t){case"d":case"n":var a=r.t=="d"?Zo(Ga(r.v)):r.v;return void(a==(0|a)&&a>=0&&a<65536?en(e,2,(s=t,o=n,i=a,c=Kt(9),Gs(c,s,o),c.write_shift(2,i),c)):en(e,3,function(u,l,A){var h=Kt(15);return Gs(h,u,l),h.write_shift(8,A,"f"),h}(t,n,a)));case"b":case"e":return void en(e,5,function(u,l,A,h){var f=Kt(9);return Gs(f,u,l),dm(A,h||"b",f),f}(t,n,r.v,r.t));case"s":case"str":return void en(e,4,function(u,l,A){var h=Kt(8+2*A.length);return Gs(h,u,l),h.write_shift(1,A.length),h.write_shift(A.length,A,"sbcs"),h.l255||h.e.r>16383){if(u.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");h.e.c=Math.min(h.e.c,255),h.e.r=Math.min(h.e.c,16383),l=_i(h)}for(var g=h.s.r;g<=h.e.r;++g){f=Ho(g);for(var p=h.s.c;p<=h.e.c;++p){g===h.s.r&&(d[p]=Eo(p)),l=d[p]+f;var m=A?(i[g]||[])[p]:i[l];m&&OE(o,m,g,p)}}}(n,e.Sheets[e.SheetNames[a]],0,t),en(n,10),n.end()}function GE(e,r,t){en(e,49,function(n,a){var s=n.name||"Arial",o=a&&a.biff==5,i=Kt(o?15+s.length:16+2*s.length);return i.write_shift(2,20*(n.sz||12)),i.write_shift(4,0),i.write_shift(2,400),i.write_shift(4,0),i.write_shift(2,0),i.write_shift(1,s.length),o||i.write_shift(1,1),i.write_shift((o?1:2)*s.length,s,o?"sbcs":"utf16le"),i}({sz:12,color:{theme:1},name:"Arial",family:2,scheme:"minor"},t))}function UE(e,r){if(r){var t=0;r.forEach(function(n,a){++t<=256&&n&&en(e,125,function(s,o){var i=Kt(12);i.write_shift(2,o),i.write_shift(2,o),i.write_shift(2,256*s.width),i.write_shift(2,0);var c=0;return s.hidden&&(c|=1),i.write_shift(1,c),c=s.level||0,i.write_shift(1,c),i.write_shift(2,0),i}(qd(a,n),a))})}}function jE(e,r,t,n,a){var s=16+vl(a.cellXfs,r,a);if(r.v!=null||r.bf)if(r.bf)en(e,6,UC(r,t,n,0,s));else switch(r.t){case"d":case"n":en(e,515,function(o,i,c,u){var l=Kt(14);return rA(o,i,u,l),Zl(c,l),l}(t,n,r.t=="d"?Zo(Ga(r.v)):r.v,s));break;case"b":case"e":en(e,517,function(o,i,c,u,l,A){var h=Kt(8);return rA(o,i,u,h),dm(c,A,h),h}(t,n,r.v,s,0,r.t));break;case"s":case"str":a.bookSST?en(e,253,function(o,i,c,u){var l=Kt(10);return rA(o,i,u,l),l.write_shift(4,c),l}(t,n,up(a.Strings,r.v,a.revStrings),s)):en(e,516,function(o,i,c,u,l){var A=!l||l.biff==8,h=Kt(+A+8+(1+A)*c.length);return rA(o,i,u,h),h.write_shift(2,c.length),A&&h.write_shift(1,1),h.write_shift((1+A)*c.length,c,A?"utf16le":"sbcs"),h}(t,n,(r.v||"").slice(0,255),s,a));break;default:en(e,513,rA(t,n,s))}else en(e,513,rA(t,n,s))}function HE(e,r,t){var n,a,s,o=Os(),i=t.SheetNames[e],c=t.Sheets[i]||{},u=(t||{}).Workbook||{},l=(u.Sheets||[])[e]||{},A=Array.isArray(c),h=r.biff==8,f="",d=[],g=ea(c["!ref"]||"A1"),p=h?65536:16384;if(g.e.c>255||g.e.r>=p){if(r.WTF)throw new Error("Range "+(c["!ref"]||"A1")+" exceeds format limit A1:IV16384");g.e.c=Math.min(g.e.c,255),g.e.r=Math.min(g.e.c,p-1)}en(o,2057,Rd(0,16,r)),en(o,13,mc(1)),en(o,12,mc(100)),en(o,15,ws(!0)),en(o,17,ws(!1)),en(o,16,Zl(.001)),en(o,95,ws(!0)),en(o,42,ws(!1)),en(o,43,ws(!1)),en(o,130,mc(1)),en(o,128,(a=[0,0],(s=Kt(8)).write_shift(4,0),s.write_shift(2,a[0]?a[0]+1:0),s.write_shift(2,a[1]?a[1]+1:0),s)),en(o,131,ws(!1)),en(o,132,ws(!1)),h&&UE(o,c["!cols"]),en(o,512,function(E,k){var R=k.biff!=8&&k.biff?2:4,T=Kt(2*R+6);return T.write_shift(R,E.s.r),T.write_shift(R,E.e.r+1),T.write_shift(2,E.s.c),T.write_shift(2,E.e.c+1),T.write_shift(2,0),T}(g,r)),h&&(c["!links"]=[]);for(var m=g.s.r;m<=g.e.r;++m){f=Ho(m);for(var v=g.s.c;v<=g.e.c;++v){m===g.s.r&&(d[v]=Eo(v)),n=d[v]+f;var y=A?(c[m]||[])[v]:c[n];y&&(jE(o,y,m,v,r),h&&y.l&&c["!links"].push([n,y.l]))}}var I=l.CodeName||l.name||i;return h&&en(o,574,function(E){var k=Kt(18),R=1718;return E&&E.RTL&&(R|=64),k.write_shift(2,R),k.write_shift(4,0),k.write_shift(4,64),k.write_shift(4,0),k.write_shift(4,0),k}((u.Views||[])[0])),h&&(c["!merges"]||[]).length&&en(o,229,function(E){var k=Kt(2+8*E.length);k.write_shift(2,E.length);for(var R=0;R255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[t]+"' extends beyond column IV (255). Data may be lost.")}var a=r||{};switch(a.biff||2){case 8:case 5:return function(s,o){var i=o||{},c=[];s&&!s.SSF&&(s.SSF=Ra(ai)),s&&s.SSF&&(qA(),Id(s.SSF),i.revssf=Cd(s.SSF),i.revssf[s.SSF[65535]]=0,i.ssf=s.SSF),i.Strings=[],i.Strings.Count=0,i.Strings.Unique=0,Ep(i),i.cellXfs=[],vl(i.cellXfs,{},{revssf:{General:0}}),s.Props||(s.Props={});for(var u=0;u/g,"")).match(/");var s=e.match(/<\/table/i),o=a.index,i=s&&s.index||e.length,c=ib(e.slice(o,i),/(:?]*>)/i,""),u=-1,l=0,A=0,h=0,f={s:{r:1e7,c:1e7},e:{r:0,c:0}},d=[];for(o=0;o/i);for(i=0;i"))>-1;)y=y.slice(I+1);for(var E=0;E")));h=R.colspan?+R.colspan:1,((A=+R.rowspan)>1||h>1)&&d.push({s:{r:u,c:l},e:{r:u+(A||1)-1,c:l+h-1}});var T=R.t||R["data-t"]||"";if(y.length)if(y=ub(y),f.s.r>u&&(f.s.r=u),f.e.rl&&(f.s.c=l),f.e.ct||a[u].s.c>o||a[u].e.r1&&(f.rowspan=i),c>1&&(f.colspan=c),n.editable?h=''+h+"":A&&(f["data-t"]=A&&A.t||"z",A.v!=null&&(f["data-v"]=A.v),A.z!=null&&(f["data-z"]=A.z),A.l&&(A.l.Target||"#").charAt(0)!="#"&&(h=''+h+"")),f.id=(n.id||"sjs")+"-"+l,s.push(Zr("td",h,f))}}return""+s.join("")+""}var JE='SheetJS Table Export',qE="",WE={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function Ly(e,r){var t,n,a,s,o,i,c,u,l=r||{},A=w0(e),h=[],f={name:""},d="",g=0,p={},m=[],v=l.dense?[]:{},y={value:""},I="",E=0,k=[],R=-1,T=-1,j={s:{r:1e6,c:1e7},e:{r:0,c:0}},W=0,H={},X=[],x={},N=[],C=1,w=1,Q=[],B={Names:[]},S={},O=["",""],F=[],Y={},M="",z=0,ue=!1,ae=!1,Ne=0;for($h.lastIndex=0,A=A.replace(//gm,"").replace(//gm,"");o=$h.exec(A);)switch(o[3]=o[3].replace(/_.*$/,"")){case"table":case"工作表":o[1]==="/"?(j.e.c>=j.s.c&&j.e.r>=j.s.r?v["!ref"]=_i(j):v["!ref"]="A1:A1",l.sheetRows>0&&l.sheetRows<=j.e.r&&(v["!fullref"]=v["!ref"],j.e.r=l.sheetRows-1,v["!ref"]=_i(j)),X.length&&(v["!merges"]=X),N.length&&(v["!rows"]=N),a.name=a.名称||a.name,typeof JSON<"u"&&JSON.stringify(a),m.push(a.name),p[a.name]=v,ae=!1):o[0].charAt(o[0].length-2)!=="/"&&(a=ci(o[0],!1),R=T=-1,j.s.r=j.s.c=1e7,j.e.r=j.e.c=0,v=l.dense?[]:{},X=[],N=[],ae=!0);break;case"table-row-group":o[1]==="/"?--W:++W;break;case"table-row":case"行":if(o[1]==="/"){R+=C,C=1;break}if((s=ci(o[0],!1)).行号?R=s.行号-1:R==-1&&(R=0),(C=+s["number-rows-repeated"]||1)<10)for(Ne=0;Ne0&&(N[R+Ne]={level:W});T=-1;break;case"covered-table-cell":o[1]!=="/"&&++T,l.sheetStubs&&(l.dense?(v[R]||(v[R]=[]),v[R][T]={t:"z"}):v[In({r:R,c:T})]={t:"z"}),I="",k=[];break;case"table-cell":case"数据":if(o[0].charAt(o[0].length-2)==="/")++T,y=ci(o[0],!1),w=parseInt(y["number-columns-repeated"]||"1",10),i={t:"z",v:null},y.formula&&l.cellFormula!=0&&(i.f=sy(Mi(y.formula))),(y.数据类型||y["value-type"])=="string"&&(i.t="s",i.v=Mi(y["string-value"]||""),l.dense?(v[R]||(v[R]=[]),v[R][T]=i):v[In({r:R,c:T})]=i),T+=w-1;else if(o[1]!=="/"){I="",E=0,k=[],w=1;var Ge=C?R+C-1:R;if(++T>j.e.c&&(j.e.c=T),Tj.e.r&&(j.e.r=Ge),F=[],Y={},i={t:(y=ci(o[0],!1)).数据类型||y["value-type"],v:null},l.cellFormula)if(y.formula&&(y.formula=Mi(y.formula)),y["number-matrix-columns-spanned"]&&y["number-matrix-rows-spanned"]&&(x={s:{r:R,c:T},e:{r:R+(parseInt(y["number-matrix-rows-spanned"],10)||0)-1,c:T+(parseInt(y["number-matrix-columns-spanned"],10)||0)-1}},i.F=_i(x),Q.push([x,i.F])),y.formula)i.f=sy(y.formula);else for(Ne=0;Ne=Q[Ne][0].s.r&&R<=Q[Ne][0].e.r&&T>=Q[Ne][0].s.c&&T<=Q[Ne][0].e.c&&(i.F=Q[Ne][1]);switch((y["number-columns-spanned"]||y["number-rows-spanned"])&&(x={s:{r:R,c:T},e:{r:R+(parseInt(y["number-rows-spanned"],10)||0)-1,c:T+(parseInt(y["number-columns-spanned"],10)||0)-1}},X.push(x)),y["number-columns-repeated"]&&(w=parseInt(y["number-columns-repeated"],10)),i.t){case"boolean":i.t="b",i.v=Fa(y["boolean-value"]);break;case"float":case"percentage":case"currency":i.t="n",i.v=parseFloat(y.value);break;case"date":i.t="d",i.v=Ga(y["date-value"]),l.cellDates||(i.t="n",i.v=Zo(i.v)),i.z="m/d/yy";break;case"time":i.t="n",i.v=tb(y["time-value"])/86400,l.cellDates&&(i.t="d",i.v=Kh(i.v)),i.z="HH:MM:SS";break;case"number":i.t="n",i.v=parseFloat(y.数据数值);break;default:if(i.t!=="string"&&i.t!=="text"&&i.t)throw new Error("Unsupported value type "+i.t);i.t="s",y["string-value"]!=null&&(I=Mi(y["string-value"]),k=[])}}else{if(ue=!1,i.t==="s"&&(i.v=I||"",k.length&&(i.R=k),ue=E==0),S.Target&&(i.l=S),F.length>0&&(i.c=F,F=[]),I&&l.cellText!==!1&&(i.w=I),ue&&(i.t="z",delete i.v),(!ue||l.sheetStubs)&&!(l.sheetRows&&l.sheetRows<=R))for(var Ye=0;Ye0;)v[R+Ye][T+w]=Ra(i);else for(v[In({r:R+Ye,c:T})]=i;--w>0;)v[In({r:R+Ye,c:T+w})]=Ra(i);j.e.c<=T&&(j.e.c=T)}T+=(w=parseInt(y["number-columns-repeated"]||"1",10))-1,w=0,i={},I="",k=[]}S={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(o[1]==="/"){if((t=h.pop())[0]!==o[3])throw"Bad state: "+t}else o[0].charAt(o[0].length-2)!=="/"&&h.push([o[3],!0]);break;case"annotation":if(o[1]==="/"){if((t=h.pop())[0]!==o[3])throw"Bad state: "+t;Y.t=I,k.length&&(Y.R=k),Y.a=M,F.push(Y)}else o[0].charAt(o[0].length-2)!=="/"&&h.push([o[3],!1]);M="",z=0,I="",E=0,k=[];break;case"creator":o[1]==="/"?M=A.slice(z,o.index):z=o.index+o[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(o[1]==="/"){if((t=h.pop())[0]!==o[3])throw"Bad state: "+t}else o[0].charAt(o[0].length-2)!=="/"&&h.push([o[3],!1]);I="",E=0,k=[];break;case"scientific-number":case"currency-symbol":case"currency-style":case"script":case"libraries":case"automatic-styles":case"default-style":case"page-layout":case"style":case"map":case"font-face":case"paragraph-properties":case"table-properties":case"table-column-properties":case"table-row-properties":case"table-cell-properties":case"fraction":case"boolean-style":case"boolean":case"text-style":case"text-content":case"text-properties":case"embedded-text":case"body":case"电子表格":case"forms":case"table-column":case"table-header-rows":case"table-rows":case"table-column-group":case"table-header-columns":case"table-columns":case"null-date":case"graphic-properties":case"calculation-settings":case"named-expressions":case"label-range":case"label-ranges":case"named-expression":case"sort":case"sort-by":case"sort-groups":case"tab":case"line-break":case"span":case"s":case"date":case"object":case"title":case"标题":case"desc":case"binary-data":case"table-source":case"scenario":case"iteration":case"content-validations":case"content-validation":case"help-message":case"error-message":case"database-ranges":case"filter":case"filter-and":case"filter-or":case"filter-condition":case"list-level-style-bullet":case"list-level-style-number":case"list-level-properties":case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":case"event-listener":case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":case"config-item":case"page-number":case"page-count":case"time":case"cell-range-source":case"detective":case"operation":case"highlighted-range":case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":case"rect":case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":case"properties":case"property":case"table-protection":case"data-pilot-grand-total":case"office-document-common-attrs":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if(o[1]==="/"){if(H[f.name]=d,(t=h.pop())[0]!==o[3])throw"Bad state: "+t}else o[0].charAt(o[0].length-2)!=="/"&&(d="",f=ci(o[0],!1),h.push([o[3],!0]));break;case"number":case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(h[h.length-1][0]){case"time-style":case"date-style":n=ci(o[0],!1),d+=WE[o[3]][n.style==="long"?1:0]}break;case"text":if(o[0].slice(-2)==="/>")break;if(o[1]==="/")switch(h[h.length-1][0]){case"number-style":case"date-style":case"time-style":d+=A.slice(g,o.index)}else g=o.index+o[0].length;break;case"named-range":O=cp((n=ci(o[0],!1))["cell-range-address"]);var Ae={Name:n.name,Ref:O[0]+"!"+O[1]};ae&&(Ae.Sheet=m.length),B.Names.push(Ae);break;case"p":case"文本串":if(["master-styles"].indexOf(h[h.length-1][0])>-1)break;if(o[1]!=="/"||y&&y["string-value"])ci(o[0],!1),E=o.index+o[0].length;else{var te=(c=A.slice(E,o.index),u=void 0,u=c.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(//g," ").replace(//g,function(de,Ke){return Array(parseInt(Ke,10)+1).join(" ")}).replace(/]*\/>/g," ").replace(//g,` `),[Mi(u.replace(/<[^>]*>/g,""))]);I=(I.length>0?I+` `:"")+te[0]}break;case"database-range":if(o[1]==="/")break;try{p[(O=cp(ci(o[0])["target-range-address"]))[0]]["!autofilter"]={ref:O[1]}}catch{}break;case"a":if(o[1]!=="/"){if(!(S=ci(o[0],!1)).href)break;S.Target=Mi(S.href),delete S.href,S.Target.charAt(0)=="#"&&S.Target.indexOf(".")>-1?(O=cp(S.Target.slice(1)),S.Target="#"+O[0]+"!"+O[1]):S.Target.match(/^\.\.[\\\/]/)&&(S.Target=S.Target.slice(3))}break;default:switch(o[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(l.WTF)throw new Error(o)}}var he={Sheets:p,SheetNames:m,Workbook:B};return l.bookSheets&&delete he.Sheets,he}function Oy(e,r){r=r||{},gc(e,"META-INF/manifest.xml")&&function(a,s){for(var o,i,c=w0(a);o=$h.exec(c);)switch(o[3]){case"manifest":break;case"file-entry":if((i=ci(o[0],!1)).path=="/"&&i.type!==wb)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(s&&s.WTF)throw o}}(Co(e,"META-INF/manifest.xml"),r);var t=rc(e,"content.xml");if(!t)throw new Error("Missing content.xml in ODS / UOF file");var n=Ly(ua(t),r);return gc(e,"meta.xml")&&(n.Props=Xv(Co(e,"meta.xml"))),n}function zd(e,r){return Ly(e,r)}var KE=function(){var e=["",'',"",'',"",'',"",""].join(""),r=""+e+"";return function(){return fo+r}}(),Py=function(){var e=` `,r=function(t,n,a){var s=[];s.push(' `);var o=0,i=0,c=Es(t["!ref"]||"A1"),u=t["!merges"]||[],l=0,A=Array.isArray(t);if(t["!cols"])for(i=0;i<=c.e.c;++i)s.push(" `);var h="",f=t["!rows"]||[];for(o=0;o `);for(;o<=c.e.r;++o){for(h=f[o]?' table:style-name="ro'+f[o].ods+'"':"",s.push(" `),i=0;ii||u[l].s.r>o||u[l].e.c `);else{var m=In({r:o,c:i}),v=A?(t[o]||[])[i]:t[m];if(v&&v.f&&(g["table:formula"]=ca(("of:="+v.f.replace(np,"$1[.$2$3$4$5]").replace(/\]:\[/g,":")).replace(/;/g,"|").replace(/,/g,";")),v.F&&v.F.slice(0,m.length)==m)){var y=Es(v.F);g["table:number-matrix-columns-spanned"]=y.e.c-y.s.c+1,g["table:number-matrix-rows-spanned"]=y.e.r-y.s.r+1}if(v){switch(v.t){case"b":p=v.v?"TRUE":"FALSE",g["office:value-type"]="boolean",g["office:boolean-value"]=v.v?"true":"false";break;case"n":p=v.w||String(v.v||0),g["office:value-type"]="float",g["office:value"]=v.v||0;break;case"s":case"str":p=v.v==null?"":v.v,g["office:value-type"]="string";break;case"d":p=v.w||Ga(v.v).toISOString(),g["office:value-type"]="date",g["office:date-value"]=Ga(v.v).toISOString(),g["table:style-name"]="ce1";break;default:s.push(e);continue}var I=ca(p).replace(/ +/g,function(k){return''}).replace(/\t/g,"").replace(/\n/g,"").replace(/^ /,"").replace(/ $/,"");if(v.l&&v.l.Target){var E=v.l.Target;(E=E.charAt(0)=="#"?"#"+E.slice(1).replace(/\./,"!"):E).charAt(0)=="#"||E.match(/^\w+:/)||(E="../"+E),I=Zr("text:a",I,{"xlink:href":E.replace(/&/g,"&")})}s.push(" "+Zr("table:table-cell",Zr("text:p",I,{}),g)+` `)}else s.push(e)}}s.push(` `)}return s.push(` `),s.join("")};return function(t,n){var a=[fo],s=Xh({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),o=Xh({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});n.bookType=="fods"?(a.push(" `),a.push(Zv().replace(/office:document-meta/g,"office:meta"))):a.push(" `),function(c,u){c.push(` `),c.push(` `),c.push(` `),c.push(` / `),c.push(` `),c.push(` / `),c.push(` `),c.push(` `);var l=0;u.SheetNames.map(function(h){return u.Sheets[h]}).forEach(function(h){if(h&&h["!cols"]){for(var f=0;f `),c.push(' `),c.push(` `),++l}}});var A=0;u.SheetNames.map(function(h){return u.Sheets[h]}).forEach(function(h){if(h&&h["!rows"]){for(var f=0;f `),c.push(' `),c.push(` `),++A}}}),c.push(` `),c.push(` `),c.push(` `),c.push(` `),c.push(` `)}(a,t),a.push(` `),a.push(` `);for(var i=0;i!=t.SheetNames.length;++i)a.push(r(t.Sheets[t.SheetNames[i]],t,i));return a.push(` `),a.push(` `),n.bookType=="fods"?a.push(""):a.push(""),a.join("")}}();function Gy(e,r){if(r.bookType=="fods")return Py(e,r);var t=m0(),n="",a=[],s=[];return yi(t,n="mimetype","application/vnd.oasis.opendocument.spreadsheet"),yi(t,n="content.xml",Py(e,r)),a.push([n,"text/xml"]),s.push([n,"ContentFile"]),yi(t,n="styles.xml",KE(e,r)),a.push([n,"text/xml"]),s.push([n,"StylesFile"]),yi(t,n="meta.xml",fo+Zv()),a.push([n,"text/xml"]),s.push([n,"MetadataFile"]),yi(t,n="manifest.rdf",function(o){var i,c,u=[fo];u.push(` `);for(var l=0;l!=o.length;++l)u.push(Vv(o[l][0],o[l][1])),u.push((i="",c=o[l][0],[' `,' `,` `].join("")));return u.push(Vv("","Document","pkg")),u.push(""),u.join("")}(s)),a.push([n,"application/rdf+xml"]),yi(t,n="META-INF/manifest.xml",function(o){var i=[fo];i.push(` `),i.push(` `);for(var c=0;c `);return i.push(""),i.join("")}(a)),t}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function Uu(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function mp(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):ua(Du(e))}function zE(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):ec(Oc(e))}function ml(e){var r=e.reduce(function(a,s){return a+s.length},0),t=new Uint8Array(r),n=0;return e.forEach(function(a){t.set(a,n),n+=a.length}),t}function Vd(e){return 16843009*((e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135)>>>24}function wf(e,r){var t=r?r[0]:0,n=127&e[t];e:if(e[t++]>=128&&(n|=(127&e[t])<<7,e[t++]<128||(n|=(127&e[t])<<14,e[t++]<128)||(n|=(127&e[t])<<21,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,28),++t,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,35),++t,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,42),++t,e[t++]<128)))break e;return r&&(r[0]=t),n}function la(e){var r=new Uint8Array(7);r[0]=127&e;var t=1;e:if(e>127){if(r[t-1]|=128,r[t]=e>>7&127,++t,e<=16383||(r[t-1]|=128,r[t]=e>>14&127,++t,e<=2097151)||(r[t-1]|=128,r[t]=e>>21&127,++t,e<=268435455)||(r[t-1]|=128,r[t]=e/256>>>21&127,++t,e<=34359738367)||(r[t-1]|=128,r[t]=e/65536>>>21&127,++t,e<=4398046511103))break e;r[t-1]|=128,r[t]=e/16777216>>>21&127,++t}return r.slice(0,t)}function io(e){var r=0,t=127&e[r];e:if(e[r++]>=128){if(t|=(127&e[r])<<7,e[r++]<128||(t|=(127&e[r])<<14,e[r++]<128)||(t|=(127&e[r])<<21,e[r++]<128))break e;t|=(127&e[r])<<28}return t}function Wi(e){for(var r=[],t=[0];t[0]=128;);n=e.slice(c,t[0]);break;case 5:i=4,n=e.slice(t[0],t[0]+i),t[0]+=i;break;case 1:i=8,n=e.slice(t[0],t[0]+i),t[0]+=i;break;case 2:i=wf(e,t),n=e.slice(t[0],t[0]+i),t[0]+=i;break;default:throw new Error("PB Type ".concat(o," for Field ").concat(s," at offset ").concat(a))}var u={data:n,type:o};r[s]==null?r[s]=[u]:r[s].push(u)}return r}function es(e){var r=[];return e.forEach(function(t,n){t.forEach(function(a){a.data&&(r.push(la(8*n+a.type)),a.type==2&&r.push(la(a.data.length)),r.push(a.data))})}),ml(r)}function Bf(e,r){return(e==null?void 0:e.map(function(t){return r(t.data)}))||[]}function ac(e){for(var r,t=[],n=[0];n[0]>>0>0),t.push(o)}return t}function ch(e){var r=[];return e.forEach(function(t){var n=[];n[1]=[{data:la(t.id),type:0}],n[2]=[],t.merge!=null&&(n[3]=[{data:la(+!!t.merge),type:0}]);var a=[];t.messages.forEach(function(o){a.push(o.data),o.meta[3]=[{type:0,data:la(o.data.length)}],n[2].push({data:es(o.meta),type:2})});var s=es(n);r.push(la(s.length)),r.push(s),a.forEach(function(o){return r.push(o)})}),ml(r)}function VE(e,r){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var t=[0],n=wf(r,t),a=[];t[0]>2&7),o=(224&r[t[0]++])<<3,o|=r[t[0]++]):(i=1+(r[t[0]++]>>2),s==2?(o=r[t[0]]|r[t[0]+1]<<8,t[0]+=2):(o=(r[t[0]]|r[t[0]+1]<<8|r[t[0]+2]<<16|r[t[0]+3]<<24)>>>0,t[0]+=4)),a=[ml(a)],o==0)throw new Error("Invalid offset 0");if(o>a[0].length)throw new Error("Invalid offset beyond length");if(i>=o)for(a.push(a[0].slice(-o)),i-=o;i>=a[a.length-1].length;)a.push(a[a.length-1]),i-=a[a.length-1].length;a.push(a[0].slice(-o,-o+i))}else{var c=r[t[0]++]>>2;if(c<60)++c;else{var u=c-59;c=r[t[0]],u>1&&(c|=r[t[0]+1]<<8),u>2&&(c|=r[t[0]+2]<<16),u>3&&(c|=r[t[0]+3]<<24),c>>>=0,c++,t[0]+=u}a.push(r.slice(t[0],t[0]+c)),t[0]+=c}}var l=ml(a);if(l.length!=n)throw new Error("Unexpected length: ".concat(l.length," != ").concat(n));return l}function yc(e){for(var r=[],t=0;t>8&255]))):n<=16777216?(o+=4,r.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(o+=5,r.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),r.push(e.slice(t,t+n)),o+=n,a[0]=0,a[1]=255&o,a[2]=o>>8&255,a[3]=o>>16&255,t+=n}return ml(r)}function Uy(e,r,t){var n,a=Uu(e),s=a.getUint32(8,!0),o=12,i=-1,c=-1,u=NaN,l=NaN,A=new Date(2001,0,1);switch(1&s&&(u=function(h,f){for(var d=(127&h[f+15])<<7|h[f+14]>>1,g=1&h[f+14],p=f+13;p>=f;--p)g=256*g+h[p];return(128&h[f+15]?-g:g)*Math.pow(10,d-6176)}(e,o),o+=16),2&s&&(l=a.getFloat64(o,!0),o+=8),4&s&&(A.setTime(A.getTime()+1e3*a.getFloat64(o,!0)),o+=8),8&s&&(c=a.getUint32(o,!0),o+=4),16&s&&(i=a.getUint32(o,!0),o+=4),e[1]){case 0:break;case 2:case 10:n={t:"n",v:u};break;case 3:n={t:"s",v:r[c]};break;case 5:n={t:"d",v:A};break;case 6:n={t:"b",v:l>0};break;case 7:n={t:"n",v:l/86400};break;case 8:n={t:"e",v:0};break;case 9:if(!(i>-1))throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(31&s," : ").concat(e.slice(0,4)));n={t:"s",v:t[i]};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(31&s," : ").concat(e.slice(0,4)))}return n}function yp(e,r){var t=new Uint8Array(32),n=Uu(t),a=12,s=0;switch(t[0]=5,e.t){case"n":t[1]=2,function(o,i,c){var u=Math.floor(c==0?0:Math.LOG10E*Math.log(Math.abs(c)))+6176-20,l=c/Math.pow(10,u-6176);o[i+15]|=u>>7,o[i+14]|=(127&u)<<1;for(var A=0;l>=1;++A,l/=256)o[i+A]=255&l;o[i+15]|=c>=0?0:128}(t,a,e.v),s|=1,a+=16;break;case"b":t[1]=6,n.setFloat64(a,e.v?1:0,!0),s|=2,a+=8;break;case"s":if(r.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));t[1]=3,n.setUint32(a,r.indexOf(e.v),!0),s|=8,a+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(8,s,!0),t.slice(0,a)}function Ip(e,r){var t=new Uint8Array(32),n=Uu(t),a=12,s=0;switch(t[0]=3,e.t){case"n":t[2]=2,n.setFloat64(a,e.v,!0),s|=32,a+=8;break;case"b":t[2]=6,n.setFloat64(a,e.v?1:0,!0),s|=32,a+=8;break;case"s":if(r.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));t[2]=3,n.setUint32(a,r.indexOf(e.v),!0),s|=16,a+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(4,s,!0),t.slice(0,a)}function jy(e,r,t){switch(e[0]){case 0:case 1:case 2:case 3:return function(n,a,s,o){var i,c=Uu(n),u=c.getUint32(4,!0),l=(o>1?12:8)+4*Vd(u&(o>1?3470:398)),A=-1,h=-1,f=NaN,d=new Date(2001,0,1);switch(512&u&&(A=c.getUint32(l,!0),l+=4),l+=4*Vd(u&(o>1?12288:4096)),16&u&&(h=c.getUint32(l,!0),l+=4),32&u&&(f=c.getFloat64(l,!0),l+=8),64&u&&(d.setTime(d.getTime()+1e3*c.getFloat64(l,!0)),l+=8),n[2]){case 0:break;case 2:i={t:"n",v:f};break;case 3:i={t:"s",v:a[h]};break;case 5:i={t:"d",v:d};break;case 6:i={t:"b",v:f>0};break;case 7:i={t:"n",v:f/86400};break;case 8:i={t:"e",v:0};break;case 9:if(A>-1)i={t:"s",v:s[A]};else if(h>-1)i={t:"s",v:a[h]};else{if(isNaN(f))throw new Error("Unsupported cell type ".concat(n.slice(0,4)));i={t:"n",v:f}}break;default:throw new Error("Unsupported cell type ".concat(n.slice(0,4)))}return i}(e,r,t,e[0]);case 5:return Uy(e,r,t);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function ps(e){return wf(Wi(e)[1][0].data)}function Hy(e,r){var t=Wi(r.data),n=io(t[1][0].data),a=t[3],s=[];return(a||[]).forEach(function(o){var i=Wi(o.data),c=io(i[1][0].data)>>>0;switch(n){case 1:s[c]=mp(i[3][0].data);break;case 8:var u=Wi(e[ps(i[9][0].data)][0].data),l=e[ps(u[1][0].data)][0],A=io(l.meta[1][0].data);if(A!=2001)throw new Error("2000 unexpected reference to ".concat(A));var h=Wi(l.data);s[c]=h[3].map(function(f){return mp(f.data)}).join("")}}),s}function ZE(e,r){var t,n=Wi(r.data),a=(t=n==null?void 0:n[7])!=null&&t[0]?io(n[7][0].data)>>>0>0?1:0:-1,s=Bf(n[5],function(o){return function(i,c){var u,l,A,h,f,d,g,p,m,v,y,I,E,k,R,T,j=Wi(i),W=io(j[1][0].data)>>>0,H=io(j[2][0].data)>>>0,X=((l=(u=j[8])==null?void 0:u[0])==null?void 0:l.data)&&io(j[8][0].data)>0||!1;if((h=(A=j[7])==null?void 0:A[0])!=null&&h.data&&c!=0)R=(d=(f=j[7])==null?void 0:f[0])==null?void 0:d.data,T=(p=(g=j[6])==null?void 0:g[0])==null?void 0:p.data;else{if(!((v=(m=j[4])==null?void 0:m[0])!=null&&v.data)||c==1)throw"NUMBERS Tile missing ".concat(c," cell storage");R=(I=(y=j[4])==null?void 0:y[0])==null?void 0:I.data,T=(k=(E=j[3])==null?void 0:E[0])==null?void 0:k.data}for(var x=X?4:1,N=Uu(R),C=[],w=0;w=1&&(B[C[C.length-1][0]]=T.subarray(C[C.length-1][1]*x)),{R:W,cells:B}}(o,a)});return{nrows:io(n[4][0].data)>>>0,data:s.reduce(function(o,i){return o[i.R]||(o[i.R]=[]),i.cells.forEach(function(c,u){if(o[i.R][u])throw new Error("Duplicate cell r=".concat(i.R," c=").concat(u));o[i.R][u]=c}),o},[])}}function XE(e,r){var t={"!ref":"A1"},n=e[ps(Wi(r.data)[2][0].data)],a=io(n[0].meta[1][0].data);if(a!=6001)throw new Error("6000 unexpected reference to ".concat(a));return function(s,o,i){var c,u=Wi(o.data),l={s:{r:0,c:0},e:{r:0,c:0}};if(l.e.r=(io(u[6][0].data)>>>0)-1,l.e.r<0)throw new Error("Invalid row varint ".concat(u[6][0].data));if(l.e.c=(io(u[7][0].data)>>>0)-1,l.e.c<0)throw new Error("Invalid col varint ".concat(u[7][0].data));i["!ref"]=_i(l);var A=Wi(u[4][0].data),h=Hy(s,s[ps(A[4][0].data)][0]),f=(c=A[17])!=null&&c[0]?Hy(s,s[ps(A[17][0].data)][0]):[],d=Wi(A[3][0].data),g=0;d[1].forEach(function(p){var m=Wi(p.data),v=s[ps(m[2][0].data)][0],y=io(v.meta[1][0].data);if(y!=6002)throw new Error("6001 unexpected reference to ".concat(y));var I=ZE(0,v);I.data.forEach(function(E,k){E.forEach(function(R,T){var j=In({r:g+k,c:T}),W=jy(R,h,f);W&&(i[j]=W)})}),g+=I.nrows})}(e,n[0],t),t}function $E(e,r){var t={SheetNames:[],Sheets:{}};if(Bf(Wi(r.data)[1],ps).forEach(function(n){e[n].forEach(function(a){if(io(a.meta[1][0].data)==2){var s=function(o,i){var c,u=Wi(i.data),l={name:(c=u[1])!=null&&c[0]?mp(u[1][0].data):"",sheets:[]};return Bf(u[2],ps).forEach(function(A){o[A].forEach(function(h){io(h.meta[1][0].data)==6e3&&l.sheets.push(XE(o,h))})}),l}(e,a);s.sheets.forEach(function(o,i){Zy(t,o,i==0?s.name:s.name+"_"+i,!0)})}})}),t.SheetNames.length==0)throw new Error("Empty NUMBERS file");return t}function bp(e){var r,t,n,a,s={},o=[];if(e.FullPaths.forEach(function(c){if(c.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(c){if(c.name.match(/\.iwa$/)){var u,l;try{u=yc(c.content)}catch(A){return console.log("?? "+c.content.length+" "+(A.message||A))}try{l=ac(u)}catch(A){return console.log("## "+(A.message||A))}l.forEach(function(A){s[A.id]=A.messages,o.push(A.id)})}}),!o.length)throw new Error("File has no messages");var i=((a=(n=(t=(r=s==null?void 0:s[1])==null?void 0:r[0])==null?void 0:t.meta)==null?void 0:n[1])==null?void 0:a[0].data)&&io(s[1][0].meta[1][0].data)==1&&s[1][0];if(i||o.forEach(function(c){s[c].forEach(function(u){if(io(u.meta[1][0].data)>>>0==1){if(i)throw new Error("Document has multiple roots");i=u}})}),!i)throw new Error("Cannot find Document root");return $E(s,i)}function ew(e,r,t){var n,a,s,o;if(!((n=e[6])!=null&&n[0])||!((a=e[7])!=null&&a[0]))throw"Mutation only works on post-BNC storages!";if((o=(s=e[8])==null?void 0:s[0])!=null&&o.data&&io(e[8][0].data)>0)throw"Math only works with normal offsets";for(var i=0,c=Uu(e[7][0].data),u=0,l=[],A=Uu(e[4][0].data),h=0,f=[],d=0;d]*r:id="([^"]*)"/)||["",""])[1];return k["!id"][R].Target}(rc(e,d,!0),Xl(rc(e,g,!0),d)),m=Vh(p,d),v=af(m);h=fE(rc(e,m,!0),0,0,Xl(rc(e,v,!0),m),0,h);break;case"macro":I=r,s[n],I.slice(-4),h={"!type":"macro"};break;case"dialog":h=function(E,k,R,T,j,W,H,X){return k.slice(-4),{"!type":"dialog"}}(0,r,0,0,s[n]);break;default:throw new Error("Unrecognized sheet type "+i)}o[n]=h;var y=[];s&&s[n]&&za(s[n]).forEach(function(E){var k="";if(s[n][E].Type==Si.CMNT){k=Vh(s[n][E].Target,r);var R=xy(Co(e,k,!0),k,c);if(!R||!R.length)return;Km(h,R,!1)}s[n][E].Type==Si.TCMNT&&(k=Vh(s[n][E].Target,r),y=y.concat(function(T,j){var W=[],H=!1,X={},x=0;return T.replace(us,function(N,C){var w=ci(N);switch(au(w[0])){case"":case"":case"":case"":break;case"":X.t!=null&&W.push(X);break;case"":case"":X.t=T.slice(x,C).replace(/\r\n/g,` `).replace(/\r/g,` `);break;case"":case"":case"":H=!1;break;default:if(!H&&j.WTF)throw new Error("unrecognized "+w[0]+" in threaded comments")}return N}),W}(Co(e,k,!0),c)))}),y&&y.length&&Km(h,y,!0,c.people||[])}catch(E){if(c.WTF)throw E}var I}function Ic(e){return e.charAt(0)=="/"?e.slice(1):e}function rw(e,r){if(qA(),Cp(r=r||{}),gc(e,"META-INF/manifest.xml")||gc(e,"objectdata.xml"))return Oy(e,r);if(gc(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(bp!==void 0){if(e.FileIndex)return bp(e);var t=Pn.utils.cfb_new();return lv(e).forEach(function(N){yi(t,N,uv(e,N))}),bp(t)}throw new Error("Unsupported NUMBERS file")}if(!gc(e,"[Content_Types].xml"))throw gc(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):gc(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var n,a,s=lv(e),o=function(N){var C={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};if(!N||!N.match)return C;var w={};if((N.match(us)||[]).forEach(function(Q){var B=ci(Q);switch(B[0].replace(ob,"<")){case"0?C.calcchains[0]:"",C.sst=C.strs.length>0?C.strs[0]:"",C.style=C.styles.length>0?C.styles[0]:"",C.defaults=w,delete C.calcchains,C}(rc(e,"[Content_Types].xml")),i=!1;if(o.workbooks.length===0&&Co(e,a="xl/workbook.xml",!0)&&o.workbooks.push(a),o.workbooks.length===0){if(!Co(e,a="xl/workbook.bin",!0))throw new Error("Could not find workbook");o.workbooks.push(a),i=!0}o.workbooks[0].slice(-3)=="bin"&&(i=!0);var c={},u={};if(!r.bookSheets&&!r.bookProps){if(ah=[],o.sst)try{ah=yf(Co(e,Ic(o.sst)),o.sst,r)}catch(N){if(r.WTF)throw N}r.cellStyles&&o.themes.length&&(c=function(N,C,w){return Ym(N,w)}(rc(e,o.themes[0].replace(/^\//,""),!0)||"",o.themes[0],r)),o.style&&(u=ky(Co(e,Ic(o.style)),o.style,c,r))}o.links.map(function(N){try{return Xl(rc(e,af(Ic(N))),N),wE(Co(e,Ic(N)),0,N,r)}catch{}});var l=hp(Co(e,Ic(o.workbooks[0])),o.workbooks[0],r),A={},h="";o.coreprops.length&&((h=Co(e,Ic(o.coreprops[0]),!0))&&(A=Xv(h)),o.extprops.length!==0&&(h=Co(e,Ic(o.extprops[0]),!0))&&function(N,C,w){var Q={};C||(C={}),N=ua(N),$l.forEach(function(B){var S=(N.match(Zh(B[0]))||[])[1];switch(B[2]){case"string":S&&(C[B[1]]=Mi(S));break;case"bool":C[B[1]]=S==="true";break;case"raw":var O=N.match(new RegExp("<"+B[0]+"[^>]*>([\\s\\S]*?)"));O&&O.length>0&&(Q[B[1]]=O[1])}}),Q.HeadingPairs&&Q.TitlesOfParts&&tm(Q.HeadingPairs,Q.TitlesOfParts,C,w)}(h,A,r));var f={};r.bookSheets&&!r.bookProps||o.custprops.length!==0&&(h=rc(e,Ic(o.custprops[0]),!0))&&(f=function(N,C){var w={},Q="",B=N.match(Qb);if(B)for(var S=0;S!=B.length;++S){var O=B[S],F=ci(O);switch(F[0]){case"":Q=null;break;default:if(O.indexOf(""),M=Y[0].slice(4),z=Y[1];switch(M){case"lpstr":case"bstr":case"lpwstr":case"cy":case"error":w[Q]=Mi(z);break;case"bool":w[Q]=Fa(z);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":w[Q]=parseInt(z,10);break;case"r4":case"r8":case"decimal":w[Q]=parseFloat(z);break;case"filetime":case"date":w[Q]=Ga(z);break;default:if(M.slice(-1)=="/")break;C.WTF&&typeof console<"u"&&console.warn("Unexpected",O,M,Y)}}else if(O.slice(0,2)!=="0&&(n=A.SheetNames),r.bookProps&&(d.Props=A,d.Custprops=f),r.bookSheets&&n!==void 0&&(d.SheetNames=n),r.bookSheets?d.SheetNames:r.bookProps))return d;n={};var g={};r.bookDeps&&o.calcchain&&(g=EE(Co(e,Ic(o.calcchain)),o.calcchain));var p,m,v=0,y={},I=l.Sheets;A.Worksheets=I.length,A.SheetNames=[];for(var E=0;E!=I.length;++E)A.SheetNames[E]=I[E].name;var k=i?"bin":"xml",R=o.workbooks[0].lastIndexOf("/"),T=(o.workbooks[0].slice(0,R+1)+"_rels/"+o.workbooks[0].slice(R+1)+".rels").replace(/^\//,"");gc(e,T)||(T="xl/_rels/workbook."+k+".rels");var j=Xl(rc(e,T,!0),T.replace(/_rels.*/,"s5s"));(o.metadata||[]).length>=1&&(r.xlmeta=BE(Co(e,Ic(o.metadata[0])),o.metadata[0],r)),(o.people||[]).length>=1&&(r.people=function(N,C){var w=[],Q=!1;return N.replace(us,function(B){var S=ci(B);switch(au(S[0])){case"":case"":case"":case"":case"":break;case"":Q=!1;break;default:if(!Q&&C.WTF)throw new Error("unrecognized "+S[0]+" in threaded comments")}return B}),w}(Co(e,Ic(o.people[0])),r)),j&&(j=function(N,C){if(!N)return 0;try{N=C.map(function(w){return w.id||(w.id=w.strRelID),[w.name,N["!id"][w.id].Target,(Q=N["!id"][w.id].Type,Si.WS.indexOf(Q)>-1?"sheet":Q==Si.CS?"chart":Q==Si.DS?"dialog":Q==Si.MS?"macro":Q&&Q.length?Q:"sheet")];var Q})}catch{return null}return N&&N.length!==0?N:null}(j,l.Sheets));var W=Co(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(v=0;v!=A.Worksheets;++v){var H="sheet";if(j&&j[v]?(p="xl/"+j[v][1].replace(/[\/]?xl\//,""),gc(e,p)||(p=j[v][1]),gc(e,p)||(p=T.replace(/_rels\/.*$/,"")+j[v][1]),H=j[v][2]):p=(p="xl/worksheets/sheet"+(v+1-W)+"."+k).replace(/sheet0\./,"sheet."),m=p.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),r&&r.sheets!=null)switch(typeof r.sheets){case"number":if(v!=r.sheets)continue e;break;case"string":if(A.SheetNames[v].toLowerCase()!=r.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(r.sheets)){for(var X=!1,x=0;x!=r.sheets.length;++x)typeof r.sheets[x]=="number"&&r.sheets[x]==v&&(X=1),typeof r.sheets[x]=="string"&&r.sheets[x].toLowerCase()==A.SheetNames[v].toLowerCase()&&(X=1);if(!X)continue e}}tw(e,p,m,A.SheetNames[v],v,y,n,H,r,l,c,u)}return d={Directory:o,Workbook:l,Props:A,Custprops:f,Deps:g,Sheets:n,SheetNames:A.SheetNames,Strings:ah,Styles:u,Themes:c,SSF:Ra(ai)},r&&r.bookFiles&&(e.files?(d.keys=s,d.files=e.files):(d.keys=[],d.files={},e.FullPaths.forEach(function(N,C){N=N.replace(/^Root Entry[\/]/,""),d.keys.push(N),d.files[N]=e.FileIndex[C]}))),r&&r.bookVBA&&(o.vba.length>0?d.vbaraw=Co(e,Ic(o.vba[0]),!0):o.defaults&&o.defaults.bin===kC&&(d.vbaraw=Co(e,"xl/vbaProject.bin",!0))),d}function nw(e,r){var t,n,a=r||{},s="Workbook",o=Pn.find(e,s);try{if(s="/!DataSpaces/Version",!(o=Pn.find(e,s))||!o.content)throw new Error("ECMA-376 Encrypted file missing "+s);if(t=o.content,(n={}).id=t.read_shift(0,"lpp4"),n.R=Pu(t,4),n.U=Pu(t,4),n.W=Pu(t,4),s="/!DataSpaces/DataSpaceMap",!(o=Pn.find(e,s))||!o.content)throw new Error("ECMA-376 Encrypted file missing "+s);var i=function(l){var A=[];l.l+=4;for(var h=l.read_shift(4);h-- >0;)A.push(eC(l));return A}(o.content);if(i.length!==1||i[0].comps.length!==1||i[0].comps[0].t!==0||i[0].name!=="StrongEncryptionDataSpace"||i[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+s);if(s="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",!(o=Pn.find(e,s))||!o.content)throw new Error("ECMA-376 Encrypted file missing "+s);var c=function(l){var A=[];l.l+=4;for(var h=l.read_shift(4);h-- >0;)A.push(l.read_shift(0,"lpp4"));return A}(o.content);if(c.length!=1||c[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+s);if(s="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",!(o=Pn.find(e,s))||!o.content)throw new Error("ECMA-376 Encrypted file missing "+s);Mm(o.content)}catch{}if(s="/EncryptionInfo",!(o=Pn.find(e,s))||!o.content)throw new Error("ECMA-376 Encrypted file missing "+s);var u=function(l){var A=Pu(l);switch(A.Minor){case 2:return[A.Minor,tC(l)];case 3:return[A.Minor,Lm()];case 4:return[A.Minor,rC(l)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+A.Minor)}(o.content);if(s="/EncryptedPackage",!(o=Pn.find(e,s))||!o.content)throw new Error("ECMA-376 Encrypted file missing "+s);if(u[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(u[1],o.content,a.password||"",a);if(u[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(u[1],o.content,a.password||"",a);throw new Error("File is password-protected")}function iw(e,r){return r.bookType=="ods"?Gy(e,r):r.bookType=="numbers"?function(t,n){if(!n||!n.numbers)throw new Error("Must pass a `numbers` option -- check the README");var a=t.Sheets[t.SheetNames[0]];t.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var s=Es(a["!ref"]);s.s.r=s.s.c=0;var o=!1;s.e.c>9&&(o=!0,s.e.c=9),s.e.r>49&&(o=!0,s.e.r=49),o&&console.error("The Numbers writer is currently limited to ".concat(_i(s)));var i=Ky(a,{range:s,header:1}),c=["~Sh33tJ5~"];i.forEach(function(M){return M.forEach(function(z){typeof z=="string"&&c.push(z)})});var u={},l=[],A=Pn.read(n.numbers,{type:"base64"});A.FileIndex.map(function(M,z){return[M,A.FullPaths[z]]}).forEach(function(M){var z=M[0],ue=M[1];z.type==2&&z.name.match(/\.iwa/)&&ac(yc(z.content)).forEach(function(ae){l.push(ae.id),u[ae.id]={deps:[],location:ue,type:io(ae.messages[0].meta[1][0].data)}})}),l.sort(function(M,z){return M-z});var h=l.filter(function(M){return M>1}).map(function(M){return[M,la(M)]});A.FileIndex.map(function(M,z){return[M,A.FullPaths[z]]}).forEach(function(M){var z=M[0];M[1],z.name.match(/\.iwa/)&&ac(yc(z.content)).forEach(function(ue){ue.messages.forEach(function(ae){h.forEach(function(Ne){ue.messages.some(function(Ge){return io(Ge.meta[1][0].data)!=11006&&function(Ye,Ae){e:for(var te=0;te<=Ye.length-Ae.length;++te){for(var he=0;he-1,o={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};Ep(n=n||{});var i=m0(),c="",u=0;if(n.cellXfs=[],vl(n.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),yi(i,c="docProps/core.xml",$v(t.Props,n)),o.coreprops.push(c),ta(n.rels,2,c,Si.CORE_PROPS),c="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(t.Workbook&&t.Workbook.Sheets){for(var l=[],A=0;A0&&(yi(i,c="docProps/custom.xml",nm(t.Custprops)),o.custprops.push(c),ta(n.rels,4,c,Si.CUST_PROPS)),u=1;u<=t.SheetNames.length;++u){var h={"!id":{}},f=t.Sheets[t.SheetNames[u-1]];if((f||{})["!type"],yi(i,c="xl/worksheets/sheet"+u+"."+a,QE(u-1,c,n,t,h)),o.sheets.push(c),ta(n.wbrels,-1,"worksheets/sheet"+u+"."+a,Si.WS[0]),f){var d=f["!comments"],g=!1,p="";d&&d.length>0&&(yi(i,p="xl/comments"+u+"."+a,kE(d,p)),o.comments.push(p),ta(h,-1,"../comments"+u+"."+a,Si.CMNT),g=!0),f["!legacy"]&&g&&yi(i,"xl/drawings/vmlDrawing"+u+".vml",Wm(u,f["!comments"])),delete f["!comments"],delete f["!legacy"]}h["!id"].rId1&&yi(i,af(c),ZA(h))}return n.Strings!=null&&n.Strings.length>0&&(yi(i,c="xl/sharedStrings."+a,function(m,v,y){return(v.slice(-4)===".bin"?$b:Fm)(m,y)}(n.Strings,c,n)),o.strs.push(c),ta(n.wbrels,-1,"sharedStrings."+a,Si.SST)),yi(i,c="xl/workbook."+a,function(m,v,y){return(v.slice(-4)===".bin"?Qy:wy)(m)}(t,c)),o.workbooks.push(c),ta(n.rels,1,c,Si.WB),yi(i,c="xl/theme/theme1.xml",rp(t.Themes,n)),o.themes.push(c),ta(n.wbrels,-1,"theme/theme1.xml",Si.THEME),yi(i,c="xl/styles."+a,function(m,v,y){return(v.slice(-4)===".bin"?gC:Ud)(m,y)}(t,c,n)),o.styles.push(c),ta(n.wbrels,-1,"styles."+a,Si.STY),t.vbaraw&&s&&(yi(i,c="xl/vbaProject.bin",t.vbaraw),o.vba.push(c),ta(n.wbrels,-1,"vbaProject.bin",Si.VBA)),yi(i,c="xl/metadata."+a,function(m){return(m.slice(-4)===".bin"?EC:qm)()}(c)),o.metadata.push(c),ta(n.wbrels,-1,"metadata."+a,Si.XLMETA),yi(i,"[Content_Types].xml",zv(o,n)),yi(i,"_rels/.rels",ZA(n.rels)),yi(i,"xl/_rels/workbook."+a+".rels",ZA(n.wbrels)),delete n.revssf,delete n.ssf,i}(e,r):function(t,n){nh=1024,t&&!t.SSF&&(t.SSF=Ra(ai)),t&&t.SSF&&(qA(),Id(t.SSF),n.revssf=Cd(t.SSF),n.revssf[t.SSF[65535]]=0,n.ssf=t.SSF),n.rels={},n.wbrels={},n.Strings=[],n.Strings.Count=0,n.Strings.Unique=0,mf?n.revStrings=new Map:(n.revStrings={},n.revStrings.foo=[],delete n.revStrings.foo);var a="xml",s=zm.indexOf(n.bookType)>-1,o={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};Ep(n=n||{});var i=m0(),c="",u=0;if(n.cellXfs=[],vl(n.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),yi(i,c="docProps/core.xml",$v(t.Props,n)),o.coreprops.push(c),ta(n.rels,2,c,Si.CORE_PROPS),c="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(t.Workbook&&t.Workbook.Sheets){for(var l=[],A=0;A0&&(yi(i,c="docProps/custom.xml",nm(t.Custprops)),o.custprops.push(c),ta(n.rels,4,c,Si.CUST_PROPS));var h=["SheetJ5"];for(n.tcid=0,u=1;u<=t.SheetNames.length;++u){var f={"!id":{}},d=t.Sheets[t.SheetNames[u-1]];if((d||{})["!type"],yi(i,c="xl/worksheets/sheet"+u+"."+a,gy(u-1,n,t,f)),o.sheets.push(c),ta(n.wbrels,-1,"worksheets/sheet"+u+"."+a,Si.WS[0]),d){var g=d["!comments"],p=!1,m="";if(g&&g.length>0){var v=!1;g.forEach(function(y){y[1].forEach(function(I){I.T==1&&(v=!0)})}),v&&(yi(i,m="xl/threadedComments/threadedComment"+u+"."+a,wC(g,h,n)),o.threadedcomments.push(m),ta(f,-1,"../threadedComments/threadedComment"+u+"."+a,Si.TCMNT)),yi(i,m="xl/comments"+u+"."+a,df(g)),o.comments.push(m),ta(f,-1,"../comments"+u+"."+a,Si.CMNT),p=!0}d["!legacy"]&&p&&yi(i,"xl/drawings/vmlDrawing"+u+".vml",Wm(u,d["!comments"])),delete d["!comments"],delete d["!legacy"]}f["!id"].rId1&&yi(i,af(c),ZA(f))}return n.Strings!=null&&n.Strings.length>0&&(yi(i,c="xl/sharedStrings."+a,Fm(n.Strings,n)),o.strs.push(c),ta(n.wbrels,-1,"sharedStrings."+a,Si.SST)),yi(i,c="xl/workbook."+a,wy(t)),o.workbooks.push(c),ta(n.rels,1,c,Si.WB),yi(i,c="xl/theme/theme1.xml",rp(t.Themes,n)),o.themes.push(c),ta(n.wbrels,-1,"theme/theme1.xml",Si.THEME),yi(i,c="xl/styles."+a,Ud(t,n)),o.styles.push(c),ta(n.wbrels,-1,"styles."+a,Si.STY),t.vbaraw&&s&&(yi(i,c="xl/vbaProject.bin",t.vbaraw),o.vba.push(c),ta(n.wbrels,-1,"vbaProject.bin",Si.VBA)),yi(i,c="xl/metadata."+a,qm()),o.metadata.push(c),ta(n.wbrels,-1,"metadata."+a,Si.XLMETA),h.length>1&&(yi(i,c="xl/persons/person.xml",function(y){var I=[fo,Zr("personList",null,{xmlns:_o.TCMNT,"xmlns:x":ql[0]}).replace(/[\/]>/,">")];return y.forEach(function(E,k){I.push(Zr("person",null,{displayName:E,id:"{54EE7950-7262-4200-6969-"+("000000000000"+k).slice(-12)+"}",userId:E,providerId:"None"}))}),I.push(""),I.join("")}(h)),o.people.push(c),ta(n.wbrels,-1,"persons/person.xml",Si.PEOPLE)),yi(i,"[Content_Types].xml",zv(o,n)),yi(i,"_rels/.rels",ZA(n.rels)),yi(i,"xl/_rels/workbook."+a+".rels",ZA(n.wbrels)),delete n.revssf,delete n.ssf,i}(e,r)}function wp(e,r){var t="";switch((r||{}).type||"base64"){case"buffer":case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":t=$s(e.slice(0,12));break;case"binary":t=e;break;default:throw new Error("Unrecognized type "+(r&&r.type||"undefined"))}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3),t.charCodeAt(4),t.charCodeAt(5),t.charCodeAt(6),t.charCodeAt(7)]}function Jy(e,r){var t=0;e:for(;t"u"||wi||(t.type="array")),t.type=="string"&&(s=!0,t.type="binary",t.codepage=65001,a=function(c){return c.match(/[^\x00-\x7F]/)?Oc(c):c}(e)),t.type=="array"&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var o=new ArrayBuffer(3),i=new Uint8Array(o);if(i.foo="bar",!i.foo)return(t=Ra(t)).type="array",Qp(u0(a),t)}switch((n=wp(a,t))[0]){case 208:if(n[1]===207&&n[2]===17&&n[3]===224&&n[4]===161&&n[5]===177&&n[6]===26&&n[7]===225)return function(c,u){return Pn.find(c,"EncryptedPackage")?nw(c,u):gp(c,u)}(Pn.read(a,t),t);break;case 9:if(n[1]<=8)return gp(a,t);break;case 60:return bf(a,t);case 73:if(n[1]===73&&n[2]===42&&n[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(n[1]===68)return function(c,u){var l=u||{},A=!!l.WTF;l.WTF=!0;try{var h=V0.to_workbook(c,l);return l.WTF=A,h}catch(f){if(l.WTF=A,!f.message.match(/SYLK bad record ID/)&&A)throw f;return th.to_workbook(c,u)}}(a,t);break;case 84:if(n[1]===65&&n[2]===66&&n[3]===76)return Rm.to_workbook(a,t);break;case 80:return n[1]===75&&n[2]<9&&n[3]<9?function(c,u){var l=c,A=u||{};return A.type||(A.type=wi&&Buffer.isBuffer(c)?"buffer":"base64"),rw(Av(l,A),A)}(a,t):Bp(e,a,t,s);case 239:return n[3]===60?bf(a,t):Bp(e,a,t,s);case 255:if(n[1]===254)return function(c,u){var l=c;return u.type=="base64"&&(l=$s(l)),l=sl.utils.decode(1200,l.slice(2),"str"),u.type="binary",Jy(l,u)}(a,t);if(n[1]===0&&n[2]===2&&n[3]===0)return nA.to_workbook(a,t);break;case 0:if(n[1]===0&&(n[2]>=2&&n[3]===0||n[2]===0&&(n[3]===8||n[3]===9)))return nA.to_workbook(a,t);break;case 3:case 131:case 139:case 140:return z0.to_workbook(a,t);case 123:if(n[1]===92&&n[2]===114&&n[3]===116)return uf.to_workbook(a,t);break;case 10:case 13:case 32:return function(c,u){var l="",A=wp(c,u);switch(u.type){case"base64":l=$s(c);break;case"binary":l=c;break;case"buffer":l=c.toString("binary");break;case"array":l=Jl(c);break;default:throw new Error("Unrecognized type "+u.type)}return A[0]==239&&A[1]==187&&A[2]==191&&(l=ua(l)),u.type="binary",Jy(l,u)}(a,t);case 137:if(n[1]===80&&n[2]===78&&n[3]===71)throw new Error("PNG Image File is not a spreadsheet")}return Yb.indexOf(n[0])>-1&&n[2]<=12&&n[3]<=31?z0.to_workbook(a,t):Bp(e,a,t,s)}function qy(e,r){switch(r.type){case"base64":case"binary":break;case"buffer":case"array":r.type="";break;case"file":return Wh(r.file,Pn.write(e,{type:wi?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+r.bookType+"' files");default:throw new Error("Unrecognized type "+r.type)}return Pn.write(e,r)}function aw(e,r){var t=Ra(r||{});return function(n,a){var s={},o=wi?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(a.compression&&(s.compression="DEFLATE"),a.password)s.type=o;else switch(a.type){case"base64":s.type="base64";break;case"binary":s.type="string";break;case"string":throw new Error("'string' output type invalid for '"+a.bookType+"' files");case"buffer":case"file":s.type=o;break;default:throw new Error("Unrecognized type "+a.type)}var i=n.FullPaths?Pn.write(n,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[s.type]||s.type,compression:!!a.compression}):n.generate(s);if(typeof Deno<"u"&&typeof i=="string"){if(a.type=="binary"||a.type=="base64")return i;i=new Uint8Array(hd(i))}return a.password&&typeof encrypt_agile<"u"?qy(encrypt_agile(i,a.password),a):a.type==="file"?Wh(a.file,i):a.type=="string"?ua(i):i}(iw(e,t),t)}function cu(e,r,t){t||(t="");var n=t+e;switch(r.type){case"base64":return YA(Oc(n));case"binary":return Oc(n);case"string":return e;case"file":return Wh(r.file,n,"utf8");case"buffer":return wi?_u(n,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(n):cu(n,{type:"binary"}).split("").map(function(a){return a.charCodeAt(0)})}throw new Error("Unrecognized type "+r.type)}function Zd(e,r){switch(r.type){case"string":case"base64":case"binary":for(var t="",n=0;n"}(0,0,i));for(var h=A.s.r;h<=A.e.r;++h)l.push(YE(s,A,h,i));return l.push("
"+u),l.join("")}(e.Sheets[e.SheetNames[a]],t),t);case"txt":return function(s,o){switch(o.type){case"base64":return YA(s);case"binary":case"string":return s;case"file":return Wh(o.file,s,"binary");case"buffer":return wi?_u(s,"binary"):s.split("").map(function(i){return i.charCodeAt(0)})}throw new Error("Unrecognized type "+o.type)}(function(s,o){o||(o={}),o.FS=" ",o.RS=` `;var i=Vy(s,o);return i}(e.Sheets[e.SheetNames[a]],t),t);case"csv":return cu(Vy(e.Sheets[e.SheetNames[a]],t),t,"\uFEFF");case"dif":return cu(Rm.from_sheet(e.Sheets[e.SheetNames[a]],t),t);case"dbf":return Zd(z0.from_sheet(e.Sheets[e.SheetNames[a]],t),t);case"prn":return cu(th.from_sheet(e.Sheets[e.SheetNames[a]],t),t);case"rtf":return cu(uf.from_sheet(e.Sheets[e.SheetNames[a]],t),t);case"eth":return cu(Z0.from_sheet(e.Sheets[e.SheetNames[a]],t),t);case"fods":return cu(Gy(e,t),t);case"wk1":return Zd(nA.sheet_to_wk1(e.Sheets[e.SheetNames[a]],t),t);case"wk3":return Zd(nA.book_to_wk3(e,t),t);case"biff2":t.biff||(t.biff=2);case"biff3":t.biff||(t.biff=3);case"biff4":return t.biff||(t.biff=4),Zd(My(e,t),t);case"biff5":t.biff||(t.biff=5);case"biff8":case"xla":case"xls":return t.biff||(t.biff=8),function(s,o){var i=o||{};return qy(LE(s,i),i)}(e,t);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return aw(e,t);default:throw new Error("Unrecognized bookType |"+t.bookType+"|")}}function ow(e,r,t,n,a,s,o,i){var c=Ho(t),u=i.defval,l=i.raw||!Object.prototype.hasOwnProperty.call(i,"raw"),A=!0,h=a===1?[]:{};if(a!==1)if(Object.defineProperty)try{Object.defineProperty(h,"__rowNum__",{value:t,enumerable:!1})}catch{h.__rowNum__=t}else h.__rowNum__=t;if(!o||e[t])for(var f=r.s.c;f<=r.e.c;++f){var d=o?e[t][f]:e[n[f]+c];if(d!==void 0&&d.t!==void 0){var g=d.v;switch(d.t){case"z":if(g==null)break;continue;case"e":g=g==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+d.t)}if(s[f]!=null){if(g==null)if(d.t=="e"&&g===null)h[s[f]]=null;else if(u!==void 0)h[s[f]]=u;else{if(!l||g!==null)continue;h[s[f]]=null}else h[s[f]]=l&&(d.t!=="n"||d.t==="n"&&i.rawNumbers!==!1)?g:ll(d,g,i);g!=null&&(A=!1)}}else{if(u===void 0)continue;s[f]!=null&&(h[s[f]]=u)}}return{row:h,isempty:A}}function Ky(e,r){if(e==null||e["!ref"]==null)return[];var t={t:"n",v:0},n=0,a=1,s=[],o=0,i="",c={s:{r:0,c:0},e:{r:0,c:0}},u=r||{},l=u.range!=null?u.range:e["!ref"];switch(u.header===1?n=1:u.header==="A"?n=2:Array.isArray(u.header)?n=3:u.header==null&&(n=0),typeof l){case"string":c=ea(l);break;case"number":(c=ea(e["!ref"])).s.r=l;break;default:c=l}n>0&&(a=0);var A=Ho(c.s.r),h=[],f=[],d=0,g=0,p=Array.isArray(e),m=c.s.r,v=0,y={};p&&!e[m]&&(e[m]=[]);var I=u.skipHidden&&e["!cols"]||[],E=u.skipHidden&&e["!rows"]||[];for(v=c.s.c;v<=c.e.c;++v)if(!(I[v]||{}).hidden)switch(h[v]=Eo(v),t=p?e[m][v]:e[h[v]+A],n){case 1:s[v]=v-c.s.c;break;case 2:s[v]=h[v];break;case 3:s[v]=u.header[v-c.s.c];break;default:if(t==null&&(t={w:"__EMPTY",t:"s"}),i=o=ll(t,null,u),g=y[o]||0){do i=o+"_"+g++;while(y[i]);y[o]=g,y[i]=1}else y[o]=1;s[v]=i}for(m=c.s.r+a;m<=c.e.r;++m)if(!(E[m]||{}).hidden){var k=ow(e,c,m,h,n,s,p,u);(k.isempty===!1||(n===1?u.blankrows!==!1:u.blankrows))&&(f[d++]=k.row)}return f.length=d,f}var zy=/"/g;function Xd(e,r,t,n,a,s,o,i){for(var c=!0,u=[],l="",A=Ho(t),h=r.s.c;h<=r.e.c;++h)if(n[h]){var f=i.dense?(e[t]||[])[h]:e[n[h]+A];if(f==null)l="";else if(f.v!=null){c=!1,l=""+(i.rawNumbers&&f.t=="n"?f.v:ll(f,null,i));for(var d=0,g=0;d!==l.length;++d)if((g=l.charCodeAt(d))===a||g===s||g===34||i.forceQuotes){l='"'+l.replace(zy,'""')+'"';break}l=="ID"&&(l='"ID"')}else f.f==null||f.F?l="":(c=!1,(l="="+f.f).indexOf(",")>=0&&(l='"'+l.replace(zy,'""')+'"'));u.push(l)}return i.blankrows===!1&&c?null:u.join(o)}function Vy(e,r){var t=[],n=r??{};if(e==null||e["!ref"]==null)return"";var a=ea(e["!ref"]),s=n.FS!==void 0?n.FS:",",o=s.charCodeAt(0),i=n.RS!==void 0?n.RS:` `,c=i.charCodeAt(0),u=new RegExp((s=="|"?"\\|":s)+"+$"),l="",A=[];n.dense=Array.isArray(e);for(var h=n.skipHidden&&e["!cols"]||[],f=n.skipHidden&&e["!rows"]||[],d=a.s.c;d<=a.e.c;++d)(h[d]||{}).hidden||(A[d]=Eo(d));for(var g=0,p=a.s.r;p<=a.e.r;++p)(f[p]||{}).hidden||(l=Xd(e,a,p,A,o,c,s,n))!=null&&(n.strip&&(l=l.replace(u,"")),(l||n.blankrows!==!1)&&t.push((g++?i:"")+l));return delete n.dense,t.join("")}function Zy(e,r,t,n){var a=1;if(!t)for(;a<=65535&&e.SheetNames.indexOf(t="Sheet"+a)!=-1;++a,t=void 0);if(!t||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(t)>=0){var s=t.match(/(^.*?)(\d+)$/);a=s&&+s[2]||0;var o=s&&s[1]||t;for(++a;a<=65535&&e.SheetNames.indexOf(t=o+a)!=-1;++a);}if(Ey(t),e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");return e.SheetNames.push(t),e.Sheets[t]=r,t}function Xy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}var kp=["#FFFFFF","#000000","#BFBFBF","#323232","#4472C4","#ED7D31","#A5A5A5","#FFC000","#5B9BD5","#71AD47"],xp=["#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#800000","#008000","#000080","#808000","#800080","#008080","#C0C0C0","#808080","#9999FF","#993366","#FFFFCC","#CCFFFF","#660066","#FF8080","#0066CC","#CCCCFF","#000080","#FF00FF","#FFFF00","#00FFFF","#800080","#800000","#008080","#0000FF","#00CCFF","#CCFFFF","#CCFFCC","#FFFF99","#99CCFF","#FF99CC","#CC99FF","#FFCC99","#3366FF","#33CCCC","#99CC00","#FFCC00","#FF9900","#FF6600","#666699","#969696","#003366","#339966","#003300","#333300","#993300","#993366","#333399","#333333","#000000"],sw=80;function $y(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(t,n){return new Promise(function(a,s){var o=new XMLHttpRequest;o.open(n.method||"GET",t,!0),o.responseType=n.responseType||"arraybuffer",o.onload=function(){o.status===200?a(o.response):s(o.status)},o.onerror=function(){s(o.status)},o.withCredentials=n.withCredentials||!1,n.headers&&Object.keys(n.headers).forEach(function(i){o.setRequestHeader(i,n.headers[i])}),o.send(n.body)})}(function(t){return typeof t=="string"?t:t instanceof Blob?URL.createObjectURL(t):t instanceof ArrayBuffer?URL.createObjectURL(new Blob([t])):t instanceof Response?URL.createObjectURL(t.blob()):t}(e),r)}function Sp(e){if(typeof e=="object")return"#000000";if(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.test(e))return e.startsWith("#")?e:"#"+e;e=e.trim().toLowerCase();var r={};try{var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return r.r=parseInt(t[2],16),r.g=parseInt(t[3],16),r.b=parseInt(t[4],16),r.a=parseInt(t[1],16)/255,On("rgba(".concat(r.r,", ").concat(r.g,", ").concat(r.b,", ").concat(r.a,")")).toHexString()}catch(n){console.warn(n)}}function _p(e,r){return e>9?"#C7C9CC":r===void 0?kp[e]:r>0?function(t,n){for(var a=a0(t),s=0;s<3;s++)a[s]=Math.floor((255-a[s])*n+a[s]);return P1(a[0],a[1],a[2])}(kp[e],r):function(t,n){for(var a=a0(t),s=0;s<3;s++)a[s]=Math.floor(a[s]*(1-n));return P1(a[0],a[1],a[2])}(kp[e],Math.abs(r))}function cw(e){e.style=cd.cloneDeep(e.style);var r=null;e.style.fill&&e.style.fill.fgColor&&(r=e.style.fill.fgColor.argb?Sp(e.style.fill.fgColor.argb):e.style.fill.fgColor.hasOwnProperty("theme")?_p(e.style.fill.fgColor.theme,e.style.fill.fgColor.tint):e.style.fill.fgColor.indexed&&xp[e.style.fill.fgColor.indexed]||"#C7C9CC"),r&&(e.style.bgcolor=r);var t=null;if(e.style.font&&e.style.font.color&&(t=e.style.font.color.argb?Sp(e.style.font.color.argb):e.style.font.color.hasOwnProperty("theme")?_p(e.style.font.color.theme,e.style.font.color.tint):e.style.font.color.indexed&&xp[e.style.font.color.indexed]||"#000000"),t&&(e.style.color=t),e.style.alignment&&(e.style.alignment.horizontal&&(e.style.align=e.style.alignment.horizontal),e.style.alignment.vertical&&(e.style.valign=e.style.alignment.vertical)),e.style.alignment&&e.style.alignment.wrapText&&(e.style.textwrap=!0),e.style.border){var n={};Object.keys(e.style.border).forEach(function(a){var s=e.style.border[a],o="#000000";typeof s.color=="string"?o=s.color:s.color&&(s.color.argb?o=Sp(s.color.argb):s.color.hasOwnProperty("theme")?o=_p(s.color.theme,s.color.tint):s.color.indexed&&(o=xp[s.color.indexed])),n[a]=[s.style||"thin",o]}),e.style.border2=function(a){for(var s=1;su+1&&(a._columns=a._columns.slice(0,u+1)),function(A,h,f){for(var d=0;d<(A.columns||[]).length;d++)h.cols[d.toString()]={},A.columns[d]._hidden?h.cols[d.toString()].width=.1:A.columns[d].width?h.cols[d.toString()].width=6*A.columns[d].width+(f.widthOffset||0):h.cols[d.toString()].width=sw+(f.widthOffset||0);h.cols.len=Math.max(Object.keys(h.cols).length,f.minColLength||0)}(a,s,r),t.push(s)}),e._worksheets=n,{workbookData:t,workbookSource:e,medias:e.media||[]}}var Qf=[];function $d(e,r,t,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};t&&t._media.length&&t._media.forEach(function(s){var o=s.imageId,i=s.range;if(s.type==="image"){var c=function(u,l,A,h){for(var f,d,g=h.widthOffset,p=h.heightOffset,m=l.tl,v=l.br,y=l.ext,I=m||{},E=I.nativeCol,k=E===void 0?0:E,R=I.nativeColOff,T=R===void 0?0:R,j=I.nativeRow,W=j===void 0?0:j,H=I.nativeRowOff,X=H===void 0?0:H,x=eg,N=tg,C=0;C=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return o=c.done,c},e:function(c){i=!0,s=c},f:function(){try{o||t.return==null||t.return()}finally{if(i)throw s}}}}function tI(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t{const t=e.__vccOpts||e;for(const[n,a]of r)t[n]=a;return t};function rI(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function Rp(e){for(var r=1;r""}},setup(D){const U={width:"100%",height:"100%"},K=()=>{console.log("rendered")},ee=ge=>{console.log("error",ge)};return(ge,Ue)=>(zr(),Ma(Ti(a_),{src:D.previewSrc,style:U,onRendered:K,onError:ee},null,8,["src"]))}},s_=zu(o_,[["__scopeId","data-v-1c4118a3"]]);var e4={exports:{}};(function(D,U){(function(K,ee){D.exports=ee(e3,t3)})(Iu,function(K,ee){var ge=Object.defineProperty,Ue=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,_t=(G,J,oe)=>J in G?ge(G,J,{enumerable:!0,configurable:!0,writable:!0,value:oe}):G[J]=oe,Jt=(G,J)=>{for(var oe in J||(J={}))ht.call(J,oe)&&_t(G,oe,J[oe]);if(Ue)for(var oe of Ue(J))ut.call(J,oe)&&_t(G,oe,J[oe]);return G},ar=(G,J,oe)=>new Promise((Se,et)=>{var ie=Bt=>{try{tt(oe.next(Bt))}catch(Gt){et(Gt)}},xe=Bt=>{try{tt(oe.throw(Bt))}catch(Gt){et(Gt)}},tt=Bt=>Bt.done?Se(Bt.value):Promise.resolve(Bt.value).then(ie,xe);tt((oe=oe.apply(G,J)).next())});const Tt=`/*! For license information please see worker.js.LICENSE.txt */ var e={4186:(e,t,r)=>{var A=r(3749),n=r(8055),i=TypeError;e.exports=function(e){if(A(e))return e;throw new i(n(e)+" is not a function")}},9052:(e,t,r)=>{var A=r(8413),n=r(8055),i=TypeError;e.exports=function(e){if(A(e))return e;throw new i(n(e)+" is not a constructor")}},7330:(e,t,r)=>{var A=r(4597),n=String,i=TypeError;e.exports=function(e){if(A(e))return e;throw new i("Can't set "+n(e)+" as a prototype")}},4376:(e,t,r)=>{var A=r(418).has;e.exports=function(e){return A(e),e}},1458:(e,t,r)=>{var A=r(5811),n=r(5304),i=r(1601).f,a=A("unscopables"),o=Array.prototype;void 0===o[a]&&i(o,a,{configurable:!0,value:n(null)}),e.exports=function(e){o[a][e]=!0}},8149:(e,t,r)=>{var A=r(6903).charAt;e.exports=function(e,t,r){return t+(r?A(e,t).length:1)}},3399:(e,t,r)=>{var A=r(6921),n=TypeError;e.exports=function(e,t){if(A(t,e))return e;throw new n("Incorrect invocation")}},7447:(e,t,r)=>{var A=r(2674),n=String,i=TypeError;e.exports=function(e){if(A(e))return e;throw new i(n(e)+" is not an object")}},387:e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},8242:(e,t,r)=>{var A=r(4032),n=r(5026),i=r(9872),a=A.ArrayBuffer,o=A.TypeError;e.exports=a&&n(a.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==i(e))throw new o("ArrayBuffer expected");return e.byteLength}},8102:(e,t,r)=>{var A=r(4032),n=r(2116),i=r(8242),a=A.ArrayBuffer,o=a&&a.prototype,s=o&&n(o.slice);e.exports=function(e){if(0!==i(e))return!1;if(!s)return!1;try{return s(e,0,0),!1}catch(e){return!0}}},7060:(e,t,r)=>{var A=r(3455);e.exports=A((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},6033:(e,t,r)=>{var A=r(8102),n=TypeError;e.exports=function(e){if(A(e))throw new n("ArrayBuffer is detached");return e}},4676:(e,t,r)=>{var A=r(4032),n=r(2608),i=r(5026),a=r(9088),o=r(6033),s=r(8242),c=r(7395),g=r(6572),u=A.structuredClone,l=A.ArrayBuffer,h=A.DataView,I=Math.min,f=l.prototype,C=h.prototype,B=n(f.slice),Q=i(f,"resizable","get"),E=i(f,"maxByteLength","get"),d=n(C.getInt8),y=n(C.setInt8);e.exports=(g||c)&&function(e,t,r){var A,n=s(e),i=void 0===t?n:a(t),f=!Q||!Q(e);if(o(e),g&&(e=u(e,{transfer:[e]}),n===i&&(r||f)))return e;if(n>=i&&(!r||f))A=B(e,0,i);else{var C=r&&!f&&E?{maxByteLength:E(e)}:void 0;A=new l(i,C);for(var p=new h(e),v=new h(A),m=I(i,n),w=0;w{var A,n,i,a=r(387),o=r(2444),s=r(4032),c=r(3749),g=r(2674),u=r(9649),l=r(1179),h=r(8055),I=r(139),f=r(8552),C=r(8986),B=r(6921),Q=r(2611),E=r(9415),d=r(5811),y=r(5936),p=r(8301),v=p.enforce,m=p.get,w=s.Int8Array,b=w&&w.prototype,k=s.Uint8ClampedArray,D=k&&k.prototype,S=w&&Q(w),F=b&&Q(b),x=Object.prototype,R=s.TypeError,G=d("toStringTag"),N=y("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",U=a&&!!E&&"Opera"!==l(s.opera),M=!1,J={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},H={BigInt64Array:8,BigUint64Array:8},Y=function(e){var t=Q(e);if(g(t)){var r=m(t);return r&&u(r,L)?r[L]:Y(t)}},P=function(e){if(!g(e))return!1;var t=l(e);return u(J,t)||u(H,t)};for(A in J)(i=(n=s[A])&&n.prototype)?v(i)[L]=n:U=!1;for(A in H)(i=(n=s[A])&&n.prototype)&&(v(i)[L]=n);if((!U||!c(S)||S===Function.prototype)&&(S=function(){throw new R("Incorrect invocation")},U))for(A in J)s[A]&&E(s[A],S);if((!U||!F||F===x)&&(F=S.prototype,U))for(A in J)s[A]&&E(s[A].prototype,F);if(U&&Q(D)!==F&&E(D,F),o&&!u(F,G))for(A in M=!0,C(F,G,{configurable:!0,get:function(){return g(this)?this[N]:void 0}}),J)s[A]&&I(s[A],N,A);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:U,TYPED_ARRAY_TAG:M&&N,aTypedArray:function(e){if(P(e))return e;throw new R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!E||B(S,e)))return e;throw new R(h(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,A){if(o){if(r)for(var n in J){var i=s[n];if(i&&u(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}F[e]&&!r||f(F,e,r?t:U&&b[e]||t,A)}},exportTypedArrayStaticMethod:function(e,t,r){var A,n;if(o){if(E){if(r)for(A in J)if((n=s[A])&&u(n,e))try{delete n[e]}catch(e){}if(S[e]&&!r)return;try{return f(S,e,r?t:U&&S[e]||t)}catch(e){}}for(A in J)!(n=s[A])||n[e]&&!r||f(n,e,t)}},getTypedArrayConstructor:Y,isView:function(e){if(!g(e))return!1;var t=l(e);return"DataView"===t||u(J,t)||u(H,t)},isTypedArray:P,TypedArray:S,TypedArrayPrototype:F}},7226:(e,t,r)=>{var A=r(4032),n=r(2608),i=r(2444),a=r(387),o=r(2542),s=r(139),c=r(8986),g=r(4183),u=r(3455),l=r(3399),h=r(1211),I=r(5806),f=r(9088),C=r(3505),B=r(1306),Q=r(2611),E=r(9415),d=r(9557),y=r(4224),p=r(3951),v=r(2924),m=r(6911),w=r(8301),b=o.PROPER,k=o.CONFIGURABLE,D="ArrayBuffer",S="DataView",F="prototype",x="Wrong index",R=w.getterFor(D),G=w.getterFor(S),N=w.set,L=A[D],U=L,M=U&&U[F],J=A[S],H=J&&J[F],Y=Object.prototype,P=A.Array,O=A.RangeError,K=n(d),T=n([].reverse),q=B.pack,j=B.unpack,W=function(e){return[255&e]},Z=function(e){return[255&e,e>>8&255]},_=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},X=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},V=function(e){return q(C(e),23,4)},z=function(e){return q(e,52,8)},$=function(e,t,r){c(e[F],t,{configurable:!0,get:function(){return r(this)[t]}})},ee=function(e,t,r,A){var n=G(e),i=f(r),a=!!A;if(i+t>n.byteLength)throw new O(x);var o=n.bytes,s=i+n.byteOffset,c=y(o,s,s+t);return a?c:T(c)},te=function(e,t,r,A,n,i){var a=G(e),o=f(r),s=A(+n),c=!!i;if(o+t>a.byteLength)throw new O(x);for(var g=a.bytes,u=o+a.byteOffset,l=0;l>24)},setUint8:function(e,t){ne(this,e,t<<24>>24)}},{unsafe:!0})}else M=(U=function(e){l(this,M);var t=f(e);N(this,{type:D,bytes:K(P(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)})[F],H=(J=function(e,t,r){l(this,H),l(e,M);var A=R(e),n=A.byteLength,a=h(t);if(a<0||a>n)throw new O("Wrong offset");if(a+(r=void 0===r?n-a:I(r))>n)throw new O("Wrong length");N(this,{type:S,buffer:e,byteLength:r,byteOffset:a,bytes:A.bytes}),i||(this.buffer=e,this.byteLength=r,this.byteOffset=a)})[F],i&&($(U,"byteLength",R),$(J,"buffer",G),$(J,"byteLength",G),$(J,"byteOffset",G)),g(H,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return j(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return j(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){te(this,1,e,W,t)},setUint8:function(e,t){te(this,1,e,W,t)},setInt16:function(e,t){te(this,2,e,Z,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){te(this,2,e,Z,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){te(this,4,e,_,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){te(this,4,e,_,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){te(this,4,e,V,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){te(this,8,e,z,t,arguments.length>2&&arguments[2])}});m(U,D),m(J,S),e.exports={ArrayBuffer:U,DataView:J}},6677:(e,t,r)=>{var A=r(4165),n=r(9002),i=r(7878),a=r(1870),o=Math.min;e.exports=[].copyWithin||function(e,t){var r=A(this),s=i(r),c=n(e,s),g=n(t,s),u=arguments.length>2?arguments[2]:void 0,l=o((void 0===u?s:n(u,s))-g,s-c),h=1;for(g0;)g in r?r[c]=r[g]:a(r,c),c+=h,g+=h;return r}},9557:(e,t,r)=>{var A=r(4165),n=r(9002),i=r(7878);e.exports=function(e){for(var t=A(this),r=i(t),a=arguments.length,o=n(a>1?arguments[1]:void 0,r),s=a>2?arguments[2]:void 0,c=void 0===s?r:n(s,r);c>o;)t[o++]=e;return t}},3147:(e,t,r)=>{var A=r(5645).forEach,n=r(1814)("forEach");e.exports=n?[].forEach:function(e){return A(this,e,arguments.length>1?arguments[1]:void 0)}},7434:(e,t,r)=>{var A=r(7878);e.exports=function(e,t,r){for(var n=0,i=arguments.length>2?r:A(t),a=new e(i);i>n;)a[n]=t[n++];return a}},3948:(e,t,r)=>{var A=r(4864),n=r(3453),i=r(4165),a=r(3535),o=r(993),s=r(8413),c=r(7878),g=r(3552),u=r(6961),l=r(7507),h=Array;e.exports=function(e){var t=i(e),r=s(this),I=arguments.length,f=I>1?arguments[1]:void 0,C=void 0!==f;C&&(f=A(f,I>2?arguments[2]:void 0));var B,Q,E,d,y,p,v=l(t),m=0;if(!v||this===h&&o(v))for(B=c(t),Q=r?new this(B):h(B);B>m;m++)p=C?f(t[m],m):t[m],g(Q,m,p);else for(Q=r?new this:[],y=(d=u(t,v)).next;!(E=n(y,d)).done;m++)p=C?a(d,f,[E.value,m],!0):E.value,g(Q,m,p);return Q.length=m,Q}},7921:(e,t,r)=>{var A=r(3637),n=r(9002),i=r(7878),a=function(e){return function(t,r,a){var o=A(t),s=i(o);if(0===s)return!e&&-1;var c,g=n(a,s);if(e&&r!=r){for(;s>g;)if((c=o[g++])!=c)return!0}else for(;s>g;g++)if((e||g in o)&&o[g]===r)return e||g||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},767:(e,t,r)=>{var A=r(4864),n=r(9455),i=r(4165),a=r(7878),o=function(e){var t=1===e;return function(r,o,s){for(var c,g=i(r),u=n(g),l=a(u),h=A(o,s);l-- >0;)if(h(c=u[l],l,g))switch(e){case 0:return c;case 1:return l}return t?-1:void 0}};e.exports={findLast:o(0),findLastIndex:o(1)}},5645:(e,t,r)=>{var A=r(4864),n=r(2608),i=r(9455),a=r(4165),o=r(7878),s=r(1453),c=n([].push),g=function(e){var t=1===e,r=2===e,n=3===e,g=4===e,u=6===e,l=7===e,h=5===e||u;return function(I,f,C,B){for(var Q,E,d=a(I),y=i(d),p=o(y),v=A(f,C),m=0,w=B||s,b=t?w(I,p):r||l?w(I,0):void 0;p>m;m++)if((h||m in y)&&(E=v(Q=y[m],m,d),e))if(t)b[m]=E;else if(E)switch(e){case 3:return!0;case 5:return Q;case 6:return m;case 2:c(b,Q)}else switch(e){case 4:return!1;case 7:c(b,Q)}return u?-1:n||g?g:b}};e.exports={forEach:g(0),map:g(1),filter:g(2),some:g(3),every:g(4),find:g(5),findIndex:g(6),filterReject:g(7)}},3499:(e,t,r)=>{var A=r(3881),n=r(3637),i=r(1211),a=r(7878),o=r(1814),s=Math.min,c=[].lastIndexOf,g=!!c&&1/[1].lastIndexOf(1,-0)<0,u=o("lastIndexOf"),l=g||!u;e.exports=l?function(e){if(g)return A(c,this,arguments)||0;var t=n(this),r=a(t);if(0===r)return-1;var o=r-1;for(arguments.length>1&&(o=s(o,i(arguments[1]))),o<0&&(o=r+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return-1}:c},9077:(e,t,r)=>{var A=r(3455),n=r(5811),i=r(6415),a=n("species");e.exports=function(e){return i>=51||!A((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},1814:(e,t,r)=>{var A=r(3455);e.exports=function(e,t){var r=[][e];return!!r&&A((function(){r.call(null,t||function(){return 1},1)}))}},4734:(e,t,r)=>{var A=r(4186),n=r(4165),i=r(9455),a=r(7878),o=TypeError,s="Reduce of empty array with no initial value",c=function(e){return function(t,r,c,g){var u=n(t),l=i(u),h=a(u);if(A(r),0===h&&c<2)throw new o(s);var I=e?h-1:0,f=e?-1:1;if(c<2)for(;;){if(I in l){g=l[I],I+=f;break}if(I+=f,e?I<0:h<=I)throw new o(s)}for(;e?I>=0:h>I;I+=f)I in l&&(g=r(g,l[I],I,u));return g}};e.exports={left:c(!1),right:c(!0)}},7375:(e,t,r)=>{var A=r(2444),n=r(5448),i=TypeError,a=Object.getOwnPropertyDescriptor,o=A&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(n(e)&&!a(e,"length").writable)throw new i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4224:(e,t,r)=>{var A=r(2608);e.exports=A([].slice)},5272:(e,t,r)=>{var A=r(4224),n=Math.floor,i=function(e,t){var r=e.length;if(r<8)for(var a,o,s=1;s0;)e[o]=e[--o];o!==s++&&(e[o]=a)}else for(var c=n(r/2),g=i(A(e,0,c),t),u=i(A(e,c),t),l=g.length,h=u.length,I=0,f=0;I{var A=r(5448),n=r(8413),i=r(2674),a=r(5811)("species"),o=Array;e.exports=function(e){var t;return A(e)&&(t=e.constructor,(n(t)&&(t===o||A(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?o:t}},1453:(e,t,r)=>{var A=r(2329);e.exports=function(e,t){return new(A(e))(0===t?0:t)}},6444:(e,t,r)=>{var A=r(7878);e.exports=function(e,t){for(var r=A(e),n=new t(r),i=0;i{var A=r(7878),n=r(1211),i=RangeError;e.exports=function(e,t,r,a){var o=A(e),s=n(r),c=s<0?o+s:s;if(c>=o||c<0)throw new i("Incorrect index");for(var g=new t(o),u=0;u{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=t+"+/",A=t+"-_",n=function(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t};e.exports={i2c:r,c2i:n(r),i2cUrl:A,c2iUrl:n(A)}},3535:(e,t,r)=>{var A=r(7447),n=r(5235);e.exports=function(e,t,r,i){try{return i?t(A(r)[0],r[1]):t(r)}catch(t){n(e,"throw",t)}}},4348:(e,t,r)=>{var A=r(5811)("iterator"),n=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){n=!0}};a[A]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!n)return!1}catch(e){return!1}var r=!1;try{var i={};i[A]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},9872:(e,t,r)=>{var A=r(2608),n=A({}.toString),i=A("".slice);e.exports=function(e){return i(n(e),8,-1)}},1179:(e,t,r)=>{var A=r(3724),n=r(3749),i=r(9872),a=r(5811)("toStringTag"),o=Object,s="Arguments"===i(function(){return arguments}());e.exports=A?i:function(e){var t,r,A;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=o(e),a))?r:s?i(t):"Object"===(A=i(t))&&n(t.callee)?"Arguments":A}},2042:(e,t,r)=>{var A=r(5304),n=r(8986),i=r(4183),a=r(4864),o=r(3399),s=r(6021),c=r(1804),g=r(656),u=r(9393),l=r(5409),h=r(2444),I=r(5227).fastKey,f=r(8301),C=f.set,B=f.getterFor;e.exports={getConstructor:function(e,t,r,g){var u=e((function(e,n){o(e,l),C(e,{type:t,index:A(null),first:null,last:null,size:0}),h||(e.size=0),s(n)||c(n,e[g],{that:e,AS_ENTRIES:r})})),l=u.prototype,f=B(t),Q=function(e,t,r){var A,n,i=f(e),a=E(e,t);return a?a.value=r:(i.last=a={index:n=I(t,!0),key:t,value:r,previous:A=i.last,next:null,removed:!1},i.first||(i.first=a),A&&(A.next=a),h?i.size++:e.size++,"F"!==n&&(i.index[n]=a)),e},E=function(e,t){var r,A=f(e),n=I(t);if("F"!==n)return A.index[n];for(r=A.first;r;r=r.next)if(r.key===t)return r};return i(l,{clear:function(){for(var e=f(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=A(null),h?e.size=0:this.size=0},delete:function(e){var t=this,r=f(t),A=E(t,e);if(A){var n=A.next,i=A.previous;delete r.index[A.index],A.removed=!0,i&&(i.next=n),n&&(n.previous=i),r.first===A&&(r.first=n),r.last===A&&(r.last=i),h?r.size--:t.size--}return!!A},forEach:function(e){for(var t,r=f(this),A=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(A(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!E(this,e)}}),i(l,r?{get:function(e){var t=E(this,e);return t&&t.value},set:function(e,t){return Q(this,0===e?0:e,t)}}:{add:function(e){return Q(this,e=0===e?0:e,e)}}),h&&n(l,"size",{configurable:!0,get:function(){return f(this).size}}),u},setStrong:function(e,t,r){var A=t+" Iterator",n=B(t),i=B(A);g(e,t,(function(e,t){C(this,{type:A,target:e,state:n(e),kind:t,last:null})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?u("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=null,u(void 0,!0))}),r?"entries":"values",!r,!0),l(t)}}},8153:(e,t,r)=>{var A=r(2608),n=r(4183),i=r(5227).getWeakData,a=r(3399),o=r(7447),s=r(6021),c=r(2674),g=r(1804),u=r(5645),l=r(9649),h=r(8301),I=h.set,f=h.getterFor,C=u.find,B=u.findIndex,Q=A([].splice),E=0,d=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},p=function(e,t){return C(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=p(this,e);if(t)return t[1]},has:function(e){return!!p(this,e)},set:function(e,t){var r=p(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=B(this.entries,(function(t){return t[0]===e}));return~t&&Q(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,r,A){var u=e((function(e,n){a(e,h),I(e,{type:t,id:E++,frozen:null}),s(n)||g(n,e[A],{that:e,AS_ENTRIES:r})})),h=u.prototype,C=f(t),B=function(e,t,r){var A=C(e),n=i(o(t),!0);return!0===n?d(A).set(t,r):n[A.id]=r,e};return n(h,{delete:function(e){var t=C(this);if(!c(e))return!1;var r=i(e);return!0===r?d(t).delete(e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=C(this);if(!c(e))return!1;var r=i(e);return!0===r?d(t).has(e):r&&l(r,t.id)}}),n(h,r?{get:function(e){var t=C(this);if(c(e)){var r=i(e);if(!0===r)return d(t).get(e);if(r)return r[t.id]}},set:function(e,t){return B(this,e,t)}}:{add:function(e){return B(this,e,!0)}}),u}}},9556:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(2608),a=r(5868),o=r(8552),s=r(5227),c=r(1804),g=r(3399),u=r(3749),l=r(6021),h=r(2674),I=r(3455),f=r(4348),C=r(6911),B=r(3951);e.exports=function(e,t,r){var Q=-1!==e.indexOf("Map"),E=-1!==e.indexOf("Weak"),d=Q?"set":"add",y=n[e],p=y&&y.prototype,v=y,m={},w=function(e){var t=i(p[e]);o(p,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(E&&!h(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return E&&!h(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(E&&!h(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(a(e,!u(y)||!(E||p.forEach&&!I((function(){(new y).entries().next()})))))v=r.getConstructor(t,e,Q,d),s.enable();else if(a(e,!0)){var b=new v,k=b[d](E?{}:-0,1)!==b,D=I((function(){b.has(1)})),S=f((function(e){new y(e)})),F=!E&&I((function(){for(var e=new y,t=5;t--;)e[d](t,t);return!e.has(-0)}));S||((v=t((function(e,t){g(e,p);var r=B(new y,e,v);return l(t)||c(t,r[d],{that:r,AS_ENTRIES:Q}),r}))).prototype=p,p.constructor=v),(D||F)&&(w("delete"),w("has"),Q&&w("get")),(F||k)&&w(d),E&&p.clear&&delete p.clear}return m[e]=v,A({global:!0,constructor:!0,forced:v!==y},m),C(v,e),E||r.setStrong(v,e,Q),v}},2924:(e,t,r)=>{var A=r(9649),n=r(2919),i=r(1139),a=r(1601);e.exports=function(e,t,r){for(var o=n(t),s=a.f,c=i.f,g=0;g{var A=r(5811)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[A]=!1,"/./"[e](t)}catch(e){}}return!1}},5139:(e,t,r)=>{var A=r(3455);e.exports=!A((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},9393:e=>{e.exports=function(e,t){return{value:e,done:t}}},139:(e,t,r)=>{var A=r(2444),n=r(1601),i=r(4004);e.exports=A?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},4004:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},3552:(e,t,r)=>{var A=r(2444),n=r(1601),i=r(4004);e.exports=function(e,t,r){A?n.f(e,t,i(0,r)):e[t]=r}},952:(e,t,r)=>{var A=r(7447),n=r(3118),i=TypeError;e.exports=function(e){if(A(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new i("Incorrect hint");return n(this,e)}},8986:(e,t,r)=>{var A=r(1147),n=r(1601);e.exports=function(e,t,r){return r.get&&A(r.get,t,{getter:!0}),r.set&&A(r.set,t,{setter:!0}),n.f(e,t,r)}},8552:(e,t,r)=>{var A=r(3749),n=r(1601),i=r(1147),a=r(5801);e.exports=function(e,t,r,o){o||(o={});var s=o.enumerable,c=void 0!==o.name?o.name:t;if(A(r)&&i(r,c,o),o.global)s?e[t]=r:a(t,r);else{try{o.unsafe?e[t]&&(s=!0):delete e[t]}catch(e){}s?e[t]=r:n.f(e,t,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},4183:(e,t,r)=>{var A=r(8552);e.exports=function(e,t,r){for(var n in t)A(e,n,t[n],r);return e}},5801:(e,t,r)=>{var A=r(4032),n=Object.defineProperty;e.exports=function(e,t){try{n(A,e,{value:t,configurable:!0,writable:!0})}catch(r){A[e]=t}return t}},1870:(e,t,r)=>{var A=r(8055),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw new n("Cannot delete property "+A(t)+" of "+A(e))}},2444:(e,t,r)=>{var A=r(3455);e.exports=!A((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},7395:(e,t,r)=>{var A,n,i,a,o=r(4032),s=r(9685),c=r(6572),g=o.structuredClone,u=o.ArrayBuffer,l=o.MessageChannel,h=!1;if(c)h=function(e){g(e,{transfer:[e]})};else if(u)try{l||(A=s("worker_threads"))&&(l=A.MessageChannel),l&&(n=new l,i=new u(2),a=function(e){n.port1.postMessage(null,[e])},2===i.byteLength&&(a(i),0===i.byteLength&&(h=a)))}catch(e){}e.exports=h},5751:(e,t,r)=>{var A=r(4032),n=r(2674),i=A.document,a=n(i)&&n(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},9573:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},4090:e=>{e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},2760:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},4784:(e,t,r)=>{var A=r(5751)("span").classList,n=A&&A.constructor&&A.constructor.prototype;e.exports=n===Object.prototype?void 0:n},5175:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7085:(e,t,r)=>{var A=r(7607).match(/firefox\\/(\\d+)/i);e.exports=!!A&&+A[1]},5123:(e,t,r)=>{var A=r(7607);e.exports=/MSIE|Trident/.test(A)},9081:(e,t,r)=>{var A=r(7607);e.exports=/ipad|iphone|ipod/i.test(A)&&"undefined"!=typeof Pebble},9352:(e,t,r)=>{var A=r(7607);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(A)},4529:(e,t,r)=>{var A=r(7351);e.exports="NODE"===A},628:(e,t,r)=>{var A=r(7607);e.exports=/web0s(?!.*chrome)/i.test(A)},7607:(e,t,r)=>{var A=r(4032).navigator,n=A&&A.userAgent;e.exports=n?String(n):""},6415:(e,t,r)=>{var A,n,i=r(4032),a=r(7607),o=i.process,s=i.Deno,c=o&&o.versions||s&&s.version,g=c&&c.v8;g&&(n=(A=g.split("."))[0]>0&&A[0]<4?1:+(A[0]+A[1])),!n&&a&&(!(A=a.match(/Edge\\/(\\d+)/))||A[1]>=74)&&(A=a.match(/Chrome\\/(\\d+)/))&&(n=+A[1]),e.exports=n},1911:(e,t,r)=>{var A=r(7607).match(/AppleWebKit\\/(\\d+)\\./);e.exports=!!A&&+A[1]},7351:(e,t,r)=>{var A=r(4032),n=r(7607),i=r(9872),a=function(e){return n.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":A.Bun&&"string"==typeof Bun.version?"BUN":A.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(A.process)?"NODE":A.window&&A.document?"BROWSER":"REST"},3633:(e,t,r)=>{var A=r(2608),n=Error,i=A("".replace),a=String(new n("zxcasd").stack),o=/\\n\\s*at [^:]*:[^\\n]*/,s=o.test(a);e.exports=function(e,t){if(s&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=i(e,o,"");return e}},4171:(e,t,r)=>{var A=r(139),n=r(3633),i=r(3427),a=Error.captureStackTrace;e.exports=function(e,t,r,o){i&&(a?a(e,t):A(e,"stack",n(r,o)))}},3427:(e,t,r)=>{var A=r(3455),n=r(4004);e.exports=!A((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},2912:(e,t,r)=>{var A=r(2444),n=r(3455),i=r(7447),a=r(8363),o=Error.prototype.toString,s=n((function(){if(A){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==o.call(e))return!0}return"2: 1"!==o.call({message:1,name:2})||"Error"!==o.call({})}));e.exports=s?function(){var e=i(this),t=a(e.name,"Error"),r=a(e.message);return t?r?t+": "+r:t:r}:o},5366:(e,t,r)=>{var A=r(4032),n=r(1139).f,i=r(139),a=r(8552),o=r(5801),s=r(2924),c=r(5868);e.exports=function(e,t){var r,g,u,l,h,I=e.target,f=e.global,C=e.stat;if(r=f?A:C?A[I]||o(I,{}):A[I]&&A[I].prototype)for(g in t){if(l=t[g],u=e.dontCallGetSet?(h=n(r,g))&&h.value:r[g],!c(f?g:I+(C?".":"#")+g,e.forced)&&void 0!==u){if(typeof l==typeof u)continue;s(l,u)}(e.sham||u&&u.sham)&&i(l,"sham",!0),a(r,g,l,e)}}},3455:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},4364:(e,t,r)=>{r(2823);var A=r(3453),n=r(8552),i=r(9867),a=r(3455),o=r(5811),s=r(139),c=o("species"),g=RegExp.prototype;e.exports=function(e,t,r,u){var l=o(e),h=!a((function(){var t={};return t[l]=function(){return 7},7!==""[e](t)})),I=h&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[l]=/./[l]),r.exec=function(){return t=!0,null},r[l](""),!t}));if(!h||!I||r){var f=/./[l],C=t(l,""[e],(function(e,t,r,n,a){var o=t.exec;return o===i||o===g.exec?h&&!a?{done:!0,value:A(f,t,r,n)}:{done:!0,value:A(e,r,t,n)}:{done:!1}}));n(String.prototype,e,C[0]),n(g,l,C[1])}u&&s(g[l],"sham",!0)}},2851:(e,t,r)=>{var A=r(5448),n=r(7878),i=r(9573),a=r(4864),o=function(e,t,r,s,c,g,u,l){for(var h,I,f=c,C=0,B=!!u&&a(u,l);C0&&A(h)?(I=n(h),f=o(e,t,h,I,f,g-1)-1):(i(f+1),e[f]=h),f++),C++;return f};e.exports=o},568:(e,t,r)=>{var A=r(3455);e.exports=!A((function(){return Object.isExtensible(Object.preventExtensions({}))}))},3881:(e,t,r)=>{var A=r(9128),n=Function.prototype,i=n.apply,a=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(A?a.bind(i):function(){return a.apply(i,arguments)})},4864:(e,t,r)=>{var A=r(2116),n=r(4186),i=r(9128),a=A(A.bind);e.exports=function(e,t){return n(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},9128:(e,t,r)=>{var A=r(3455);e.exports=!A((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},2230:(e,t,r)=>{var A=r(2608),n=r(4186),i=r(2674),a=r(9649),o=r(4224),s=r(9128),c=Function,g=A([].concat),u=A([].join),l={};e.exports=s?c.bind:function(e){var t=n(this),r=t.prototype,A=o(arguments,1),s=function(){var r=g(A,o(arguments));return this instanceof s?function(e,t,r){if(!a(l,t)){for(var A=[],n=0;n{var A=r(9128),n=Function.prototype.call;e.exports=A?n.bind(n):function(){return n.apply(n,arguments)}},2542:(e,t,r)=>{var A=r(2444),n=r(9649),i=Function.prototype,a=A&&Object.getOwnPropertyDescriptor,o=n(i,"name"),s=o&&"something"===function(){}.name,c=o&&(!A||A&&a(i,"name").configurable);e.exports={EXISTS:o,PROPER:s,CONFIGURABLE:c}},5026:(e,t,r)=>{var A=r(2608),n=r(4186);e.exports=function(e,t,r){try{return A(n(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},2116:(e,t,r)=>{var A=r(9872),n=r(2608);e.exports=function(e){if("Function"===A(e))return n(e)}},2608:(e,t,r)=>{var A=r(9128),n=Function.prototype,i=n.call,a=A&&n.bind.bind(i,i);e.exports=A?a:function(e){return function(){return i.apply(e,arguments)}}},9685:(e,t,r)=>{var A=r(4032),n=r(4529);e.exports=function(e){if(n){try{return A.process.getBuiltinModule(e)}catch(e){}try{return Function('return require("'+e+'")')()}catch(e){}}}},8711:(e,t,r)=>{var A=r(4032),n=r(3749);e.exports=function(e,t){return arguments.length<2?(r=A[e],n(r)?r:void 0):A[e]&&A[e][t];var r}},3447:e=>{e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},7507:(e,t,r)=>{var A=r(1179),n=r(8622),i=r(6021),a=r(5597),o=r(5811)("iterator");e.exports=function(e){if(!i(e))return n(e,o)||n(e,"@@iterator")||a[A(e)]}},6961:(e,t,r)=>{var A=r(3453),n=r(4186),i=r(7447),a=r(8055),o=r(7507),s=TypeError;e.exports=function(e,t){var r=arguments.length<2?o(e):t;if(n(r))return i(A(r,e));throw new s(a(e)+" is not iterable")}},213:(e,t,r)=>{var A=r(2608),n=r(5448),i=r(3749),a=r(9872),o=r(687),s=A([].push);e.exports=function(e){if(i(e))return e;if(n(e)){for(var t=e.length,r=[],A=0;A{var A=r(4186),n=r(6021);e.exports=function(e,t){var r=e[t];return n(r)?void 0:A(r)}},3885:(e,t,r)=>{var A=r(4186),n=r(7447),i=r(3453),a=r(1211),o=r(3447),s="Invalid size",c=RangeError,g=TypeError,u=Math.max,l=function(e,t){this.set=e,this.size=u(t,0),this.has=A(e.has),this.keys=A(e.keys)};l.prototype={getIterator:function(){return o(n(i(this.keys,this.set)))},includes:function(e){return i(this.has,this.set,e)}},e.exports=function(e){n(e);var t=+e.size;if(t!=t)throw new g(s);var r=a(t);if(r<0)throw new c(s);return new l(e,r)}},3966:(e,t,r)=>{var A=r(2608),n=r(4165),i=Math.floor,a=A("".charAt),o=A("".replace),s=A("".slice),c=/\\$([$&'\`]|\\d{1,2}|<[^>]*>)/g,g=/\\$([$&'\`]|\\d{1,2})/g;e.exports=function(e,t,r,A,u,l){var h=r+e.length,I=A.length,f=g;return void 0!==u&&(u=n(u),f=c),o(l,f,(function(n,o){var c;switch(a(o,0)){case"$":return"$";case"&":return e;case"\`":return s(t,0,r);case"'":return s(t,h);case"<":c=u[s(o,1,-1)];break;default:var g=+o;if(0===g)return n;if(g>I){var l=i(g/10);return 0===l?n:l<=I?void 0===A[l-1]?a(o,1):A[l-1]+a(o,1):n}c=A[g-1]}return void 0===c?"":c}))}},4032:function(e){var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9649:(e,t,r)=>{var A=r(2608),n=r(4165),i=A({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(n(e),t)}},2645:e=>{e.exports={}},4885:e=>{e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},3085:(e,t,r)=>{var A=r(8711);e.exports=A("document","documentElement")},8829:(e,t,r)=>{var A=r(2444),n=r(3455),i=r(5751);e.exports=!A&&!n((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},1306:e=>{var t=Array,r=Math.abs,A=Math.pow,n=Math.floor,i=Math.log,a=Math.LN2;e.exports={pack:function(e,o,s){var c,g,u,l=t(s),h=8*s-o-1,I=(1<>1,C=23===o?A(2,-24)-A(2,-77):0,B=e<0||0===e&&1/e<0?1:0,Q=0;for((e=r(e))!=e||e===1/0?(g=e!=e?1:0,c=I):(c=n(i(e)/a),e*(u=A(2,-c))<1&&(c--,u*=2),(e+=c+f>=1?C/u:C*A(2,1-f))*u>=2&&(c++,u/=2),c+f>=I?(g=0,c=I):c+f>=1?(g=(e*u-1)*A(2,o),c+=f):(g=e*A(2,f-1)*A(2,o),c=0));o>=8;)l[Q++]=255&g,g/=256,o-=8;for(c=c<0;)l[Q++]=255&c,c/=256,h-=8;return l[Q-1]|=128*B,l},unpack:function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<>1,s=i-7,c=n-1,g=e[c--],u=127&g;for(g>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:g?-1/0:1/0;r+=A(2,t),u-=o}return(g?-1:1)*r*A(2,u-t)}}},9455:(e,t,r)=>{var A=r(2608),n=r(3455),i=r(9872),a=Object,o=A("".split);e.exports=n((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?o(e,""):a(e)}:a},3951:(e,t,r)=>{var A=r(3749),n=r(2674),i=r(9415);e.exports=function(e,t,r){var a,o;return i&&A(a=t.constructor)&&a!==r&&n(o=a.prototype)&&o!==r.prototype&&i(e,o),e}},6906:(e,t,r)=>{var A=r(2608),n=r(3749),i=r(2205),a=A(Function.toString);n(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},2483:(e,t,r)=>{var A=r(2674),n=r(139);e.exports=function(e,t){A(t)&&"cause"in t&&n(e,"cause",t.cause)}},5227:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(2645),a=r(2674),o=r(9649),s=r(1601).f,c=r(3408),g=r(6442),u=r(8812),l=r(5936),h=r(568),I=!1,f=l("meta"),C=0,B=function(e){s(e,f,{value:{objectID:"O"+C++,weakData:{}}})},Q=e.exports={enable:function(){Q.enable=function(){},I=!0;var e=c.f,t=n([].splice),r={};r[f]=1,e(r).length&&(c.f=function(r){for(var A=e(r),n=0,i=A.length;n{var A,n,i,a=r(6206),o=r(4032),s=r(2674),c=r(139),g=r(9649),u=r(2205),l=r(2343),h=r(2645),I="Object already initialized",f=o.TypeError,C=o.WeakMap;if(a||u.state){var B=u.state||(u.state=new C);B.get=B.get,B.has=B.has,B.set=B.set,A=function(e,t){if(B.has(e))throw new f(I);return t.facade=e,B.set(e,t),t},n=function(e){return B.get(e)||{}},i=function(e){return B.has(e)}}else{var Q=l("state");h[Q]=!0,A=function(e,t){if(g(e,Q))throw new f(I);return t.facade=e,c(e,Q,t),t},n=function(e){return g(e,Q)?e[Q]:{}},i=function(e){return g(e,Q)}}e.exports={set:A,get:n,has:i,enforce:function(e){return i(e)?n(e):A(e,{})},getterFor:function(e){return function(t){var r;if(!s(t)||(r=n(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}},993:(e,t,r)=>{var A=r(5811),n=r(5597),i=A("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[i]===e)}},5448:(e,t,r)=>{var A=r(9872);e.exports=Array.isArray||function(e){return"Array"===A(e)}},5415:(e,t,r)=>{var A=r(1179);e.exports=function(e){var t=A(e);return"BigInt64Array"===t||"BigUint64Array"===t}},3749:e=>{var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},8413:(e,t,r)=>{var A=r(2608),n=r(3455),i=r(3749),a=r(1179),o=r(8711),s=r(6906),c=function(){},g=o("Reflect","construct"),u=/^\\s*(?:class|function)\\b/,l=A(u.exec),h=!u.test(c),I=function(e){if(!i(e))return!1;try{return g(c,[],e),!0}catch(e){return!1}},f=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!l(u,s(e))}catch(e){return!0}};f.sham=!0,e.exports=!g||n((function(){var e;return I(I.call)||!I(Object)||!I((function(){e=!0}))||e}))?f:I},3007:(e,t,r)=>{var A=r(9649);e.exports=function(e){return void 0!==e&&(A(e,"value")||A(e,"writable"))}},5868:(e,t,r)=>{var A=r(3455),n=r(3749),i=/#|\\.prototype\\./,a=function(e,t){var r=s[o(e)];return r===g||r!==c&&(n(t)?A(t):!!t)},o=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",g=a.POLYFILL="P";e.exports=a},2599:(e,t,r)=>{var A=r(2674),n=Math.floor;e.exports=Number.isInteger||function(e){return!A(e)&&isFinite(e)&&n(e)===e}},6021:e=>{e.exports=function(e){return null==e}},2674:(e,t,r)=>{var A=r(3749);e.exports=function(e){return"object"==typeof e?null!==e:A(e)}},4597:(e,t,r)=>{var A=r(2674);e.exports=function(e){return A(e)||null===e}},8507:e=>{e.exports=!1},6484:(e,t,r)=>{var A=r(2674),n=r(9872),i=r(5811)("match");e.exports=function(e){var t;return A(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===n(e))}},2277:(e,t,r)=>{var A=r(8711),n=r(3749),i=r(6921),a=r(4752),o=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=A("Symbol");return n(t)&&i(t.prototype,o(e))}},2939:(e,t,r)=>{var A=r(3453);e.exports=function(e,t,r){for(var n,i,a=r?e:e.iterator,o=e.next;!(n=A(o,a)).done;)if(void 0!==(i=t(n.value)))return i}},1804:(e,t,r)=>{var A=r(4864),n=r(3453),i=r(7447),a=r(8055),o=r(993),s=r(7878),c=r(6921),g=r(6961),u=r(7507),l=r(5235),h=TypeError,I=function(e,t){this.stopped=e,this.result=t},f=I.prototype;e.exports=function(e,t,r){var C,B,Q,E,d,y,p,v=r&&r.that,m=!(!r||!r.AS_ENTRIES),w=!(!r||!r.IS_RECORD),b=!(!r||!r.IS_ITERATOR),k=!(!r||!r.INTERRUPTED),D=A(t,v),S=function(e){return C&&l(C,"normal",e),new I(!0,e)},F=function(e){return m?(i(e),k?D(e[0],e[1],S):D(e[0],e[1])):k?D(e,S):D(e)};if(w)C=e.iterator;else if(b)C=e;else{if(!(B=u(e)))throw new h(a(e)+" is not iterable");if(o(B)){for(Q=0,E=s(e);E>Q;Q++)if((d=F(e[Q]))&&c(f,d))return d;return new I(!1)}C=g(e,B)}for(y=w?e.next:C.next;!(p=n(y,C)).done;){try{d=F(p.value)}catch(e){l(C,"throw",e)}if("object"==typeof d&&d&&c(f,d))return d}return new I(!1)}},5235:(e,t,r)=>{var A=r(3453),n=r(7447),i=r(8622);e.exports=function(e,t,r){var a,o;n(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw r;return r}a=A(a,e)}catch(e){o=!0,a=e}if("throw"===t)throw r;if(o)throw a;return n(a),r}},282:(e,t,r)=>{var A=r(2857).IteratorPrototype,n=r(5304),i=r(4004),a=r(6911),o=r(5597),s=function(){return this};e.exports=function(e,t,r,c){var g=t+" Iterator";return e.prototype=n(A,{next:i(+!c,r)}),a(e,g,!1,!0),o[g]=s,e}},2342:(e,t,r)=>{var A=r(3453),n=r(5304),i=r(139),a=r(4183),o=r(5811),s=r(8301),c=r(8622),g=r(2857).IteratorPrototype,u=r(9393),l=r(5235),h=o("toStringTag"),I="IteratorHelper",f="WrapForValidIterator",C=s.set,B=function(e){var t=s.getterFor(e?f:I);return a(n(g),{next:function(){var r=t(this);if(e)return r.nextHandler();try{var A=r.done?void 0:r.nextHandler();return u(A,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),n=r.iterator;if(r.done=!0,e){var i=c(n,"return");return i?A(i,n):u(void 0,!0)}if(r.inner)try{l(r.inner.iterator,"normal")}catch(e){return l(n,"throw",e)}return l(n,"normal"),u(void 0,!0)}})},Q=B(!0),E=B(!1);i(E,h,"Iterator Helper"),e.exports=function(e,t){var r=function(r,A){A?(A.iterator=r.iterator,A.next=r.next):A=r,A.type=t?f:I,A.nextHandler=e,A.counter=0,A.done=!1,C(this,A)};return r.prototype=t?Q:E,r}},656:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(8507),a=r(2542),o=r(3749),s=r(282),c=r(2611),g=r(9415),u=r(6911),l=r(139),h=r(8552),I=r(5811),f=r(5597),C=r(2857),B=a.PROPER,Q=a.CONFIGURABLE,E=C.IteratorPrototype,d=C.BUGGY_SAFARI_ITERATORS,y=I("iterator"),p="keys",v="values",m="entries",w=function(){return this};e.exports=function(e,t,r,a,I,C,b){s(r,t,a);var k,D,S,F=function(e){if(e===I&&L)return L;if(!d&&e&&e in G)return G[e];switch(e){case p:case v:case m:return function(){return new r(this,e)}}return function(){return new r(this)}},x=t+" Iterator",R=!1,G=e.prototype,N=G[y]||G["@@iterator"]||I&&G[I],L=!d&&N||F(I),U="Array"===t&&G.entries||N;if(U&&(k=c(U.call(new e)))!==Object.prototype&&k.next&&(i||c(k)===E||(g?g(k,E):o(k[y])||h(k,y,w)),u(k,x,!0,!0),i&&(f[x]=w)),B&&I===v&&N&&N.name!==v&&(!i&&Q?l(G,"name",v):(R=!0,L=function(){return n(N,this)})),I)if(D={values:F(v),keys:C?L:F(p),entries:F(m)},b)for(S in D)(d||R||!(S in G))&&h(G,S,D[S]);else A({target:t,proto:!0,forced:d||R},D);return i&&!b||G[y]===L||h(G,y,L,{name:I}),f[t]=L,D}},4009:(e,t,r)=>{var A=r(3453),n=r(4186),i=r(7447),a=r(3447),o=r(2342),s=r(3535),c=o((function(){var e=this.iterator,t=i(A(this.next,e));if(!(this.done=!!t.done))return s(e,this.mapper,[t.value,this.counter++],!0)}));e.exports=function(e){return i(this),n(e),new c(a(this),{mapper:e})}},2857:(e,t,r)=>{var A,n,i,a=r(3455),o=r(3749),s=r(2674),c=r(5304),g=r(2611),u=r(8552),l=r(5811),h=r(8507),I=l("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(n=g(g(i)))!==Object.prototype&&(A=n):f=!0),!s(A)||a((function(){var e={};return A[I].call(e)!==e}))?A={}:h&&(A=c(A)),o(A[I])||u(A,I,(function(){return this})),e.exports={IteratorPrototype:A,BUGGY_SAFARI_ITERATORS:f}},5597:e=>{e.exports={}},7878:(e,t,r)=>{var A=r(5806);e.exports=function(e){return A(e.length)}},1147:(e,t,r)=>{var A=r(2608),n=r(3455),i=r(3749),a=r(9649),o=r(2444),s=r(2542).CONFIGURABLE,c=r(6906),g=r(8301),u=g.enforce,l=g.get,h=String,I=Object.defineProperty,f=A("".slice),C=A("".replace),B=A([].join),Q=o&&!n((function(){return 8!==I((function(){}),"length",{value:8}).length})),E=String(String).split("String"),d=e.exports=function(e,t,r){"Symbol("===f(h(t),0,7)&&(t="["+C(h(t),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||s&&e.name!==t)&&(o?I(e,"name",{value:t,configurable:!0}):e.name=t),Q&&r&&a(r,"arity")&&e.length!==r.arity&&I(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?o&&I(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var A=u(e);return a(A,"source")||(A.source=B(E,"string"==typeof t?t:"")),e};Function.prototype.toString=d((function(){return i(this)&&l(this).source||c(this)}),"toString")},9676:(e,t,r)=>{var A=r(550),n=Math.abs,i=2220446049250313e-31,a=1/i;e.exports=function(e,t,r,o){var s=+e,c=n(s),g=A(s);if(cr||l!=l?g*(1/0):g*l}},3505:(e,t,r)=>{var A=r(9676);e.exports=Math.fround||function(e){return A(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},550:e=>{e.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},2789:e=>{var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var A=+e;return(A>0?r:t)(A)}},755:(e,t,r)=>{var A,n,i,a,o,s=r(4032),c=r(5725),g=r(4864),u=r(1369).set,l=r(3529),h=r(9352),I=r(9081),f=r(628),C=r(4529),B=s.MutationObserver||s.WebKitMutationObserver,Q=s.document,E=s.process,d=s.Promise,y=c("queueMicrotask");if(!y){var p=new l,v=function(){var e,t;for(C&&(e=E.domain)&&e.exit();t=p.get();)try{t()}catch(e){throw p.head&&A(),e}e&&e.enter()};h||C||f||!B||!Q?!I&&d&&d.resolve?((a=d.resolve(void 0)).constructor=d,o=g(a.then,a),A=function(){o(v)}):C?A=function(){E.nextTick(v)}:(u=g(u,s),A=function(){u(v)}):(n=!0,i=Q.createTextNode(""),new B(v).observe(i,{characterData:!0}),A=function(){i.data=n=!n}),y=function(e){p.head||A(),p.add(e)}}e.exports=y},9371:(e,t,r)=>{var A=r(4186),n=TypeError,i=function(e){var t,r;this.promise=new e((function(e,A){if(void 0!==t||void 0!==r)throw new n("Bad Promise constructor");t=e,r=A})),this.resolve=A(t),this.reject=A(r)};e.exports.f=function(e){return new i(e)}},8363:(e,t,r)=>{var A=r(687);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:A(e)}},3631:(e,t,r)=>{var A=r(6484),n=TypeError;e.exports=function(e){if(A(e))throw new n("The method doesn't accept regular expressions");return e}},8069:(e,t,r)=>{var A=r(2444),n=r(2608),i=r(3453),a=r(3455),o=r(496),s=r(6005),c=r(9221),g=r(4165),u=r(9455),l=Object.assign,h=Object.defineProperty,I=n([].concat);e.exports=!l||a((function(){if(A&&1!==l({b:1},l(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==l({},e)[r]||o(l({},t)).join("")!==n}))?function(e,t){for(var r=g(e),n=arguments.length,a=1,l=s.f,h=c.f;n>a;)for(var f,C=u(arguments[a++]),B=l?I(o(C),l(C)):o(C),Q=B.length,E=0;Q>E;)f=B[E++],A&&!i(h,C,f)||(r[f]=C[f]);return r}:l},5304:(e,t,r)=>{var A,n=r(7447),i=r(9217),a=r(5175),o=r(2645),s=r(3085),c=r(5751),g=r(2343),u="prototype",l="script",h=g("IE_PROTO"),I=function(){},f=function(e){return"<"+l+">"+e+""},C=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},B=function(){try{A=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;B="undefined"!=typeof document?document.domain&&A?C(A):(t=c("iframe"),r="java"+l+":",t.style.display="none",s.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):C(A);for(var n=a.length;n--;)delete B[u][a[n]];return B()};o[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(I[u]=n(e),r=new I,I[u]=null,r[h]=e):r=B(),void 0===t?r:i.f(r,t)}},9217:(e,t,r)=>{var A=r(2444),n=r(782),i=r(1601),a=r(7447),o=r(3637),s=r(496);t.f=A&&!n?Object.defineProperties:function(e,t){a(e);for(var r,A=o(t),n=s(t),c=n.length,g=0;c>g;)i.f(e,r=n[g++],A[r]);return e}},1601:(e,t,r)=>{var A=r(2444),n=r(8829),i=r(782),a=r(7447),o=r(6201),s=TypeError,c=Object.defineProperty,g=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",h="writable";t.f=A?i?function(e,t,r){if(a(e),t=o(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&h in r&&!r[h]){var A=g(e,t);A&&A[h]&&(e[t]=r.value,r={configurable:l in r?r[l]:A[l],enumerable:u in r?r[u]:A[u],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(a(e),t=o(t),a(r),n)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new s("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1139:(e,t,r)=>{var A=r(2444),n=r(3453),i=r(9221),a=r(4004),o=r(3637),s=r(6201),c=r(9649),g=r(8829),u=Object.getOwnPropertyDescriptor;t.f=A?u:function(e,t){if(e=o(e),t=s(t),g)try{return u(e,t)}catch(e){}if(c(e,t))return a(!n(i.f,e,t),e[t])}},6442:(e,t,r)=>{var A=r(9872),n=r(3637),i=r(3408).f,a=r(4224),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===A(e)?function(e){try{return i(e)}catch(e){return a(o)}}(e):i(n(e))}},3408:(e,t,r)=>{var A=r(2468),n=r(5175).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return A(e,n)}},6005:(e,t)=>{t.f=Object.getOwnPropertySymbols},2611:(e,t,r)=>{var A=r(9649),n=r(3749),i=r(4165),a=r(2343),o=r(5139),s=a("IE_PROTO"),c=Object,g=c.prototype;e.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(A(t,s))return t[s];var r=t.constructor;return n(r)&&t instanceof r?r.prototype:t instanceof c?g:null}},8812:(e,t,r)=>{var A=r(3455),n=r(2674),i=r(9872),a=r(7060),o=Object.isExtensible,s=A((function(){o(1)}));e.exports=s||a?function(e){return!!n(e)&&(!a||"ArrayBuffer"!==i(e))&&(!o||o(e))}:o},6921:(e,t,r)=>{var A=r(2608);e.exports=A({}.isPrototypeOf)},2468:(e,t,r)=>{var A=r(2608),n=r(9649),i=r(3637),a=r(7921).indexOf,o=r(2645),s=A([].push);e.exports=function(e,t){var r,A=i(e),c=0,g=[];for(r in A)!n(o,r)&&n(A,r)&&s(g,r);for(;t.length>c;)n(A,r=t[c++])&&(~a(g,r)||s(g,r));return g}},496:(e,t,r)=>{var A=r(2468),n=r(5175);e.exports=Object.keys||function(e){return A(e,n)}},9221:(e,t)=>{var r={}.propertyIsEnumerable,A=Object.getOwnPropertyDescriptor,n=A&&!r.call({1:2},1);t.f=n?function(e){var t=A(this,e);return!!t&&t.enumerable}:r},9415:(e,t,r)=>{var A=r(5026),n=r(2674),i=r(7222),a=r(7330);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=A(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,A){return i(r),a(A),n(r)?(t?e(r,A):r.__proto__=A,r):r}}():void 0)},8885:(e,t,r)=>{var A=r(2444),n=r(3455),i=r(2608),a=r(2611),o=r(496),s=r(3637),c=i(r(9221).f),g=i([].push),u=A&&n((function(){var e=Object.create(null);return e[2]=2,!c(e,2)})),l=function(e){return function(t){for(var r,n=s(t),i=o(n),l=u&&null===a(n),h=i.length,I=0,f=[];h>I;)r=i[I++],A&&!(l?r in n:c(n,r))||g(f,e?[r,n[r]]:n[r]);return f}};e.exports={entries:l(!0),values:l(!1)}},3003:(e,t,r)=>{var A=r(3724),n=r(1179);e.exports=A?{}.toString:function(){return"[object "+n(this)+"]"}},3118:(e,t,r)=>{var A=r(3453),n=r(3749),i=r(2674),a=TypeError;e.exports=function(e,t){var r,o;if("string"===t&&n(r=e.toString)&&!i(o=A(r,e)))return o;if(n(r=e.valueOf)&&!i(o=A(r,e)))return o;if("string"!==t&&n(r=e.toString)&&!i(o=A(r,e)))return o;throw new a("Can't convert object to primitive value")}},2919:(e,t,r)=>{var A=r(8711),n=r(2608),i=r(3408),a=r(6005),o=r(7447),s=n([].concat);e.exports=A("Reflect","ownKeys")||function(e){var t=i.f(o(e)),r=a.f;return r?s(t,r(e)):t}},8799:(e,t,r)=>{var A=r(4032);e.exports=A},6703:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9492:(e,t,r)=>{var A=r(4032),n=r(5318),i=r(3749),a=r(5868),o=r(6906),s=r(5811),c=r(7351),g=r(8507),u=r(6415),l=n&&n.prototype,h=s("species"),I=!1,f=i(A.PromiseRejectionEvent),C=a("Promise",(function(){var e=o(n),t=e!==String(n);if(!t&&66===u)return!0;if(g&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(e)){var r=new n((function(e){e(1)})),A=function(e){e((function(){}),(function(){}))};if((r.constructor={})[h]=A,!(I=r.then((function(){}))instanceof A))return!0}return!(t||"BROWSER"!==c&&"DENO"!==c||f)}));e.exports={CONSTRUCTOR:C,REJECTION_EVENT:f,SUBCLASSING:I}},5318:(e,t,r)=>{var A=r(4032);e.exports=A.Promise},1774:(e,t,r)=>{var A=r(7447),n=r(2674),i=r(9371);e.exports=function(e,t){if(A(e),n(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},2041:(e,t,r)=>{var A=r(5318),n=r(4348),i=r(9492).CONSTRUCTOR;e.exports=i||!n((function(e){A.all(e).then(void 0,(function(){}))}))},2848:(e,t,r)=>{var A=r(1601).f;e.exports=function(e,t,r){r in e||A(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})}},3529:e=>{var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},4410:(e,t,r)=>{var A=r(3453),n=r(7447),i=r(3749),a=r(9872),o=r(9867),s=TypeError;e.exports=function(e,t){var r=e.exec;if(i(r)){var c=A(r,e,t);return null!==c&&n(c),c}if("RegExp"===a(e))return A(o,e,t);throw new s("RegExp#exec called on incompatible receiver")}},9867:(e,t,r)=>{var A,n,i=r(3453),a=r(2608),o=r(687),s=r(747),c=r(1837),g=r(4593),u=r(5304),l=r(8301).get,h=r(3651),I=r(9502),f=g("native-string-replace",String.prototype.replace),C=RegExp.prototype.exec,B=C,Q=a("".charAt),E=a("".indexOf),d=a("".replace),y=a("".slice),p=(n=/b*/g,i(C,A=/a/,"a"),i(C,n,"a"),0!==A.lastIndex||0!==n.lastIndex),v=c.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];(p||m||v||h||I)&&(B=function(e){var t,r,A,n,a,c,g,h=this,I=l(h),w=o(e),b=I.raw;if(b)return b.lastIndex=h.lastIndex,t=i(B,b,w),h.lastIndex=b.lastIndex,t;var k=I.groups,D=v&&h.sticky,S=i(s,h),F=h.source,x=0,R=w;if(D&&(S=d(S,"y",""),-1===E(S,"g")&&(S+="g"),R=y(w,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\\n"!==Q(w,h.lastIndex-1))&&(F="(?: "+F+")",R=" "+R,x++),r=new RegExp("^(?:"+F+")",S)),m&&(r=new RegExp("^"+F+"$(?!\\\\s)",S)),p&&(A=h.lastIndex),n=i(C,D?r:h,R),D?n?(n.input=y(n.input,x),n[0]=y(n[0],x),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:p&&n&&(h.lastIndex=h.global?n.index+n[0].length:A),m&&n&&n.length>1&&i(f,n[0],r,(function(){for(a=1;a{var A=r(7447);e.exports=function(){var e=A(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},4554:(e,t,r)=>{var A=r(3453),n=r(9649),i=r(6921),a=r(747),o=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in o||n(e,"flags")||!i(o,e)?t:A(a,e)}},1837:(e,t,r)=>{var A=r(3455),n=r(4032).RegExp,i=A((function(){var e=n("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),a=i||A((function(){return!n("a","y").sticky})),o=i||A((function(){var e=n("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));e.exports={BROKEN_CARET:o,MISSED_STICKY:a,UNSUPPORTED_Y:i}},3651:(e,t,r)=>{var A=r(3455),n=r(4032).RegExp;e.exports=A((function(){var e=n(".","s");return!(e.dotAll&&e.test("\\n")&&"s"===e.flags)}))},9502:(e,t,r)=>{var A=r(3455),n=r(4032).RegExp;e.exports=A((function(){var e=n("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))},7222:(e,t,r)=>{var A=r(6021),n=TypeError;e.exports=function(e){if(A(e))throw new n("Can't call method on "+e);return e}},5725:(e,t,r)=>{var A=r(4032),n=r(2444),i=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!n)return A[e];var t=i(A,e);return t&&t.value}},8550:(e,t,r)=>{var A=r(418),n=r(5605),i=A.Set,a=A.add;e.exports=function(e){var t=new i;return n(e,(function(e){a(t,e)})),t}},4656:(e,t,r)=>{var A=r(4376),n=r(418),i=r(8550),a=r(82),o=r(3885),s=r(5605),c=r(2939),g=n.has,u=n.remove;e.exports=function(e){var t=A(this),r=o(e),n=i(t);return a(t)<=r.size?s(t,(function(e){r.includes(e)&&u(n,e)})):c(r.getIterator(),(function(e){g(t,e)&&u(n,e)})),n}},418:(e,t,r)=>{var A=r(2608),n=Set.prototype;e.exports={Set,add:A(n.add),has:A(n.has),remove:A(n.delete),proto:n}},2446:(e,t,r)=>{var A=r(4376),n=r(418),i=r(82),a=r(3885),o=r(5605),s=r(2939),c=n.Set,g=n.add,u=n.has;e.exports=function(e){var t=A(this),r=a(e),n=new c;return i(t)>r.size?s(r.getIterator(),(function(e){u(t,e)&&g(n,e)})):o(t,(function(e){r.includes(e)&&g(n,e)})),n}},4545:(e,t,r)=>{var A=r(4376),n=r(418).has,i=r(82),a=r(3885),o=r(5605),s=r(2939),c=r(5235);e.exports=function(e){var t=A(this),r=a(e);if(i(t)<=r.size)return!1!==o(t,(function(e){if(r.includes(e))return!1}),!0);var g=r.getIterator();return!1!==s(g,(function(e){if(n(t,e))return c(g,"normal",!1)}))}},7918:(e,t,r)=>{var A=r(4376),n=r(82),i=r(5605),a=r(3885);e.exports=function(e){var t=A(this),r=a(e);return!(n(t)>r.size)&&!1!==i(t,(function(e){if(!r.includes(e))return!1}),!0)}},6111:(e,t,r)=>{var A=r(4376),n=r(418).has,i=r(82),a=r(3885),o=r(2939),s=r(5235);e.exports=function(e){var t=A(this),r=a(e);if(i(t){var A=r(2608),n=r(2939),i=r(418),a=i.Set,o=i.proto,s=A(o.forEach),c=A(o.keys),g=c(new a).next;e.exports=function(e,t,r){return r?n({iterator:c(e),next:g},t):s(e,t)}},1716:(e,t,r)=>{var A=r(8711),n=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};e.exports=function(e){var t=A("Set");try{(new t)[e](n(0));try{return(new t)[e](n(-1)),!1}catch(e){return!0}}catch(e){return!1}}},82:(e,t,r)=>{var A=r(5026),n=r(418);e.exports=A(n.proto,"size","get")||function(e){return e.size}},5409:(e,t,r)=>{var A=r(8711),n=r(8986),i=r(5811),a=r(2444),o=i("species");e.exports=function(e){var t=A(e);a&&t&&!t[o]&&n(t,o,{configurable:!0,get:function(){return this}})}},4498:(e,t,r)=>{var A=r(4376),n=r(418),i=r(8550),a=r(3885),o=r(2939),s=n.add,c=n.has,g=n.remove;e.exports=function(e){var t=A(this),r=a(e).getIterator(),n=i(t);return o(r,(function(e){c(t,e)?g(n,e):s(n,e)})),n}},6911:(e,t,r)=>{var A=r(1601).f,n=r(9649),i=r(5811)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!n(e,i)&&A(e,i,{configurable:!0,value:t})}},9500:(e,t,r)=>{var A=r(4376),n=r(418).add,i=r(8550),a=r(3885),o=r(2939);e.exports=function(e){var t=A(this),r=a(e).getIterator(),s=i(t);return o(r,(function(e){n(s,e)})),s}},2343:(e,t,r)=>{var A=r(4593),n=r(5936),i=A("keys");e.exports=function(e){return i[e]||(i[e]=n(e))}},2205:(e,t,r)=>{var A=r(8507),n=r(4032),i=r(5801),a="__core-js_shared__",o=e.exports=n[a]||i(a,{});(o.versions||(o.versions=[])).push({version:"3.38.1",mode:A?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4593:(e,t,r)=>{var A=r(2205);e.exports=function(e,t){return A[e]||(A[e]=t||{})}},1365:(e,t,r)=>{var A=r(7447),n=r(9052),i=r(6021),a=r(5811)("species");e.exports=function(e,t){var r,o=A(e).constructor;return void 0===o||i(r=A(o)[a])?t:n(r)}},6903:(e,t,r)=>{var A=r(2608),n=r(1211),i=r(687),a=r(7222),o=A("".charAt),s=A("".charCodeAt),c=A("".slice),g=function(e){return function(t,r){var A,g,u=i(a(t)),l=n(r),h=u.length;return l<0||l>=h?e?"":void 0:(A=s(u,l))<55296||A>56319||l+1===h||(g=s(u,l+1))<56320||g>57343?e?o(u,l):A:e?c(u,l,l+2):g-56320+(A-55296<<10)+65536}};e.exports={codeAt:g(!1),charAt:g(!0)}},4903:(e,t,r)=>{var A=r(7607);e.exports=/Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(A)},6437:(e,t,r)=>{var A=r(2608),n=r(5806),i=r(687),a=r(6605),o=r(7222),s=A(a),c=A("".slice),g=Math.ceil,u=function(e){return function(t,r,A){var a,u,l=i(o(t)),h=n(r),I=l.length,f=void 0===A?" ":i(A);return h<=I||""===f?l:((u=s(f,g((a=h-I)/f.length))).length>a&&(u=c(u,0,a)),e?l+u:u+l)}};e.exports={start:u(!1),end:u(!0)}},5141:(e,t,r)=>{var A=r(2608),n=2147483647,i=/[^\\0-\\u007E]/,a=/[.\\u3002\\uFF0E\\uFF61]/g,o="Overflow: input needs wider integers to process",s=RangeError,c=A(a.exec),g=Math.floor,u=String.fromCharCode,l=A("".charCodeAt),h=A([].join),I=A([].push),f=A("".replace),C=A("".split),B=A("".toLowerCase),Q=function(e){return e+22+75*(e<26)},E=function(e,t,r){var A=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;)e=g(e/35),A+=36;return g(A+36*e/(e+38))},d=function(e){var t=[];e=function(e){for(var t=[],r=0,A=e.length;r=55296&&n<=56319&&r=a&&Ag((n-c)/y))throw new s(o);for(c+=(d-a)*y,a=d,r=0;rn)throw new s(o);if(A===a){for(var p=c,v=36;;){var m=v<=f?1:v>=f+26?26:v-f;if(p{var A=r(1211),n=r(687),i=r(7222),a=RangeError;e.exports=function(e){var t=n(i(this)),r="",o=A(e);if(o<0||o===1/0)throw new a("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}},2882:(e,t,r)=>{var A=r(9418).end,n=r(3794);e.exports=n("trimEnd")?function(){return A(this)}:"".trimEnd},3794:(e,t,r)=>{var A=r(2542).PROPER,n=r(3455),i=r(2284);e.exports=function(e){return n((function(){return!!i[e]()||"​…᠎"!=="​…᠎"[e]()||A&&i[e].name!==e}))}},9418:(e,t,r)=>{var A=r(2608),n=r(7222),i=r(687),a=r(2284),o=A("".replace),s=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),g=function(e){return function(t){var r=i(n(t));return 1&e&&(r=o(r,s,"")),2&e&&(r=o(r,c,"$1")),r}};e.exports={start:g(1),end:g(2),trim:g(3)}},6572:(e,t,r)=>{var A=r(4032),n=r(3455),i=r(6415),a=r(7351),o=A.structuredClone;e.exports=!!o&&!n((function(){if("DENO"===a&&i>92||"NODE"===a&&i>94||"BROWSER"===a&&i>97)return!1;var e=new ArrayBuffer(8),t=o(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength}))},6943:(e,t,r)=>{var A=r(6415),n=r(3455),i=r(4032).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&A&&A<41}))},3042:(e,t,r)=>{var A=r(3453),n=r(8711),i=r(5811),a=r(8552);e.exports=function(){var e=n("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,o=i("toPrimitive");t&&!t[o]&&a(t,o,(function(e){return A(r,this)}),{arity:1})}},8592:(e,t,r)=>{var A=r(6943);e.exports=A&&!!Symbol.for&&!!Symbol.keyFor},1369:(e,t,r)=>{var A,n,i,a,o=r(4032),s=r(3881),c=r(4864),g=r(3749),u=r(9649),l=r(3455),h=r(3085),I=r(4224),f=r(5751),C=r(7900),B=r(9352),Q=r(4529),E=o.setImmediate,d=o.clearImmediate,y=o.process,p=o.Dispatch,v=o.Function,m=o.MessageChannel,w=o.String,b=0,k={},D="onreadystatechange";l((function(){A=o.location}));var S=function(e){if(u(k,e)){var t=k[e];delete k[e],t()}},F=function(e){return function(){S(e)}},x=function(e){S(e.data)},R=function(e){o.postMessage(w(e),A.protocol+"//"+A.host)};E&&d||(E=function(e){C(arguments.length,1);var t=g(e)?e:v(e),r=I(arguments,1);return k[++b]=function(){s(t,void 0,r)},n(b),b},d=function(e){delete k[e]},Q?n=function(e){y.nextTick(F(e))}:p&&p.now?n=function(e){p.now(F(e))}:m&&!B?(a=(i=new m).port2,i.port1.onmessage=x,n=c(a.postMessage,a)):o.addEventListener&&g(o.postMessage)&&!o.importScripts&&A&&"file:"!==A.protocol&&!l(R)?(n=R,o.addEventListener("message",x,!1)):n=D in f("script")?function(e){h.appendChild(f("script"))[D]=function(){h.removeChild(this),S(e)}}:function(e){setTimeout(F(e),0)}),e.exports={set:E,clear:d}},9002:(e,t,r)=>{var A=r(1211),n=Math.max,i=Math.min;e.exports=function(e,t){var r=A(e);return r<0?n(r+t,0):i(r,t)}},1198:(e,t,r)=>{var A=r(8921),n=TypeError;e.exports=function(e){var t=A(e,"number");if("number"==typeof t)throw new n("Can't convert number to bigint");return BigInt(t)}},9088:(e,t,r)=>{var A=r(1211),n=r(5806),i=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=A(e),r=n(t);if(t!==r)throw new i("Wrong length or index");return r}},3637:(e,t,r)=>{var A=r(9455),n=r(7222);e.exports=function(e){return A(n(e))}},1211:(e,t,r)=>{var A=r(2789);e.exports=function(e){var t=+e;return t!=t||0===t?0:A(t)}},5806:(e,t,r)=>{var A=r(1211),n=Math.min;e.exports=function(e){var t=A(e);return t>0?n(t,9007199254740991):0}},4165:(e,t,r)=>{var A=r(7222),n=Object;e.exports=function(e){return n(A(e))}},8402:(e,t,r)=>{var A=r(5590),n=RangeError;e.exports=function(e,t){var r=A(e);if(r%t)throw new n("Wrong offset");return r}},5590:(e,t,r)=>{var A=r(1211),n=RangeError;e.exports=function(e){var t=A(e);if(t<0)throw new n("The argument can't be less than 0");return t}},8921:(e,t,r)=>{var A=r(3453),n=r(2674),i=r(2277),a=r(8622),o=r(3118),s=r(5811),c=TypeError,g=s("toPrimitive");e.exports=function(e,t){if(!n(e)||i(e))return e;var r,s=a(e,g);if(s){if(void 0===t&&(t="default"),r=A(s,e,t),!n(r)||i(r))return r;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},6201:(e,t,r)=>{var A=r(8921),n=r(2277);e.exports=function(e){var t=A(e,"string");return n(t)?t:t+""}},3724:(e,t,r)=>{var A={};A[r(5811)("toStringTag")]="z",e.exports="[object z]"===String(A)},687:(e,t,r)=>{var A=r(1179),n=String;e.exports=function(e){if("Symbol"===A(e))throw new TypeError("Cannot convert a Symbol value to a string");return n(e)}},5215:e=>{var t=Math.round;e.exports=function(e){var r=t(e);return r<0?0:r>255?255:255&r}},8055:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},8975:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(3453),a=r(2444),o=r(949),s=r(4356),c=r(7226),g=r(3399),u=r(4004),l=r(139),h=r(2599),I=r(5806),f=r(9088),C=r(8402),B=r(5215),Q=r(6201),E=r(9649),d=r(1179),y=r(2674),p=r(2277),v=r(5304),m=r(6921),w=r(9415),b=r(3408).f,k=r(2291),D=r(5645).forEach,S=r(5409),F=r(8986),x=r(1601),R=r(1139),G=r(7434),N=r(8301),L=r(3951),U=N.get,M=N.set,J=N.enforce,H=x.f,Y=R.f,P=n.RangeError,O=c.ArrayBuffer,K=O.prototype,T=c.DataView,q=s.NATIVE_ARRAY_BUFFER_VIEWS,j=s.TYPED_ARRAY_TAG,W=s.TypedArray,Z=s.TypedArrayPrototype,_=s.isTypedArray,X="BYTES_PER_ELEMENT",V="Wrong length",z=function(e,t){F(e,t,{configurable:!0,get:function(){return U(this)[t]}})},$=function(e){var t;return m(K,e)||"ArrayBuffer"===(t=d(e))||"SharedArrayBuffer"===t},ee=function(e,t){return _(e)&&!p(t)&&t in e&&h(+t)&&t>=0},te=function(e,t){return t=Q(t),ee(e,t)?u(2,e[t]):Y(e,t)},re=function(e,t,r){return t=Q(t),!(ee(e,t)&&y(r)&&E(r,"value"))||E(r,"get")||E(r,"set")||r.configurable||E(r,"writable")&&!r.writable||E(r,"enumerable")&&!r.enumerable?H(e,t,r):(e[t]=r.value,e)};a?(q||(R.f=te,x.f=re,z(Z,"buffer"),z(Z,"byteOffset"),z(Z,"byteLength"),z(Z,"length")),A({target:"Object",stat:!0,forced:!q},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var a=e.match(/\\d+/)[0]/8,s=e+(r?"Clamped":"")+"Array",c="get"+e,u="set"+e,h=n[s],Q=h,E=Q&&Q.prototype,d={},p=function(e,t){H(e,t,{get:function(){return function(e,t){var r=U(e);return r.view[c](t*a+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,A){var n=U(e);n.view[u](t*a+n.byteOffset,r?B(A):A,!0)}(this,t,e)},enumerable:!0})};q?o&&(Q=t((function(e,t,r,A){return g(e,E),L(y(t)?$(t)?void 0!==A?new h(t,C(r,a),A):void 0!==r?new h(t,C(r,a)):new h(t):_(t)?G(Q,t):i(k,Q,t):new h(f(t)),e,Q)})),w&&w(Q,W),D(b(h),(function(e){e in Q||l(Q,e,h[e])})),Q.prototype=E):(Q=t((function(e,t,r,A){g(e,E);var n,o,s,c=0,u=0;if(y(t)){if(!$(t))return _(t)?G(Q,t):i(k,Q,t);n=t,u=C(r,a);var l=t.byteLength;if(void 0===A){if(l%a)throw new P(V);if((o=l-u)<0)throw new P(V)}else if((o=I(A)*a)+u>l)throw new P(V);s=o/a}else s=f(t),n=new O(o=s*a);for(M(e,{buffer:n,byteOffset:u,byteLength:o,length:s,view:new T(n)});c{var A=r(4032),n=r(3455),i=r(4348),a=r(4356).NATIVE_ARRAY_BUFFER_VIEWS,o=A.ArrayBuffer,s=A.Int8Array;e.exports=!a||!n((function(){s(1)}))||!n((function(){new s(-1)}))||!i((function(e){new s,new s(null),new s(1.5),new s(e)}),!0)||n((function(){return 1!==new s(new o(2),1,void 0).length}))},85:(e,t,r)=>{var A=r(7434),n=r(580);e.exports=function(e,t){return A(n(e),t)}},2291:(e,t,r)=>{var A=r(4864),n=r(3453),i=r(9052),a=r(4165),o=r(7878),s=r(6961),c=r(7507),g=r(993),u=r(5415),l=r(4356).aTypedArrayConstructor,h=r(1198);e.exports=function(e){var t,r,I,f,C,B,Q,E,d=i(this),y=a(e),p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v,w=c(y);if(w&&!g(w))for(E=(Q=s(y,w)).next,y=[];!(B=n(E,Q)).done;)y.push(B.value);for(m&&p>2&&(v=A(v,arguments[2])),r=o(y),I=new(l(d))(r),f=u(I),t=0;r>t;t++)C=m?v(y[t],t):y[t],I[t]=f?h(C):+C;return I}},580:(e,t,r)=>{var A=r(4356),n=r(1365),i=A.aTypedArrayConstructor,a=A.getTypedArrayConstructor;e.exports=function(e){return i(n(e,a(e)))}},5936:(e,t,r)=>{var A=r(2608),n=0,i=Math.random(),a=A(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+i,36)}},8200:(e,t,r)=>{var A=r(3455),n=r(5811),i=r(2444),a=r(8507),o=n("iterator");e.exports=!A((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),A="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),A+=r+e})),r.delete("a",2),r.delete("b",void 0),a&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(a||!i)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==A||"x"!==new URL("https://x",void 0).host}))},4752:(e,t,r)=>{var A=r(6943);e.exports=A&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},782:(e,t,r)=>{var A=r(2444),n=r(3455);e.exports=A&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7900:e=>{var t=TypeError;e.exports=function(e,r){if(e{var A=r(4032),n=r(3749),i=A.WeakMap;e.exports=n(i)&&/native code/.test(String(i))},5343:(e,t,r)=>{var A=r(8799),n=r(9649),i=r(4559),a=r(1601).f;e.exports=function(e){var t=A.Symbol||(A.Symbol={});n(t,e)||a(t,e,{value:i.f(e)})}},4559:(e,t,r)=>{var A=r(5811);t.f=A},5811:(e,t,r)=>{var A=r(4032),n=r(4593),i=r(9649),a=r(5936),o=r(6943),s=r(4752),c=A.Symbol,g=n("wks"),u=s?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return i(g,e)||(g[e]=o&&i(c,e)?c[e]:u("Symbol."+e)),g[e]}},2284:e=>{e.exports="\\t\\n\\v\\f\\r                 \\u2028\\u2029\\ufeff"},9257:(e,t,r)=>{var A=r(8711),n=r(9649),i=r(139),a=r(6921),o=r(9415),s=r(2924),c=r(2848),g=r(3951),u=r(8363),l=r(2483),h=r(4171),I=r(2444),f=r(8507);e.exports=function(e,t,r,C){var B="stackTraceLimit",Q=C?2:1,E=e.split("."),d=E[E.length-1],y=A.apply(null,E);if(y){var p=y.prototype;if(!f&&n(p,"cause")&&delete p.cause,!r)return y;var v=A("Error"),m=t((function(e,t){var r=u(C?t:e,void 0),A=C?new y(e):new y;return void 0!==r&&i(A,"message",r),h(A,m,A.stack,2),this&&a(p,this)&&g(A,this,m),arguments.length>Q&&l(A,arguments[Q]),A}));if(m.prototype=p,"Error"!==d?o?o(m,v):s(m,v,{name:!0}):I&&B in y&&(c(m,y,B),c(m,y,"prepareStackTrace")),s(m,y),!f)try{p.name!==d&&i(p,"name",d),p.constructor=m}catch(e){}return m}}},5015:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(7226),a=r(5409),o="ArrayBuffer",s=i[o];A({global:!0,constructor:!0,forced:n[o]!==s},{ArrayBuffer:s}),a(o)},9261:(e,t,r)=>{var A=r(2444),n=r(8986),i=r(8102),a=ArrayBuffer.prototype;A&&!("detached"in a)&&n(a,"detached",{configurable:!0,get:function(){return i(this)}})},6209:(e,t,r)=>{var A=r(5366),n=r(2116),i=r(3455),a=r(7226),o=r(7447),s=r(9002),c=r(5806),g=r(1365),u=a.ArrayBuffer,l=a.DataView,h=l.prototype,I=n(u.prototype.slice),f=n(h.getUint8),C=n(h.setUint8);A({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new u(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(I&&void 0===t)return I(o(this),e);for(var r=o(this).byteLength,A=s(e,r),n=s(void 0===t?r:t,r),i=new(g(this,u))(c(n-A)),a=new l(this),h=new l(i),B=0;A{var A=r(5366),n=r(4676);n&&A({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return n(this,arguments.length?arguments[0]:void 0,!1)}})},3700:(e,t,r)=>{var A=r(5366),n=r(4676);n&&A({target:"ArrayBuffer",proto:!0},{transfer:function(){return n(this,arguments.length?arguments[0]:void 0,!0)}})},6347:(e,t,r)=>{var A=r(5366),n=r(4165),i=r(7878),a=r(1211),o=r(1458);A({target:"Array",proto:!0},{at:function(e){var t=n(this),r=i(t),A=a(e),o=A>=0?A:r+A;return o<0||o>=r?void 0:t[o]}}),o("at")},3234:(e,t,r)=>{var A=r(5366),n=r(3455),i=r(5448),a=r(2674),o=r(4165),s=r(7878),c=r(9573),g=r(3552),u=r(1453),l=r(9077),h=r(5811),I=r(6415),f=h("isConcatSpreadable"),C=I>=51||!n((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),B=function(e){if(!a(e))return!1;var t=e[f];return void 0!==t?!!t:i(e)};A({target:"Array",proto:!0,arity:1,forced:!C||!l("concat")},{concat:function(e){var t,r,A,n,i,a=o(this),l=u(a,0),h=0;for(t=-1,A=arguments.length;t{var A=r(5366),n=r(5645).filter;A({target:"Array",proto:!0,forced:!r(9077)("filter")},{filter:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},6497:(e,t,r)=>{var A=r(5366),n=r(2851),i=r(4165),a=r(7878),o=r(1211),s=r(1453);A({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=i(this),r=a(t),A=s(t,0);return A.length=n(A,t,t,r,0,void 0===e?1:o(e)),A}})},6746:(e,t,r)=>{var A=r(5366),n=r(3948);A({target:"Array",stat:!0,forced:!r(4348)((function(e){Array.from(e)}))},{from:n})},932:(e,t,r)=>{var A=r(5366),n=r(7921).includes,i=r(3455),a=r(1458);A({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},3276:(e,t,r)=>{var A=r(5366),n=r(2116),i=r(7921).indexOf,a=r(1814),o=n([].indexOf),s=!!o&&1/o([1],1,-0)<0;A({target:"Array",proto:!0,forced:s||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return s?o(this,e,t)||0:i(this,e,t)}})},9024:(e,t,r)=>{var A=r(3637),n=r(1458),i=r(5597),a=r(8301),o=r(1601).f,s=r(656),c=r(9393),g=r(8507),u=r(2444),l="Array Iterator",h=a.set,I=a.getterFor(l);e.exports=s(Array,"Array",(function(e,t){h(this,{type:l,target:A(e),index:0,kind:t})}),(function(){var e=I(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(r,!1);case"values":return c(t[r],!1)}return c([r,t[r]],!1)}),"values");var f=i.Arguments=i.Array;if(n("keys"),n("values"),n("entries"),!g&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},3177:(e,t,r)=>{var A=r(5366),n=r(3499);A({target:"Array",proto:!0,forced:n!==[].lastIndexOf},{lastIndexOf:n})},5550:(e,t,r)=>{var A=r(5366),n=r(5645).map;A({target:"Array",proto:!0,forced:!r(9077)("map")},{map:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},9138:(e,t,r)=>{var A=r(5366),n=r(4165),i=r(7878),a=r(7375),o=r(9573);A({target:"Array",proto:!0,arity:1,forced:r(3455)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=n(this),r=i(t),A=arguments.length;o(r+A);for(var s=0;s{var A=r(5366),n=r(4734).left,i=r(1814),a=r(6415);A({target:"Array",proto:!0,forced:!r(4529)&&a>79&&a<83||!i("reduce")},{reduce:function(e){var t=arguments.length;return n(this,e,t,t>1?arguments[1]:void 0)}})},6794:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(5448),a=n([].reverse),o=[1,2];A({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},750:(e,t,r)=>{var A=r(5366),n=r(5448),i=r(8413),a=r(2674),o=r(9002),s=r(7878),c=r(3637),g=r(3552),u=r(5811),l=r(9077),h=r(4224),I=l("slice"),f=u("species"),C=Array,B=Math.max;A({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,A,u,l=c(this),I=s(l),Q=o(e,I),E=o(void 0===t?I:t,I);if(n(l)&&(r=l.constructor,(i(r)&&(r===C||n(r.prototype))||a(r)&&null===(r=r[f]))&&(r=void 0),r===C||void 0===r))return h(l,Q,E);for(A=new(void 0===r?C:r)(B(E-Q,0)),u=0;Q{var A=r(5366),n=r(2608),i=r(4186),a=r(4165),o=r(7878),s=r(1870),c=r(687),g=r(3455),u=r(5272),l=r(1814),h=r(7085),I=r(5123),f=r(6415),C=r(1911),B=[],Q=n(B.sort),E=n(B.push),d=g((function(){B.sort(void 0)})),y=g((function(){B.sort(null)})),p=l("sort"),v=!g((function(){if(f)return f<70;if(!(h&&h>3)){if(I)return!0;if(C)return C<603;var e,t,r,A,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(A=0;A<47;A++)B.push({k:t+A,v:r})}for(B.sort((function(e,t){return t.v-e.v})),A=0;Ac(r)?1:-1}}(e)),r=o(n),A=0;A{var A=r(5366),n=r(4165),i=r(9002),a=r(1211),o=r(7878),s=r(7375),c=r(9573),g=r(1453),u=r(3552),l=r(1870),h=r(9077)("splice"),I=Math.max,f=Math.min;A({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var r,A,h,C,B,Q,E=n(this),d=o(E),y=i(e,d),p=arguments.length;for(0===p?r=A=0:1===p?(r=0,A=d-y):(r=p-2,A=f(I(a(t),0),d-y)),c(d+r-A),h=g(E,A),C=0;Cd-A+r;C--)l(E,C-1)}else if(r>A)for(C=d-A;C>y;C--)Q=C+r-1,(B=C+A-1)in E?E[Q]=E[B]:l(E,Q);for(C=0;C{r(1458)("flat")},8937:(e,t,r)=>{var A=r(5366),n=r(4165),i=r(7878),a=r(7375),o=r(1870),s=r(9573);A({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=n(this),r=i(t),A=arguments.length;if(A){s(r+A);for(var c=r;c--;){var g=c+A;c in t?t[g]=t[c]:o(t,g)}for(var u=0;u{var A=r(5366),n=r(3455),i=r(4165),a=r(8921);A({target:"Date",proto:!0,arity:1,forced:n((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=i(this),r=a(t,"number");return"number"!=typeof r||isFinite(r)?t.toISOString():null}})},7316:(e,t,r)=>{var A=r(9649),n=r(8552),i=r(952),a=r(5811)("toPrimitive"),o=Date.prototype;A(o,a)||n(o,a,i)},184:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(3881),a=r(9257),o="WebAssembly",s=n[o],c=7!==new Error("e",{cause:7}).cause,g=function(e,t){var r={};r[e]=a(e,t,c),A({global:!0,constructor:!0,arity:1,forced:c},r)},u=function(e,t){if(s&&s[e]){var r={};r[e]=a(o+"."+e,t,c),A({target:o,stat:!0,constructor:!0,arity:1,forced:c},r)}};g("Error",(function(e){return function(t){return i(e,this,arguments)}})),g("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),g("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),g("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),g("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),g("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),g("URIError",(function(e){return function(t){return i(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))},8169:(e,t,r)=>{var A=r(5366),n=r(4032);A({global:!0,forced:n.globalThis!==n},{globalThis:n})},9750:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(3881),a=r(3453),o=r(2608),s=r(3455),c=r(3749),g=r(2277),u=r(4224),l=r(213),h=r(6943),I=String,f=n("JSON","stringify"),C=o(/./.exec),B=o("".charAt),Q=o("".charCodeAt),E=o("".replace),d=o(1..toString),y=/[\\uD800-\\uDFFF]/g,p=/^[\\uD800-\\uDBFF]$/,v=/^[\\uDC00-\\uDFFF]$/,m=!h||s((function(){var e=n("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),w=s((function(){return'"\\\\udf06\\\\ud834"'!==f("\\udf06\\ud834")||'"\\\\udead"'!==f("\\udead")})),b=function(e,t){var r=u(arguments),A=l(t);if(c(A)||void 0!==e&&!g(e))return r[1]=function(e,t){if(c(A)&&(t=a(A,this,I(e),t)),!g(t))return t},i(f,null,r)},k=function(e,t,r){var A=B(r,t-1),n=B(r,t+1);return C(p,e)&&!C(v,n)||C(v,e)&&!C(p,A)?"\\\\u"+d(Q(e,0),16):e};f&&A({target:"JSON",stat:!0,arity:3,forced:m||w},{stringify:function(e,t,r){var A=u(arguments),n=i(m?b:f,null,A);return w&&"string"==typeof n?E(n,y,k):n}})},7531:(e,t,r)=>{var A=r(4032);r(6911)(A.JSON,"JSON",!0)},6539:(e,t,r)=>{r(9556)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(2042))},1425:(e,t,r)=>{r(6539)},3821:(e,t,r)=>{var A=r(5366),n=Math.hypot,i=Math.abs,a=Math.sqrt;A({target:"Math",stat:!0,arity:2,forced:!!n&&n(1/0,NaN)!==1/0},{hypot:function(e,t){for(var r,A,n=0,o=0,s=arguments.length,c=0;o0?(A=r/c)*A:r;return c===1/0?1/0:c*a(n)}})},1999:(e,t,r)=>{r(6911)(Math,"Math",!0)},8674:(e,t,r)=>{var A=r(5366),n=r(8885).entries;A({target:"Object",stat:!0},{entries:function(e){return n(e)}})},1309:(e,t,r)=>{var A=r(5366),n=r(6943),i=r(3455),a=r(6005),o=r(4165);A({target:"Object",stat:!0,forced:!n||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(o(e)):[]}})},3379:(e,t,r)=>{var A=r(3724),n=r(8552),i=r(3003);A||n(Object.prototype,"toString",i,{unsafe:!0})},482:(e,t,r)=>{var A=r(5366),n=r(8885).values;A({target:"Object",stat:!0},{values:function(e){return n(e)}})},5204:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(4186),a=r(9371),o=r(6703),s=r(1804);A({target:"Promise",stat:!0,forced:r(2041)},{allSettled:function(e){var t=this,r=a.f(t),A=r.resolve,c=r.reject,g=o((function(){var r=i(t.resolve),a=[],o=0,c=1;s(e,(function(e){var i=o++,s=!1;c++,n(r,t,e).then((function(e){s||(s=!0,a[i]={status:"fulfilled",value:e},--c||A(a))}),(function(e){s||(s=!0,a[i]={status:"rejected",reason:e},--c||A(a))}))})),--c||A(a)}));return g.error&&c(g.value),r.promise}})},6195:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(4186),a=r(9371),o=r(6703),s=r(1804);A({target:"Promise",stat:!0,forced:r(2041)},{all:function(e){var t=this,r=a.f(t),A=r.resolve,c=r.reject,g=o((function(){var r=i(t.resolve),a=[],o=0,g=1;s(e,(function(e){var i=o++,s=!1;g++,n(r,t,e).then((function(e){s||(s=!0,a[i]=e,--g||A(a))}),c)})),--g||A(a)}));return g.error&&c(g.value),r.promise}})},1459:(e,t,r)=>{var A=r(5366),n=r(8507),i=r(9492).CONSTRUCTOR,a=r(5318),o=r(8711),s=r(3749),c=r(8552),g=a&&a.prototype;if(A({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!n&&s(a)){var u=o("Promise").prototype.catch;g.catch!==u&&c(g,"catch",u,{unsafe:!0})}},9236:(e,t,r)=>{var A,n,i,a=r(5366),o=r(8507),s=r(4529),c=r(4032),g=r(3453),u=r(8552),l=r(9415),h=r(6911),I=r(5409),f=r(4186),C=r(3749),B=r(2674),Q=r(3399),E=r(1365),d=r(1369).set,y=r(755),p=r(4885),v=r(6703),m=r(3529),w=r(8301),b=r(5318),k=r(9492),D=r(9371),S="Promise",F=k.CONSTRUCTOR,x=k.REJECTION_EVENT,R=k.SUBCLASSING,G=w.getterFor(S),N=w.set,L=b&&b.prototype,U=b,M=L,J=c.TypeError,H=c.document,Y=c.process,P=D.f,O=P,K=!!(H&&H.createEvent&&c.dispatchEvent),T="unhandledrejection",q=function(e){var t;return!(!B(e)||!C(t=e.then))&&t},j=function(e,t){var r,A,n,i=t.value,a=1===t.state,o=a?e.ok:e.fail,s=e.resolve,c=e.reject,u=e.domain;try{o?(a||(2===t.rejection&&V(t),t.rejection=1),!0===o?r=i:(u&&u.enter(),r=o(i),u&&(u.exit(),n=!0)),r===e.promise?c(new J("Promise-chain cycle")):(A=q(r))?g(A,r,s,c):s(r)):c(i)}catch(e){u&&!n&&u.exit(),c(e)}},W=function(e,t){e.notified||(e.notified=!0,y((function(){for(var r,A=e.reactions;r=A.get();)j(r,e);e.notified=!1,t&&!e.rejection&&_(e)})))},Z=function(e,t,r){var A,n;K?((A=H.createEvent("Event")).promise=t,A.reason=r,A.initEvent(e,!1,!0),c.dispatchEvent(A)):A={promise:t,reason:r},!x&&(n=c["on"+e])?n(A):e===T&&p("Unhandled promise rejection",r)},_=function(e){g(d,c,(function(){var t,r=e.facade,A=e.value;if(X(e)&&(t=v((function(){s?Y.emit("unhandledRejection",A,r):Z(T,r,A)})),e.rejection=s||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},V=function(e){g(d,c,(function(){var t=e.facade;s?Y.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},z=function(e,t,r){return function(A){e(t,A,r)}},$=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,W(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new J("Promise can't be resolved itself");var A=q(t);A?y((function(){var r={done:!1};try{g(A,t,z(ee,r,e),z($,r,e))}catch(t){$(r,t,e)}})):(e.value=t,e.state=1,W(e,!1))}catch(t){$({done:!1},t,e)}}};if(F&&(M=(U=function(e){Q(this,M),f(e),g(A,this);var t=G(this);try{e(z(ee,t),z($,t))}catch(e){$(t,e)}}).prototype,(A=function(e){N(this,{type:S,done:!1,notified:!1,parent:!1,reactions:new m,rejection:!1,state:0,value:null})}).prototype=u(M,"then",(function(e,t){var r=G(this),A=P(E(this,U));return r.parent=!0,A.ok=!C(e)||e,A.fail=C(t)&&t,A.domain=s?Y.domain:void 0,0===r.state?r.reactions.add(A):y((function(){j(A,r)})),A.promise})),n=function(){var e=new A,t=G(e);this.promise=e,this.resolve=z(ee,t),this.reject=z($,t)},D.f=P=function(e){return e===U||void 0===e?new n(e):O(e)},!o&&C(b)&&L!==Object.prototype)){i=L.then,R||u(L,"then",(function(e,t){var r=this;return new U((function(e,t){g(i,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete L.constructor}catch(e){}l&&l(L,M)}a({global:!0,constructor:!0,wrap:!0,forced:F},{Promise:U}),h(U,S,!1,!0),I(S)},2431:(e,t,r)=>{var A=r(5366),n=r(8507),i=r(5318),a=r(3455),o=r(8711),s=r(3749),c=r(1365),g=r(1774),u=r(8552),l=i&&i.prototype;if(A({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){l.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,o("Promise")),r=s(e);return this.then(r?function(r){return g(t,e()).then((function(){return r}))}:e,r?function(r){return g(t,e()).then((function(){throw r}))}:e)}}),!n&&s(i)){var h=o("Promise").prototype.finally;l.finally!==h&&u(l,"finally",h,{unsafe:!0})}},1234:(e,t,r)=>{r(9236),r(6195),r(1459),r(5167),r(5257),r(1128)},5167:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(4186),a=r(9371),o=r(6703),s=r(1804);A({target:"Promise",stat:!0,forced:r(2041)},{race:function(e){var t=this,r=a.f(t),A=r.reject,c=o((function(){var a=i(t.resolve);s(e,(function(e){n(a,t,e).then(r.resolve,A)}))}));return c.error&&A(c.value),r.promise}})},5257:(e,t,r)=>{var A=r(5366),n=r(9371);A({target:"Promise",stat:!0,forced:r(9492).CONSTRUCTOR},{reject:function(e){var t=n.f(this);return(0,t.reject)(e),t.promise}})},1128:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(8507),a=r(5318),o=r(9492).CONSTRUCTOR,s=r(1774),c=n("Promise"),g=i&&!o;A({target:"Promise",stat:!0,forced:i||o},{resolve:function(e){return s(g&&this===c?a:this,e)}})},9732:(e,t,r)=>{var A=r(5366),n=r(9371);A({target:"Promise",stat:!0},{withResolvers:function(){var e=n.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},489:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(3881),a=r(2230),o=r(9052),s=r(7447),c=r(2674),g=r(5304),u=r(3455),l=n("Reflect","construct"),h=Object.prototype,I=[].push,f=u((function(){function e(){}return!(l((function(){}),[],e)instanceof e)})),C=!u((function(){l((function(){}))})),B=f||C;A({target:"Reflect",stat:!0,forced:B,sham:B},{construct:function(e,t){o(e),s(t);var r=arguments.length<3?e:o(arguments[2]);if(C&&!f)return l(e,t,r);if(e===r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var A=[null];return i(I,A,t),new(i(a,e,A))}var n=r.prototype,u=g(c(n)?n:h),B=i(e,u,t);return c(B)?B:u}})},7288:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(2674),a=r(7447),o=r(3007),s=r(1139),c=r(2611);A({target:"Reflect",stat:!0},{get:function e(t,r){var A,g,u=arguments.length<3?t:arguments[2];return a(t)===u?t[r]:(A=s.f(t,r))?o(A)?A.value:void 0===A.get?void 0:n(A.get,u):i(g=c(t))?e(g,r,u):void 0}})},176:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(6911);A({global:!0},{Reflect:{}}),i(n.Reflect,"Reflect",!0)},4592:(e,t,r)=>{var A=r(2444),n=r(4032),i=r(2608),a=r(5868),o=r(3951),s=r(139),c=r(5304),g=r(3408).f,u=r(6921),l=r(6484),h=r(687),I=r(4554),f=r(1837),C=r(2848),B=r(8552),Q=r(3455),E=r(9649),d=r(8301).enforce,y=r(5409),p=r(5811),v=r(3651),m=r(9502),w=p("match"),b=n.RegExp,k=b.prototype,D=n.SyntaxError,S=i(k.exec),F=i("".charAt),x=i("".replace),R=i("".indexOf),G=i("".slice),N=/^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/,L=/a/g,U=/a/g,M=new b(L)!==L,J=f.MISSED_STICKY,H=f.UNSUPPORTED_Y;if(a("RegExp",A&&(!M||J||v||m||Q((function(){return U[w]=!1,b(L)!==L||b(U)===U||"/a/i"!==String(b(L,"i"))}))))){for(var Y=function(e,t){var r,A,n,i,a,g,f=u(k,this),C=l(e),B=void 0===t,Q=[],y=e;if(!f&&C&&B&&e.constructor===Y)return e;if((C||u(k,e))&&(e=e.source,B&&(t=I(y))),e=void 0===e?"":h(e),t=void 0===t?"":h(t),y=e,v&&"dotAll"in L&&(A=!!t&&R(t,"s")>-1)&&(t=x(t,/s/g,"")),r=t,J&&"sticky"in L&&(n=!!t&&R(t,"y")>-1)&&H&&(t=x(t,/y/g,"")),m&&(i=function(e){for(var t,r=e.length,A=0,n="",i=[],a=c(null),o=!1,s=!1,g=0,u="";A<=r;A++){if("\\\\"===(t=F(e,A)))t+=F(e,++A);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:if(n+=t,"?:"===G(e,A+1,A+3))continue;S(N,G(e,A+1))&&(A+=2,s=!0),g++;continue;case">"===t&&s:if(""===u||E(a,u))throw new D("Invalid capture group name");a[u]=!0,i[i.length]=[u,g],s=!1,u="";continue}s?u+=t:n+=t}return[n,i]}(e),e=i[0],Q=i[1]),a=o(b(e,t),f?this:k,Y),(A||n||Q.length)&&(g=d(a),A&&(g.dotAll=!0,g.raw=Y(function(e){for(var t,r=e.length,A=0,n="",i=!1;A<=r;A++)"\\\\"!==(t=F(e,A))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),n+=t):n+="[\\\\s\\\\S]":n+=t+F(e,++A);return n}(e),r)),n&&(g.sticky=!0),Q.length&&(g.groups=Q)),e!==y)try{s(a,"source",""===y?"(?:)":y)}catch(e){}return a},P=g(b),O=0;P.length>O;)C(Y,b,P[O++]);k.constructor=Y,Y.prototype=k,B(n,"RegExp",Y,{constructor:!0})}y("RegExp")},8345:(e,t,r)=>{var A=r(2444),n=r(3651),i=r(9872),a=r(8986),o=r(8301).get,s=RegExp.prototype,c=TypeError;A&&n&&a(s,"dotAll",{configurable:!0,get:function(){if(this!==s){if("RegExp"===i(this))return!!o(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},2823:(e,t,r)=>{var A=r(5366),n=r(9867);A({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},7879:(e,t,r)=>{var A=r(4032),n=r(2444),i=r(8986),a=r(747),o=r(3455),s=A.RegExp,c=s.prototype;n&&o((function(){var e=!0;try{s(".","d")}catch(t){e=!1}var t={},r="",A=e?"dgimsy":"gimsy",n=function(e,A){Object.defineProperty(t,e,{get:function(){return r+=A,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(i.hasIndices="d"),i)n(a,i[a]);return Object.getOwnPropertyDescriptor(c,"flags").get.call(t)!==A||r!==A}))&&i(c,"flags",{configurable:!0,get:a})},2865:(e,t,r)=>{var A=r(2444),n=r(1837).MISSED_STICKY,i=r(9872),a=r(8986),o=r(8301).get,s=RegExp.prototype,c=TypeError;A&&n&&a(s,"sticky",{configurable:!0,get:function(){if(this!==s){if("RegExp"===i(this))return!!o(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},5594:(e,t,r)=>{r(2823);var A,n,i=r(5366),a=r(3453),o=r(3749),s=r(7447),c=r(687),g=(A=!1,(n=/[ac]/).exec=function(){return A=!0,/./.exec.apply(this,arguments)},!0===n.test("abc")&&A),u=/./.test;i({target:"RegExp",proto:!0,forced:!g},{test:function(e){var t=s(this),r=c(e),A=t.exec;if(!o(A))return a(u,t,r);var n=a(A,t,r);return null!==n&&(s(n),!0)}})},8397:(e,t,r)=>{var A=r(2542).PROPER,n=r(8552),i=r(7447),a=r(687),o=r(3455),s=r(4554),c="toString",g=RegExp.prototype,u=g[c],l=o((function(){return"/a/b"!==u.call({source:"a",flags:"b"})})),h=A&&u.name!==c;(l||h)&&n(g,c,(function(){var e=i(this);return"/"+a(e.source)+"/"+a(s(e))}),{unsafe:!0})},4645:(e,t,r)=>{r(9556)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(2042))},5130:(e,t,r)=>{var A=r(5366),n=r(4656);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("difference")},{difference:n})},5636:(e,t,r)=>{var A=r(5366),n=r(3455),i=r(2446);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("intersection")||n((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:i})},8509:(e,t,r)=>{var A=r(5366),n=r(4545);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("isDisjointFrom")},{isDisjointFrom:n})},7332:(e,t,r)=>{var A=r(5366),n=r(7918);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("isSubsetOf")},{isSubsetOf:n})},6555:(e,t,r)=>{var A=r(5366),n=r(6111);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("isSupersetOf")},{isSupersetOf:n})},9255:(e,t,r)=>{r(4645)},3296:(e,t,r)=>{var A=r(5366),n=r(4498);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("symmetricDifference")},{symmetricDifference:n})},4594:(e,t,r)=>{var A=r(5366),n=r(9500);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("union")},{union:n})},8653:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(7222),a=r(1211),o=r(687),s=r(3455),c=n("".charAt);A({target:"String",proto:!0,forced:s((function(){return"\\ud842"!=="𠮷".at(-2)}))},{at:function(e){var t=o(i(this)),r=t.length,A=a(e),n=A>=0?A:r+A;return n<0||n>=r?void 0:c(t,n)}})},9657:(e,t,r)=>{var A,n=r(5366),i=r(2116),a=r(1139).f,o=r(5806),s=r(687),c=r(3631),g=r(7222),u=r(860),l=r(8507),h=i("".slice),I=Math.min,f=u("endsWith");n({target:"String",proto:!0,forced:!(!l&&!f&&(A=a(String.prototype,"endsWith"),A&&!A.writable)||f)},{endsWith:function(e){var t=s(g(this));c(e);var r=arguments.length>1?arguments[1]:void 0,A=t.length,n=void 0===r?A:I(o(r),A),i=s(e);return h(t,n-i.length,n)===i}})},2217:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(9002),a=RangeError,o=String.fromCharCode,s=String.fromCodePoint,c=n([].join);A({target:"String",stat:!0,arity:1,forced:!!s&&1!==s.length},{fromCodePoint:function(e){for(var t,r=[],A=arguments.length,n=0;A>n;){if(t=+arguments[n++],i(t,1114111)!==t)throw new a(t+" is not a valid code point");r[n]=t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320)}return c(r,"")}})},2467:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(3631),a=r(7222),o=r(687),s=r(860),c=n("".indexOf);A({target:"String",proto:!0,forced:!s("includes")},{includes:function(e){return!!~c(o(a(this)),o(i(e)),arguments.length>1?arguments[1]:void 0)}})},7460:(e,t,r)=>{var A=r(6903).charAt,n=r(687),i=r(8301),a=r(656),o=r(9393),s="String Iterator",c=i.set,g=i.getterFor(s);a(String,"String",(function(e){c(this,{type:s,string:n(e),index:0})}),(function(){var e,t=g(this),r=t.string,n=t.index;return n>=r.length?o(void 0,!0):(e=A(r,n),t.index+=e.length,o(e,!1))}))},1281:(e,t,r)=>{var A=r(3453),n=r(4364),i=r(7447),a=r(6021),o=r(5806),s=r(687),c=r(7222),g=r(8622),u=r(8149),l=r(4410);n("match",(function(e,t,r){return[function(t){var r=c(this),n=a(t)?void 0:g(t,e);return n?A(n,t,r):new RegExp(t)[e](s(r))},function(e){var A=i(this),n=s(e),a=r(t,A,n);if(a.done)return a.value;if(!A.global)return l(A,n);var c=A.unicode;A.lastIndex=0;for(var g,h=[],I=0;null!==(g=l(A,n));){var f=s(g[0]);h[I]=f,""===f&&(A.lastIndex=u(n,o(A.lastIndex),c)),I++}return 0===I?null:h}]}))},9484:(e,t,r)=>{var A=r(5366),n=r(6437).start;A({target:"String",proto:!0,forced:r(4903)},{padStart:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},4413:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(2608),a=r(7222),o=r(3749),s=r(6021),c=r(6484),g=r(687),u=r(8622),l=r(4554),h=r(3966),I=r(5811),f=r(8507),C=I("replace"),B=TypeError,Q=i("".indexOf),E=i("".replace),d=i("".slice),y=Math.max;A({target:"String",proto:!0},{replaceAll:function(e,t){var r,A,i,I,p,v,m,w,b,k,D=a(this),S=0,F="";if(!s(e)){if((r=c(e))&&(A=g(a(l(e))),!~Q(A,"g")))throw new B("\`.replaceAll\` does not allow non-global regexes");if(i=u(e,C))return n(i,e,D,t);if(f&&r)return E(g(D),e,t)}for(I=g(D),p=g(e),(v=o(t))||(t=g(t)),m=p.length,w=y(1,m),b=Q(I,p);-1!==b;)k=v?g(t(p,b,I)):h(p,I,b,[],void 0,t),F+=d(I,S,b)+k,S=b+m,b=b+w>I.length?-1:Q(I,p,b+w);return S{var A=r(3881),n=r(3453),i=r(2608),a=r(4364),o=r(3455),s=r(7447),c=r(3749),g=r(6021),u=r(1211),l=r(5806),h=r(687),I=r(7222),f=r(8149),C=r(8622),B=r(3966),Q=r(4410),E=r(5811)("replace"),d=Math.max,y=Math.min,p=i([].concat),v=i([].push),m=i("".indexOf),w=i("".slice),b="$0"==="a".replace(/./,"$0"),k=!!/./[E]&&""===/./[E]("a","$0");a("replace",(function(e,t,r){var i=k?"$":"$0";return[function(e,r){var A=I(this),i=g(e)?void 0:C(e,E);return i?n(i,e,A,r):n(t,h(A),e,r)},function(e,n){var a=s(this),o=h(e);if("string"==typeof n&&-1===m(n,i)&&-1===m(n,"$<")){var g=r(t,a,o,n);if(g.done)return g.value}var I=c(n);I||(n=h(n));var C,E=a.global;E&&(C=a.unicode,a.lastIndex=0);for(var b,k=[];null!==(b=Q(a,o))&&(v(k,b),E);)""===h(b[0])&&(a.lastIndex=f(o,l(a.lastIndex),C));for(var D,S="",F=0,x=0;x=F&&(S+=w(o,F,N)+R,F=N+G.length)}return S+w(o,F)}]}),!!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}))||!b||k)},4072:(e,t,r)=>{var A=r(3453),n=r(2608),i=r(4364),a=r(7447),o=r(6021),s=r(7222),c=r(1365),g=r(8149),u=r(5806),l=r(687),h=r(8622),I=r(4410),f=r(1837),C=r(3455),B=f.UNSUPPORTED_Y,Q=Math.min,E=n([].push),d=n("".slice),y=!C((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),p="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;i("split",(function(e,t,r){var n="0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:A(t,this,e,r)}:t;return[function(t,r){var i=s(this),a=o(t)?void 0:h(t,e);return a?A(a,t,i,r):A(n,l(i),t,r)},function(e,A){var i=a(this),o=l(e);if(!p){var s=r(n,i,o,A,n!==t);if(s.done)return s.value}var h=c(i,RegExp),f=i.unicode,C=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(B?"g":"y"),y=new h(B?"^(?:"+i.source+")":i,C),v=void 0===A?4294967295:A>>>0;if(0===v)return[];if(0===o.length)return null===I(y,o)?[o]:[];for(var m=0,w=0,b=[];w{var A,n=r(5366),i=r(2116),a=r(1139).f,o=r(5806),s=r(687),c=r(3631),g=r(7222),u=r(860),l=r(8507),h=i("".slice),I=Math.min,f=u("startsWith");n({target:"String",proto:!0,forced:!(!l&&!f&&(A=a(String.prototype,"startsWith"),A&&!A.writable)||f)},{startsWith:function(e){var t=s(g(this));c(e);var r=o(I(arguments.length>1?arguments[1]:void 0,t.length)),A=s(e);return h(t,r,r+A.length)===A}})},98:(e,t,r)=>{r(3185);var A=r(5366),n=r(2882);A({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==n},{trimEnd:n})},3185:(e,t,r)=>{var A=r(5366),n=r(2882);A({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==n},{trimRight:n})},9210:(e,t,r)=>{var A=r(5366),n=r(9418).trim;A({target:"String",proto:!0,forced:r(3794)("trim")},{trim:function(){return n(this)}})},4172:(e,t,r)=>{r(5343)("asyncIterator")},2873:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(3453),a=r(2608),o=r(8507),s=r(2444),c=r(6943),g=r(3455),u=r(9649),l=r(6921),h=r(7447),I=r(3637),f=r(6201),C=r(687),B=r(4004),Q=r(5304),E=r(496),d=r(3408),y=r(6442),p=r(6005),v=r(1139),m=r(1601),w=r(9217),b=r(9221),k=r(8552),D=r(8986),S=r(4593),F=r(2343),x=r(2645),R=r(5936),G=r(5811),N=r(4559),L=r(5343),U=r(3042),M=r(6911),J=r(8301),H=r(5645).forEach,Y=F("hidden"),P="Symbol",O="prototype",K=J.set,T=J.getterFor(P),q=Object[O],j=n.Symbol,W=j&&j[O],Z=n.RangeError,_=n.TypeError,X=n.QObject,V=v.f,z=m.f,$=y.f,ee=b.f,te=a([].push),re=S("symbols"),Ae=S("op-symbols"),ne=S("wks"),ie=!X||!X[O]||!X[O].findChild,ae=function(e,t,r){var A=V(q,t);A&&delete q[t],z(e,t,r),A&&e!==q&&z(q,t,A)},oe=s&&g((function(){return 7!==Q(z({},"a",{get:function(){return z(this,"a",{value:7}).a}})).a}))?ae:z,se=function(e,t){var r=re[e]=Q(W);return K(r,{type:P,tag:e,description:t}),s||(r.description=t),r},ce=function(e,t,r){e===q&&ce(Ae,t,r),h(e);var A=f(t);return h(r),u(re,A)?(r.enumerable?(u(e,Y)&&e[Y][A]&&(e[Y][A]=!1),r=Q(r,{enumerable:B(0,!1)})):(u(e,Y)||z(e,Y,B(1,Q(null))),e[Y][A]=!0),oe(e,A,r)):z(e,A,r)},ge=function(e,t){h(e);var r=I(t),A=E(r).concat(Ie(r));return H(A,(function(t){s&&!i(ue,r,t)||ce(e,t,r[t])})),e},ue=function(e){var t=f(e),r=i(ee,this,t);return!(this===q&&u(re,t)&&!u(Ae,t))&&(!(r||!u(this,t)||!u(re,t)||u(this,Y)&&this[Y][t])||r)},le=function(e,t){var r=I(e),A=f(t);if(r!==q||!u(re,A)||u(Ae,A)){var n=V(r,A);return!n||!u(re,A)||u(r,Y)&&r[Y][A]||(n.enumerable=!0),n}},he=function(e){var t=$(I(e)),r=[];return H(t,(function(e){u(re,e)||u(x,e)||te(r,e)})),r},Ie=function(e){var t=e===q,r=$(t?Ae:I(e)),A=[];return H(r,(function(e){!u(re,e)||t&&!u(q,e)||te(A,re[e])})),A};c||(k(W=(j=function(){if(l(W,this))throw new _("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?C(arguments[0]):void 0,t=R(e),r=function(e){var A=void 0===this?n:this;A===q&&i(r,Ae,e),u(A,Y)&&u(A[Y],t)&&(A[Y][t]=!1);var a=B(1,e);try{oe(A,t,a)}catch(e){if(!(e instanceof Z))throw e;ae(A,t,a)}};return s&&ie&&oe(q,t,{configurable:!0,set:r}),se(t,e)})[O],"toString",(function(){return T(this).tag})),k(j,"withoutSetter",(function(e){return se(R(e),e)})),b.f=ue,m.f=ce,w.f=ge,v.f=le,d.f=y.f=he,p.f=Ie,N.f=function(e){return se(G(e),e)},s&&(D(W,"description",{configurable:!0,get:function(){return T(this).description}}),o||k(q,"propertyIsEnumerable",ue,{unsafe:!0}))),A({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:j}),H(E(ne),(function(e){L(e)})),A({target:P,stat:!0,forced:!c},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),A({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(e,t){return void 0===t?Q(e):ge(Q(e),t)},defineProperty:ce,defineProperties:ge,getOwnPropertyDescriptor:le}),A({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:he}),U(),M(j,P),x[Y]=!0},4551:(e,t,r)=>{var A=r(5366),n=r(2444),i=r(4032),a=r(2608),o=r(9649),s=r(3749),c=r(6921),g=r(687),u=r(8986),l=r(2924),h=i.Symbol,I=h&&h.prototype;if(n&&s(h)&&(!("description"in I)||void 0!==h().description)){var f={},C=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:g(arguments[0]),t=c(I,this)?new h(e):void 0===e?h():h(e);return""===e&&(f[t]=!0),t};l(C,h),C.prototype=I,I.constructor=C;var B="Symbol(description detection)"===String(h("description detection")),Q=a(I.valueOf),E=a(I.toString),d=/^Symbol\\((.*)\\)[^)]+$/,y=a("".replace),p=a("".slice);u(I,"description",{configurable:!0,get:function(){var e=Q(this);if(o(f,e))return"";var t=E(e),r=B?p(t,7,-1):y(t,d,"$1");return""===r?void 0:r}}),A({global:!0,constructor:!0,forced:!0},{Symbol:C})}},4182:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(9649),a=r(687),o=r(4593),s=r(8592),c=o("string-to-symbol-registry"),g=o("symbol-to-string-registry");A({target:"Symbol",stat:!0,forced:!s},{for:function(e){var t=a(e);if(i(c,t))return c[t];var r=n("Symbol")(t);return c[t]=r,g[r]=t,r}})},7651:(e,t,r)=>{r(2873),r(4182),r(7876),r(9750),r(1309)},7876:(e,t,r)=>{var A=r(5366),n=r(9649),i=r(2277),a=r(8055),o=r(4593),s=r(8592),c=o("symbol-to-string-registry");A({target:"Symbol",stat:!0,forced:!s},{keyFor:function(e){if(!i(e))throw new TypeError(a(e)+" is not a symbol");if(n(c,e))return c[e]}})},5268:(e,t,r)=>{var A=r(5343),n=r(3042);A("toPrimitive"),n()},5997:(e,t,r)=>{var A=r(8711),n=r(5343),i=r(6911);n("toStringTag"),i(A("Symbol"),"Symbol")},3740:(e,t,r)=>{var A=r(4356),n=r(7878),i=r(1211),a=A.aTypedArray;(0,A.exportTypedArrayMethod)("at",(function(e){var t=a(this),r=n(t),A=i(e),o=A>=0?A:r+A;return o<0||o>=r?void 0:t[o]}))},6542:(e,t,r)=>{var A=r(2608),n=r(4356),i=A(r(6677)),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("copyWithin",(function(e,t){return i(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},5738:(e,t,r)=>{var A=r(4356),n=r(5645).every,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("every",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2900:(e,t,r)=>{var A=r(4356),n=r(9557),i=r(1198),a=r(1179),o=r(3453),s=r(2608),c=r(3455),g=A.aTypedArray,u=A.exportTypedArrayMethod,l=s("".slice);u("fill",(function(e){var t=arguments.length;g(this);var r="Big"===l(a(this),0,3)?i(e):+e;return o(n,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},2051:(e,t,r)=>{var A=r(4356),n=r(5645).filter,i=r(85),a=A.aTypedArray;(0,A.exportTypedArrayMethod)("filter",(function(e){var t=n(a(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},4211:(e,t,r)=>{var A=r(4356),n=r(5645).findIndex,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("findIndex",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},5294:(e,t,r)=>{var A=r(4356),n=r(767).findLastIndex,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("findLastIndex",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},9791:(e,t,r)=>{var A=r(4356),n=r(767).findLast,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("findLast",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3198:(e,t,r)=>{var A=r(4356),n=r(5645).find,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("find",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},4306:(e,t,r)=>{r(8975)("Float32",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},6473:(e,t,r)=>{r(8975)("Float64",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},1526:(e,t,r)=>{var A=r(4356),n=r(5645).forEach,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("forEach",(function(e){n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2569:(e,t,r)=>{var A=r(949);(0,r(4356).exportTypedArrayStaticMethod)("from",r(2291),A)},6032:(e,t,r)=>{var A=r(4356),n=r(7921).includes,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("includes",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3659:(e,t,r)=>{var A=r(4356),n=r(7921).indexOf,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("indexOf",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3195:(e,t,r)=>{r(8975)("Int16",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},1237:(e,t,r)=>{r(8975)("Int32",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},4834:(e,t,r)=>{r(8975)("Int8",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},8551:(e,t,r)=>{var A=r(4032),n=r(3455),i=r(2608),a=r(4356),o=r(9024),s=r(5811)("iterator"),c=A.Uint8Array,g=i(o.values),u=i(o.keys),l=i(o.entries),h=a.aTypedArray,I=a.exportTypedArrayMethod,f=c&&c.prototype,C=!n((function(){f[s].call([1])})),B=!!f&&f.values&&f[s]===f.values&&"values"===f.values.name,Q=function(){return g(h(this))};I("entries",(function(){return l(h(this))}),C),I("keys",(function(){return u(h(this))}),C),I("values",Q,C||!B,{name:"values"}),I(s,Q,C||!B,{name:"values"})},8553:(e,t,r)=>{var A=r(4356),n=r(2608),i=A.aTypedArray,a=A.exportTypedArrayMethod,o=n([].join);a("join",(function(e){return o(i(this),e)}))},7612:(e,t,r)=>{var A=r(4356),n=r(3881),i=r(3499),a=A.aTypedArray;(0,A.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return n(i,a(this),t>1?[e,arguments[1]]:[e])}))},8579:(e,t,r)=>{var A=r(4356),n=r(5645).map,i=r(580),a=A.aTypedArray;(0,A.exportTypedArrayMethod)("map",(function(e){return n(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))},7576:(e,t,r)=>{var A=r(4356),n=r(4734).right,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return n(i(this),e,t,t>1?arguments[1]:void 0)}))},7719:(e,t,r)=>{var A=r(4356),n=r(4734).left,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return n(i(this),e,t,t>1?arguments[1]:void 0)}))},2891:(e,t,r)=>{var A=r(4356),n=A.aTypedArray,i=A.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=this,r=n(t).length,A=a(r/2),i=0;i{var A=r(4032),n=r(3453),i=r(4356),a=r(7878),o=r(8402),s=r(4165),c=r(3455),g=A.RangeError,u=A.Int8Array,l=u&&u.prototype,h=l&&l.set,I=i.aTypedArray,f=i.exportTypedArrayMethod,C=!c((function(){var e=new Uint8ClampedArray(2);return n(h,e,{length:1,0:3},1),3!==e[1]})),B=C&&i.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new u(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));f("set",(function(e){I(this);var t=o(arguments.length>1?arguments[1]:void 0,1),r=s(e);if(C)return n(h,this,r,t);var A=this.length,i=a(r),c=0;if(i+t>A)throw new g("Wrong length");for(;c{var A=r(4356),n=r(580),i=r(3455),a=r(4224),o=A.aTypedArray;(0,A.exportTypedArrayMethod)("slice",(function(e,t){for(var r=a(o(this),e,t),A=n(this),i=0,s=r.length,c=new A(s);s>i;)c[i]=r[i++];return c}),i((function(){new Int8Array(1).slice()})))},9637:(e,t,r)=>{var A=r(4356),n=r(5645).some,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("some",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2709:(e,t,r)=>{var A=r(4032),n=r(2116),i=r(3455),a=r(4186),o=r(5272),s=r(4356),c=r(7085),g=r(5123),u=r(6415),l=r(1911),h=s.aTypedArray,I=s.exportTypedArrayMethod,f=A.Uint16Array,C=f&&n(f.prototype.sort),B=!(!C||i((function(){C(new f(2),null)}))&&i((function(){C(new f(2),{})}))),Q=!!C&&!i((function(){if(u)return u<74;if(c)return c<67;if(g)return!0;if(l)return l<602;var e,t,r=new f(516),A=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,A[e]=e-2*t+3;for(C(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==A[e])return!0}));I("sort",(function(e){return void 0!==e&&a(e),Q?C(this,e):o(h(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!Q||B)},8941:(e,t,r)=>{var A=r(4032),n=r(3881),i=r(4356),a=r(3455),o=r(4224),s=A.Int8Array,c=i.aTypedArray,g=i.exportTypedArrayMethod,u=[].toLocaleString,l=!!s&&a((function(){u.call(new s(1))}));g("toLocaleString",(function(){return n(u,l?o(c(this)):c(this),o(arguments))}),a((function(){return[1,2].toLocaleString()!==new s([1,2]).toLocaleString()}))||!a((function(){s.prototype.toLocaleString.call([1,2])})))},1579:(e,t,r)=>{var A=r(6444),n=r(4356),i=n.aTypedArray,a=n.exportTypedArrayMethod,o=n.getTypedArrayConstructor;a("toReversed",(function(){return A(i(this),o(this))}))},6236:(e,t,r)=>{var A=r(4356),n=r(2608),i=r(4186),a=r(7434),o=A.aTypedArray,s=A.getTypedArrayConstructor,c=A.exportTypedArrayMethod,g=n(A.TypedArrayPrototype.sort);c("toSorted",(function(e){void 0!==e&&i(e);var t=o(this),r=a(s(t),t);return g(r,e)}))},7716:(e,t,r)=>{var A=r(4356).exportTypedArrayMethod,n=r(3455),i=r(4032),a=r(2608),o=i.Uint8Array,s=o&&o.prototype||{},c=[].toString,g=a([].join);n((function(){c.call({})}))&&(c=function(){return g(this)});var u=s.toString!==c;A("toString",c,u)},3034:(e,t,r)=>{r(8975)("Uint16",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},2044:(e,t,r)=>{r(8975)("Uint32",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},7329:(e,t,r)=>{r(8975)("Uint8",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},4262:(e,t,r)=>{r(8975)("Uint8",(function(e){return function(t,r,A){return e(this,t,r,A)}}),!0)},1913:(e,t,r)=>{var A=r(920),n=r(4356),i=r(5415),a=r(1211),o=r(1198),s=n.aTypedArray,c=n.getTypedArrayConstructor,g=n.exportTypedArrayMethod,u=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();g("with",{with:function(e,t){var r=s(this),n=a(e),g=i(r)?o(t):+t;return A(r,c(r),n,g)}}.with,!u)},6722:(e,t,r)=>{var A,n=r(568),i=r(4032),a=r(2608),o=r(4183),s=r(5227),c=r(9556),g=r(8153),u=r(2674),l=r(8301).enforce,h=r(3455),I=r(6206),f=Object,C=Array.isArray,B=f.isExtensible,Q=f.isFrozen,E=f.isSealed,d=f.freeze,y=f.seal,p=!i.ActiveXObject&&"ActiveXObject"in i,v=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=c("WeakMap",v,g),w=m.prototype,b=a(w.set);if(I)if(p){A=g.getConstructor(v,"WeakMap",!0),s.enable();var k=a(w.delete),D=a(w.has),S=a(w.get);o(w,{delete:function(e){if(u(e)&&!B(e)){var t=l(this);return t.frozen||(t.frozen=new A),k(this,e)||t.frozen.delete(e)}return k(this,e)},has:function(e){if(u(e)&&!B(e)){var t=l(this);return t.frozen||(t.frozen=new A),D(this,e)||t.frozen.has(e)}return D(this,e)},get:function(e){if(u(e)&&!B(e)){var t=l(this);return t.frozen||(t.frozen=new A),D(this,e)?S(this,e):t.frozen.get(e)}return S(this,e)},set:function(e,t){if(u(e)&&!B(e)){var r=l(this);r.frozen||(r.frozen=new A),D(this,e)?b(this,e,t):r.frozen.set(e,t)}else b(this,e,t);return this}})}else n&&h((function(){var e=d([]);return b(new m,e,1),!Q(e)}))&&o(w,{set:function(e,t){var r;return C(e)&&(Q(e)?r=d:E(e)&&(r=y)),b(this,e,t),r&&r(e),this}})},8492:(e,t,r)=>{r(6722)},1176:(e,t,r)=>{r(9556)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(8153))},7121:(e,t,r)=>{r(1176)},4192:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(3399),a=r(7447),o=r(3749),s=r(2611),c=r(8986),g=r(3552),u=r(3455),l=r(9649),h=r(5811),I=r(2857).IteratorPrototype,f=r(2444),C=r(8507),B="constructor",Q="Iterator",E=h("toStringTag"),d=TypeError,y=n[Q],p=C||!o(y)||y.prototype!==I||!u((function(){y({})})),v=function(){if(i(this,I),s(this)===I)throw new d("Abstract class Iterator not directly constructable")},m=function(e,t){f?c(I,e,{configurable:!0,get:function(){return t},set:function(t){if(a(this),this===I)throw new d("You can't redefine this property");l(this,e)?this[e]=t:g(this,e,t)}}):I[e]=t};l(I,E)||m(E,Q),!p&&l(I,B)&&I[B]!==Object||m(B,v),v.prototype=I,A({global:!0,constructor:!0,forced:p},{Iterator:v})},463:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447);A({target:"Iterator",proto:!0,real:!0},{every:function(e){a(this),i(e);var t=o(this),r=0;return!n(t,(function(t,A){if(!e(t,r++))return A()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},8856:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(4186),a=r(7447),o=r(3447),s=r(2342),c=r(3535),g=r(8507),u=s((function(){for(var e,t,r=this.iterator,A=this.predicate,i=this.next;;){if(e=a(n(i,r)),this.done=!!e.done)return;if(t=e.value,c(r,A,[t,this.counter++],!0))return t}}));A({target:"Iterator",proto:!0,real:!0,forced:g},{filter:function(e){return a(this),i(e),new u(o(this),{predicate:e})}})},4865:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447);A({target:"Iterator",proto:!0,real:!0},{find:function(e){a(this),i(e);var t=o(this),r=0;return n(t,(function(t,A){if(e(t,r++))return A(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},1565:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447);A({target:"Iterator",proto:!0,real:!0},{forEach:function(e){a(this),i(e);var t=o(this),r=0;n(t,(function(t){e(t,r++)}),{IS_RECORD:!0})}})},5342:(e,t,r)=>{var A=r(5366),n=r(4009);A({target:"Iterator",proto:!0,real:!0,forced:r(8507)},{map:n})},8075:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447),s=TypeError;A({target:"Iterator",proto:!0,real:!0},{reduce:function(e){a(this),i(e);var t=o(this),r=arguments.length<2,A=r?void 0:arguments[1],c=0;if(n(t,(function(t){r?(r=!1,A=t):A=e(A,t,c),c++}),{IS_RECORD:!0}),r)throw new s("Reduce of empty iterator with no initial value");return A}})},9582:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447);A({target:"Iterator",proto:!0,real:!0},{some:function(e){a(this),i(e);var t=o(this),r=0;return n(t,(function(t,A){if(e(t,r++))return A()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},7987:(e,t,r)=>{var A=r(5366),n=r(7447),i=r(1804),a=r(3447),o=[].push;A({target:"Iterator",proto:!0,real:!0},{toArray:function(){var e=[];return i(a(n(this)),o,{that:e,IS_RECORD:!0}),e}})},6625:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(8711),a=r(2608),o=r(3453),s=r(3455),c=r(687),g=r(7900),u=r(2996).c2i,l=/[^\\d+/a-z]/i,h=/[\\t\\n\\f\\r ]+/g,I=/[=]{1,2}$/,f=i("atob"),C=String.fromCharCode,B=a("".charAt),Q=a("".replace),E=a(l.exec),d=!!f&&!s((function(){return"hi"!==f("aGk=")})),y=d&&s((function(){return""!==f(" ")})),p=d&&!s((function(){f("a")})),v=d&&!s((function(){f()})),m=d&&1!==f.length;A({global:!0,bind:!0,enumerable:!0,forced:!d||y||p||v||m},{atob:function(e){if(g(arguments.length,1),d&&!y&&!p)return o(f,n,e);var t,r,A,a=Q(c(e),h,""),s="",v=0,m=0;if(a.length%4==0&&(a=Q(a,I,"")),(t=a.length)%4==1||E(l,a))throw new(i("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;v>(-2*m&6)));return s}})},8316:(e,t,r)=>{var A=r(4032),n=r(2760),i=r(4784),a=r(3147),o=r(139),s=function(e){if(e&&e.forEach!==a)try{o(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in n)n[c]&&s(A[c]&&A[c].prototype);s(i)},3577:(e,t,r)=>{var A=r(4032),n=r(2760),i=r(4784),a=r(9024),o=r(139),s=r(6911),c=r(5811)("iterator"),g=a.values,u=function(e,t){if(e){if(e[c]!==g)try{o(e,c,g)}catch(t){e[c]=g}if(s(e,t,!0),n[t])for(var r in a)if(e[r]!==a[r])try{o(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var l in n)u(A[l]&&A[l].prototype,l);u(i,"DOMTokenList")},4967:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(9685),a=r(3455),o=r(5304),s=r(4004),c=r(1601).f,g=r(8552),u=r(8986),l=r(9649),h=r(3399),I=r(7447),f=r(2912),C=r(8363),B=r(4090),Q=r(3633),E=r(8301),d=r(2444),y=r(8507),p="DOMException",v="DATA_CLONE_ERR",m=n("Error"),w=n(p)||function(){try{(new(n("MessageChannel")||i("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name===v&&25===e.code)return e.constructor}}(),b=w&&w.prototype,k=m.prototype,D=E.set,S=E.getterFor(p),F="stack"in new m(p),x=function(e){return l(B,e)&&B[e].m?B[e].c:0},R=function(){h(this,G);var e=arguments.length,t=C(e<1?void 0:arguments[0]),r=C(e<2?void 0:arguments[1],"Error"),A=x(r);if(D(this,{type:p,name:r,message:t,code:A}),d||(this.name=r,this.message=t,this.code=A),F){var n=new m(t);n.name=p,c(this,"stack",s(1,Q(n.stack,1)))}},G=R.prototype=o(k),N=function(e){return{enumerable:!0,configurable:!0,get:e}},L=function(e){return N((function(){return S(this)[e]}))};d&&(u(G,"code",L("code")),u(G,"message",L("message")),u(G,"name",L("name"))),c(G,"constructor",s(1,R));var U=a((function(){return!(new w instanceof m)})),M=U||a((function(){return k.toString!==f||"2: 1"!==String(new w(1,2))})),J=U||a((function(){return 25!==new w(1,"DataCloneError").code})),H=U||25!==w[v]||25!==b[v],Y=y?M||J||H:U;A({global:!0,constructor:!0,forced:Y},{DOMException:Y?R:w});var P=n(p),O=P.prototype;for(var K in M&&(y||w===P)&&g(O,"toString",f),J&&d&&w===P&&u(O,"code",N((function(){return x(I(this).name)}))),B)if(l(B,K)){var T=B[K],q=T.s,j=s(6,T.c);l(P,q)||c(P,q,j),l(O,q)||c(O,q,j)}},6403:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(8711),a=r(4004),o=r(1601).f,s=r(9649),c=r(3399),g=r(3951),u=r(8363),l=r(4090),h=r(3633),I=r(2444),f=r(8507),C="DOMException",B=i("Error"),Q=i(C),E=function(){c(this,d);var e=arguments.length,t=u(e<1?void 0:arguments[0]),r=u(e<2?void 0:arguments[1],"Error"),A=new Q(t,r),n=new B(t);return n.name=C,o(A,"stack",a(1,h(n.stack,1))),g(A,this,E),A},d=E.prototype=Q.prototype,y="stack"in new B(C),p="stack"in new Q(1,2),v=Q&&I&&Object.getOwnPropertyDescriptor(n,C),m=!(!v||v.writable&&v.configurable),w=y&&!m&&!p;A({global:!0,constructor:!0,forced:f||w},{DOMException:w?E:Q});var b=i(C),k=b.prototype;if(k.constructor!==b)for(var D in f||o(k,"constructor",a(1,b)),l)if(s(l,D)){var S=l[D],F=S.s;s(b,F)||o(b,F,a(6,S.c))}},3355:(e,t,r)=>{var A=r(8711),n="DOMException";r(6911)(A(n),n)},8043:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(8986),a=r(2444),o=TypeError,s=Object.defineProperty,c=n.self!==n;try{if(a){var g=Object.getOwnPropertyDescriptor(n,"self");!c&&g&&g.get&&g.enumerable||i(n,"self",{get:function(){return n},set:function(e){if(this!==n)throw new o("Illegal invocation");s(n,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else A({global:!0,simple:!0,forced:c},{self:n})}catch(e){}},9734:(e,t,r)=>{r(9024),r(2217);var A=r(5366),n=r(4032),i=r(5725),a=r(8711),o=r(3453),s=r(2608),c=r(2444),g=r(8200),u=r(8552),l=r(8986),h=r(4183),I=r(6911),f=r(282),C=r(8301),B=r(3399),Q=r(3749),E=r(9649),d=r(4864),y=r(1179),p=r(7447),v=r(2674),m=r(687),w=r(5304),b=r(4004),k=r(6961),D=r(7507),S=r(9393),F=r(7900),x=r(5811),R=r(5272),G=x("iterator"),N="URLSearchParams",L=N+"Iterator",U=C.set,M=C.getterFor(N),J=C.getterFor(L),H=i("fetch"),Y=i("Request"),P=i("Headers"),O=Y&&Y.prototype,K=P&&P.prototype,T=n.TypeError,q=n.encodeURIComponent,j=String.fromCharCode,W=a("String","fromCodePoint"),Z=parseInt,_=s("".charAt),X=s([].join),V=s([].push),z=s("".replace),$=s([].shift),ee=s([].splice),te=s("".split),re=s("".slice),Ae=s(/./.exec),ne=/\\+/g,ie=/^[0-9a-f]+$/i,ae=function(e,t){var r=re(e,t,t+2);return Ae(ie,r)?Z(r,16):NaN},oe=function(e){for(var t=0,r=128;r>0&&0!=(e&r);r>>=1)t++;return t},se=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ce=function(e){for(var t=(e=z(e,ne," ")).length,r="",A=0;At){r+="%",A++;continue}var i=ae(e,A+1);if(i!=i){r+=n,A++;continue}A+=2;var a=oe(i);if(0===a)n=j(i);else{if(1===a||a>4){r+="�",A++;continue}for(var o=[i],s=1;st||"%"!==_(e,A));){var c=ae(e,A+1);if(c!=c){A+=3;break}if(c>191||c<128)break;V(o,c),A+=2,s++}if(o.length!==a){r+="�";continue}var g=se(o);null===g?r+="�":n=W(g)}}r+=n,A++}return r},ge=/[!'()~]|%20/g,ue={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},le=function(e){return ue[e]},he=function(e){return z(q(e),ge,le)},Ie=f((function(e,t){U(this,{type:L,target:M(e).entries,index:0,kind:t})}),N,(function(){var e=J(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,S(void 0,!0);var A=t[r];switch(e.kind){case"keys":return S(A.key,!1);case"values":return S(A.value,!1)}return S([A.key,A.value],!1)}),!0),fe=function(e){this.entries=[],this.url=null,void 0!==e&&(v(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===_(e,0)?re(e,1):e:m(e)))};fe.prototype={type:N,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,A,n,i,a,s,c=this.entries,g=D(e);if(g)for(r=(t=k(e,g)).next;!(A=o(r,t)).done;){if(i=(n=k(p(A.value))).next,(a=o(i,n)).done||(s=o(i,n)).done||!o(i,n).done)throw new T("Expected sequence with length 2");V(c,{key:m(a.value),value:m(s.value)})}else for(var u in e)E(e,u)&&V(c,{key:u,value:m(e[u])})},parseQuery:function(e){if(e)for(var t,r,A=this.entries,n=te(e,"&"),i=0;i0?arguments[0]:void 0));c||(this.size=e.entries.length)},Be=Ce.prototype;if(h(Be,{append:function(e,t){var r=M(this);F(arguments.length,2),V(r.entries,{key:m(e),value:m(t)}),c||this.length++,r.updateURL()},delete:function(e){for(var t=M(this),r=F(arguments.length,1),A=t.entries,n=m(e),i=r<2?void 0:arguments[1],a=void 0===i?i:m(i),o=0;ot.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=M(this).entries,A=d(e,arguments.length>1?arguments[1]:void 0),n=0;n1?de(arguments[1]):{})}}),Q(Y)){var ye=function(e){return B(this,O),new Y(e,arguments.length>1?de(arguments[1]):{})};O.constructor=ye,ye.prototype=O,A({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ye})}}e.exports={URLSearchParams:Ce,getState:M}},1531:(e,t,r)=>{var A=r(8552),n=r(2608),i=r(687),a=r(7900),o=URLSearchParams,s=o.prototype,c=n(s.append),g=n(s.delete),u=n(s.forEach),l=n([].push),h=new o("a=1&a=2&b=3");h.delete("a",1),h.delete("b",void 0),h+""!="a=2"&&A(s,"delete",(function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&void 0===r)return g(this,e);var A=[];u(this,(function(e,t){l(A,{key:t,value:e})})),a(t,1);for(var n,o=i(e),s=i(r),h=0,I=0,f=!1,C=A.length;h{var A=r(8552),n=r(2608),i=r(687),a=r(7900),o=URLSearchParams,s=o.prototype,c=n(s.getAll),g=n(s.has),u=new o("a=1");!u.has("a",2)&&u.has("a",void 0)||A(s,"has",(function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&void 0===r)return g(this,e);var A=c(this,e);a(t,1);for(var n=i(r),o=0;o{r(9734)},4145:(e,t,r)=>{var A=r(2444),n=r(2608),i=r(8986),a=URLSearchParams.prototype,o=n(a.forEach);A&&!("size"in a)&&i(a,"size",{get:function(){var e=0;return o(this,(function(){e++})),e},configurable:!0,enumerable:!0})},161:(e,t,r)=>{r(7460);var A,n=r(5366),i=r(2444),a=r(8200),o=r(4032),s=r(4864),c=r(2608),g=r(8552),u=r(8986),l=r(3399),h=r(9649),I=r(8069),f=r(3948),C=r(4224),B=r(6903).codeAt,Q=r(5141),E=r(687),d=r(6911),y=r(7900),p=r(9734),v=r(8301),m=v.set,w=v.getterFor("URL"),b=p.URLSearchParams,k=p.getState,D=o.URL,S=o.TypeError,F=o.parseInt,x=Math.floor,R=Math.pow,G=c("".charAt),N=c(/./.exec),L=c([].join),U=c(1..toString),M=c([].pop),J=c([].push),H=c("".replace),Y=c([].shift),P=c("".split),O=c("".slice),K=c("".toLowerCase),T=c([].unshift),q="Invalid scheme",j="Invalid host",W="Invalid port",Z=/[a-z]/i,_=/[\\d+-.a-z]/i,X=/\\d/,V=/^0x/i,z=/^[0-7]+$/,$=/^\\d+$/,ee=/^[\\da-f]+$/i,te=/[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/,re=/[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/,Ae=/^[\\u0000-\\u0020]+/,ne=/(^|[^\\u0000-\\u0020])[\\u0000-\\u0020]+$/,ie=/[\\t\\n\\r]/g,ae=function(e){var t,r,A,n;if("number"==typeof e){for(t=[],r=0;r<4;r++)T(t,e%256),e=x(e/256);return L(t,".")}if("object"==typeof e){for(t="",A=function(e){for(var t=null,r=1,A=null,n=0,i=0;i<8;i++)0!==e[i]?(n>r&&(t=A,r=n),A=null,n=0):(null===A&&(A=i),++n);return n>r?A:t}(e),r=0;r<8;r++)n&&0===e[r]||(n&&(n=!1),A===r?(t+=r?":":"::",n=!0):(t+=U(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},oe={},se=I({},oe,{" ":1,'"':1,"<":1,">":1,"\`":1}),ce=I({},se,{"#":1,"?":1,"{":1,"}":1}),ge=I({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\\\":1,"]":1,"^":1,"|":1}),ue=function(e,t){var r=B(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},le={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var r;return 2===e.length&&N(Z,G(e,0))&&(":"===(r=G(e,1))||!t&&"|"===r)},Ie=function(e){var t;return e.length>1&&he(O(e,0,2))&&(2===e.length||"/"===(t=G(e,2))||"\\\\"===t||"?"===t||"#"===t)},fe=function(e){return"."===e||"%2e"===K(e)},Ce={},Be={},Qe={},Ee={},de={},ye={},pe={},ve={},me={},we={},be={},ke={},De={},Se={},Fe={},xe={},Re={},Ge={},Ne={},Le={},Ue={},Me=function(e,t,r){var A,n,i,a=E(e);if(t){if(n=this.parse(a))throw new S(n);this.searchParams=null}else{if(void 0!==r&&(A=new Me(r,!0)),n=this.parse(a,null,A))throw new S(n);(i=k(new b)).bindURL(this),this.searchParams=i}};Me.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,g=t||Ce,u=0,l="",I=!1,B=!1,Q=!1;for(e=E(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=H(e,Ae,""),e=H(e,ne,"$1")),e=H(e,ie,""),n=f(e);u<=n.length;){switch(i=n[u],g){case Ce:if(!i||!N(Z,i)){if(t)return q;g=Qe;continue}l+=K(i),g=Be;break;case Be:if(i&&(N(_,i)||"+"===i||"-"===i||"."===i))l+=K(i);else{if(":"!==i){if(t)return q;l="",g=Qe,u=0;continue}if(t&&(c.isSpecial()!==h(le,l)||"file"===l&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&le[c.scheme]===c.port&&(c.port=null));l="","file"===c.scheme?g=Se:c.isSpecial()&&r&&r.scheme===c.scheme?g=Ee:c.isSpecial()?g=ve:"/"===n[u+1]?(g=de,u++):(c.cannotBeABaseURL=!0,J(c.path,""),g=Ne)}break;case Qe:if(!r||r.cannotBeABaseURL&&"#"!==i)return q;if(r.cannotBeABaseURL&&"#"===i){c.scheme=r.scheme,c.path=C(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,g=Ue;break}g="file"===r.scheme?Se:ye;continue;case Ee:if("/"!==i||"/"!==n[u+1]){g=ye;continue}g=me,u++;break;case de:if("/"===i){g=we;break}g=Ge;continue;case ye:if(c.scheme=r.scheme,i===A)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=C(r.path),c.query=r.query;else if("/"===i||"\\\\"===i&&c.isSpecial())g=pe;else if("?"===i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=C(r.path),c.query="",g=Le;else{if("#"!==i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=C(r.path),c.path.length--,g=Ge;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=C(r.path),c.query=r.query,c.fragment="",g=Ue}break;case pe:if(!c.isSpecial()||"/"!==i&&"\\\\"!==i){if("/"!==i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,g=Ge;continue}g=we}else g=me;break;case ve:if(g=me,"/"!==i||"/"!==G(l,u+1))continue;u++;break;case me:if("/"!==i&&"\\\\"!==i){g=we;continue}break;case we:if("@"===i){I&&(l="%40"+l),I=!0,a=f(l);for(var d=0;d65535)return W;c.port=c.isSpecial()&&v===le[c.scheme]?null:v,l=""}if(t)return;g=Re;continue}return W}l+=i;break;case Se:if(c.scheme="file","/"===i||"\\\\"===i)g=Fe;else{if(!r||"file"!==r.scheme){g=Ge;continue}switch(i){case A:c.host=r.host,c.path=C(r.path),c.query=r.query;break;case"?":c.host=r.host,c.path=C(r.path),c.query="",g=Le;break;case"#":c.host=r.host,c.path=C(r.path),c.query=r.query,c.fragment="",g=Ue;break;default:Ie(L(C(n,u),""))||(c.host=r.host,c.path=C(r.path),c.shortenPath()),g=Ge;continue}}break;case Fe:if("/"===i||"\\\\"===i){g=xe;break}r&&"file"===r.scheme&&!Ie(L(C(n,u),""))&&(he(r.path[0],!0)?J(c.path,r.path[0]):c.host=r.host),g=Ge;continue;case xe:if(i===A||"/"===i||"\\\\"===i||"?"===i||"#"===i){if(!t&&he(l))g=Ge;else if(""===l){if(c.host="",t)return;g=Re}else{if(o=c.parseHost(l))return o;if("localhost"===c.host&&(c.host=""),t)return;l="",g=Re}continue}l+=i;break;case Re:if(c.isSpecial()){if(g=Ge,"/"!==i&&"\\\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==A&&(g=Ge,"/"!==i))continue}else c.fragment="",g=Ue;else c.query="",g=Le;break;case Ge:if(i===A||"/"===i||"\\\\"===i&&c.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(s=K(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"===i||"\\\\"===i&&c.isSpecial()||J(c.path,"")):fe(l)?"/"===i||"\\\\"===i&&c.isSpecial()||J(c.path,""):("file"===c.scheme&&!c.path.length&&he(l)&&(c.host&&(c.host=""),l=G(l,0)+":"),J(c.path,l)),l="","file"===c.scheme&&(i===A||"?"===i||"#"===i))for(;c.path.length>1&&""===c.path[0];)Y(c.path);"?"===i?(c.query="",g=Le):"#"===i&&(c.fragment="",g=Ue)}else l+=ue(i,ce);break;case Ne:"?"===i?(c.query="",g=Le):"#"===i?(c.fragment="",g=Ue):i!==A&&(c.path[0]+=ue(i,oe));break;case Le:t||"#"!==i?i!==A&&("'"===i&&c.isSpecial()?c.query+="%27":c.query+="#"===i?"%23":ue(i,oe)):(c.fragment="",g=Ue);break;case Ue:i!==A&&(c.fragment+=ue(i,se))}u++}},parseHost:function(e){var t,r,A;if("["===G(e,0)){if("]"!==G(e,e.length-1))return j;if(t=function(e){var t,r,A,n,i,a,o,s=[0,0,0,0,0,0,0,0],c=0,g=null,u=0,l=function(){return G(e,u)};if(":"===l()){if(":"!==G(e,1))return;u+=2,g=++c}for(;l();){if(8===c)return;if(":"!==l()){for(t=r=0;r<4&&N(ee,l());)t=16*t+F(l(),16),u++,r++;if("."===l()){if(0===r)return;if(u-=r,c>6)return;for(A=0;l();){if(n=null,A>0){if(!("."===l()&&A<4))return;u++}if(!N(X,l()))return;for(;N(X,l());){if(i=F(l(),10),null===n)n=i;else{if(0===n)return;n=10*n+i}if(n>255)return;u++}s[c]=256*s[c]+n,2!=++A&&4!==A||c++}if(4!==A)return;break}if(":"===l()){if(u++,!l())return}else if(l())return;s[c++]=t}else{if(null!==g)return;u++,g=++c}}if(null!==g)for(a=c-g,c=7;0!==c&&a>0;)o=s[c],s[c--]=s[g+a-1],s[g+--a]=o;else if(8!==c)return;return s}(O(e,1,-1)),!t)return j;this.host=t}else if(this.isSpecial()){if(e=Q(e),N(te,e))return j;if(t=function(e){var t,r,A,n,i,a,o,s=P(e,".");if(s.length&&""===s[s.length-1]&&s.length--,(t=s.length)>4)return e;for(r=[],A=0;A1&&"0"===G(n,0)&&(i=N(V,n)?16:8,n=O(n,8===i?1:2)),""===n)a=0;else{if(!N(10===i?$:8===i?z:ee,n))return e;a=F(n,i)}J(r,a)}for(A=0;A=R(256,5-t))return null}else if(a>255)return null;for(o=M(r),A=0;A1?arguments[1]:void 0,A=m(t,new Me(e,!1,r));i||(t.href=A.serialize(),t.origin=A.getOrigin(),t.protocol=A.getProtocol(),t.username=A.getUsername(),t.password=A.getPassword(),t.host=A.getHost(),t.hostname=A.getHostname(),t.port=A.getPort(),t.pathname=A.getPathname(),t.search=A.getSearch(),t.searchParams=A.getSearchParams(),t.hash=A.getHash())},He=Je.prototype,Ye=function(e,t){return{get:function(){return w(this)[e]()},set:t&&function(e){return w(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(u(He,"href",Ye("serialize","setHref")),u(He,"origin",Ye("getOrigin")),u(He,"protocol",Ye("getProtocol","setProtocol")),u(He,"username",Ye("getUsername","setUsername")),u(He,"password",Ye("getPassword","setPassword")),u(He,"host",Ye("getHost","setHost")),u(He,"hostname",Ye("getHostname","setHostname")),u(He,"port",Ye("getPort","setPort")),u(He,"pathname",Ye("getPathname","setPathname")),u(He,"search",Ye("getSearch","setSearch")),u(He,"searchParams",Ye("getSearchParams")),u(He,"hash",Ye("getHash","setHash"))),g(He,"toJSON",(function(){return w(this).serialize()}),{enumerable:!0}),g(He,"toString",(function(){return w(this).serialize()}),{enumerable:!0}),D){var Pe=D.createObjectURL,Oe=D.revokeObjectURL;Pe&&g(Je,"createObjectURL",s(Pe,D)),Oe&&g(Je,"revokeObjectURL",s(Oe,D))}d(Je,"URL"),n({global:!0,constructor:!0,forced:!a,sham:!i},{URL:Je})},5728:(e,t,r)=>{r(161)},4136:(e,t,r)=>{var A=r(5366),n=r(3453);A({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return n(URL.prototype.toString,this)}})}},t={};function r(A){var n=t[A];if(void 0!==n)return n.exports;var i=t[A]={exports:{}};return e[A].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var A in t)r.o(t,A)&&!r.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var A,n=globalThis.pdfjsWorker={};function i(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function a(e,t){for(var r=0;riL}),r(7651),r(4551),r(4172),r(5268),r(5997),r(184),r(3234),r(6497),r(6746),r(9024),r(5550),r(9138),r(6794),r(750),r(9722),r(5015),r(6209),r(9261),r(3700),r(3632),r(7316),r(7531),r(1999),r(3379),r(1234),r(2431),r(9732),r(2823),r(5594),r(8397),r(9255),r(5130),r(5636),r(8509),r(7332),r(6555),r(3296),r(4594),r(7329),r(3740),r(6542),r(5738),r(2900),r(2051),r(3198),r(4211),r(9791),r(5294),r(1526),r(6032),r(3659),r(8551),r(8553),r(7612),r(8579),r(7719),r(7576),r(2891),r(2605),r(4863),r(9637),r(2709),r(8941),r(1579),r(6236),r(7716),r(1913),r(4192),r(1565),r(5342),r(9582),r(8316),r(3577),r(8043),r(932),r(8169),r(1425),r(489),r(2467),r(1281),r(9484),r(4672),r(4413),r(9264),r(2044),r(5728),r(4136),r(4520),r(1531),r(3678),r(4145);var f=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),C=[1,0,0,1,0,0],B=[.001,0,0,.001,0,0],Q=1.35,E=.25925925925925924,d="pdfjs_internal_editor_",y={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},p="Group",v=32,m=8192,w=65536,b={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},k={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},D={O:"PageOpen",C:"PageClose"},S={ERRORS:0,WARNINGS:1,INFOS:5},F={NONE:0,BINARY:1},x=10,R=11,G=12,N=37,L=44,U=58,M=59,J=70,H=71,Y=83,P=85,O=S.WARNINGS;function K(){return O}function T(e){O>=S.INFOS&&console.log("Info: ".concat(e))}function q(e){O>=S.WARNINGS&&console.log("Warning: ".concat(e))}function j(e){throw new Error(e)}function W(e,t){e||j(t)}function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){var A=e.match(/\\./g);(null==A?void 0:A.length)>=2&&(e="http://".concat(e))}if(r.tryConvertEncoding)try{e=fe(e)}catch(e){}}var n=t?new URL(e,t):new URL(e);if(function(e){switch(null==e?void 0:e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n))return n}catch(e){}return null}function _(e,t,r){var A=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(e,t,{value:r,enumerable:!A,configurable:!0,writable:!1}),r}var X=function(){function e(e,t){this.message=e,this.name=t}return e.prototype=new Error,e.constructor=e,e}(),V=function(e){function t(e,r){var A;return c(this,t),(A=g(this,t,[e,"PasswordException"])).code=r,A}return h(t,X),o(t)}(),z=function(e){function t(e,r){var A;return c(this,t),(A=g(this,t,[e,"UnknownErrorException"])).details=r,A}return h(t,X),o(t)}(),$=function(e){function t(e){return c(this,t),g(this,t,[e,"InvalidPDFException"])}return h(t,X),o(t)}(),ee=function(e){function t(e){return c(this,t),g(this,t,[e,"MissingPDFException"])}return h(t,X),o(t)}(),te=function(e){function t(e,r){var A;return c(this,t),(A=g(this,t,[e,"UnexpectedResponseException"])).status=r,A}return h(t,X),o(t)}(),re=function(e){function t(e){return c(this,t),g(this,t,[e,"FormatError"])}return h(t,X),o(t)}(),Ae=function(e){function t(e){return c(this,t),g(this,t,[e,"AbortException"])}return h(t,X),o(t)}();function ne(e){"object"==typeof e&&void 0!==(null==e?void 0:e.length)||j("Invalid argument for bytesToString");var t=e.length,r=8192;if(t>24&255,e>>16&255,e>>8&255,255&e)}function oe(e){return Object.keys(e).length}var se=function(){return o((function e(){c(this,e)}),null,[{key:"isLittleEndian",get:function(){return _(this,"isLittleEndian",((e=new Uint8Array(4))[0]=1,1===new Uint32Array(e.buffer,0,1)[0]));var e}},{key:"isEvalSupported",get:function(){return _(this,"isEvalSupported",function(){try{return new Function(""),!0}catch(e){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function(){return _(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function(){var e,t;return"undefined"!=typeof navigator&&"string"==typeof(null===(e=navigator)||void 0===e?void 0:e.platform)?_(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:"string"==typeof(null===(t=navigator)||void 0===t?void 0:t.userAgent)&&navigator.userAgent.includes("Firefox")}):_(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}},{key:"isCSSRoundSupported",get:function(){var e,t;return _(this,"isCSSRoundSupported",null===(e=globalThis.CSS)||void 0===e||null===(t=e.supports)||void 0===t?void 0:t.call(e,"width: round(1.5px, 1px)"))}}])}(),ce=Array.from(Array(256).keys(),(function(e){return e.toString(16).padStart(2,"0")})),ge=function(){function e(){c(this,e)}return o(e,null,[{key:"makeHexColor",value:function(e,t,r){return"#".concat(ce[e]).concat(ce[t]).concat(ce[r])}},{key:"scaleMinMax",value:function(e,t){var r;e[0]?(e[0]<0&&(r=t[0],t[0]=t[2],t[2]=r),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(r=t[1],t[1]=t[3],t[3]=r),t[1]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[1],t[1]=r,r=t[2],t[2]=t[3],t[3]=r,e[1]<0&&(r=t[1],t[1]=t[3],t[3]=r),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[2],t[2]=r),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(e,t){var r=this.applyTransform(e,t),A=this.applyTransform(e.slice(2,4),t),n=this.applyTransform([e[0],e[3]],t),i=this.applyTransform([e[2],e[1]],t);return[Math.min(r[0],A[0],n[0],i[0]),Math.min(r[1],A[1],n[1],i[1]),Math.max(r[0],A[0],n[0],i[0]),Math.max(r[1],A[1],n[1],i[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],A=e[0]*t[1]+e[1]*t[3],n=e[2]*t[0]+e[3]*t[2],i=e[2]*t[1]+e[3]*t[3],a=(r+i)/2,o=Math.sqrt(Math.pow(r+i,2)-4*(r*i-n*A))/2,s=a+o||1,c=a-o||1;return[Math.sqrt(s),Math.sqrt(c)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(e,t){var r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),A=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>A)return null;var n=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return n>i?null:[r,n,A,i]}},{key:"bezierBoundingBox",value:function(t,r,A,n,a,o,s,c,g){return g?(g[0]=Math.min(g[0],t,s),g[1]=Math.min(g[1],r,c),g[2]=Math.max(g[2],t,s),g[3]=Math.max(g[3],r,c)):g=[Math.min(t,s),Math.min(r,c),Math.max(t,s),Math.max(r,c)],i(e,this,le).call(this,t,A,a,s,r,n,o,c,3*(3*(A-a)-t+s),6*(t-2*A+a),3*(A-t),g),i(e,this,le).call(this,t,A,a,s,r,n,o,c,3*(3*(n-o)-r+c),6*(r-2*n+o),3*(n-r),g),g}}])}();function ue(e,t,r,A,n,i,a,o,s,c){if(!(s<=0||s>=1)){var g=1-s,u=s*s,l=u*s,h=g*(g*(g*e+3*s*t)+3*u*r)+l*A,I=g*(g*(g*n+3*s*i)+3*u*a)+l*o;c[0]=Math.min(c[0],h),c[1]=Math.min(c[1],I),c[2]=Math.max(c[2],h),c[3]=Math.max(c[3],I)}}function le(e,t,r,n,a,o,s,c,g,u,l,h){if(Math.abs(g)<1e-12)Math.abs(u)>=1e-12&&i(A,this,ue).call(this,e,t,r,n,a,o,s,c,-l/u,h);else{var I=Math.pow(u,2)-4*l*g;if(!(I<0)){var f=Math.sqrt(I),C=2*g;i(A,this,ue).call(this,e,t,r,n,a,o,s,c,(-u+f)/C,h),i(A,this,ue).call(this,e,t,r,n,a,o,s,c,(-u-f)/C,h)}}}A=ge;var he=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function Ie(e){var t;if(e[0]>="ï"&&("þ"===e[0]&&"ÿ"===e[1]?(t="utf-16be",e.length%2==1&&(e=e.slice(0,-1))):"ÿ"===e[0]&&"þ"===e[1]?(t="utf-16le",e.length%2==1&&(e=e.slice(0,-1))):"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t))try{var r=new TextDecoder(t,{fatal:!0}),A=ie(e),n=r.decode(A);return n.includes("\x1B")?n.replaceAll(/\\x1b[^\\x1b]*(?:\\x1b|$)/g,""):n}catch(e){q('stringToPDFString: "'.concat(e,'".'))}for(var i=[],a=0,o=e.length;a0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}var Ee=null,de=null;function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||ve(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ve(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ve(e,t){if(e){if("string"==typeof e)return me(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?me(e,t):void 0}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function be(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;ke(this,e),this._map=Object.create(null),this.xref=t,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=Je}return Se(e,[{key:"assignXref",value:function(e){this.xref=e}},{key:"size",get:function(){return Object.keys(this._map).length}},{key:"get",value:function(e,t,r){var A=this._map[e];return void 0===A&&void 0!==t&&void 0===(A=this._map[t])&&void 0!==r&&(A=this._map[r]),A instanceof Ye&&this.xref?this.xref.fetch(A,this.suppressEncryption):A}},{key:"getAsync",value:(t=we().mark((function e(t,r,A){var n;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(n=this._map[t])&&void 0!==r&&void 0===(n=this._map[r])&&void 0!==A&&(n=this._map[A]),!(n instanceof Ye&&this.xref)){e.next=4;break}return e.abrupt("return",this.xref.fetchAsync(n,this.suppressEncryption));case 4:return e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(A,n){var i=t.apply(e,r);function a(e){be(i,A,n,a,o,"next",e)}function o(e){be(i,A,n,a,o,"throw",e)}a(void 0)}))},function(e,t,A){return r.apply(this,arguments)})},{key:"getArray",value:function(e,t,r){var A=this._map[e];if(void 0===A&&void 0!==t&&void 0===(A=this._map[t])&&void 0!==r&&(A=this._map[r]),A instanceof Ye&&this.xref&&(A=this.xref.fetch(A,this.suppressEncryption)),Array.isArray(A))for(var n=0,i=(A=A.slice()).length;n0&&(o._map[d]=v)}else o._map[d]=y[0]}}catch(e){Q.e(e)}finally{Q.f()}return s.clear(),o.size>0?o:e.empty}}]);var t,r}(),Ye=function(){function e(t,r){ke(this,e),this.num=t,this.gen=r}return Se(e,[{key:"toString",value:function(){return 0===this.gen?"".concat(this.num,"R"):"".concat(this.num,"R").concat(this.gen)}}],[{key:"fromString",value:function(t){var r=Le[t];if(r)return r;var A=/^(\\d+)R(\\d*)$/.exec(t);return A&&"0"!==A[1]?Le[t]=new e(parseInt(A[1]),A[2]?parseInt(A[2]):0):null}},{key:"get",value:function(t,r){var A,n=0===r?"".concat(t,"R"):"".concat(t,"R").concat(r);return(A=Le)[n]||(A[n]=new e(t,r))}}])}(),Pe=function(){return Se((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;ke(this,e),this._set=new Set(null==t?void 0:t._set)}),[{key:"has",value:function(e){return this._set.has(e.toString())}},{key:"put",value:function(e){this._set.add(e.toString())}},{key:"remove",value:function(e){this._set.delete(e.toString())}},{key:Symbol.iterator,value:function(){return this._set.values()}},{key:"clear",value:function(){this._set.clear()}}])}(),Oe=function(){return Se((function e(){ke(this,e),this._map=new Map}),[{key:"size",get:function(){return this._map.size}},{key:"get",value:function(e){return this._map.get(e.toString())}},{key:"has",value:function(e){return this._map.has(e.toString())}},{key:"put",value:function(e,t){this._map.set(e.toString(),t)}},{key:"putAlias",value:function(e,t){this._map.set(e.toString(),this.get(t))}},{key:Symbol.iterator,value:function(){return this._map.values()}},{key:"clear",value:function(){this._map.clear()}},{key:"items",value:we().mark((function e(){var t,r,A,n,i;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=pe(this._map),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return A=ye(r.value,2),n=A[0],i=A[1],e.next=7,[Ye.fromString(n),i];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))}])}();function Ke(e,t){return e instanceof Ue&&(void 0===t||e.name===t)}function Te(e,t){return e instanceof Me&&(void 0===t||e.cmd===t)}function qe(e,t){return e instanceof He&&(void 0===t||Ke(e.get("Type"),t))}function je(e,t){return e.num===t.num&&e.gen===t.gen}function We(){We=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Ze(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function _e(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Ze(i,A,n,a,o,"next",e)}function o(e){Ze(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Xe(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}var tt=et().mark(Ht);function rt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=At(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function At(e,t){if(e){if("string"==typeof e)return nt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nt(e,t):void 0}}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]&&arguments[1];W(Number.isInteger(e)&&e>0,"The number should be a positive integer.");for(var r,A=[];e>=1e3;)e-=1e3,A.push("M");r=e/100|0,e%=100,A.push(pt[r]),r=e/10|0,e%=10,A.push(pt[10+r]),A.push(pt[20+e]);var n=A.join("");return t?n.toLowerCase():n}function mt(e){return e<=0?0:Math.ceil(Math.log2(e))}function wt(e,t){return e[t]<<24>>24}function bt(e,t){return e[t]<<8|e[t+1]}function kt(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Dt(e){return 32===e||9===e||13===e||10===e}function St(e,t){return Array.isArray(e)?(null===t||e.length===t)&&e.every((function(e){return"number"==typeof e})):ArrayBuffer.isView(e)&&(0===e.length||"number"==typeof e[0])&&(null===t||e.length===t)}function Ft(e,t){return St(e,6)?e:t}function xt(e,t){return St(e,4)?e:t}function Rt(e,t){return St(e,4)?ge.normalizeRect(e):t}function Gt(e){var t=/(.+)\\[(\\d+)\\]$/;return e.split(".").map((function(e){var r=e.match(t);return r?{name:r[1],pos:parseInt(r[2],10)}:{name:e,pos:0}}))}function Nt(e){for(var t=[],r=0,A=0,n=e.length;A126||35===i||40===i||41===i||60===i||62===i||91===i||93===i||123===i||125===i||47===i||37===i)&&(r=0;i--){var a=n[i];if(a instanceof He){var o,s=rt(a.getKeys());try{for(s.s();!(o=s.n()).done;){var c=o.value,g=r[c];if(g){var u=a.getRaw(c),l=new Pe,h=[];Ut(u,e,h,l),h.length>0&&(A[g]=h)}}}catch(e){s.e(e)}finally{s.f()}}}if(t.has("A")){var I=[];Ut(t.get("A"),e,I,new Pe),I.length>0&&(A.Action=I)}return oe(A)>0?A:null}var Jt={60:"<",62:">",38:"&",34:""",39:"'"};function Ht(e){var t,r,A;return et().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=0,r=e.length;case 1:if(!(t55295&&(A<57344||A>65533)&&t++,n.next=6,A;case 6:t++,n.next=1;break;case 9:case"end":return n.stop()}}),tt)}function Yt(e){for(var t=[],r=0,A=0,n=e.length;A55295&&(i<57344||i>65533)&&A++,r=A+1}return 0===t.length?e:(r1&&void 0!==arguments[1]&&arguments[1],r=/^("|').*("|')$/.exec(e);if(r&&r[1]===r[2]){if(new RegExp("[^\\\\\\\\]".concat(r[1])).test(e.slice(1,-1)))return t&&q("FontFamily contains unescaped ".concat(r[1],": ").concat(e,".")),!1}else{var A,n=rt(e.split(/[ \\t]+/));try{for(n.s();!(A=n.n()).done;){var i=A.value;if(/^(\\d|(-(\\d|-)))/.test(i)||!/^[\\w-\\\\]+$/.test(i))return t&&q("FontFamily contains invalid : ".concat(e,".")),!1}}catch(e){n.e(e)}finally{n.f()}}return!0}function Ot(e){var t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),r=e.fontFamily,A=e.fontWeight,n=e.italicAngle;if(!Pt(r,!0))return!1;var i=A?A.toString():"";e.fontWeight=t.has(i)?i:"400";var a=parseFloat(n);return e.italicAngle=isNaN(a)||a<-90||a>90?"14":n.toString(),!0}function Kt(e){var t=new RegExp("^\\\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\\\.")+")\\\\((?:'|\\")([^'\\"]*)(?:'|\\")(?:,\\\\s*(\\\\w+)\\\\)|\\\\))","i").exec(e);if(null!=t&&t[2]){var r=t[2],A=!1;return"true"===t[3]&&"app.launchURL"===t[1]&&(A=!0),{url:r,newWindow:A}}return null}function Tt(e){if(Number.isInteger(e))return e.toString();var t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)}function qt(e){if(!e)return null;var t,r=new Map,A=rt(e);try{for(A.s();!(t=A.n()).done;){var n=$e(t.value,2),i=n[0],a=n[1];if(i.startsWith(d)){var o=r.get(a.pageIndex);o||(o=[],r.set(a.pageIndex,o)),o.push(a)}}}catch(e){A.e(e)}finally{A.f()}return r.size>0?r:null}function jt(e){return function(e){return/^[\\x00-\\x7F]*$/.test(e)}(e)?e:Zt(e,!0)}function Wt(e){for(var t=[],r=0,A=e.length;r>8&255).toString(16).padStart(2,"0"),(255&n).toString(16).padStart(2,"0"))}return t.join("")}function Zt(e){var t=[];arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&t.push("þÿ");for(var r=0,A=e.length;r>8&255),String.fromCharCode(255&n))}return t.join("")}function _t(e,t,r){switch(e){case 90:return[0,1,-1,0,t,0];case 180:return[-1,0,0,-1,t,r];case 270:return[0,-1,1,0,0,r];default:throw new Error("Invalid rotation")}}function Xt(e){return Math.ceil(Math.ceil(Math.log2(1+e))/8)}function Vt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zt(e,t){for(var r=0;r=this.end?-1:this.bytes[this.pos++]}},{key:"getBytes",value:function(e){var t=this.bytes,r=this.pos,A=this.end;if(!e)return t.subarray(r,A);var n=r+e;return n>A&&(n=A),this.pos=n,t.subarray(r,n)}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)}},{key:"reset",value:function(){this.pos=this.start}},{key:"moveStart",value:function(){this.start=this.pos}},{key:"makeSubStream",value:function(e,r){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new t(this.bytes.buffer,e,r,A)}}])}(),or=function(e){function t(e){return Vt(this,t),tr(this,t,[ie(e)])}return nr(t,ar),$t(t)}(),sr=function(e){function t(){return Vt(this,t),tr(this,t,[new Uint8Array(0)])}return nr(t,ar),$t(t)}();function cr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return gr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=this.end?this.numChunks:Math.floor(t/this.chunkSize),n=r;nthis.numChunks)&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new Ct(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}}},{key:"ensureRange",value:function(e,t){if(!(e>=t||t<=this.progressiveDataLength)){var r=Math.floor(e/this.chunkSize);if(!(r>this.numChunks))for(var A=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks),n=r;n=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}},{key:"getBytes",value:function(e){var t=this.bytes,r=this.pos,A=this.end;if(!e)return A>this.progressiveDataLength&&this.ensureRange(r,A),t.subarray(r,A);var n=r+e;return n>A&&(n=A),n>this.progressiveDataLength&&this.ensureRange(r,n),this.pos=n,t.subarray(r,n)}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;function A(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),A.prototype=Object.create(this),A.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,A=[],n=t;n0&&void 0!==arguments[0]&&arguments[0])){var e=this.stream.getMissingChunks();this._requestChunks(e)}return this._loadedStreamCapability.promise}},{key:"_requestChunks",value:function(e){var t=this,r=this.currRequestId++,A=new Set;this._chunksNeededByRequest.set(r,A);var n,i=cr(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;this.stream.hasChunk(a)||A.add(a)}}catch(e){i.e(e)}finally{i.f()}if(0===A.size)return Promise.resolve();var o=Promise.withResolvers();this._promisesByRequest.set(r,o);var s,c=[],g=cr(A);try{for(g.s();!(s=g.n()).done;){var u=s.value,l=this._requestsByChunk.get(u);l||(l=[],this._requestsByChunk.set(u,l),c.push(u)),l.push(r)}}catch(e){g.e(e)}finally{g.f()}if(c.length>0){var h,I=cr(this.groupChunks(c));try{for(I.s();!(h=I.n()).done;){var f=h.value,C=f.beginChunk*this.chunkSize,B=Math.min(f.endChunk*this.chunkSize,this.length);this.sendRequest(C,B).catch(o.reject)}}catch(e){I.e(e)}finally{I.f()}}return o.promise.catch((function(e){if(!t.aborted)throw e}))}},{key:"getStream",value:function(){return this.stream}},{key:"requestRange",value:function(e,t){t=Math.min(t,this.length);for(var r=this.getBeginChunk(e),A=this.getEndChunk(t),n=[],i=r;i0&&void 0!==arguments[0]?arguments[0]:[]);try{for(r.s();!(e=r.n()).done;)for(var A=e.value,n=this.getBeginChunk(A.begin),i=this.getEndChunk(A.end),a=n;a=0&&A+1!==a&&(t.push({beginChunk:r,endChunk:A+1}),r=a),n+1===e.length&&t.push({beginChunk:r,endChunk:a+1}),A=a}return t}},{key:"onProgress",value:function(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}},{key:"onReceiveData",value:function(e){var t=e.chunk,r=void 0===e.begin,A=r?this.progressiveDataLength:e.begin,n=A+t.byteLength,i=Math.floor(A/this.chunkSize),a=n0||o.push(l)}}catch(e){u.e(e)}finally{u.f()}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){var I;if(1===this.stream.numChunksLoaded){var f=this.stream.numChunks-1;this.stream.hasChunk(f)||(I=f)}else I=this.stream.nextEmptyChunk(a);Number.isInteger(I)&&this._requestChunks([I])}for(var C=0,B=o;Ce.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function xr(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Rr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gr(e,t){for(var r=0;ru&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){for(var h=a<=8?new Uint8Array(u):new Uint16Array(u),I=0;I2&&void 0!==arguments[2]?arguments[2]:null,A=arguments.length>3?arguments[3]:void 0;if((e=t.fetchIfRef(e))instanceof Ue)switch(e.name){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"DeviceRGBA":return this.singletons.rgba;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"Pattern":return new Jr(null);default:if(r instanceof He){var n=r.get("ColorSpace");if(n instanceof He){var i=n.get(e.name);if(i){if(i instanceof Ue)return this._parse(i,t,r,A);e=i;break}}}return q("Unrecognized ColorSpace: ".concat(e.name)),this.singletons.gray}if(Array.isArray(e)){var a,o,s,c,g,u,l=t.fetchIfRef(e[0]).name;switch(l){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"CalGray":return c=(a=t.fetchIfRef(e[1])).getArray("WhitePoint"),g=a.getArray("BlackPoint"),u=a.get("Gamma"),new Wr(c,g,u);case"CalRGB":c=(a=t.fetchIfRef(e[1])).getArray("WhitePoint"),g=a.getArray("BlackPoint"),u=a.getArray("Gamma");var h=a.getArray("Matrix");return new Xr(c,g,u,h);case"ICCBased":var I=t.fetchIfRef(e[1]).dict;o=I.get("N");var f=I.get("Alternate");if(f){var C=this._parse(f,t,r,A);if(C.numComps===o)return C;q("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===o)return this.singletons.gray;if(3===o)return this.singletons.rgb;if(4===o)return this.singletons.cmyk;break;case"Pattern":return(s=e[1]||null)&&(s=this._parse(s,t,r,A)),new Jr(s);case"I":case"Indexed":s=this._parse(e[1],t,r,A);var B=t.fetchIfRef(e[2])+1,Q=t.fetchIfRef(e[3]);return new Hr(s,B,Q);case"Separation":case"DeviceN":var E=t.fetchIfRef(e[1]);o=Array.isArray(E)?E.length:1,s=this._parse(e[2],t,r,A);var d=A.create(e[3]);return new Mr(o,s,d);case"Lab":c=(a=t.fetchIfRef(e[1])).getArray("WhitePoint"),g=a.getArray("BlackPoint");var y=a.getArray("Range");return new CA(c,g,y);default:return q("Unimplemented ColorSpace object: ".concat(l)),this.singletons.gray}}return q("Unrecognized ColorSpace object: ".concat(e)),this.singletons.gray}},{key:"isDefaultDecode",value:function(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return q("The decode map is not the correct length"),!0;for(var r=0,A=e.length;r=.99554525?1:mr(_r,this,tA).call(this,0,1,1.055*Math.pow(e,1/2.4)-.055)}function tA(e,t,r){return Math.max(e,Math.min(t,r))}function rA(e){return e<0?-mr(_r,this,rA).call(this,-e):e>8?Math.pow((e+16)/116,3):e*IA._}function AA(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);var A=mr(_r,this,rA).call(this,0),n=(1-A)/(1-mr(_r,this,rA).call(this,e[0])),i=1-n,a=(1-A)/(1-mr(_r,this,rA).call(this,e[1])),o=1-a,s=(1-A)/(1-mr(_r,this,rA).call(this,e[2])),c=1-s;r[0]=t[0]*n+i,r[1]=t[1]*a+o,r[2]=t[2]*s+c}function nA(e,t,r){if(1===e[0]&&1===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);var A=r;mr(_r,this,Vr).call(this,oA._,t,A);var n=uA._;mr(_r,this,zr).call(this,e,A,n),mr(_r,this,Vr).call(this,sA._,n,r)}function iA(e,t,r){var A=r;mr(_r,this,Vr).call(this,oA._,t,A);var n=uA._;mr(_r,this,$r).call(this,e,A,n),mr(_r,this,Vr).call(this,sA._,n,r)}function aA(e,t,r,A,n){var i=mr(_r,this,tA).call(this,0,1,e[t]*n),a=mr(_r,this,tA).call(this,0,1,e[t+1]*n),o=mr(_r,this,tA).call(this,0,1,e[t+2]*n),s=1===i?1:Math.pow(i,this.GR),c=1===a?1:Math.pow(a,this.GG),g=1===o?1:Math.pow(o,this.GB),u=this.MXA*s+this.MXB*c+this.MXC*g,l=this.MYA*s+this.MYB*c+this.MYC*g,h=this.MZA*s+this.MZB*c+this.MZC*g,I=lA._;I[0]=u,I[1]=l,I[2]=h;var f=hA._;mr(_r,this,nA).call(this,this.whitePoint,I,f);var C=lA._;mr(_r,this,AA).call(this,this.blackPoint,f,C);var B=hA._;mr(_r,this,iA).call(this,gA._,C,B);var Q=lA._;mr(_r,this,Vr).call(this,cA._,B,Q),r[A]=255*mr(_r,this,eA).call(this,Q[0]),r[A+1]=255*mr(_r,this,eA).call(this,Q[1]),r[A+2]=255*mr(_r,this,eA).call(this,Q[2])}var oA={_:new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296])},sA={_:new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867])},cA={_:new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252])},gA={_:new Float32Array([1,1,1])},uA={_:new Float32Array(3)},lA={_:new Float32Array(3)},hA={_:new Float32Array(3)},IA={_:Math.pow(24/116,3)/8},fA=new WeakSet,CA=function(e){function t(e,r,A){var n;if(Rr(this,t),vr(n=wr(this,t,["Lab",3]),fA),!e)throw new re("WhitePoint missing - required for color space Lab");var i=yr(e,3);n.XW=i[0],n.YW=i[1],n.ZW=i[2];var a=yr(A||[-100,100,-100,100],4);n.amin=a[0],n.amax=a[1],n.bmin=a[2],n.bmax=a[3];var o=yr(r||[0,0,0],3);if(n.XB=o[0],n.YB=o[1],n.ZB=o[2],n.XW<0||n.ZW<0||1!==n.YW)throw new re("Invalid WhitePoint components, no fallback available");return(n.XB<0||n.YB<0||n.ZB<0)&&(T("Invalid BlackPoint, falling back to default"),n.XB=n.YB=n.ZB=0),(n.amin>n.amax||n.bmin>n.bmax)&&(T("Invalid Range, falling back to defaults"),n.amin=-100,n.amax=100,n.bmin=-100,n.bmax=100),n}return Dr(t,Ur),Nr(t,[{key:"getRgbItem",value:function(e,t,r,A){mr(fA,this,EA).call(this,e,t,!1,r,A)}},{key:"getRgbBuffer",value:function(e,t,r,A,n,i,a){for(var o=(1<=6/29?Math.pow(e,3):108/841*(e-4/29)}function QA(e,t,r,A){return r+e*(A-r)/t}function EA(e,t,r,A,n){var i=e[t],a=e[t+1],o=e[t+2];!1!==r&&(i=mr(fA,this,QA).call(this,i,r,0,100),a=mr(fA,this,QA).call(this,a,r,this.amin,this.amax),o=mr(fA,this,QA).call(this,o,r,this.bmin,this.bmax)),a>this.amax?a=this.amax:athis.bmax?o=this.bmax:o=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function yA(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function pA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vA(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,A=Array(t);r>>0}function DA(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(String,function(e){return function(e){if(Array.isArray(e))return bA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return bA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bA(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.subarray(0,t+1)))}function SA(e,t,r){for(var A=0,n=r;n>=0;n--)A+=e[n]+t[n],e[n]=255&A,A>>=8}function FA(e,t){for(var r=1,A=t;A>=0&&r>0;A--)r+=e[A],e[A]=255&r,r>>=8}r(3276);var xA=16,RA=function(){return mA((function e(t){pA(this,e),this.buffer=t,this.pos=0,this.end=t.length,this.tmpBuf=new Uint8Array(19)}),[{key:"readByte",value:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]}},{key:"readNumber",value:function(){var e,t=0;do{var r=this.readByte();if(r<0)throw new re("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t}},{key:"readSigned",value:function(){var e=this.readNumber();return 1&e?~(e>>>1):e>>>1}},{key:"readHex",value:function(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1}},{key:"readHexNumber",value:function(e,t){var r,A=this.tmpBuf,n=0;do{var i=this.readByte();if(i<0)throw new re("unexpected EOF in bcmap");r=!(128&i),A[n++]=127&i}while(!r);for(var a=t,o=0,s=0;a>=0;){for(;s<8&&A.length>0;)o|=A[--n]<>=8,s-=8}}},{key:"readHexSigned",value:function(e,t){this.readHexNumber(e,t);for(var r=1&e[t]?255:0,A=0,n=0;n<=t;n++)A=(1&A)<<8|e[n],e[n]=A>>1^r}},{key:"readString",value:function(){for(var e=this.readNumber(),t=new Array(e),r=0;r=0)){e.next=68;break}if(7!=(I=h>>5)){e.next=20;break}e.t0=31&h,e.next=0===e.t0?15:1===e.t0?17:19;break;case 15:return n.readString(),e.abrupt("break",19);case 17:return a=n.readString(),e.abrupt("break",19);case 19:return e.abrupt("continue",9);case 20:if(f=!!(16&h),!(1+(C=15&h)>xA)){e.next=24;break}throw new Error("BinaryCMapReader.process: Invalid dataSize.");case 24:B=1,Q=n.readNumber(),e.t1=I,e.next=0===e.t1?29:1===e.t1?35:2===e.t1?41:3===e.t1?46:4===e.t1?53:5===e.t1?58:65;break;case 29:for(n.readHex(o,C),n.readHexNumber(s,C),SA(s,o,C),r.addCodespaceRange(C+1,kA(o,C),kA(s,C)),E=1;E=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function UA(e,t){if(e){if("string"==typeof e)return MA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?MA(e,t):void 0}}function MA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function HA(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function YA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PA(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,A=this.pos;if(e){for(this.ensureBuffer(A+e),t=A+e;!this.eof&&this.bufferLengthn&&(t=n)}else{for(;!this.eof;)this.readBlock(r);t=this.bufferLength}return this.pos=t,this.buffer.subarray(A,t)}},{key:"getImageData",value:(r=JA().mark((function e(t){var r,A,n=arguments;return JA().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.length>1&&void 0!==n[1]?n[1]:null,this.canAsyncDecodeImageFromBuffer){e.next=3;break}return e.abrupt("return",this.getBytes(t,r));case 3:return e.next=5,this.stream.asyncGetBytes();case 5:return A=e.sent,e.abrupt("return",this.decodeImage(A,r));case 7:case"end":return e.stop()}}),e,this)})),A=function(){var e=this,t=arguments;return new Promise((function(A,n){var i=r.apply(e,t);function a(e){HA(i,A,n,a,o,"next",e)}function o(e){HA(i,A,n,a,o,"throw",e)}a(void 0)}))},function(e){return A.apply(this,arguments)})},{key:"reset",value:function(){this.pos=0}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0===t)for(;!this.eof;)this.readBlock();else for(var A=e+t;this.bufferLength<=A&&!this.eof;)this.readBlock();return new ar(this.buffer,e,t,r)}},{key:"getBaseStreams",value:function(){return this.str?this.str.getBaseStreams():null}}]);var r,A}(),VA=function(e){function t(e){var r,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;YA(this,t);var n,i=0,a=LA(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;i+=o instanceof XA?o._rawMinBufferLength:o.length}}catch(e){a.e(e)}finally{a.f()}return(r=TA(this,t,[i])).streams=e,r._onError=A,r}return WA(t,XA),OA(t,[{key:"readBlock",value:function(){var e=this.streams;if(0!==e.length){var t,r=e.shift();try{t=r.getBytes()}catch(e){var A;if(this._onError)return void this._onError(e,null===(A=r.dict)||void 0===A?void 0:A.objId);throw e}var n=this.bufferLength,i=n+t.length;this.ensureBuffer(i).set(t,n),this.bufferLength=i}else this.eof=!0}},{key:"getBaseStreams",value:function(){var e,t=[],r=LA(this.streams);try{for(r.s();!(e=r.n()).done;){var A=e.value.getBaseStreams();A&&t.push.apply(t,NA(A))}}catch(e){r.e(e)}finally{r.f()}return t.length>0?t:null}}])}();function zA(e,t){for(var r=0;r=0;--A)r[n+A]=255&a,a>>=8}}else this.eof=!0}}],A&&zA(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function an(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>1,A=this.ensureBuffer(this.bufferLength+r),n=this.bufferLength,i=this.firstDigit,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return an(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?an(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(a.s();!(t=a.n()).done;){var o=t.value,s=void 0;if(o>=48&&o<=57)s=15&o;else{if(!(o>=65&&o<=70||o>=97&&o<=102)){if(62===o){this.eof=!0;break}continue}s=9+(15&o)}i<0?i=s:(A[n++]=i<<4|s,i=-1)}}catch(e){a.e(e)}finally{a.f()}i>=0&&this.eof&&(A[n++]=i<<4,i=-1),this.firstDigit=i,this.bufferLength=n}else this.eof=!0}}])&&on(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function In(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t||"function"!=typeof t.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');for(this.source=t,this.eof=!1,this.encoding=n.K||0,this.eoline=n.EndOfLine||!1,this.byteAlign=n.EncodedByteAlign||!1,this.columns=n.Columns||1728,this.rows=n.Rows||0,this.eoblock=null===(r=n.EndOfBlock)||void 0===r||r,this.black=n.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(A=this._lookBits(12));)this._eatBits(1);1===A&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))},(t=[{key:"readNextChar",value:function(){if(this.eof)return-1;var e,t,r,A,n,i=this.refLine,a=this.codingLine,o=this.columns;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;var s,c,g;if(this.err=!1,this.nextLine2D){for(A=0;a[A]=64);do{c+=g=this._getWhiteCode()}while(g>=64)}else{do{s+=g=this._getWhiteCode()}while(g>=64);do{c+=g=this._getBlackCode()}while(g>=64)}for(this._addPixels(a[this.codingPos]+s,t),a[this.codingPos]0?--e:++e;i[e]<=a[this.codingPos]&&i[e]0?--e:++e;i[e]<=a[this.codingPos]&&i[e]0?--e:++e;i[e]<=a[this.codingPos]&&i[e]=64);else do{s+=g=this._getWhiteCode()}while(g>=64);this._addPixels(a[this.codingPos]+s,t),t^=1}var u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(s=this._lookBits(12),this.eoline)for(;s!==Cn&&1!==s;)this._eatBits(1),s=this._lookBits(12);else for(;0===s;)this._eatBits(1),s=this._lookBits(12);1===s?(this._eatBits(12),u=!0):s===Cn&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&u&&this.byteAlign){if(1===(s=this._lookBits(12))){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(A=0;A<4;++A)1!==(s=this._lookBits(12))&&T("bad rtc code: "+s),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if((s=this._lookBits(13))===Cn)return this.eof=!0,-1;if(s>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&s))}this.outputBits=a[0]>0?a[this.codingPos=0]:a[this.codingPos=1],this.row++}if(this.outputBits>=8)n=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&a[this.codingPos]r?(n<<=r,1&this.codingPos||(n|=255>>8-r),this.outputBits-=r,r=0):(n<<=this.outputBits,1&this.codingPos||(n|=255>>8-this.outputBits),r-=this.outputBits,this.outputBits=0,a[this.codingPos]0&&(n<<=r,r=0))}while(r)}return this.black&&(n^=255),n}},{key:"_addPixels",value:function(e,t){var r=this.codingLine,A=this.codingPos;e>r[A]&&(e>this.columns&&(T("row is wrong length"),this.err=!0,e=this.columns),1&A^t&&++A,r[A]=e),this.codingPos=A}},{key:"_addPixelsNeg",value:function(e,t){var r=this.codingLine,A=this.codingPos;if(e>r[A])e>this.columns&&(T("row is wrong length"),this.err=!0,e=this.columns),1&A^t&&++A,r[A]=e;else if(e0&&e=n){var o=r[a-n];if(o[0]===i)return this._eatBits(i),[!0,o[1],!0]}}return[!1,0,!1]}},{key:"_getTwoDimCode",value:function(){var e,t=0;if(this.eoblock){var r;if(t=this._lookBits(7),(null===(r=e=Bn[t])||void 0===r?void 0:r[0])>0)return this._eatBits(e[0]),e[1]}else{var A=this._findTableCode(1,7,Bn);if(A[0]&&A[2])return A[1]}return T("Bad two dim code"),Cn}},{key:"_getWhiteCode",value:function(){var e,t=0;if(this.eoblock){if((t=this._lookBits(12))===Cn)return 1;if((e=t>>5==0?Qn[t]:En[t>>3])[0]>0)return this._eatBits(e[0]),e[1]}else{var r=this._findTableCode(1,9,En);if(r[0])return r[1];if((r=this._findTableCode(11,12,Qn))[0])return r[1]}return T("bad white code"),this._eatBits(1),1}},{key:"_getBlackCode",value:function(){var e,t;if(this.eoblock){if((e=this._lookBits(13))===Cn)return 1;if((t=e>>7==0?dn[e]:e>>9==0&&e>>7!=0?yn[(e>>1)-64]:pn[e>>7])[0]>0)return this._eatBits(t[0]),t[1]}else{var r=this._findTableCode(2,6,pn);if(r[0])return r[1];if((r=this._findTableCode(7,12,yn,64))[0])return r[1];if((r=this._findTableCode(10,13,dn))[0])return r[1]}return T("bad black code"),this._eatBits(1),1}},{key:"_lookBits",value:function(e){for(var t;this.inputBits>16-e;this.inputBuf=this.inputBuf<<8|t,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}},{key:"_eatBits",value:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}])&&In(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function mn(e,t){for(var r=0;re.getByte()};return n.ccittFaxDecoder=new vn(i,{K:A.get("K"),EndOfLine:A.get("EndOfLine"),EncodedByteAlign:A.get("EncodedByteAlign"),Columns:A.get("Columns"),Rows:A.get("Rows"),EndOfBlock:A.get("EndOfBlock"),BlackIs1:A.get("BlackIs1")}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(t,XA),r=t,(A=[{key:"readBlock",value:function(){for(;!this.eof;){var e=this.ccittFaxDecoder.readNextChar();if(-1===e)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=e}}}])&&mn(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function xn(){xn=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Rn(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Gn(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Rn(i,A,n,a,o,"next",e)}function o(e){Rn(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Nn(e,t){for(var r=0;r>e,this.codeSize=A-=e,t}},{key:"getCode",value:function(e){for(var t,r=this.str,A=e[0],n=e[1],i=this.codeSize,a=this.codeBuf;i>16,c=65535&o;if(s<1||i>s,this.codeSize=i-s,c}},{key:"generateHuffmanTable",value:function(e){var t,r=e.length,A=0;for(t=0;tA&&(A=e[t]);for(var n=1<>=1;for(t=g;t>=1)){var n,i;if(1===t)n=jn,i=Wn;else{if(2!==t)throw new re("Unknown block type in flate stream");var a,o=this.getBits(5)+257,s=this.getBits(5)+1,c=this.getBits(4)+4,g=new Uint8Array(Kn.length);for(a=0;a0;)C[a++]=I}n=this.generateHuffmanTable(C.subarray(0,o)),i=this.generateHuffmanTable(C.subarray(o,f))}for(var E=(e=this.buffer)?e.length:0,d=this.bufferLength;;){var y=this.getCode(n);if(y<256)d+1>=E&&(E=(e=this.ensureBuffer(d+1)).length),e[d++]=y;else{if(256===y)return void(this.bufferLength=d);var p=(y=Tn[y-=257])>>16;p>0&&(p=this.getBits(p)),r=(65535&y)+p,y=this.getCode(i),(p=(y=qn[y])>>16)>0&&(p=this.getBits(p));var v=(65535&y)+p;d+r>=E&&(E=(e=this.ensureBuffer(d+r)).length);for(var m=0;m>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768},(t=[{key:"byteIn",value:function(){var e=this.data,t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}},{key:"readBit",value:function(e,t){var r,A=e[t]>>1,n=1&e[t],i=$n[A],a=i.qe,o=this.a-a;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0==(32768&o));return this.a=o,e[t]=A<<1|n,r}}])&&Vn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ti(e){return function(e){if(Array.isArray(e))return ni(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ai(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ri(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ai(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Ai(e,t){if(e){if("string"==typeof e)return ni(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ni(e,t):void 0}}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>>0}var a,o=i(1),s=i(1)?i(1)?i(1)?i(1)?i(1)?i(32)+4436:i(12)+340:i(8)+84:i(6)+20:i(4)+4:i(2);return 0===o?a=s:s>0&&(a=-s),a>=Bi&&a<=Ci?a:null}function Ei(e,t,r){for(var A=e.getContexts("IAID"),n=1,i=0;i=S&&m=F)for(J=J<<1&C,u=0;u=0&&b=0&&(k=N[w][b])&&(J|=k<=e?F<<=1:F=F<<1|y[D][S];for(g=0;g=E||S<0||S>=Q?F<<=1:F=F<<1|A[D][S];var x=p.readBit(v,F);b[k]=x}}return y}function ki(e,t,r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q){if(e&&t)throw new hi("refinement with Huffman is not supported");var E,d,y=[];for(E=0;E1&&(D=e?Q.readBits(B):Qi(m,"IAIT",v));var S=a*w+D,F=e?h.symbolIDTable.decode(Q):Ei(m,v,s),x=t&&(e?Q.readBit():Qi(m,"IARI",v)),R=o[F],G=R[0].length,N=R.length;if(x){var L=Qi(m,"IARDW",v),U=Qi(m,"IARDH",v);R=bi(G+=L,N+=U,I,R,(L>>1)+Qi(m,"IARDX",v),(U>>1)+Qi(m,"IARDY",v),!1,f,C)}var M=0;c?1&u?M=N-1:k+=N-1:u>1?k+=G-1:M=G-1;var J=S-(1&u?0:N-1),H=k-(2&u?G-1:0),Y=void 0,P=void 0,O=void 0;if(c){for(Y=0;Y>5&7,s=[31&a],c=t+6;if(7===a){o=536870911&kt(e,c-1),c+=3;var g=o+7>>3;for(s[0]=e[c++];--g>0;)s.push(e[c++])}else if(5===a||6===a)throw new hi("invalid referred-to flags");r.retainBits=s;var u=4;r.number<=256?u=1:r.number<=65536&&(u=2);var l,h,I=[];for(l=0;l>>24&255,Q[3]=C.height>>16&255,Q[4]=C.height>>8&255,Q[5]=255&C.height,l=c,h=e.length;l>2&3,g.huffmanDWSelector=u>>4&3,g.bitmapSizeSelector=u>>6&1,g.aggregationInstancesSelector=u>>7&1,g.bitmapCodingContextUsed=!!(256&u),g.bitmapCodingContextRetained=!!(512&u),g.template=u>>10&3,g.refinementTemplate=u>>12&1,c+=2,!g.huffman){for(i=0===g.template?4:1,A=[],n=0;n>2&3,l.stripSize=1<>4&3,l.transposed=!!(64&h),l.combinationOperator=h>>7&3,l.defaultPixelValue=h>>9&1,l.dsOffset=h<<17>>27,l.refinementTemplate=h>>15&1,l.huffman){var I=bt(o,c);c+=2,l.huffmanFS=3&I,l.huffmanDS=I>>2&3,l.huffmanDT=I>>4&3,l.huffmanRefinementDW=I>>6&3,l.huffmanRefinementDH=I>>8&3,l.huffmanRefinementDX=I>>10&3,l.huffmanRefinementDY=I>>12&3,l.huffmanRefinementSizeSelector=!!(16384&I)}if(l.refinement&&!l.refinementTemplate){for(A=[],n=0;n<2;n++)A.push({x:wt(o,c),y:wt(o,c+1)}),c+=2;l.refinementAt=A}l.numberOfSymbolInstances=kt(o,c),c+=4,r=[l,a.referredTo,o,c,s];break;case 16:var f={},C=o[c++];f.mmr=!!(1&C),f.template=C>>1&3,f.patternWidth=o[c++],f.patternHeight=o[c++],f.maxPatternIndex=kt(o,c),c+=4,r=[f,a.number,o,c,s];break;case 22:case 23:var B={};B.info=Fi(o,c),c+=xi;var Q=o[c++];B.mmr=!!(1&Q),B.template=Q>>1&3,B.enableSkip=!!(8&Q),B.combinationOperator=Q>>4&7,B.defaultPixelValue=Q>>7&1,B.gridWidth=kt(o,c),c+=4,B.gridHeight=kt(o,c),c+=4,B.gridOffsetX=4294967295&kt(o,c),c+=4,B.gridOffsetY=4294967295&kt(o,c),c+=4,B.gridVectorX=bt(o,c),c+=2,B.gridVectorY=bt(o,c),c+=2,r=[B,a.referredTo,o,c,s];break;case 38:case 39:var E={};E.info=Fi(o,c),c+=xi;var d=o[c++];if(E.mmr=!!(1&d),E.template=d>>1&3,E.prediction=!!(8&d),!E.mmr){for(i=0===E.template?4:1,A=[],n=0;n>2&1,y.combinationOperator=p>>3&3,y.requiresBuffer=!!(32&p),y.combinationOperatorOverride=!!(64&p),r=[y];break;case 49:case 50:case 51:case 62:break;case 53:r=[a.number,o,c,s];break;default:throw new hi("segment type ".concat(a.typeName,"(").concat(a.type,") is not implemented"))}var v="on"+a.typeName;v in t&&t[v].apply(t,r)}function Gi(e,t){for(var r=0,A=e.length;r>3,r=new Uint8ClampedArray(t*e.height);e.defaultPixelValue&&r.fill(255),this.buffer=r}},{key:"drawBitmap",value:function(e,t){var r,A,n,i,a=this.currentPageInfo,o=e.width,s=e.height,c=a.width+7>>3,g=a.combinationOperatorOverride?e.combinationOperator:a.combinationOperator,u=this.buffer,l=128>>(7&e.x),h=e.y*c+(e.x>>3);switch(g){case 0:for(r=0;r>=1)||(n=128,i++);h+=c}break;case 2:for(r=0;r>=1)||(n=128,i++);h+=c}break;default:throw new hi("operator ".concat(g," is not supported"))}}},{key:"onImmediateGenericRegion",value:function(e,t,r,A){var n=e.info,i=new fi(t,r,A),a=wi(e.mmr,n.width,n.height,e.template,e.prediction,null,e.at,i);this.drawBitmap(n,a)}},{key:"onImmediateLosslessGenericRegion",value:function(){this.onImmediateGenericRegion.apply(this,arguments)}},{key:"onSymbolDictionary",value:function(e,t,r,A,n,i){var a,o;e.huffman&&(a=function(e,t,r){var A,n,i,a=0;switch(e.huffmanDHSelector){case 0:case 1:A=Hi(e.huffmanDHSelector+4);break;case 3:A=Pi(a,t,r),a++;break;default:throw new hi("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:n=Hi(e.huffmanDWSelector+2);break;case 3:n=Pi(a,t,r),a++;break;default:throw new hi("invalid Huffman DW selector")}return e.bitmapSizeSelector?(i=Pi(a,t,r),a++):i=Hi(1),{tableDeltaHeight:A,tableDeltaWidth:n,tableBitmapSize:i,tableAggregateInstances:e.aggregationInstancesSelector?Pi(a,t,r):Hi(1)}}(e,r,this.customTables),o=new Yi(A,n,i));var s=this.symbols;s||(this.symbols=s={});var c,g=[],u=ri(r);try{for(u.s();!(c=u.n()).done;){var l=s[c.value];l&&g.push.apply(g,ti(l))}}catch(e){u.e(e)}finally{u.f()}var h=new fi(A,n,i);s[t]=function(e,t,r,A,n,i,a,o,s,c,g,u){if(e&&t)throw new hi("symbol refinement with Huffman is not supported");var l,h,I=[],f=0,C=mt(r.length+A),B=g.decoder,Q=g.contextCache;for(e&&(l=Hi(1),h=[],C=Math.max(C,1));I.length1)v=ki(e,t,E,f,0,m,1,r.concat(I),C,0,0,1,0,i,s,c,g,0,u);else{var w=Ei(Q,B,C),b=Qi(Q,"IARDX",B),k=Qi(Q,"IARDY",B);v=bi(E,f,s,w=32){var u=void 0,l=void 0,h=void 0;switch(g){case 32:if(0===c)throw new hi("no previous value in symbol ID table");l=n.readBits(2)+3,u=i[c-1].prefixLength;break;case 33:l=n.readBits(3)+3,u=0;break;case 34:l=n.readBits(7)+11,u=0;break;default:throw new hi("invalid code length in symbol ID table")}for(h=0;h=0;f--)b=e?Ki(w,s,c,!0):wi(!1,s,c,r,!1,null,m,I),U[f]=b;for(k=0;k=0;C--)F|=(S^=U[C][k][D])<>8,(R=g+k*h+D*l>>8)>=0&&R+y<=A&&G>=0&&G+p<=n)for(f=0;f=n))for(L=Q[J],N=x[f],C=0;C=0&&M>1&7),g=1+(i>>4&7),u=[],l=a;do{A=s.readBits(c),n=s.readBits(g),u.push(new Li([l,A,n,0])),l+=1<>r&1;if(r<=0)this.children[A]=new e(t);else{var n=this.children[A];n||(this.children[A]=n=new e(null)),n.buildTree(t,r-1)}}},{key:"decodeNode",value:function(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new hi("invalid Huffman data");return r.decodeNode(e)}}])}(),Mi=function(){return ai((function e(t,r){si(this,e),r||this.assignPrefixCodes(t),this.rootNode=new Ui(null);for(var A=0,n=t.length;A0&&this.rootNode.buildTree(i,i.prefixLength-1)}}),[{key:"decode",value:function(e){return this.rootNode.decodeNode(e)}},{key:"assignPrefixCodes",value:function(e){for(var t=e.length,r=0,A=0;A=this.end)throw new hi("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e}},{key:"readBits",value:function(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<=this.end?-1:this.data[this.position++]}}])}();function Pi(e,t,r){for(var A=0,n=0,i=t.length;n>g&1,g--}if(A&&!o)for(var l=0;l<5&&-1!==i.readNextChar();l++);return a}var Ti=function(){return ai((function e(){si(this,e)}),[{key:"parseChunks",value:function(e){return function(e){for(var t=new Ni,r=0,A=e.length;re.length)&&(t=e.length);for(var r=0,A=Array(t);r>3,C=7&i,B=t.length;n=new Uint32Array(n.buffer);for(var Q=0,E=0;E=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&!e[i-1];)i--;var a,o=[{children:[],index:0}],s=o[0];for(r=0;r0;)s=o.pop();for(s.index++,o.push(s);o.length<=r;)o.push(a={children:[],index:0}),s.children[s.index]=a.children,s=a;n++}r+19&&void 0!==arguments[9]&&arguments[9],g=r.mcusPerLine,u=r.progressive,l=t,h=0,I=0;function f(){if(I>0)return I--,h>>I&1;if(255===(h=e[t++])){var A=e[t++];if(A){if(220===A&&c){var n=bt(e,t+=2);if(t+=2,n>0&&n!==r.scanLines)throw new la("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===A){if(c){var i=p*(8===r.precision?8:0);if(i>0&&Math.round(r.scanLines/i)>=5)throw new la("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect \`scanLines\` parameter",i)}throw new ha("Found EOI marker (0xFFD9) while parsing scan data")}throw new ua("unexpected marker ".concat((h<<8|A).toString(16)))}}return I=7,h>>>7}function C(e){for(var t=e;;){switch(typeof(t=t[f()])){case"number":return t;case"object":continue}throw new ua("invalid huffman sequence")}}function B(e){for(var t=0;e>0;)t=t<<1|f(),e--;return t}function Q(e){if(1===e)return 1===f()?1:-1;var t=B(e);return t>=1<0)d--;else for(var r=i,A=a;r<=A;){var n=C(e.huffmanTableAC),o=15&n,c=n>>4;if(0!==o){var g=Ia[r+=c];e.blockData[t+g]=Q(o)*(1<>4,0==(r=15&A))c<15?(d=B(c)+(1<>4;if(0!==a){var s=Ia[n+=o];e.blockData[t+s]=Q(a),n++}else{if(o<15)break;n+=16}}};for(var R,G,N,L=0,U=1===x?A[0].blocksPerLine*A[0].blocksPerColumn:g*r.mcusPerColumn;L<=U;){var M=n?Math.min(U-L,n):U;if(M>0){for(b=0;b0?"unexpected":"excessive"," MCU data, current marker is: ").concat(R.invalid)),t=R.offset),!(R.marker>=65488&&R.marker<=65495))break;t+=2}return t-l}function ba(e,t,r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d=e.quantizationTable,y=e.blockData;if(!d)throw new ua("missing required Quantization Table.");for(var p=0;p<64;p+=8)u=y[t+p],l=y[t+p+1],h=y[t+p+2],I=y[t+p+3],f=y[t+p+4],C=y[t+p+5],B=y[t+p+6],Q=y[t+p+7],u*=d[p],0!=(l|h|I|f|C|B|Q)?(l*=d[p+1],h*=d[p+2],I*=d[p+3],f*=d[p+4],C*=d[p+5],B*=d[p+6],Q*=d[p+7],n=(A=(A=ya*u+128>>8)+(n=ya*f+128>>8)+1>>1)-n,E=(i=h)*da+(a=B)*Ea+128>>8,i=i*Ea-a*da+128>>8,c=(o=(o=pa*(l-Q)+128>>8)+(c=C<<4)+1>>1)-c,s=(g=(g=pa*(l+Q)+128>>8)+(s=I<<4)+1>>1)-s,a=(A=A+(a=E)+1>>1)-a,i=(n=n+i+1>>1)-i,E=o*Qa+g*Ba+2048>>12,o=o*Ba-g*Qa+2048>>12,g=E,E=s*Ca+c*fa+2048>>12,s=s*fa-c*Ca+2048>>12,c=E,r[p]=A+g,r[p+7]=A-g,r[p+1]=n+c,r[p+6]=n-c,r[p+2]=i+s,r[p+5]=i-s,r[p+3]=a+o,r[p+4]=a-o):(E=ya*u+512>>10,r[p]=E,r[p+1]=E,r[p+2]=E,r[p+3]=E,r[p+4]=E,r[p+5]=E,r[p+6]=E,r[p+7]=E);for(var v=0;v<8;++v)u=r[v],0!=((l=r[v+8])|(h=r[v+16])|(I=r[v+24])|(f=r[v+32])|(C=r[v+40])|(B=r[v+48])|(Q=r[v+56]))?(n=(A=4112+((A=ya*u+2048>>12)+(n=ya*f+2048>>12)+1>>1))-n,E=(i=h)*da+(a=B)*Ea+2048>>12,i=i*Ea-a*da+2048>>12,a=E,c=(o=(o=pa*(l-Q)+2048>>12)+(c=C)+1>>1)-c,s=(g=(g=pa*(l+Q)+2048>>12)+(s=I)+1>>1)-s,E=o*Qa+g*Ba+2048>>12,o=o*Ba-g*Qa+2048>>12,g=E,E=s*Ca+c*fa+2048>>12,s=s*fa-c*Ca+2048>>12,(u=(A=A+a+1>>1)+g)<16?u=0:u>=4080?u=255:u>>=4,(l=(n=n+i+1>>1)+(c=E))<16?l=0:l>=4080?l=255:l>>=4,(h=(i=n-i)+s)<16?h=0:h>=4080?h=255:h>>=4,(I=(a=A-a)+o)<16?I=0:I>=4080?I=255:I>>=4,(f=a-o)<16?f=0:f>=4080?f=255:f>>=4,(C=i-s)<16?C=0:C>=4080?C=255:C>>=4,(B=n-c)<16?B=0:B>=4080?B=255:B>>=4,(Q=A-g)<16?Q=0:Q>=4080?Q=255:Q>>=4,y[t+v]=u,y[t+v+8]=l,y[t+v+16]=h,y[t+v+24]=I,y[t+v+32]=f,y[t+v+40]=C,y[t+v+48]=B,y[t+v+56]=Q):(E=(E=ya*u+8192>>14)<-2040?0:E>=2024?255:E+2056>>4,y[t+v]=E,y[t+v+8]=E,y[t+v+16]=E,y[t+v+24]=E,y[t+v+32]=E,y[t+v+40]=E,y[t+v+48]=E,y[t+v+56]=E)}function ka(e,t){for(var r=t.blocksPerLine,A=t.blocksPerColumn,n=new Int16Array(64),i=0;i2&&void 0!==arguments[2]?arguments[2]:t,A=e.length-1,n=r=A)return null;var i=bt(e,t);if(i>=65472&&i<=65534)return{invalid:null,marker:i,offset:t};for(var a=bt(e,n);!(a>=65472&&a<=65534);){if(++n>=A)return null;a=bt(e,n)}return{invalid:i.toString(16),marker:a,offset:n}}var Sa=function(){return Aa((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.decodeTransform,A=void 0===r?null:r,n=t.colorTransform,i=void 0===n?-1:n;ia(this,e),this._decodeTransform=A,this._colorTransform=i}),[{key:"parse",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).dnlScanLines,r=void 0===t?null:t;function A(){var t=bt(e,o),r=(o+=2)+t-2,A=Da(e,r,o);null!=A&&A.invalid&&(q("readDataBlock - incorrect length, current marker is: "+A.invalid),r=A.offset);var n=e.subarray(o,r);return o+=n.length,n}function n(e){var t,r=Math.ceil(e.samplesPerLine/8/e.maxH),A=Math.ceil(e.scanLines/8/e.maxV),n=ea(e.components);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=Math.ceil(Math.ceil(e.samplesPerLine/8)*i.h/e.maxH),o=Math.ceil(Math.ceil(e.scanLines/8)*i.v/e.maxV),s=r*i.h,c=A*i.v*64*(s+1);i.blockData=new Int16Array(c),i.blocksPerLine=a,i.blocksPerColumn=o}}catch(e){n.e(e)}finally{n.f()}e.mcusPerLine=r,e.mcusPerColumn=A}var i,a,o=0,s=null,c=null,g=0,u=[],l=[],h=[],I=bt(e,o);if(o+=2,65496!==I)throw new ua("SOI not found");I=bt(e,o),o+=2;e:for(;65497!==I;){var f=void 0,C=void 0,B=void 0;switch(I){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var Q=A();65504===I&&74===Q[0]&&70===Q[1]&&73===Q[2]&&70===Q[3]&&0===Q[4]&&(s={version:{major:Q[5],minor:Q[6]},densityUnits:Q[7],xDensity:Q[8]<<8|Q[9],yDensity:Q[10]<<8|Q[11],thumbWidth:Q[12],thumbHeight:Q[13],thumbData:Q.subarray(14,14+3*Q[12]*Q[13])}),65518===I&&65===Q[0]&&100===Q[1]&&111===Q[2]&&98===Q[3]&&101===Q[4]&&(c={version:Q[5]<<8|Q[6],flags0:Q[7]<<8|Q[8],flags1:Q[9]<<8|Q[10],transformCode:Q[11]});break;case 65499:for(var E=bt(e,o)+(o+=2)-2;o>4==0)for(C=0;C<64;C++)y[Ia[C]]=e[o++];else{if(d>>4!=1)throw new ua("DQT - invalid table spec");for(C=0;C<64;C++)y[Ia[C]]=bt(e,o),o+=2}u[15&d]=y}break;case 65472:case 65473:case 65474:if(i)throw new ua("Only single frame JPEGs supported");o+=2,(i={}).extended=65473===I,i.progressive=65474===I,i.precision=e[o++];var p=bt(e,o);o+=2,i.scanLines=r||p,i.samplesPerLine=bt(e,o),o+=2,i.components=[],i.componentIds={};var v=e[o++],m=0,w=0;for(f=0;f>4,D=15&e[o+1];m>4==0?h:l)[15&x]=va(R,N)}break;case 65501:a=bt(e,o+=2),o+=2;break;case 65498:var L=1==++g&&!r;o+=2;var U=e[o++],M=[];for(f=0;f>4],Y.huffmanTableAC=l[15&P],M.push(Y)}var O=e[o++],K=e[o++],T=e[o++];try{var j=wa(e,o,i,M,a,O,K,T>>4,15&T,L);o+=j}catch(t){if(t instanceof la)return q("".concat(t.message," -- attempting to re-parse the JPEG image.")),this.parse(e,{dnlScanLines:t.scanLines});if(t instanceof ha){q("".concat(t.message," -- ignoring the rest of the image data."));break e}throw t}break;case 65500:o+=4;break;case 65535:255!==e[o]&&o--;break;default:var W=Da(e,o-2,o-3);if(null!=W&&W.invalid){q("JpegImage.parse - unexpected data, current marker is: "+W.invalid),o=W.offset;break}if(!W||o>=e.length-1){q("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new ua("JpegImage.parse - unknown marker: "+I.toString(16))}I=bt(e,o),o+=2}if(!i)throw new ua("JpegImage.parse - no frame data found.");this.width=i.samplesPerLine,this.height=i.scanLines,this.jfif=s,this.adobe=c,this.components=[];var Z,_=ea(i.components);try{for(_.s();!(Z=_.n()).done;){var X=Z.value,V=u[X.quantizationId];V&&(X.quantizationTable=V),this.components.push({index:X.index,output:ka(0,X),scaleX:X.h/i.maxH,scaleY:X.v/i.maxV,blocksPerLine:X.blocksPerLine,blocksPerColumn:X.blocksPerColumn})}}catch(e){_.e(e)}finally{_.f()}this.numComponents=this.components.length}},{key:"_getLinearizedBlockData",value:function(e,t){var r,A,n,i,a,o,s,c,g,u,l,h,I=arguments.length>2&&void 0!==arguments[2]&&arguments[2],f=this.width/e,C=this.height/t,B=0,Q=this.components.length,E=e*t*Q,d=new Uint8ClampedArray(E),y=new Uint32Array(e),p=4294967288;for(s=0;s>8)+v[g+1];return d}},{key:"_isColorConversionNeeded",get:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}},{key:"_convertYccToRgb",value:function(e){for(var t,r,A,n=0,i=e.length;n4)throw new ua("Unsupported color mode");var c=this._getLinearizedBlockData(t,r,s);if(1===this.numComponents&&(n||a)){var g=c.length*(n?4:3),u=new Uint8ClampedArray(g),l=0;if(n)!function(e,t){if(se.isLittleEndian)for(var r=0,A=e.length;r0&&(e=e.subarray(t));break}var A={decodeTransform:void 0,colorTransform:void 0},n=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(n)){for(var i=this.dict.get("BPC","BitsPerComponent")||8,a=n.length,o=new Int32Array(a),s=!1,c=(1<0&&void 0!==arguments[0]?arguments[0]:{};new Promise((function(r,A){e=r,t=A})),r.decode=function(e,t){var A=t.numComponents,n=void 0===A?4:A,i=t.isIndexedColormap,a=void 0!==i&&i,o=t.smaskInData,s=void 0!==o&&o,c=e.length,g=r._malloc(c);r.HEAPU8.set(e,g);var u=r._jp2_decode(g,c,n>0?n:0,!!a,!!s);if(r._free(g),u){var l=r.errorMessages;return l?(delete r.errorMessages,l):"Unknown error"}var h=r.imageData;return r.imageData=null,h};var A=Object.assign({},r),n="./this.program",i="";"undefined"!=typeof document&&document.currentScript&&(i=document.currentScript.src),Ma&&(i=Ma),i=i.startsWith("blob:")?"":i.substr(0,i.replace(/[?#].*/,"").lastIndexOf("/")+1);var a,o,s,c,g,u=r.print||console.log.bind(console),l=r.printErr||console.error.bind(console);function h(){var e=o.buffer;r.HEAP8=s=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAPU8=c=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU32=g=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}Object.assign(r,A),A=null,r.arguments&&r.arguments,r.thisProgram&&(n=r.thisProgram),r.quit&&r.quit,r.wasmBinary&&(a=r.wasmBinary);var I,f=[],C=[],B=[],Q=0,E=null,d=null,y="data:application/octet-stream;base64,",p=function(e){return e.startsWith(y)};function v(e,t){var r,A=function(e){if(e==I&&a)return new Uint8Array(a);var t=function(e){if(p(e))return function(e){for(var t=atob(e),r=new Uint8Array(t.length),A=0;A0;)e.shift()(r)};r.noExitRuntime;var w,b=function(e){var t=(e-o.buffer.byteLength+65535)/65536;try{return o.grow(t),h(),1}catch(e){}},k={},D=function(){if(!D.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var t in k)void 0===k[t]?delete e[t]:e[t]=k[t];var r=[];for(var t in e)r.push("".concat(t,"=").concat(e[t]));D.strings=r}return D.strings},S=[null,[],[]],F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,x=function(e,t,r){for(var A=t+r,n=t;e[n]&&!(n>=A);)++n;if(n-t>16&&e.buffer&&F)return F.decode(e.subarray(t,n));for(var i="";t>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|o)}else i+=String.fromCharCode(a)}return i},R=function(e,t){return e?x(c,e,t):""},G={c:function(e,t,r){return c.copyWithin(e,t,t+r)},g:function(e,t){e>>=2;var A=r.imageData=new Uint8ClampedArray(t),n=r.HEAP32.subarray(e,e+t);A.set(n)},f:function(e,t,A,n){e>>=2,t>>=2,A>>=2;for(var i=r.imageData=new Uint8ClampedArray(3*n),a=r.HEAP32.subarray(e,e+n),o=r.HEAP32.subarray(t,t+n),s=r.HEAP32.subarray(A,A+n),c=0;c>=2,t>>=2,A>>=2,n>>=2;for(var a=r.imageData=new Uint8ClampedArray(4*i),o=r.HEAP32.subarray(e,e+i),s=r.HEAP32.subarray(t,t+i),c=r.HEAP32.subarray(A,A+i),g=r.HEAP32.subarray(n,n+i),u=0;u>>=0)>r)return!1;for(var A,n=1;n<=4;n*=2){var i=t*(1+.2/n);i=Math.min(i,e+100663296);var a=Math.min(r,(A=Math.max(e,i))+(65536-A%65536)%65536);if(b(a))return!0}return!1},l:function(e,t){var r=0;return D().forEach((function(A,n){var i=t+r;g[e+4*n>>2]=i,function(e,t){for(var r=0;r>2]=r.length;var A=0;return r.forEach((function(e){return A+=e.length+1})),g[t>>2]=A,0},n:function(e){return 52},j:function(e,t,r,A,n){return 70},b:function(e,t,r,A){for(var n,i,a,o=0,s=0;s>2],I=g[t+4>>2];t+=8;for(var f=0;f>2]=o,0},o:function(e,t){e>>=2;for(var A=r.imageData=new Uint8ClampedArray(4*t),n=r.HEAP32.subarray(e,e+t),i=0;i>=2,t>>=2;for(var n=r.imageData=new Uint8ClampedArray(4*A),i=r.HEAP32.subarray(e,e+A),a=r.HEAP32.subarray(t,t+A),o=0;o>=2,t>>=2,A>>=2;for(var i=r.imageData=new Uint8ClampedArray(4*n),a=r.HEAP32.subarray(e,e+n),o=r.HEAP32.subarray(t,t+n),s=r.HEAP32.subarray(A,A+n),c=0;c0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),f.unshift(e);var e;m(f)}(),Q>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),t()}),1)):t()))}if(N.q,r._malloc=N.r,r._free=N.s,r._jp2_decode=N.u,d=function e(){w||L(),w||(d=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return L(),r});const Ya=Ha;function Pa(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function Oa(e,t){for(var r=0;r=0;)if(65361==(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,A=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.getInt32()>>>0;return e.skip(16),{width:r-n,height:A-i,bitsPerComponent:8,componentsCount:e.getUint16()}}throw new Xa("No size marker found in JPX stream")}}])}(),za={_:null};function $a(e,t){for(var r=0;r>>t&(1<0;if(B<256)l[0]=B,h=1;else{if(!(B>=258)){if(256===B){g=9,a=258,h=0;continue}this.eof=!0,delete this.lzwState;break}if(B=0;t--)l[t]=o[r],r=c[r];else l[h++]=l[0]}if(Q&&(c[a]=u,s[a]=s[u]+1,o[a]=l[0],g=++a+i&a+i-1?g:0|Math.min(Math.log(a+i)/.6931471805599453+1,12)),u=B,A<(I+=h)){do{A+=512}while(A15))throw new re("Unsupported predictor: ".concat(i));n.readBlock=2===i?n.readBlockTiff:n.readBlockPng,n.str=e,n.dict=e.dict;var a=n.colors=A.get("Colors")||1,o=n.bits=A.get("BPC","BitsPerComponent")||8,s=n.columns=A.get("Columns")||1;return n.pixBytes=a*o+7>>3,n.rowBytes=s*a*o+7>>3,Co(n,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eo(e,t)}(t,XA),r=t,(A=[{key:"readBlockTiff",value:function(){var e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),A=this.bits,n=this.colors,i=this.str.getBytes(e);if(this.eof=!i.length,!this.eof){var a,o=0,s=0,c=0,g=0,u=t;if(1===A&&1===n)for(a=0;a>1,l^=l>>2,o=(1&(l^=l>>4))<<7,r[u++]=l}else if(8===A){for(a=0;a>8&255,r[u++]=255&I}}else{var f=new Uint8Array(n+1),C=(1<>c-A)&C,c-=A,s=s<=8&&(r[Q++]=s>>g-8&255,g-=8);g>0&&(r[Q++]=(s<<8-g)+(o&(1<<8-g)-1))}this.bufferLength+=e}}},{key:"readBlockPng",value:function(){var e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),A=this.str.getBytes(e);if(this.eof=!A.length,!this.eof){var n=this.bufferLength,i=this.ensureBuffer(n+e),a=i.subarray(n-e,n);0===a.length&&(a=new Uint8Array(e));var o,s,c,g=n;switch(r){case 0:for(o=0;o>1)+A[o];for(;o>1)+A[o]&255,g++;break;case 4:for(o=0;o0){var n=this.str.getBytes(A);t.set(n,r),r+=A}}else{A=257-A;var i=e[1];t=this.ensureBuffer(r+A+1);for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function xo(e,t){if(e){if("string"==typeof e)return Ro(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ro(e,t):void 0}}function Ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&void 0!==arguments[0]?arguments[0]:null,t=this.buf1;if(this.shift(),t instanceof Me)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":for(var r=[];!Te(this.buf1,"]")&&this.buf1!==Re;)r.push(this.getObj(e));if(this.buf1===Re){if(this.recoveryMode)return r;throw new Bt("End of file inside array.")}return this.shift(),r;case"<<":for(var A=new He(this.xref);!Te(this.buf1,">>")&&this.buf1!==Re;)if(this.buf1 instanceof Ue){var n=this.buf1.name;if(this.shift(),this.buf1===Re)break;A.set(n,this.getObj(e))}else T("Malformed dictionary: key must be a name object"),this.shift();if(this.buf1===Re){if(this.recoveryMode)return A;throw new Bt("End of file inside dictionary.")}return Te(this.buf2,"stream")?this.allowStreams?this.makeStream(A,e):A:(this.shift(),A);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&Te(this.buf2,"R")){var i=Ye.get(t,this.buf1);return this.shift(),this.shift(),i}return t}return"string"==typeof t&&e?e.decryptString(t):t}},{key:"findDefaultInlineStreamEnd",value:function(e){for(var t,r,A=this.lexer.knownCommands,n=e.pos,i=0;-1!==(t=e.getByte());)if(0===i)i=69===t?1:0;else if(1===i)i=73===t?2:0;else if(32===t||10===t||13===t){r=e.pos;var a=e.peekBytes(15),o=a.length;if(0===o)break;for(var s=0;s127)){i=0;break}if(2!==i)continue;if(!A){q("findDefaultInlineStreamEnd - \`lexer.knownCommands\` is undefined.");continue}var c=new Oo(new ar(a.slice()),A);c._hexStringWarn=function(){};for(var g=0;;){var u=c.getObj();if(u===Re){i=0;break}if(u instanceof Me){var l=A[u.cmd];if(!l){i=0;break}if(l.variableArgs?g<=l.numArgs:g===l.numArgs)break;g=0}else g++}if(2===i)break}else i=0;-1===t&&(q("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),r&&(q('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-r))));var h=4;return e.skip(-h),t=e.peekByte(),e.skip(h),Dt(t)||h--,e.pos-h-n}},{key:"findDCTDecodeInlineStreamEnd",value:function(e){for(var t,r,A=e.pos,n=!1;-1!==(t=e.getByte());)if(255===t){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:n=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:(r=e.getUint16())>2?e.skip(r-2):e.skip(-2)}if(n)break}var i=e.pos-A;return-1===t?(q("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-i),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),i)}},{key:"findASCII85DecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte());)if(126===t){var A=e.pos;for(t=e.peekByte();Dt(t);)e.skip(),t=e.peekByte();if(62===t){e.skip();break}if(e.pos>A){var n=e.peekBytes(2);if(69===n[0]&&73===n[1])break}}var i=e.pos-r;return-1===t?(q("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-i),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),i)}},{key:"findASCIIHexDecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte())&&62!==t;);var A=e.pos-r;return-1===t?(q("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-A),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),A)}},{key:"inlineStreamSkipEI",value:function(e){for(var t,r=0;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}},{key:"makeInlineImage",value:function(e){for(var t,r=this.lexer,A=r.stream,n=Object.create(null);!Te(this.buf1,"ID")&&this.buf1!==Re;){if(!(this.buf1 instanceof Ue))throw new re("Dictionary key must be a name object");var i=this.buf1.name;if(this.shift(),this.buf1===Re)break;n[i]=this.getObj(e)}-1!==r.beginInlineImagePos&&(t=A.pos-r.beginInlineImagePos);var a,o=this.xref.fetchIfRef(n.F||n.Filter);if(o instanceof Ue)a=o.name;else if(Array.isArray(o)){var s=this.xref.fetchIfRef(o[0]);s instanceof Ue&&(a=s.name)}var c,g,u=A.pos;switch(a){case"DCT":case"DCTDecode":c=this.findDCTDecodeInlineStreamEnd(A);break;case"A85":case"ASCII85Decode":c=this.findASCII85DecodeInlineStreamEnd(A);break;case"AHx":case"ASCIIHexDecode":c=this.findASCIIHexDecodeInlineStreamEnd(A);break;default:c=this.findDefaultInlineStreamEnd(A)}if(c<1e3&&t>0){var l=A.pos;A.pos=r.beginInlineImagePos,g=function(e){for(var t=[],r=e.length,A=0;A=A){var g,u=!1,l=Fo(n);try{for(l.s();!(g=l.n()).done;){for(var h=g.value,I=h.length,f=0;f=i){u=!0;break}if(f>=I){Dt(a[s+c+f])&&(T('Found "'.concat(ne([].concat(So(r),So(h))),'" when ')+"searching for endstream command."),u=!0);break}}}catch(e){l.e(e)}finally{l.f()}if(u)return t.pos+=s,t.pos-e}s++}t.pos+=o}return-1}var Yo=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Po(e){return e>=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}var Oo=function(){return Lo((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Go(this,e),this.stream=t,this.nextChar(),this.strBuf=[],this.knownCommands=r,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}),[{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"peekChar",value:function(){return this.stream.peekByte()}},{key:"getNumber",value:function(){var e=this.currentChar,t=!1,r=0,A=1;if(45===e?(A=-1,45===(e=this.nextChar())&&(e=this.nextChar())):43===e&&(e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),e<48||e>57){var n="Invalid number: ".concat(String.fromCharCode(e)," (charCode ").concat(e,")");if(Dt(e)||-1===e)return T('Lexer.getNumber - "'.concat(n,'".')),0;throw new re(n)}for(var i=e-48,a=0,o=1;(e=this.nextChar())>=0;)if(e>=48&&e<=57){var s=e-48;t?a=10*a+s:(0!==r&&(r*=10),i=10*i+s)}else if(46===e){if(0!==r)break;r=1}else if(45===e)q("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;if(43===(e=this.peekChar())||45===e)o=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==r&&(i/=r),t&&(i*=Math.pow(10,o*a)),A*i}},{key:"getString",value:function(){var e=1,t=!1,r=this.strBuf;r.length=0;for(var A=this.nextChar();;){var n=!1;switch(0|A){case-1:q("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(A=this.nextChar()){case-1:q("Unterminated string"),t=!0;break;case 110:r.push("\\n");break;case 114:r.push("\\r");break;case 116:r.push("\\t");break;case 98:r.push("\\b");break;case 102:r.push("\\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(A));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var i=15&A;n=!0,(A=this.nextChar())>=48&&A<=55&&(i=(i<<3)+(15&A),(A=this.nextChar())>=48&&A<=55&&(n=!1,i=(i<<3)+(15&A))),r.push(String.fromCharCode(i));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(A))}break;default:r.push(String.fromCharCode(A))}if(t)break;n||(A=this.nextChar())}return r.join("")}},{key:"getName",value:function(){var e,t,r=this.strBuf;for(r.length=0;(e=this.nextChar())>=0&&!Yo[e];)if(35===e){if(e=this.nextChar(),Yo[e]){q("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),r.push("#");break}var A=Po(e);if(-1!==A){t=e;var n=Po(e=this.nextChar());if(-1===n){if(q("Lexer_getName: Illegal digit (".concat(String.fromCharCode(e),") ")+"in hexadecimal number."),r.push("#",String.fromCharCode(t)),Yo[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(A<<4|n))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));return r.length>127&&q("Name token is longer than allowed by the spec: ".concat(r.length)),Ue.get(r.join(""))}},{key:"_hexStringWarn",value:function(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||q("getHexString - ignoring invalid character: ".concat(e)):q("getHexString - ignoring additional invalid characters.")}},{key:"getHexString",value:function(){var e=this.strBuf;e.length=0;var t=this.currentChar,r=-1,A=-1;for(this._hexStringNumWarn=0;;){if(t<0){q("Unterminated hex string");break}if(62===t){this.nextChar();break}1!==Yo[t]?(-1===(A=Po(t))?this._hexStringWarn(t):-1===r?r=A:(e.push(String.fromCharCode(r<<4|A)),r=-1),t=this.nextChar()):t=this.nextChar()}return-1!==r&&e.push(String.fromCharCode(r<<4)),e.join("")}},{key:"getObj",value:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return Re;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==Yo[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),Me.get("[");case 93:return this.nextChar(),Me.get("]");case 60:return 60===(t=this.nextChar())?(this.nextChar(),Me.get("<<")):this.getHexString();case 62:return 62===(t=this.nextChar())?(this.nextChar(),Me.get(">>")):Me.get(">");case 123:return this.nextChar(),Me.get("{");case 125:return this.nextChar(),Me.get("}");case 41:throw this.nextChar(),new re("Illegal character: ".concat(t))}var r=String.fromCharCode(t);if(t<32||t>127){var A=this.peekChar();if(A>=32&&A<=127)return this.nextChar(),Me.get(r)}for(var n=this.knownCommands,i=void 0!==(null==n?void 0:n[r]);(t=this.nextChar())>=0&&!Yo[t];){var a=r+String.fromCharCode(t);if(i&&void 0===n[a])break;if(128===r.length)throw new re("Command token too long: ".concat(r.length));r=a,i=void 0!==(null==n?void 0:n[r])}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),Me.get(r)))}},{key:"skipToNextLine",value:function(){for(var e=this.currentChar;e>=0;){if(13===e){10===(e=this.nextChar())&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}])}(),Ko=function(){return Lo((function e(){Go(this,e)}),null,[{key:"create",value:function(e){function t(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=e.get(t);if(Number.isInteger(A)&&(r?A>=0:A>0))return A;throw new Error('The "'.concat(t,'" parameter in the linearization ')+"dictionary is invalid.")}var r,A,n=new Jo({lexer:new Oo(e),xref:null}),i=n.getObj(),a=n.getObj(),o=n.getObj(),s=n.getObj();if(!(Number.isInteger(i)&&Number.isInteger(a)&&Te(o,"obj")&&s instanceof He&&"number"==typeof(r=s.get("Linearized"))&&r>0))return null;if((A=t(s,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:A,hints:function(e){var t,r=e.get("H");if(Array.isArray(r)&&(2===(t=r.length)||4===t)){for(var A=0;A0))throw new Error("Hint (".concat(A,") in the linearization dictionary is invalid."))}return r}throw new Error("Hint array in the linearization dictionary is invalid.")}(s),objectNumberFirst:t(s,"O"),endFirst:t(s,"E"),numPages:t(s,"N"),mainXRefEntriesOffset:t(s,"T"),pageFirst:s.has("P")?t(s,"P",!0):0}}}])}();function To(){To=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function qo(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function jo(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){qo(i,A,n,a,o,"next",e)}function o(e){qo(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Wo(e,t,r){return t=_o(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zo()?Reflect.construct(t,r||[],_o(e).constructor):t.apply(e,r))}function Zo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zo=function(){return!!e})()}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_o(e)}function Xo(e,t){return Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xo(e,t)}function Vo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zo(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];Vo(this,e),this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=t}),[{key:"addCodespaceRange",value:function(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}},{key:"mapCidRange",value:function(e,t,r){if(t-e>rs)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=r++}},{key:"mapBfRange",value:function(e,t,r){if(t-e>rs)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");for(var A=r.length-1;e<=t;){this._map[e++]=r;var n=r.charCodeAt(A)+1;r=n>255?r.substring(0,A-1)+String.fromCharCode(r.charCodeAt(A-1)+1)+"\\0":r.substring(0,A)+String.fromCharCode(n)}}},{key:"mapBfRangeToArray",value:function(e,t,r){if(t-e>rs)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");for(var A=r.length,n=0;e<=t&&n>>0;for(var o=n[i],s=0,c=o.length;s=g&&A<=u)return r.charcode=A,void(r.length=i+1)}}r.charcode=0,r.length=1}},{key:"getCharCodeLength",value:function(e){for(var t=this.codespaceRanges,r=0,A=t.length;r=o&&e<=s)return r+1}return 1}},{key:"length",get:function(){return this._map.length}},{key:"isIdentityCMap",get:function(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}])}(),ns=function(e){function t(e,r){var A;return Vo(this,t),(A=Wo(this,t)).vertical=e,A.addCodespaceRange(r,0,65535),A}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xo(e,t)}(t,As),$o(t,[{key:"mapCidRange",value:function(e,t,r){j("should not call mapCidRange")}},{key:"mapBfRange",value:function(e,t,r){j("should not call mapBfRange")}},{key:"mapBfRangeToArray",value:function(e,t,r){j("should not call mapBfRangeToArray")}},{key:"mapOne",value:function(e,t){j("should not call mapCidOne")}},{key:"lookup",value:function(e){return Number.isInteger(e)&&e<=65535?e:void 0}},{key:"contains",value:function(e){return Number.isInteger(e)&&e<=65535}},{key:"forEach",value:function(e){for(var t=0;t<=65535;t++)e(t,t)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e<=65535?e:-1}},{key:"getMap",value:function(){for(var e=new Array(65536),t=0;t<=65535;t++)e[t]=t;return e}},{key:"length",get:function(){return 65536}},{key:"isIdentityCMap",get:function(){j("should not access .isIdentityCMap")}}])}();function is(e){for(var t=0,r=0;r>>0}function as(e){if("string"!=typeof e)throw new re("Malformed CMap: expected string.")}function os(e){if(!Number.isInteger(e))throw new re("Malformed CMap: expected int.")}function ss(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endbfchar"))return;as(r);var A=is(r);as(r=t.getObj());var n=r;e.mapOne(A,n)}}function cs(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endbfrange"))return;as(r);var A=is(r);as(r=t.getObj());var n=is(r);if(r=t.getObj(),Number.isInteger(r)||"string"==typeof r){var i=Number.isInteger(r)?String.fromCharCode(r):r;e.mapBfRange(A,n,i)}else{if(!Te(r,"["))break;r=t.getObj();for(var a=[];!Te(r,"]")&&r!==Re;)a.push(r),r=t.getObj();e.mapBfRangeToArray(A,n,a)}}throw new re("Invalid bf range.")}function gs(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcidchar"))return;as(r);var A=is(r);os(r=t.getObj());var n=r;e.mapOne(A,n)}}function us(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcidrange"))return;as(r);var A=is(r);as(r=t.getObj());var n=is(r);os(r=t.getObj());var i=r;e.mapCidRange(A,n,i)}}function ls(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcodespacerange"))return;if("string"!=typeof r)break;var A=is(r);if("string"!=typeof(r=t.getObj()))break;var n=is(r);e.addCodespaceRange(r.length,A,n)}throw new re("Invalid codespace range.")}function hs(e,t){var r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function Is(e,t){var r=t.getObj();r instanceof Ue&&(e.name=r.name)}function fs(e,t,r,A){return Cs.apply(this,arguments)}function Cs(){return(Cs=jo(To().mark((function e(t,r,A,n){var i,a,o;return To().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,(o=r.getObj())!==Re){e.next=7;break}return e.abrupt("break",39);case 7:if(!(o instanceof Ue)){e.next=12;break}"WMode"===o.name?hs(t,r):"CMapName"===o.name&&Is(t,r),i=o,e.next=29;break;case 12:if(!(o instanceof Me)){e.next=29;break}e.t0=o.cmd,e.next="endcmap"===e.t0?16:"usecmap"===e.t0?17:"begincodespacerange"===e.t0?19:"beginbfchar"===e.t0?21:"begincidchar"===e.t0?23:"beginbfrange"===e.t0?25:"begincidrange"===e.t0?27:29;break;case 16:return e.abrupt("break",39);case 17:return i instanceof Ue&&(a=i.name),e.abrupt("break",29);case 19:return ls(t,r),e.abrupt("break",29);case 21:return ss(t,r),e.abrupt("break",29);case 23:return gs(t,r),e.abrupt("break",29);case 25:return cs(t,r),e.abrupt("break",29);case 27:return us(t,r),e.abrupt("break",29);case 29:e.next=37;break;case 31:if(e.prev=31,e.t1=e.catch(1),!(e.t1 instanceof Ct)){e.next=35;break}throw e.t1;case 35:return q("Invalid cMap data: "+e.t1),e.abrupt("continue",0);case 37:e.next=0;break;case 39:if(!n&&a&&(n=a),!n){e.next=42;break}return e.abrupt("return",Bs(t,A,n));case 42:return e.abrupt("return",t);case 43:case"end":return e.stop()}}),e,null,[[1,31]])})))).apply(this,arguments)}function Bs(e,t,r){return Qs.apply(this,arguments)}function Qs(){return(Qs=jo(To().mark((function e(t,r,A){var n,i;return To().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Es(A,r);case 2:if(t.useCMap=e.sent,0===t.numCodespaceRanges){for(n=t.useCMap.codespaceRanges,i=0;i=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Ps(e,t){if(e){if("string"==typeof e)return Os(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Os(e,t):void 0}}function Os(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=t)throw new re("Invalid CFF header");0!==r&&(T("cff data is shifted"),e=e.subarray(r),this.bytes=e);var A=e[0],n=e[1],i=e[2],a=e[3];return{obj:new zs(A,n,i,a),endPos:i}}},{key:"parseDict",value:function(e){var t=0;var r,A=[],n=[];t=0;for(var i=e.length;t>4,o=15&i;if(15===a)break;if(r+=A[a],15===o)break;r+=A[o]}return parseFloat(r)}():28===r?r=((r=e[t++])<<24|e[t++]<<16)>>16:29===r?r=(r=(r=(r=e[t++])<<8|e[t++])<<8|e[t++])<<8|e[t++]:r>=32&&r<=246?r-139:r>=247&&r<=250?256*(r-247)+e[t++]+108:r>=251&&r<=254?-256*(r-251)-e[t++]-108:(q('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN)))}return n}},{key:"parseIndex",value:function(e){var t,r,A=new ec,n=this.bytes,i=n[e++]<<8|n[e++],a=[],o=e;if(0!==i){var s=n[e++],c=e+(i+1)*s-1;for(t=0,r=i+1;t10)return!1;for(var n=e.stackSize,i=e.stack,a=t.length,o=0;o>16,o+=2,n++;else if(14===s){if(n>=4&&(n-=4,this.seacAnalysisEnabled))return e.seac=i.slice(n,n+4),!1;c=Zs[s]}else if(s>=32&&s<=246)i[n]=s-139,n++;else if(s>=247&&s<=254)i[n]=s<251?(s-247<<8)+t[o]+108:-(s-251<<8)-t[o]-108,o++,n++;else if(255===s)i[n]=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])/65536,o+=4,n++;else if(19===s||20===s){if(e.hints+=n>>1,0===e.hints){t.copyWithin(o-1,o,-1),o-=1,a-=1;continue}o+=e.hints+7>>3,n%=2,c=Zs[s]}else{if(10===s||29===s){var u=10===s?r:A;if(!u)return q("Missing subrsIndex for "+(c=Zs[s]).id),!1;var l=32768;u.count<1240?l=107:u.count<33900&&(l=1131);var h=i[--n]+l;if(h<0||h>=u.count||isNaN(h))return q("Out of bounds subrIndex for "+(c=Zs[s]).id),!1;if(e.stackSize=n,e.callDepth++,!this.parseCharString(e,u.get(h),r,A))return!1;e.callDepth--,n=e.stackSize;continue}if(11===s)return e.stackSize=n,!0;if(0===s&&o===t.length)t[o-1]=14,c=Zs[14];else{if(9===s){t.copyWithin(o-1,o,-1),o-=1,a-=1;continue}c=Zs[s]}}if(c){if(c.stem&&(e.hints+=n>>1,3===s||23===s?e.hasVStems=!0:!e.hasVStems||1!==s&&18!==s||(q("CFF stem hints are in wrong order"),t[o-1]=1===s?3:23)),"min"in c&&!e.undefStack&&n=2&&c.stem?n%=2:n>1&&q("Found too many parameters for stack-clearing command"),n>0&&(e.width=i[n-1])),"stackDelta"in c?("stackFn"in c&&c.stackFn(i,n),n+=c.stackDelta):c.stackClearing?n=0:c.resetStack?(n=0,e.undefStack=!1):c.undefStack&&(n=0,e.undefStack=!0,e.firstStackClearing=!1)}}return a=i.length&&(q("Invalid fd index for glyph index."),h=!1),h&&(I=(f=i[C].privateDict).subrsIndex)}else r&&(I=r);if(h&&(h=this.parseCharString(l,u,I,A)),null!==l.width){var B=f.getByName("nominalWidthX");s[g]=B+l.width}else{var Q=f.getByName("defaultWidthX");s[g]=Q}null!==l.seac&&(o[g]=l.seac),h||t.set(g,new Uint8Array([14]))}return{charStrings:t,seacs:o,widths:s}}},{key:"emptyPrivateDictionary",value:function(e){var t=this.createDict(ic,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t}},{key:"parsePrivateDict",value:function(e){if(e.hasName("Private")){var t=e.getByName("Private");if(Array.isArray(t)&&2===t.length){var r=t[0],A=t[1];if(0===r||A>=this.bytes.length)this.emptyPrivateDictionary(e);else{var n=A+r,i=this.bytes.subarray(A,n),a=this.parseDict(i),o=this.createDict(ic,a,e.strings);if(e.privateDict=o,0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06),o.getByName("Subrs")){var s=o.getByName("Subrs"),c=A+s;if(0===s||c>=this.bytes.length)this.emptyPrivateDictionary(e);else{var g=this.parseIndex(c);o.subrsIndex=g.obj}}}}else e.removeByName("Private")}else this.emptyPrivateDictionary(e)}},{key:"parseCharsets",value:function(e,t,r,A){if(0===e)return new oc(!0,ac.ISO_ADOBE,ps);if(1===e)return new oc(!0,ac.EXPERT,vs);if(2===e)return new oc(!0,ac.EXPERT_SUBSET,ms);var n,i,a,o=this.bytes,s=e,c=o[e++],g=[A?0:".notdef"];switch(t-=1,c){case 0:for(a=0;a=65535)q("Not enough space in charstrings to duplicate first glyph.");else{var e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}}},{key:"hasGlyphId",value:function(e){return!(e<0||e>=this.charStrings.count)&&this.charStrings.get(e).length>0}}])}(),zs=qs((function e(t,r,A,n){Ks(this,e),this.major=t,this.minor=r,this.hdrSize=A,this.offSize=n})),$s=function(){return qs((function e(){Ks(this,e),this.strings=[]}),[{key:"get",value:function(e){return e>=0&&e<=390?Ws[e]:e-391<=this.strings.length?this.strings[e-391]:Ws[0]}},{key:"getSID",value:function(e){var t=Ws.indexOf(e);return-1!==t?t:-1!==(t=this.strings.indexOf(e))?t+391:-1}},{key:"add",value:function(e){this.strings.push(e)}},{key:"count",get:function(){return this.strings.length}}])}(),ec=function(){return qs((function e(){Ks(this,e),this.objects=[],this.length=0}),[{key:"add",value:function(e){this.length+=e.length,this.objects.push(e)}},{key:"set",value:function(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t}},{key:"get",value:function(e){return this.objects[e]}},{key:"count",get:function(){return this.objects.length}}])}(),tc=function(){return qs((function e(t,r){Ks(this,e),this.keyToNameMap=t.keyToNameMap,this.nameToKeyMap=t.nameToKeyMap,this.defaults=t.defaults,this.types=t.types,this.opcodes=t.opcodes,this.order=t.order,this.strings=r,this.values=Object.create(null)}),[{key:"setByKey",value:function(e,t){if(!(e in this.keyToNameMap))return!1;if(0===t.length)return!0;var r,A=Ys(t);try{for(A.s();!(r=A.n()).done;){var n=r.value;if(isNaN(n))return q('Invalid CFFDict value: "'.concat(t,'" for key "').concat(e,'".')),!0}}catch(e){A.e(e)}finally{A.f()}var i=this.types[e];return"num"!==i&&"sid"!==i&&"offset"!==i||(t=t[0]),this.values[e]=t,!0}},{key:"setByName",value:function(e,t){if(!(e in this.nameToKeyMap))throw new re('Invalid dictionary name "'.concat(e,'"'));this.values[this.nameToKeyMap[e]]=t}},{key:"hasName",value:function(e){return this.nameToKeyMap[e]in this.values}},{key:"getByName",value:function(e){if(!(e in this.nameToKeyMap))throw new re("Invalid dictionary name ".concat(e,'"'));var t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}},{key:"removeByName",value:function(e){delete this.values[this.nameToKeyMap[e]]}}],[{key:"createTables",value:function(e){var t,r={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]},A=Ys(e);try{for(A.s();!(t=A.n()).done;){var n=t.value,i=Array.isArray(n[0])?(n[0][0]<<8)+n[0][1]:n[0];r.keyToNameMap[i]=n[1],r.nameToKeyMap[n[1]]=i,r.types[i]=n[2],r.defaults[i]=n[3],r.opcodes[i]=Array.isArray(n[0])?n[0]:[n[0]],r.order.push(i)}}catch(e){A.e(e)}finally{A.f()}return r}}])}(),rc=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]],Ac=function(e){function t(e){var r;return Ks(this,t),(r=Ns(this,t,[t.tables,e])).privateDict=null,r}return Ms(t,tc),qs(t,null,[{key:"tables",get:function(){return _(this,"tables",this.createTables(rc))}}])}(),nc=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]],ic=function(e){function t(e){var r;return Ks(this,t),(r=Ns(this,t,[t.tables,e])).subrsIndex=null,r}return Ms(t,tc),qs(t,null,[{key:"tables",get:function(){return _(this,"tables",this.createTables(nc))}}])}(),ac={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2},oc=qs((function e(t,r,A,n){Ks(this,e),this.predefined=t,this.format=r,this.charset=A,this.raw=n})),sc=qs((function e(t,r,A,n){Ks(this,e),this.predefined=t,this.format=r,this.encoding=A,this.raw=n})),cc=function(){return qs((function e(t,r){Ks(this,e),this.format=t,this.fdSelect=r}),[{key:"getFDIndex",value:function(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}])}(),gc=function(){return qs((function e(){Ks(this,e),this.offsets=Object.create(null)}),[{key:"isTracking",value:function(e){return e in this.offsets}},{key:"track",value:function(e,t){if(e in this.offsets)throw new re("Already tracking location of ".concat(e));this.offsets[e]=t}},{key:"offset",value:function(e){for(var t in this.offsets)this.offsets[t]+=e}},{key:"setEntryLocation",value:function(e,t,r){if(!(e in this.offsets))throw new re("Not tracking location of ".concat(e));for(var A=r.data,n=this.offsets[e],i=0,a=t.length;i>24&255,A[c]=l>>16&255,A[g]=l>>8&255,A[u]=255&l}}}])}(),uc=function(){function e(t){Ks(this,e),this.cff=t}return qs(e,[{key:"compile",value:function(){var e=this.cff,t={data:[],length:0,add(e){try{var t;(t=this.data).push.apply(t,Gs(e))}catch(t){this.data=this.data.concat(e)}this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var A=this.compileNameIndex(e.names);if(t.add(A),e.isCIDFont&&e.topDict.hasName("FontMatrix")){var n=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");var i,a=Ys(e.fdArray);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=n.slice(0);o.hasName("FontMatrix")&&(s=ge.transform(s,o.getByName("FontMatrix"))),o.setByName("FontMatrix",s)}}catch(e){a.e(e)}finally{a.f()}}var c=e.topDict.getByName("XUID");(null==c?void 0:c.length)>16&&e.topDict.removeByName("XUID"),e.topDict.setByName("charset",0);var g=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(g.output);var u=g.trackers[0],l=this.compileStringIndex(e.strings.strings);t.add(l);var h=this.compileIndex(e.globalSubrIndex);if(t.add(h),e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)u.setEntryLocation("Encoding",[e.encoding.format],t);else{var I=this.compileEncoding(e.encoding);u.setEntryLocation("Encoding",[t.length],t),t.add(I)}var f=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);u.setEntryLocation("charset",[t.length],t),t.add(f);var C=this.compileCharStrings(e.charStrings);if(u.setEntryLocation("CharStrings",[t.length],t),t.add(C),e.isCIDFont){u.setEntryLocation("FDSelect",[t.length],t);var B=this.compileFDSelect(e.fdSelect);t.add(B),g=this.compileTopDicts(e.fdArray,t.length,!0),u.setEntryLocation("FDArray",[t.length],t),t.add(g.output);var Q=g.trackers;this.compilePrivateDicts(e.fdArray,Q,t)}return this.compilePrivateDicts([e.topDict],[u],t),t.add([0]),t.data}},{key:"encodeNumber",value:function(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}},{key:"encodeFloat",value:function(t){var r=t.toString(),A=e.EncodeFloatRegExp.exec(r);if(A){var n=parseFloat("1e"+((A[2]?+A[2]:0)+A[1].length));r=(Math.round(t*n)/n).toString()}var i,a,o="";for(i=0,a=r.length;i=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e]}},{key:"compileHeader",value:function(e){return[e.major,e.minor,4,e.offSize]}},{key:"compileNameIndex",value:function(e){var t,r=new ec,A=Ys(e);try{for(A.s();!(t=A.n()).done;){for(var n=t.value,i=Math.min(n.length,127),a=new Array(i),o=0;o"~"||"["===s||"]"===s||"("===s||")"===s||"{"===s||"}"===s||"<"===s||">"===s||"/"===s||"%"===s)&&(s="_"),a[o]=s}""===(a=a.join(""))&&(a="Bad_Font_Name"),r.add(ie(a))}}catch(e){A.e(e)}finally{A.f()}return this.compileIndex(r)}},{key:"compileTopDicts",value:function(e,t,r){var A,n=[],i=new ec,a=Ys(e);try{for(a.s();!(A=a.n()).done;){var o=A.value;r&&(o.removeByName("CIDFontVersion"),o.removeByName("CIDFontRevision"),o.removeByName("CIDFontType"),o.removeByName("CIDCount"),o.removeByName("UIDBase"));var s=new gc,c=this.compileDict(o,s);n.push(s),i.add(c),s.offset(t)}}catch(e){a.e(e)}finally{a.f()}return{trackers:n,output:i=this.compileIndex(i,n)}}},{key:"compilePrivateDicts",value:function(e,t,r){for(var A=0,n=e.length;A>8&255,255&i]);else{(n=new Uint8Array(1+2*i))[0]=0;for(var a=0,o=e.charset.length,s=!1,c=1;c>8&255,n[c+1]=255&g}}return this.compileTypedArray(n)}},{key:"compileEncoding",value:function(e){return this.compileTypedArray(e.raw)}},{key:"compileFDSelect",value:function(e){var t,r,A=e.format;switch(A){case 0:for((t=new Uint8Array(1+e.fdSelect.length))[0]=A,r=0;r>8&255,255&r,a),n=a)}var o=(i.length-3)/3;i[1]=o>>8&255,i[2]=255&o,i.push(r>>8&255,255&r),t=new Uint8Array(i)}return this.compileTypedArray(t)}},{key:"compileTypedArray",value:function(e){return Array.from(e)}},{key:"compileIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e.objects,A=r.length;if(0===A)return[0,0];var n,i,a=[A>>8&255,255&A],o=1;for(n=0;n>8&255,255&s):3===i?a.push(s>>16&255,s>>8&255,255&s):a.push(s>>>24&255,s>>16&255,s>>8&255,255&s),r[n]&&(s+=r[n].length);for(n=0;n=5&&n<=7))return-1;A=e.substring(1)}if(A===A.toUpperCase()&&(r=parseInt(A,16))>=0)return r}return-1}var Cc=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function Bc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(-1!==t)for(var r=Cc[t],A=0,n=r.length;A=r[A]&&e<=r[A+1])return t;for(var i=0,a=Cc.length;i=o[s]&&e<=o[s+1])return i;return-1}var Qc=new RegExp("^(\\\\s)|(\\\\p{Mn})|(\\\\p{Cf})$","u"),Ec=new Map,dc=!0,yc=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function pc(e,t){if(void 0!==t[e])return e;var r=fc(e,t);if(-1!==r)for(var A in t)if(t[A]===r)return A;return T("Unable to recover a standard glyph name for: "+e),e}function vc(e,t,r){var A,n,i,a=Object.create(null),o=!!(4&e.flags);if(e.isInternalFont)for(i=t,n=0;n=0?A:0;else if(e.baseEncodingName)for(i=Rs(e.baseEncodingName),n=0;n=0?A:0;else if(o)for(n in t)a[n]=t[n];else for(i=Ds,n=0;n=0?A:0;var s,c=e.differences;if(c)for(n in c){var g=c[n];if(-1===(A=r.indexOf(g))){s||(s=lc());var u=pc(g,s);u!==g&&(A=r.indexOf(u))}a[n]=A>=0?A:0}return a}function mc(e){return e.replaceAll(/[,_]/g,"-").replaceAll(/\\s/g,"")}var wc=ft((function(e){e[8211]=65074,e[8212]=65073,e[8229]=65072,e[8230]=65049,e[12289]=65041,e[12290]=65042,e[12296]=65087,e[12297]=65088,e[12298]=65085,e[12299]=65086,e[12300]=65089,e[12301]=65090,e[12302]=65091,e[12303]=65092,e[12304]=65083,e[12305]=65084,e[12308]=65081,e[12309]=65082,e[12310]=65047,e[12311]=65048,e[65103]=65076,e[65281]=65045,e[65288]=65077,e[65289]=65078,e[65292]=65040,e[65306]=65043,e[65307]=65044,e[65311]=65046,e[65339]=65095,e[65341]=65096,e[65343]=65075,e[65371]=65079,e[65373]=65080})),bc=ft((function(e){e["Times-Roman"]="Times-Roman",e.Helvetica="Helvetica",e.Courier="Courier",e.Symbol="Symbol",e["Times-Bold"]="Times-Bold",e["Helvetica-Bold"]="Helvetica-Bold",e["Courier-Bold"]="Courier-Bold",e.ZapfDingbats="ZapfDingbats",e["Times-Italic"]="Times-Italic",e["Helvetica-Oblique"]="Helvetica-Oblique",e["Courier-Oblique"]="Courier-Oblique",e["Times-BoldItalic"]="Times-BoldItalic",e["Helvetica-BoldOblique"]="Helvetica-BoldOblique",e["Courier-BoldOblique"]="Courier-BoldOblique",e.ArialNarrow="Helvetica",e["ArialNarrow-Bold"]="Helvetica-Bold",e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",e["ArialNarrow-Italic"]="Helvetica-Oblique",e.ArialBlack="Helvetica",e["ArialBlack-Bold"]="Helvetica-Bold",e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",e["ArialBlack-Italic"]="Helvetica-Oblique",e["Arial-Black"]="Helvetica",e["Arial-Black-Bold"]="Helvetica-Bold",e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Black-Italic"]="Helvetica-Oblique",e.Arial="Helvetica",e["Arial-Bold"]="Helvetica-Bold",e["Arial-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Italic"]="Helvetica-Oblique",e.ArialMT="Helvetica",e["Arial-BoldItalicMT"]="Helvetica-BoldOblique",e["Arial-BoldMT"]="Helvetica-Bold",e["Arial-ItalicMT"]="Helvetica-Oblique",e["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",e["Arial-BoldMT-Bold"]="Helvetica-Bold",e["Arial-ItalicMT-Italic"]="Helvetica-Oblique",e.ArialUnicodeMS="Helvetica",e["ArialUnicodeMS-Bold"]="Helvetica-Bold",e["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",e["ArialUnicodeMS-Italic"]="Helvetica-Oblique",e["Courier-BoldItalic"]="Courier-BoldOblique",e["Courier-Italic"]="Courier-Oblique",e.CourierNew="Courier",e["CourierNew-Bold"]="Courier-Bold",e["CourierNew-BoldItalic"]="Courier-BoldOblique",e["CourierNew-Italic"]="Courier-Oblique",e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",e["CourierNewPS-BoldMT"]="Courier-Bold",e["CourierNewPS-ItalicMT"]="Courier-Oblique",e.CourierNewPSMT="Courier",e["Helvetica-BoldItalic"]="Helvetica-BoldOblique",e["Helvetica-Italic"]="Helvetica-Oblique",e["Symbol-Bold"]="Symbol",e["Symbol-BoldItalic"]="Symbol",e["Symbol-Italic"]="Symbol",e.TimesNewRoman="Times-Roman",e["TimesNewRoman-Bold"]="Times-Bold",e["TimesNewRoman-BoldItalic"]="Times-BoldItalic",e["TimesNewRoman-Italic"]="Times-Italic",e.TimesNewRomanPS="Times-Roman",e["TimesNewRomanPS-Bold"]="Times-Bold",e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",e["TimesNewRomanPS-BoldMT"]="Times-Bold",e["TimesNewRomanPS-Italic"]="Times-Italic",e["TimesNewRomanPS-ItalicMT"]="Times-Italic",e.TimesNewRomanPSMT="Times-Roman",e["TimesNewRomanPSMT-Bold"]="Times-Bold",e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPSMT-Italic"]="Times-Italic"})),kc=ft((function(e){e.Courier="FoxitFixed.pfb",e["Courier-Bold"]="FoxitFixedBold.pfb",e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",e["Courier-Oblique"]="FoxitFixedItalic.pfb",e.Helvetica="LiberationSans-Regular.ttf",e["Helvetica-Bold"]="LiberationSans-Bold.ttf",e["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",e["Helvetica-Oblique"]="LiberationSans-Italic.ttf",e["Times-Roman"]="FoxitSerif.pfb",e["Times-Bold"]="FoxitSerifBold.pfb",e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",e["Times-Italic"]="FoxitSerifItalic.pfb",e.Symbol="FoxitSymbol.pfb",e.ZapfDingbats="FoxitDingbats.pfb",e["LiberationSans-Regular"]="LiberationSans-Regular.ttf",e["LiberationSans-Bold"]="LiberationSans-Bold.ttf",e["LiberationSans-Italic"]="LiberationSans-Italic.ttf",e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"})),Dc=ft((function(e){e.Calibri="Helvetica",e["Calibri-Bold"]="Helvetica-Bold",e["Calibri-BoldItalic"]="Helvetica-BoldOblique",e["Calibri-Italic"]="Helvetica-Oblique",e.CenturyGothic="Helvetica",e["CenturyGothic-Bold"]="Helvetica-Bold",e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",e["CenturyGothic-Italic"]="Helvetica-Oblique",e.ComicSansMS="Comic Sans MS",e["ComicSansMS-Bold"]="Comic Sans MS-Bold",e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",e["ComicSansMS-Italic"]="Comic Sans MS-Italic",e.GillSansMT="Helvetica",e["GillSansMT-Bold"]="Helvetica-Bold",e["GillSansMT-BoldItalic"]="Helvetica-BoldOblique",e["GillSansMT-Italic"]="Helvetica-Oblique",e.Impact="Helvetica",e["ItcSymbol-Bold"]="Helvetica-Bold",e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",e["ItcSymbol-Book"]="Helvetica",e["ItcSymbol-BookItalic"]="Helvetica-Oblique",e["ItcSymbol-Medium"]="Helvetica",e["ItcSymbol-MediumItalic"]="Helvetica-Oblique",e.LucidaConsole="Courier",e["LucidaConsole-Bold"]="Courier-Bold",e["LucidaConsole-BoldItalic"]="Courier-BoldOblique",e["LucidaConsole-Italic"]="Courier-Oblique",e["LucidaSans-Demi"]="Helvetica-Bold",e["MS-Gothic"]="MS Gothic",e["MS-Gothic-Bold"]="MS Gothic-Bold",e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",e["MS-Gothic-Italic"]="MS Gothic-Italic",e["MS-Mincho"]="MS Mincho",e["MS-Mincho-Bold"]="MS Mincho-Bold",e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",e["MS-Mincho-Italic"]="MS Mincho-Italic",e["MS-PGothic"]="MS PGothic",e["MS-PGothic-Bold"]="MS PGothic-Bold",e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",e["MS-PGothic-Italic"]="MS PGothic-Italic",e["MS-PMincho"]="MS PMincho",e["MS-PMincho-Bold"]="MS PMincho-Bold",e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",e["MS-PMincho-Italic"]="MS PMincho-Italic",e.NuptialScript="Times-Italic",e.SegoeUISymbol="Helvetica"})),Sc=ft((function(e){e["Adobe Jenson"]=!0,e["Adobe Text"]=!0,e.Albertus=!0,e.Aldus=!0,e.Alexandria=!0,e.Algerian=!0,e["American Typewriter"]=!0,e.Antiqua=!0,e.Apex=!0,e.Arno=!0,e.Aster=!0,e.Aurora=!0,e.Baskerville=!0,e.Bell=!0,e.Bembo=!0,e["Bembo Schoolbook"]=!0,e.Benguiat=!0,e["Berkeley Old Style"]=!0,e["Bernhard Modern"]=!0,e["Berthold City"]=!0,e.Bodoni=!0,e["Bauer Bodoni"]=!0,e["Book Antiqua"]=!0,e.Bookman=!0,e["Bordeaux Roman"]=!0,e["Californian FB"]=!0,e.Calisto=!0,e.Calvert=!0,e.Capitals=!0,e.Cambria=!0,e.Cartier=!0,e.Caslon=!0,e.Catull=!0,e.Centaur=!0,e["Century Old Style"]=!0,e["Century Schoolbook"]=!0,e.Chaparral=!0,e["Charis SIL"]=!0,e.Cheltenham=!0,e["Cholla Slab"]=!0,e.Clarendon=!0,e.Clearface=!0,e.Cochin=!0,e.Colonna=!0,e["Computer Modern"]=!0,e["Concrete Roman"]=!0,e.Constantia=!0,e["Cooper Black"]=!0,e.Corona=!0,e.Ecotype=!0,e.Egyptienne=!0,e.Elephant=!0,e.Excelsior=!0,e.Fairfield=!0,e["FF Scala"]=!0,e.Folkard=!0,e.Footlight=!0,e.FreeSerif=!0,e["Friz Quadrata"]=!0,e.Garamond=!0,e.Gentium=!0,e.Georgia=!0,e.Gloucester=!0,e["Goudy Old Style"]=!0,e["Goudy Schoolbook"]=!0,e["Goudy Pro Font"]=!0,e.Granjon=!0,e["Guardian Egyptian"]=!0,e.Heather=!0,e.Hercules=!0,e["High Tower Text"]=!0,e.Hiroshige=!0,e["Hoefler Text"]=!0,e["Humana Serif"]=!0,e.Imprint=!0,e["Ionic No. 5"]=!0,e.Janson=!0,e.Joanna=!0,e.Korinna=!0,e.Lexicon=!0,e.LiberationSerif=!0,e["Liberation Serif"]=!0,e["Linux Libertine"]=!0,e.Literaturnaya=!0,e.Lucida=!0,e["Lucida Bright"]=!0,e.Melior=!0,e.Memphis=!0,e.Miller=!0,e.Minion=!0,e.Modern=!0,e["Mona Lisa"]=!0,e["Mrs Eaves"]=!0,e["MS Serif"]=!0,e["Museo Slab"]=!0,e["New York"]=!0,e["Nimbus Roman"]=!0,e["NPS Rawlinson Roadway"]=!0,e.NuptialScript=!0,e.Palatino=!0,e.Perpetua=!0,e.Plantin=!0,e["Plantin Schoolbook"]=!0,e.Playbill=!0,e["Poor Richard"]=!0,e["Rawlinson Roadway"]=!0,e.Renault=!0,e.Requiem=!0,e.Rockwell=!0,e.Roman=!0,e["Rotis Serif"]=!0,e.Sabon=!0,e.Scala=!0,e.Seagull=!0,e.Sistina=!0,e.Souvenir=!0,e.STIX=!0,e["Stone Informal"]=!0,e["Stone Serif"]=!0,e.Sylfaen=!0,e.Times=!0,e.Trajan=!0,e["Trinité"]=!0,e["Trump Mediaeval"]=!0,e.Utopia=!0,e["Vale Type"]=!0,e["Bitstream Vera"]=!0,e["Vera Serif"]=!0,e.Versailles=!0,e.Wanted=!0,e.Weiss=!0,e["Wide Latin"]=!0,e.Windsor=!0,e.XITS=!0})),Fc=ft((function(e){e.Dingbats=!0,e.Symbol=!0,e.ZapfDingbats=!0,e.Wingdings=!0,e["Wingdings-Bold"]=!0,e["Wingdings-Regular"]=!0})),xc=ft((function(e){e[2]=10,e[3]=32,e[4]=33,e[5]=34,e[6]=35,e[7]=36,e[8]=37,e[9]=38,e[10]=39,e[11]=40,e[12]=41,e[13]=42,e[14]=43,e[15]=44,e[16]=45,e[17]=46,e[18]=47,e[19]=48,e[20]=49,e[21]=50,e[22]=51,e[23]=52,e[24]=53,e[25]=54,e[26]=55,e[27]=56,e[28]=57,e[29]=58,e[30]=894,e[31]=60,e[32]=61,e[33]=62,e[34]=63,e[35]=64,e[36]=65,e[37]=66,e[38]=67,e[39]=68,e[40]=69,e[41]=70,e[42]=71,e[43]=72,e[44]=73,e[45]=74,e[46]=75,e[47]=76,e[48]=77,e[49]=78,e[50]=79,e[51]=80,e[52]=81,e[53]=82,e[54]=83,e[55]=84,e[56]=85,e[57]=86,e[58]=87,e[59]=88,e[60]=89,e[61]=90,e[62]=91,e[63]=92,e[64]=93,e[65]=94,e[66]=95,e[67]=96,e[68]=97,e[69]=98,e[70]=99,e[71]=100,e[72]=101,e[73]=102,e[74]=103,e[75]=104,e[76]=105,e[77]=106,e[78]=107,e[79]=108,e[80]=109,e[81]=110,e[82]=111,e[83]=112,e[84]=113,e[85]=114,e[86]=115,e[87]=116,e[88]=117,e[89]=118,e[90]=119,e[91]=120,e[92]=121,e[93]=122,e[94]=123,e[95]=124,e[96]=125,e[97]=126,e[98]=196,e[99]=197,e[100]=199,e[101]=201,e[102]=209,e[103]=214,e[104]=220,e[105]=225,e[106]=224,e[107]=226,e[108]=228,e[109]=227,e[110]=229,e[111]=231,e[112]=233,e[113]=232,e[114]=234,e[115]=235,e[116]=237,e[117]=236,e[118]=238,e[119]=239,e[120]=241,e[121]=243,e[122]=242,e[123]=244,e[124]=246,e[125]=245,e[126]=250,e[127]=249,e[128]=251,e[129]=252,e[130]=8224,e[131]=176,e[132]=162,e[133]=163,e[134]=167,e[135]=8226,e[136]=182,e[137]=223,e[138]=174,e[139]=169,e[140]=8482,e[141]=180,e[142]=168,e[143]=8800,e[144]=198,e[145]=216,e[146]=8734,e[147]=177,e[148]=8804,e[149]=8805,e[150]=165,e[151]=181,e[152]=8706,e[153]=8721,e[154]=8719,e[156]=8747,e[157]=170,e[158]=186,e[159]=8486,e[160]=230,e[161]=248,e[162]=191,e[163]=161,e[164]=172,e[165]=8730,e[166]=402,e[167]=8776,e[168]=8710,e[169]=171,e[170]=187,e[171]=8230,e[179]=8220,e[180]=8221,e[181]=8216,e[182]=8217,e[200]=193,e[203]=205,e[207]=211,e[210]=218,e[223]=711,e[224]=321,e[225]=322,e[226]=352,e[227]=353,e[228]=381,e[229]=382,e[233]=221,e[234]=253,e[252]=263,e[253]=268,e[254]=269,e[258]=258,e[260]=260,e[261]=261,e[265]=280,e[266]=281,e[267]=282,e[268]=283,e[269]=313,e[275]=323,e[276]=324,e[278]=328,e[283]=344,e[284]=345,e[285]=346,e[286]=347,e[292]=367,e[295]=377,e[296]=378,e[298]=380,e[305]=963,e[306]=964,e[307]=966,e[308]=8215,e[309]=8252,e[310]=8319,e[311]=8359,e[312]=8592,e[313]=8593,e[337]=9552,e[493]=1039,e[494]=1040,e[672]=1488,e[673]=1489,e[674]=1490,e[675]=1491,e[676]=1492,e[677]=1493,e[678]=1494,e[679]=1495,e[680]=1496,e[681]=1497,e[682]=1498,e[683]=1499,e[684]=1500,e[685]=1501,e[686]=1502,e[687]=1503,e[688]=1504,e[689]=1505,e[690]=1506,e[691]=1507,e[692]=1508,e[693]=1509,e[694]=1510,e[695]=1511,e[696]=1512,e[697]=1513,e[698]=1514,e[705]=1524,e[706]=8362,e[710]=64288,e[711]=64298,e[759]=1617,e[761]=1776,e[763]=1778,e[775]=1652,e[777]=1764,e[778]=1780,e[779]=1781,e[780]=1782,e[782]=771,e[783]=64726,e[786]=8363,e[788]=8532,e[790]=768,e[791]=769,e[792]=768,e[795]=803,e[797]=64336,e[798]=64337,e[799]=64342,e[800]=64343,e[801]=64344,e[802]=64345,e[803]=64362,e[804]=64363,e[805]=64364,e[2424]=7821,e[2425]=7822,e[2426]=7823,e[2427]=7824,e[2428]=7825,e[2429]=7826,e[2430]=7827,e[2433]=7682,e[2678]=8045,e[2679]=8046,e[2830]=1552,e[2838]=686,e[2840]=751,e[2842]=753,e[2843]=754,e[2844]=755,e[2846]=757,e[2856]=767,e[2857]=848,e[2858]=849,e[2862]=853,e[2863]=854,e[2864]=855,e[2865]=861,e[2866]=862,e[2906]=7460,e[2908]=7462,e[2909]=7463,e[2910]=7464,e[2912]=7466,e[2913]=7467,e[2914]=7468,e[2916]=7470,e[2917]=7471,e[2918]=7472,e[2920]=7474,e[2921]=7475,e[2922]=7476,e[2924]=7478,e[2925]=7479,e[2926]=7480,e[2928]=7482,e[2929]=7483,e[2930]=7484,e[2932]=7486,e[2933]=7487,e[2934]=7488,e[2936]=7490,e[2937]=7491,e[2938]=7492,e[2940]=7494,e[2941]=7495,e[2942]=7496,e[2944]=7498,e[2946]=7500,e[2948]=7502,e[2950]=7504,e[2951]=7505,e[2952]=7506,e[2954]=7508,e[2955]=7509,e[2956]=7510,e[2958]=7512,e[2959]=7513,e[2960]=7514,e[2962]=7516,e[2963]=7517,e[2964]=7518,e[2966]=7520,e[2967]=7521,e[2968]=7522,e[2970]=7524,e[2971]=7525,e[2972]=7526,e[2974]=7528,e[2975]=7529,e[2976]=7530,e[2978]=1537,e[2979]=1538,e[2980]=1539,e[2982]=1549,e[2983]=1551,e[2984]=1552,e[2986]=1554,e[2987]=1555,e[2988]=1556,e[2990]=1623,e[2991]=1624,e[2995]=1775,e[2999]=1791,e[3002]=64290,e[3003]=64291,e[3004]=64292,e[3006]=64294,e[3007]=64295,e[3008]=64296,e[3011]=1900,e[3014]=8223,e[3015]=8244,e[3017]=7532,e[3018]=7533,e[3019]=7534,e[3075]=7590,e[3076]=7591,e[3079]=7594,e[3080]=7595,e[3083]=7598,e[3084]=7599,e[3087]=7602,e[3088]=7603,e[3091]=7606,e[3092]=7607,e[3095]=7610,e[3096]=7611,e[3099]=7614,e[3100]=7615,e[3103]=7618,e[3104]=7619,e[3107]=8337,e[3108]=8338,e[3116]=1884,e[3119]=1885,e[3120]=1885,e[3123]=1886,e[3124]=1886,e[3127]=1887,e[3128]=1887,e[3131]=1888,e[3132]=1888,e[3135]=1889,e[3136]=1889,e[3139]=1890,e[3140]=1890,e[3143]=1891,e[3144]=1891,e[3147]=1892,e[3148]=1892,e[3153]=580,e[3154]=581,e[3157]=584,e[3158]=585,e[3161]=588,e[3162]=589,e[3165]=891,e[3166]=892,e[3169]=1274,e[3170]=1275,e[3173]=1278,e[3174]=1279,e[3181]=7622,e[3182]=7623,e[3282]=11799,e[3316]=578,e[3379]=42785,e[3393]=1159,e[3416]=8377})),Rc=ft((function(e){e[227]=322,e[264]=261,e[291]=346})),Gc=ft((function(e){e[1]=32,e[4]=65,e[5]=192,e[6]=193,e[9]=196,e[17]=66,e[18]=67,e[21]=268,e[24]=68,e[28]=69,e[29]=200,e[30]=201,e[32]=282,e[38]=70,e[39]=71,e[44]=72,e[47]=73,e[48]=204,e[49]=205,e[58]=74,e[60]=75,e[62]=76,e[68]=77,e[69]=78,e[75]=79,e[76]=210,e[80]=214,e[87]=80,e[89]=81,e[90]=82,e[92]=344,e[94]=83,e[97]=352,e[100]=84,e[104]=85,e[109]=220,e[115]=86,e[116]=87,e[121]=88,e[122]=89,e[124]=221,e[127]=90,e[129]=381,e[258]=97,e[259]=224,e[260]=225,e[263]=228,e[268]=261,e[271]=98,e[272]=99,e[273]=263,e[275]=269,e[282]=100,e[286]=101,e[287]=232,e[288]=233,e[290]=283,e[295]=281,e[296]=102,e[336]=103,e[346]=104,e[349]=105,e[350]=236,e[351]=237,e[361]=106,e[364]=107,e[367]=108,e[371]=322,e[373]=109,e[374]=110,e[381]=111,e[382]=242,e[383]=243,e[386]=246,e[393]=112,e[395]=113,e[396]=114,e[398]=345,e[400]=115,e[401]=347,e[403]=353,e[410]=116,e[437]=117,e[442]=252,e[448]=118,e[449]=119,e[454]=120,e[455]=121,e[457]=253,e[460]=122,e[462]=382,e[463]=380,e[853]=44,e[855]=58,e[856]=46,e[876]=47,e[878]=45,e[882]=45,e[894]=40,e[895]=41,e[896]=91,e[897]=93,e[923]=64,e[1004]=48,e[1005]=49,e[1006]=50,e[1007]=51,e[1008]=52,e[1009]=53,e[1010]=54,e[1011]=55,e[1012]=56,e[1013]=57,e[1081]=37,e[1085]=43,e[1086]=45}));function Nc(e){var t=mc(e);return bc()[t]}function Lc(e){var t=mc(e);return!!(bc()[t]||Dc()[t]||Sc()[t]||Fc()[t])}function Uc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mc(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];Uc(this,e),this._map=t}),[{key:"length",get:function(){return this._map.length}},{key:"forEach",value:function(e){for(var t in this._map)e(t,this._map[t].charCodeAt(0))}},{key:"has",value:function(e){return void 0!==this._map[e]}},{key:"get",value:function(e){return this._map[e]}},{key:"charCodeOf",value:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1}},{key:"amend",value:function(e){for(var t in e)this._map[t]=e[t]}}])}(),Pc=function(){return Jc((function e(t,r){Uc(this,e),this.firstChar=t,this.lastChar=r}),[{key:"length",get:function(){return this.lastChar+1-this.firstChar}},{key:"forEach",value:function(e){for(var t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)}},{key:"has",value:function(e){return this.firstChar<=e&&e<=this.lastChar}},{key:"get",value:function(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}},{key:"amend",value:function(e){j("Should not call amend()")}}])}();function Oc(e,t){for(var r=0;r0){o=Object.create(null);for(var c=0,g=n.length;c=0){var s=A[o];s&&(i[a]=s)}}i.length>0&&(this.properties.builtInEncoding=i)}}}])&&Oc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function qc(e,t,r){return t=Wc(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jc()?Reflect.construct(t,r||[],Wc(e).constructor):t.apply(e,r))}function jc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jc=function(){return!!e})()}function Wc(e){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wc(e)}function Zc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)}function _c(e,t){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_c(e,t)}function Xc(e){return function(e){if(Array.isArray(e))return Vc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Vc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>>0}function Ag(e,t){return e[t]<<8|e[t+1]}function ng(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function ig(e,t){return e[t]<<24>>24}function ag(e,t){return ng(e,t)/16384}function og(e){var t=e.length,r=32768;return t<1240?r=107:t<33900&&(r=1131),r}function sg(e,t,r){var A,n,i,a=1===Ag(e,t+2)?rg(e,t+8):rg(e,t+16),o=Ag(e,t+a);if(4===o){Ag(e,t+a+2);var s=Ag(e,t+a+6)>>1;for(n=t+a+14,A=[],i=0;i>1;r0;)v.push({flags:a})}for(E=0;E>1,h=!0;break;case 4:c+=o.pop(),n(s,c),h=!0;break;case 5:for(;o.length>0;)s+=o.shift(),c+=o.shift(),i(s,c);break;case 6:for(;o.length>0&&(i(s+=o.shift(),c),0!==o.length);)c+=o.shift(),i(s,c);break;case 7:for(;o.length>0&&(c+=o.shift(),i(s,c),0!==o.length);)i(s+=o.shift(),c);break;case 8:for(;o.length>0;)f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 10:if(y=o.pop(),p=null,r.isCFFCIDFont){var v=r.fdSelect.getFDIndex(A);if(v>=0&&vMath.abs(c-D)?s+=o.shift():c+=o.shift(),a(f,B,C,Q,s,c);break;default:throw new re("unknown operator: 12 ".concat(I))}break;case 14:if(o.length>=4){var S=o.pop(),F=o.pop();c=o.pop(),s=o.pop(),t.add(5),t.add(8,[s,c]);var x=gg(r.cmap,String.fromCharCode(r.glyphNameMap[Ds[S]]));lg(r.glyphs[x.glyphId],t,r,x.glyphId),t.add(4),x=gg(r.cmap,String.fromCharCode(r.glyphNameMap[Ds[F]])),lg(r.glyphs[x.glyphId],t,r,x.glyphId)}return;case 19:case 20:l+=(g+=o.length>>1)+7>>3,h=!0;break;case 21:c+=o.pop(),n(s+=o.pop(),c),h=!0;break;case 22:n(s+=o.pop(),c),h=!0;break;case 24:for(;o.length>2;)f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);s+=o.shift(),c+=o.shift(),i(s,c);break;case 25:for(;o.length>6;)s+=o.shift(),c+=o.shift(),i(s,c);f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 26:for(o.length%2&&(s+=o.shift());o.length>0;)f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C,c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 27:for(o.length%2&&(c+=o.shift());o.length>0;)a(f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q);break;case 28:o.push((u[l]<<24|u[l+1]<<16)>>16),l+=2;break;case 29:y=o.pop()+r.gsubrsBias,(p=r.gsubrs[y])&&e(p);break;case 30:for(;o.length>0&&(f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+(1===o.length?o.shift():0),a(f,B,C,Q,s,c),0!==o.length);)f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s=C+(1===o.length?o.shift():0),c);break;case 31:for(;o.length>0&&(f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s=C+(1===o.length?o.shift():0),c),0!==o.length);)f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+(1===o.length?o.shift():0),a(f,B,C,Q,s,c);break;default:if(I<32)throw new re("unknown operator: ".concat(I));I<247?o.push(I-139):I<251?o.push(256*(I-247)+u[l++]+108):I<255?o.push(256*-(I-251)-u[l++]-108):(o.push((u[l]<<24|u[l+1]<<16|u[l+2]<<8|u[l+3])/65536),l+=4)}h&&(o.length=0)}}(e)}var hg=[],Ig=function(){return eg((function e(){var t,r,A;zc(this,e),t=this,A=[],(r=tg(r="cmds"))in t?Object.defineProperty(t,r,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[r]=A}),[{key:"add",value:function(e,t){if(t)if(St(t,null)){var r;(r=this.cmds).push.apply(r,[e].concat(Xc(t)))}else{var A;q('Commands.add - "'.concat(e,'" has at least one non-number arg: "').concat(t,'".'));var n=t.map((function(e){return"number"==typeof e?e:0}));(A=this.cmds).push.apply(A,[e].concat(Xc(n)))}else this.cmds.push(e)}}])}(),fg=function(){return eg((function e(t){zc(this,e),this.fontMatrix=t,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}),[{key:"getPathJs",value:function(e){var t,r,A,n=gg(this.cmap,e),i=n.charCode,a=n.glyphId,o=this.compiledGlyphs[a];if(!o){try{o=this.compileGlyph(this.glyphs[a],a)}catch(e){o=hg,A=e}this.compiledGlyphs[a]=o}if(null!==(r=(t=this.compiledCharCodeToGlyphId)[i])&&void 0!==r||(t[i]=a),A)throw A;return o}},{key:"compileGlyph",value:function(e,t){if(!e||0===e.length||14===e[0])return hg;var r=this.fontMatrix;if(this.isCFFCIDFont){var A=this.fdSelect.getFDIndex(t);A>=0&&A=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function vg(e,t){if(e){if("string"==typeof e)return mg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mg(e,t):void 0}}function mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r131070,A=r?4:2,n=new DataView(new ArrayBuffer((this.glyphs.length+1)*A));r?n.setUint32(0,0):n.setUint16(0,0);var i,a=0,o=0,s=pg(this.glyphs);try{for(s.s();!(i=s.n()).done;)a=(a+=i.value.write(a,t))+3&-4,o+=A,r?n.setUint32(o,a):n.setUint16(o,a>>1)}catch(e){s.e(e)}finally{s.f()}return{isLocationLong:r,loca:new Uint8Array(n.buffer),glyf:new Uint8Array(t.buffer)}}},{key:"scale",value:function(e){for(var t=0,r=this.glyphs.length;t255?t+=2:g>0&&(t+=1),r=s,(g=Math.abs(c-A))>255?t+=2:g>0&&(t+=1),A=c}}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"write",value:function(e,t){var r,A=e,n=[],i=[],a=[],o=0,s=0,c=pg(this.contours);try{for(c.s();!(r=c.n()).done;){for(var g=r.value,u=0,l=g.xCoordinates.length;u=0?18:2,n.push(C)):n.push(f)}o=I;var B=g.yCoordinates[u];if(0==(f=B-s))h|=32,i.push(0);else{var Q=Math.abs(f);Q<=255?(h|=f>=0?36:4,i.push(Q)):i.push(f)}s=B,a.push(h)}t.setUint16(e,n.length-1),e+=2}}catch(e){c.e(e)}finally{c.f()}t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length);for(var E=0,d=a;E=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2),e}},{key:"write",value:function(e,t){var r=e;return 2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1),t.setUint16(e,this.flags),t.setUint16(e+2,this.glyphIndex),e+=4,1&this.flags?(2&this.flags?(t.setInt16(e,this.argument1),t.setInt16(e+2,this.argument2)):(t.setUint16(e,this.argument1),t.setUint16(e+2,this.argument2)),e+=4):(t.setUint8(e,this.argument1),t.setUint8(e+1,this.argument2),e+=2),256&this.flags&&(t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length)),e-r}},{key:"scale",value:function(e,t){}}],[{key:"parse",value:function(t,r){var A,n,i=t,a=[],o=r.getUint16(t),s=r.getUint16(t+2);t+=4,1&o?(2&o?(A=r.getInt16(t),n=r.getInt16(t+2)):(A=r.getUint16(t),n=r.getUint16(t+2)),t+=4,o^=1):(2&o?(A=r.getInt8(t),n=r.getInt8(t+1)):(A=r.getUint8(t),n=r.getUint8(t+1)),t+=2),8&o?(a.push(r.getUint16(t)),t+=2):64&o?(a.push(r.getUint16(t),r.getUint16(t+2)),t+=4):128&o&&(a.push(r.getUint16(t),r.getUint16(t+2),r.getUint16(t+4),r.getUint16(t+6)),t+=8);var c=null;if(256&o){var g=r.getUint16(t);t+=2,c=new Uint8Array(r).slice(t,t+g),t+=g}return[t-i,new e({flags:o,glyphIndex:s,argument1:A,argument2:n,transf:a,instructions:c})]}}])}();function Lg(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,A=Array(t);r>8&255,e[t+1]=255&r}function Hg(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function Yg(e,t,r){if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(var A=0,n=r.length;A=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(r);try{for(a.s();!(i=a.n()).done;){var o=i.value;e[t++]=255&o}}catch(e){a.e(e)}finally{a.f()}}}var Pg=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sfnt=t,this.tables=Object.create(null)}return t=e,A=[{key:"getSearchParams",value:function(e,t){for(var r=1,A=0;(r^e)>r;)r<<=1,A++;var n=r*t;return{range:n,entry:A,rangeShift:t*e-n}}}],(r=[{key:"toArray",value:function(){var t=this.sfnt,r=this.tables,A=Object.keys(r);A.sort();var n,i,a,o,s,c=A.length,g=12+16*c,u=[g];for(n=0;n>>0,u.push(g);var l=new Uint8Array(g);for(n=0;n>>0;Hg(l,g+4,I),Hg(l,g+8,u[n]),Hg(l,g+12,r[s].length),g+=16}return l}},{key:"addTable",value:function(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}}])&&Lg(t.prototype,r),A&&Lg(t,A),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,A}();function Og(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);rn)return!0;for(var i=n-e,a=i;a>8&255,255&o):(o=65536*o|0,this.output.push(255,o>>24&255,o>>16&255,o>>8&255,255&o))}return(A=this.output).push.apply(A,function(e){return function(e){if(Array.isArray(e))return Og(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Og(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Og(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)),r?this.stack.splice(i,e):this.stack.length=0,!1}}])}();function iu(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function au(e,t,r){if(r>=e.length)return new Uint8Array(0);var A,n,i=0|t;for(A=0;A>8,i=52845*(s+i)+22719&65535}return o}function ou(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}var su=function(){return qg((function e(t,r,A){if(Kg(this,e),r){var n=t.getBytes(),i=!((iu(n[0])||Dt(n[0]))&&iu(n[1])&&iu(n[2])&&iu(n[3])&&iu(n[4])&&iu(n[5])&&iu(n[6])&&iu(n[7]));t=new ar(i?au(n,55665,4):function(e,t,r){var A,n,i=55665,a=e.length,o=new Uint8Array(a>>>1);for(A=0,n=0;A>8,i=52845*(g+i)+22719&65535}}}return o.slice(4,n)}(n))}this.seacAnalysisEnabled=!!A,this.stream=t,this.nextChar()}),[{key:"readNumberArray",value:function(){this.getToken();for(var e=[];;){var t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}},{key:"readNumber",value:function(){var e=this.getToken();return parseFloat(e||0)}},{key:"readInt",value:function(){var e=this.getToken();return 0|parseInt(e||0,10)}},{key:"readBoolean",value:function(){return"true"===this.getToken()?1:0}},{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"prevChar",value:function(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}},{key:"getToken",value:function(){for(var e=!1,t=this.currentChar;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!Dt(t))break;t=this.nextChar()}if(ou(t))return this.nextChar(),String.fromCharCode(t);var r="";do{r+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!Dt(t)&&!ou(t));return r}},{key:"readCharStrings",value:function(e,t){return-1===t?e:au(e,4330,t)}},{key:"extractFontProgram",value:function(e){var t=this.stream,r=[],A=[],n=Object.create(null);n.lenIV=4;for(var i,a,o,s,c={subrs:[],charstrings:[],properties:{privateData:n}};null!==(i=this.getToken());)if("/"===i)switch(i=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();null!==(i=this.getToken())&&"end"!==i;)if("/"===i){var g=this.getToken();a=this.readInt(),this.getToken(),o=a>0?t.getBytes(a):new Uint8Array(0),s=c.properties.privateData.lenIV;var u=this.readCharStrings(o,s);this.nextChar(),"noaccess"===(i=this.getToken())?this.getToken():"/"===i&&this.prevChar(),A.push({glyph:g,encoded:u})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){var l=this.readInt();a=this.readInt(),this.getToken(),o=a>0?t.getBytes(a):new Uint8Array(0),s=c.properties.privateData.lenIV;var h=this.readCharStrings(o,s);this.nextChar(),"noaccess"===(i=this.getToken())&&this.getToken(),r[l]=h}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var I=this.readNumberArray();I.length>0&&I.length;break;case"StemSnapH":case"StemSnapV":c.properties.privateData[i]=this.readNumberArray();break;case"StdHW":case"StdVW":c.properties.privateData[i]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":c.properties.privateData[i]=this.readNumber();break;case"ExpansionFactor":c.properties.privateData[i]=this.readNumber()||.06;break;case"ForceBold":c.properties.privateData[i]=this.readBoolean()}for(var f=0,C=A;f-1&&void 0===e.widths[m]&&m>=e.firstChar&&m<=e.lastChar&&(e.widths[m]=d.width)}}return c}},{key:"extractFontHeader",value:function(e){for(var t;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken()){case"FontMatrix":var r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":var A=this.getToken(),n=void 0;if(/^\\d+$/.test(A)){n=[];var i=0|parseInt(A,10);this.getToken();for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function gu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=n){for(a+=s;a=0&&(i[c]=a);return vc(e,i,o)}},{key:"hasGlyphId",value:function(e){return!(e<0||e>=this.numGlyphs)&&(0===e||this.charstrings[e-1].charstring.length>0)}},{key:"getSeacs",value:function(e){for(var t=[],r=0,A=e.length;r0;Q--)B[Q]-=B[Q-1];I.setByName(C,B)}}i.topDict.privateDict=I;var E=new ec;for(s=0,c=A.length;s=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function pu(e,t){if(e){if("string"==typeof e)return vu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vu(e,t):void 0}}function vu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&e.toUnicode.amend(t)}}var Fu=function(){return Eu((function e(t,r,A,n,i,a,o,s,c){Bu(this,e),this.originalCharCode=t,this.fontChar=r,this.unicode=A,this.accent=n,this.width=i,this.vmetric=a,this.operatorListId=o,this.isSpace=s,this.isInFont=c}),[{key:"category",get:function(){return _(this,"category",function(e){var t=Ec.get(e);if(t)return t;var r=e.match(Qc),A={isWhitespace:!(null==r||!r[1]),isZeroWidthDiacritic:!(null==r||!r[2]),isInvisibleFormatMark:!(null==r||!r[3])};return Ec.set(e,A),A}(this.unicode),!0)}}])}();function xu(e,t){return(e<<8)+t}function Ru(e,t,r){e[t+1]=r,e[t]=r>>>8}function Gu(e,t){var r=(e<<8)+t;return 32768&r?r-65536:r}function Nu(e){return String.fromCharCode(e>>8&255,255&e)}function Lu(e){return e>32767?e=32767:e<-32768&&(e=-32768),String.fromCharCode(e>>8&255,255&e)}function Uu(e){return"ttcf"===ne(e.peekBytes(4))}function Mu(e,t){for(var r in t)e[+r]=t[r]}function Ju(e,t,r){for(var A,n=[],i=0,a=e.length;i2&&void 0!==arguments[2]&&arguments[2];switch(t.length){case 1:return t.charCodeAt(0);case 2:return t.charCodeAt(0)<<8|t.charCodeAt(1)}var A="Unsupported CID string (charCode ".concat(e,'): "').concat(t,'".');if(r)throw new re(A);return q(A),t}function Ou(e,t,r,A){var n,i=Object.create(null),a=new Map,o=[],s=new Set,c=0,g=mu[c][0],u=mu[c][1];for(var l in e){var h=e[l];if(t(h)){if(g>u){if(++c>=mu.length){q("Ran out of space in font private use area.");break}g=mu[c][0],u=mu[c][1]}var I=g++;0===h&&(h=r);var f=A.get(l);"string"==typeof f&&(f=f.codePointAt(0)),!f||(n=f,mu[0][0]<=n&&n<=mu[0][1]||mu[1][0]<=n&&n<=mu[1][1])||s.has(h)||(a.set(f,h),s.add(h)),i[I]=h,o[l]=I}}return{toFontChar:o,charCodeToGlyphId:i,toUnicodeExtraMap:a,nextAvailableFontCharCode:g}}function Ku(e,t,r){var A,n,i,a,o=function(e,t,r){var A=[];for(var n in e)e[n]>=r||A.push({fontCharCode:0|n,glyphId:e[n]});if(t){var i,a=yu(t);try{for(a.s();!(i=a.n()).done;){var o=Cu(i.value,2),s=o[0],c=o[1];c>=r||A.push({fontCharCode:s,glyphId:c})}}catch(e){a.e(e)}finally{a.f()}}0===A.length&&A.push({fontCharCode:0,glyphId:0}),A.sort((function(e,t){return e.fontCharCode-t.fontCharCode}));for(var g=[],u=A.length,l=0;l65535?2:1,c="\\0\\0"+Nu(s)+"\\0\\0"+ae(4+8*s);for(A=o.length-1;A>=0&&!(o[A][0]<=65535);--A);var g=A+1;o[A][0]<65535&&65535===o[A][1]&&(o[A][1]=65534);var u,l,h,I,f=o[A][1]<65535?1:0,C=g+f,B=Pg.getSearchParams(C,2),Q="",E="",d="",y="",p="",v=0;for(A=0,n=g;A0&&(E+="ÿÿ",Q+="ÿÿ",d+="\\0",y+="\\0\\0");var b="\\0\\0"+Nu(2*C)+Nu(B.range)+Nu(B.entry)+Nu(B.rangeShift)+E+"\\0\\0"+Q+d+y+p,k="",D="";if(s>1){for(c+="\\0\\0\\n"+ae(4+8*s+4+b.length),k="",A=0,n=o.length;A(g|=0)||!o)&&(o=g),s 123 are reserved for internal usage");a|=1<65535&&(s=65535)}else o=0,s=255;var u=e.bbox||[0,0,0,0],l=r.unitsPerEm||(e.fontMatrix?1/Math.max.apply(Math,fu(e.fontMatrix.slice(0,4).map(Math.abs))):1e3),h=e.ascentScaled?1:l/wu,I=r.ascent||Math.round(h*(e.ascent||u[3])),f=r.descent||Math.round(h*(e.descent||u[1]));f>0&&e.descent>0&&u[1]<0&&(f=-f);var C=r.yMax||I,B=-r.yMin||-f;return"\\0$ô\\0\\0\\0Š»\\0\\0\\0ŒŠ»\\0\\0ß\\x001\\0\\0\\0\\0"+String.fromCharCode(e.fixedPitch?9:0)+"\\0\\0\\0\\0\\0\\0"+ae(A)+ae(n)+ae(i)+ae(a)+"*21*"+Nu(e.italicAngle?1:0)+Nu(o||e.firstChar)+Nu(s||e.lastChar)+Nu(I)+Nu(f)+"\\0d"+Nu(C)+Nu(B)+"\\0\\0\\0\\0\\0\\0\\0\\0"+Nu(e.xHeight)+Nu(e.capHeight)+Nu(0)+Nu(o||e.firstChar)+"\\0"}function qu(e){return"\\0\\0\\0"+ae(Math.floor(e.italicAngle*Math.pow(2,16)))+"\\0\\0\\0\\0"+ae(e.fixedPitch?1:0)+"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"}function ju(e){return e.replaceAll(/[^\\x21-\\x7E]|[[\\](){}<>/%]/g,"").slice(0,63)}function Wu(e,t){t||(t=[[],[]]);var r,A,n,i,a,o=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||ju(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],s=[];for(r=0,A=o.length;r=1&&t[3]>=1&&t[3]<=4}(e)?a?(r="CIDFontType0",A="CIDFontType0C"):(r="MMType1"===n?"MMType1":"Type1",A="Type1C"):(q("getFontFileType: Unable to detect correct font file Type/Subtype."),r=n,A=i),[r,A]}(r,A),2);g=I[0],u=I[1],g===this.type&&u===this.subtype||T("Inconsistent font file Type/SubType, expected: "+"".concat(this.type,"/").concat(this.subtype," but found: ").concat(g,"/").concat(u,"."));try{switch(g){case"MMType1":T("MMType1 font ("+t+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var f="Type1C"===u||"CIDFontType0C"===u?new Tc(r,A):new Iu(t,r,A);Du(A),h=this.convert(t,f,A);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",h=this.checkAndRepair(t,r,A),this.isOpenType&&(Du(A),g="OpenType");break;default:throw new re("Font ".concat(g," is not supported"))}}catch(e){return q(e),void this.fallbackToSystemFont(A)}Su(A),this.data=h,this.type=g,this.subtype=u,this.fontMatrix=A.fontMatrix,this.widths=A.widths,this.defaultWidth=A.defaultWidth,this.toUnicode=A.toUnicode,this.seacMap=A.seacMap}else for(var C=0;C<256;C++)this.toFontChar[C]=this.differences[C]||A.defaultEncoding[C]}),[{key:"renderer",get:function(){return _(this,"renderer",Qg.create(this,dc))}},{key:"exportData",value:function(){var e,t,r,A=arguments.length>0&&void 0!==arguments[0]&&arguments[0]?[].concat(bu,ku):bu,n=Object.create(null),i=yu(A);try{for(i.s();!(r=i.n()).done;)void 0!==(t=this[e=r.value])&&(n[e]=t)}catch(e){i.e(e)}finally{i.f()}return n}},{key:"fallbackToSystemFont",value:function(e){var t=this;this.missingFile=!0;var r=this.name,A=this.type,n=mc(r),i=bc(),a=Dc(),o=!!i[n],s=!(!a[n]||!i[a[n]]);n=i[n]||a[n]||n;var c=dg()[n];c&&(isNaN(this.ascent)&&(this.ascent=c.ascent/wu),isNaN(this.descent)&&(this.descent=c.descent/wu),isNaN(this.capHeight)&&(this.capHeight=c.capHeight/wu)),this.bold=/bold/gi.test(n),this.italic=/oblique|italic/gi.test(n),this.black=/Black/g.test(r);var g=/Narrow/g.test(r);if(this.remeasure=(!o||g)&&Object.keys(this.widths).length>0,(o||s)&&"CIDFontType2"===A&&this.cidEncoding.startsWith("Identity-")){var u=e.cidToGidMap,l=[];if(Mu(l,xc()),/Arial-?Black/i.test(r)?Mu(l,Rc()):/Calibri/i.test(r)&&Mu(l,Gc()),u){for(var h in l){var I=l[h];void 0!==u[I]&&(l[+h]=u[I])}u.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof Pc&&this.toUnicode.forEach((function(e,t){var r=l[e];void 0===u[r]&&(l[+e]=t)}))}this.toUnicode instanceof Pc||this.toUnicode.forEach((function(e,t){l[+e]=t})),this.toFontChar=l,this.toUnicode=new Yc(l)}else if(/Symbol/i.test(n))this.toFontChar=Ju(Fs,lc(),this.differences);else if(/Dingbats/i.test(n))this.toFontChar=Ju(xs,hc(),this.differences);else if(o||s){var f=Ju(this.defaultEncoding,lc(),this.differences);"CIDFontType2"!==A||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof Pc||this.toUnicode.forEach((function(e,t){f[+e]=t})),this.toFontChar=f}else{var C=lc(),B=[];this.toUnicode.forEach((function(e,r){if(!t.composite){var A=fc(t.differences[e]||t.defaultEncoding[e],C);-1!==A&&(r=A)}B[+e]=r})),this.composite&&this.toUnicode instanceof Pc&&/Tahoma|Verdana/i.test(r)&&Mu(B,xc()),this.toFontChar=B}Su(e),this.loadedName=n.split("-",1)[0]}},{key:"checkAndRepair",value:function(e,t,r){var A,n,i=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function a(e,t){var r=Object.create(null);r["OS/2"]=null,r.cmap=null,r.head=null,r.hhea=null,r.hmtx=null,r.maxp=null,r.name=null,r.post=null;for(var A=0;A>>0,A=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.pos;e.pos=e.start||0,e.skip(A);var a=e.getBytes(n);return e.pos=i,"head"===t&&(a[8]=a[9]=a[10]=a[11]=0,a[17]|=32),{tag:t,checksum:r,length:n,offset:A,data:a}}function s(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function c(e,t,r,A,n,i){var a={length:0,sizeOfInstructions:0};if(t<0||t>=e.length||r>e.length||r-t<=12)return a;var o=e.subarray(t,r),s=Gu(o[2],o[3]),c=Gu(o[4],o[5]),g=Gu(o[6],o[7]),u=Gu(o[8],o[9]);s>g&&(Ru(o,2,g),Ru(o,6,s)),c>u&&(Ru(o,4,u),Ru(o,8,c));var l=Gu(o[0],o[1]);if(l<0)return l<-1||(A.set(o,n),a.length=o.length),a;var h,I=10,f=0;for(h=0;ho.length?a:!i&&B>0?(A.set(o.subarray(0,C),n),A.set([0,0],n+C),A.set(o.subarray(Q,w),n+C+2),w-=B,o.length-w>3&&(w=w+3&-4),a.length=w,a):o.length-w>3?(w=w+3&-4,A.set(o.subarray(0,w),n),a.length=w,a):(A.set(o,n),a.length=o.length,a)}function g(e){var r=(t.start||0)+e.offset;t.pos=r;var A=[[],[]],n=[],i=e.length,a=r+i;if(0!==t.getUint16()||i<6)return[A,n];var o,s,c=t.getUint16(),g=t.getUint16();for(o=0;oa)){t.pos=h;var I=l.name;if(l.encoding){for(var f="",C=0,B=l.length;C0&&(s+=y-1)}}else(C||Q)&&(q("TT: nested FDEFs not allowed"),I=!0),C=!0,g=s,i=u.pop(),t.functionsDefined[i]={data:o,i:s};else if(!C&&!Q)if(i=u.at(-1),isNaN(i))T("TT: CALL empty stack (or invalid entry).");else if(t.functionsUsed[i]=!0,i in t.functionsStackDeltas){var p=u.length+t.functionsStackDeltas[i];if(p<0)return q("TT: CALL invalid functions stack delta."),void(t.hintsValid=!1);u.length=p}else if(i in t.functionsDefined&&!h.includes(i)){if(l.push({data:o,i:s,stackTop:u.length-1}),h.push(i),!(a=t.functionsDefined[i]))return q("TT: CALL non-existent function"),void(t.hintsValid=!1);o=a.data,s=a.i}if(!C&&!Q){var v=0;for(d<=142?v=f[d]:d>=192&&d<=223?v=-1:d>=224&&(v=-2),d>=113&&d<=117&&(A=u.pop(),isNaN(A)||(v=2*-A));v<0&&u.length>0;)u.pop(),v++;for(;v>0;)u.push(NaN),v--}}t.tooComplexToFollowFunctions=I;var m=[o];s>o.length&&m.push(new Uint8Array(s-o.length)),g>c&&(q("TT: complementing a missing function tail"),m.push(new Uint8Array([34,45]))),function(e,t){if(t.length>1){var r,A,n=0;for(r=0,A=t.length;r>>0,i=[],a=0;a>>0);var o={ttcTag:t,majorVersion:r,minorVersion:A,numFonts:n,offsetTable:i};switch(r){case 1:return o;case 2:return o.dsigTag=e.getInt32()>>>0,o.dsigLength=e.getInt32()>>>0,o.dsigOffset=e.getInt32()>>>0,o}throw new re("Invalid TrueType Collection majorVersion: ".concat(r,"."))}(e),n=A.numFonts,i=A.offsetTable,o=t.split("+"),c=0;c0||!(r.cMap instanceof ns));if("OTTO"===u.version&&!d||!l.head||!l.hhea||!l.maxp||!l.post)return I=new ar(l["CFF "].data),h=new Tc(I,r),Du(r),this.convert(e,h,r);delete l.glyf,delete l.loca,delete l.fpgm,delete l.prep,delete l["cvt "],this.isOpenType=!0}if(!l.maxp)throw new re('Required "maxp" table is not found');t.pos=(t.start||0)+l.maxp.offset;var y,p,v=t.getInt32(),m=t.getUint16();if(65536!==v&&20480!==v){if(6===l.maxp.length)v=20480;else{if(!(l.maxp.length>=32))throw new re('"maxp" table has a wrong version number');v=65536}p=v,(y=l.maxp.data)[3+0]=255&p,y[2]=p>>>8,y[1]=p>>>16,y[0]=p>>>24}if((null===(A=r.scaleFactors)||void 0===A?void 0:A.length)===m&&Q){var w=r.scaleFactors,b=xu(l.head.data[50],l.head.data[51]),k=new Sg({glyfTable:l.glyf.data,isGlyphLocationsLong:b,locaTable:l.loca.data,numGlyphs:m});k.scale(w);var D=k.write(),S=D.glyf,F=D.loca,x=D.isLocationLong;l.glyf.data=S,l.loca.data=F,x!==!!b&&(l.head.data[50]=0,l.head.data[51]=x?1:0);for(var R=l.hmtx.data,G=0;G>8&255,R[N+1]=255&L,Ru(R,N+2,Math.round(w[G]*Gu(R[N+2],R[N+3])))}}var U=m+1,M=!0;U>65535&&(M=!1,U=m,q("Not enough space in glyfs to duplicate first glyph."));var J=0,H=0;v>=65536&&l.maxp.length>=32&&(t.pos+=8,t.getUint16()>2&&(l.maxp.data[14]=0,l.maxp.data[15]=2),t.pos+=4,J=t.getUint16(),t.pos+=4,H=t.getUint16()),l.maxp.data[4]=U>>8,l.maxp.data[5]=255&U;var Y=function(e,t,r,A){var n={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(e&&C(e,n),t&&C(t,n),e&&function(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return q("TT: more functions defined than expected"),void(e.hintsValid=!1);for(var r=0,A=e.functionsUsed.length;rt)return q("TT: invalid function id: "+r),void(e.hintsValid=!1);if(e.functionsUsed[r]&&!e.functionsDefined[r])return q("TT: undefined function: "+r),void(e.hintsValid=!1)}}}(n,A),r&&1&r.length){var i=new Uint8Array(r.length+1);i.set(r.data),r.data=i}return n.hintsValid}(l.fpgm,l.prep,l["cvt "],J);if(Y||(delete l.fpgm,delete l.prep,delete l["cvt "]),function(e,t,r,A,n,i){if(t){e.pos=(e.start||0)+t.offset,e.pos+=4,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2;var a=e.getUint16();e.pos+=8,e.pos+=2;var o=e.getUint16();0!==a&&(2&xu(A.data[44],A.data[45])||(t.data[22]=0,t.data[23]=0)),o>n&&(T("The numOfMetrics (".concat(o,") should not be ")+"greater than the numGlyphs (".concat(n,").")),o=n,t.data[34]=(65280&o)>>8,t.data[35]=255&o);var s=n-o-(r.length-4*o>>1);if(s>0){var c=new Uint8Array(r.length+2*s);c.set(r.data),i&&(c[r.length]=r.data[2],c[r.length+1]=r.data[3]),r.data=c}}else r&&(r.data=null)}(t,l.hhea,l.hmtx,l.head,U,M),!l.head)throw new re('Required "head" table is not found');!function(e,t,r){var A=e.data,n=(A[0]<<24)+(A[1]<<16)+(A[2]<<8)+A[3];n>>16!=1&&(T("Attempting to fix invalid version in head table: "+n),A[0]=0,A[1]=1,A[2]=0,A[3]=0);var i=xu(A[50],A[51]);if(i<0||i>1){T("Attempting to fix invalid indexToLocFormat in head table: "+i);var a=t+1;if(r===a<<1)A[50]=0,A[51]=0;else{if(r!==a<<2)throw new re("Could not fix indexToLocFormat: "+i);A[50]=0,A[51]=1}}}(l.head,m,Q?l.loca.length:0);var P=Object.create(null);if(Q){var O=xu(l.head.data[50],l.head.data[51]),K=function(e,t,r,A,n,i,a){var o,s,g;A?(o=4,s=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},g=function(e,t,r){e[t]=r>>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(o=2,s=function(e,t){return e[t]<<9|e[t+1]<<1},g=function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255});var u=i?r+1:r,l=o*(1+u),h=new Uint8Array(l);h.set(e.data.subarray(0,l)),e.data=h;var I,f,C=t.data,B=C.length,Q=new Uint8Array(B),E=[];for(I=0,f=0;IB&&(d=B),E.push({index:I,offset:d,endOffset:0})}for(E.sort((function(e,t){return e.offset-t.offset})),I=0;Ia&&(a=D.sizeOfInstructions),g(h,f,k+=S)}if(0===k){var F=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(I=0,f=o;Ix+k?t.data=Q.subarray(0,x+k):(t.data=new Uint8Array(x+k),t.data.set(Q.subarray(0,k))),t.data.set(Q.subarray(0,x),k),g(e.data,h.length-o,k+x)}else t.data=Q.subarray(0,k);return{missingGlyphs:b,maxSizeOfInstructions:a}}(l.loca,l.glyf,m,O,Y,M,H);P=K.missingGlyphs,v>=65536&&l.maxp.length>=32&&(l.maxp.data[26]=K.maxSizeOfInstructions>>8,l.maxp.data[27]=255&K.maxSizeOfInstructions)}if(!l.hhea)throw new re('Required "hhea" table is not found');0===l.hhea.data[10]&&0===l.hhea.data[11]&&(l.hhea.data[10]=255,l.hhea.data[11]=255);var j={unitsPerEm:xu(l.head.data[18],l.head.data[19]),yMax:Gu(l.head.data[42],l.head.data[43]),yMin:Gu(l.head.data[38],l.head.data[39]),ascent:Gu(l.hhea.data[4],l.hhea.data[5]),descent:Gu(l.hhea.data[6],l.hhea.data[7]),lineGap:Gu(l.hhea.data[8],l.hhea.data[9])};this.ascent=j.ascent/j.unitsPerEm,this.descent=j.descent/j.unitsPerEm,this.lineGap=j.lineGap/j.unitsPerEm,null!==(n=this.cssFontInfo)&&void 0!==n&&n.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,l.post&&function(e,r,A){var n=(t.start||0)+e.offset;t.pos=n;var i,a=n+e.length,o=t.getInt32();t.skip(28);var s,c=!0;switch(o){case 65536:i=yc;break;case 131072:var g=t.getUint16();if(g!==A){c=!1;break}var u=[];for(s=0;s=32768){c=!1;break}u.push(l)}if(!c)break;for(var h=[],I=[];t.pos65535)throw new re("Max size of CID is 65,535");var r=-1;V?r=t:void 0!==X[t]&&(r=X[t]),r>=0&&r>>0,f=!1;if((null===(g=a)||void 0===g?void 0:g.platformId)!==l||(null===(u=a)||void 0===u?void 0:u.encodingId)!==h){if(0!==l||0!==h&&1!==h&&3!==h)if(1===l&&0===h)f=!0;else if(3!==l||1!==h||!A&&a){if(r&&3===l&&0===h){f=!0;var C=!0;if(c>3;m.push(k),w=Math.max(k,w)}for(var D=[],S=0;S<=w;S++)D.push({firstCode:t.getUint16(),entryCount:t.getUint16(),idDelta:Gu(t.getByte(),t.getByte()),idRangePos:t.pos+t.getUint16()});for(var F=0;F<256;F++)if(0===m[F])t.pos=D[0].idRangePos+2*F,E=t.getUint16(),p.push({charCode:F,glyphId:E});else{var x=D[m[F]];for(Q=0;Q>1;t.skip(6);var N,L=[];for(N=0;N>1)-(G-N),n.offsetIndex=U,M=Math.max(M,U+n.end-n.start+1)):n.offsetIndex=-1}var H=[];for(Q=0;Q>>0;for(Q=0;Q>>0,Z=t.getInt32()>>>0,_=t.getInt32()>>>0,X=W;X<=Z;X++)p.push({charCode:X,glyphId:_++})}p.sort((function(e,t){return e.charCode-t.charCode}));for(var V=1;V=61440&&de<=61695&&(de&=255),Z[de]=Ee.glyphId}}catch(e){Qe.e(e)}finally{Qe.f()}}else{var ye,pe=yu(te);try{for(pe.s();!(ye=pe.n()).done;){var ve=ye.value;Z[ve.charCode]=ve.glyphId}}catch(e){pe.e(e)}finally{pe.f()}}if(r.glyphNames&&(Ae.length||this.differences.length))for(var me=0;me<256;++me)if(ne||void 0===Z[me]){var we=this.differences[me]||Ae[me];if(we){var be=r.glyphNames.indexOf(we);be>0&&_(be)&&(Z[me]=be)}}}0===Z.length&&(Z[0]=0);var ke=U-1;if(M||(ke=0),!r.cssFontInfo){var De=Ou(Z,_,ke,this.toUnicode);this.toFontChar=De.toFontChar,l.cmap={tag:"cmap",data:Ku(De.charCodeToGlyphId,De.toUnicodeExtraMap,U)},l["OS/2"]&&function(e,t){t.pos=(t.start||0)+e.offset;var r=t.getUint16();t.skip(60);var A=t.getUint16();return!(r<4&&768&A||t.getUint16()>t.getUint16()||(t.skip(6),0===t.getUint16()||(e.data[8]=e.data[9]=0,0)))}(l["OS/2"],t)||(l["OS/2"]={tag:"OS/2",data:Tu(r,De.charCodeToGlyphId,j)})}if(!Q)try{I=new ar(l["CFF "].data),(h=new Xs(I,r,dc).parse()).duplicateFirstGlyph();var Se=new uc(h);l["CFF "].data=Se.compile()}catch(e){q("Failed to compile font "+r.loadedName)}if(l.name){var Fe=Cu(g(l.name),2),xe=Fe[0],Re=Fe[1];l.name.data=Wu(e,xe),this.psName=xe[0][6]||null,r.composite||function(e,t,r){if(!e.isInternalFont&&!e.hasIncludedToUnicodeMap&&!e.hasEncoding&&!(e.toUnicode instanceof Pc)&&t&&0!==r.length&&e.defaultEncoding!==Ss){var A,n=yu(r);try{for(n.s();!(A=n.n()).done;)if(!Yu(A.value))return}catch(e){n.e(e)}finally{n.f()}var i=Ss,a=[],o=lc();for(var s in i){var c=i[s];if(""!==c){var g=o[c];void 0!==g&&(a[s]=String.fromCharCode(g))}}a.length>0&&e.toUnicode.amend(a)}}(r,this.isSymbolicFont,Re)}else l.name={tag:"name",data:Wu(this.name)};var Ge=new Pg(u.version);for(var Ne in l)Ge.addTable(Ne,l[Ne].data);return Ge.toArray()}},{key:"convert",value:function(e,t,r){r.fixedPitch=!1,r.builtInEncoding&&function(e,t){if(!e.isInternalFont&&!(e.hasIncludedToUnicodeMap||t===e.defaultEncoding||e.toUnicode instanceof Pc)){var r=[],A=lc();for(var n in t)if(!e.hasEncoding||!e.baseEncodingName&&void 0===e.differences[n]){var i=fc(t[n],A);-1!==i&&(r[n]=String.fromCharCode(i))}r.length>0&&e.toUnicode.amend(r)}}(r,r.builtInEncoding);var A=1;t instanceof Tc&&(A=t.numGlyphs-1);var n=t.getGlyphMapping(r),i=null,a=n,o=null;r.cssFontInfo||(i=Ou(n,t.hasGlyphId.bind(t),A,this.toUnicode),this.toFontChar=i.toFontChar,a=i.charCodeToGlyphId,o=i.toUnicodeExtraMap);var s=t.numGlyphs;function c(e,t){var r=null;for(var A in e)t===e[A]&&(r||(r=[])).push(0|A);return r}function g(e,t){for(var r in e)if(t===e[r])return 0|r;return i.charCodeToGlyphId[i.nextAvailableFontCharCode]=t,i.nextAvailableFontCharCode++}var u=t.seacs;if(i&&null!=u&&u.length){var l=r.fontMatrix||B,h=t.getCharset(),I=Object.create(null);for(var f in u){var C=u[f|=0],Q=Ds[C[2]],E=Ds[C[3]],d=h.indexOf(Q),y=h.indexOf(E);if(!(d<0||y<0)){var p={x:C[0]*l[0]+C[1]*l[2]+l[4],y:C[0]*l[1]+C[1]*l[3]+l[5]},v=c(n,f);if(v){var m,w=yu(v);try{for(w.s();!(m=w.n()).done;){var b=m.value,k=i.charCodeToGlyphId,D=g(k,d),S=g(k,y);I[b]={baseFontCharCode:D,accentFontCharCode:S,accentOffset:p}}}catch(e){w.e(e)}finally{w.f()}}}}r.seacMap=I}var F=r.fontMatrix?1/Math.max.apply(Math,fu(r.fontMatrix.slice(0,4).map(Math.abs))):1e3,x=new Pg("OTTO");return x.addTable("CFF ",t.data),x.addTable("OS/2",Tu(r,a)),x.addTable("cmap",Ku(a,o,s)),x.addTable("head","\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0_<õ\\0\\0"+Lu(F)+"\\0\\0\\0\\0ž\\v~'\\0\\0\\0\\0ž\\v~'\\0\\0"+Lu(r.descent)+"ÿ"+Lu(r.ascent)+Nu(r.italicAngle?2:0)+"\\0\\0\\0\\0\\0\\0\\0"),x.addTable("hhea","\\0\\0\\0"+Lu(r.ascent)+Lu(r.descent)+"\\0\\0ÿÿ\\0\\0\\0\\0\\0\\0"+Lu(r.capHeight)+Lu(Math.tan(r.italicAngle)*r.xHeight)+"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"+Nu(s)),x.addTable("hmtx",function(){for(var e=t.charstrings,r=t.cff?t.cff.widths:null,A="\\0\\0\\0\\0",n=1,i=s;n1&&void 0!==arguments[1]&&arguments[1],c=this._glyphCache[e];if((null===(t=c)||void 0===t?void 0:t.isSpace)===s)return c;var g=e;null!==(r=this.cMap)&&void 0!==r&&r.contains(e)&&"string"==typeof(g=this.cMap.lookup(e))&&(g=Pu(e,g)),"number"!=typeof(a=this.widths[g])&&(a=this.defaultWidth);var u=null===(A=this.vmetrics)||void 0===A?void 0:A[g],l=this.toUnicode.get(e)||e;"number"==typeof l&&(l=String.fromCharCode(l));var h,I=void 0!==this.toFontChar[e];if(i=this.toFontChar[e]||e,this.missingFile){var f=this.differences[e]||this.defaultEncoding[e];".notdef"!==f&&""!==f||"Type1"!==this.type||(i=32,""===f&&(a||(a=this._spaceWidth),l=String.fromCharCode(i))),i=(h=i)>=65520&&h<=65535?0:h>=62976&&h<=63743?Ic()[h]||h:173===h?45:h}this.isType3Font&&(o=i);var C=null;if(null!==(n=this.seacMap)&&void 0!==n&&n[e]){I=!0;var B=this.seacMap[e];i=B.baseFontCharCode,C={fontChar:String.fromCodePoint(B.accentFontCharCode),offset:B.accentOffset}}var Q="";if("number"==typeof i&&(i<=1114111?Q=String.fromCodePoint(i):q("charToGlyph - invalid fontCharCode: ".concat(i))),this.missingFile&&this.vertical&&1===Q.length){var E=wc()[Q.charCodeAt(0)];E&&(Q=l=String.fromCharCode(E))}return c=new Fu(e,Q,l,C,a,u,o,s,I),this._glyphCache[e]=c}},{key:"charsToGlyphs",value:function(e){var t=this._charsCache[e];if(t)return t;if(t=[],this.cMap)for(var r=Object.create(null),A=e.length,n=0;n55295&&(s<57344||s>65533)&&a++,this.toUnicode){var c=i(s);if(-1!==c){n()&&(r.push(A.join("")),A.length=0);for(var g=(this.cMap?this.cMap.getCharCodeLength(c):1)-1;g>=0;g--)A.push(String.fromCharCode(c>>8*g&255));continue}}n()||(r.push(A.join("")),A.length=0),A.push(String.fromCodePoint(s))}return r.push(A.join("")),r}}])}(),_u=function(){return Eu((function e(t){Bu(this,e),this.error=t,this.loadedName="g_font_error",this.missingFile=!0}),[{key:"charsToGlyphs",value:function(){return[]}},{key:"encodeString",value:function(e){return[e]}},{key:"exportData",value:function(){return{error:this.error}}}])}();function Xu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vu(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=g||D<=0)return T("Bad shading domain."),$u(a);var F,x=new Float32Array(s.numComps),R=new Float32Array(1),G=0;R[0]=c,k(R,0,x,0);var N=s.getRgb(x,0),L=ge.makeHexColor(N[0],N[1],N[2]);S.push([0,L]);var U=1;R[0]=c+D,k(R,0,x,0);for(var M=s.getRgb(x,0),J=M[0]-N[0]+1,H=M[1]-N[1]+1,Y=M[2]-N[2]+1,P=M[0]-N[0]-1,O=M[1]-N[1]-1,K=M[2]-N[2]-1,j=2;j<840;j++){R[0]=c+j*D,k(R,0,x,0),F=s.getRgb(x,0);var W=j-G;if(J=Math.min(J,(F[0]-N[0]+1)/W),H=Math.min(H,(F[1]-N[1]+1)/W),Y=Math.min(Y,(F[2]-N[2]+1)/W),P=Math.max(P,(F[0]-N[0]-1)/W),O=Math.max(O,(F[1]-N[1]-1)/W),K=Math.max(K,(F[2]-N[2]-1)/W),!(P<=J&&O<=H&&K<=Y)){var Z=ge.makeHexColor(M[0],M[1],M[2]);S.push([U/840,Z]),J=F[0]-M[0]+1,H=F[1]-M[1]+1,Y=F[2]-M[2]+1,P=F[0]-M[0]-1,O=F[1]-M[1]-1,K=F[2]-M[2]-1,G=U,N=M}U=j,M=F}var _=ge.makeHexColor(M[0],M[1],M[2]);S.push([1,_]);var X="transparent";return e.has("Background")&&(F=s.getRgb(e.get("Background"),0),X=ge.makeHexColor(F[0],F[1],F[2])),I||(S.unshift([0,X]),S[1][0]+=gl.SMALL_NUMBER),f||(S.at(-1)[0]-=gl.SMALL_NUMBER,S.push([1,X])),a.colorStops=S,a}return rl(t,gl),ol(t,[{key:"getIR",value:function(){var e,t,r,A,n,i=this.coordsArr,a=this.shadingType;return 2===a?(t=[i[0],i[1]],r=[i[2],i[3]],A=null,n=null,e="axial"):3===a?(t=[i[0],i[1]],r=[i[3],i[4]],A=i[2],n=i[5],e="radial"):j("getPattern type unknown: ".concat(a)),["RadialAxial",e,this.bbox,this.colorStops,t,r,A,n]}}])}(),ll=function(){return ol((function e(t,r){il(this,e),this.stream=t,this.context=r,this.buffer=0,this.bufferLength=0;var A=r.numComps;this.tmpCompsBuf=new Float32Array(A);var n=r.colorSpace.numComps;this.tmpCsCompsBuf=r.colorFn?new Float32Array(n):this.tmpCompsBuf}),[{key:"hasData",get:function(){if(this.stream.end)return this.stream.pos0)return!0;var e=this.stream.getByte();return!(e<0||(this.buffer=e,this.bufferLength=8,0))}},{key:"readBits",value:function(e){var t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var A=this.stream.getByte();return this.buffer=A&(1<>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r>r}},{key:"align",value:function(){this.buffer=0,this.bufferLength=0}},{key:"readFlag",value:function(){return this.readBits(this.context.bitsPerFlag)}},{key:"readCoordinate",value:function(){var e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),A=this.context.decode,n=e<32?1/((1<a?a:e,t=t>o?o:t,r=re.length)&&(t=e.length);for(var r=0,A=Array(t);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(i.map((function(e,t){return[e,t]})).sort((function(e,t){return nh(e,1)[0]-nh(t,1)[0]})));try{for(g.s();!(A=g.n()).done;){var u=nh(A.value,2),l=u[0],h=u[1];-1!==l&&(l===s+1?(r.push(o[h]),s+=1):(s=l,r=[o[h]],c.push(l,r)))}}catch(e){g.e(e)}finally{g.f()}return c}(e),r=new He(null);r.set("BaseFont",Ue.get(e)),r.set("Type",Ue.get("Font")),r.set("Subtype",Ue.get("CIDFontType2")),r.set("Encoding",Ue.get("Identity-H")),r.set("CIDToGIDMap",Ue.get("Identity")),r.set("W",t),r.set("FirstChar",t[0]),r.set("LastChar",t.at(-2)+t.at(-1).length-1);var A=new He(null);r.set("FontDescriptor",A);var n=new He(null);return n.set("Ordering","Identity"),n.set("Registry","Adobe"),n.set("Supplement",0),r.set("CIDSystemInfo",n),r}function gh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uh(e,t){for(var r=0;r=0&&(t>=65&&t<=90||t>=97&&t<=122);)r.push(String.fromCharCode(t));var A=r.join("");switch(A.toLowerCase()){case"if":return Bh.IF;case"ifelse":return Bh.IFELSE;default:return Bh.getOperator(A)}}},{key:"getNumber",value:function(){var e=this.currentChar,t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));var r=parseFloat(t.join(""));if(isNaN(r))throw new re("Invalid floating point number: ".concat(r));return r}}])}();function Eh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if("string"!=typeof e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}])}(),Uh=function(e){function t(){return Fh(this,t),wh(this,t,arguments)}return Dh(t,Nh),Rh(t,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if("string"!=typeof e&&!t)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(t){if(this._imageCache.has(t))return;return null!==e&&this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}])}(),Mh=function(e){function t(e){return Fh(this,t),wh(this,t,[{onlyRefs:!0}])}return Dh(t,Nh),Rh(t,[{key:"set",value:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}])}(),Jh=function(e){function t(){return Fh(this,t),wh(this,t,arguments)}return Dh(t,Nh),Rh(t,[{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if("string"!=typeof e)throw new Error('LocalGStateCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}])}(),Hh=function(e){function t(e){return Fh(this,t),wh(this,t,[{onlyRefs:!0}])}return Dh(t,Nh),Rh(t,[{key:"set",value:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}])}(),Yh=function(e){function t(e){return Fh(this,t),wh(this,t,[{onlyRefs:!0}])}return Dh(t,Nh),Rh(t,[{key:"set",value:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}])}(),Ph=new WeakMap,Oh=new WeakSet,Kh=function(){function e(){var t;Fh(this,e),dh(this,t=Oh),t.add(this),function(e,t,r){dh(e,t),t.set(e,r)}(this,Ph,new Pe),this._refCache=new Oe,this._imageCache=new Oe}return Rh(e,[{key:"shouldCache",value:function(t,r){var A=this._refCache.get(t);return A||(A=new Set,this._refCache.put(t,A)),A.add(r),!(A.size0&&void 0!==arguments[0]&&arguments[0]||(ph(Ph,this).clear(),this._refCache.clear()),this._imageCache.clear()}}])}();function Th(e){var t,r=0,A=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Eh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e._imageCache);try{for(A.s();!(t=A.n()).done;)r+=t.value.byteSize}catch(e){A.e(e)}finally{A.f()}return r}function qh(e){return!(e._imageCache.size=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function $h(e,t){if(e){if("string"==typeof e)return eI(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eI(e,t):void 0}}function eI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>s)*g,c&=(1<r?e=r:e0&&(l=c[i-1]);var h=n[1];i>1,g=n.length>>1,u=new lI(o),l=Object.create(null),h=8192,I=new Float32Array(g);return function(e,t,r,A){var n,a,o="",s=I;for(n=0;n(E=i[2*n+1]))&&(a=E),C[n]=a}h>0&&(h--,l[o]=C),r.set(C,A)}else r.set(f,A)}}}])}();function sI(e){var t;if(e instanceof He)t=e;else{if(!(e instanceof ze))return!1;t=e.dict}return t.has("FunctionType")}var cI,gI,uI=function(){function e(t){tI(this,e),this.stack=t?Array.from(t):[]}return AI(e,[{key:"push",value:function(t){if(this.stack.length>=e.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(t)}},{key:"pop",value:function(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}},{key:"copy",value:function(t){if(this.stack.length+t>=e.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");for(var r=this.stack,A=r.length-t,n=t-1;n>=0;n--,A++)r.push(r[A])}},{key:"index",value:function(e){this.push(this.stack[this.stack.length-e-1])}},{key:"roll",value:function(e,t){for(var r=this.stack,A=r.length-e,n=r.length-1,i=A+(t-Math.floor(t/e)*e),a=A,o=n;a0?n.push(r<>A);break;case"ceiling":r=n.pop(),n.push(Math.ceil(r));break;case"copy":r=n.pop(),n.copy(r);break;case"cos":r=n.pop(),n.push(Math.cos(r%360/180*Math.PI));break;case"cvi":r=0|n.pop(),n.push(r);break;case"cvr":break;case"div":A=n.pop(),r=n.pop(),n.push(r/A);break;case"dup":n.copy(1);break;case"eq":A=n.pop(),r=n.pop(),n.push(r===A);break;case"exch":n.roll(2,1);break;case"exp":A=n.pop(),r=n.pop(),n.push(Math.pow(r,A));break;case"false":n.push(!1);break;case"floor":r=n.pop(),n.push(Math.floor(r));break;case"ge":A=n.pop(),r=n.pop(),n.push(r>=A);break;case"gt":A=n.pop(),r=n.pop(),n.push(r>A);break;case"idiv":A=n.pop(),r=n.pop(),n.push(r/A|0);break;case"index":r=n.pop(),n.index(r);break;case"le":A=n.pop(),r=n.pop(),n.push(r<=A);break;case"ln":r=n.pop(),n.push(Math.log(r));break;case"log":r=n.pop(),n.push(Math.log10(r));break;case"lt":A=n.pop(),r=n.pop(),n.push(r=t?new fI(t):e.max<=t?e:new BI(e,t)}var wI=function(){return AI((function e(){tI(this,e)}),[{key:"compile",value:function(e,t,r){for(var A,n,i,a,o,s,c,g,u=[],l=[],h=t.length>>1,I=r.length>>1,f=0,C=0;Cb.min&&(F.unshift("Math.max(",D,", "),F.push(")")),S2&&void 0!==arguments[2]&&arguments[2]?r="ttb":t||(r="rtl"),{str:e,dir:r}}var NI=[],LI=[];function UI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=!0,n=e.length;if(0===n||r)return GI(e,A,r);NI.length=n,LI.length=n;var i,a,o=0;for(i=0;i4?(A=!0,t=0):(A=!1,t=1));var g=[];for(i=0;i=0&&"ET"===LI[C];--C)LI[C]="EN";for(var B=i+1;B0&&(E=LI[i-1]);var d=I;Q+1y&&DI(y)&&(v=y);for(y=p;y>=v;--y){var m=-1;for(i=0,a=g.length;i=0&&(RI(NI,m,i),m=-1):m<0&&(m=i);m>=0&&RI(NI,m,g.length)}for(i=0,a=NI.length;i"!==w||(NI[i]="")}return GI(NI.join(""),A)}function MI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||HI(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function JI(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=HI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function HI(e,t){if(e){if("string"==typeof e)return YI(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?YI(e,t):void 0}}function YI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r3&&void 0!==arguments[3])||arguments[3],g=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l={style:null,ultimate:null};if(n){var h,I=u?" ".concat(u):"",f=JI(n);try{for(f.s();!(h=f.n()).done;){var C=h.value;t.push("local(".concat(C).concat(I,")"))}}catch(e){f.e(e)}finally{f.f()}}if(A){var B=qI.get(A),Q=u||function(e){switch(e){case OI:return"Bold";case KI:return"Italic";case TI:return"Bold Italic";default:if("bold"===(null==e?void 0:e.weight))return"Bold";if("italic"===(null==e?void 0:e.style))return"Italic"}return""}(o);Object.assign(l,ZI(B,t,r,c&&!a,g&&!i,Q))}if(o&&(l.style=o),s&&(l.ultimate=s),c&&a){var E=ZI(qI.get(a),t,r,c,g&&!i,u).ultimate;l.ultimate||(l.ultimate=E)}return g&&i&&r&&t.push("url(".concat(r).concat(i,")")),l}function _I(e,t,r,A,n,i){if(A.startsWith("InvalidPDFjsFont_"))return null;"TrueType"!==i&&"Type1"!==i||!/^[A-Z]{6}\\+/.test(A)||(A=A.slice(7));var a=A=mc(A),o=e.get(a);if(o)return o;var s=qI.get(A);if(!s){var c,g=JI(jI);try{for(g.s();!(c=g.n()).done;){var u=MI(c.value,2),l=u[0],h=u[1];if(A.startsWith(l)){A="".concat(h).concat(A.substring(l.length)),s=qI.get(A);break}}}catch(e){g.e(e)}finally{g.f()}}var I=!1;s||(s=qI.get(n),I=!0);var f="".concat(t.getDocId(),"_s").concat(t.createFontId());if(!s){if(!Pt(A))return q("Cannot substitute the font because of its name: ".concat(A)),e.set(a,null),null;var C=/bold/gi.test(A),B=/oblique|italic/gi.test(A),Q=C&&B&&TI||C&&OI||B&&KI||PI;return o={css:'"'.concat(WI(A),'",').concat(f),guessFallback:!0,loadedName:f,baseFontName:A,src:"local(".concat(A,")"),style:Q},e.set(a,o),o}var E=[];I&&Pt(A)&&E.push("local(".concat(A,")"));var d=ZI(s,E,r),y=d.style,p=d.ultimate,v=null===p,m=v?"":",".concat(p);return o={css:'"'.concat(WI(A),'",').concat(f).concat(m),guessFallback:v,loadedName:f,baseFontName:A,src:E.join(","),style:y},e.set(a,o),o}function XI(){XI=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function VI(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return zI(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zI(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function zI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>3,g=c+3&-4;if(c!==g){for(var u=new Uint8Array(g*A),l=0,h=0,I=A*c;hr||t>r)return!0;var A=e*t;return this._hasMaxArea?A>this.MAX_AREA:!(A(this.MAX_AREA=Math.pow(this._goodSquareLength,2))))}},{key:"MAX_DIM",get:function(){return _(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}},{key:"MAX_AREA",get:function(){return this._hasMaxArea=!0,_(this,"MAX_AREA",Math.pow(this._guessMax(e._goodSquareLength,this.MAX_DIM,128,0),2))},set:function(e){e>=0&&(this._hasMaxArea=!0,_(this,"MAX_AREA",e))}},{key:"setMaxArea",value:function(e){this._hasMaxArea||(this.MAX_AREA=e>>2)}},{key:"_areGoodDims",value:function(e,t){try{var r=new OffscreenCanvas(e,t),A=r.getContext("2d");A.fillRect(0,0,1,1);var n=A.getImageData(0,0,1,1).data[3];return r.width=r.height=1,0!==n}catch(e){return!1}}},{key:"_guessMax",value:function(e,t,r,A){for(;e+r+11&&void 0!==n[1]&&n[1],t.abrupt("return",new e(r,A)._createImage());case 2:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]);var t,r}();function nf(e,t){for(var r=0;r>>8,t[r++]=255&i)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");r=(t=e.slice()).byteLength}for(var a=r>>2,o=r-4*a,s=new Uint32Array(t.buffer,0,a),c=0,g=0,u=this.h1,l=this.h2,h=3432918353,I=461845907,f=11601,C=13715,B=0;B>>17)*I&cf|c*C&gf)<<13|u>>>19)+3864292196:l=5*(l=(l^=g=(g=(g=(g=s[B])*h&cf|g*f&gf)<<15|g>>>17)*I&cf|g*C&gf)<<13|l>>>19)+3864292196;switch(c=0,o){case 3:c^=t[4*a+2]<<16;case 2:c^=t[4*a+1]<<8;case 1:c=(c=(c=(c^=t[4*a])*h&cf|c*f&gf)<<15|c>>>17)*I&cf|c*C&gf,1&a?u^=c:l^=c}this.h1=u,this.h2=l}},{key:"hexdigest",value:function(){var e=this.h1,t=this.h2;return e=3981806797*(e^=t>>>1)&cf|36045*e&gf,e=444984403*(e^=(t=4283543511*t&cf|(2950163797*(t<<16|e>>>16)&cf)>>>16)>>>1)&cf|60499*e&gf,((e^=(t=3301882366*t&cf|(3120437893*(t<<16|e>>>16)&cf)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}])}();function lf(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return hf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function hf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1e3&&(c=Math.max(c,l),h+=u+2,l=0,u=0),g.push({transform:f,x:l,y:h,w:C.width,h:C.height}),l+=C.width+2,u=Math.max(u,C.height)}for(var B=Math.max(c,l)+1,Q=h+u+1,E=new Uint8Array(B*Q*4),d=B<<2,y=0;y=0;)p[w-4]=p[w],p[w-3]=p[w+1],p[w-2]=p[w+2],p[w-1]=p[w+3],p[w+v]=p[w+v-4],p[w+v+1]=p[w+v-3],p[w+v+2]=p[w+v-2],p[w+v+3]=p[w+v-1],w-=d}var D={width:B,height:Q};if(e.isOffscreenCanvasSupported){var S=new OffscreenCanvas(B,Q);S.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(E.buffer),B,Q),0,0),D.bitmap=S.transferToImageBitmap(),D.data=null}else D.kind=3,D.data=E;return r.splice(i,4*s,87),A.splice(i,4*s,[D,g]),i+1})),vf(mf,[x,G,Y,R],null,(function(e,t){var r=e.fnArray,A=(t-(e.iCurr-3))%4;switch(A){case 0:return r[t]===x;case 1:return r[t]===G;case 2:return r[t]===Y;case 3:return r[t]===R}throw new Error("iterateImageMaskGroup - invalid pos: ".concat(A))}),(function(e,t){var r=e.fnArray,A=e.argsArray,n=e.iCurr,i=n-3,a=n-2,o=n-1,s=Math.floor((t-i)/4);if(s<10)return t-(t-i)%4;var c,g,u=!1,l=A[o][0],h=A[a][0],I=A[a][1],f=A[a][2],C=A[a][3];if(I===f){u=!0,c=a+4;for(var B=o+4,Q=1;Q=4&&r[i-4]===r[a]&&r[i-3]===r[o]&&r[i-2]===r[s]&&r[i-1]===r[c]&&A[i-4][0]===g&&A[i-4][1]===u&&(l++,h-=5);for(var I=h+4,f=1;f=(r=e.length))break}(A=(A||mf)[e[t]])&&!Array.isArray(A)?(i.iCurr=t,t++,!A.checkFn||(0,A.checkFn)(i)?(n=A,A=null):A=null):t++}this.state=A,this.match=n,this.lastProcessed=t}else this.lastProcessed=r}},{key:"flush",value:function(){for(;this.match;){var e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e),this.match=null,this.state=null,this._optimize()}}},{key:"reset",value:function(){this.state=null,this.match=null,this.lastProcessed=0}}])}(),kf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;Ef(this,e),this._streamSink=r,this.fnArray=[],this.argsArray=[],this.optimizer=!r||256&t?new wf(this):new bf(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=r?null:Promise.resolve()}return yf(e,[{key:"isOffscreenCanvasSupported",set:function(e){this.optimizer.isOffscreenCanvasSupported=e}},{key:"length",get:function(){return this.argsArray.length}},{key:"ready",get:function(){return this._resolved||this._streamSink.ready}},{key:"totalLength",get:function(){return this._totalLength+this.length}},{key:"addOp",value:function(t,r){this.optimizer.push(t,r),this.weight++,this._streamSink&&(this.weight>=e.CHUNK_SIZE||this.weight>=e.CHUNK_SIZE_ABOUT&&(t===R||32===t))&&this.flush()}},{key:"addImageOps",value:function(e,t,r){void 0!==r&&this.addOp(J,["OC",r]),this.addOp(e,t),void 0!==r&&this.addOp(H,[])}},{key:"addDependency",value:function(e){this.dependencies.has(e)||(this.dependencies.add(e),this.addOp(1,[e]))}},{key:"addDependencies",value:function(e){var t,r=lf(e);try{for(r.s();!(t=r.n()).done;){var A=t.value;this.addDependency(A)}}catch(e){r.e(e)}finally{r.f()}}},{key:"addOpList",value:function(t){if(t instanceof e){var r,A=lf(t.dependencies);try{for(A.s();!(r=A.n()).done;){var n=r.value;this.dependencies.add(n)}}catch(e){A.e(e)}finally{A.f()}for(var i=0,a=t.length;i0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.optimizer.flush();var r=this.length;this._totalLength+=r,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,separateAnnots:t,length:r},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}}])}();function Df(){Df=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Sf(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Ff(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Sf(i,A,n,a,o,"next",e)}function o(e){Sf(i,A,n,a,o,"throw",e)}a(void 0)}))}}function xf(e,t){for(var r=0;rA&&(e=A),e}function Nf(e,t,r,A,n,i){var a,o=n*i;a=t<=8?new Uint8Array(o):t<=16?new Uint16Array(o):new Uint32Array(o);var s,c,g,u,l=r/n,h=A/i,I=0,f=new Uint16Array(n),C=r;for(s=0;s0&&Number.isInteger(n.height)&&n.height>0&&(n.width!==d||n.height!==y)&&(q("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),d=n.width,y=n.height),d<1||y<1)throw new re("Invalid image width: ".concat(d," or height: ").concat(y));this.width=d,this.height=y,this.interpolate=C.get("I","Interpolate"),this.imageMask=C.get("IM","ImageMask")||!1,this.matte=C.get("Matte")||!1;var p=n.bitsPerComponent;if(!p&&!(p=C.get("BPC","BitsPerComponent"))){if(!this.imageMask)throw new re("Bits per component missing in image: ".concat(this.imageMask));p=1}if(this.bpc=p,!this.imageMask){var v,m=C.getRaw("CS")||C.getRaw("ColorSpace"),w=!!m;if(w)null!==(v=this.jpxDecoderOptions)&&void 0!==v&&v.smaskInData&&(m=Ue.get("DeviceRGBA"));else if(this.jpxDecoderOptions)m=Ue.get("DeviceRGBA");else switch(n.numComps){case 1:m=Ue.get("DeviceGray");break;case 3:m=Ue.get("DeviceRGB");break;case 4:m=Ue.get("DeviceCMYK");break;default:throw new Error("Images with ".concat(n.numComps," color components not supported."))}this.colorSpace=Ur.parse({cs:m,xref:r,resources:a?A:null,pdfFunctionFactory:h,localColorSpaceCache:I}),this.numComps=this.colorSpace.numComps,this.jpxDecoderOptions&&(this.jpxDecoderOptions.numComponents=w?this.numComp:0,this.jpxDecoderOptions.isIndexedColormap="Indexed"===this.colorSpace.name)}if(this.decode=C.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,p)||l&&!Ur.isDefaultDecode(this.decode,1))){var b;this.needsDecode=!0;var k=(1<>7&1,r[l+1]=c>>6&1,r[l+2]=c>>5&1,r[l+3]=c>>4&1,r[l+4]=c>>3&1,r[l+5]=c>>2&1,r[l+6]=c>>1&1,r[l+7]=1&c,l+=8;if(l>=1}else{var B=0;for(c=0,l=0,s=a;l>Q;E<0?E=0:E>u&&(E=u),r[l]=E,c&=(1<s[E+1])){t.next=37;break}return C=255,t.abrupt("break",40);case 37:++I,t.next=31;break;case 40:c[l]=C;case 41:++l,t.next=27;break;case 44:t.next=47;break;case 46:throw new re("Unknown mask format.");case 47:if(c)for(l=0,I=3,h=A*i;l0&&void 0!==x[0]&&x[0],r=x.length>1&&void 0!==x[1]&&x[1],A=this.drawWidth,n=this.drawHeight,i={width:A,height:n,interpolate:this.interpolate,kind:0,data:null},a=this.numComps,o=this.width,s=this.height,c=this.bpc,g=o*a*c+7>>3,u=r&&Af.needsToBeResized(A,n),"DeviceRGBA"!==this.colorSpace.name){e.next=21;break}return i.kind=3,e.next=15,this.getImageBytes(s*o*4,{});case 15:if(l=i.data=e.sent,!r){e.next=20;break}if(u){e.next=19;break}return e.abrupt("return",this.createBitmap(3,A,n,l));case 19:return e.abrupt("return",Af.createImage(i,!1));case 20:return e.abrupt("return",i);case 21:if(t){e.next=68;break}if("DeviceGray"===this.colorSpace.name&&1===c?h=1:"DeviceRGB"!==this.colorSpace.name||8!==c||this.needsDecode||(h=2),!h||this.smask||this.mask||A!==o||n!==s){e.next=35;break}return e.next=26,this.getImageBytes(s*g,{});case 26:if(I=e.sent,!r){e.next=31;break}if(!u){e.next=30;break}return e.abrupt("return",Af.createImage({data:I,kind:h,width:A,height:n,interpolate:this.interpolate},this.needsDecode));case 30:return e.abrupt("return",this.createBitmap(h,o,s,I));case 31:if(i.kind=h,i.data=I,this.needsDecode)for(W(1===h,"PDFImage.createImageData: The image must be grayscale."),f=i.data,C=0,B=f.length;C>3,e.next=9,this.getImageBytes(n*a,{internal:!0});case 9:if(o=e.sent,s=this.getComponents(o),1!==i){e.next=15;break}if(g=A*n,this.needsDecode)for(c=0;c>2,c=new Uint32Array(t.buffer,A,s);if(se.isLittleEndian){for(;o>>24|u<<8|4278190080,n[a+2]=u>>>16|l<<16|4278190080,n[a+3]=l>>>8|4278190080}for(var h=4*o,I=t.length;h>>8|255,n[a+2]=C<<16|B>>>16|255,n[a+3]=B<<8|255}for(var Q=4*o,E=t.length;Q>3)*i,g=A.byteLength;if(!a||o&&c!==g?o?((t=new Uint8Array(c)).set(A),t.fill(255,g)):t=new Uint8Array(A):t=A,o)for(r=0;r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Hf(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Yf(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Hf(i,A,n,a,o,"next",e)}function o(e){Hf(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Pf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Of(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Wf(e,t){if(e){if("string"==typeof e)return Zf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zf(e,t):void 0}}function Zf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]&&arguments[1];if(Array.isArray(e)){var r,A=jf(e);try{for(A.s();!(r=A.n()).done;){var n=Vf(r.value,!0);if(n)return n}}catch(e){A.e(e)}finally{A.f()}return q("Unsupported blend mode Array: ".concat(e)),"source-over"}if(!(e instanceof Ue))return t?null:"source-over";switch(e.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return t?null:(q("Unsupported blend mode: ".concat(e.name)),"source-over")}function zf(e,t){var r;t.objId&&e.addDependency(t.objId),e.addImageOps(t.fn,t.args,t.optionalContent),t.fn===Y&&(null===(r=t.args[0])||void 0===r?void 0:r.count)>0&&t.args[0].count++}var $f=function(){function e(){Pf(this,e),this.reset()}return Kf(e,[{key:"check",value:function(){return!(++this.checked0&&void 0!==arguments[0]?arguments[0]:null,t=Object.create(this);return t.options=Object.assign(Object.create(null),this.options,e),t}},{key:"hasBlendModes",value:function(e,t){if(!(e instanceof He))return!1;if(e.objId&&t.has(e.objId))return!1;var r=new Pe(t);e.objId&&r.put(e.objId);for(var A=[e],n=this.xref;A.length;){var i=A.shift(),a=i.get("ExtGState");if(a instanceof He){var o,s=jf(a.getRawValues());try{for(s.s();!(o=s.n()).done;){var c=o.value;if(c instanceof Ye){if(r.has(c))continue;try{c=n.fetch(c)}catch(e){r.put(c),T('hasBlendModes - ignoring ExtGState: "'.concat(e,'".'));continue}}if(c instanceof He){c.objId&&r.put(c.objId);var g=c.get("BM");if(g instanceof Ue){if("Normal"!==g.name)return!0}else if(void 0!==g&&Array.isArray(g)){var u,l=jf(g);try{for(l.s();!(u=l.n()).done;){var h=u.value;if(h instanceof Ue&&"Normal"!==h.name)return!0}}catch(e){l.e(e)}finally{l.f()}}}}}catch(e){s.e(e)}finally{s.f()}}var I=i.get("XObject");if(I instanceof He){var f,C=jf(I.getRawValues());try{for(C.s();!(f=C.n()).done;){var B=f.value;if(B instanceof Ye){if(r.has(B))continue;try{B=n.fetch(B)}catch(e){r.put(B),T('hasBlendModes - ignoring XObject: "'.concat(e,'".'));continue}}if(B instanceof ze){B.dict.objId&&r.put(B.dict.objId);var Q=B.dict.get("Resources");Q instanceof He&&(Q.objId&&r.has(Q.objId)||(A.push(Q),Q.objId&&r.put(Q.objId)))}}}catch(e){C.e(e)}finally{C.f()}}}var E,d=jf(r);try{for(d.s();!(E=d.n()).done;){var y=E.value;t.put(y)}}catch(e){d.e(e)}finally{d.f()}return!1}},{key:"fetchBuiltInCMap",value:(u=Yf(Jf().mark((function e(t){var r,A,n,i;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.builtInCMapCache.get(t))){e.next=3;break}return e.abrupt("return",r);case 3:if(null===this.options.cMapUrl){e.next=19;break}return n="".concat(this.options.cMapUrl).concat(t,".bcmap"),e.next=7,fetch(n);case 7:if((i=e.sent).ok){e.next=10;break}throw new Error('fetchBuiltInCMap: failed to fetch file "'.concat(n,'" with "').concat(i.statusText,'".'));case 10:return e.t0=Uint8Array,e.next=13,i.arrayBuffer();case 13:e.t1=e.sent,e.t2=new e.t0(e.t1),e.t3=F.BINARY,A={cMapData:e.t2,compressionType:e.t3},e.next=22;break;case 19:return e.next=21,this.handler.sendWithPromise("FetchBuiltInCMap",{name:t});case 21:A=e.sent;case 22:return A.compressionType!==F.NONE&&this.builtInCMapCache.set(t,A),e.abrupt("return",A);case 24:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"fetchStandardFontData",value:(g=Yf(Jf().mark((function e(t){var r,A,n,i,a,o;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.standardFontDataCache.get(t))){e.next=3;break}return e.abrupt("return",new ar(r));case 3:if(!this.options.useSystemFonts||"Symbol"===t||"ZapfDingbats"===t){e.next=5;break}return e.abrupt("return",null);case 5:if(A=kc(),n=A[t],null===this.options.standardFontDataUrl){e.next=22;break}return a="".concat(this.options.standardFontDataUrl).concat(n),e.next=10,fetch(a);case 10:if((o=e.sent).ok){e.next=15;break}q('fetchStandardFontData: failed to fetch file "'.concat(a,'" with "').concat(o.statusText,'".')),e.next=20;break;case 15:return e.t0=Uint8Array,e.next=18,o.arrayBuffer();case 18:e.t1=e.sent,i=new e.t0(e.t1);case 20:e.next=31;break;case 22:return e.prev=22,e.next=25,this.handler.sendWithPromise("FetchStandardFontData",{filename:n});case 25:i=e.sent,e.next=31;break;case 28:e.prev=28,e.t2=e.catch(22),q('fetchStandardFontData: failed to fetch file "'.concat(n,'" with "').concat(e.t2,'".'));case 31:if(i){e.next=33;break}return e.abrupt("return",null);case 33:return this.standardFontDataCache.set(t,i),e.abrupt("return",new ar(i));case 35:case"end":return e.stop()}}),e,this,[[22,28]])}))),function(e){return g.apply(this,arguments)})},{key:"buildFormXObject",value:(c=Yf(Jf().mark((function e(t,r,A,n,i,a,o){var s,c,g,u,l,h,I,f,C,B,Q;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.dict,c=Ft(s.getArray("Matrix"),null),g=Rt(s.getArray("BBox"),null),!s.has("OC")){e.next=7;break}return e.next=6,this.parseMarkedContentProps(s.get("OC"),t);case 6:u=e.sent;case 7:if(void 0!==u&&n.addOp(J,["OC",u]),!(h=s.get("Group"))){e.next=28;break}if(l={matrix:c,bbox:g,smask:A,isolated:!1,knockout:!1},I=h.get("S"),f=null,!Ke(I,"Transparency")){e.next=26;break}if(l.isolated=h.get("I")||!1,l.knockout=h.get("K")||!1,!h.has("CS")){e.next=26;break}if(C=h.getRaw("CS"),!(B=Ur.getCached(C,this.xref,o))){e.next=23;break}f=B,e.next=26;break;case 23:return e.next=25,this.parseColorSpace({cs:C,resources:t,localColorSpaceCache:o});case 25:f=e.sent;case 26:null!=A&&A.backdrop&&(f||(f=Ur.singletons.rgb),A.backdrop=f.getRgb(A.backdrop,0)),n.addOp(76,[l]);case 28:return Q=h?[c,null]:[c,g],n.addOp(74,Q),e.next=32,this.getOperatorList({stream:r,task:i,resources:s.get("Resources")||t,operatorList:n,initialState:a});case 32:n.addOp(75,[]),h&&n.addOp(77,[l]),void 0!==u&&n.addOp(H,[]);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t,r,A,n,i,a){return c.apply(this,arguments)})},{key:"_sendImgData",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=t?[t.bitmap||t.data.buffer]:null;return this.parsingType3Font||r?this.handler.send("commonobj",[e,"Image",t],A):this.handler.send("obj",[e,this.pageIndex,"Image",t],A)}},{key:"buildPaintImageXObject",value:(s=Yf(Jf().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p,v,m,w,b,k,D,S,F,x,R,G=this;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.resources,A=t.image,n=t.isInline,i=void 0!==n&&n,a=t.operatorList,o=t.cacheKey,s=t.localImageCache,c=t.localColorSpaceCache,g=A.dict,u=g.objId,l=g.get("W","Width"),h=g.get("H","Height"),l&&"number"==typeof l&&h&&"number"==typeof h){e.next=8;break}return q("Image dimensions are missing, or not numbers."),e.abrupt("return");case 8:if(!(-1!==(I=this.options.maxImageSize)&&l*h>I)){e.next=15;break}if(f="Image exceeded maximum allowed size and was removed.",!this.options.ignoreErrors){e.next=14;break}return q(f),e.abrupt("return");case 14:throw new Error(f);case 15:if(!g.has("OC")){e.next=19;break}return e.next=18,this.parseMarkedContentProps(g.get("OC"),r);case 18:C=e.sent;case 19:if(!g.get("IM","ImageMask")){e.next=47;break}if(E=g.get("I","Interpolate"),d=l+7>>3,y=A.getBytes(d*h),p=g.getArray("D","Decode"),!this.parsingType3Font){e.next=32;break}return(B=Lf.createRawMask({imgArray:y,width:l,height:h,imageIsFromDecodeStream:A instanceof XA,inverseDecode:(null==p?void 0:p[0])>0,interpolate:E})).cached=!!o,Q=[B],a.addImageOps(Y,Q,C),o&&(v={fn:Y,args:Q,optionalContent:C},s.set(o,u,v),u&&this._regionalImageCache.set(null,u,v)),e.abrupt("return");case 32:return e.next=34,Lf.createMask({imgArray:y,width:l,height:h,imageIsFromDecodeStream:A instanceof XA,inverseDecode:(null==p?void 0:p[0])>0,interpolate:E,isOffscreenCanvasSupported:this.options.isOffscreenCanvasSupported});case 34:if(!(B=e.sent).isSingleOpaquePixel){e.next=39;break}return a.addImageOps(90,[],C),o&&(m={fn:90,args:[],optionalContent:C},s.set(o,u,m),u&&this._regionalImageCache.set(null,u,m)),e.abrupt("return");case 39:return w="mask_".concat(this.idFactory.createObjId()),a.addDependency(w),B.dataLen=B.bitmap?B.width*B.height*4:B.data.length,this._sendImgData(w,B),Q=[{data:w,width:B.width,height:B.height,interpolate:B.interpolate,count:1}],a.addImageOps(Y,Q,C),o&&(b={objId:w,fn:Y,args:Q,optionalContent:C},s.set(o,u,b),u&&this._regionalImageCache.set(null,u,b)),e.abrupt("return");case 47:if(!(i&&l+h<200)||g.has("SMask")||g.has("Mask")){e.next=65;break}return e.prev=49,k=new Lf({xref:this.xref,res:r,image:A,isInline:i,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:c}),e.next=53,k.createImageData(!0,!1);case 53:B=e.sent,a.isOffscreenCanvasSupported=this.options.isOffscreenCanvasSupported,a.addImageOps(86,[B],C),e.next=64;break;case 58:if(e.prev=58,e.t0=e.catch(49),D='Unable to decode inline image: "'.concat(e.t0,'".'),this.options.ignoreErrors){e.next=63;break}throw new Error(D);case 63:q(D);case 64:return e.abrupt("return");case 65:if(S="img_".concat(this.idFactory.createObjId()),F=!1,this.parsingType3Font?S="".concat(this.idFactory.getDocId(),"_type3_").concat(S):o&&u&&(F=this.globalImageCache.shouldCache(u,this.pageIndex))&&(W(!i,"Cannot cache an inline image globally."),S="".concat(this.idFactory.getDocId(),"_").concat(S)),a.addDependency(S),Q=[S,l,h],a.addImageOps(P,Q,C),!F){e.next=83;break}if(!this.globalImageCache.hasDecodeFailed(u)){e.next=75;break}return this.globalImageCache.setData(u,{objId:S,fn:P,args:Q,optionalContent:C,byteSize:0}),this._sendImgData(S,null,F),e.abrupt("return");case 75:if(!(l*h>25e4||g.has("SMask")||g.has("Mask"))){e.next=83;break}return e.next=78,this.handler.sendWithPromise("commonobj",[S,"CopyLocalImage",{imageRef:u}]);case 78:if(!(x=e.sent)){e.next=83;break}return this.globalImageCache.setData(u,{objId:S,fn:P,args:Q,optionalContent:C,byteSize:0}),this.globalImageCache.addByteSize(u,x),e.abrupt("return");case 83:Lf.buildImage({xref:this.xref,res:r,image:A,isInline:i,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:c}).then(function(){var e=Yf(Jf().mark((function e(t){return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.createImageData(!1,G.options.isOffscreenCanvasSupported);case 2:return(B=e.sent).dataLen=B.bitmap?B.width*B.height*4:B.data.length,B.ref=u,F&&G.globalImageCache.addByteSize(u,B.dataLen),e.abrupt("return",G._sendImgData(S,B,F));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){return q('Unable to decode image "'.concat(S,'": "').concat(e,'".')),u&&G.globalImageCache.addDecodeFailed(u),G._sendImgData(S,null,F)})),o&&(R={objId:S,fn:P,args:Q,optionalContent:C},s.set(o,u,R),u&&(this._regionalImageCache.set(null,u,R),F&&this.globalImageCache.setData(u,{objId:S,fn:P,args:Q,optionalContent:C,byteSize:0})));case 85:case"end":return e.stop()}}),e,this,[[49,58]])}))),function(e){return s.apply(this,arguments)})},{key:"handleSMask",value:function(e,t,r,A,n,i){var a=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},s=e.get("TR");if(sI(s)){for(var c=this._pdfFunctionFactory.create(s),g=new Uint8Array(256),u=new Float32Array(1),l=0;l<256;l++)u[0]=l/255,c(u,0,u,0),g[l]=255*u[0]|0;o.transferMap=g}return this.buildFormXObject(t,a,o,r,A,n.state.clone(),i)}},{key:"handleTransferFunction",value:function(e){var t;if(Array.isArray(e))t=e;else{if(!sI(e))return null;t=[e]}var r,A=[],n=0,i=0,a=jf(t);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=this.xref.fetchIfRef(o);if(n++,Ke(s,"Identity"))A.push(null);else{if(!sI(s))return null;for(var c=this._pdfFunctionFactory.create(s),g=new Uint8Array(256),u=new Float32Array(1),l=0;l<256;l++)u[0]=l/255,c(u,0,u,0),g[l]=255*u[0]|0;A.push(g),i++}}}catch(e){a.e(e)}finally{a.f()}return 1!==n&&4!==n||0===i?null:A}},{key:"handleTilingType",value:function(e,t,r,A,n,i,a,o){var s=this,c=new kf,g=He.merge({xref:this.xref,dictArray:[n.get("Resources"),r]});return this.getOperatorList({stream:A,task:a,resources:g,operatorList:c}).then((function(){var r=c.getIR(),A=Bl(r,n,t);i.addDependencies(c.dependencies),i.addOp(e,A),n.objId&&o.set(null,n.objId,{operatorListIR:r,dict:n})})).catch((function(e){if(!(e instanceof Ae)){if(!s.options.ignoreErrors)throw e;q('handleTilingType - ignoring pattern: "'.concat(e,'".'))}}))}},{key:"handleSetFont",value:(o=Yf(Jf().mark((function e(t,r,A,n,i,a){var o,s,c,g,u=arguments;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u.length>6&&void 0!==u[6]?u[6]:null,s=u.length>7&&void 0!==u[7]?u[7]:null,c=(null==r?void 0:r[0])instanceof Ue?r[0].name:null,e.next=5,this.loadFont(c,A,t,o,s);case 5:if(!(g=e.sent).font.isType3Font){e.next=16;break}return e.prev=7,e.next=10,g.loadType3Data(this,t,i);case 10:n.addDependencies(g.type3Dependencies),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),g=new tC({loadedName:"g_font_error",font:new _u("Type3 font load error: ".concat(e.t0)),dict:g.font,evaluatorOptions:this.options});case 16:return a.font=g.font,g.send(this.handler),e.abrupt("return",g.loadedName);case 19:case"end":return e.stop()}}),e,this,[[7,13]])}))),function(e,t,r,A,n,i){return o.apply(this,arguments)})},{key:"handleText",value:function(t,r){var A=r.font,n=A.charsToGlyphs(t);return A.data&&(4&r.textRenderingMode||"Pattern"===r.fillColorSpace.name||A.disableFontFace||this.options.disableFontFace)&&e.buildFontPaths(A,n,this.handler,this.options),n}},{key:"ensureStateFont",value:function(e){if(!e.font){var t=new re("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw t;q('ensureStateFont: "'.concat(t,'".'))}}},{key:"setGState",value:(a=Yf(Jf().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B=this;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.resources,A=t.gState,n=t.operatorList,i=t.cacheKey,a=t.task,o=t.stateManager,s=t.localGStateCache,c=t.localColorSpaceCache,g=A.objId,u=!0,l=[],h=Promise.resolve(),I=jf(A.getKeys()),e.prev=6,C=Jf().mark((function e(){var t,i,s;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=f.value,i=A.get(t),e.t0=t,e.next="Type"===e.t0?5:"LW"===e.t0||"LC"===e.t0||"LJ"===e.t0||"ML"===e.t0||"D"===e.t0||"RI"===e.t0||"FL"===e.t0||"CA"===e.t0||"ca"===e.t0?6:"Font"===e.t0?8:"BM"===e.t0?11:"SMask"===e.t0?13:"TR"===e.t0?18:"OP"===e.t0||"op"===e.t0||"OPM"===e.t0||"BG"===e.t0||"BG2"===e.t0||"UCR"===e.t0||"UCR2"===e.t0||"TR2"===e.t0||"HT"===e.t0||"SM"===e.t0||"SA"===e.t0||"AIS"===e.t0||"TK"===e.t0?21:23;break;case 5:return e.abrupt("break",25);case 6:return l.push([t,i]),e.abrupt("break",25);case 8:return u=!1,h=h.then((function(){return B.handleSetFont(r,null,i[0],n,a,o.state).then((function(e){n.addDependency(e),l.push([t,[e,i[1]]])}))})),e.abrupt("break",25);case 11:return l.push([t,Vf(i)]),e.abrupt("break",25);case 13:if(!Ke(i,"None")){e.next=16;break}return l.push([t,!1]),e.abrupt("break",25);case 16:return i instanceof He?(u=!1,h=h.then((function(){return B.handleSMask(i,r,n,a,o,c)})),l.push([t,!0])):q("Unsupported SMask type"),e.abrupt("break",25);case 18:return s=B.handleTransferFunction(i),l.push([t,s]),e.abrupt("break",25);case 21:return T("graphic state operator "+t),e.abrupt("break",25);case 23:return T("Unknown graphic state operator "+t),e.abrupt("break",25);case 25:case"end":return e.stop()}}),e)})),I.s();case 9:if((f=I.n()).done){e.next=13;break}return e.delegateYield(C(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),I.e(e.t1);case 18:return e.prev=18,I.f(),e.finish(18);case 21:return e.next=23,h;case 23:l.length>0&&n.addOp(9,[l]),u&&s.set(i,g,l);case 25:case"end":return e.stop()}}),e,null,[[6,15,18,21]])}))),function(e){return a.apply(this,arguments)})},{key:"loadFont",value:function(t,r,A){var n,i,a=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,c=function(){var e=Yf(Jf().mark((function e(){return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new tC({loadedName:"g_font_error",font:new _u('Font "'.concat(t,'" is not available.')),dict:r,evaluatorOptions:a.options}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if(r)r instanceof Ye&&(i=r);else{var g=A.get("Font");g&&(i=g.getRaw(t))}if(i){var u;if(null!==(u=this.type3FontRefs)&&void 0!==u&&u.has(i))return c();if(this.fontCache.has(i))return this.fontCache.get(i);try{r=this.xref.fetchIfRef(i)}catch(e){q('loadFont - lookup failed: "'.concat(e,'".'))}}if(!(r instanceof He)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return q('Font "'.concat(t,'" is not available.')),c();q('Font "'.concat(t,'" is not available -- attempting to fallback to a default font.')),r=o||e.fallbackFontDict}if(r.cacheKey&&this.fontCache.has(r.cacheKey))return this.fontCache.get(r.cacheKey);var l,h=Promise.withResolvers(),I=h.promise,f=h.resolve;try{(l=this.preEvaluateFont(r)).cssFontInfo=s}catch(e){return q('loadFont - preEvaluateFont failed: "'.concat(e,'".')),c()}var C,B=l,Q=B.descriptor,E=B.hash,d=i instanceof Ye;if(E&&Q instanceof He){var y=Q.fontAliases||(Q.fontAliases=Object.create(null));if(y[E]){var p=y[E].aliasRef;if(d&&p&&this.fontCache.has(p))return this.fontCache.putAlias(i,p),this.fontCache.get(i)}else y[E]={fontID:this.idFactory.createFontId()};d&&(y[E].aliasRef=i),C=y[E].fontID}else C=this.idFactory.createFontId();return W(null===(n=C)||void 0===n?void 0:n.startsWith("f"),'The "fontID" must be (correctly) defined.'),d?this.fontCache.put(i,I):(r.cacheKey="cacheKey_".concat(C),this.fontCache.put(r.cacheKey,I)),r.loadedName="".concat(this.idFactory.getDocId(),"_").concat(C),this.translateFont(l).then((function(e){f(new tC({loadedName:r.loadedName,font:e,dict:r,evaluatorOptions:a.options}))})).catch((function(e){q('loadFont - translateFont failed: "'.concat(e,'".')),f(new tC({loadedName:r.loadedName,font:new _u(e instanceof Error?e.message:e),dict:r,evaluatorOptions:a.options}))})),I}},{key:"buildPath",value:function(e,t,r){var A=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=e.length-1;if(r||(r=[]),n<0||91!==e.fnArray[n]){var i;switch(A&&(q('Encountered path operator "'.concat(t,'" inside of a text object.')),e.addOp(x,null)),t){case 19:var a=r[0]+r[2],o=r[1]+r[3];i=[Math.min(r[0],a),Math.min(r[1],o),Math.max(r[0],a),Math.max(r[1],o)];break;case 13:case 14:i=[r[0],r[1],r[0],r[1]];break;default:i=[1/0,1/0,-1/0,-1/0]}e.addOp(91,[[t],r,i]),A&&e.addOp(R,null)}else{var s,c=e.argsArray[n];c[0].push(t),(s=c[1]).push.apply(s,Mf(r));var g=c[2];switch(t){case 19:var u=r[0]+r[2],l=r[1]+r[3];g[0]=Math.min(g[0],r[0],u),g[1]=Math.min(g[1],r[1],l),g[2]=Math.max(g[2],r[0],u),g[3]=Math.max(g[3],r[1],l);break;case 13:case 14:g[0]=Math.min(g[0],r[0]),g[1]=Math.min(g[1],r[1]),g[2]=Math.max(g[2],r[0]),g[3]=Math.max(g[3],r[1])}}}},{key:"parseColorSpace",value:function(e){var t=this,r=e.cs,A=e.resources,n=e.localColorSpaceCache;return Ur.parseAsync({cs:r,xref:this.xref,resources:A,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:n}).catch((function(e){if(e instanceof Ae)return null;if(t.options.ignoreErrors)return q('parseColorSpace - ignoring ColorSpace: "'.concat(e,'".')),null;throw e}))}},{key:"parseShading",value:function(e){var t,r=e.shading,A=e.resources,n=e.localColorSpaceCache,i=e.localShadingPatternCache,a=i.get(r);if(a)return a;try{t=cl.parseShading(r,this.xref,A,this._pdfFunctionFactory,n).getIR()}catch(e){if(e instanceof Ae)return null;if(this.options.ignoreErrors)return q('parseShading - ignoring shading: "'.concat(e,'".')),i.set(r,null),null;throw e}return a="pattern_".concat(this.idFactory.createObjId()),this.parsingType3Font&&(a="".concat(this.idFactory.getDocId(),"_type3_").concat(a)),i.set(r,a),this.parsingType3Font?this.handler.send("commonobj",[a,"Pattern",t]):this.handler.send("obj",[a,this.pageIndex,"Pattern",t]),a}},{key:"handleColorN",value:function(e,t,r,A,n,i,a,o,s,c){var g=r.pop();if(g instanceof Ue){var u=n.getRaw(g.name),l=u instanceof Ye&&s.getByRef(u);if(l)try{var h=A.base?A.base.getRgb(r,0):null,I=Bl(l.operatorListIR,l.dict,h);return void e.addOp(t,I)}catch(e){}var f=this.xref.fetchIfRef(u);if(f){var C=f instanceof ze?f.dict:f,B=C.get("PatternType");if(1===B){var Q=A.base?A.base.getRgb(r,0):null;return this.handleTilingType(t,Q,i,f,C,e,a,s)}if(2===B){var E=C.get("Shading"),d=this.parseShading({shading:E,resources:i,localColorSpaceCache:o,localShadingPatternCache:c});if(d){var y=Ft(C.getArray("Matrix"),null);e.addOp(t,["Shading",d,y])}return}throw new re("Unknown PatternType: ".concat(B))}}throw new re("Unknown PatternName: ".concat(g))}},{key:"_parseVisibilityExpression",value:function(e,t,r){if(++t>10)q("Visibility expression is too deeply nested");else{var A=e.length,n=this.xref.fetchIfRef(e[0]);if(!(A<2)&&n instanceof Ue){switch(n.name){case"And":case"Or":case"Not":r.push(n.name);break;default:return void q("Invalid operator ".concat(n.name," in visibility expression"))}for(var i=1;i0)){e.next=22;break}return e.abrupt("return",{type:"OCMD",expression:s});case 22:if(c=n.get("OCGs"),!(Array.isArray(c)||c instanceof He)){e.next=29;break}if(g=[],Array.isArray(c)){u=jf(c);try{for(u.s();!(l=u.n()).done;)h=l.value,g.push(h.toString())}catch(e){u.e(e)}finally{u.f()}}else g.push(c.objId);return e.abrupt("return",{type:a,ids:g,policy:n.get("P")instanceof Ue?n.get("P").name:null,expression:null});case 29:if(!(c instanceof Ye)){e.next=31;break}return e.abrupt("return",{type:a,id:c.toString()});case 31:return e.abrupt("return",null);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getOperatorList",value:function(e){var t=this,r=e.stream,A=e.task,n=e.resources,i=e.operatorList,a=e.initialState,o=void 0===a?null:a,s=e.fallbackFontDict,c=void 0===s?null:s;if(n||(n=He.empty),o||(o=new nC),!i)throw new Error('getOperatorList: missing "operatorList" parameter');var g=this,u=this.xref,l=!1,h=new Lh,I=new Uh,f=new Jh,C=new Hh,B=new Map,Q=n.get("XObject")||He.empty,E=n.get("Pattern")||He.empty,d=new rC(o),y=new iC(r,u,d),p=new $f;function v(e){for(var t=0,r=y.savedStatesDepth;t0&&i.addOp(9,[$]),S=null;continue}}return void a(new Promise((function(e,t){if(!k)throw new re("GState must be referred to by name.");var r=n.get("ExtGState");if(!(r instanceof He))throw new re("ExtGState should be a dictionary.");var a=r.get(b);if(!(a instanceof He))throw new re("GState should be a dictionary.");g.setGState({resources:n,gState:a,operatorList:i,cacheKey:b,task:A,stateManager:d,localGStateCache:f,localColorSpaceCache:I}).then(e,t)})).catch((function(e){if(!(e instanceof Ae)){if(!g.options.ignoreErrors)throw e;q('getOperatorList - ignoring ExtGState: "'.concat(e,'".'))}})));case 13:case 14:case 15:case 16:case 17:case 18:case 19:g.buildPath(i,F,S,l);continue;case 67:case 68:case 72:case 73:continue;case J:if(!(S[0]instanceof Ue)){q("Expected name for beginMarkedContentProps arg0=".concat(S[0])),i.addOp(J,["OC",null]);continue}if("OC"===S[0].name)return void a(g.parseMarkedContentProps(S[1],n).then((function(e){i.addOp(J,["OC",e])})).catch((function(e){if(!(e instanceof Ae)){if(g.options.ignoreErrors)return q('getOperatorList - ignoring beginMarkedContentProps: "'.concat(e,'".')),void i.addOp(J,["OC",null]);throw e}})));S=[S[0].name,S[1]instanceof He?S[1].get("MCID"):null];break;default:if(null!==S){for(s=0,m=S.length;s0&&(t[3]*=r*F.fontMatrix[3])}return ge.transform(F.ctm,ge.transform(F.textMatrix,t))}function z(){if(m.initialized)return m;var e=F,t=e.font,r=e.loadedName;if(!u.has(r)&&(u.add(r),v.styles[r]={fontFamily:t.fallbackName,ascent:t.ascent,descent:t.descent,vertical:t.vertical},O.options.fontExtraProperties&&t.systemFontInfo)){var A=v.styles[r];A.fontSubstitution=t.systemFontInfo.css,A.fontSubstitutionLoadedName=t.systemFontInfo.loadedName}m.fontName=r;var n=m.transform=V();t.vertical?(m.width=m.totalWidth=Math.hypot(n[0],n[1]),m.height=m.totalHeight=0,m.vertical=!0):(m.width=m.totalWidth=0,m.height=m.totalHeight=Math.hypot(n[2],n[3]),m.vertical=!1);var i=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),a=Math.hypot(F.ctm[0],F.ctm[1]);m.textAdvanceScale=a*i;var o=F.fontSize;return m.trackingSpaceMin=o*x,m.notASpace=o*G,m.negativeSpaceMax=o*U,m.spaceInFlowMin=o*M,m.spaceInFlowMax=o*Y,m.hasEOL=!1,m.initialized=!0,m}function $(){if(m.initialized){var e=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),t=Math.hypot(F.ctm[0],F.ctm[1])*e;t!==m.textAdvanceScale&&(m.vertical?(m.totalHeight+=m.height*m.textAdvanceScale,m.height=0):(m.totalWidth+=m.width*m.textAdvanceScale,m.width=0),m.textAdvanceScale=t)}}function ee(e,t){return te.apply(this,arguments)}function te(){return(te=Yf(Jf().mark((function e(t,r){var i;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O.loadFont(t,r,n);case 2:if(!(i=e.sent).font.isType3Font){e.next=11;break}return e.prev=4,e.next=7,i.loadType3Data(O,n,A);case 7:e.next=11;break;case 9:e.prev=9,e.t0=e.catch(4);case 11:F.loadedName=i.loadedName,F.font=i.font,F.fontMatrix=i.font.fontMatrix||B;case 14:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ne(e,t,r){var A=Math.hypot(r[0],r[1]);return[(r[0]*e+r[1]*t)/A,(r[2]*e+r[3]*t)/A]}function ie(e){var t,r=V(),A=r[4],n=r[5];if(null!==(t=F.font)&&void 0!==t&&t.vertical){if(Al[2]||n+el[3])return!1}else if(A+el[2]||nl[3])return!1;if(!F.font||!m.prevTransform)return!0;var i=m.prevTransform[4],a=m.prevTransform[5];if(i===A&&a===n)return!0;var o=-1;switch(r[0]&&0===r[1]&&0===r[2]?o=r[0]>0?0:180:r[1]&&0===r[0]&&0===r[3]&&(o=r[1]>0?90:270),o){case 0:break;case 90:var s=[n,A];A=s[0],n=s[1];var c=[a,i];i=c[0],a=c[1];break;case 180:var g=[-A,-n,-i,-a];A=g[0],n=g[1],i=g[2],a=g[3];break;case 270:var u=[-n,-A];A=u[0],n=u[1];var h=[-a,-i];i=h[0],a=h[1];break;default:var I=Uf(ne(A,n,r),2);A=I[0],n=I[1];var f=Uf(ne(i,a,m.prevTransform),2);i=f[0],a=f[1]}if(F.font.vertical){var C=(a-n)/m.textAdvanceScale,B=A-i,Q=Math.sign(m.height);return C.5*m.width?(oe(),!0):(S(),ce(),!0):Math.abs(B)>m.width?(oe(),!0):(C<=Q*m.notASpace&&S(),C<=Q*m.trackingSpaceMin?D()?(S(),ce(),X({height:Math.abs(C)})):m.height+=C:se(C,m.prevTransform,Q)||(0===m.str.length?(S(),X({height:Math.abs(C)})):m.height+=C),Math.abs(B)>m.width*P&&ce(),!0)}var E=(A-i)/m.textAdvanceScale,d=n-a,y=Math.sign(m.width);return E.5*m.height?(oe(),!0):(S(),ce(),!0):Math.abs(d)>m.height?(oe(),!0):(E<=y*m.notASpace&&S(),E<=y*m.trackingSpaceMin?D()?(S(),ce(),X({width:Math.abs(E)})):m.width+=E:se(E,m.prevTransform,y)||(0===m.str.length?(S(),X({width:Math.abs(E)})):m.width+=E),Math.abs(d)>m.height*P&&ce(),!0)}function ae(e){var t=e.chars,r=e.extraSpacing,A=F.font;if(!t){var n=F.charSpacing+r;return n&&(A.vertical?F.translateTextMatrix(0,-n):F.translateTextMatrix(n*F.textHScale,0)),void(p&&ie(0))}for(var i=A.charsToGlyphs(t),a=F.fontMatrix[0]*F.fontSize,o=0,s=i.length;o0&&void 0!==arguments[0]&&arguments[0],t=v.items.length;0!==t&&(e&&t<10||(c.enqueue(v,t),v.items=[],v.styles=Object.create(null)))}var le=new $f;return new Promise((function e(t,r){var i=function(A){ue(!0),Promise.all([A,c.ready]).then((function(){try{e(t,r)}catch(e){r(e)}}),r)};A.ensureNotTerminated(),le.reset();for(var o,g={},h=[];!(o=le.check())&&(h.length=0,g.args=h,_.read(g));){var f=F;F=a.state;var B=g.fn;switch(h=g.args,0|B){case N:var E=h[0].name,y=h[1];if(F.font&&E===F.fontName&&y===F.fontSize)break;return ce(),F.fontName=E,F.fontSize=y,void i(ee(E,null));case 39:F.textRise=h[0];break;case 35:F.textHScale=h[0]/100;break;case 36:F.leading=h[0];break;case 40:F.translateTextLineMatrix(h[0],h[1]),F.textMatrix=F.textLineMatrix.slice();break;case 41:F.leading=-h[1],F.translateTextLineMatrix(h[0],h[1]),F.textMatrix=F.textLineMatrix.slice();break;case 43:F.carriageReturn();break;case 42:F.setTextMatrix(h[0],h[1],h[2],h[3],h[4],h[5]),F.setTextLineMatrix(h[0],h[1],h[2],h[3],h[4],h[5]),$();break;case 33:F.charSpacing=h[0];break;case 34:F.wordSpacing=h[0];break;case 31:F.textMatrix=C.slice(),F.textLineMatrix=C.slice();break;case 45:if(!a.state.font){O.ensureStateFont(a.state);continue}for(var m=(F.font.vertical?1:-1)*F.fontSize/1e3,w=h[0],b=0,k=w.length;b0){var x=T.join("");T.length=0,ae({chars:x,extraSpacing:0})}break;case L:if(!a.state.font){O.ensureStateFont(a.state);continue}ae({chars:h[0],extraSpacing:0});break;case 46:if(!a.state.font){O.ensureStateFont(a.state);continue}F.carriageReturn(),ae({chars:h[0],extraSpacing:0});break;case 47:if(!a.state.font){O.ensureStateFont(a.state);continue}F.wordSpacing=h[0],F.charSpacing=h[1],F.carriageReturn(),ae({chars:h[2],extraSpacing:0});break;case 66:ce(),j||(j=n.get("XObject")||He.empty);var G=h[0]instanceof Ue,U=h[0].name;if(G&&W.getByName(U))break;return void i(new Promise((function(e,t){if(!G)throw new re("XObject must be referred to by name.");var r=j.getRaw(U);if(r instanceof Ye){if(W.getByRef(r))return void e();if(O.globalImageCache.getData(r,O.pageIndex))return void e();r=K.fetch(r)}if(!(r instanceof ze))throw new re("XObject should be a stream");var i=r.dict.get("Subtype");if(!(i instanceof Ue))throw new re("XObject should have a Name subtype");if("Form"!==i.name)return W.set(U,r.dict.objId,!0),void e();var o=a.state.clone(),g=new rC(o),h=Ft(r.dict.getArray("Matrix"),null);h&&g.transform(h),ue();var f={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0,c.enqueue(e,t)},get desiredSize(){return c.desiredSize},get ready(){return c.ready}};O.getTextContent({stream:r,task:A,resources:r.dict.get("Resources")||n,stateManager:g,includeMarkedContent:s,sink:f,seenStyles:u,viewBox:l,lang:I,markedContentData:Q,disableNormalization:d,keepWhiteSpace:p}).then((function(){f.enqueueInvoked||W.set(U,r.dict.objId,!0),e()}),t)})).catch((function(e){if(!(e instanceof Ae)){if(!O.options.ignoreErrors)throw e;q('getTextContent - ignoring XObject: "'.concat(e,'".'))}})));case 9:if(G=h[0]instanceof Ue,U=h[0].name,G&&Z.getByName(U))break;return void i(new Promise((function(e,t){if(!G)throw new re("GState must be referred to by name.");var r=n.get("ExtGState");if(!(r instanceof He))throw new re("ExtGState should be a dictionary.");var A=r.get(U);if(!(A instanceof He))throw new re("GState should be a dictionary.");var i=A.get("Font");if(!i)return Z.set(U,A.objId,!0),void e();ce(),F.fontName=null,F.fontSize=i[1],ee(null,i[0]).then(e,t)})).catch((function(e){if(!(e instanceof Ae)){if(!O.options.ignoreErrors)throw e;q('getTextContent - ignoring ExtGState: "'.concat(e,'".'))}})));case 69:ce(),s&&(Q.level++,v.items.push({type:"beginMarkedContent",tag:h[0]instanceof Ue?h[0].name:null}));break;case J:if(ce(),s){Q.level++;var M=null;h[1]instanceof He&&(M=h[1].get("MCID")),v.items.push({type:"beginMarkedContentProps",id:Number.isInteger(M)?"".concat(O.idFactory.getPageObjId(),"_mc").concat(M):null,tag:h[0]instanceof Ue?h[0].name:null})}break;case H:if(ce(),s){if(0===Q.level)break;Q.level--,v.items.push({type:"endMarkedContent"})}break;case R:!f||f.font===F.font&&f.fontSize===F.fontSize&&f.fontName===F.fontName||ce()}if(v.items.length>=c.desiredSize){o=!0;break}}o?i(Xf):(ce(),ue(),t())})).catch((function(e){if(!(e instanceof Ae)){if(t.options.ignoreErrors)return q('getTextContent - ignoring errors during "'.concat(A.name,'" ')+'task: "'.concat(e,'".')),ce(),void ue();throw e}}))}},{key:"extractDataStructures",value:(n=Yf(Jf().mark((function e(t,r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A=this.xref,i=this.readToUnicode(r.toUnicode),!r.composite){e.next=15;break}(a=t.get("CIDSystemInfo"))instanceof He&&(r.cidSystemInfo={registry:Ie(a.get("Registry")),ordering:Ie(a.get("Ordering")),supplement:a.get("Supplement")}),e.prev=5,(o=t.get("CIDToGIDMap"))instanceof ze&&(n=o.getBytes()),e.next=15;break;case 10:if(e.prev=10,e.t0=e.catch(5),this.options.ignoreErrors){e.next=14;break}throw e.t0;case 14:q('extractDataStructures - ignoring CIDToGIDMap data: "'.concat(e.t0,'".'));case 15:if(s=[],c=null,!t.has("Encoding")){e.next=61;break}if(!((g=t.get("Encoding"))instanceof He)){e.next=52;break}if(c=(c=g.get("BaseEncoding"))instanceof Ue?c.name:null,!g.has("Differences")){e.next=50;break}u=g.get("Differences"),l=0,h=jf(u),e.prev=26,h.s();case 28:if((I=h.n()).done){e.next=42;break}if(f=I.value,"number"!=typeof(C=A.fetchIfRef(f))){e.next=35;break}l=C,e.next=40;break;case 35:if(!(C instanceof Ue)){e.next=39;break}s[l++]=C.name,e.next=40;break;case 39:throw new re("Invalid entry in 'Differences' array: ".concat(C));case 40:e.next=28;break;case 42:e.next=47;break;case 44:e.prev=44,e.t1=e.catch(26),h.e(e.t1);case 47:return e.prev=47,h.f(),e.finish(47);case 50:e.next=60;break;case 52:if(!(g instanceof Ue)){e.next=56;break}c=g.name,e.next=60;break;case 56:if(B="Encoding is not a Name nor a Dict",this.options.ignoreErrors){e.next=59;break}throw new re(B);case 59:q(B);case 60:"MacRomanEncoding"!==c&&"MacExpertEncoding"!==c&&"WinAnsiEncoding"!==c&&(c=null);case 61:return Q=!r.file||r.isInternalFont,E=Fc()[r.name],c&&Q&&E&&(c=null),c?r.defaultEncoding=Rs(c):(d=!!(4&r.flags),y=!!(32&r.flags),g=Ds,"TrueType"!==r.type||y||(g=Ss),(d||E)&&(g=ks,Q&&(/Symbol/i.test(r.name)?g=Fs:/Dingbats/i.test(r.name)?g=xs:/Wingdings/i.test(r.name)&&(g=Ss))),r.defaultEncoding=g),r.differences=s,r.baseEncodingName=c,r.hasEncoding=!!c||s.length>0,r.dict=t,e.next=70,i;case 70:return r.toUnicode=e.sent,e.next=73,this.buildToUnicode(r);case 73:return p=e.sent,r.toUnicode=p,n&&(r.cidToGidMap=this.readCidToGidMap(n,p)),e.abrupt("return",r);case 77:case"end":return e.stop()}}),e,this,[[5,10],[26,44,47,50]])}))),function(e,t){return n.apply(this,arguments)})},{key:"_simpleFontToUnicode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];W(!e.composite,"Must be a simple font.");var r=[],A=e.defaultEncoding.slice(),n=e.baseEncodingName,i=e.differences;for(var a in i){var o=i[a];".notdef"!==o&&(A[a]=o)}var s=lc();for(var c in A){var g=A[c];if(""!==g){var u=s[g];if(void 0===u){var l=0;switch(g[0]){case"G":3===g.length&&(l=parseInt(g.substring(1),16));break;case"g":5===g.length&&(l=parseInt(g.substring(1),16));break;case"C":case"c":if(g.length>=3&&g.length<=4){var h=g.substring(1);if(t){l=parseInt(h,16);break}if(l=+h,Number.isNaN(l)&&Number.isInteger(parseInt(h,16)))return this._simpleFontToUnicode(e,!0)}break;case"u":-1!==(u=fc(g,s))&&(l=u);break;default:switch(g){case"f_h":case"f_t":case"T_h":r[c]=g.replaceAll("_","");continue}}if(l>0&&l<=1114111&&Number.isInteger(l)){if(n&&l===+c){var I=Rs(n);if(I&&(g=I[c])){r[c]=String.fromCharCode(s[g]);continue}}r[c]=String.fromCodePoint(l)}}else r[c]=String.fromCharCode(u)}}return r}},{key:"buildToUnicode",value:(A=Yf(Jf().mark((function e(t){var r,A,n,i,a,o,s,c,g;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.hasIncludedToUnicodeMap=(null===(r=t.toUnicode)||void 0===r?void 0:r.length)>0,!t.hasIncludedToUnicodeMap){e.next=4;break}return!t.composite&&t.hasEncoding&&(t.fallbackToUnicode=this._simpleFontToUnicode(t)),e.abrupt("return",t.toUnicode);case 4:if(t.composite){e.next=6;break}return e.abrupt("return",new Yc(this._simpleFontToUnicode(t)));case 6:if(!t.composite||(!t.cMap.builtInCMap||t.cMap instanceof ns)&&("Adobe"!==(null===(A=t.cidSystemInfo)||void 0===A?void 0:A.registry)||"GB1"!==t.cidSystemInfo.ordering&&"CNS1"!==t.cidSystemInfo.ordering&&"Japan1"!==t.cidSystemInfo.ordering&&"Korea1"!==t.cidSystemInfo.ordering)){e.next=15;break}return n=t.cidSystemInfo,i=n.registry,a=n.ordering,o=Ue.get("".concat(i,"-").concat(a,"-UCS2")),e.next=11,ys.create({encoding:o,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});case 11:return s=e.sent,c=[],g=[],t.cMap.forEach((function(e,t){if(t>65535)throw new re("Max size of CID is 65,535");var r=s.lookup(t);if(r){g.length=0;for(var A=0,n=r.length;A>1;(0!==i||t.has(a))&&(r[a]=i)}return r}},{key:"extractWidths",value:function(e,t,r){var A,n=this.xref,i=[],a=0,o=[];if(r.composite){var s=e.get("DW");a="number"==typeof s?Math.ceil(s):1e3;var c=e.get("W");if(Array.isArray(c))for(var g=0,u=c.length;g1&&void 0!==arguments[1]?arguments[1]:NaN,r=ge.normalizeRect(e.argsArray[0].slice(2)),A=r[2]-r[0],n=r[3]-r[1],i=Math.hypot(A,n);0===A||0===n?(e.fnArray.splice(0,1),e.argsArray.splice(0,1)):(0===t||Math.round(i/t)>=10)&&(this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]),this._bbox[0]=Math.min(this._bbox[0],r[0]),this._bbox[1]=Math.min(this._bbox[1],r[1]),this._bbox[2]=Math.max(this._bbox[2],r[2]),this._bbox[3]=Math.max(this._bbox[3],r[3]));for(var a=0,o=e.length;a0&&void 0!==arguments[0]?arguments[0]:new nC;Pf(this,e),this.state=t,this.stateStack=[]}),[{key:"save",value:function(){var e=this.state;this.stateStack.push(this.state),this.state=e.clone()}},{key:"restore",value:function(){var e=this.stateStack.pop();e&&(this.state=e)}},{key:"transform",value:function(e){this.state.ctm=ge.transform(this.state.ctm,e)}}])}(),AC=function(){return Kf((function e(){Pf(this,e),this.ctm=new Float32Array(C),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=B,this.textMatrix=C.slice(),this.textLineMatrix=C.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}),[{key:"setTextMatrix",value:function(e,t,r,A,n,i){var a=this.textMatrix;a[0]=e,a[1]=t,a[2]=r,a[3]=A,a[4]=n,a[5]=i}},{key:"setTextLineMatrix",value:function(e,t,r,A,n,i){var a=this.textLineMatrix;a[0]=e,a[1]=t,a[2]=r,a[3]=A,a[4]=n,a[5]=i}},{key:"translateTextMatrix",value:function(e,t){var r=this.textMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}},{key:"translateTextLineMatrix",value:function(e,t){var r=this.textLineMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}},{key:"carriageReturn",value:function(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}},{key:"clone",value:function(){var e=Object.create(this);return e.textMatrix=this.textMatrix.slice(),e.textLineMatrix=this.textLineMatrix.slice(),e.fontMatrix=this.fontMatrix.slice(),e}}])}(),nC=function(){return Kf((function e(){Pf(this,e),this.ctm=new Float32Array(C),this.font=null,this.textRenderingMode=0,this._fillColorSpace=Ur.singletons.gray,this._strokeColorSpace=Ur.singletons.gray,this.patternFillColorSpace=null,this.patternStrokeColorSpace=null}),[{key:"fillColorSpace",get:function(){return this._fillColorSpace},set:function(e){this._fillColorSpace=this.patternFillColorSpace=e}},{key:"strokeColorSpace",get:function(){return this._strokeColorSpace},set:function(e){this._strokeColorSpace=this.patternStrokeColorSpace=e}},{key:"clone",value:function(){return Object.create(this)}}])}(),iC=function(){function e(t,r){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new rC;Pf(this,e),this.parser=new Jo({lexer:new Oo(t,e.opMap),xref:r}),this.stateManager=A,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}return Kf(e,[{key:"savedStatesDepth",get:function(){return this.stateManager.stateStack.length}},{key:"read",value:function(t){for(var r=t.args;;){var A=this.parser.getObj();if(A instanceof Me){var n=A.cmd,i=e.opMap[n];if(!i){q('Unknown command "'.concat(n,'".'));continue}var a=i.id,o=i.numArgs,s=null!==r?r.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=a>=13&&a<=28,i.variableArgs)s>o&&T("Command ".concat(n,": expected [0, ").concat(o,"] args, ")+"but received ".concat(s," args."));else{if(s!==o){for(var c=this.nonProcessedArgs;s>o;)c.push(r.shift()),s--;for(;se.MAX_INVALID_PATH_OPS)throw new re("Invalid ".concat(g));q("Skipping ".concat(g)),null!==r&&(r.length=0);continue}}return this.preprocessCommand(a,r),t.fn=a,t.args=r,!0}if(A===Re)return!1;if(null!==A&&(null===r&&(r=[]),r.push(A),r.length>33))throw new re("Too many arguments")}}},{key:"preprocessCommand",value:function(e,t){switch(0|e){case x:this.stateManager.save();break;case R:this.stateManager.restore();break;case G:this.stateManager.transform(t)}}}],[{key:"opMap",get:function(){return _(this,"opMap",Object.assign(Object.create(null),{w:{id:2,numArgs:1,variableArgs:!1},J:{id:3,numArgs:1,variableArgs:!1},j:{id:4,numArgs:1,variableArgs:!1},M:{id:5,numArgs:1,variableArgs:!1},d:{id:6,numArgs:2,variableArgs:!1},ri:{id:7,numArgs:1,variableArgs:!1},i:{id:8,numArgs:1,variableArgs:!1},gs:{id:9,numArgs:1,variableArgs:!1},q:{id:x,numArgs:0,variableArgs:!1},Q:{id:R,numArgs:0,variableArgs:!1},cm:{id:G,numArgs:6,variableArgs:!1},m:{id:13,numArgs:2,variableArgs:!1},l:{id:14,numArgs:2,variableArgs:!1},c:{id:15,numArgs:6,variableArgs:!1},v:{id:16,numArgs:4,variableArgs:!1},y:{id:17,numArgs:4,variableArgs:!1},h:{id:18,numArgs:0,variableArgs:!1},re:{id:19,numArgs:4,variableArgs:!1},S:{id:20,numArgs:0,variableArgs:!1},s:{id:21,numArgs:0,variableArgs:!1},f:{id:22,numArgs:0,variableArgs:!1},F:{id:22,numArgs:0,variableArgs:!1},"f*":{id:23,numArgs:0,variableArgs:!1},B:{id:24,numArgs:0,variableArgs:!1},"B*":{id:25,numArgs:0,variableArgs:!1},b:{id:26,numArgs:0,variableArgs:!1},"b*":{id:27,numArgs:0,variableArgs:!1},n:{id:28,numArgs:0,variableArgs:!1},W:{id:29,numArgs:0,variableArgs:!1},"W*":{id:30,numArgs:0,variableArgs:!1},BT:{id:31,numArgs:0,variableArgs:!1},ET:{id:32,numArgs:0,variableArgs:!1},Tc:{id:33,numArgs:1,variableArgs:!1},Tw:{id:34,numArgs:1,variableArgs:!1},Tz:{id:35,numArgs:1,variableArgs:!1},TL:{id:36,numArgs:1,variableArgs:!1},Tf:{id:N,numArgs:2,variableArgs:!1},Tr:{id:38,numArgs:1,variableArgs:!1},Ts:{id:39,numArgs:1,variableArgs:!1},Td:{id:40,numArgs:2,variableArgs:!1},TD:{id:41,numArgs:2,variableArgs:!1},Tm:{id:42,numArgs:6,variableArgs:!1},"T*":{id:43,numArgs:0,variableArgs:!1},Tj:{id:L,numArgs:1,variableArgs:!1},TJ:{id:45,numArgs:1,variableArgs:!1},"'":{id:46,numArgs:1,variableArgs:!1},'"':{id:47,numArgs:3,variableArgs:!1},d0:{id:48,numArgs:2,variableArgs:!1},d1:{id:49,numArgs:6,variableArgs:!1},CS:{id:50,numArgs:1,variableArgs:!1},cs:{id:51,numArgs:1,variableArgs:!1},SC:{id:52,numArgs:4,variableArgs:!0},SCN:{id:53,numArgs:33,variableArgs:!0},sc:{id:54,numArgs:4,variableArgs:!0},scn:{id:55,numArgs:33,variableArgs:!0},G:{id:56,numArgs:1,variableArgs:!1},g:{id:57,numArgs:1,variableArgs:!1},RG:{id:U,numArgs:3,variableArgs:!1},rg:{id:M,numArgs:3,variableArgs:!1},K:{id:60,numArgs:4,variableArgs:!1},k:{id:61,numArgs:4,variableArgs:!1},sh:{id:62,numArgs:1,variableArgs:!1},BI:{id:63,numArgs:0,variableArgs:!1},ID:{id:64,numArgs:0,variableArgs:!1},EI:{id:65,numArgs:1,variableArgs:!1},Do:{id:66,numArgs:1,variableArgs:!1},MP:{id:67,numArgs:1,variableArgs:!1},DP:{id:68,numArgs:2,variableArgs:!1},BMC:{id:69,numArgs:1,variableArgs:!1},BDC:{id:J,numArgs:2,variableArgs:!1},EMC:{id:H,numArgs:0,variableArgs:!1},BX:{id:72,numArgs:0,variableArgs:!1},EX:{id:73,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null}))}}])}();function aC(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=sC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function oC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||sC(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sC(e,t){if(e){if("string"==typeof e)return cC(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cC(e,t):void 0}}function cC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&(t.fontSize=a);break;case M:Ur.singletons.rgb.getRgbItem(A,0,t.fontColor,0);break;case 57:Ur.singletons.gray.getRgbItem(A,0,t.fontColor,0);break;case 61:Ur.singletons.cmyk.getRgbItem(A,0,t.fontColor,0)}}}catch(e){q('parseDefaultAppearance - ignoring errors: "'.concat(e,'".'))}return t}}])}();function dC(e){return new EC(e).parse()}var yC=function(e){function t(e,r,A){var n,i;return gC(this,t),(i=IC(this,t,[e])).stream=e,i.evaluatorOptions=r,i.xref=A,i.resources=null===(n=e.dict)||void 0===n?void 0:n.get("Resources"),i}return BC(t,iC),lC(t,[{key:"parse",value:function(){var e={fn:0,args:[]},t={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:Ur.singletons.gray},r=!1,A=[];try{for(;e.args.length=0,!r&&this.read(e);){var n=e.fn,i=e.args;switch(0|n){case x:A.push({scaleFactor:t.scaleFactor,fontSize:t.fontSize,fontName:t.fontName,fontColor:t.fontColor.slice(),fillColorSpace:t.fillColorSpace});break;case R:t=A.pop()||t;break;case 42:t.scaleFactor*=Math.hypot(i[0],i[1]);break;case N:var a=oC(i,2),o=a[0],s=a[1];o instanceof Ue&&(t.fontName=o.name),"number"==typeof s&&s>0&&(t.fontSize=s*t.scaleFactor);break;case 51:t.fillColorSpace=Ur.parse({cs:i[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:this._localColorSpaceCache});break;case 54:t.fillColorSpace.getRgbItem(i,0,t.fontColor,0);break;case M:Ur.singletons.rgb.getRgbItem(i,0,t.fontColor,0);break;case 57:Ur.singletons.gray.getRgbItem(i,0,t.fontColor,0);break;case 61:Ur.singletons.cmyk.getRgbItem(i,0,t.fontColor,0);break;case L:case 45:case 46:case 47:r=!0}}}catch(e){q('parseAppearanceStream - ignoring errors: "'.concat(e,'".'))}return this.stream.reset(),delete t.scaleFactor,delete t.fillColorSpace,t}},{key:"_localColorSpaceCache",get:function(){return _(this,"_localColorSpaceCache",new Uh)}},{key:"_pdfFunctionFactory",get:function(){return _(this,"_pdfFunctionFactory",new iI({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}}])}();function pC(e,t){if(e[0]===e[1]&&e[1]===e[2]){var r=e[0]/255;return"".concat(Tt(r)," ").concat(t?"g":"G")}return Array.from(e,(function(e){return Tt(e/255)})).join(" ")+" ".concat(t?"rg":"RG")}var vC=function(){function e(t,r){gC(this,e),this.xref=t,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=r;var A=new OffscreenCanvas(1,1);this.ctxMeasure=A.getContext("2d",{willReadFrequently:!0}),e._fontNameId||(e._fontNameId=1),this.fontName=Ue.get("InvalidPDFjsFont_".concat(r,"_").concat(e._fontNameId++))}return lC(e,[{key:"fontDescriptorRef",get:function(){if(!e._fontDescriptorRef){var t=new He(this.xref);t.set("Type",Ue.get("FontDescriptor")),t.set("FontName",this.fontName),t.set("FontFamily","MyriadPro Regular"),t.set("FontBBox",[0,0,0,0]),t.set("FontStretch",Ue.get("Normal")),t.set("FontWeight",400),t.set("ItalicAngle",0),e._fontDescriptorRef=this.xref.getNewPersistentRef(t)}return e._fontDescriptorRef}},{key:"descendantFontRef",get:function(){var e=new He(this.xref);e.set("BaseFont",this.fontName),e.set("Type",Ue.get("Font")),e.set("Subtype",Ue.get("CIDFontType0")),e.set("CIDToGIDMap",Ue.get("Identity")),e.set("FirstChar",this.firstChar),e.set("LastChar",this.lastChar),e.set("FontDescriptor",this.fontDescriptorRef),e.set("DW",1e3);var t,r=[],A=null,n=null,i=aC(function(e){return function(e){if(Array.isArray(e))return cC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||sC(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.widths.entries()).sort());try{for(i.s();!(t=i.n()).done;){var a=oC(t.value,2),o=a[0],s=a[1];A?o===A+n.length?n.push(s):(r.push(A,n),A=o,n=[s]):(A=o,n=[s])}}catch(e){i.e(e)}finally{i.f()}A&&r.push(A,n),e.set("W",r);var c=new He(this.xref);return c.set("Ordering","Identity"),c.set("Registry","Adobe"),c.set("Supplement",0),e.set("CIDSystemInfo",c),this.xref.getNewPersistentRef(e)}},{key:"baseFontRef",get:function(){var e=new He(this.xref);return e.set("BaseFont",this.fontName),e.set("Type",Ue.get("Font")),e.set("Subtype",Ue.get("Type0")),e.set("Encoding",Ue.get("Identity-H")),e.set("DescendantFonts",[this.descendantFontRef]),e.set("ToUnicode",Ue.get("Identity-H")),this.xref.getNewPersistentRef(e)}},{key:"resources",get:function(){var e=new He(this.xref),t=new He(this.xref);return t.set(this.fontName.name,this.baseFontRef),e.set("Font",t),e}},{key:"_createContext",value:function(){return this.widths=new Map,this.ctxMeasure.font="1000px ".concat(this.fontFamily),this.ctxMeasure}},{key:"createFontResources",value:function(e){var t,r=this._createContext(),A=aC(e.split(/\\r\\n?|\\n/));try{for(A.s();!(t=A.n()).done;){var n,i=aC(t.value.split(""));try{for(i.s();!(n=i.n()).done;){var a=n.value,o=a.charCodeAt(0);if(!this.widths.has(o)){var s=r.measureText(a),c=Math.ceil(s.width);this.widths.set(o,c),this.firstChar=Math.min(o,this.firstChar),this.lastChar=Math.max(o,this.lastChar)}}}catch(e){i.e(e)}finally{i.f()}}}catch(e){A.e(e)}finally{A.f()}return this.resources}},{key:"createAppearance",value:function(e,t,r,A,n,i){var a,o=this._createContext(),s=[],c=-1/0,g=aC(e.split(/\\r\\n?|\\n/));try{for(g.s();!(a=g.n()).done;){var u=a.value;s.push(u);var l=o.measureText(u).width;c=Math.max(c,l);var h,I=aC(Ht(u));try{for(I.s();!(h=I.n()).done;){var f=h.value,C=String.fromCodePoint(f),B=this.widths.get(f);if(void 0===B){var E=o.measureText(C);B=Math.ceil(E.width),this.widths.set(f,B),this.firstChar=Math.min(f,this.firstChar),this.lastChar=Math.max(f,this.lastChar)}}}catch(e){I.e(e)}finally{I.f()}}}catch(e){g.e(e)}finally{g.f()}c*=A/1e3;var d=oC(t,4),y=d[0],p=d[1],v=d[2]-y,m=d[3]-p;if(r%180!=0){var w=[m,v];v=w[0],m=w[1]}var b=1;c>v&&(b=v/c);var k=1,D=Q*A,S=.35*A,F=D*s.length;F>m&&(k=m/F);var x=A*Math.min(b,k),R=["q","0 0 ".concat(Tt(v)," ").concat(Tt(m)," re W n"),"BT","1 0 0 1 0 ".concat(Tt(m+S)," Tm 0 Tc ").concat(pC(n,!0)),"/".concat(this.fontName.name," ").concat(Tt(x)," Tf")],G=this.resources;if(1!==(i="number"==typeof i&&i>=0&&i<=1?i:1)){R.push("/R0 gs");var N=new He(this.xref),L=new He(this.xref);L.set("ca",i),L.set("CA",i),L.set("Type",Ue.get("ExtGState")),N.set("R0",L),G.set("ExtGState",N)}for(var U=Tt(D),M=0,J=s;M Tj"))}R.push("ET","Q");var Y=R.join("\\n"),P=new He(this.xref);if(P.set("Subtype",Ue.get("Form")),P.set("Type",Ue.get("XObject")),P.set("BBox",[0,0,v,m]),P.set("Length",Y.length),P.set("Resources",G),r){var O=_t(r,v,m);P.set("Matrix",O)}var K=new or(Y);return K.dict=P,K}}],[{key:"getFirstPositionInfo",value:function(e,t,r){var A=oC(e,4),n=A[0],i=A[1],a=A[2]-n,o=A[3]-i;if(t%180!=0){var s=[o,a];a=s[0],o=s[1]}var c=Q*r;return{coords:[0,o+.35*r-c],bbox:[0,0,a,o],matrix:0!==t?_t(t,o,c):void 0}}}])}();function mC(e,t,r){return t=bC(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wC()?Reflect.construct(t,r||[],bC(e).constructor):t.apply(e,r))}function wC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wC=function(){return!!e})()}function bC(e){return bC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bC(e)}function kC(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DC(e,t)}function DC(e,t){return DC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},DC(e,t)}function SC(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return FC(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?FC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function FC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0;){var n=t.fetchIfRef(A.shift());if(n instanceof He)if(n.has("Kids")){var i=n.get("Kids");if(!Array.isArray(i))continue;var a,o=SC(i);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(r.has(s))throw new re('Duplicate entry in "'.concat(this._type,'" tree.'));A.push(s),r.put(s)}}catch(e){o.e(e)}finally{o.f()}}else{var c=n.get(this._type);if(Array.isArray(c))for(var g=0,u=c.length;g10)return q('Search depth limit reached for "'.concat(this._type,'" tree.')),null;var n=r.get("Kids");if(!Array.isArray(n))return null;for(var i=0,a=n.length-1;i<=a;){var o=i+a>>1,s=t.fetchIfRef(n[o]),c=s.get("Limits");if(et.fetchIfRef(c[1]))){r=s;break}i=o+1}}if(i>a)return null}var g=r.get(this._type);if(Array.isArray(g))for(var u=0,l=g.length-2;u<=l;){var h=u+l>>1,I=h+(1&h),f=t.fetchIfRef(g[I]);if(ef))return g[I+1];u=I+2}}return null}},{key:"get",value:function(e){return this.xref.fetchIfRef(this.getRaw(e))}}])}(),UC=function(e){function t(e,r){return xC(this,t),mC(this,t,[e,r,"Names"])}return kC(t,LC),GC(t)}(),MC=function(e){function t(e,r){return xC(this,t),mC(this,t,[e,r,"Nums"])}return kC(t,LC),GC(t)}();function JC(){hl=Object.create(null),Ge=Object.create(null),Ne=Object.create(null),Le=Object.create(null),Ec.clear(),Va.cleanup()}function HC(e,t){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(this,KC,!1),t instanceof He&&(this.xref=r,this.root=t,t.has("FS")&&(this.fs=t.get("FS")),t.has("RF")&&q("Related file specifications are not supported"),i||(t.has("EF")?(n=this,(A=KC).set(PC(A,n),!0)):q("Non-embedded file specifications are not supported")))}),[{key:"filename",get:function(){var e="",t=OC(this.root);return t&&"string"==typeof t&&(e=Ie(t).replaceAll("\\\\\\\\","\\\\").replaceAll("\\\\/","/").replaceAll("\\\\","/")),_(this,"filename",e||"unnamed")}},{key:"content",get:function(){var e,t;if(this,!(t=KC).get(PC(t,this)))return null;this._contentRef||(this._contentRef=OC(null===(e=this.root)||void 0===e?void 0:e.get("EF")));var r=null;if(this._contentRef){var A=this.xref.fetchIfRef(this._contentRef);A instanceof ze?r=A.getBytes():q("Embedded file specification points to non-existing/invalid content")}else q("Embedded file specification does not have any content");return r}},{key:"description",get:function(){var e,t="",r=null===(e=this.root)||void 0===e?void 0:e.get("Desc");return r&&"string"==typeof r&&(t=Ie(r)),_(this,"description",t)}},{key:"serializable",get:function(){return{rawFilename:this.filename,filename:(e=this.filename,e.substring(e.lastIndexOf("/")+1)),content:this.content,description:this.description};var e}}])}();function qC(e,t,r){return t=WC(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jC()?Reflect.construct(t,r||[],WC(e).constructor):t.apply(e,r))}function jC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jC=function(){return!!e})()}function WC(e){return WC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},WC(e)}function ZC(e,t){return ZC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ZC(e,t)}function _C(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=VC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function XC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||VC(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VC(e,t){if(e){if("string"==typeof e)return zC(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zC(e,t):void 0}}function zC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return t.onResolveEntity(r)}))}},{key:"_parseContent",value:function(e,t){var r=[],A=t;function n(){for(;A"!==e[A]&&"/"!==e[A];)++A;var i=e.substring(t,A);for(n();A"!==e[A]&&"/"!==e[A]&&"?"!==e[A];){n();for(var a,o="";A"!==e[r]&&"?"!==e[r]&&"/"!==e[r];)++r;var A=e.substring(t,r);!function(){for(;r"!==e[r+1]);)++r;return{name:A,value:e.substring(n,r),parsed:r-t}}},{key:"parseXml",value:function(e){for(var t=0;t",r))<0)return void this.onError(-9);this.onEndElement(e.substring(r,A)),r=A+1;break;case"?":++r;var n=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+n.parsed,r+n.parsed+2))return void this.onError(-3);this.onPi(n.name,n.value),r+=n.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if((A=e.indexOf("--\\x3e",r+3))<0)return void this.onError(-5);this.onComment(e.substring(r+3,A)),r=A+3}else if("[CDATA["===e.substring(r+1,r+8)){if((A=e.indexOf("]]>",r+8))<0)return void this.onError(-2);this.onCdata(e.substring(r+8,A)),r=A+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(-6);var i=e.indexOf("[",r+8),a=!1;if((A=e.indexOf(">",r+8))<0)return void this.onError(-4);if(i>0&&A>i){if((A=e.indexOf("]>",r+8))<0)return void this.onError(-4);a=!0}var o=e.substring(r+8,A+(a?1:0));this.onDoctype(o),r=A+(a?2:1)}break;default:var s=this._parseContent(e,r);if(null===s)return void this.onError(-6);var c=!1;if("/>"===e.substring(r+s.parsed,r+s.parsed+2))c=!0;else if(">"!==e.substring(r+s.parsed,r+s.parsed+1))return void this.onError(-9);this.onBeginElement(s.name,s.attributes,c),r+=s.parsed+(c?2:1)}}else{for(;r0}},{key:"searchNode",value:function(e,t){if(t>=e.length)return this;var r=e[t];if(r.name.startsWith("#")&&t0)A.push([n,0]),n=n.childNodes[0];else{if(0===A.length)return null;for(;0!==A.length;){var u=XC(A.pop(),2),l=u[0],h=u[1]+1;if(h");var n,i=_C(this.childNodes);try{for(i.s();!(n=i.n()).done;)n.value.dump(e)}catch(e){i.e(e)}finally{i.f()}e.push(""))}else this.nodeValue?e.push(">".concat(Yt(this.nodeValue),"")):e.push("/>")}else e.push(Yt(this.nodeValue))}}])}(),aB=function(e){function t(e){var r,A=e.hasAttributes,n=void 0!==A&&A,i=e.lowerCaseName,a=void 0!==i&&i;return $C(this,t),(r=qC(this,t))._currentFragment=null,r._stack=null,r._errorCode=0,r._hasAttributes=n,r._lowerCaseName=a,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ZC(e,t)}(t,nB),tB(t,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=0,this.parseXml(e),0===this._errorCode){var t=XC(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onText",value:function(e){if(!function(e){for(var t=0,r=e.length;t=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function sB(e,t){if(e){if("string"==typeof e)return cB(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cB(e,t):void 0}}function cB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r\\\\376\\\\377([^<]+)/g,(function(e,t){for(var r=t.replaceAll(/\\\\([0-3])([0-7])([0-7])/g,(function(e,t,r,A){return String.fromCharCode(64*t+8*r+1*A)})).replaceAll(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error("_repair: ".concat(t," isn't defined."))})),A=[">"],n=0,i=r.length;n=32&&a<127&&60!==a&&62!==a&&38!==a?A.push(String.fromCharCode(a)):A.push("&#x"+(65536+a).toString(16).substring(1)+";")}return A.join("")}))}},{key:"_getSequence",value:function(e){var t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter((function(e){return"rdf:li"===e.nodeName}))}},{key:"_parseArray",value:function(e){if(e.hasChildNodes()){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||sB(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.childNodes,1)[0],r=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,r.map((function(e){return e.textContent.trim()})))}}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName)for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling;if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes()){var r,A=oB(t.childNodes);try{for(A.s();!(r=A.n()).done;){var n=r.value;if("rdf:description"===n.nodeName){var i,a=oB(n.childNodes);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=o.nodeName;switch(s){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(o);continue}this._metadataMap.set(s,o.textContent.trim())}}catch(e){a.e(e)}finally{a.f()}}}}catch(e){A.e(e)}finally{A.f()}}}},{key:"serializable",get:function(){return{parsedData:this._metadataMap,rawData:this._data}}}])}();function hB(e,t){for(var r=0;r0;t=(0,this.decrypt)(t,!r);var A=this.bufferLength,n=A+t.length;this.ensureBuffer(n).set(t,A),this.bufferLength=n}else this.eof=!0}}])}();function dB(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function yB(e,t,r){return t=vB(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pB()?Reflect.construct(t,r||[],vB(e).constructor):t.apply(e,r))}function pB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(pB=function(){return!!e})()}function vB(e){return vB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vB(e)}function mB(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wB(e,t)}function wB(e,t){return wB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wB(e,t)}function bB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kB(e,t){for(var r=0;r>5&255,l[i++]=n>>13&255,l[i++]=n>>21&255,l[i++]=n>>>29&255,l[i++]=0,l[i++]=0,l[i++]=0;var I=new Int32Array(16);for(i=0;i>>32-v)|0,f=y}o=o+f|0,s=s+C|0,c=c+B|0,g=g+Q|0}return new Uint8Array([255&o,o>>8&255,o>>16&255,o>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255,255&g,g>>8&255,g>>16&255,g>>>24&255])}}(),RB=function(){return DB((function e(t,r){bB(this,e),this.high=0|t,this.low=0|r}),[{key:"and",value:function(e){this.high&=e.high,this.low&=e.low}},{key:"xor",value:function(e){this.high^=e.high,this.low^=e.low}},{key:"or",value:function(e){this.high|=e.high,this.low|=e.low}},{key:"shiftRight",value:function(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)}},{key:"shiftLeft",value:function(e){e>=32?(this.high=this.low<>>32-e,this.low<<=e)}},{key:"rotateRight",value:function(e){var t,r;32&e?(r=this.low,t=this.high):(t=this.low,r=this.high),e&=31,this.low=t>>>e|r<<32-e,this.high=r>>>e|t<<32-e}},{key:"not",value:function(){this.high=~this.high,this.low=~this.low}},{key:"add",value:function(e){var t=(this.low>>>0)+(e.low>>>0),r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1),this.low=0|t,this.high=0|r}},{key:"copyTo",value:function(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low}},{key:"assign",value:function(e){this.high=e.high,this.low=e.low}}])}(),GB=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function A(t){return e(t,2)^e(t,13)^e(t,22)}function n(t){return e(t,6)^e(t,11)^e(t,25)}function i(t){return e(t,7)^e(t,18)^t>>>3}var a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(o,s,c){var g,u,l=1779033703,h=3144134277,I=1013904242,f=2773480762,C=1359893119,B=2600822924,Q=528734635,E=1541459225,d=64*Math.ceil((c+9)/64),y=new Uint8Array(d);for(g=0;g>>29&255,y[g++]=c>>21&255,y[g++]=c>>13&255,y[g++]=c>>5&255,y[g++]=c<<3&255;var v,m=new Uint32Array(64);for(g=0;g>>10)+m[u-7]+i(m[u-15])+m[u-16];var w=l,b=h,k=I,D=f,S=C,F=B,x=Q,R=E,G=void 0,N=void 0;for(u=0;u<64;++u)G=R+n(S)+t(S,F,x)+a[u]+m[u],N=A(w)+r(w,b,k),R=x,x=F,F=S,S=D+G|0,D=k,k=b,b=w,w=G+N|0;l=l+w|0,h=h+b|0,I=I+k|0,f=f+D|0,C=C+S|0,B=B+F|0,Q=Q+x|0,E=E+R|0}return new Uint8Array([l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h,I>>24&255,I>>16&255,I>>8&255,255&I,f>>24&255,f>>16&255,f>>8&255,255&f,C>>24&255,C>>16&255,C>>8&255,255&C,B>>24&255,B>>16&255,B>>8&255,255&B,Q>>24&255,Q>>16&255,Q>>8&255,255&Q,E>>24&255,E>>16&255,E>>8&255,255&E])}}(),NB=function(){function e(e,t,r,A,n){e.assign(t),e.and(r),n.assign(t),n.not(),n.and(A),e.xor(n)}function t(e,t,r,A,n){e.assign(t),e.and(r),n.assign(t),n.and(A),e.xor(n),n.assign(r),n.and(A),e.xor(n)}function r(e,t,r){e.assign(t),e.rotateRight(28),r.assign(t),r.rotateRight(34),e.xor(r),r.assign(t),r.rotateRight(39),e.xor(r)}function A(e,t,r){e.assign(t),e.rotateRight(14),r.assign(t),r.rotateRight(18),e.xor(r),r.assign(t),r.rotateRight(41),e.xor(r)}function n(e,t,r){e.assign(t),e.rotateRight(1),r.assign(t),r.rotateRight(8),e.xor(r),r.assign(t),r.shiftRight(7),e.xor(r)}function i(e,t,r){e.assign(t),e.rotateRight(19),r.assign(t),r.rotateRight(61),e.xor(r),r.assign(t),r.shiftRight(6),e.xor(r)}var a=[new RB(1116352408,3609767458),new RB(1899447441,602891725),new RB(3049323471,3964484399),new RB(3921009573,2173295548),new RB(961987163,4081628472),new RB(1508970993,3053834265),new RB(2453635748,2937671579),new RB(2870763221,3664609560),new RB(3624381080,2734883394),new RB(310598401,1164996542),new RB(607225278,1323610764),new RB(1426881987,3590304994),new RB(1925078388,4068182383),new RB(2162078206,991336113),new RB(2614888103,633803317),new RB(3248222580,3479774868),new RB(3835390401,2666613458),new RB(4022224774,944711139),new RB(264347078,2341262773),new RB(604807628,2007800933),new RB(770255983,1495990901),new RB(1249150122,1856431235),new RB(1555081692,3175218132),new RB(1996064986,2198950837),new RB(2554220882,3999719339),new RB(2821834349,766784016),new RB(2952996808,2566594879),new RB(3210313671,3203337956),new RB(3336571891,1034457026),new RB(3584528711,2466948901),new RB(113926993,3758326383),new RB(338241895,168717936),new RB(666307205,1188179964),new RB(773529912,1546045734),new RB(1294757372,1522805485),new RB(1396182291,2643833823),new RB(1695183700,2343527390),new RB(1986661051,1014477480),new RB(2177026350,1206759142),new RB(2456956037,344077627),new RB(2730485921,1290863460),new RB(2820302411,3158454273),new RB(3259730800,3505952657),new RB(3345764771,106217008),new RB(3516065817,3606008344),new RB(3600352804,1432725776),new RB(4094571909,1467031594),new RB(275423344,851169720),new RB(430227734,3100823752),new RB(506948616,1363258195),new RB(659060556,3750685593),new RB(883997877,3785050280),new RB(958139571,3318307427),new RB(1322822218,3812723403),new RB(1537002063,2003034995),new RB(1747873779,3602036899),new RB(1955562222,1575990012),new RB(2024104815,1125592928),new RB(2227730452,2716904306),new RB(2361852424,442776044),new RB(2428436474,593698344),new RB(2756734187,3733110249),new RB(3204031479,2999351573),new RB(3329325298,3815920427),new RB(3391569614,3928383900),new RB(3515267271,566280711),new RB(3940187606,3454069534),new RB(4118630271,4000239992),new RB(116418474,1914138554),new RB(174292421,2731055270),new RB(289380356,3203993006),new RB(460393269,320620315),new RB(685471733,587496836),new RB(852142971,1086792851),new RB(1017036298,365543100),new RB(1126000580,2618297676),new RB(1288033470,3409855158),new RB(1501505948,4234509866),new RB(1607167915,987167468),new RB(1816402316,1246189591)];return function(o,s,c){var g,u,l,h,I,f,C,B,Q=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Q?(g=new RB(3418070365,3238371032),u=new RB(1654270250,914150663),l=new RB(2438529370,812702999),h=new RB(355462360,4144912697),I=new RB(1731405415,4290775857),f=new RB(2394180231,1750603025),C=new RB(3675008525,1694076839),B=new RB(1203062813,3204075428)):(g=new RB(1779033703,4089235720),u=new RB(3144134277,2227873595),l=new RB(1013904242,4271175723),h=new RB(2773480762,1595750129),I=new RB(1359893119,2917565137),f=new RB(2600822924,725511199),C=new RB(528734635,4215389547),B=new RB(1541459225,327033209));var E,d,y=128*Math.ceil((c+17)/128),p=new Uint8Array(y);for(E=0;E>>29&255,p[E++]=c>>21&255,p[E++]=c>>13&255,p[E++]=c>>5&255,p[E++]=c<<3&255;var m=new Array(80);for(E=0;E<80;E++)m[E]=new RB(0,0);var w,b,k=new RB(0,0),D=new RB(0,0),S=new RB(0,0),F=new RB(0,0),x=new RB(0,0),R=new RB(0,0),G=new RB(0,0),N=new RB(0,0),L=new RB(0,0),U=new RB(0,0),M=new RB(0,0),J=new RB(0,0);for(E=0;E=1;--s){r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],A=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=A,r=i[15],A=i[11],n=i[7],i[15]=i[3],i[11]=r,i[7]=A,i[3]=n;for(var c=0;c<16;++c)i[c]=this._inv_s[i[c]];for(var g=0,u=16*s;g<16;++g,++u)i[g]^=t[u];for(var l=0;l<16;l+=4){var h=this._mix[i[l]],I=this._mix[i[l+1]],f=this._mix[i[l+2]],C=this._mix[i[l+3]];r=h^I>>>8^I<<24^f>>>16^f<<16^C>>>24^C<<8,i[l]=r>>>24&255,i[l+1]=r>>16&255,i[l+2]=r>>8&255,i[l+3]=255&r}}r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],A=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=A,r=i[15],A=i[11],n=i[7],i[15]=i[3],i[11]=r,i[7]=A,i[3]=n;for(var B=0;B<16;++B)i[B]=this._inv_s[i[B]],i[B]^=t[B];return i}},{key:"_encrypt",value:function(e,t){var r,A,n,i=this._s,a=new Uint8Array(16);a.set(e);for(var o=0;o<16;++o)a[o]^=t[o];for(var s=1;s=I;--h)if(u[h]!==l){l=0;break}g-=l,i[i.length-1]=u.subarray(0,16-l)}}for(var f=new Uint8Array(g),C=0,B=0,Q=i.length;C2&&void 0!==arguments[2]?arguments[2]:null,A=e.length,n=this.buffer,i=this.bufferPosition;if(r)this.iv=r;else{for(var a=0;i<16&&a=256&&(o=255&(27^o)));for(var g=0;g<4;++g)r[s]=A^=r[s-32],r[++s]=n^=r[s-32],r[++s]=i^=r[s-32],r[++s]=a^=r[s-32],s++}return r}}])}(),HB=function(){return DB((function e(){bB(this,e)}),[{key:"checkOwnerPassword",value:function(e,t,r,A){var n=new Uint8Array(e.length+56);return n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length),Be(GB(n,0,n.length),A)}},{key:"checkUserPassword",value:function(e,t,r){var A=new Uint8Array(e.length+8);return A.set(e,0),A.set(t,e.length),Be(GB(A,0,A.length),r)}},{key:"getOwnerKey",value:function(e,t,r,A){var n=new Uint8Array(e.length+56);n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length);var i=GB(n,0,n.length);return new JB(i).decryptBlock(A,!1,new Uint8Array(16))}},{key:"getUserKey",value:function(e,t,r){var A=new Uint8Array(e.length+8);A.set(e,0),A.set(t,e.length);var n=GB(A,0,A.length);return new JB(n).decryptBlock(r,!1,new Uint8Array(16))}}])}(),YB=function(){return DB((function e(){bB(this,e)}),[{key:"_hash",value:function(e,t,r){for(var A,n,i=GB(t,0,t.length).subarray(0,32),a=[0],o=0;o<64||a.at(-1)>o-32;){var s=e.length+i.length+r.length,c=new Uint8Array(s),g=0;c.set(e,g),g+=e.length,c.set(i,g),g+=i.length,c.set(r,g);for(var u=new Uint8Array(64*s),l=0,h=0;l<64;l++,h+=s)u.set(c,h);var I=(a=new MB(i.subarray(0,16)).encrypt(u,i.subarray(16,32))).slice(0,16).reduce((function(e,t){return e+t}),0)%3;0===I?i=GB(a,0,a.length):1===I?(A=a,0,n=a.length,i=NB(A,0,n,!0)):2===I&&(i=NB(a,0,a.length)),o++}return i.subarray(0,32)}},{key:"checkOwnerPassword",value:function(e,t,r,A){var n=new Uint8Array(e.length+56);return n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length),Be(this._hash(e,n,r),A)}},{key:"checkUserPassword",value:function(e,t,r){var A=new Uint8Array(e.length+8);return A.set(e,0),A.set(t,e.length),Be(this._hash(e,A,[]),r)}},{key:"getOwnerKey",value:function(e,t,r,A){var n=new Uint8Array(e.length+56);n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length);var i=this._hash(e,n,r);return new JB(i).decryptBlock(A,!1,new Uint8Array(16))}},{key:"getUserKey",value:function(e,t,r){var A=new Uint8Array(e.length+8);A.set(e,0),A.set(t,e.length);var n=this._hash(e,A,[]);return new JB(n).decryptBlock(r,!1,new Uint8Array(16))}}])}(),PB=function(){return DB((function e(t,r){bB(this,e),this.StringCipherConstructor=t,this.StreamCipherConstructor=r}),[{key:"createStream",value:function(e,t){var r=new this.StreamCipherConstructor;return new EB(e,t,(function(e,t){return r.decryptBlock(e,t)}))}},{key:"decryptString",value:function(e){var t=new this.StringCipherConstructor,r=ie(e);return ne(r=t.decryptBlock(r,!0))}},{key:"encryptString",value:function(e){var t=new this.StringCipherConstructor;if(t instanceof UB){var r=16-e.length%16;e+=String.fromCharCode(r).repeat(r);var A=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(A);else for(var n=0;n<16;n++)A[n]=Math.floor(256*Math.random());var i=ie(e);i=t.encrypt(i,A);var a=new Uint8Array(16+i.length);return a.set(A),a.set(i,16),ne(a)}var o=ie(e);return ne(o=t.encrypt(o))}}])}(),OB=new WeakSet,KB=function(){return DB((function e(t,r,A){bB(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,OB);var n=t.get("Filter");if(!Ke(n,"Standard"))throw new re("unknown encryption method");this.filterName=n.name,this.dict=t;var i=t.get("V");if(!Number.isInteger(i)||1!==i&&2!==i&&4!==i&&5!==i)throw new re("unsupported encryption algorithm");this.algorithm=i;var a=t.get("Length");if(!a)if(i<=3)a=40;else{var o=t.get("CF"),s=t.get("StmF");if(o instanceof He&&s instanceof Ue){o.suppressEncryption=!0;var c=o.get(s.name);(a=(null==c?void 0:c.get("Length"))||128)<40&&(a<<=3)}}if(!Number.isInteger(a)||a<40||a%8!=0)throw new re("invalid key length");var g=ie(t.get("O")),u=ie(t.get("U")),l=g.subarray(0,32),h=u.subarray(0,32),I=t.get("P"),f=t.get("R"),C=(4===i||5===i)&&!1!==t.get("EncryptMetadata");this.encryptMetadata=C;var B,Q,E=ie(r);if(A){if(6===f)try{A=Ce(A)}catch(e){q("CipherTransformFactory: Unable to convert UTF8 encoded password.")}B=ie(A)}if(5!==i)Q=dB(OB,this,qB).call(this,E,B,l,h,I,f,a,C);else{var d=g.subarray(32,40),y=g.subarray(40,48),p=u.subarray(0,48),v=u.subarray(32,40),m=u.subarray(40,48),w=ie(t.get("OE")),b=ie(t.get("UE")),k=ie(t.get("Perms"));Q=dB(OB,this,TB).call(this,f,B,l,d,y,p,h,v,m,w,b,k)}if(!Q&&!A)throw new V("No password given",1);if(!Q&&A){var D=dB(OB,this,jB).call(this,B,l,f,a);Q=dB(OB,this,qB).call(this,E,D,l,h,I,f,a,C)}if(!Q)throw new V("Incorrect Password",2);if(this.encryptionKey=Q,i>=4){var S=t.get("CF");S instanceof He&&(S.suppressEncryption=!0),this.cf=S,this.stmf=t.get("StmF")||Ue.get("Identity"),this.strf=t.get("StrF")||Ue.get("Identity"),this.eff=t.get("EFF")||this.stmf}}),[{key:"createCipherTransform",value:function(e,t){if(4===this.algorithm||5===this.algorithm)return new PB(dB(OB,this,ZB).call(this,this.cf,this.strf,e,t,this.encryptionKey),dB(OB,this,ZB).call(this,this.cf,this.stmf,e,t,this.encryptionKey));var r=dB(OB,this,WB).call(this,e,t,this.encryptionKey,!1),A=function(){return new FB(r)};return new PB(A,A)}}])}();function TB(e,t,r,A,n,i,a,o,s,c,g,u){if(t){var l=Math.min(127,t.length);t=t.subarray(0,l)}else t=[];var h=6===e?new YB:new HB;return h.checkUserPassword(t,o,a)?h.getUserKey(t,s,g):t.length&&h.checkOwnerPassword(t,A,i,r)?h.getOwnerKey(t,n,i,c):null}function qB(e,t,r,A,n,i,a,o){var s,c,g=40+r.length+e.length,u=new Uint8Array(g),l=0;if(t)for(c=Math.min(32,t.length);l>8&255,u[l++]=n>>16&255,u[l++]=n>>>24&255,s=0,c=e.length;s=4&&!o&&(u[l++]=255,u[l++]=255,u[l++]=255,u[l++]=255);var h=xB(u,0,l),I=a>>3;if(i>=3)for(s=0;s<50;++s)h=xB(h,0,I);var f,C=h.subarray(0,I);if(i>=3){for(l=0;l<32;++l)u[l]=XB._[l];for(s=0,c=e.length;s>3;if(r>=3)for(o=0;o<50;++o)c=xB(c,0,c.length);if(r>=3){s=t;var u=new Uint8Array(g);for(o=19;o>=0;o--){for(var l=0;l3&&void 0!==arguments[3]&&arguments[3],i=new Uint8Array(r.length+9),a=r.length;for(A=0;A>8&255,i[A++]=e>>16&255,i[A++]=255&t,i[A++]=t>>8&255,n&&(i[A++]=115,i[A++]=65,i[A++]=108,i[A++]=84),xB(i,0,A).subarray(0,Math.min(r.length+5,16))}function ZB(e,t,r,A,n){if(!(t instanceof Ue))throw new re("Invalid crypt filter name.");var i=this,a=e.get(t.name),o=null==a?void 0:a.get("CFM");if(!o||"None"===o.name)return function(){return new LB};if("V2"===o.name)return function(){return new FB(dB(OB,i,WB).call(i,r,A,n,!1))};if("AESV2"===o.name)return function(){return new MB(dB(OB,i,WB).call(i,r,A,n,!0))};if("AESV3"===o.name)return function(){return new JB(n)};throw new re("Unknown crypto method")}var _B,XB={_:new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122])};function VB(e){return function(e){if(Array.isArray(e))return rQ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tQ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||tQ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $B(){$B=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function eQ(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=tQ(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function tQ(e,t){if(e){if("string"==typeof e)return rQ(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rQ(e,t):void 0}}function rQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>");case 20:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})))).apply(this,arguments)}function cQ(e,t,r){return gQ.apply(this,arguments)}function gQ(){return(gQ=nQ($B().mark((function e(t,r,A){var n,i,a,o,s,c,g,u,l,h,I,f,C,B;return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.getBytes(),i=t.dict,e.next=4,Promise.all([i.getAsync("Filter"),i.getAsync("DecodeParms")]);case 4:if(a=e.sent,o=zB(a,2),s=o[0],c=o[1],!Array.isArray(s)){e.next=14;break}return e.next=11,i.xref.fetchIfRefAsync(s[0]);case 11:e.t0=e.sent,e.next=15;break;case 14:e.t0=s;case 15:if(g=e.t0,u=Ke(g,"FlateDecode"),!(n.length>=256||u)){e.next=37;break}return e.prev=19,l=new CompressionStream("deflate"),h=l.writable.getWriter(),e.next=24,h.ready;case 24:return h.write(n).then(nQ($B().mark((function e(){return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.ready;case 2:return e.next=4,h.close();case 4:case"end":return e.stop()}}),e)})))).catch((function(){})),e.next=27,new Response(l.readable).arrayBuffer();case 27:I=e.sent,n=new Uint8Array(I),s?u||(f=Array.isArray(s)?[Ue.get("FlateDecode")].concat(VB(s)):[Ue.get("FlateDecode"),s],c&&(C=Array.isArray(c)?[null].concat(VB(c)):[null,c])):f=Ue.get("FlateDecode"),f&&i.set("Filter",f),C&&i.set("DecodeParms",C),e.next=37;break;case 34:e.prev=34,e.t1=e.catch(19),T('writeStream - cannot compress data: "'.concat(e.t1,'".'));case 37:return B=ne(n),A&&(B=A.encryptString(B)),i.set("Length",B.length),e.next=42,oQ(i,r,A);case 42:r.push(" stream\\n",B,"\\nendstream");case 43:case"end":return e.stop()}}),e,null,[[19,34]])})))).apply(this,arguments)}function uQ(e,t,r){return lQ.apply(this,arguments)}function lQ(){return(lQ=nQ($B().mark((function e(t,r,A){var n,i,a,o;return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.push("["),n=!0,i=eQ(t),e.prev=3,i.s();case 5:if((a=i.n()).done){e.next=12;break}return o=a.value,n?n=!1:r.push(" "),e.next=10,hQ(o,r,A);case 10:e.next=5;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),i.e(e.t0);case 17:return e.prev=17,i.f(),e.finish(17);case 20:r.push("]");case 21:case"end":return e.stop()}}),e,null,[[3,14,17,20]])})))).apply(this,arguments)}function hQ(e,t,r){return IQ.apply(this,arguments)}function IQ(){return(IQ=nQ($B().mark((function e(t,r,A){return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t instanceof Ue)){e.next=4;break}r.push("/".concat(Nt(t.name))),e.next=37;break;case 4:if(!(t instanceof Ye)){e.next=8;break}r.push("".concat(t.num," ").concat(t.gen," R")),e.next=37;break;case 8:if(!Array.isArray(t)&&!ArrayBuffer.isView(t)){e.next=13;break}return e.next=11,uQ(t,r,A);case 11:e.next=37;break;case 13:if("string"!=typeof t){e.next=18;break}A&&(t=A.encryptString(t)),r.push("(".concat(Lt(t),")")),e.next=37;break;case 18:if("number"!=typeof t){e.next=22;break}r.push(Tt(t)),e.next=37;break;case 22:if("boolean"!=typeof t){e.next=26;break}r.push(t.toString()),e.next=37;break;case 26:if(!(t instanceof He)){e.next=31;break}return e.next=29,oQ(t,r,A);case 29:e.next=37;break;case 31:if(!(t instanceof ze)){e.next=36;break}return e.next=34,cQ(t,r,A);case 34:e.next=37;break;case 36:null===t?r.push("null"):q("Unhandled value in writer: ".concat(typeof t,", please file a bug."));case 37:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fQ(e,t,r,A){for(var n=t+r-1;n>r-1;n--)A[n]=255&e,e>>=8;return r+t}function CQ(e,t,r){for(var A=0,n=e.length;A1&&(c=A.documentElement.searchNode([s.at(-1)],0)),c?c.childNodes=Array.isArray(o)?o.map((function(e){return new iB("value",e)})):[new iB("#text",o)]:q("Node not found for path: ".concat(a))}}}}catch(e){n.e(e)}finally{n.f()}var g=[];return A.documentElement.dump(g),g.join("")}(n.fetchIfRef(r).getString(),A));var i=n.encrypt;i&&(t=i.createCipherTransform(r.num,r.gen).encryptString(t));var a="".concat(r.num," ").concat(r.gen," obj\\n")+"<< /Type /EmbeddedFile /Length ".concat(t.length,">>\\nstream\\n")+t+"\\nendstream\\nendobj\\n";A.push({ref:r,data:a})}function dQ(e,t,r,A,n){return yQ.apply(this,arguments)}function yQ(){return(yQ=nQ($B().mark((function e(t,r,A,n,i){var a,o,s,c,g,u,l;return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.push("xref\\n"),a=pQ(A),o=0,s=eQ(A);try{for(s.s();!(c=s.n()).done;)g=c.value,u=g.ref,l=g.data,u.num===a[o]&&(i.push("".concat(a[o]," ").concat(a[o+1],"\\n")),o+=2),null!==l?(i.push("".concat(r.toString().padStart(10,"0")," ").concat(Math.min(u.gen,65535).toString().padStart(5,"0")," n\\r\\n")),r+=l.length):i.push("0000000000 ".concat(Math.min(u.gen+1,65535).toString().padStart(5,"0")," f\\r\\n"))}catch(e){s.e(e)}finally{s.f()}return wQ(r,t,n),i.push("trailer\\n"),e.next=9,oQ(n,i);case 9:i.push("\\nstartxref\\n",r.toString(),"\\n%%EOF\\n");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pQ(e){var t,r=[],A=eQ(e);try{for(A.s();!(t=A.n()).done;){var n=t.value.ref;n.num===r.at(-2)+r.at(-1)?r[r.length-1]+=1:r.push(n.num,1)}}catch(e){A.e(e)}finally{A.f()}return r}function vQ(e,t,r,A,n){return mQ.apply(this,arguments)}function mQ(){return(mQ=nQ($B().mark((function e(t,r,A,n,i){var a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p,v,m,w,b,k;return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=[],o=0,s=0,c=eQ(A);try{for(c.s();!(g=c.n()).done;)u=g.value,l=u.ref,h=u.data,I=void 0,o=Math.max(o,r),null!==h?(I=Math.min(l.gen,65535),a.push([1,r,I]),r+=h.length):(I=Math.min(l.gen+1,65535),a.push([0,0,I])),s=Math.max(s,I)}catch(e){c.e(e)}finally{c.f()}for(n.set("Index",pQ(A)),f=Xt(o),C=Xt(s),B=[1,f,C],n.set("W",B),wQ(r,t,n),Q=B.reduce((function(e,t){return e+t}),0),E=new Uint8Array(Q*a.length),(d=new ar(E)).dict=n,y=0,p=0,v=a;p0){var A=function(e,t){for(var r=Math.floor(Date.now()/1e3),A=t.filename||"",n=[r.toString(),A,e.toString()],i=n.reduce((function(e,t){return e+t.length}),0),a=0,o=Object.values(t.info);a=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function FQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||RQ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xQ(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=RQ(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function RQ(e,t){if(e){if("string"==typeof e)return GQ(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GQ(e,t):void 0}}function GQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0||(k.parentTreeId=a++),C=!1)}catch(e){m.e(e)}finally{m.f()}case 55:t.next=46;break;case 57:t.next=62;break;case 59:t.prev=59,t.t1=t.catch(44),B.e(t.t1);case 62:return t.prev=62,B.f(),t.finish(62);case 65:if(!C){t.next=69;break}D=xQ(i.values());try{for(D.s();!(S=D.n()).done;){F=S.value,x=xQ(F);try{for(x.s();!(R=x.n()).done;)delete(G=R.value).parentTreeId,delete G.structTreeParent}catch(e){x.e(e)}finally{x.f()}}}catch(e){D.e(e)}finally{D.f()}return t.abrupt("return",!1);case 69:return t.abrupt("return",!0);case 70:case"end":return t.stop()}}),t,this,[[18,36,39,42],[44,59,62,65]])}))),function(e){return n.apply(this,arguments)})},{key:"updateStructureTree",value:(A=LQ(SQ().mark((function t(r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d;return SQ().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=r.newAnnotationsByPage,n=r.pdfManager,i=r.newRefs,a=this.dict.xref,o=this.dict.clone(),s=this.ref,(c=new Oe).put(s,o),(g=o.getRaw("ParentTree"))instanceof Ye?u=a.fetch(g):(u=g,g=a.getNewTemporaryRef(),o.set("ParentTree",g)),u=u.clone(),c.put(g,u),l=u.getRaw("Nums"),h=null,l instanceof Ye&&(h=l,l=a.fetch(h)),l=l.slice(),h||u.set("Nums",l),t.next=17,TQ.call(e,{newAnnotationsByPage:A,structTreeRootRef:s,structTreeRoot:this,kids:null,nums:l,xref:a,pdfManager:n,newRefs:i,cache:c});case 17:if(-1!==(I=t.sent)){t.next=20;break}return t.abrupt("return");case 20:o.set("ParentTreeNextKey",I),h&&c.put(h,l),f=[],C=xQ(c.items()),t.prev=24,C.s();case 26:if((B=C.n()).done){t.next=34;break}return Q=FQ(B.value,2),E=Q[0],d=Q[1],f.length=0,t.next=31,iQ(E,d,f,a);case 31:i.push({ref:E,data:f.join("")});case 32:t.next=26;break;case 34:t.next=39;break;case 36:t.prev=36,t.t0=t.catch(24),C.e(t.t0);case 39:return t.prev=39,C.f(),t.finish(39);case 42:case"end":return t.stop()}}),t,this,[[24,36,39,42]])}))),function(e){return A.apply(this,arguments)})}],[{key:"canCreateStructureTree",value:(r=LQ(SQ().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d;return SQ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.catalogRef,A=t.pdfManager,n=t.newAnnotationsByPage,r instanceof Ye){e.next=4;break}return q("Cannot save the struct tree: no catalog reference."),e.abrupt("return",!1);case 4:i=0,a=!0,o=xQ(n),e.prev=7,o.s();case 9:if((s=o.n()).done){e.next=23;break}return c=FQ(s.value,2),g=c[0],u=c[1],e.next=13,A.getPage(g);case 13:if(e.sent.ref instanceof Ye){e.next=19;break}return q("Cannot save the struct tree: page ".concat(g," has no ref.")),a=!0,e.abrupt("break",23);case 19:l=xQ(u);try{for(l.s();!(h=l.n()).done;)f=h.value,null!==(I=f.accessibilityData)&&void 0!==I&&I.type&&(f.parentTreeId=i++,a=!1)}catch(e){l.e(e)}finally{l.f()}case 21:e.next=9;break;case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(7),o.e(e.t0);case 28:return e.prev=28,o.f(),e.finish(28);case 31:if(!a){e.next=35;break}C=xQ(n.values());try{for(C.s();!(B=C.n()).done;){Q=B.value,E=xQ(Q);try{for(E.s();!(d=E.n()).done;)delete d.value.parentTreeId}catch(e){E.e(e)}finally{E.f()}}}catch(e){C.e(e)}finally{C.f()}return e.abrupt("return",!1);case 35:return e.abrupt("return",!0);case 36:case"end":return e.stop()}}),e,null,[[7,25,28,31]])}))),function(e){return r.apply(this,arguments)})},{key:"createStructureTree",value:(t=LQ(SQ().mark((function t(r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p;return SQ().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=r.newAnnotationsByPage,n=r.xref,i=r.catalogRef,a=r.pdfManager,o=r.newRefs,s=a.catalog.cloneDict(),(c=new Oe).put(i,s),g=n.getNewTemporaryRef(),s.set("StructTreeRoot",g),(u=new He(n)).set("Type",Ue.get("StructTreeRoot")),l=n.getNewTemporaryRef(),u.set("ParentTree",l),h=[],u.set("K",h),c.put(g,u),I=new He(n),f=[],I.set("Nums",f),t.next=18,YQ(e,this,TQ).call(this,{newAnnotationsByPage:A,structTreeRootRef:g,structTreeRoot:null,kids:h,nums:f,xref:n,pdfManager:a,newRefs:o,cache:c});case 18:C=t.sent,u.set("ParentTreeNextKey",C),c.put(l,I),B=[],Q=xQ(c.items()),t.prev=23,Q.s();case 25:if((E=Q.n()).done){t.next=33;break}return d=FQ(E.value,2),y=d[0],p=d[1],B.length=0,t.next=30,iQ(y,p,B,n);case 30:o.push({ref:y,data:B.join("")});case 31:t.next=25;break;case 33:t.next=38;break;case 35:t.prev=35,t.t0=t.catch(23),Q.e(t.t0);case 38:return t.prev=38,Q.f(),t.finish(38);case 41:case"end":return t.stop()}}),t,this,[[23,35,38,41]])}))),function(e){return t.apply(this,arguments)})}]);var t,r,A,n}();function KQ(e,t,r){if(e instanceof Ye&&!(t<0)){this.structParentIds||(this.structParentIds=new Oe);var A=this.structParentIds.get(e);A||(A=[],this.structParentIds.put(e,A)),A.push([t,r])}}function TQ(e){return qQ.apply(this,arguments)}function qQ(){return(qQ=LQ(SQ().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p,v,m,w,b,k,D,S,F,x,R,G,N,L,U,M,J;return SQ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.newAnnotationsByPage,A=t.structTreeRootRef,n=t.structTreeRoot,i=t.kids,a=t.nums,o=t.xref,s=t.pdfManager,c=t.newRefs,g=t.cache,u=Ue.get("OBJR"),l=-1,I=[],f=xQ(r),e.prev=5,f.s();case 7:if((C=f.n()).done){e.next=59;break}return B=FQ(C.value,2),Q=B[0],E=B[1],e.next=11,s.getPage(Q);case 11:d=e.sent,y=d.ref,p=y instanceof Ye,v=xQ(E),e.prev=15,v.s();case 17:if((m=v.n()).done){e.next=49;break}if(w=m.value,b=w.accessibilityData,k=w.ref,D=w.parentTreeId,S=w.structTreeParent,null!=b&&b.type){e.next=21;break}return e.abrupt("continue",47);case 21:if(F=b.structParent,!(n&&Number.isInteger(F)&&F>=0)){e.next=34;break}if(void 0===(R=(h||(h=new Map)).get(Q))&&(G=new zQ(n,d.pageDict),R=G.collectObjects(y),h.set(Q,R)),!(N=null===(x=R)||void 0===x?void 0:x.get(F))){e.next=34;break}return L=o.fetch(N).clone(),jQ.call(_B,L,b),I.length=0,e.next=32,iQ(N,L,I,o);case 32:return c.push({ref:N,data:I.join("")}),e.abrupt("continue",47);case 34:return l=Math.max(l,D),U=o.getNewTemporaryRef(),M=new He(o),jQ.call(_B,M,b),e.next=40,YQ(_B,this,ZQ).call(this,{structTreeParent:S,tagDict:M,newTagRef:U,structTreeRootRef:A,fallbackKids:i,xref:o,cache:g});case 40:J=new He(o),M.set("K",J),J.set("Type",u),p&&J.set("Pg",y),J.set("Obj",k),g.put(U,M),a.push(D,U);case 47:e.next=17;break;case 49:e.next=54;break;case 51:e.prev=51,e.t0=e.catch(15),v.e(e.t0);case 54:return e.prev=54,v.f(),e.finish(54);case 57:e.next=7;break;case 59:e.next=64;break;case 61:e.prev=61,e.t1=e.catch(5),f.e(e.t1);case 64:return e.prev=64,f.f(),e.finish(64);case 67:return e.abrupt("return",l+1);case 68:case"end":return e.stop()}}),e,this,[[5,61,64,67],[15,51,54,57]])})))).apply(this,arguments)}function jQ(e,t){var r=t.type,A=t.title,n=t.lang,i=t.alt,a=t.expanded,o=t.actualText;e.set("S",Ue.get(r)),A&&e.set("T",jt(A)),n&&e.set("Lang",jt(n)),i&&e.set("Alt",jt(i)),a&&e.set("E",jt(a)),o&&e.set("ActualText",jt(o))}function WQ(e){var t,r=e.elements,A=e.xref,n=e.pageDict,i=e.numberTree,a=new Map,o=xQ(r);try{for(o.s();!(t=o.n()).done;){var s=t.value;if(s.structTreeParentId){var c=parseInt(s.structTreeParentId.split("_mc")[1],10),g=a.get(c);g||(g=[],a.set(c,g)),g.push(s)}}}catch(e){o.e(e)}finally{o.f()}var u=n.get("StructParents");if(Number.isInteger(u)){var l,h=function(e,t,r){var n=a.get(e);if(n){var i=t.getRaw("P"),o=A.fetchIfRef(i);if(i instanceof Ye&&o instanceof He){var s,c={ref:r,dict:t},g=xQ(n);try{for(g.s();!(s=g.n()).done;)s.value.structTreeParent=c}catch(e){g.e(e)}finally{g.f()}}return!0}return!1},I=xQ(i.get(u));try{for(I.s();!(l=I.n()).done;){var f=l.value;if(f instanceof Ye){var C=A.fetch(f),B=C.get("K");if(Number.isInteger(B))h(B,C,f);else if(Array.isArray(B)){var Q,E=xQ(B);try{for(E.s();!(Q=E.n()).done;){var d=Q.value;if(d=A.fetchIfRef(d),Number.isInteger(d)&&h(d,C,f))break;if(d instanceof He){if(!Ke(d.get("Type"),"MCR"))break;var y=d.get("MCID");if(Number.isInteger(y)&&h(y,C,f))break}}}catch(e){E.e(e)}finally{E.f()}}}}}catch(e){I.e(e)}finally{I.f()}}}function ZQ(e){return _Q.apply(this,arguments)}function _Q(){return(_Q=LQ(SQ().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C;return SQ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.structTreeParent,A=t.tagDict,n=t.newTagRef,i=t.structTreeRootRef,a=t.fallbackKids,o=t.xref,s=t.cache,c=null,r?(c=r.ref,g=r.dict.getRaw("P")||i):g=i,A.set("P",g),u=o.fetchIfRef(g)){e.next=8;break}return a.push(n),e.abrupt("return");case 8:(l=s.get(g))||(l=u.clone(),s.put(g,l)),h=l.getRaw("K"),(I=h instanceof Ye?s.get(h):null)||(I=o.fetchIfRef(h),I=Array.isArray(I)?I.slice():[h],f=o.getNewTemporaryRef(),l.set("K",f),s.put(f,I)),C=I.indexOf(c),I.splice(C>=0?C+1:I.length,0,n);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}_B=OQ;var XQ=function(){return JQ((function e(t,r){UQ(this,e),this.tree=t,this.dict=r,this.kids=[],this.parseKids()}),[{key:"role",get:function(){var e=this.dict.get("S"),t=e instanceof Ue?e.name:"",r=this.tree.root;return r.roleMap.has(t)?r.roleMap.get(t):t}},{key:"parseKids",value:function(){var e=null,t=this.dict.getRaw("Pg");t instanceof Ye&&(e=t.toString());var r=this.dict.get("K");if(Array.isArray(r)){var A,n=xQ(r);try{for(n.s();!(A=n.n()).done;){var i=A.value,a=this.parseKid(e,i);a&&this.kids.push(a)}}catch(e){n.e(e)}finally{n.f()}}else{var o=this.parseKid(e,r);o&&this.kids.push(o)}}},{key:"parseKid",value:function(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new VQ({type:1,mcid:t,pageObjId:e});var r=null;if(t instanceof Ye?r=this.dict.xref.fetch(t):t instanceof He&&(r=t),!r)return null;var A=r.getRaw("Pg");A instanceof Ye&&(e=A.toString());var n=r.get("Type")instanceof Ue?r.get("Type").name:null;if("MCR"===n){if(this.tree.pageDict.objId!==e)return null;var i=r.getRaw("Stm");return new VQ({type:2,refObjId:i instanceof Ye?i.toString():null,pageObjId:e,mcid:r.get("MCID")})}if("OBJR"===n){if(this.tree.pageDict.objId!==e)return null;var a=r.getRaw("Obj");return new VQ({type:3,refObjId:a instanceof Ye?a.toString():null,pageObjId:e})}return new VQ({type:5,dict:r})}}])}(),VQ=JQ((function e(t){var r=t.type,A=t.dict,n=void 0===A?null:A,i=t.mcid,a=void 0===i?null:i,o=t.pageObjId,s=void 0===o?null:o,c=t.refObjId,g=void 0===c?null:c;UQ(this,e),this.type=r,this.dict=n,this.mcid=a,this.pageObjId=s,this.refObjId=g,this.parentNode=null})),zQ=function(){return JQ((function e(t,r){UQ(this,e),this.root=t,this.rootDict=t?t.dict:null,this.pageDict=r,this.nodes=[]}),[{key:"collectObjects",value:function(e){var t;if(!(this.root&&this.rootDict&&e instanceof Ye))return null;var r=this.rootDict.get("ParentTree");if(!r)return null;var A=null===(t=this.root.structParentIds)||void 0===t?void 0:t.get(e);if(!A)return null;var n,i=new Map,a=new MC(r,this.rootDict.xref),o=xQ(A);try{for(o.s();!(n=o.n()).done;){var s=FQ(n.value,1)[0],c=a.getRaw(s);c instanceof Ye&&i.set(s,c)}}catch(e){o.e(e)}finally{o.f()}return i}},{key:"parse",value:function(e){var t;if(this.root&&this.rootDict&&e instanceof Ye){var r=this.rootDict.get("ParentTree");if(r){var A=this.pageDict.get("StructParents"),n=null===(t=this.root.structParentIds)||void 0===t?void 0:t.get(e);if(Number.isInteger(A)||n){var i=new Map,a=new MC(r,this.rootDict.xref);if(Number.isInteger(A)){var o=a.get(A);if(Array.isArray(o)){var s,c=xQ(o);try{for(c.s();!(s=c.n()).done;){var g=s.value;g instanceof Ye&&this.addNode(this.rootDict.xref.fetch(g),i)}}catch(e){c.e(e)}finally{c.f()}}}if(n){var u,l=xQ(n);try{for(l.s();!(u=l.n()).done;){var h=FQ(u.value,2),I=h[0],f=h[1],C=a.get(I);if(C){var B,Q=this.addNode(this.rootDict.xref.fetchIfRef(C),i);1===(null==Q||null===(B=Q.kids)||void 0===B?void 0:B.length)&&3===Q.kids[0].type&&(Q.kids[0].type=f)}}}catch(e){l.e(e)}finally{l.f()}}}}}}},{key:"addNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(r>40)return q("StructTree MAX_DEPTH reached."),null;if(!(e instanceof He))return null;if(t.has(e))return t.get(e);var A=new XQ(this,e);t.set(e,A);var n=e.get("P");if(!n||Ke(n.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(e,A)||t.delete(e),A;var i=this.addNode(n,t,r+1);if(!i)return A;var a,o=!1,s=xQ(i.kids);try{for(s.s();!(a=s.n()).done;){var c=a.value;5===c.type&&c.dict===e&&(c.parentNode=A,o=!0)}}catch(e){s.e(e)}finally{s.f()}return o||t.delete(e),A}},{key:"addTopLevelNode",value:function(e,t){var r=this.rootDict.get("K");if(!r)return!1;if(r instanceof He)return r.objId===e.objId&&(this.nodes[0]=t,!0);if(!Array.isArray(r))return!0;for(var A=!1,n=0;n2&&void 0!==arguments[2]?arguments[2]:0;if(A>40)q("StructTree too deep to be fully serialized.");else{var n=Object.create(null);n.role=t.role,n.children=[],r.children.push(n);var i=t.dict.get("Alt");"string"!=typeof i&&(i=t.dict.get("ActualText")),"string"==typeof i&&(n.alt=Ie(i));var a=t.dict.get("A");if(a instanceof He){var o=Rt(a.getArray("BBox"),null);if(o)n.bbox=o;else{var s=a.get("Width"),c=a.get("Height");"number"==typeof s&&s>0&&"number"==typeof c&&c>0&&(n.bbox=[0,0,s,c])}}var g=t.dict.get("Lang");"string"==typeof g&&(n.lang=Ie(g));var u,l=xQ(t.kids);try{for(l.s();!(u=l.n()).done;){var h=u.value,I=5===h.type?h.parentNode:null;I?e(I,n,A+1):1===h.type||2===h.type?n.children.push({type:"content",id:"p".concat(h.pageObjId,"_mc").concat(h.mcid)}):3===h.type?n.children.push({type:"object",id:h.refObjId}):4===h.type&&n.children.push({type:"annotation",id:"".concat("pdfjs_internal_id_").concat(h.refObjId)})}}catch(e){l.e(e)}finally{l.f()}}}var t=Object.create(null);t.children=[],t.role="Root";var r,A=xQ(this.nodes);try{for(A.s();!(r=A.n()).done;){var n=r.value;n&&e(n,t)}}catch(e){A.e(e)}finally{A.f()}return t}}])}();function $Q(){$Q=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function eE(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function tE(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){eE(i,A,n,a,o,"next",e)}function o(e){eE(i,A,n,a,o,"throw",e)}a(void 0)}))}}function rE(e,t){return gE(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||sE(e,t)||oE()}function AE(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function oE(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sE(e,t){if(e){if("string"==typeof e)return cE(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cE(e,t):void 0}}function cE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r3)return!1;break;case"Fit":case"FitB":return 0===i;case"FitH":case"FitBH":case"FitV":case"FitBV":if(i>1)return!1;break;case"FitR":if(4!==i)return!1;a=!1;break;default:return!1}var o,s=aE(n);try{for(s.s();!(o=s.n()).done;){var c=o.value;if(!("number"==typeof c||a&&null===c))return!1}}catch(e){s.e(e)}finally{s.f()}return!0}function lE(e){return e instanceof He&&(e=e.get("D")),uE(e)?e:null}function hE(e){var t=e.get("D");if(t){if(t instanceof Ue&&(t=t.name),"string"==typeof t)return Ie(t);if(uE(t))return JSON.stringify(t)}return null}var IE=new WeakSet,fE=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,IE),this.pdfManager=t,this.xref=r,this._catDict=r.getCatalogObj(),!(this._catDict instanceof He))throw new re("Catalog object is not a dictionary.");this.toplevelPagesDict,this._actualNumPages=null,this.fontCache=new Oe,this.builtInCMapCache=new Map,this.standardFontDataCache=new Map,this.globalImageCache=new Kh,this.pageKidsCountCache=new Oe,this.pageIndexCache=new Oe,this.pageDictCache=new Oe,this.nonBlendModesSet=new Pe,this.systemFontCache=new Map}return function(e,t,r){return t&&AE(e.prototype,t),r&&AE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"cloneDict",value:function(){return this._catDict.clone()}},{key:"version",get:function(){var e=this._catDict.get("Version");if(e instanceof Ue){if(It.test(e.name))return _(this,"version",e.name);q("Invalid PDF catalog version: ".concat(e.name))}return _(this,"version",null)}},{key:"lang",get:function(){var e=this._catDict.get("Lang");return _(this,"lang",e&&"string"==typeof e?Ie(e):null)}},{key:"needsRendering",get:function(){var e=this._catDict.get("NeedsRendering");return _(this,"needsRendering","boolean"==typeof e&&e)}},{key:"collection",get:function(){var e=null;try{var t=this._catDict.get("Collection");t instanceof He&&t.size>0&&(e=t)}catch(e){if(e instanceof Ct)throw e;T("Cannot fetch Collection entry; assuming no collection is present.")}return _(this,"collection",e)}},{key:"acroForm",get:function(){var e=null;try{var t=this._catDict.get("AcroForm");t instanceof He&&t.size>0&&(e=t)}catch(e){if(e instanceof Ct)throw e;T("Cannot fetch AcroForm entry; assuming no forms are present.")}return _(this,"acroForm",e)}},{key:"acroFormRef",get:function(){var e=this._catDict.getRaw("AcroForm");return _(this,"acroFormRef",e instanceof Ye?e:null)}},{key:"metadata",get:function(){var e=this._catDict.getRaw("Metadata");if(!(e instanceof Ye))return _(this,"metadata",null);var t=null;try{var r,A=this.xref.fetch(e,!(null!==(r=this.xref.encrypt)&&void 0!==r&&r.encryptMetadata));if(A instanceof ze&&A.dict instanceof He){var n=A.dict.get("Type"),i=A.dict.get("Subtype");if(Ke(n,"Metadata")&&Ke(i,"XML")){var a=fe(A.getString());a&&(t=new lB(a).serializable)}}}catch(e){if(e instanceof Ct)throw e;T('Skipping invalid Metadata: "'.concat(e,'".'))}return _(this,"metadata",t)}},{key:"markInfo",get:function(){var e=null;try{e=this._readMarkInfo()}catch(e){if(e instanceof Ct)throw e;q("Unable to read mark info.")}return _(this,"markInfo",e)}},{key:"_readMarkInfo",value:function(){var e=this._catDict.get("MarkInfo");if(!(e instanceof He))return null;var t={Marked:!1,UserProperties:!1,Suspects:!1};for(var r in t){var A=e.get(r);"boolean"==typeof A&&(t[r]=A)}return t}},{key:"structTreeRoot",get:function(){var e=null;try{e=this._readStructTreeRoot()}catch(e){if(e instanceof Ct)throw e;q("Unable read to structTreeRoot info.")}return _(this,"structTreeRoot",e)}},{key:"_readStructTreeRoot",value:function(){var e=this._catDict.getRaw("StructTreeRoot"),t=this.xref.fetchIfRef(e);if(!(t instanceof He))return null;var r=new OQ(t,e);return r.init(),r}},{key:"toplevelPagesDict",get:function(){var e=this._catDict.get("Pages");if(!(e instanceof He))throw new re("Invalid top-level pages dictionary.");return _(this,"toplevelPagesDict",e)}},{key:"documentOutline",get:function(){var e=null;try{e=this._readDocumentOutline()}catch(e){if(e instanceof Ct)throw e;q("Unable to read document outline.")}return _(this,"documentOutline",e)}},{key:"_readDocumentOutline",value:function(){var t=this._catDict.get("Outlines");if(!(t instanceof He))return null;if(!((t=t.getRaw("First"))instanceof Ye))return null;var r={items:[]},A=[{obj:t,parent:r}],n=new Pe;n.put(t);for(var i=this.xref,a=new Uint8ClampedArray(3);A.length>0;){var o=A.shift(),s=i.fetchIfRef(o.obj);if(null!==s){s.has("Title")||q("Invalid outline item encountered.");var c={url:null,dest:null,action:null};e.parseDestDictionary({destDict:s,resultObj:c,docBaseUrl:this.baseUrl,docAttachments:this.attachments});var g=s.get("Title"),u=s.get("F")||0,l=s.getArray("C"),h=s.get("Count"),I=a;!St(l,3)||0===l[0]&&0===l[1]&&0===l[2]||(I=Ur.singletons.rgb.getRgb(l,0));var f={action:c.action,attachment:c.attachment,dest:c.dest,url:c.url,unsafeUrl:c.unsafeUrl,newWindow:c.newWindow,setOCGState:c.setOCGState,title:"string"==typeof g?Ie(g):"",color:I,count:Number.isInteger(h)?h:void 0,bold:!!(2&u),italic:!!(1&u),items:[]};o.parent.items.push(f),(t=s.getRaw("First"))instanceof Ye&&!n.has(t)&&(A.push({obj:t,parent:f}),n.put(t)),(t=s.getRaw("Next"))instanceof Ye&&!n.has(t)&&(A.push({obj:t,parent:o.parent}),n.put(t))}}return r.items.length>0?r.items:null}},{key:"permissions",get:function(){var e=null;try{e=this._readPermissions()}catch(e){if(e instanceof Ct)throw e;q("Unable to read permissions.")}return _(this,"permissions",e)}},{key:"_readPermissions",value:function(){var e=this.xref.trailer.get("Encrypt");if(!(e instanceof He))return null;var t=e.get("P");if("number"!=typeof t)return null;t+=Math.pow(2,32);var r=[];for(var A in y){var n=y[A];t&n&&r.push(n)}return r}},{key:"optionalContentConfig",get:function(){var e=null;try{var t=this._catDict.get("OCProperties");if(!t)return _(this,"optionalContentConfig",null);var r=t.get("D");if(!r)return _(this,"optionalContentConfig",null);var A=t.get("OCGs");if(!Array.isArray(A))return _(this,"optionalContentConfig",null);var n,i=[],a=new Pe,o=aE(A);try{for(o.s();!(n=o.n()).done;){var s=n.value;s instanceof Ye&&!a.has(s)&&(a.put(s),i.push(iE(IE,this,CE).call(this,s)))}}catch(e){o.e(e)}finally{o.f()}(e=iE(IE,this,BE).call(this,r,a)).groups=i}catch(e){if(e instanceof Ct)throw e;q("Unable to read optional content config: ".concat(e))}return _(this,"optionalContentConfig",e)}},{key:"setActualNumPages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._actualNumPages=e}},{key:"hasActualNumPages",get:function(){return null!==this._actualNumPages}},{key:"_pagesCount",get:function(){var e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new re("Page count in top-level pages dictionary is not an integer.");return _(this,"_pagesCount",e)}},{key:"numPages",get:function(){return this.hasActualNumPages?this._actualNumPages:this._pagesCount}},{key:"destinations",get:function(){var e=this._readDests(),t=Object.create(null);if(e instanceof UC){var r,A=aE(e.getAll());try{for(A.s();!(r=A.n()).done;){var n=rE(r.value,2),i=n[0],a=lE(n[1]);a&&(t[Ie(i)]=a)}}catch(e){A.e(e)}finally{A.f()}}else e instanceof He&&e.forEach((function(e,r){var A=lE(r);A&&(t[e]=A)}));return _(this,"destinations",t)}},{key:"getDestination",value:function(e){var t=this._readDests();if(t instanceof UC){var r=lE(t.get(e));if(r)return r;var A=this.destinations[e];if(A)return q('Found "'.concat(e,'" at an incorrect position in the NameTree.')),A}else if(t instanceof He){var n=lE(t.get(e));if(n)return n}return null}},{key:"_readDests",value:function(){var e=this._catDict.get("Names");return null!=e&&e.has("Dests")?new UC(e.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}},{key:"pageLabels",get:function(){var e=null;try{e=this._readPageLabels()}catch(e){if(e instanceof Ct)throw e;q("Unable to read page labels.")}return _(this,"pageLabels",e)}},{key:"_readPageLabels",value:function(){var e=this._catDict.getRaw("PageLabels");if(!e)return null;for(var t=new Array(this.numPages),r=null,A="",n=new MC(e,this.xref).getAll(),i="",a=1,o=0,s=this.numPages;o=1))throw new re("Invalid start in PageLabel dictionary.");a=l}else a=1}switch(r){case"D":i=a;break;case"R":case"r":i=vt(a,"r"===r);break;case"A":case"a":var h="a"===r?97:65,I=a-1;i=String.fromCharCode(h+I%26).repeat(Math.floor(I/26)+1);break;default:if(r)throw new re('Invalid style "'.concat(r,'" in PageLabel dictionary.'));i=""}t[o]=A+i,a++}return t}},{key:"pageLayout",get:function(){var e=this._catDict.get("PageLayout"),t="";if(e instanceof Ue)switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return _(this,"pageLayout",t)}},{key:"pageMode",get:function(){var e=this._catDict.get("PageMode"),t="UseNone";if(e instanceof Ue)switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return _(this,"pageMode",t)}},{key:"viewerPreferences",get:function(){var e=this,t=this._catDict.get("ViewerPreferences");if(!(t instanceof He))return _(this,"viewerPreferences",null);var r,A=null,n=aE(t.getKeys());try{for(n.s();!(r=n.n()).done;){var i=r.value,a=t.get(i),o=void 0;switch(i){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof a&&(o=a);break;case"NonFullScreenPageMode":if(a instanceof Ue)switch(a.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":o=a.name;break;default:o="UseNone"}break;case"Direction":if(a instanceof Ue)switch(a.name){case"L2R":case"R2L":o=a.name;break;default:o="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(a instanceof Ue)switch(a.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":o=a.name;break;default:o="CropBox"}break;case"PrintScaling":if(a instanceof Ue)switch(a.name){case"None":case"AppDefault":o=a.name;break;default:o="AppDefault"}break;case"Duplex":if(a instanceof Ue)switch(a.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":o=a.name;break;default:o="None"}break;case"PrintPageRange":Array.isArray(a)&&a.length%2==0&&a.every((function(t,r,A){return Number.isInteger(t)&&t>0&&(0===r||t>=A[r-1])&&t<=e.numPages}))&&(o=a);break;case"NumCopies":Number.isInteger(a)&&a>0&&(o=a);break;default:q("Ignoring non-standard key in ViewerPreferences: ".concat(i,"."));continue}void 0!==o?(A||(A=Object.create(null)),A[i]=o):q('Bad value, for key "'.concat(i,'", in ViewerPreferences: ').concat(a,"."))}}catch(e){n.e(e)}finally{n.f()}return _(this,"viewerPreferences",A)}},{key:"openAction",get:function(){var t=this._catDict.get("OpenAction"),r=Object.create(null);if(t instanceof He){var A=new He(this.xref);A.set("A",t);var n={url:null,dest:null,action:null};e.parseDestDictionary({destDict:A,resultObj:n}),Array.isArray(n.dest)?r.dest=n.dest:n.action&&(r.action=n.action)}else Array.isArray(t)&&(r.dest=t);return _(this,"openAction",oe(r)>0?r:null)}},{key:"attachments",get:function(){var e=this._catDict.get("Names"),t=null;if(e instanceof He&&e.has("EmbeddedFiles")){var r,A=aE(new UC(e.getRaw("EmbeddedFiles"),this.xref).getAll());try{for(A.s();!(r=A.n()).done;){var n=rE(r.value,2),i=n[0],a=n[1],o=new TC(a,this.xref);t||(t=Object.create(null)),t[Ie(i)]=o.serializable}}catch(e){A.e(e)}finally{A.f()}}return _(this,"attachments",t)}},{key:"xfaImages",get:function(){var e=this._catDict.get("Names"),t=null;if(e instanceof He&&e.has("XFAImages")){var r,A=aE(new UC(e.getRaw("XFAImages"),this.xref).getAll());try{for(A.s();!(r=A.n()).done;){var n=rE(r.value,2),i=n[0],a=n[1];t||(t=new He(this.xref)),t.set(Ie(i),a)}}catch(e){A.e(e)}finally{A.f()}}return _(this,"xfaImages",t)}},{key:"_collectJavaScript",value:function(){var e=this._catDict.get("Names"),t=null;function r(e,r){if(r instanceof He&&Ke(r.get("S"),"JavaScript")){var A=r.get("JS");if(A instanceof ze)A=A.getString();else if("string"!=typeof A)return;(A=Ie(A).replaceAll("\\0",""))&&(t||(t=new Map)).set(e,A)}}if(e instanceof He&&e.has("JavaScript")){var A,n=aE(new UC(e.getRaw("JavaScript"),this.xref).getAll());try{for(n.s();!(A=n.n()).done;){var i=rE(A.value,2),a=i[0],o=i[1];r(Ie(a),o)}}catch(e){n.e(e)}finally{n.f()}}var s=this._catDict.get("OpenAction");return s&&r("OpenAction",s),t}},{key:"jsActions",get:function(){var e=this._collectJavaScript(),t=Mt(this.xref,this._catDict,k);if(e){t||(t=Object.create(null));var r,A=aE(e);try{for(A.s();!(r=A.n()).done;){var n=rE(r.value,2),i=n[0],a=n[1];i in t?t[i].push(a):t[i]=[a]}}catch(e){A.e(e)}finally{A.f()}}return _(this,"jsActions",t)}},{key:"fontFallback",value:(n=tE($Q().mark((function e(t,r){var A,n,i,a;return $Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.fontCache);case 2:A=e.sent,n=aE(A),e.prev=4,n.s();case 6:if((i=n.n()).done){e.next=13;break}if((a=i.value).loadedName!==t){e.next=11;break}return a.fallback(r),e.abrupt("return");case 11:e.next=6;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(4),n.e(e.t0);case 18:return e.prev=18,n.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[4,15,18,21]])}))),function(e,t){return n.apply(this,arguments)})},{key:"cleanup",value:(A=tE($Q().mark((function e(){var t,r,A,n,i=arguments;return $Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]&&i[0],JC(),this.globalImageCache.clear(t),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.pageDictCache.clear(),this.nonBlendModesSet.clear(),e.next=9,Promise.all(this.fontCache);case 9:r=e.sent,A=aE(r);try{for(A.s();!(n=A.n()).done;)delete n.value.dict.cacheKey}catch(e){A.e(e)}finally{A.f()}this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear();case 16:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getPageDict",value:(r=tE($Q().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E;return $Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[this.toplevelPagesDict],A=new Pe,(n=this._catDict.getRaw("Pages"))instanceof Ye&&A.put(n),i=this.xref,a=this.pageKidsCountCache,o=this.pageIndexCache,s=this.pageDictCache,c=0;case 6:if(!r.length){e.next=67;break}if(!((g=r.pop())instanceof Ye)){e.next=34;break}if(!((u=a.get(g))>=0&&c+u<=t)){e.next=13;break}return c+=u,e.abrupt("continue",6);case 13:if(!A.has(g)){e.next=15;break}throw new re("Pages tree contains circular reference.");case 15:return A.put(g),e.next=18,s.get(g)||i.fetchAsync(g);case 18:if(!((l=e.sent)instanceof He)){e.next=32;break}if(!((h=l.getRaw("Type"))instanceof Ye)){e.next=25;break}return e.next=24,i.fetchAsync(h);case 24:h=e.sent;case 25:if(!Ke(h,"Page")&&l.has("Kids")){e.next=32;break}if(a.has(g)||a.put(g,1),o.has(g)||o.put(g,c),c!==t){e.next=30;break}return e.abrupt("return",[l,g]);case 30:return c++,e.abrupt("continue",6);case 32:return r.push(l),e.abrupt("continue",6);case 34:if(g instanceof He){e.next=36;break}throw new re("Page dictionary kid reference points to wrong type of object.");case 36:if(I=g.objId,!((f=g.getRaw("Count"))instanceof Ye)){e.next=42;break}return e.next=41,i.fetchAsync(f);case 41:f=e.sent;case 42:if(!(Number.isInteger(f)&&f>=0)){e.next=47;break}if(I&&!a.has(I)&&a.put(I,f),!(c+f<=t)){e.next=47;break}return c+=f,e.abrupt("continue",6);case 47:if(!((C=g.getRaw("Kids"))instanceof Ye)){e.next=52;break}return e.next=51,i.fetchAsync(C);case 51:C=e.sent;case 52:if(Array.isArray(C)){e.next=64;break}if(!((B=g.getRaw("Type"))instanceof Ye)){e.next=58;break}return e.next=57,i.fetchAsync(B);case 57:B=e.sent;case 58:if(!Ke(B,"Page")&&g.has("Kids")){e.next=63;break}if(c!==t){e.next=61;break}return e.abrupt("return",[g,null]);case 61:return c++,e.abrupt("continue",6);case 63:throw new re("Page dictionary kids object is not an array.");case 64:for(Q=C.length-1;Q>=0;Q--)E=C[Q],r.push(E),g===this.toplevelPagesDict&&E instanceof Ye&&!s.has(E)&&s.put(E,i.fetchAsync(E));e.next=6;break;case 67:throw new Error("Page index ".concat(t," not found."));case 68:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getAllPageDicts",value:(t=tE($Q().mark((function e(){var t,r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E=arguments;return $Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=function(e){if(e instanceof Qt&&!t)throw e;t&&r&&0===c&&(q('getAllPageDicts - Skipping invalid first page: "'.concat(e,'".')),e=He.empty),a.set(c++,[e,null])},g=function(e,t){t&&!s.has(t)&&s.put(t,c),a.set(c++,[e,t])},t=E.length>0&&void 0!==E[0]&&E[0],r=this.pdfManager.evaluatorOptions.ignoreErrors,A=[{currentNode:this.toplevelPagesDict,posInKids:0}],n=new Pe,(i=this._catDict.getRaw("Pages"))instanceof Ye&&n.put(i),a=new Map,o=this.xref,s=this.pageIndexCache,c=0;case 10:if(!(A.length>0)){e.next=70;break}if(l=A.at(-1),h=l.currentNode,I=l.posInKids,!((f=h.getRaw("Kids"))instanceof Ye)){e.next=25;break}return e.prev=15,e.next=18,o.fetchAsync(f);case 18:f=e.sent,e.next=25;break;case 21:return e.prev=21,e.t0=e.catch(15),u(e.t0),e.abrupt("break",70);case 25:if(Array.isArray(f)){e.next=28;break}return u(new re("Page dictionary kids object is not an array.")),e.abrupt("break",70);case 28:if(!(I>=f.length)){e.next=31;break}return A.pop(),e.abrupt("continue",10);case 31:if(C=f[I],B=void 0,!(C instanceof Ye)){e.next=50;break}if(!n.has(C)){e.next=37;break}return u(new re("Pages tree contains circular reference.")),e.abrupt("break",70);case 37:return n.put(C),e.prev=38,e.next=41,o.fetchAsync(C);case 41:B=e.sent,e.next=48;break;case 44:return e.prev=44,e.t1=e.catch(38),u(e.t1),e.abrupt("break",70);case 48:e.next=51;break;case 50:B=C;case 51:if(B instanceof He){e.next=54;break}return u(new re("Page dictionary kid reference points to wrong type of object.")),e.abrupt("break",70);case 54:if(!((Q=B.getRaw("Type"))instanceof Ye)){e.next=66;break}return e.prev=56,e.next=59,o.fetchAsync(Q);case 59:Q=e.sent,e.next=66;break;case 62:return e.prev=62,e.t2=e.catch(56),u(e.t2),e.abrupt("break",70);case 66:Ke(Q,"Page")||!B.has("Kids")?g(B,C instanceof Ye?C:null):A.push({currentNode:B,posInKids:0}),l.posInKids++,e.next=10;break;case 70:return e.abrupt("return",a);case 71:case"end":return e.stop()}}),e,this,[[15,21],[38,44],[56,62]])}))),function(){return t.apply(this,arguments)})},{key:"getPageIndex",value:function(e){var t=this,r=this.pageIndexCache.get(e);if(void 0!==r)return Promise.resolve(r);var A=this.xref,n=0,i=function(r){return function(t){var r,n=0;return A.fetchAsync(t).then((function(A){if(je(t,e)&&!qe(A,"Page")&&!(A instanceof He&&!A.has("Type")&&A.has("Contents")))throw new re("The reference does not point to a /Page dictionary.");if(!A)return null;if(!(A instanceof He))throw new re("Node must be a dictionary.");return r=A.getRaw("Parent"),A.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(e instanceof He))throw new re("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;var i,a=[],o=!1,s=aE(e);try{for(s.s();!(i=s.n()).done;){var c=i.value;if(!(c instanceof Ye))throw new re("Kid must be a reference.");if(je(c,t)){o=!0;break}a.push(A.fetchAsync(c).then((function(e){if(!(e instanceof He))throw new re("Kid node must be a dictionary.");e.has("Count")?n+=e.get("Count"):n++})))}}catch(e){s.e(e)}finally{s.f()}if(!o)throw new re("Kid reference not found in parent's kids.");return Promise.all(a).then((function(){return[n,r]}))}))}(r).then((function(r){if(!r)return t.pageIndexCache.put(e,n),n;var A=rE(r,2),a=A[0],o=A[1];return n+=a,i(o)}))};return i(e)}},{key:"baseUrl",get:function(){var e=this._catDict.get("URI");if(e instanceof He){var t=e.get("Base");if("string"==typeof t){var r=Z(t,null,{tryConvertEncoding:!0});if(r)return _(this,"baseUrl",r.href)}}return _(this,"baseUrl",this.pdfManager.docBaseUrl)}}],[{key:"parseDestDictionary",value:function(e){var t=e.destDict,r=e.resultObj,A=e.docBaseUrl,n=void 0===A?null:A,i=e.docAttachments,a=void 0===i?null:i;if(t instanceof He){var o,s,c=t.get("A");if(c instanceof He||(t.has("Dest")?c=t.get("Dest"):(c=t.get("AA"))instanceof He&&(c.has("D")?c=c.get("D"):c.has("U")&&(c=c.get("U")))),c instanceof He){var g=c.get("S");if(!(g instanceof Ue))return void q("parseDestDictionary: Invalid type in Action dictionary.");var u=g.name;switch(u){case"ResetForm":var l,h=c.get("Flags"),I=0==(1&("number"==typeof h?h:0)),f=[],C=[],B=aE(c.get("Fields")||[]);try{for(B.s();!(l=B.n()).done;){var Q=l.value;Q instanceof Ye?C.push(Q.toString()):"string"==typeof Q&&f.push(Ie(Q))}}catch(e){B.e(e)}finally{B.f()}r.resetForm={fields:f,refs:C,include:I};break;case"URI":(o=c.get("URI"))instanceof Ue&&(o="/"+o.name);break;case"GoTo":s=c.get("D");break;case"Launch":case"GoToR":var E=c.get("F");E instanceof He?o=new TC(E,null,!0).serializable.rawFilename:"string"==typeof E&&(o=E);var d=hE(c);d&&"string"==typeof o&&(o=o.split("#",1)[0]+"#"+d);var y=c.get("NewWindow");"boolean"==typeof y&&(r.newWindow=y);break;case"GoToE":var p,v=c.get("T");if(a&&v instanceof He){var m=v.get("R"),w=v.get("N");Ke(m,"C")&&"string"==typeof w&&(p=a[Ie(w)])}if(p){r.attachment=p;var b=hE(c);b&&(r.attachmentDest=b)}else q('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":var k=c.get("N");k instanceof Ue&&(r.action=k.name);break;case"SetOCGState":var D=c.get("State"),S=c.get("PreserveRB");if(!Array.isArray(D)||0===D.length)break;var F,x=[],R=aE(D);try{for(R.s();!(F=R.n()).done;){var G=F.value;if(G instanceof Ue)switch(G.name){case"ON":case"OFF":case"Toggle":x.push(G.name)}else G instanceof Ye&&x.push(G.toString())}}catch(e){R.e(e)}finally{R.f()}if(x.length!==D.length)break;r.setOCGState={state:x,preserveRB:"boolean"!=typeof S||S};break;case"JavaScript":var N,L=c.get("JS");L instanceof ze?N=L.getString():"string"==typeof L&&(N=L);var U=N&&Kt(Ie(N));if(U){o=U.url,r.newWindow=U.newWindow;break}default:if("JavaScript"===u||"SubmitForm"===u)break;q('parseDestDictionary - unsupported action: "'.concat(u,'".'))}}else t.has("Dest")&&(s=t.get("Dest"));if("string"==typeof o){var M=Z(o,n,{addDefaultProtocol:!0,tryConvertEncoding:!0});M&&(r.url=M.href),r.unsafeUrl=o}s&&(s instanceof Ue&&(s=s.name),"string"==typeof s?r.dest=Ie(s):uE(s)&&(r.dest=s))}else q("parseDestDictionary: \`destDict\` must be a dictionary.")}}]);var t,r,A,n}();function CE(e){var t=this.xref.fetch(e),r={id:e.toString(),name:null,intent:null,usage:{print:null,view:null}},A=t.get("Name");"string"==typeof A&&(r.name=Ie(A));var n=t.getArray("Intent");Array.isArray(n)||(n=[n]),n.every((function(e){return e instanceof Ue}))&&(r.intent=n.map((function(e){return e.name})));var i=t.get("Usage");if(!(i instanceof He))return r;var a=r.usage,o=i.get("Print");if(o instanceof He){var s=o.get("PrintState");if(s instanceof Ue)switch(s.name){case"ON":case"OFF":a.print={printState:s.name}}}var c=i.get("View");if(c instanceof He){var g=c.get("ViewState");if(g instanceof Ue)switch(g.name){case"ON":case"OFF":a.view={viewState:g.name}}}return r}function BE(e,t){function r(e){var r=[];if(Array.isArray(e)){var A,n=aE(e);try{for(n.s();!(A=n.n()).done;){var i=A.value;i instanceof Ye&&t.has(i)&&r.push(i.toString())}}catch(e){n.e(e)}finally{n.f()}}return r}function A(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Array.isArray(e))return null;var A,i=[],o=aE(e);try{for(o.s();!(A=o.n()).done;){var s=A.value;if(s instanceof Ye&&t.has(s))a.put(s),i.push(s.toString());else{var c=n(s,r);c&&i.push(c)}}}catch(e){o.e(e)}finally{o.f()}if(r>0)return i;var g,u=[],l=aE(t);try{for(l.s();!(g=l.n()).done;){var h=g.value;a.has(h)||u.push(h.toString())}}catch(e){l.e(e)}finally{l.f()}return u.length&&i.push({name:null,order:u}),i}function n(e,t){if(++t>o)return q("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;var r=i.fetchIfRef(e);if(!Array.isArray(r))return null;var n=i.fetchIfRef(r[0]);if("string"!=typeof n)return null;var a=A(r.slice(1),t);return a&&a.length?{name:Ie(n),order:a}:null}var i=this.xref,a=new Pe,o=10;return{name:"string"==typeof e.get("Name")?Ie(e.get("Name")):null,creator:"string"==typeof e.get("Creator")?Ie(e.get("Creator")):null,baseState:e.get("BaseState")instanceof Ue?e.get("BaseState").name:null,on:r(e.get("ON")),off:r(e.get("OFF")),order:A(e.get("Order")),groups:null}}function QE(){QE=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function EE(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function dE(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){EE(i,A,n,a,o,"next",e)}function o(e){EE(i,A,n,a,o,"throw",e)}a(void 0)}))}}function yE(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function mE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);re.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]?arguments[1]:"0";if(t||(t="0"),!e)return ey(t);var r=e.trim().match(Zd);if(!r)return ey(t);var A=qd(r,3),n=A[1],i=A[2],a=parseFloat(n);if(isNaN(a))return ey(t);if(0===a)return 0;var o=Wd[i];return o?o(a):a}function ty(e){if(!e)return{num:1,den:1};var t=e.trim().split(/\\s*:\\s*/).map((function(e){return parseFloat(e)})).filter((function(e){return!isNaN(e)}));if(1===t.length&&t.push(1),0===t.length)return{num:1,den:1};var r=qd(t,2);return{num:r[0],den:r[1]}}function ry(e){return e?e.trim().split(/\\s+/).map((function(e){return{excluded:"-"===e[0],viewname:e.substring(1)}})):[]}var Ay=function(){function e(t,r,A,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.success=t,this.html=r,this.bbox=A,this.breakNode=n}return function(e,t,r){return t&&Kd(e.prototype,t),r&&Kd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"isBreak",value:function(){return!!this.breakNode}}],[{key:"FAILURE",get:function(){return _(this,"FAILURE",new e(!1,null,null,null))}},{key:"EMPTY",get:function(){return _(this,"EMPTY",new e(!0,null,null,null))}},{key:"breakNode",value:function(t){return new e(!1,null,null,t)}},{key:"success",value:function(t){return new e(!0,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,null)}}])}();function ny(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||ay(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iy(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ay(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ay(e,t){if(e){if("string"==typeof e)return oy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oy(e,t):void 0}}function oy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,A=iy(e);try{for(A.s();!(t=A.n()).done;){var n=t.value;this.addPdfFont(n)}}catch(e){A.e(e)}finally{A.f()}var i,a=iy(this.fonts.values());try{for(a.s();!(i=a.n()).done;){var o=i.value;o.regular||(o.regular=o.italic||o.bold||o.bolditalic)}}catch(e){a.e(e)}finally{a.f()}if(r&&0!==r.size){var s,c=this.fonts.get("PdfJS-Fallback-PdfJS-XFA"),g=iy(r);try{for(g.s();!(s=g.n()).done;){var u=s.value;this.fonts.set(u,c)}}catch(e){g.e(e)}finally{g.f()}}}},{key:"addPdfFont",value:function(e){var t=e.cssFontInfo,r=t.fontFamily,A=this.fonts.get(r);A||(A=Object.create(null),this.fonts.set(r,A),this.defaultFont||(this.defaultFont=A));var n,i,a,o="",s=parseFloat(t.fontWeight);0!==parseFloat(t.italicAngle)?o=s>=700?"bolditalic":"italic":s>=700&&(o="bold"),o||((e.name.includes("Bold")||null!==(n=e.psName)&&void 0!==n&&n.includes("Bold"))&&(o="bold"),(e.name.includes("Italic")||e.name.endsWith("It")||null!==(i=e.psName)&&void 0!==i&&i.includes("Italic")||null!==(a=e.psName)&&void 0!==a&&a.endsWith("It"))&&(o+="italic")),o||(o="regular"),A[o]=e}},{key:"getDefault",value:function(){return this.defaultFont}},{key:"find",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.fonts.get(e)||this.cache.get(e);if(r)return r;var A=/,|-|_| |bolditalic|bold|italic|regular|it/gi,n=e.replaceAll(A,"");if(r=this.fonts.get(n))return this.cache.set(e,r),r;n=n.toLowerCase();var i,a=[],o=iy(this.fonts.entries());try{for(o.s();!(i=o.n()).done;){var s=ny(i.value,2),c=s[0],g=s[1];c.replaceAll(A,"").toLowerCase().startsWith(n)&&a.push(g)}}catch(e){o.e(e)}finally{o.f()}if(0===a.length){var u,l=iy(this.fonts.entries());try{for(l.s();!(u=l.n()).done;){var h,I=ny(u.value,2)[1];null!==(h=I.regular.name)&&void 0!==h&&h.replaceAll(A,"").toLowerCase().startsWith(n)&&a.push(I)}}catch(e){l.e(e)}finally{l.f()}}if(0===a.length){n=n.replaceAll(/psmt|mt/gi,"");var f,C=iy(this.fonts.entries());try{for(C.s();!(f=C.n()).done;){var B=ny(f.value,2),Q=B[0],E=B[1];Q.replaceAll(A,"").toLowerCase().startsWith(n)&&a.push(E)}}catch(e){C.e(e)}finally{C.f()}}if(0===a.length){var d,y=iy(this.fonts.values());try{for(y.s();!(d=y.n()).done;){var p,v=d.value;null!==(p=v.regular.name)&&void 0!==p&&p.replaceAll(A,"").toLowerCase().startsWith(n)&&a.push(v)}}catch(e){y.e(e)}finally{y.f()}}return a.length>=1?(1!==a.length&&t&&q("XFA - Too many choices to guess the correct font: ".concat(e)),this.cache.set(e,a[0]),a[0]):(t&&!this.warned.has(e)&&(this.warned.add(e),q("XFA - Cannot find the font: ".concat(e))),null)}}])}();function uy(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}function ly(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Iy(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function hy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||Iy(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iy(e,t){if(e){if("string"==typeof e)return fy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fy(e,t):void 0}}function fy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);re?(A=Math.max(A,i),i=0,n+=a,a=C,t=-1,r=0,o=!0,s=!1):(a=Math.max(C,a),r=i,i+=l,t=c):i+l>e?(n+=a,a=C,-1!==t?(c=t,A=Math.max(A,r),i=0,t=-1,r=0):(A=Math.max(A,i),i=l),o=!0,s=!1):(i+=l,a=Math.max(C,a))}return{width:1.02*(A=Math.max(A,i)),height:n+=a+this.extraHeight,isBroken:o}}}])}();function vy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||my(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function my(e,t){if(e){if("string"==typeof e)return wy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wy(e,t):void 0}}function wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r2&&void 0!==arguments[2])||arguments[2],A=e.match(by);if(!A)return null;for(var n,i=vy(A,1)[0],a=[{name:i,cacheName:"."+i,index:0,js:null,formCalc:null,operator:Dy.dot}],o=i.length;o4&&void 0!==arguments[4])||arguments[4],n=xy(r,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]);if(!n)return null;var i,a=Sy.get(n[0].name),o=0;a?(i=!0,e=[a(e,t)],o=1):(i=null===t,e=[t||e]);for(var s,c=function(){var r,a=n[o],s=a.name,c=a.cacheName,g=a.operator,u=a.index,l=[],h=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=my(e))){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(h.s();!(r=h.n()).done;){var I=r.value;if(I.isXFAObject){var f=void 0,C=void 0;if(A&&((C=Fy.get(I))||(C=new Map,Fy.set(I,C)),f=C.get(c)),!f){switch(g){case Dy.dot:f=I[jE](s,!1);break;case Dy.dotDot:f=I[jE](s,!0);break;case Dy.dotHash:f=(f=I[qE](s)).isXFAObjectArray?f.children:[f]}A&&C.set(c,f)}f.length>0&&l.push(f)}}}catch(e){h.e(e)}finally{h.f()}if(0===l.length&&!i&&0===o){var B=t[td]();return(t=B)?(o=-1,e=[t],0):{v:null}}e=isFinite(u)?l.filter((function(e){return u=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Ky(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ty(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Ty(e,t){if(e){if("string"==typeof e)return qy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qy(e,t):void 0}}function qy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r2&&void 0!==arguments[2]&&arguments[2];jy(this,e),this[Qd]=t,this[Ed]=r,this[ap]=A,this[cp]=null,this[$y]=[],this[Yd]="".concat(r).concat(hp++),this[Ad]=null}return Zy(e,[{key:"isXFAObject",get:function(){return!0}},{key:"isXFAObjectArray",get:function(){return!1}},{key:"createNodes",value:function(e){var t,r=this,A=null,n=Ky(e);try{for(n.s();!(t=n.n()).done;){for(var i=t.value,a=i.name,o=i.index,s=0,c=isFinite(o)?o:0;s<=c;s++){var g=r[Qd]===Ip?-1:r[Qd];A=new Qp(g,a),r[SE](A)}r=A}}catch(e){n.e(e)}finally{n.f()}return A}},{key:yd,value:function(e){if(!this[ap]||!this[pd](e))return!1;var t=e[Ed],r=this[t];if(!(r instanceof Cp))return null!==r&&this[kd](r),this[t]=e,this[SE](e),!0;if(r.push(e))return this[SE](e),!0;var A="";return this.id?A=" (id: ".concat(this.id,")"):this.name&&(A=" (name: ".concat(this.name," ").concat(this.h.value,")")),q('XFA - node "'.concat(this[Ed],'"').concat(A,' has already enough "').concat(t,'"!')),!1}},{key:pd,value:function(e){return this.hasOwnProperty(e[Ed])&&e[Qd]===this[Qd]}},{key:ld,value:function(){return!1}},{key:kE,value:function(){return!1}},{key:sd,value:function(){return!1}},{key:cd,value:function(){return!1}},{key:wd,value:function(){this.para&&this[rd]()[HE].paraStack.pop()}},{key:bd,value:function(){this[rd]()[HE].paraStack.push(this.para)}},{key:xd,value:function(e){this.id&&this[Qd]===Od.template.id&&e.set(this.id,this)}},{key:rd,value:function(){return this[Ad].template}},{key:hd,value:function(){return!1}},{key:Id,value:function(){return!1}},{key:SE,value:function(e){e[cp]=this,this[$y].push(e),!e[Ad]&&this[Ad]&&(e[Ad]=this[Ad])}},{key:kd,value:function(e){var t=this[$y].indexOf(e);this[$y].splice(t,1)}},{key:nd,value:function(){return this.hasOwnProperty("value")}},{key:Gd,value:function(e){}},{key:vd,value:function(e){}},{key:YE,value:function(){}},{key:xE,value:function(e){delete this[ap],this[GE]&&(e.clean(this[GE]),delete this[GE])}},{key:ad,value:function(e){return this[$y].indexOf(e)}},{key:od,value:function(e,t){t[cp]=this,this[$y].splice(e,0,t),!t[Ad]&&this[Ad]&&(t[Ad]=this[Ad])}},{key:fd,value:function(){return!this.name}},{key:Bd,value:function(){return""}},{key:Ld,value:function(){return 0===this[$y].length?this[UE]:this[$y].map((function(e){return e[Ld]()})).join("")}},{key:zy,get:function(){var t=Object.getPrototypeOf(this);if(!t._attributes){var r,A=t._attributes=new Set,n=Ky(Object.getOwnPropertyNames(this));try{for(n.s();!(r=n.n()).done;){var i=r.value;if(null===this[i]||this[i]instanceof e||this[i]instanceof Cp)break;A.add(i)}}catch(e){n.e(e)}finally{n.f()}}return _(this,zy,t._attributes)}},{key:ud,value:function(e){for(var t=this;t;){if(t===e)return!0;t=t[td]()}return!1}},{key:td,value:function(){return this[cp]}},{key:ed,value:function(){return this[td]()}},{key:VE,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this[e]:this[$y]}},{key:JE,value:function(){var t=Object.create(null);this[UE]&&(t.$content=this[UE]);var r,A=Ky(Object.getOwnPropertyNames(this));try{for(A.s();!(r=A.n()).done;){var n=r.value,i=this[n];null!==i&&(i instanceof e?t[n]=i[JE]():i instanceof Cp?i.isEmpty()||(t[n]=i.dump()):t[n]=i)}}catch(e){A.e(e)}finally{A.f()}return t}},{key:Hd,value:function(){return null}},{key:Md,value:function(){return Ay.EMPTY}},{key:zE,value:Oy().mark((function e(){var t,r,A;return Oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ky(this[VE]()),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return A=r.value,e.next=7,A;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:Ap,value:Oy().mark((function e(t,r){var A,n,i,a,o;return Oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A=Ky(this[zE]()),e.prev=1,A.s();case 3:if((n=A.n()).done){e.next=13;break}if(i=n.value,t&&r!==t.has(i[Ed])){e.next=11;break}return a=this[TE](),(o=i[Md](a)).success||(this[HE].failingNode=i),e.next=11,o;case 11:e.next=3;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),A.e(e.t0);case 18:return e.prev=18,A.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[1,15,18,21]])}))},{key:PE,value:function(){return null}},{key:DE,value:function(e,t){this[HE].children.push(e)}},{key:TE,value:function(){}},{key:FE,value:function(e){var t=e.filter,r=void 0===t?null:t,A=e.include,n=void 0===A||A;if(this[HE].generator){var i=this[TE](),a=this[HE].failingNode[Md](i);if(!a.success)return a;a.html&&this[DE](a.html,a.bbox),delete this[HE].failingNode}else this[HE].generator=this[Ap](r,n);for(;;){var o=this[HE].generator.next();if(o.done)break;var s=o.value;if(!s.success)return s;s.html&&this[DE](s.html,s.bbox)}return this[HE].generator=null,Ay.EMPTY}},{key:Rd,value:function(e){this[up]=new Set(Object.keys(e))}},{key:ip,value:function(e){var t=this[zy],r=this[up];return function(e){return function(e){if(Array.isArray(e))return qy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ty(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e).filter((function(e){return t.has(e)&&!r.has(e)}))}},{key:Sd,value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,A=Ky(this[$y]);try{for(A.s();!(t=A.n()).done;)t.value[gp](e,r)}catch(e){A.e(e)}finally{A.f()}}},{key:gp,value:function(e,t){var r=this[np](e,t);r?this[Xy](r,e,t):this[Sd](e,t)}},{key:np,value:function(e,t){var r=this.use,A=this.usehref;if(!r&&!A)return null;var n=null,i=null,a=null,o=r;if(A?(o=A,A.startsWith("#som(")&&A.endsWith(")")?i=A.slice(5,-1):A.startsWith(".#som(")&&A.endsWith(")")?i=A.slice(6,-1):A.startsWith("#")?a=A.slice(1):A.startsWith(".#")&&(a=A.slice(2))):r.startsWith("#")?a=r.slice(1):i=r,this.use=this.usehref="",a?n=e.get(a):(n=Ry(e.get(Dd),this,i,!0,!1))&&(n=n[0]),!n)return q("XFA - Invalid prototype reference: ".concat(o,".")),null;if(n[Ed]!==this[Ed])return q("XFA - Incompatible prototype: ".concat(n[Ed]," !== ").concat(this[Ed],".")),null;if(t.has(n))return q("XFA - Cycle detected in prototypes use."),null;t.add(n);var s=n[np](e,t);return s&&n[Xy](s,e,t),n[Sd](e,t),t.delete(n),n}},{key:Xy,value:function(e,t,r){if(r.has(e))q("XFA - Cycle detected in prototypes use.");else{!this[UE]&&e[UE]&&(this[UE]=e[UE]),new Set(r).add(e);var A,n=Ky(this[ip](e[up]));try{for(n.s();!(A=n.n()).done;){var i=A.value;this[i]=e[i],this[up]&&this[up].add(i)}}catch(e){n.e(e)}finally{n.f()}var a,o=Ky(Object.getOwnPropertyNames(this));try{for(o.s();!(a=o.n()).done;){var s=a.value;if(!this[zy].has(s)){var c=this[s],g=e[s];if(c instanceof Cp){var u,l=Ky(c[$y]);try{for(l.s();!(u=l.n()).done;)u.value[gp](t,r)}catch(e){l.e(e)}finally{l.f()}for(var h=c[$y].length,I=g[$y].length;h0&&void 0!==arguments[0]?arguments[0]:null;return e?this[$y].filter((function(t){return t[Ed]===e})):this[$y]}},{key:qE,value:function(e){return this[e]}},{key:jE,value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Array.from(this[WE](e,t,r))}},{key:WE,value:function(e,t){var r=this,A=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Oy().mark((function n(){var i,a,o;return Oy().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("parent"!==e){n.next=4;break}return n.next=3,r[cp];case 3:return n.abrupt("return");case 4:i=Ky(r[$y]),n.prev=5,i.s();case 7:if((a=i.n()).done){n.next=19;break}if((o=a.value)[Ed]!==e){n.next=12;break}return n.next=12,o;case 12:if(o.name!==e){n.next=15;break}return n.next=15,o;case 15:if(!t&&!o[fd]()){n.next=17;break}return n.delegateYield(o[WE](e,t,!1),"t0",17);case 17:n.next=7;break;case 19:n.next=24;break;case 21:n.prev=21,n.t1=n.catch(5),i.e(n.t1);case 24:return n.prev=24,i.f(),n.finish(24);case 27:if(!A||!r[zy].has(e)){n.next=30;break}return n.next=30,new Bp(r,e,r[e]);case 30:case"end":return n.stop()}}),n,null,[[5,21,24,27]])}))()}}],[{key:ep,value:function(t){return Array.isArray(t)?t.map((function(t){return e[ep](t)})):"object"==typeof t&&null!==t?Object.assign({},t):t}}])}(),Cp=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0;jy(this,e),this[op]=t,this[$y]=[]}return Zy(e,[{key:"isXFAObject",get:function(){return!1}},{key:"isXFAObjectArray",get:function(){return!0}},{key:"push",value:function(e){return this[$y].length<=this[op]?(this[$y].push(e),!0):(q('XFA - node "'.concat(e[Ed],'" accepts no more than ').concat(this[op]," children")),!1)}},{key:"isEmpty",value:function(){return 0===this[$y].length}},{key:"dump",value:function(){return 1===this[$y].length?this[$y][0][JE]():this[$y].map((function(e){return e[JE]()}))}},{key:NE,value:function(){var t=new e(this[op]);return t[$y]=this[$y].map((function(e){return e[NE]()})),t}},{key:"children",get:function(){return this[$y]}},{key:"clear",value:function(){this[$y].length=0}}])}(),Bp=function(){return Zy((function e(t,r,A){jy(this,e),this[cp]=t,this[Ed]=r,this[UE]=A,this[LE]=!1,this[Yd]="attribute".concat(hp++)}),[{key:td,value:function(){return this[cp]}},{key:gd,value:function(){return!0}},{key:ZE,value:function(){return this[UE].trim()}},{key:Gd,value:function(e){e=e.value||"",this[UE]=e.toString()}},{key:Ld,value:function(){return this[UE]}},{key:ud,value:function(e){return this[cp]===e||this[cp][ud](e)}}])}(),Qp=function(e){function t(e,r){var A,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(jy(this,t),(A=My(this,t,[e,r]))[UE]="",A[tp]=null,"#text"!==r){var i=new Map;A[Vy]=i;for(var a=0,o=Object.entries(n);a"),this[UE])"string"==typeof this[UE]?e.push(Yt(this[UE])):this[UE][Jd](e);else{var g,u=Ky(this[$y]);try{for(u.s();!(g=u.n()).done;)g.value[Jd](e)}catch(e){u.e(e)}finally{u.f()}}e.push(""))}else e.push("/>")}else e.push(Yt(this[UE]))}},{key:yd,value:function(e){if(this[UE]){var r=new t(this[Qd],"#text");this[SE](r),r[UE]=this[UE],this[UE]=""}return this[SE](e),!0}},{key:vd,value:function(e){this[UE]+=e}},{key:YE,value:function(){if(this[UE]&&this[$y].length>0){var e=new t(this[Qd],"#text");this[SE](e),e[UE]=this[UE],delete this[UE]}}},{key:Md,value:function(){return"#text"===this[Ed]?Ay.success({name:"#text",value:this[UE]}):Ay.EMPTY}},{key:VE,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this[$y].filter((function(t){return t[Ed]===e})):this[$y]}},{key:KE,value:function(){return this[Vy]}},{key:qE,value:function(e){var t=this[Vy].get(e);return void 0!==t?t:this[VE](e)}},{key:WE,value:Oy().mark((function(e,t){var r,A,n,i;return Oy().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(r=this[Vy].get(e))){a.next=4;break}return a.next=4,r;case 4:A=Ky(this[$y]),a.prev=5,A.s();case 7:if((n=A.n()).done){a.next=16;break}if((i=n.value)[Ed]!==e){a.next=12;break}return a.next=12,i;case 12:if(!t){a.next=14;break}return a.delegateYield(i[WE](e,t),"t0",14);case 14:a.next=7;break;case 16:a.next=21;break;case 18:a.prev=18,a.t1=a.catch(5),A.e(a.t1);case 21:return a.prev=21,A.f(),a.finish(21);case 24:case"end":return a.stop()}}),r,this,[[5,18,21,24]])}))},{key:OE,value:Oy().mark((function(e,t){var r,A,n,i;return Oy().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(r=this[Vy].get(e))||t&&r[LE]){a.next=4;break}return a.next=4,r;case 4:A=Ky(this[$y]),a.prev=5,A.s();case 7:if((n=A.n()).done){a.next=12;break}return i=n.value,a.delegateYield(i[OE](e,t),"t0",10);case 10:a.next=7;break;case 12:a.next=17;break;case 14:a.prev=14,a.t1=a.catch(5),A.e(a.t1);case 17:return a.prev=17,A.f(),a.finish(17);case 20:case"end":return a.stop()}}),r,this,[[5,14,17,20]])}))},{key:XE,value:Oy().mark((function e(t,r,A){var n,i,a;return Oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Ky(this[$y]),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=12;break}if((a=i.value)[Ed]!==t||A&&a[LE]){e.next=8;break}return e.next=8,a;case 8:if(!r){e.next=10;break}return e.delegateYield(a[XE](t,r,A),"t0",10);case 10:e.next=3;break;case 12:e.next=17;break;case 14:e.prev=14,e.t1=e.catch(1),n.e(e.t1);case 17:return e.prev=17,n.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[1,14,17,20]])}))},{key:gd,value:function(){return null===this[tp]?0===this[$y].length||this[$y][0][Qd]===Od.xhtml.id:this[tp]}},{key:ZE,value:function(){return null===this[tp]?0===this[$y].length?this[UE].trim():this[$y][0][Qd]===Od.xhtml.id?this[$y][0][Ld]().trim():null:this[UE].trim()}},{key:Gd,value:function(e){e=e.value||"",this[UE]=e.toString()}},{key:JE,value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object.create(null);e&&(t.$ns=this[Qd]),this[UE]&&(t.$content=this[UE]),t.$name=this[Ed],t.children=[];var r,A=Ky(this[$y]);try{for(A.s();!(r=A.n()).done;){var n=r.value;t.children.push(n[JE](e))}}catch(e){A.e(e)}finally{A.f()}t.attributes=Object.create(null);var i,a=Ky(this[Vy]);try{for(a.s();!(i=a.n()).done;){var o=Uy(i.value,2),s=o[0],c=o[1];t.attributes[s]=c[UE]}}catch(e){a.e(e)}finally{a.f()}return t}}])}(),Ep=function(e){function t(e,r){var A;return jy(this,t),(A=My(this,t,[e,r]))[UE]="",A}return Yy(t,fp),Zy(t,[{key:vd,value:function(e){this[UE]+=e}},{key:YE,value:function(){}}])}(),dp=function(e){function t(e,r,A){var n;return jy(this,t),(n=My(this,t,[e,r]))[sp]=A,n}return Yy(t,Ep),Zy(t,[{key:YE,value:function(){var e=this;this[UE]=zd({data:this[UE],defaultValue:this[sp][0],validate:function(t){return e[sp].includes(t)}})}},{key:xE,value:function(e){Ny(t,xE,this,3)([e]),delete this[sp]}}])}(),yp=function(e){function t(){return jy(this,t),My(this,t,arguments)}return Yy(t,Ep),Zy(t,[{key:YE,value:function(){this[UE]=this[UE].trim()}}])}(),pp=function(e){function t(e,r,A,n){var i;return jy(this,t),(i=My(this,t,[e,r]))[rp]=A,i[lp]=n,i}return Yy(t,Ep),Zy(t,[{key:YE,value:function(){this[UE]=Xd({data:this[UE],defaultValue:this[rp],validate:this[lp]})}},{key:xE,value:function(e){Ny(t,xE,this,3)([e]),delete this[rp],delete this[lp]}}])}(),vp=function(e){function t(e,r){return jy(this,t),My(this,t,[e,r,0,function(e){return 1===e}])}return Yy(t,pp),Zy(t)}(),mp=function(e){function t(e,r){return jy(this,t),My(this,t,[e,r,1,function(e){return 0===e}])}return Yy(t,pp),Zy(t)}();function wp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return bp(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bp(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&(t.minWidth=kp(e.minW)),e.maxW>0&&(t.maxWidth=kp(e.maxW)),e.minH>0&&(t.minHeight=kp(e.minH)),e.maxH>0&&(t.maxHeight=kp(e.maxH)))}function Fp(e,t,r,A,n,i){var a=new py(t,r,A,n);return"string"==typeof e?a.addString(e):e[md](a),a.compute(i)}function xp(e,t){var r=null,A=null,n=!1;if((!e.w||!e.h)&&e.value){var i=0,a=0;e.margin&&(i=e.margin.leftInset+e.margin.rightInset,a=e.margin.topInset+e.margin.bottomInset);var o=null,s=null;e.para&&(s=Object.create(null),o=""===e.para.lineHeight?null:e.para.lineHeight,s.top=""===e.para.spaceAbove?0:e.para.spaceAbove,s.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow,s.left=""===e.para.marginLeft?0:e.para.marginLeft,s.right=""===e.para.marginRight?0:e.para.marginRight);var c=e.font;if(!c)for(var g=e[rd](),u=e[td]();u&&u!==g;){if(u.font){c=u.font;break}u=u[td]()}var l=(e.w||t.width)-i,h=e[Ad].fontFinder;if(e.value.exData&&e.value.exData[UE]&&"text/html"===e.value.exData.contentType){var I=Fp(e.value.exData[UE],c,s,o,h,l);A=I.width,r=I.height,n=I.isBroken}else{var f=e.value[Ld]();if(f){var C=Fp(f,c,s,o,h,l);A=C.width,r=C.height,n=C.isBroken}}null===A||e.w||(A+=i),null===r||e.h||(r+=a)}return{w:A,h:r,isBroken:n}}function Rp(e,t,r){var A;if(""!==e.w&&""!==e.h)A=[e.x,e.y,e.w,e.h];else{if(!r)return null;var n=e.w;if(""===n){if(0===e.maxW){var i=e[ed]();n="position"===i.layout&&""!==i.w?0:e.minW}else n=Math.min(e.maxW,r.width);t.attributes.style.width=kp(n)}var a=e.h;if(""===a){if(0===e.maxH){var o=e[ed]();a="position"===o.layout&&""!==o.h?0:e.minH}else a=Math.min(e.maxH,r.height);t.attributes.style.height=kp(a)}A=[e.x,e.y,n,a]}return A}function Gp(e){var t,r=e[ed]();if(null!==(t=r.layout)&&void 0!==t&&t.includes("row")){var A,n=r[HE],i=e.colSpan;A=-1===i?n.columnWidths.slice(n.currentColumn).reduce((function(e,t){return e+t}),0):n.columnWidths.slice(n.currentColumn,n.currentColumn+i).reduce((function(e,t){return e+t}),0),isNaN(A)||(e.w=A)}r.layout&&"position"!==r.layout&&(e.x=e.y=0),"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=e.columnWidths.reduce((function(e,t){return e+t}),0))}function Np(e){switch(e.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}}function Lp(e){for(var t=Object.create(null),r=arguments.length,A=new Array(r>1?r-1:0),n=1;n=0)){var r="padding"+("left"==("right"===e.textAlign?"right":"left")?"Left":"Right"),A=ey(e[r],"0px");e[r]="".concat(A-t,"px")}}function Jp(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly":t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}}function Hp(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function Yp(e){var t=e[rd]()[HE].paraStack;return t.length?t.at(-1):null}function Pp(e,t,r){var A;if(null!==(A=r.attributes.class)&&void 0!==A&&A.includes("xfaRich")){t&&(""===e.h&&(t.height="auto"),""===e.w&&(t.width="auto"));var n=Yp(e);if(n){var i=r.attributes.style;switch(i.display="flex",i.flexDirection="column",n.vAlign){case"top":i.justifyContent="start";break;case"bottom":i.justifyContent="end";break;case"middle":i.justifyContent="center"}for(var a=n[Hd](),o=0,s=Object.entries(a);oe.length)&&(t=e.length);for(var r=0,A=Array(t);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(A.children);try{for(l.s();!(g=l.n()).done;)g.value.attributes.style.height=u}catch(e){l.e(e)}finally{l.f()}break;case"table":case"tb":A.width=Math.min(n.width,Math.max(A.width,s)),A.height+=c,A.children.push(t)}}function Xp(e){var t=e[HE].availableSpace,r=e.margin?e.margin.topInset+e.margin.bottomInset:0,A=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[HE].attempt?{width:t.width-A-e[HE].currentWidth,height:t.height-r-e[HE].prevHeight}:{width:t.width-A,height:t.height-r-e[HE].height};case"rl-row":case"row":return{width:e[HE].columnWidths.slice(e[HE].currentColumn).reduce((function(e,t){return e+t})),height:t.height-A};case"table":case"tb":return{width:t.width-A,height:t.height-r-e[HE].height};default:return t}}function Vp(e,t){var r;if(null===e[rd]()[HE].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;var A=e[ed](),n=(null===(r=A[HE])||void 0===r?void 0:r.attempt)||0,i=function(e){var t,r,A=""===e.w?NaN:e.w,n=""===e.h?NaN:e.h,i=0,a=0;switch(e.anchorType||""){case"bottomCenter":i=A/2,a=n;break;case"bottomLeft":i=0,a=n;break;case"bottomRight":i=A,a=n;break;case"middleCenter":i=A/2,a=n/2;break;case"middleLeft":i=0,a=n/2;break;case"middleRight":i=A,a=n/2;break;case"topCenter":i=A/2,a=0;break;case"topRight":i=A,a=0}switch(e.rotate||0){case 0:t=-i,r=-a;break;case 90:t=-a,r=i;var o=[n,-A];A=o[0],n=o[1];break;case 180:t=i,r=a;var s=[-A,-n];A=s[0],n=s[1];break;case 270:t=a,r=-i;var c=[-n,A];A=c[0],n=c[1]}return[e.x+t+Math.min(0,A),e.y+r+Math.min(0,n),Math.abs(A),Math.abs(n)]}(e),a=Tp(i,4),o=a[1],s=a[2],c=a[3];switch(A.layout){case"lr-tb":case"rl-tb":return 0===n?e[rd]()[HE].noLayoutFailure?""!==e.w?Math.round(s-t.width)<=2:t.width>2:!(""!==e.h&&Math.round(c-t.height)>2)&&(""!==e.w?Math.round(s-t.width)<=2||0===A[HE].numberInLine&&t.height>2:t.width>2):!!e[rd]()[HE].noLayoutFailure||!(""!==e.h&&Math.round(c-t.height)>2)&&(""===e.w||Math.round(s-t.width)<=2||!A[Id]())&&t.height>2;case"table":case"tb":return!!e[rd]()[HE].noLayoutFailure||(""===e.h||e[hd]()?(""===e.w||Math.round(s-t.width)<=2||!A[Id]())&&t.height>2:Math.round(c-t.height)<=2);case"position":return!!e[rd]()[HE].noLayoutFailure||""===e.h||Math.round(c+o-t.height)<=2||c+o>e[rd]()[HE].currentContentArea.h;case"rl-row":case"row":return!!e[rd]()[HE].noLayoutFailure||""===e.h||Math.round(c-t.height)<=2;default:return!0}}function zp(e,t,r,A){var n=$p(ov(1&A?e.prototype:e),t,r);return 2&A&&"function"==typeof n?function(e){return n.apply(r,e)}:n}function $p(){return $p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var A=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ov(e)););return e}(e,t);if(A){var n=Object.getOwnPropertyDescriptor(A,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},$p.apply(null,arguments)}function ev(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||hv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tv(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}var uv=gv().mark(vv);function lv(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=hv(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function hv(e,t){if(e){if("string"==typeof e)return Iv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Iv(e,t):void 0}}function Iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r180?1:0,c=50*(1+Math.cos(a)),g=50*(1-Math.sin(a)),u=50*(1+Math.cos(a+o)),l=50*(1-Math.sin(a+o));t={name:"path",attributes:{xmlns:Cv,d:"M ".concat(c," ").concat(g," A 50 50 0 ").concat(s," 0 ").concat(u," ").concat(l),vectorEffect:"non-scaling-stroke",style:n}},Object.assign(i,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}var h={name:"svg",children:[t],attributes:i};return yv(this[td]()[td]())?Ay.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[h]}):(h.attributes.style.position="absolute",Ay.success(h))}}])}(),Lv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"area",!0])).colSpan=Xd({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),r.id=e.id||"",r.name=e.name||"",r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.desc=null,r.extras=null,r.area=new Cp,r.draw=new Cp,r.exObject=new Cp,r.exclGroup=new Cp,r.field=new Cp,r.subform=new Cp,r.subformSet=new Cp,r}return sv(t,fp),rv(t,[{key:zE,value:gv().mark((function e(){return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(vv(this),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:fd,value:function(){return!0}},{key:cd,value:function(){return!0}},{key:DE,value:function(e,t){var r=ev(t,4),A=r[0],n=r[1],i=r[2],a=r[3];this[HE].width=Math.max(this[HE].width,A+i),this[HE].height=Math.max(this[HE].height,n+a),this[HE].children.push(e)}},{key:TE,value:function(){return this[HE].availableSpace}},{key:Md,value:function(e){var t=Lp(this,"position"),r={style:t,id:this[Yd],class:["xfaArea"]};Hp(this)&&r.class.push("xfaPrintOnly"),this.name&&(r.xfaName=this.name);var A=[];this[HE]={children:A,width:0,height:0,availableSpace:e};var n=this[FE]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!n.success)return n.isBreak()?n:(delete this[HE],Ay.FAILURE);t.width=kp(this[HE].width),t.height=kp(this[HE].height);var i={name:"div",attributes:r,children:A},a=[this.x,this.y,this[HE].width,this[HE].height];return delete this[HE],Ay.success(i,a)}}])}(),Uv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"assist",!0])).id=e.id||"",r.role=e.role||"",r.use=e.use||"",r.usehref=e.usehref||"",r.speak=null,r.toolTip=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(){var e;return(null===(e=this.toolTip)||void 0===e?void 0:e[UE])||null}}])}(),Mv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"barcode",!0])).charEncoding=zd({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:function(e){return["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\\d{2}/)}}),r.checksum=$d(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),r.dataColumnCount=Xd({data:e.dataColumnCount,defaultValue:-1,validate:function(e){return e>=0}}),r.dataLength=Xd({data:e.dataLength,defaultValue:-1,validate:function(e){return e>=0}}),r.dataPrep=$d(e.dataPrep,["none","flateCompress"]),r.dataRowCount=Xd({data:e.dataRowCount,defaultValue:-1,validate:function(e){return e>=0}}),r.endChar=e.endChar||"",r.errorCorrectionLevel=Xd({data:e.errorCorrectionLevel,defaultValue:-1,validate:function(e){return e>=0&&e<=8}}),r.id=e.id||"",r.moduleHeight=ey(e.moduleHeight,"5mm"),r.moduleWidth=ey(e.moduleWidth,"0.25mm"),r.printCheckDigit=Xd({data:e.printCheckDigit,defaultValue:0,validate:function(e){return 1===e}}),r.rowColumnRatio=ty(e.rowColumnRatio),r.startChar=e.startChar||"",r.textLocation=$d(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),r.truncate=Xd({data:e.truncate,defaultValue:0,validate:function(e){return 1===e}}),r.type=$d(e.type?e.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]),r.upsMode=$d(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),r.use=e.use||"",r.usehref=e.usehref||"",r.wideNarrowRatio=ty(e.wideNarrowRatio),r.encrypt=null,r.extras=null,r}return sv(t,fp),rv(t)}(),Jv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"bind",!0])).match=$d(e.match,["once","dataRef","global","none"]),r.ref=e.ref||"",r.picture=null,r}return sv(t,fp),rv(t)}(),Hv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"bindItems"])).connection=e.connection||"",r.labelRef=e.labelRef||"",r.ref=e.ref||"",r.valueRef=e.valueRef||"",r}return sv(t,fp),rv(t)}(),Yv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"bookend"])).id=e.id||"",r.leader=e.leader||"",r.trailer=e.trailer||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),Pv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"boolean"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,vp),rv(t,[{key:Md,value:function(e){return Dv(1===this[UE]?"1":"0")}}])}(),Ov=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"border",!0])).break=$d(e.break,["close","open"]),r.hand=$d(e.hand,["even","left","right"]),r.id=e.id||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.corner=new Cp(4),r.edge=new Cp(4),r.extras=null,r.fill=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:_E,value:function(){if(!this[HE]){var e=this.edge.children.slice();if(e.length<4)for(var t=e.at(-1)||new hm({}),r=e.length;r<4;r++)e.push(t);var A=e.map((function(e){return e.thickness})),n=[0,0,0,0];this.margin&&(n[0]=this.margin.topInset,n[1]=this.margin.rightInset,n[2]=this.margin.bottomInset,n[3]=this.margin.leftInset),this[HE]={widths:A,insets:n,edges:e}}return this[HE]}},{key:Hd,value:function(){var e,t=this[_E]().edges.map((function(e){var t=e[Hd]();return t.color||(t.color="#000000"),t})),r=Object.create(null);if(this.margin&&Object.assign(r,this.margin[Hd]()),"visible"===(null===(e=this.fill)||void 0===e?void 0:e.presence)&&Object.assign(r,this.fill[Hd]()),this.corner.children.some((function(e){return 0!==e.radius}))){var A=this.corner.children.map((function(e){return e[Hd]()}));if(2===A.length||3===A.length)for(var n=A.at(-1),i=A.length;i<4;i++)A.push(n);r.borderRadius=A.map((function(e){return e.radius})).join(" ")}switch(this.presence){case"invisible":case"hidden":r.borderStyle="";break;case"inactive":r.borderStyle="none";break;default:r.borderStyle=t.map((function(e){return e.style})).join(" ")}return r.borderWidth=t.map((function(e){return e.width})).join(" "),r.borderColor=t.map((function(e){return e.color})).join(" "),r}}])}(),Kv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"break",!0])).after=$d(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),r.afterTarget=e.afterTarget||"",r.before=$d(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),r.beforeTarget=e.beforeTarget||"",r.bookendLeader=e.bookendLeader||"",r.bookendTrailer=e.bookendTrailer||"",r.id=e.id||"",r.overflowLeader=e.overflowLeader||"",r.overflowTarget=e.overflowTarget||"",r.overflowTrailer=e.overflowTrailer||"",r.startNew=Xd({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t)}(),Tv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"breakAfter",!0])).id=e.id||"",r.leader=e.leader||"",r.startNew=Xd({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),r.target=e.target||"",r.targetType=$d(e.targetType,["auto","contentArea","pageArea"]),r.trailer=e.trailer||"",r.use=e.use||"",r.usehref=e.usehref||"",r.script=null,r}return sv(t,fp),rv(t)}(),qv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"breakBefore",!0])).id=e.id||"",r.leader=e.leader||"",r.startNew=Xd({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),r.target=e.target||"",r.targetType=$d(e.targetType,["auto","contentArea","pageArea"]),r.trailer=e.trailer||"",r.use=e.use||"",r.usehref=e.usehref||"",r.script=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){return this[HE]={},Ay.FAILURE}}])}(),jv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"button",!0])).highlight=$d(e.highlight,["inverted","none","outline","push"]),r.id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r=this[td]()[td](),A={name:"button",attributes:{id:this[Yd],class:["xfaButton"],style:{}},children:[]},n=lv(r.event.children);try{for(n.s();!(t=n.n()).done;){var i=t.value;if("click"===i.activity&&i.script){var a=Kt(i.script[UE]);if(a){var o=Kp(a.url);o&&A.children.push({name:"a",attributes:{id:"link"+this[Yd],href:o,newWindow:a.newWindow,class:["xfaLink"],style:{}},children:[]})}}}}catch(e){n.e(e)}finally{n.f()}return Ay.success(A)}}])}(),Wv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"calculate",!0])).id=e.id||"",r.override=$d(e.override,["disabled","error","ignore","warning"]),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.message=null,r.script=null,r}return sv(t,fp),rv(t)}(),Zv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"caption",!0])).id=e.id||"",r.placement=$d(e.placement,["left","bottom","inline","right","top"]),r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.reserve=Math.ceil(ey(e.reserve)),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.font=null,r.margin=null,r.para=null,r.value=null,r}return sv(t,fp),rv(t,[{key:Gd,value:function(e){pv(this,e)}},{key:_E,value:function(e){if(!this[HE]){var t=e.width,r=e.height;switch(this.placement){case"left":case"right":case"inline":t=this.reserve<=0?t:this.reserve;break;case"top":case"bottom":r=this.reserve<=0?r:this.reserve}this[HE]=xp(this,{width:t,height:r})}return this[HE]}},{key:Md,value:function(e){if(!this.value)return Ay.EMPTY;this[bd]();var t=this.value[Md](e).html;if(!t)return this[wd](),Ay.EMPTY;var r=this.reserve;if(this.reserve<=0){var A=this[_E](e),n=A.w,i=A.h;switch(this.placement){case"left":case"right":case"inline":this.reserve=n;break;case"top":case"bottom":this.reserve=i}}var a=[];"string"==typeof t?a.push({name:"#text",value:t}):a.push(t);var o=Lp(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(o.width=kp(this.reserve));break;case"top":case"bottom":this.reserve>0&&(o.height=kp(this.reserve))}return Pp(this,null,t),this[wd](),this.reserve=r,Ay.success({name:"div",attributes:{style:o,class:["xfaCaption"]},children:a})}}])}(),_v=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"certificate"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),Xv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"certificates",!0])).credentialServerPolicy=$d(e.credentialServerPolicy,["optional","required"]),r.id=e.id||"",r.url=e.url||"",r.urlPolicy=e.urlPolicy||"",r.use=e.use||"",r.usehref=e.usehref||"",r.encryption=null,r.issuers=null,r.keyUsage=null,r.oids=null,r.signing=null,r.subjectDNs=null,r}return sv(t,fp),rv(t)}(),Vv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"checkButton",!0])).id=e.id||"",r.mark=$d(e.mark,["default","check","circle","cross","diamond","square","star"]),r.shape=$d(e.shape,["square","round"]),r.size=ey(e.size,"10pt"),r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r,A,n,i=Lp("margin"),a=kp(this.size);i.width=i.height=a;var o,s,c,g=this[td]()[td](),u=g.items.children.length&&g.items.children[0][Md]().html||[],l={on:(void 0!==u[0]?u[0]:"on").toString(),off:(void 0!==u[1]?u[1]:"off").toString()},h=((null===(t=g.value)||void 0===t?void 0:t[Ld]())||"off")===l.on||void 0,I=g[ed](),f=g[Yd];I instanceof mm?(n=I[Yd],r="radio",A="xfaRadio",o=(null===(s=I[ME])||void 0===s?void 0:s[Yd])||I[Yd]):(r="checkbox",A="xfaCheckbox",o=(null===(c=g[ME])||void 0===c?void 0:c[Yd])||g[Yd]);var C={name:"input",attributes:{class:[A],style:i,fieldId:f,dataId:o,type:r,checked:h,xfaOn:l.on,xfaOff:l.off,"aria-label":kv(g),"aria-required":!1}};return n&&(C.attributes.name=n),mv(g)&&(C.attributes["aria-required"]=!0,C.attributes.required=!0),Ay.success({name:"label",attributes:{class:["xfaLabel"]},children:[C]})}}])}(),zv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"choiceList",!0])).commitOn=$d(e.commitOn,["select","exit"]),r.id=e.id||"",r.open=$d(e.open,["userControl","always","multiSelect","onEntry"]),r.textEntry=Xd({data:e.textEntry,defaultValue:0,validate:function(e){return 1===e}}),r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r,A=Lp(this,"border","margin"),n=this[td]()[td](),i=(null===(t=n.font)||void 0===t?void 0:t.size)||10,a={fontSize:"calc(".concat(i,"px * var(--scale-factor))")},o=[];if(n.items.children.length>0){var s,c=n.items,g=0,u=0;2===c.children.length&&(u=1-(g=c.children[0].save));for(var l=c.children[g][Md]().html,h=c.children[u][Md]().html,I=!1,f=(null===(s=n.value)||void 0===s?void 0:s[Ld]())||"",C=0,B=l.length;C1&&void 0!==arguments[1]?arguments[1]:[0,0,0],3),r=t[0],A=t[1],n=t[2];if(!e)return{r,g:A,b:n};var i=e.trim().split(/\\s*,\\s*/).map((function(e){return Math.min(Math.max(0,parseInt(e.trim(),10)),255)})).map((function(e){return isNaN(e)?0:e}));if(i.length<3)return{r,g:A,b:n};var a=qd(i,3);return{r:r=a[0],g:A=a[1],b:n=a[2]}}(e.value):"",r.extras=null,r}return sv(t,fp),rv(t,[{key:nd,value:function(){return!1}},{key:Hd,value:function(){return this.value?ge.makeHexColor(this.value.r,this.value.g,this.value.b):null}}])}(),em=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"comb"])).id=e.id||"",r.numberOfCells=Xd({data:e.numberOfCells,defaultValue:0,validate:function(e){return e>=0}}),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),tm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"connect",!0])).connection=e.connection||"",r.id=e.id||"",r.ref=e.ref||"",r.usage=$d(e.usage,["exportAndImport","exportOnly","importOnly"]),r.use=e.use||"",r.usehref=e.usehref||"",r.picture=null,r}return sv(t,fp),rv(t)}(),rm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"contentArea",!0])).h=ey(e.h),r.id=e.id||"",r.name=e.name||"",r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.w=ey(e.w),r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.desc=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t={left:kp(this.x),top:kp(this.y),width:kp(this.w),height:kp(this.h)},r=["xfaContentarea"];return Hp(this)&&r.push("xfaPrintOnly"),Ay.success({name:"div",children:[],attributes:{style:t,class:r,id:this[Yd]}})}}])}(),Am=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"corner",!0])).id=e.id||"",r.inverted=Xd({data:e.inverted,defaultValue:0,validate:function(e){return 1===e}}),r.join=$d(e.join,["square","round"]),r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.radius=ey(e.radius),r.stroke=$d(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),r.thickness=ey(e.thickness,"0.5pt"),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(){var e=Lp(this,"visibility");return e.radius=kp("square"===this.join?0:this.radius),e}}])}(),nm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"date"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=this[UE].trim();this[UE]=e?new Date(e):null}},{key:Md,value:function(e){return Dv(this[UE]?this[UE].toString():"")}}])}(),im=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"dateTime"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=this[UE].trim();this[UE]=e?new Date(e):null}},{key:Md,value:function(e){return Dv(this[UE]?this[UE].toString():"")}}])}(),am=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"dateTimeEdit",!0])).hScrollPolicy=$d(e.hScrollPolicy,["auto","off","on"]),r.id=e.id||"",r.picker=$d(e.picker,["host","none"]),r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.comb=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r=Lp(this,"border","font","margin"),A=this[td]()[td](),n={name:"input",attributes:{type:"text",fieldId:A[Yd],dataId:(null===(t=A[ME])||void 0===t?void 0:t[Yd])||A[Yd],class:["xfaTextfield"],style:r,"aria-label":kv(A),"aria-required":!1}};return mv(A)&&(n.attributes["aria-required"]=!0,n.attributes.required=!0),Ay.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}])}(),om=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"decimal"])).fracDigits=Xd({data:e.fracDigits,defaultValue:2,validate:function(e){return!0}}),r.id=e.id||"",r.leadDigits=Xd({data:e.leadDigits,defaultValue:-1,validate:function(e){return!0}}),r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=parseFloat(this[UE].trim());this[UE]=isNaN(e)?null:e}},{key:Md,value:function(e){return Dv(null!==this[UE]?this[UE].toString():"")}}])}(),sm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"defaultUi",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t)}(),cm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"desc",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.boolean=new Cp,r.date=new Cp,r.dateTime=new Cp,r.decimal=new Cp,r.exData=new Cp,r.float=new Cp,r.image=new Cp,r.integer=new Cp,r.text=new Cp,r.time=new Cp,r}return sv(t,fp),rv(t)}(),gm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,dp),rv(t)}(),um=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"digestMethods",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.digestMethod=new Cp,r}return sv(t,fp),rv(t)}(),lm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"draw",!0])).anchorType=$d(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),r.colSpan=Xd({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),r.h=e.h?ey(e.h):"",r.hAlign=$d(e.hAlign,["left","center","justify","justifyAll","radix","right"]),r.id=e.id||"",r.locale=e.locale||"",r.maxH=ey(e.maxH,"0pt"),r.maxW=ey(e.maxW,"0pt"),r.minH=ey(e.minH,"0pt"),r.minW=ey(e.minW,"0pt"),r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.rotate=Xd({data:e.rotate,defaultValue:0,validate:function(e){return e%90==0}}),r.use=e.use||"",r.usehref=e.usehref||"",r.w=e.w?ey(e.w):"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.assist=null,r.border=null,r.caption=null,r.desc=null,r.extras=null,r.font=null,r.keep=null,r.margin=null,r.para=null,r.traversal=null,r.ui=null,r.value=null,r.setProperty=new Cp,r}return sv(t,fp),rv(t,[{key:Gd,value:function(e){pv(this,e)}},{key:Md,value:function(e){if(wv(this),"hidden"===this.presence||"inactive"===this.presence)return Ay.EMPTY;Gp(this),this[bd]();var t=this.w,r=this.h,A=xp(this,e),n=A.w,i=A.h,a=A.isBroken;if(n&&""===this.w){if(a&&this[ed]()[Id]())return this[wd](),Ay.FAILURE;this.w=n}if(i&&""===this.h&&(this.h=i),Sv(this),!Vp(this,e))return this.w=t,this.h=r,this[wd](),Ay.FAILURE;Fv(this);var o=Lp(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");Sp(this,o),o.margin&&(o.padding=o.margin,delete o.margin);var s=["xfaDraw"];this.font&&s.push("xfaFont"),Hp(this)&&s.push("xfaPrintOnly");var c={style:o,id:this[Yd],class:s};this.name&&(c.xfaName=this.name);var g={name:"div",attributes:c,children:[]};bv(this,c);var u=Rp(this,g,e),l=this.value?this.value[Md](e).html:null;return null===l?(this.w=t,this.h=r,this[wd](),Ay.success(Up(this,g),u)):(g.children.push(l),Pp(this,o,l),this.w=t,this.h=r,this[wd](),Ay.success(Up(this,g),u))}}])}(),hm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"edge",!0])).cap=$d(e.cap,["square","butt","round"]),r.id=e.id||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.stroke=$d(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),r.thickness=ey(e.thickness,"0.5pt"),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(){var e=Lp(this,"visibility");if(Object.assign(e,{linecap:this.cap,width:kp(this.thickness),color:this.color?this.color[Hd]():"#000000",style:""}),"visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}])}(),Im=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,dp),rv(t)}(),fm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encodings",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.encoding=new Cp,r}return sv(t,fp),rv(t)}(),Cm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encrypt",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.certificate=null,r}return sv(t,fp),rv(t)}(),Bm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encryptData",!0])).id=e.id||"",r.operation=$d(e.operation,["encrypt","decrypt"]),r.target=e.target||"",r.use=e.use||"",r.usehref=e.usehref||"",r.filter=null,r.manifest=null,r}return sv(t,fp),rv(t)}(),Qm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encryption",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.certificate=new Cp,r}return sv(t,fp),rv(t)}(),Em=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,dp),rv(t)}(),dm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encryptionMethods",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.encryptionMethod=new Cp,r}return sv(t,fp),rv(t)}(),ym=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"event",!0])).activity=$d(e.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]),r.id=e.id||"",r.listen=$d(e.listen,["refOnly","refAndDescendents"]),r.name=e.name||"",r.ref=e.ref||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.encryptData=null,r.execute=null,r.script=null,r.signData=null,r.submit=null,r}return sv(t,fp),rv(t)}(),pm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"exData"])).contentType=e.contentType||"",r.href=e.href||"",r.id=e.id||"",r.maxLength=Xd({data:e.maxLength,defaultValue:-1,validate:function(e){return e>=-1}}),r.name=e.name||"",r.rid=e.rid||"",r.transferEncoding=$d(e.transferEncoding,["none","base64","package"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:sd,value:function(){return"text/html"===this.contentType}},{key:yd,value:function(e){return("text/html"===this.contentType&&e[Qd]===Od.xhtml.id||"text/xml"===this.contentType)&&(this[UE]=e,!0)}},{key:Md,value:function(e){return"text/html"===this.contentType&&this[UE]?this[UE][Md](e):Ay.EMPTY}}])}(),vm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"exObject",!0])).archive=e.archive||"",r.classId=e.classId||"",r.codeBase=e.codeBase||"",r.codeType=e.codeType||"",r.id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.boolean=new Cp,r.date=new Cp,r.dateTime=new Cp,r.decimal=new Cp,r.exData=new Cp,r.exObject=new Cp,r.float=new Cp,r.image=new Cp,r.integer=new Cp,r.text=new Cp,r.time=new Cp,r}return sv(t,fp),rv(t)}(),mm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"exclGroup",!0])).access=$d(e.access,["open","nonInteractive","protected","readOnly"]),r.accessKey=e.accessKey||"",r.anchorType=$d(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),r.colSpan=Xd({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),r.h=e.h?ey(e.h):"",r.hAlign=$d(e.hAlign,["left","center","justify","justifyAll","radix","right"]),r.id=e.id||"",r.layout=$d(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),r.maxH=ey(e.maxH,"0pt"),r.maxW=ey(e.maxW,"0pt"),r.minH=ey(e.minH,"0pt"),r.minW=ey(e.minW,"0pt"),r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.w=e.w?ey(e.w):"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.assist=null,r.bind=null,r.border=null,r.calculate=null,r.caption=null,r.desc=null,r.extras=null,r.margin=null,r.para=null,r.traversal=null,r.validate=null,r.connect=new Cp,r.event=new Cp,r.field=new Cp,r.setProperty=new Cp,r}return sv(t,fp),rv(t,[{key:cd,value:function(){return!0}},{key:nd,value:function(){return!0}},{key:Gd,value:function(e){var t,r=lv(this.field.children);try{for(r.s();!(t=r.n()).done;){var A=t.value;if(!A.value){var n=new Uw({});A[SE](n),A.value=n}A.value[Gd](e)}}catch(e){r.e(e)}finally{r.f()}}},{key:Id,value:function(){return this.layout.endsWith("-tb")&&0===this[HE].attempt&&this[HE].numberInLine>0||this[td]()[Id]()}},{key:hd,value:function(){var e,t=this[ed]();return!!t[hd]()&&(void 0!==this[HE]._isSplittable?this[HE]._isSplittable:"position"===this.layout||this.layout.includes("row")?(this[HE]._isSplittable=!1,!1):!(null!==(e=t.layout)&&void 0!==e&&e.endsWith("-tb")&&0!==t[HE].numberInLine||(this[HE]._isSplittable=!0,0)))}},{key:PE,value:function(){return Zp(this)}},{key:DE,value:function(e,t){_p(this,e,t)}},{key:TE,value:function(){return Xp(this)}},{key:Md,value:function(e){if(wv(this),"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return Ay.EMPTY;Gp(this);var t=[],r={id:this[Yd],class:[]};Jp(this,r.class),this[HE]||(this[HE]=Object.create(null)),Object.assign(this[HE],{children:t,attributes:r,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});var A=this[hd]();if(A||Sv(this),!Vp(this,e))return Ay.FAILURE;var n=new Set(["field"]);if(this.layout.includes("row")){var i=this[ed]().columnWidths;Array.isArray(i)&&i.length>0&&(this[HE].columnWidths=i,this[HE].currentColumn=0)}var a=Lp(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),o=["xfaExclgroup"],s=Np(this);s&&o.push(s),Hp(this)&&o.push("xfaPrintOnly"),r.style=a,r.class=o,this.name&&(r.xfaName=this.name),this[bd]();for(var c="lr-tb"===this.layout||"rl-tb"===this.layout,g=c?2:1;this[HE].attempt=1||-1===e}}),r.h=e.h?ey(e.h):"",r.hAlign=$d(e.hAlign,["left","center","justify","justifyAll","radix","right"]),r.id=e.id||"",r.locale=e.locale||"",r.maxH=ey(e.maxH,"0pt"),r.maxW=ey(e.maxW,"0pt"),r.minH=ey(e.minH,"0pt"),r.minW=ey(e.minW,"0pt"),r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.rotate=Xd({data:e.rotate,defaultValue:0,validate:function(e){return e%90==0}}),r.use=e.use||"",r.usehref=e.usehref||"",r.w=e.w?ey(e.w):"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.assist=null,r.bind=null,r.border=null,r.calculate=null,r.caption=null,r.desc=null,r.extras=null,r.font=null,r.format=null,r.items=new Cp(2),r.keep=null,r.margin=null,r.para=null,r.traversal=null,r.ui=null,r.validate=null,r.value=null,r.bindItems=new Cp,r.connect=new Cp,r.event=new Cp,r.setProperty=new Cp,r}return sv(t,fp),rv(t,[{key:cd,value:function(){return!0}},{key:Gd,value:function(e){pv(this,e)}},{key:Md,value:function(e){var t;if(wv(this),!this.ui){var r;switch(this.ui=new Nw({}),this.ui[Ad]=this[Ad],this[SE](this.ui),this.items.children.length){case 0:r=new Dw({}),this.ui.textEdit=r;break;case 1:r=new Vv({}),this.ui.checkButton=r;break;case 2:r=new zv({}),this.ui.choiceList=r}this.ui[SE](r)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return Ay.EMPTY;this.caption&&delete this.caption[HE],this[bd]();var A=this.caption?this.caption[Md](e).html:null,n=this.w,i=this.h,a=0,o=0;this.margin&&(a=this.margin.leftInset+this.margin.rightInset,o=this.margin.topInset+this.margin.bottomInset);var s=null;if(""===this.w||""===this.h){var c=null,g=null,u=0,l=0;if(this.ui.checkButton)u=l=this.ui.checkButton.size;else{var h=xp(this,e),I=h.w,f=h.h;null!==I?(u=I,l=f):l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;if(e){var A=_d(e.typeface),n=e[Ad].fontFinder.find(A);r=uy(e,n)}if(!r)return{lineHeight:12,lineGap:2,lineNoGap:10};var i=e.size||10,a=r.lineHeight?Math.max(t?0:1.2,r.lineHeight):1.2,o=void 0===r.lineGap?.2:r.lineGap;return{lineHeight:a*i,lineGap:o*i,lineNoGap:Math.max(1,a-o)*i}}(this.font,!0).lineNoGap}if(u+=(s=dv(this.ui[_E]())).w,l+=s.h,this.caption){var C=this.caption[_E](e),B=C.w,Q=C.h;if(C.isBroken&&this[ed]()[Id]())return this[wd](),Ay.FAILURE;switch(c=B,g=Q,this.caption.placement){case"left":case"right":case"inline":c+=u;break;case"top":case"bottom":g+=l}}else c=u,g=l;c&&""===this.w&&(c+=a,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1=1&&e<=5}}),r.appearanceFilter=null,r.certificates=null,r.digestMethods=null,r.encodings=null,r.encryptionMethods=null,r.handler=null,r.lockDocument=null,r.mdp=null,r.reasons=null,r.timeStamp=null,r}return sv(t,fp),rv(t)}(),Fm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"float"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=parseFloat(this[UE].trim());this[UE]=isNaN(e)?null:e}},{key:Md,value:function(e){return Dv(null!==this[UE]?this[UE].toString():"")}}])}(),xm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"font",!0])).baselineShift=ey(e.baselineShift),r.fontHorizontalScale=Vd({data:e.fontHorizontalScale,defaultValue:100,validate:function(e){return e>=0}}),r.fontVerticalScale=Vd({data:e.fontVerticalScale,defaultValue:100,validate:function(e){return e>=0}}),r.id=e.id||"",r.kerningMode=$d(e.kerningMode,["none","pair"]),r.letterSpacing=ey(e.letterSpacing,"0"),r.lineThrough=Xd({data:e.lineThrough,defaultValue:0,validate:function(e){return 1===e||2===e}}),r.lineThroughPeriod=$d(e.lineThroughPeriod,["all","word"]),r.overline=Xd({data:e.overline,defaultValue:0,validate:function(e){return 1===e||2===e}}),r.overlinePeriod=$d(e.overlinePeriod,["all","word"]),r.posture=$d(e.posture,["normal","italic"]),r.size=ey(e.size,"10pt"),r.typeface=e.typeface||"Courier",r.underline=Xd({data:e.underline,defaultValue:0,validate:function(e){return 1===e||2===e}}),r.underlinePeriod=$d(e.underlinePeriod,["all","word"]),r.use=e.use||"",r.usehref=e.usehref||"",r.weight=$d(e.weight,["normal","bold"]),r.extras=null,r.fill=null,r}return sv(t,fp),rv(t,[{key:xE,value:function(e){zp(t,xE,this,3)([e]),this[Ad].usedTypefaces.add(this.typeface)}},{key:Hd,value:function(){var e=Lp(this,"fill"),t=e.color;return t&&("#000000"===t?delete e.color:t.startsWith("#")||(e.background=t,e.backgroundClip="text",e.color="transparent")),this.baselineShift&&(e.verticalAlign=kp(this.baselineShift)),e.fontKerning="none"===this.kerningMode?"none":"normal",e.letterSpacing=kp(this.letterSpacing),0!==this.lineThrough&&(e.textDecoration="line-through",2===this.lineThrough&&(e.textDecorationStyle="double")),0!==this.overline&&(e.textDecoration="overline",2===this.overline&&(e.textDecorationStyle="double")),e.fontStyle=this.posture,e.fontSize=kp(.99*this.size),Op(this,this,this[Ad].fontFinder,e),0!==this.underline&&(e.textDecoration="underline",2===this.underline&&(e.textDecorationStyle="double")),e.fontWeight=this.weight,e}}])}(),Rm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"format",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.picture=null,r}return sv(t,fp),rv(t)}(),Gm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"handler"])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),Nm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"hyphenation"])).excludeAllCaps=Xd({data:e.excludeAllCaps,defaultValue:0,validate:function(e){return 1===e}}),r.excludeInitialCap=Xd({data:e.excludeInitialCap,defaultValue:0,validate:function(e){return 1===e}}),r.hyphenate=Xd({data:e.hyphenate,defaultValue:0,validate:function(e){return 1===e}}),r.id=e.id||"",r.pushCharacterCount=Xd({data:e.pushCharacterCount,defaultValue:3,validate:function(e){return e>=0}}),r.remainCharacterCount=Xd({data:e.remainCharacterCount,defaultValue:3,validate:function(e){return e>=0}}),r.use=e.use||"",r.usehref=e.usehref||"",r.wordCharacterCount=Xd({data:e.wordCharacterCount,defaultValue:7,validate:function(e){return e>=0}}),r}return sv(t,fp),rv(t)}(),Lm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"image"])).aspect=$d(e.aspect,["fit","actual","height","none","width"]),r.contentType=e.contentType||"",r.href=e.href||"",r.id=e.id||"",r.name=e.name||"",r.transferEncoding=$d(e.transferEncoding,["base64","none","package"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t,[{key:Md,value:function(){if(this.contentType&&!Qv.has(this.contentType.toLowerCase()))return Ay.EMPTY;var e=this[Ad].images&&this[Ad].images.get(this.href);if(!e&&(this.href||!this[UE]))return Ay.EMPTY;if(e||"base64"!==this.transferEncoding||(e=ie(atob(this[UE]))),!e)return Ay.EMPTY;if(!this.contentType){for(var t=0,r=Ev;tn.length&&n.every((function(t,r){return t===e[r]}))){this.contentType=i;break}}if(!this.contentType)return Ay.EMPTY}var a,o=new Blob([e],{type:this.contentType});switch(this.aspect){case"fit":case"actual":break;case"height":a={height:"100%",objectFit:"fill"};break;case"none":a={width:"100%",height:"100%",objectFit:"fill"};break;case"width":a={width:"100%",objectFit:"fill"}}var s=this[td]();return Ay.success({name:"img",attributes:{class:["xfaImage"],style:a,src:URL.createObjectURL(o),alt:s?kv(s[td]()):null}})}}])}(),Um=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"imageEdit",!0])).data=$d(e.data,["link","embed"]),r.id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){return"embed"===this.data?Ay.success({name:"div",children:[],attributes:{}}):Ay.EMPTY}}])}(),Mm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"integer"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=parseInt(this[UE].trim(),10);this[UE]=isNaN(e)?null:e}},{key:Md,value:function(e){return Dv(null!==this[UE]?this[UE].toString():"")}}])}(),Jm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"issuers",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.certificate=new Cp,r}return sv(t,fp),rv(t)}(),Hm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"items",!0])).id=e.id||"",r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.ref=e.ref||"",r.save=Xd({data:e.save,defaultValue:0,validate:function(e){return 1===e}}),r.use=e.use||"",r.usehref=e.usehref||"",r.boolean=new Cp,r.date=new Cp,r.dateTime=new Cp,r.decimal=new Cp,r.exData=new Cp,r.float=new Cp,r.image=new Cp,r.integer=new Cp,r.text=new Cp,r.time=new Cp,r}return sv(t,fp),rv(t,[{key:Md,value:function(){var e,t=[],r=lv(this[VE]());try{for(r.s();!(e=r.n()).done;){var A=e.value;t.push(A[Ld]())}}catch(e){r.e(e)}finally{r.f()}return Ay.success(t)}}])}(),Ym=function(e){function t(e){var r;nv(this,t),(r=iv(this,t,[fv,"keep",!0])).id=e.id||"";var A=["none","contentArea","pageArea"];return r.intact=$d(e.intact,A),r.next=$d(e.next,A),r.previous=$d(e.previous,A),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t)}(),Pm=function(e){function t(e){var r;nv(this,t);var A=["","yes","no"];return(r=iv(this,t,[fv,"keyUsage"])).crlSign=$d(e.crlSign,A),r.dataEncipherment=$d(e.dataEncipherment,A),r.decipherOnly=$d(e.decipherOnly,A),r.digitalSignature=$d(e.digitalSignature,A),r.encipherOnly=$d(e.encipherOnly,A),r.id=e.id||"",r.keyAgreement=$d(e.keyAgreement,A),r.keyCertSign=$d(e.keyCertSign,A),r.keyEncipherment=$d(e.keyEncipherment,A),r.nonRepudiation=$d(e.nonRepudiation,A),r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),Om=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"line",!0])).hand=$d(e.hand,["even","left","right"]),r.id=e.id||"",r.slope=$d(e.slope,["\\\\","/"]),r.use=e.use||"",r.usehref=e.usehref||"",r.edge=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(){var e,t,r,A,n=this[td]()[td](),i=this.edge||new hm({}),a=i[Hd](),o=Object.create(null),s="visible"===i.presence?i.thickness:0;o.strokeWidth=kp(s),o.stroke=a.color;var c="100%",g="100%";n.w<=s?(e="50%",t=0,r="50%",A="100%",c=o.strokeWidth):n.h<=s?(e=0,t="50%",r="100%",A="50%",g=o.strokeWidth):"\\\\"===this.slope?(e=0,t=0,r="100%",A="100%"):(e=0,t="100%",r="100%",A=0);var u={name:"svg",children:[{name:"line",attributes:{xmlns:Cv,x1:e,y1:t,x2:r,y2:A,style:o}}],attributes:{xmlns:Cv,width:c,height:g,style:{overflow:"visible"}}};return yv(n)?Ay.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[u]}):(u.attributes.style.position="absolute",Ay.success(u))}}])}(),Km=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"linear",!0])).id=e.id||"",r.type=$d(e.type,["toRight","toBottom","toLeft","toTop"]),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){e=e?e[Hd]():"#FFFFFF";var t=this.type.replace(/([RBLT])/," $1").toLowerCase(),r=this.color?this.color[Hd]():"#000000";return"linear-gradient(".concat(t,", ").concat(e,", ").concat(r,")")}}])}(),Tm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"lockDocument"])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){this[UE]=$d(this[UE],["auto","0","1"])}}])}(),qm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"manifest",!0])).action=$d(e.action,["include","all","exclude"]),r.id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.ref=new Cp,r}return sv(t,fp),rv(t)}(),jm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"margin",!0])).bottomInset=ey(e.bottomInset,"0"),r.id=e.id||"",r.leftInset=ey(e.leftInset,"0"),r.rightInset=ey(e.rightInset,"0"),r.topInset=ey(e.topInset,"0"),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(){return{margin:kp(this.topInset)+" "+kp(this.rightInset)+" "+kp(this.bottomInset)+" "+kp(this.leftInset)}}}])}(),Wm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"mdp"])).id=e.id||"",r.permissions=Xd({data:e.permissions,defaultValue:2,validate:function(e){return 1===e||3===e}}),r.signatureType=$d(e.signatureType,["filler","author"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),Zm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"medium"])).id=e.id||"",r.imagingBBox=function(e){var t=-1;if(!e)return{x:t,y:t,width:t,height:t};var r=e.trim().split(/\\s*,\\s*/).map((function(e){return ey(e,"-1")}));if(r.length<4||r[2]<0||r[3]<0)return{x:t,y:t,width:t,height:t};var A=qd(r,4);return{x:A[0],y:A[1],width:A[2],height:A[3]}}(e.imagingBBox),r.long=ey(e.long),r.orientation=$d(e.orientation,["portrait","landscape"]),r.short=ey(e.short),r.stock=e.stock||"",r.trayIn=$d(e.trayIn,["auto","delegate","pageFront"]),r.trayOut=$d(e.trayOut,["auto","delegate"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),_m=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"message",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.text=new Cp,r}return sv(t,fp),rv(t)}(),Xm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"numericEdit",!0])).hScrollPolicy=$d(e.hScrollPolicy,["auto","off","on"]),r.id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.comb=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r=Lp(this,"border","font","margin"),A=this[td]()[td](),n={name:"input",attributes:{type:"text",fieldId:A[Yd],dataId:(null===(t=A[ME])||void 0===t?void 0:t[Yd])||A[Yd],class:["xfaTextfield"],style:r,"aria-label":kv(A),"aria-required":!1}};return mv(A)&&(n.attributes["aria-required"]=!0,n.attributes.required=!0),Ay.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}])}(),Vm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"occur",!0])).id=e.id||"",r.initial=""!==e.initial?Xd({data:e.initial,defaultValue:"",validate:function(e){return!0}}):"",r.max=""!==e.max?Xd({data:e.max,defaultValue:1,validate:function(e){return!0}}):"",r.min=""!==e.min?Xd({data:e.min,defaultValue:1,validate:function(e){return!0}}):"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t,[{key:xE,value:function(){var e=this[td](),t=this.min;""===this.min&&(this.min=e instanceof tw||e instanceof rw?0:1),""===this.max&&(this.max=""===t?e instanceof tw||e instanceof rw?-1:1:this.min),-1!==this.max&&this.max=0}}),r.preserve=e.preserve||"",r.radixOffset=e.radixOffset?ey(e.radixOffset,"0pt"):"",r.spaceAbove=e.spaceAbove?ey(e.spaceAbove,"0pt"):"",r.spaceBelow=e.spaceBelow?ey(e.spaceBelow,"0pt"):"",r.tabDefault=e.tabDefault?ey(r.tabDefault):"",r.tabStops=(e.tabStops||"").trim().split(/\\s+/).map((function(e,t){return t%2==1?ey(e):e})),r.textIndent=e.textIndent?ey(e.textIndent,"0pt"):"",r.use=e.use||"",r.usehref=e.usehref||"",r.vAlign=$d(e.vAlign,["top","bottom","middle"]),r.widows=Xd({data:e.widows,defaultValue:0,validate:function(e){return e>=0}}),r.hyphenation=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(){var e=Lp(this,"hAlign");return""!==this.marginLeft&&(e.paddingLeft=kp(this.marginLeft)),""!==this.marginRight&&(e.paddingight=kp(this.marginRight)),""!==this.spaceAbove&&(e.paddingTop=kp(this.spaceAbove)),""!==this.spaceBelow&&(e.paddingBottom=kp(this.spaceBelow)),""!==this.textIndent&&(e.textIndent=kp(this.textIndent),Mp(e)),this.lineHeight>0&&(e.lineHeight=kp(this.lineHeight)),""!==this.tabDefault&&(e.tabSize=kp(this.tabDefault)),this.tabStops.length,this.hyphenatation&&Object.assign(e,this.hyphenatation[Hd]()),e}}])}(),nw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"passwordEdit",!0])).hScrollPolicy=$d(e.hScrollPolicy,["auto","off","on"]),r.id=e.id||"",r.passwordChar=e.passwordChar||"*",r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t)}(),iw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"pattern",!0])).id=e.id||"",r.type=$d(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){e=e?e[Hd]():"#FFFFFF";var t=this.color?this.color[Hd]():"#000000",r="repeating-linear-gradient",A="".concat(e,",").concat(e," ").concat(5,"px,").concat(t," ").concat(5,"px,").concat(t," ").concat(10,"px");switch(this.type){case"crossHatch":return"".concat(r,"(to top,").concat(A,") ").concat(r,"(to right,").concat(A,")");case"crossDiagonal":return"".concat(r,"(45deg,").concat(A,") ").concat(r,"(-45deg,").concat(A,")");case"diagonalLeft":return"".concat(r,"(45deg,").concat(A,")");case"diagonalRight":return"".concat(r,"(-45deg,").concat(A,")");case"horizontal":return"".concat(r,"(to top,").concat(A,")");case"vertical":return"".concat(r,"(to right,").concat(A,")")}return""}}])}(),aw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"picture"])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),ow=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"proto",!0])).appearanceFilter=new Cp,r.arc=new Cp,r.area=new Cp,r.assist=new Cp,r.barcode=new Cp,r.bindItems=new Cp,r.bookend=new Cp,r.boolean=new Cp,r.border=new Cp,r.break=new Cp,r.breakAfter=new Cp,r.breakBefore=new Cp,r.button=new Cp,r.calculate=new Cp,r.caption=new Cp,r.certificate=new Cp,r.certificates=new Cp,r.checkButton=new Cp,r.choiceList=new Cp,r.color=new Cp,r.comb=new Cp,r.connect=new Cp,r.contentArea=new Cp,r.corner=new Cp,r.date=new Cp,r.dateTime=new Cp,r.dateTimeEdit=new Cp,r.decimal=new Cp,r.defaultUi=new Cp,r.desc=new Cp,r.digestMethod=new Cp,r.digestMethods=new Cp,r.draw=new Cp,r.edge=new Cp,r.encoding=new Cp,r.encodings=new Cp,r.encrypt=new Cp,r.encryptData=new Cp,r.encryption=new Cp,r.encryptionMethod=new Cp,r.encryptionMethods=new Cp,r.event=new Cp,r.exData=new Cp,r.exObject=new Cp,r.exclGroup=new Cp,r.execute=new Cp,r.extras=new Cp,r.field=new Cp,r.fill=new Cp,r.filter=new Cp,r.float=new Cp,r.font=new Cp,r.format=new Cp,r.handler=new Cp,r.hyphenation=new Cp,r.image=new Cp,r.imageEdit=new Cp,r.integer=new Cp,r.issuers=new Cp,r.items=new Cp,r.keep=new Cp,r.keyUsage=new Cp,r.line=new Cp,r.linear=new Cp,r.lockDocument=new Cp,r.manifest=new Cp,r.margin=new Cp,r.mdp=new Cp,r.medium=new Cp,r.message=new Cp,r.numericEdit=new Cp,r.occur=new Cp,r.oid=new Cp,r.oids=new Cp,r.overflow=new Cp,r.pageArea=new Cp,r.pageSet=new Cp,r.para=new Cp,r.passwordEdit=new Cp,r.pattern=new Cp,r.picture=new Cp,r.radial=new Cp,r.reason=new Cp,r.reasons=new Cp,r.rectangle=new Cp,r.ref=new Cp,r.script=new Cp,r.setProperty=new Cp,r.signData=new Cp,r.signature=new Cp,r.signing=new Cp,r.solid=new Cp,r.speak=new Cp,r.stipple=new Cp,r.subform=new Cp,r.subformSet=new Cp,r.subjectDN=new Cp,r.subjectDNs=new Cp,r.submit=new Cp,r.text=new Cp,r.textEdit=new Cp,r.time=new Cp,r.timeStamp=new Cp,r.toolTip=new Cp,r.traversal=new Cp,r.traverse=new Cp,r.ui=new Cp,r.validate=new Cp,r.value=new Cp,r.variables=new Cp,r}return sv(t,fp),rv(t)}(),sw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"radial",!0])).id=e.id||"",r.type=$d(e.type,["toEdge","toCenter"]),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){e=e?e[Hd]():"#FFFFFF";var t=this.color?this.color[Hd]():"#000000",r="toEdge"===this.type?"".concat(e,",").concat(t):"".concat(t,",").concat(e);return"radial-gradient(circle at center, ".concat(r,")")}}])}(),cw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"reason"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),gw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"reasons",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.reason=new Cp,r}return sv(t,fp),rv(t)}(),uw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"rectangle",!0])).hand=$d(e.hand,["even","left","right"]),r.id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.corner=new Cp(4),r.edge=new Cp(4),r.fill=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(){var e,t=this.edge.children.length?this.edge.children[0]:new hm({}),r=t[Hd](),A=Object.create(null);"visible"===(null===(e=this.fill)||void 0===e?void 0:e.presence)?Object.assign(A,this.fill[Hd]()):A.fill="transparent",A.strokeWidth=kp("visible"===t.presence?t.thickness:0),A.stroke=r.color;var n=(this.corner.children.length?this.corner.children[0]:new Am({}))[Hd](),i={name:"svg",children:[{name:"rect",attributes:{xmlns:Cv,width:"100%",height:"100%",x:0,y:0,rx:n.radius,ry:n.radius,style:A}}],attributes:{xmlns:Cv,style:{overflow:"visible"},width:"100%",height:"100%"}};return yv(this[td]()[td]())?Ay.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[i]}):(i.attributes.style.position="absolute",Ay.success(i))}}])}(),lw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"ref"])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),hw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"script"])).binding=e.binding||"",r.contentType=e.contentType||"",r.id=e.id||"",r.name=e.name||"",r.runAt=$d(e.runAt,["client","both","server"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),Iw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"setProperty"])).connection=e.connection||"",r.ref=e.ref||"",r.target=e.target||"",r}return sv(t,fp),rv(t)}(),fw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"signData",!0])).id=e.id||"",r.operation=$d(e.operation,["sign","clear","verify"]),r.ref=e.ref||"",r.target=e.target||"",r.use=e.use||"",r.usehref=e.usehref||"",r.filter=null,r.manifest=null,r}return sv(t,fp),rv(t)}(),Cw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"signature",!0])).id=e.id||"",r.type=$d(e.type,["PDF1.3","PDF1.6"]),r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.filter=null,r.manifest=null,r.margin=null,r}return sv(t,fp),rv(t)}(),Bw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"signing",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.certificate=new Cp,r}return sv(t,fp),rv(t)}(),Qw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"solid",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){return e?e[Hd]():"#FFFFFF"}}])}(),Ew=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"speak"])).disable=Xd({data:e.disable,defaultValue:0,validate:function(e){return 1===e}}),r.id=e.id||"",r.priority=$d(e.priority,["custom","caption","name","toolTip"]),r.rid=e.rid||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),dw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"stipple",!0])).id=e.id||"",r.rate=Xd({data:e.rate,defaultValue:50,validate:function(e){return e>=0&&e<=100}}),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){var t=this.rate/100;return ge.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}])}(),yw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"subform",!0])).access=$d(e.access,["open","nonInteractive","protected","readOnly"]),r.allowMacro=Xd({data:e.allowMacro,defaultValue:0,validate:function(e){return 1===e}}),r.anchorType=$d(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),r.colSpan=Xd({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),r.columnWidths=(e.columnWidths||"").trim().split(/\\s+/).map((function(e){return"-1"===e?-1:ey(e)})),r.h=e.h?ey(e.h):"",r.hAlign=$d(e.hAlign,["left","center","justify","justifyAll","radix","right"]),r.id=e.id||"",r.layout=$d(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),r.locale=e.locale||"",r.maxH=ey(e.maxH,"0pt"),r.maxW=ey(e.maxW,"0pt"),r.mergeMode=$d(e.mergeMode,["consumeData","matchTemplate"]),r.minH=ey(e.minH,"0pt"),r.minW=ey(e.minW,"0pt"),r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.restoreState=$d(e.restoreState,["manual","auto"]),r.scope=$d(e.scope,["name","none"]),r.use=e.use||"",r.usehref=e.usehref||"",r.w=e.w?ey(e.w):"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.assist=null,r.bind=null,r.bookend=null,r.border=null,r.break=null,r.calculate=null,r.desc=null,r.extras=null,r.keep=null,r.margin=null,r.occur=null,r.overflow=null,r.pageSet=null,r.para=null,r.traversal=null,r.validate=null,r.variables=null,r.area=new Cp,r.breakAfter=new Cp,r.breakBefore=new Cp,r.connect=new Cp,r.draw=new Cp,r.event=new Cp,r.exObject=new Cp,r.exclGroup=new Cp,r.field=new Cp,r.proto=new Cp,r.setProperty=new Cp,r.subform=new Cp,r.subformSet=new Cp,r}return sv(t,fp),rv(t,[{key:ed,value:function(){var e=this[td]();return e instanceof pw?e[ed]():e}},{key:cd,value:function(){return!0}},{key:Id,value:function(){return this.layout.endsWith("-tb")&&0===this[HE].attempt&&this[HE].numberInLine>0||this[td]()[Id]()}},{key:zE,value:gv().mark((function e(){return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(vv(this),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:PE,value:function(){return Zp(this)}},{key:DE,value:function(e,t){_p(this,e,t)}},{key:TE,value:function(){return Xp(this)}},{key:hd,value:function(){var e,t=this[ed]();return!!t[hd]()&&(void 0!==this[HE]._isSplittable?this[HE]._isSplittable:"position"===this.layout||this.layout.includes("row")||this.keep&&"none"!==this.keep.intact?(this[HE]._isSplittable=!1,!1):!(null!==(e=t.layout)&&void 0!==e&&e.endsWith("-tb")&&0!==t[HE].numberInLine||(this[HE]._isSplittable=!0,0)))}},{key:Md,value:function(e){var t;if(wv(this),this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){var r=new Tv({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});r[Ad]=this[Ad],this[SE](r),this.breakAfter.push(r)}if("auto"!==this.break.before||""!==this.break.beforeTarget){var A=new qv({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});A[Ad]=this[Ad],this[SE](A),this.breakBefore.push(A)}if(""!==this.break.overflowTarget){var n=new ew({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});n[Ad]=this[Ad],this[SE](n),this.overflow.push(n)}this[kd](this.break),this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return Ay.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&q("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){var i=this.breakBefore.children[0];if(xv(i))return Ay.breakNode(i)}if(null!==(t=this[HE])&&void 0!==t&&t.afterBreakAfter)return Ay.EMPTY;Gp(this);var a=[],o={id:this[Yd],class:[]};Jp(this,o.class),this[HE]||(this[HE]=Object.create(null)),Object.assign(this[HE],{children:a,line:null,attributes:o,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});var s=this[rd](),c=s[HE].noLayoutFailure,g=this[hd]();if(g||Sv(this),!Vp(this,e))return Ay.FAILURE;var u=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){var l=this[ed]().columnWidths;Array.isArray(l)&&l.length>0&&(this[HE].columnWidths=l,this[HE].currentColumn=0)}var h=Lp(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),I=["xfaSubform"],f=Np(this);if(f&&I.push(f),o.style=h,o.class=I,this.name&&(o.xfaName=this.name),this.overflow){var C=this.overflow[_E]();C.addLeader&&(C.addLeader=!1,Rv(this,C.leader,e))}this[bd]();for(var B="lr-tb"===this.layout||"rl-tb"===this.layout,Q=B?2:1;this[HE].attempt=1){var D=this.breakAfter.children[0];if(xv(D))return this[HE].afterBreakAfter=k,Ay.breakNode(D)}return delete this[HE],k}}])}(),pw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"subformSet",!0])).id=e.id||"",r.name=e.name||"",r.relation=$d(e.relation,["ordered","choice","unordered"]),r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.bookend=null,r.break=null,r.desc=null,r.extras=null,r.occur=null,r.overflow=null,r.breakAfter=new Cp,r.breakBefore=new Cp,r.subform=new Cp,r.subformSet=new Cp,r}return sv(t,fp),rv(t,[{key:zE,value:gv().mark((function e(){return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(vv(this),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:ed,value:function(){for(var e=this[td]();!(e instanceof yw);)e=e[td]();return e}},{key:cd,value:function(){return!0}}])}(),vw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"subjectDN"])).delimiter=e.delimiter||",",r.id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){this[UE]=new Map(this[UE].split(this.delimiter).map((function(e){return(e=e.split("=",2))[0]=e[0].trim(),e})))}}])}(),mw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"subjectDNs",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.subjectDN=new Cp,r}return sv(t,fp),rv(t)}(),ww=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"submit",!0])).embedPDF=Xd({data:e.embedPDF,defaultValue:0,validate:function(e){return 1===e}}),r.format=$d(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),r.id=e.id||"",r.target=e.target||"",r.textEncoding=zd({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:function(e){return["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\\d{2}/)}}),r.use=e.use||"",r.usehref=e.usehref||"",r.xdpContent=e.xdpContent||"",r.encrypt=null,r.encryptData=new Cp,r.signData=new Cp,r}return sv(t,fp),rv(t)}(),bw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"template",!0])).baseProfile=$d(e.baseProfile,["full","interactiveForms"]),r.extras=null,r.subform=new Cp,r}return sv(t,fp),rv(t,[{key:YE,value:function(){0===this.subform.children.length&&q("XFA - No subforms in template node."),this.subform.children.length>=2&&q("XFA - Several subforms in template node: please file a bug."),this[Nd]=5e3}},{key:hd,value:function(){return!0}},{key:Fd,value:function(e,t){return e.startsWith("#")?[this[id].get(e.slice(1))]:Ry(this,t,e,!0,!0)}},{key:Ud,value:gv().mark((function e(){var t,r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E=this;return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.subform.children.length){e.next=2;break}return e.abrupt("return",Ay.success({name:"div",children:[]}));case 2:this[HE]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]},(A=this.subform.children[0]).pageSet[RE](),n=A.pageSet.pageArea.children,i={name:"div",children:[]},a=null,o=null,s=null,A.breakBefore.children.length>=1?(o=A.breakBefore.children[0],s=o.target):A.subform.children.length>=1&&A.subform.children[0].breakBefore.children.length>=1?(o=A.subform.children[0].breakBefore.children[0],s=o.target):null!==(t=A.break)&&void 0!==t&&t.beforeTarget?(o=A.break,s=o.beforeTarget):A.subform.children.length>=1&&null!==(r=A.subform.children[0].break)&&void 0!==r&&r.beforeTarget&&(o=A.subform.children[0].break,s=o.beforeTarget),o&&(c=this[Fd](s,o[td]()))instanceof tw&&(a=c,o[HE]={}),a||(a=n[0]),a[HE]={numberOfUse:1},(g=a[td]())[HE]={numberOfUse:1,pageIndex:g.pageArea.children.indexOf(a),pageSetIndex:0},l=null,h=null,I=!0,f=0,C=0,B=gv().mark((function e(){var t,r,n,o,s,c,g,B,Q,d,y,p,v,m,w,b;return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I){e.next=7;break}if(i.children.pop(),3!=++f){e.next=5;break}return q("XFA - Something goes wrong: please file a bug."),e.abrupt("return",{v:i});case 5:e.next=8;break;case 7:f=0;case 8:u=null,E[HE].currentPageArea=a,t=a[Md]().html,i.children.push(t),l&&(E[HE].noLayoutFailure=!0,t.children.push(l[Md](a[HE].space).html),l=null),h&&(E[HE].noLayoutFailure=!0,t.children.push(h[Md](a[HE].space).html),h=null),r=a.contentArea.children,n=t.children.filter((function(e){return e.attributes.class.includes("xfaContentarea")})),I=!1,E[HE].firstUnsplittable=null,E[HE].noLayoutFailure=!1,o=function(e){var t,r=A[PE]();r&&(I||(I=(null===(t=r.children)||void 0===t?void 0:t.length)>0),n[e].children.push(r))},s=C,c=r.length;case 21:if(!(s0),n[s].children.push(Q.html)):!I&&i.children.length>1&&i.children.pop(),e.abrupt("return",{v:i});case 31:if(!Q.isBreak()){e.next=40;break}if(y=Q.breakNode,o(s),"auto"!==y.targetType){e.next=36;break}return e.abrupt("continue",53);case 36:return y.leader&&(l=(l=E[Fd](y.leader,y[td]()))?l[0]:null),y.trailer&&(h=(h=E[Fd](y.trailer,y[td]()))?h[0]:null),"pageArea"===y.targetType?(u=y[HE].target,s=1/0):y[HE].target?(u=y[HE].target,C=y[HE].index+1,s=1/0):s=y[HE].index,e.abrupt("continue",53);case 40:if(!E[HE].overflowNode){e.next=52;break}return p=E[HE].overflowNode,E[HE].overflowNode=null,v=p[_E](),m=v.target,v.addLeader=null!==v.leader,v.addTrailer=null!==v.trailer,o(s),w=s,s=1/0,m instanceof tw?u=m:m instanceof rm&&(-1!==(b=r.indexOf(m))?b>w?s=b-1:C=b:(u=m[td](),C=u.contentArea.children.indexOf(m))),e.abrupt("continue",53);case 52:o(s);case 53:s++,e.next=21;break;case 56:return E[HE].pageNumber+=1,u&&(u[Cd]()?u[HE].numberOfUse+=1:u=null),a=u||a[$E](),e.next=61,null;case 61:case"end":return e.stop()}}),e)}));case 22:return e.delegateYield(B(),"t0",24);case 24:if(!(Q=e.t0)){e.next=27;break}return e.abrupt("return",Q.v);case 27:e.next=22;break;case 29:case"end":return e.stop()}}),e,this)}))}])}(),kw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"text"])).id=e.id||"",r.maxChars=Xd({data:e.maxChars,defaultValue:0,validate:function(e){return e>=0}}),r.name=e.name||"",r.rid=e.rid||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:kE,value:function(){return!0}},{key:yd,value:function(e){return e[Qd]===Od.xhtml.id?(this[UE]=e,!0):(q("XFA - Invalid content in Text: ".concat(e[Ed],".")),!1)}},{key:vd,value:function(e){this[UE]instanceof fp||zp(t,vd,this,3)([e])}},{key:YE,value:function(){"string"==typeof this[UE]&&(this[UE]=this[UE].replaceAll("\\r\\n","\\n"))}},{key:_E,value:function(){return"string"==typeof this[UE]?this[UE].split(/[\\u2029\\u2028\\n]/).reduce((function(e,t){return t&&e.push(t),e}),[]).join("\\n"):this[UE][Ld]()}},{key:Md,value:function(e){if("string"==typeof this[UE]){var t=Dv(this[UE]).html;return this[UE].includes("\\u2029")?(t.name="div",t.children=[],this[UE].split("\\u2029").map((function(e){return e.split(/[\\u2028\\n]/).reduce((function(e,t){return e.push({name:"span",value:t},{name:"br"}),e}),[])})).forEach((function(e){t.children.push({name:"p",children:e})}))):/[\\u2028\\n]/.test(this[UE])&&(t.name="div",t.children=[],this[UE].split(/[\\u2028\\n]/).forEach((function(e){t.children.push({name:"span",value:e},{name:"br"})}))),Ay.success(t)}return this[UE][Md](e)}}])}(),Dw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"textEdit",!0])).allowRichText=Xd({data:e.allowRichText,defaultValue:0,validate:function(e){return 1===e}}),r.hScrollPolicy=$d(e.hScrollPolicy,["auto","off","on"]),r.id=e.id||"",r.multiLine=Xd({data:e.multiLine,defaultValue:"",validate:function(e){return 0===e||1===e}}),r.use=e.use||"",r.usehref=e.usehref||"",r.vScrollPolicy=$d(e.vScrollPolicy,["auto","off","on"]),r.border=null,r.comb=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r,A,n=Lp(this,"border","font","margin"),i=this[td]()[td]();return""===this.multiLine&&(this.multiLine=i instanceof lm?1:0),t=1===this.multiLine?{name:"textarea",attributes:{dataId:(null===(r=i[ME])||void 0===r?void 0:r[Yd])||i[Yd],fieldId:i[Yd],class:["xfaTextfield"],style:n,"aria-label":kv(i),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:(null===(A=i[ME])||void 0===A?void 0:A[Yd])||i[Yd],fieldId:i[Yd],class:["xfaTextfield"],style:n,"aria-label":kv(i),"aria-required":!1}},mv(i)&&(t.attributes["aria-required"]=!0,t.attributes.required=!0),Ay.success({name:"label",attributes:{class:["xfaLabel"]},children:[t]})}}])}(),Sw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"time"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t,[{key:YE,value:function(){var e=this[UE].trim();this[UE]=e?new Date(e):null}},{key:Md,value:function(e){return Dv(this[UE]?this[UE].toString():"")}}])}(),Fw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"timeStamp"])).id=e.id||"",r.server=e.server||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),xw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"toolTip"])).id=e.id||"",r.rid=e.rid||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),Rw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"traversal",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.traverse=new Cp,r}return sv(t,fp),rv(t)}(),Gw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"traverse",!0])).id=e.id||"",r.operation=$d(e.operation,["next","back","down","first","left","right","up"]),r.ref=e.ref||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.script=null,r}return sv(t,fp),rv(t,[{key:"name",get:function(){return this.operation}},{key:fd,value:function(){return!1}}])}(),Nw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"ui",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.picture=null,r.barcode=null,r.button=null,r.checkButton=null,r.choiceList=null,r.dateTimeEdit=null,r.defaultUi=null,r.imageEdit=null,r.numericEdit=null,r.passwordEdit=null,r.signature=null,r.textEdit=null,r}return sv(t,fp),rv(t,[{key:_E,value:function(){if(void 0===this[HE]){var e,t=lv(Object.getOwnPropertyNames(this));try{for(t.s();!(e=t.n()).done;){var r=e.value;if("extras"!==r&&"picture"!==r){var A=this[r];if(A instanceof fp)return this[HE]=A,A}}}catch(e){t.e(e)}finally{t.f()}this[HE]=null}return this[HE]}},{key:Md,value:function(e){var t=this[_E]();return t?t[Md](e):Ay.EMPTY}}])}(),Lw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"validate",!0])).formatTest=$d(e.formatTest,["warning","disabled","error"]),r.id=e.id||"",r.nullTest=$d(e.nullTest,["disabled","error","warning"]),r.scriptTest=$d(e.scriptTest,["error","disabled","warning"]),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.message=null,r.picture=null,r.script=null,r}return sv(t,fp),rv(t)}(),Uw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"value",!0])).id=e.id||"",r.override=Xd({data:e.override,defaultValue:0,validate:function(e){return 1===e}}),r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.arc=null,r.boolean=null,r.date=null,r.dateTime=null,r.decimal=null,r.exData=null,r.float=null,r.image=null,r.integer=null,r.line=null,r.rectangle=null,r.text=null,r.time=null,r}return sv(t,fp),rv(t,[{key:Gd,value:function(e){var t,r=this[td]();if(r instanceof km&&null!==(t=r.ui)&&void 0!==t&&t.imageEdit)return this.image||(this.image=new Lm({}),this[SE](this.image)),void(this.image[UE]=e[UE]);var A=e[Ed];if(null===this[A]){var n,i=lv(Object.getOwnPropertyNames(this));try{for(i.s();!(n=i.n()).done;){var a=n.value,o=this[a];o instanceof fp&&(this[a]=null,this[kd](o))}}catch(e){i.e(e)}finally{i.f()}this[e[Ed]]=e,this[SE](e)}else this[A][UE]=e[UE]}},{key:Ld,value:function(){if(this.exData)return"string"==typeof this.exData[UE]?this.exData[UE].trim():this.exData[UE][Ld]().trim();var e,t=lv(Object.getOwnPropertyNames(this));try{for(t.s();!(e=t.n()).done;){var r=e.value;if("image"!==r){var A=this[r];if(A instanceof fp)return(A[UE]||"").toString().trim()}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:Md,value:function(e){var t,r=lv(Object.getOwnPropertyNames(this));try{for(r.s();!(t=r.n()).done;){var A=this[t.value];if(A instanceof fp)return A[Md](e)}}catch(e){r.e(e)}finally{r.f()}return Ay.EMPTY}}])}(),Mw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"variables",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.boolean=new Cp,r.date=new Cp,r.dateTime=new Cp,r.decimal=new Cp,r.exData=new Cp,r.float=new Cp,r.image=new Cp,r.integer=new Cp,r.manifest=new Cp,r.script=new Cp,r.text=new Cp,r.time=new Cp,r}return sv(t,fp),rv(t,[{key:fd,value:function(){return!0}}])}(),Jw=function(){function e(){nv(this,e)}return rv(e,null,[{key:Pd,value:function(t,r){if(e.hasOwnProperty(t)){var A=e[t](r);return A[Rd](r),A}}},{key:"appearanceFilter",value:function(e){return new Gv(e)}},{key:"arc",value:function(e){return new Nv(e)}},{key:"area",value:function(e){return new Lv(e)}},{key:"assist",value:function(e){return new Uv(e)}},{key:"barcode",value:function(e){return new Mv(e)}},{key:"bind",value:function(e){return new Jv(e)}},{key:"bindItems",value:function(e){return new Hv(e)}},{key:"bookend",value:function(e){return new Yv(e)}},{key:"boolean",value:function(e){return new Pv(e)}},{key:"border",value:function(e){return new Ov(e)}},{key:"break",value:function(e){return new Kv(e)}},{key:"breakAfter",value:function(e){return new Tv(e)}},{key:"breakBefore",value:function(e){return new qv(e)}},{key:"button",value:function(e){return new jv(e)}},{key:"calculate",value:function(e){return new Wv(e)}},{key:"caption",value:function(e){return new Zv(e)}},{key:"certificate",value:function(e){return new _v(e)}},{key:"certificates",value:function(e){return new Xv(e)}},{key:"checkButton",value:function(e){return new Vv(e)}},{key:"choiceList",value:function(e){return new zv(e)}},{key:"color",value:function(e){return new $v(e)}},{key:"comb",value:function(e){return new em(e)}},{key:"connect",value:function(e){return new tm(e)}},{key:"contentArea",value:function(e){return new rm(e)}},{key:"corner",value:function(e){return new Am(e)}},{key:"date",value:function(e){return new nm(e)}},{key:"dateTime",value:function(e){return new im(e)}},{key:"dateTimeEdit",value:function(e){return new am(e)}},{key:"decimal",value:function(e){return new om(e)}},{key:"defaultUi",value:function(e){return new sm(e)}},{key:"desc",value:function(e){return new cm(e)}},{key:"digestMethod",value:function(e){return new gm(e)}},{key:"digestMethods",value:function(e){return new um(e)}},{key:"draw",value:function(e){return new lm(e)}},{key:"edge",value:function(e){return new hm(e)}},{key:"encoding",value:function(e){return new Im(e)}},{key:"encodings",value:function(e){return new fm(e)}},{key:"encrypt",value:function(e){return new Cm(e)}},{key:"encryptData",value:function(e){return new Bm(e)}},{key:"encryption",value:function(e){return new Qm(e)}},{key:"encryptionMethod",value:function(e){return new Em(e)}},{key:"encryptionMethods",value:function(e){return new dm(e)}},{key:"event",value:function(e){return new ym(e)}},{key:"exData",value:function(e){return new pm(e)}},{key:"exObject",value:function(e){return new vm(e)}},{key:"exclGroup",value:function(e){return new mm(e)}},{key:"execute",value:function(e){return new wm(e)}},{key:"extras",value:function(e){return new bm(e)}},{key:"field",value:function(e){return new km(e)}},{key:"fill",value:function(e){return new Dm(e)}},{key:"filter",value:function(e){return new Sm(e)}},{key:"float",value:function(e){return new Fm(e)}},{key:"font",value:function(e){return new xm(e)}},{key:"format",value:function(e){return new Rm(e)}},{key:"handler",value:function(e){return new Gm(e)}},{key:"hyphenation",value:function(e){return new Nm(e)}},{key:"image",value:function(e){return new Lm(e)}},{key:"imageEdit",value:function(e){return new Um(e)}},{key:"integer",value:function(e){return new Mm(e)}},{key:"issuers",value:function(e){return new Jm(e)}},{key:"items",value:function(e){return new Hm(e)}},{key:"keep",value:function(e){return new Ym(e)}},{key:"keyUsage",value:function(e){return new Pm(e)}},{key:"line",value:function(e){return new Om(e)}},{key:"linear",value:function(e){return new Km(e)}},{key:"lockDocument",value:function(e){return new Tm(e)}},{key:"manifest",value:function(e){return new qm(e)}},{key:"margin",value:function(e){return new jm(e)}},{key:"mdp",value:function(e){return new Wm(e)}},{key:"medium",value:function(e){return new Zm(e)}},{key:"message",value:function(e){return new _m(e)}},{key:"numericEdit",value:function(e){return new Xm(e)}},{key:"occur",value:function(e){return new Vm(e)}},{key:"oid",value:function(e){return new zm(e)}},{key:"oids",value:function(e){return new $m(e)}},{key:"overflow",value:function(e){return new ew(e)}},{key:"pageArea",value:function(e){return new tw(e)}},{key:"pageSet",value:function(e){return new rw(e)}},{key:"para",value:function(e){return new Aw(e)}},{key:"passwordEdit",value:function(e){return new nw(e)}},{key:"pattern",value:function(e){return new iw(e)}},{key:"picture",value:function(e){return new aw(e)}},{key:"proto",value:function(e){return new ow(e)}},{key:"radial",value:function(e){return new sw(e)}},{key:"reason",value:function(e){return new cw(e)}},{key:"reasons",value:function(e){return new gw(e)}},{key:"rectangle",value:function(e){return new uw(e)}},{key:"ref",value:function(e){return new lw(e)}},{key:"script",value:function(e){return new hw(e)}},{key:"setProperty",value:function(e){return new Iw(e)}},{key:"signData",value:function(e){return new fw(e)}},{key:"signature",value:function(e){return new Cw(e)}},{key:"signing",value:function(e){return new Bw(e)}},{key:"solid",value:function(e){return new Qw(e)}},{key:"speak",value:function(e){return new Ew(e)}},{key:"stipple",value:function(e){return new dw(e)}},{key:"subform",value:function(e){return new yw(e)}},{key:"subformSet",value:function(e){return new pw(e)}},{key:"subjectDN",value:function(e){return new vw(e)}},{key:"subjectDNs",value:function(e){return new mw(e)}},{key:"submit",value:function(e){return new ww(e)}},{key:"template",value:function(e){return new bw(e)}},{key:"text",value:function(e){return new kw(e)}},{key:"textEdit",value:function(e){return new Dw(e)}},{key:"time",value:function(e){return new Sw(e)}},{key:"timeStamp",value:function(e){return new Fw(e)}},{key:"toolTip",value:function(e){return new xw(e)}},{key:"traversal",value:function(e){return new Rw(e)}},{key:"traverse",value:function(e){return new Gw(e)}},{key:"ui",value:function(e){return new Nw(e)}},{key:"validate",value:function(e){return new Lw(e)}},{key:"value",value:function(e){return new Uw(e)}},{key:"variables",value:function(e){return new Mw(e)}}])}();function Hw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||Pw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yw(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Pw(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Pw(e,t){if(e){if("string"==typeof e)return Ow(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ow(e,t):void 0}}function Ow(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&((A=e[NE]())[kd](A.occur),A.occur=null),this._bindValue(e,t[0],r),this._setProperties(e,t[0]),this._bindItems(e,t[0]),1!==t.length)for(var n=e[td](),i=e[Ed],a=n[ad](e),o=1,s=t.length;ol?c=c.slice(0,l):0===c.length&&(c=null),c&&this._isConsumeData()&&c.forEach((function(e){e[LE]=!0}))}else{if(!i.name){this._setAndBind(i,t);continue}if(this._isConsumeData()){for(var h=[];h.length0?h:null}else{if(!(c=t[XE](i.name,!1,this.emptyMerge).next().value)){if(0===u){r.push(i);continue}var f=t[Qd]===qw?-1:t[Qd];c=i[ME]=new Qp(f,i.name),this.emptyMerge&&(c[LE]=!0),t[SE](c),this._setAndBind(i,c);continue}this.emptyMerge&&(c[LE]=!0),c=[c]}}c?this._bindOccurrences(i,c,o):u>0?this._setAndBind(i,t):r.push(i)}}else{this._mergeMode="consumeData"===i.mergeMode;var C=t[VE]();if(C.length>0)this._bindOccurrences(i,[C[0]],null);else if(this.emptyMerge){var B=t[Qd]===qw?-1:t[Qd],Q=i[ME]=new Qp(B,i.name||"root");t[SE](Q),this._bindElement(i,Q)}}}}catch(e){n.e(e)}finally{n.f()}r.forEach((function(e){return e[td]()[kd](e)}))}}])}();function Zw(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Xw(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function _w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||Xw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xw(e,t){if(e){if("string"==typeof e)return Vw(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vw(e,t):void 0}}function Vw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0;){var r=t.at(-1),A=_w(r,2),n=A[0],i=A[1];if(n+1!==i.length){var a=i[++r[0]],o=e.get(a[Yd]);if(o)a[Gd](o);else{var s,c=Zw(a[KE]().values());try{for(c.s();!(s=c.n()).done;){var g=s.value,u=e.get(g[Yd]);if(u){g[Gd](u);break}}}catch(e){c.e(e)}finally{c.f()}}var l=a[VE]();l.length>0&&t.push([-1,l])}else t.pop()}var h=[''];if(this.dataset){var I,f=Zw(this.dataset[VE]());try{for(f.s();!(I=f.n()).done;){var C=I.value;"data"!==C[Ed]&&C[Jd](h)}}catch(e){f.e(e)}finally{f.f()}}return this.data[Jd](h),h.push(""),h.join("")}}])}();function tb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=1&&e<=8}])}return cb(t,pp),Ab(t)}(),db=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"agent",!0])).name=e.name?e.name.trim():"",r.common=new Cp,r}return cb(t,fp),Ab(t)}(),yb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"alwaysEmbed"])}return cb(t,Ep),Ab(t)}(),pb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"amd"])}return cb(t,yp),Ab(t)}(),vb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"area"])).level=Xd({data:e.level,defaultValue:0,validate:function(e){return e>=1&&e<=3}}),r.name=$d(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"]),r}return cb(t,fp),Ab(t)}(),mb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"attributes",["preserve","delegate","ignore"]])}return cb(t,dp),Ab(t)}(),wb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"autoSave",["disabled","enabled"]])}return cb(t,dp),Ab(t)}(),bb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"base"])}return cb(t,yp),Ab(t)}(),kb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"batchOutput"])).format=$d(e.format,["none","concat","zip","zipCompress"]),r}return cb(t,fp),Ab(t)}(),Db=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"behaviorOverride"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=new Map(this[UE].trim().split(/\\s+/).filter((function(e){return e.includes(":")})).map((function(e){return e.split(":",2)})))}}])}(),Sb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"cache",!0])).templateCache=null,r}return cb(t,fp),Ab(t)}(),Fb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"change"])}return cb(t,vp),Ab(t)}(),xb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"common",!0])).data=null,r.locale=null,r.localeSet=null,r.messaging=null,r.suppressBanner=null,r.template=null,r.validationMessaging=null,r.versionControl=null,r.log=new Cp,r}return cb(t,fp),Ab(t)}(),Rb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"compress"])).scope=$d(e.scope,["imageOnly","document"]),r}return cb(t,fp),Ab(t)}(),Gb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"compressLogicalStructure"])}return cb(t,vp),Ab(t)}(),Nb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"compressObjectStream"])}return cb(t,mp),Ab(t)}(),Lb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"compression",!0])).compressLogicalStructure=null,r.compressObjectStream=null,r.level=null,r.type=null,r}return cb(t,fp),Ab(t)}(),Ub=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"config",!0])).acrobat=null,r.present=null,r.trace=null,r.agent=new Cp,r}return cb(t,fp),Ab(t)}(),Mb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"conformance",["A","B"]])}return cb(t,dp),Ab(t)}(),Jb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"contentCopy"])}return cb(t,vp),Ab(t)}(),Hb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"copies",1,function(e){return e>=1}])}return cb(t,pp),Ab(t)}(),Yb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"creator"])}return cb(t,yp),Ab(t)}(),Pb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"currentPage",0,function(e){return e>=0}])}return cb(t,pp),Ab(t)}(),Ob=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"data",!0])).adjustData=null,r.attributes=null,r.incrementalLoad=null,r.outputXSL=null,r.range=null,r.record=null,r.startNode=null,r.uri=null,r.window=null,r.xsl=null,r.excludeNS=new Cp,r.transform=new Cp,r}return cb(t,fp),Ab(t)}(),Kb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"debug",!0])).uri=null,r}return cb(t,fp),Ab(t)}(),Tb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"defaultTypeface"])).writingScript=$d(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"]),r}return cb(t,Ep),Ab(t)}(),qb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"destination",["pdf","pcl","ps","webClient","zpl"]])}return cb(t,dp),Ab(t)}(),jb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"documentAssembly"])}return cb(t,vp),Ab(t)}(),Wb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"driver",!0])).name=e.name?e.name.trim():"",r.fontInfo=null,r.xdc=null,r}return cb(t,fp),Ab(t)}(),Zb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"]])}return cb(t,dp),Ab(t)}(),_b=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"dynamicRender",["forbidden","required"]])}return cb(t,dp),Ab(t)}(),Xb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"embed"])}return cb(t,vp),Ab(t)}(),Vb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"encrypt"])}return cb(t,vp),Ab(t)}(),zb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"encryption",!0])).encrypt=null,r.encryptionLevel=null,r.permissions=null,r}return cb(t,fp),Ab(t)}(),$b=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"encryptionLevel",["40bit","128bit"]])}return cb(t,dp),Ab(t)}(),ek=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"enforce"])}return cb(t,yp),Ab(t)}(),tk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"equate"])).force=Xd({data:e.force,defaultValue:1,validate:function(e){return 0===e}}),r.from=e.from||"",r.to=e.to||"",r}return cb(t,fp),Ab(t)}(),rk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"equateRange"])).from=e.from||"",r.to=e.to||"",r._unicodeRange=e.unicodeRange||"",r}return cb(t,fp),Ab(t,[{key:"unicodeRange",get:function(){var e,t=[],r=/U\\+([0-9a-fA-F]+)/,A=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tb(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(this._unicodeRange.split(",").map((function(e){return e.trim()})).filter((function(e){return!!e})));try{for(A.s();!(e=A.n()).done;){var n=e.value;1===(n=n.split("-",2).map((function(e){var t=e.match(r);return t?parseInt(t[1],16):0}))).length&&n.push(n[0]),t.push(n)}}catch(e){A.e(e)}finally{A.f()}return _(this,"unicodeRange",t)}}])}(),Ak=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"exclude"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=this[UE].trim().split(/\\s+/).filter((function(e){return e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)}))}}])}(),nk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"excludeNS"])}return cb(t,yp),Ab(t)}(),ik=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"flipLabel",["usePrinterSetting","on","off"]])}return cb(t,dp),Ab(t)}(),ak=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"fontInfo",!0])).embed=null,r.map=null,r.subsetBelow=null,r.alwaysEmbed=new Cp,r.defaultTypeface=new Cp,r.neverEmbed=new Cp,r}return cb(t,fp),Ab(t)}(),ok=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"formFieldFilling"])}return cb(t,vp),Ab(t)}(),sk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"groupParent"])}return cb(t,yp),Ab(t)}(),ck=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"ifEmpty",["dataValue","dataGroup","ignore","remove"]])}return cb(t,dp),Ab(t)}(),gk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"includeXDPContent"])}return cb(t,yp),Ab(t)}(),uk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"incrementalLoad",["none","forwardOnly"]])}return cb(t,dp),Ab(t)}(),lk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"incrementalMerge"])}return cb(t,vp),Ab(t)}(),hk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"interactive"])}return cb(t,vp),Ab(t)}(),Ik=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"jog",["usePrinterSetting","none","pageSet"]])}return cb(t,dp),Ab(t)}(),fk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"labelPrinter",!0])).name=$d(e.name,["zpl","dpl","ipl","tcpl"]),r.batchOutput=null,r.flipLabel=null,r.fontInfo=null,r.xdc=null,r}return cb(t,fp),Ab(t)}(),Ck=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"layout",["paginate","panel"]])}return cb(t,dp),Ab(t)}(),Bk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"level",0,function(e){return e>0}])}return cb(t,pp),Ab(t)}(),Qk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"linearized"])}return cb(t,vp),Ab(t)}(),Ek=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"locale"])}return cb(t,yp),Ab(t)}(),dk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"localeSet"])}return cb(t,yp),Ab(t)}(),yk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"log",!0])).mode=null,r.threshold=null,r.to=null,r.uri=null,r}return cb(t,fp),Ab(t)}(),pk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"map",!0])).equate=new Cp,r.equateRange=new Cp,r}return cb(t,fp),Ab(t)}(),vk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"mediumInfo",!0])).map=null,r}return cb(t,fp),Ab(t)}(),mk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"message",!0])).msgId=null,r.severity=null,r}return cb(t,fp),Ab(t)}(),wk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"messaging",!0])).message=new Cp,r}return cb(t,fp),Ab(t)}(),bk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"mode",["append","overwrite"]])}return cb(t,dp),Ab(t)}(),kk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"modifyAnnots"])}return cb(t,vp),Ab(t)}(),Dk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"msgId",1,function(e){return e>=1}])}return cb(t,pp),Ab(t)}(),Sk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"nameAttr"])}return cb(t,yp),Ab(t)}(),Fk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"neverEmbed"])}return cb(t,Ep),Ab(t)}(),xk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"numberOfCopies",null,function(e){return e>=2&&e<=5}])}return cb(t,pp),Ab(t)}(),Rk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"openAction",!0])).destination=null,r}return cb(t,fp),Ab(t)}(),Gk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"output",!0])).to=null,r.type=null,r.uri=null,r}return cb(t,fp),Ab(t)}(),Nk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"outputBin"])}return cb(t,yp),Ab(t)}(),Lk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"outputXSL",!0])).uri=null,r}return cb(t,fp),Ab(t)}(),Uk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"overprint",["none","both","draw","field"]])}return cb(t,dp),Ab(t)}(),Mk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"packets"])}return cb(t,yp),Ab(t,[{key:YE,value:function(){"*"!==this[UE]&&(this[UE]=this[UE].trim().split(/\\s+/).filter((function(e){return["config","datasets","template","xfdf","xslt"].includes(e)})))}}])}(),Jk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"pageOffset"])).x=Xd({data:e.x,defaultValue:"useXDCSetting",validate:function(e){return!0}}),r.y=Xd({data:e.y,defaultValue:"useXDCSetting",validate:function(e){return!0}}),r}return cb(t,fp),Ab(t)}(),Hk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"pageRange"])}return cb(t,yp),Ab(t,[{key:YE,value:function(){for(var e=this[UE].trim().split(/\\s+/).map((function(e){return parseInt(e,10)})),t=[],r=0,A=e.length;r=0&&(this[UE]=e)}}])}(),aD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"relevant"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=this[UE].trim().split(/\\s+/)}}])}(),oD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"rename"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=this[UE].trim(),(this[UE].toLowerCase().startsWith("xml")||new RegExp("[\\\\p{L}_][\\\\p{L}\\\\d._\\\\p{M}-]*","u").test(this[UE]))&&q("XFA - Rename: invalid XFA name")}}])}(),sD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"renderPolicy",["server","client"]])}return cb(t,dp),Ab(t)}(),cD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"runScripts",["both","client","none","server"]])}return cb(t,dp),Ab(t)}(),gD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"script",!0])).currentPage=null,r.exclude=null,r.runScripts=null,r}return cb(t,fp),Ab(t)}(),uD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"scriptModel",["XFA","none"]])}return cb(t,dp),Ab(t)}(),lD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"severity",["ignore","error","information","trace","warning"]])}return cb(t,dp),Ab(t)}(),hD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"silentPrint",!0])).addSilentPrint=null,r.printerName=null,r}return cb(t,fp),Ab(t)}(),ID=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"staple"])).mode=$d(e.mode,["usePrinterSetting","on","off"]),r}return cb(t,fp),Ab(t)}(),fD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"startNode"])}return cb(t,yp),Ab(t)}(),CD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"startPage",0,function(e){return!0}])}return cb(t,pp),Ab(t)}(),BD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"submitFormat",["html","delegate","fdf","xml","pdf"]])}return cb(t,dp),Ab(t)}(),QD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"submitUrl"])}return cb(t,yp),Ab(t)}(),ED=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"subsetBelow",100,function(e){return e>=0&&e<=100}])}return cb(t,pp),Ab(t)}(),dD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"suppressBanner"])}return cb(t,vp),Ab(t)}(),yD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"tagged"])}return cb(t,vp),Ab(t)}(),pD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"template",!0])).base=null,r.relevant=null,r.startPage=null,r.uri=null,r.xsl=null,r}return cb(t,fp),Ab(t)}(),vD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"threshold",["trace","error","information","warning"]])}return cb(t,dp),Ab(t)}(),mD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"to",["null","memory","stderr","stdout","system","uri"]])}return cb(t,dp),Ab(t)}(),wD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"templateCache"])).maxEntries=Xd({data:e.maxEntries,defaultValue:5,validate:function(e){return e>=0}}),r}return cb(t,fp),Ab(t)}(),bD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"trace",!0])).area=new Cp,r}return cb(t,fp),Ab(t)}(),kD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"transform",!0])).groupParent=null,r.ifEmpty=null,r.nameAttr=null,r.picture=null,r.presence=null,r.rename=null,r.whitespace=null,r}return cb(t,fp),Ab(t)}(),DD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"]])}return cb(t,dp),Ab(t)}(),SD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"uri"])}return cb(t,yp),Ab(t)}(),FD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"validate",["preSubmit","prePrint","preExecute","preSave"]])}return cb(t,dp),Ab(t)}(),xD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"validateApprovalSignatures"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=this[UE].trim().split(/\\s+/).filter((function(e){return["docReady","postSign"].includes(e)}))}}])}(),RD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"]])}return cb(t,dp),Ab(t)}(),GD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"version",["1.7","1.6","1.5","1.4","1.3","1.2"]])}return cb(t,dp),Ab(t)}(),ND=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"VersionControl"])).outputBelow=$d(e.outputBelow,["warn","error","update"]),r.sourceAbove=$d(e.sourceAbove,["warn","error"]),r.sourceBelow=$d(e.sourceBelow,["update","maintain"]),r}return cb(t,fp),Ab(t)}(),LD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"viewerPreferences",!0])).ADBE_JSConsole=null,r.ADBE_JSDebugger=null,r.addViewerPreferences=null,r.duplexOption=null,r.enforce=null,r.numberOfCopies=null,r.pageRange=null,r.pickTrayByPDFSize=null,r.printScaling=null,r}return cb(t,fp),Ab(t)}(),UD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"webClient",!0])).name=e.name?e.name.trim():"",r.fontInfo=null,r.xdc=null,r}return cb(t,fp),Ab(t)}(),MD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"whitespace",["preserve","ltrim","normalize","rtrim","trim"]])}return cb(t,dp),Ab(t)}(),JD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"window"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){var e=this[UE].trim().split(/\\s*,\\s*/,2).map((function(e){return parseInt(e,10)}));e.some((function(e){return isNaN(e)}))?this[UE]=[0,0]:(1===e.length&&e.push(e[0]),this[UE]=e)}}])}(),HD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"xdc",!0])).uri=new Cp,r.xsl=new Cp,r}return cb(t,fp),Ab(t)}(),YD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"xdp",!0])).packets=null,r}return cb(t,fp),Ab(t)}(),PD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"xsl",!0])).debug=null,r.uri=null,r}return cb(t,fp),Ab(t)}(),OD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"zpl",!0])).name=e.name?e.name.trim():"",r.batchOutput=null,r.flipLabel=null,r.fontInfo=null,r.xdc=null,r}return cb(t,fp),Ab(t)}(),KD=function(){function e(){ib(this,e)}return Ab(e,null,[{key:Pd,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"acrobat",value:function(e){return new lb(e)}},{key:"acrobat7",value:function(e){return new hb(e)}},{key:"ADBE_JSConsole",value:function(e){return new Ib(e)}},{key:"ADBE_JSDebugger",value:function(e){return new fb(e)}},{key:"addSilentPrint",value:function(e){return new Cb(e)}},{key:"addViewerPreferences",value:function(e){return new Bb(e)}},{key:"adjustData",value:function(e){return new Qb(e)}},{key:"adobeExtensionLevel",value:function(e){return new Eb(e)}},{key:"agent",value:function(e){return new db(e)}},{key:"alwaysEmbed",value:function(e){return new yb(e)}},{key:"amd",value:function(e){return new pb(e)}},{key:"area",value:function(e){return new vb(e)}},{key:"attributes",value:function(e){return new mb(e)}},{key:"autoSave",value:function(e){return new wb(e)}},{key:"base",value:function(e){return new bb(e)}},{key:"batchOutput",value:function(e){return new kb(e)}},{key:"behaviorOverride",value:function(e){return new Db(e)}},{key:"cache",value:function(e){return new Sb(e)}},{key:"change",value:function(e){return new Fb(e)}},{key:"common",value:function(e){return new xb(e)}},{key:"compress",value:function(e){return new Rb(e)}},{key:"compressLogicalStructure",value:function(e){return new Gb(e)}},{key:"compressObjectStream",value:function(e){return new Nb(e)}},{key:"compression",value:function(e){return new Lb(e)}},{key:"config",value:function(e){return new Ub(e)}},{key:"conformance",value:function(e){return new Mb(e)}},{key:"contentCopy",value:function(e){return new Jb(e)}},{key:"copies",value:function(e){return new Hb(e)}},{key:"creator",value:function(e){return new Yb(e)}},{key:"currentPage",value:function(e){return new Pb(e)}},{key:"data",value:function(e){return new Ob(e)}},{key:"debug",value:function(e){return new Kb(e)}},{key:"defaultTypeface",value:function(e){return new Tb(e)}},{key:"destination",value:function(e){return new qb(e)}},{key:"documentAssembly",value:function(e){return new jb(e)}},{key:"driver",value:function(e){return new Wb(e)}},{key:"duplexOption",value:function(e){return new Zb(e)}},{key:"dynamicRender",value:function(e){return new _b(e)}},{key:"embed",value:function(e){return new Xb(e)}},{key:"encrypt",value:function(e){return new Vb(e)}},{key:"encryption",value:function(e){return new zb(e)}},{key:"encryptionLevel",value:function(e){return new $b(e)}},{key:"enforce",value:function(e){return new ek(e)}},{key:"equate",value:function(e){return new tk(e)}},{key:"equateRange",value:function(e){return new rk(e)}},{key:"exclude",value:function(e){return new Ak(e)}},{key:"excludeNS",value:function(e){return new nk(e)}},{key:"flipLabel",value:function(e){return new ik(e)}},{key:"fontInfo",value:function(e){return new ak(e)}},{key:"formFieldFilling",value:function(e){return new ok(e)}},{key:"groupParent",value:function(e){return new sk(e)}},{key:"ifEmpty",value:function(e){return new ck(e)}},{key:"includeXDPContent",value:function(e){return new gk(e)}},{key:"incrementalLoad",value:function(e){return new uk(e)}},{key:"incrementalMerge",value:function(e){return new lk(e)}},{key:"interactive",value:function(e){return new hk(e)}},{key:"jog",value:function(e){return new Ik(e)}},{key:"labelPrinter",value:function(e){return new fk(e)}},{key:"layout",value:function(e){return new Ck(e)}},{key:"level",value:function(e){return new Bk(e)}},{key:"linearized",value:function(e){return new Qk(e)}},{key:"locale",value:function(e){return new Ek(e)}},{key:"localeSet",value:function(e){return new dk(e)}},{key:"log",value:function(e){return new yk(e)}},{key:"map",value:function(e){return new pk(e)}},{key:"mediumInfo",value:function(e){return new vk(e)}},{key:"message",value:function(e){return new mk(e)}},{key:"messaging",value:function(e){return new wk(e)}},{key:"mode",value:function(e){return new bk(e)}},{key:"modifyAnnots",value:function(e){return new kk(e)}},{key:"msgId",value:function(e){return new Dk(e)}},{key:"nameAttr",value:function(e){return new Sk(e)}},{key:"neverEmbed",value:function(e){return new Fk(e)}},{key:"numberOfCopies",value:function(e){return new xk(e)}},{key:"openAction",value:function(e){return new Rk(e)}},{key:"output",value:function(e){return new Gk(e)}},{key:"outputBin",value:function(e){return new Nk(e)}},{key:"outputXSL",value:function(e){return new Lk(e)}},{key:"overprint",value:function(e){return new Uk(e)}},{key:"packets",value:function(e){return new Mk(e)}},{key:"pageOffset",value:function(e){return new Jk(e)}},{key:"pageRange",value:function(e){return new Hk(e)}},{key:"pagination",value:function(e){return new Yk(e)}},{key:"paginationOverride",value:function(e){return new Pk(e)}},{key:"part",value:function(e){return new Ok(e)}},{key:"pcl",value:function(e){return new Kk(e)}},{key:"pdf",value:function(e){return new Tk(e)}},{key:"pdfa",value:function(e){return new qk(e)}},{key:"permissions",value:function(e){return new jk(e)}},{key:"pickTrayByPDFSize",value:function(e){return new Wk(e)}},{key:"picture",value:function(e){return new Zk(e)}},{key:"plaintextMetadata",value:function(e){return new _k(e)}},{key:"presence",value:function(e){return new Xk(e)}},{key:"present",value:function(e){return new Vk(e)}},{key:"print",value:function(e){return new zk(e)}},{key:"printHighQuality",value:function(e){return new $k(e)}},{key:"printScaling",value:function(e){return new eD(e)}},{key:"printerName",value:function(e){return new tD(e)}},{key:"producer",value:function(e){return new rD(e)}},{key:"ps",value:function(e){return new AD(e)}},{key:"range",value:function(e){return new nD(e)}},{key:"record",value:function(e){return new iD(e)}},{key:"relevant",value:function(e){return new aD(e)}},{key:"rename",value:function(e){return new oD(e)}},{key:"renderPolicy",value:function(e){return new sD(e)}},{key:"runScripts",value:function(e){return new cD(e)}},{key:"script",value:function(e){return new gD(e)}},{key:"scriptModel",value:function(e){return new uD(e)}},{key:"severity",value:function(e){return new lD(e)}},{key:"silentPrint",value:function(e){return new hD(e)}},{key:"staple",value:function(e){return new ID(e)}},{key:"startNode",value:function(e){return new fD(e)}},{key:"startPage",value:function(e){return new CD(e)}},{key:"submitFormat",value:function(e){return new BD(e)}},{key:"submitUrl",value:function(e){return new QD(e)}},{key:"subsetBelow",value:function(e){return new ED(e)}},{key:"suppressBanner",value:function(e){return new dD(e)}},{key:"tagged",value:function(e){return new yD(e)}},{key:"template",value:function(e){return new pD(e)}},{key:"templateCache",value:function(e){return new wD(e)}},{key:"threshold",value:function(e){return new vD(e)}},{key:"to",value:function(e){return new mD(e)}},{key:"trace",value:function(e){return new bD(e)}},{key:"transform",value:function(e){return new kD(e)}},{key:"type",value:function(e){return new DD(e)}},{key:"uri",value:function(e){return new SD(e)}},{key:"validate",value:function(e){return new FD(e)}},{key:"validateApprovalSignatures",value:function(e){return new xD(e)}},{key:"validationMessaging",value:function(e){return new RD(e)}},{key:"version",value:function(e){return new GD(e)}},{key:"versionControl",value:function(e){return new ND(e)}},{key:"viewerPreferences",value:function(e){return new LD(e)}},{key:"webClient",value:function(e){return new UD(e)}},{key:"whitespace",value:function(e){return new MD(e)}},{key:"window",value:function(e){return new JD(e)}},{key:"xdc",value:function(e){return new HD(e)}},{key:"xdp",value:function(e){return new YD(e)}},{key:"xsl",value:function(e){return new PD(e)}},{key:"zpl",value:function(e){return new OD(e)}}])}();function TD(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function $F(e,t){if(e){if("string"==typeof e)return ex(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ex(e,t):void 0}}function ex(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]&&arguments[1]?this[rx]=!0:(e=e.replaceAll(ax,""),this.style.includes("xfa-spacerun:yes")||(e=e.replaceAll(ix," "))),e&&(this[UE]+=e)}},{key:md,value:function(e){var t,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],A=Object.create(null),n={top:NaN,bottom:NaN,left:NaN,right:NaN},i=null,a=zF(this.style.split(";").map((function(e){return e.split(":",2)})));try{for(a.s();!(t=a.n()).done;){var o=VF(t.value,2),s=o[0],c=o[1];switch(s){case"font-family":A.typeface=_d(c);break;case"font-size":A.size=ey(c);break;case"font-weight":A.weight=c;break;case"font-style":A.posture=c;break;case"letter-spacing":A.letterSpacing=ey(c);break;case"margin":var g=c.split(/ \\t/).map((function(e){return ey(e)}));switch(g.length){case 1:n.top=n.bottom=n.left=n.right=g[0];break;case 2:n.top=n.bottom=g[0],n.left=n.right=g[1];break;case 3:n.top=g[0],n.bottom=g[2],n.left=n.right=g[1];break;case 4:n.top=g[0],n.left=g[1],n.bottom=g[2],n.right=g[3]}break;case"margin-top":n.top=ey(c);break;case"margin-bottom":n.bottom=ey(c);break;case"margin-left":n.left=ey(c);break;case"margin-right":n.right=ey(c);break;case"line-height":i=ey(c)}}}catch(e){a.e(e)}finally{a.f()}if(e.pushData(A,n,i),this[UE])e.addString(this[UE]);else{var u,l=zF(this[VE]());try{for(l.s();!(u=l.n()).done;){var h=u.value;"#text"!==h[Ed]?h[md](e):e.addString(h[UE])}}catch(e){l.e(e)}finally{l.f()}}r&&e.popFont()}},{key:Md,value:function(e){var t,r=[];return this[HE]={children:r},this[FE]({}),0!==r.length||this[UE]?(t=this[rx]?this[UE]?this[UE].replaceAll(ox,"\\n"):void 0:this[UE]||void 0,Ay.success({name:this[Ed],attributes:{href:this.href,style:sx(this.style,this,this[rx])},children:r,value:t})):Ay.EMPTY}}])}(),ux=function(e){function t(e){var r;return YF(this,t),(r=TF(this,t,[e,"a"])).href=Kp(e.href)||"",r}return _F(t,gx),OF(t)}(),lx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"b"])}return _F(t,gx),OF(t,[{key:md,value:function(e){e.pushFont({weight:"bold"}),jF(t,md,this,3)([e]),e.popFont()}}])}(),hx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"body"])}return _F(t,gx),OF(t,[{key:Md,value:function(e){var r=jF(t,Md,this,3)([e]),A=r.html;return A?(A.name="div",A.attributes.class=["xfaRich"],r):Ay.EMPTY}}])}(),Ix=function(e){function t(e){return YF(this,t),TF(this,t,[e,"br"])}return _F(t,gx),OF(t,[{key:Ld,value:function(){return"\\n"}},{key:md,value:function(e){e.addString("\\n")}},{key:Md,value:function(e){return Ay.success({name:"br"})}}])}(),fx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"html"])}return _F(t,gx),OF(t,[{key:Md,value:function(e){var t=[];if(this[HE]={children:t},this[FE]({}),0===t.length)return Ay.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[UE]||""});if(1===t.length){var r,A=t[0];if(null!==(r=A.attributes)&&void 0!==r&&r.class.includes("xfaRich"))return Ay.success(A)}return Ay.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:t})}}])}(),Cx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"i"])}return _F(t,gx),OF(t,[{key:md,value:function(e){e.pushFont({posture:"italic"}),jF(t,md,this,3)([e]),e.popFont()}}])}(),Bx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"li"])}return _F(t,gx),OF(t)}(),Qx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"ol"])}return _F(t,gx),OF(t)}(),Ex=function(e){function t(e){return YF(this,t),TF(this,t,[e,"p"])}return _F(t,gx),OF(t,[{key:md,value:function(e){jF(t,md,this,3)([e,!1]),e.addString("\\n"),e.addPara(),e.popFont()}},{key:Ld,value:function(){return this[td]()[VE]().at(-1)===this?jF(t,Ld,this,3)([]):jF(t,Ld,this,3)([])+"\\n"}}])}(),dx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"span"])}return _F(t,gx),OF(t)}(),yx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"sub"])}return _F(t,gx),OF(t)}(),px=function(e){function t(e){return YF(this,t),TF(this,t,[e,"sup"])}return _F(t,gx),OF(t)}(),vx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"ul"])}return _F(t,gx),OF(t)}(),mx=function(){function e(){YF(this,e)}return OF(e,null,[{key:Pd,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"a",value:function(e){return new ux(e)}},{key:"b",value:function(e){return new lx(e)}},{key:"body",value:function(e){return new hx(e)}},{key:"br",value:function(e){return new Ix(e)}},{key:"html",value:function(e){return new fx(e)}},{key:"i",value:function(e){return new Cx(e)}},{key:"li",value:function(e){return new Bx(e)}},{key:"ol",value:function(e){return new Qx(e)}},{key:"p",value:function(e){return new Ex(e)}},{key:"span",value:function(e){return new dx(e)}},{key:"sub",value:function(e){return new yx(e)}},{key:"sup",value:function(e){return new px(e)}},{key:"ul",value:function(e){return new vx(e)}}])}(),wx={config:KD,connection:lS,datasets:wS,localeSet:aF,signature:BF,stylesheet:DF,template:Jw,xdp:HF,xhtml:mx};function bx(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&void 0!==arguments[0]?arguments[0]:null;Rx(this,e),this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max.apply(Math,function(e){return function(e){if(Array.isArray(e))return xx(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Fx(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object.values(Od).map((function(e){return e.id})))),this._currentNamespace=t||new Dx(++this._nextNsId)}),[{key:"buildRoot",value:function(e){return new Ox(e)}},{key:"build",value:function(e){var t=e.nsPrefix,r=e.name,A=e.attributes,n=e.namespace,i=e.prefixes,a=null!==n;if(a&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(n)),i&&this._addNamespacePrefix(i),A.hasOwnProperty(dd)){for(var o=wx.datasets,s=A[dd],c=null,g=0,u=Object.entries(s);g0}},{key:"_searchNamespace",value:function(e){var t=this._namespaces.get(e);if(t)return t;for(var r=0,A=Object.entries(Od);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(r.s();!(t=r.n()).done;){var A=t.value,n=A.prefix,i=A.value,a=this._searchNamespace(i),o=this._namespacePrefixes.get(n);o||(o=[],this._namespacePrefixes.set(n,o)),o.push(a)}}catch(e){r.e(e)}finally{r.f()}}},{key:"_getNamespaceToUse",value:function(e){if(!e)return this._currentNamespace;var t=this._namespacePrefixes.get(e);return(null==t?void 0:t.length)>0?t.at(-1):(q("Unknown namespace prefix: ".concat(e,".")),null)}},{key:"clean",value:function(e){var t=this,r=e.hasNamespace,A=e.prefixes,n=e.nsAgnostic;r&&(this._currentNamespace=this._namespaceStack.pop()),A&&A.forEach((function(e){var r=e.prefix;t._namespacePrefixes.get(r).pop()})),n&&this._nsAgnosticLevel--}}])}();function qx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||jx(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jx(e,t){if(e){if("string"==typeof e)return Wx(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wx(e,t):void 0}}function Wx(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&void 0!==arguments[0]?arguments[0]:null,A=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Xx(this,t))._builder=new Tx(r),e._stack=[],e._globalData={usedTypefaces:new Set},e._ids=new Map,e._current=e._builder.buildRoot(e._ids),e._errorCode=0,e._whiteRegex=/^\\s+$/,e._nbsps=/\\xa0+/g,e._richText=A,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$x(e,t)}(t,nB),function(e,t,r){return t&&Zx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"parse",value:function(e){if(this.parseXml(e),0===this._errorCode)return this._current[YE](),this._current.element}},{key:"onText",value:function(e){e=e.replace(this._nbsps,(function(e){return e.slice(1)+" "})),this._richText||this._current[kE]()?this._current[vd](e,this._richText):this._whiteRegex.test(e)||this._current[vd](e.trim())}},{key:"onCdata",value:function(e){this._current[vd](e)}},{key:"_mkAttributes",value:function(e,t){var r,A=null,n=null,i=Object.create({}),a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=jx(e))){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.name,c=o.value;if("xmlns"===s)A?q("XFA - multiple namespace definition in <".concat(t,">")):A=c;else if(s.startsWith("xmlns:")){var g=s.substring(6);n||(n=[]),n.push({prefix:g,value:c})}else{var u=s.indexOf(":");if(-1===u)i[s]=c;else{var l,h=i[dd];h||(h=i[dd]=Object.create(null));var I=[s.slice(0,u),s.slice(u+1)],f=I[0],C=I[1];((l=h)[f]||(l[f]=Object.create(null)))[C]=c}}}}catch(e){a.e(e)}finally{a.f()}return[A,n,i]}},{key:"_getNameAndPrefix",value:function(e,t){var r=e.indexOf(":");return-1===r?[e,null]:[e.substring(r+1),t?"":e.substring(0,r)]}},{key:"onBeginElement",value:function(e,t,r){var A=qx(this._mkAttributes(t,e),3),n=A[0],i=A[1],a=A[2],o=qx(this._getNameAndPrefix(e,this._builder.isNsAgnostic()),2),s=o[0],c=o[1],g=this._builder.build({nsPrefix:c,name:s,attributes:a,namespace:n,prefixes:i});if(g[Ad]=this._globalData,r)return g[YE](),this._current[yd](g)&&g[xd](this._ids),void g[xE](this._builder);this._stack.push(this._current),this._current=g}},{key:"onEndElement",value:function(e){var r=this._current;if(r[sd]()&&"string"==typeof r[UE]){var A=new t;A._globalData=this._globalData;var n=A.parse(r[UE]);r[UE]=null,r[yd](n)}r[YE](),this._current=this._stack.pop(),this._current[yd](r)&&r[xd](this._ids),r[xE](this._builder)}},{key:"onError",value:function(e){this._errorCode=e}}])}();function tR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function AR(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function nR(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){AR(i,A,n,a,o,"next",e)}function o(e){AR(i,A,n,a,o,"throw",e)}a(void 0)}))}}function iR(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(this.form[Ad].usedTypefaces);try{for(A.s();!(t=A.n()).done;){var n=t.value;n=_d(n),this.form[Ad].fontFinder.find(n)||r.push(n)}}catch(e){A.e(e)}finally{A.f()}return r.length>0?r:null}},{key:"appendFonts",value:function(e,t){this.form[Ad].fontFinder.add(e,t)}},{key:"getPages",value:(e=nR(rR().mark((function e(){var t;return rR().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.pages){e.next=3;break}return e.next=3,this._createPages();case 3:return t=this.pages,this.pages=null,e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"serializeData",value:function(e){return this.dataHandler.serialize(e)}}],[{key:"_createDocument",value:function(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}},{key:"getRichTextAsHtml",value:function(e){if(!e||"string"!=typeof e)return null;try{var t=new eR(mx,!0).parse(e);if(!["body","xhtml"].includes(t[Ed])){var r=mx.body({});r[SE](t),t=r}var A=t[Md]();if(!A.success)return null;var n=A.html,i=n.attributes;return i&&(i.class&&(i.class=i.class.filter((function(e){return!e.startsWith("xfa")}))),i.dir="auto"),{html:n,str:t[Ld]()}}catch(e){q("XFA - an error occurred during parsing of rich text: ".concat(e))}return null}}]);var e,t,r}();function sR(e,t,r){return e.set(cR(e,t),r),r}function cR(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function gR(e,t,r,A){var n=uR(fR(1&A?e.prototype:e),t,r);return 2&A&&"function"==typeof n?function(e){return n.apply(r,e)}:n}function uR(){return uR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var A=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fR(e)););return e}(e,t);if(A){var n=Object.getOwnPropertyDescriptor(A,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},uR.apply(null,arguments)}function lR(e,t,r){return t=fR(t),hR(e,IR()?Reflect.construct(t,r||[],fR(e).constructor):t.apply(e,r))}function hR(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function IR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(IR=function(){return!!e})()}function fR(e){return fR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fR(e)}function CR(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BR(e,t)}function BR(e,t){return BR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BR(e,t)}function QR(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=vR(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ER(){ER=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function dR(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function yR(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){dR(i,A,n,a,o,"next",e)}function o(e){dR(i,A,n,a,o,"throw",e)}a(void 0)}))}}function pR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||vR(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vR(e,t){if(e){if("string"==typeof e)return mR(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mR(e,t):void 0}}function mR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,s=e.fetchIfRef(t);if(s instanceof He){var c=r.acroForm,g=r.pdfManager,u=t instanceof Ye?t.toString():"annot_".concat(A.createObjId()),l=s.get("Subtype"),h={xref:e,ref:t,dict:s,subtype:l=l instanceof Ue?l.name:null,id:u,annotationGlobals:r,collectFields:n,orphanFields:i,needAppearances:!n&&!0===c.get("NeedAppearances"),pageIndex:a,evaluatorOptions:g.evaluatorOptions,pageRef:o};switch(l){case"Link":return new KR(h);case"Text":return new OR(h);case"Widget":var I=yt({dict:s,key:"FT"});switch(I=I instanceof Ue?I.name:null){case"Tx":return new JR(h);case"Btn":return new HR(h);case"Ch":return new YR(h);case"Sig":return new PR(h)}return q('Unimplemented widget field type "'.concat(I,'", ')+"falling back to base field type."),new MR(h);case"Popup":return new TR(h);case"FreeText":return new qR(h);case"Line":return new jR(h);case"Square":return new WR(h);case"Circle":return new ZR(h);case"PolyLine":return new _R(h);case"Polygon":return new XR(h);case"Caret":return new VR(h);case"Ink":return new zR(h);case"Highlight":return new $R(h);case"Underline":return new eG(h);case"Squiggly":return new tG(h);case"StrikeOut":return new rG(h);case"Stamp":return new nG(h);case"FileAttachment":return new iG(h);default:return n||q(l?'Unimplemented annotation type "'.concat(l,'", ')+"falling back to base annotation.":"Annotation is missing the required /Subtype."),new NR(h)}}}},{key:"_getPageIndex",value:(r=yR(ER().mark((function e(t,r,A){var n,i,a,o,s,c,g,u,l,h;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.fetchIfRefAsync(r);case 3:if((n=e.sent)instanceof He){e.next=6;break}return e.abrupt("return",-1);case 6:if(!((i=n.getRaw("P"))instanceof Ye)){e.next=18;break}return e.prev=8,e.next=11,A.ensureCatalog("getPageIndex",[i]);case 11:return a=e.sent,e.abrupt("return",a);case 15:e.prev=15,e.t0=e.catch(8),T('_getPageIndex -- not a valid page reference: "'.concat(e.t0,'".'));case 18:if(!n.has("Kids")){e.next=20;break}return e.abrupt("return",-1);case 20:return e.next=22,A.ensureDoc("numPages");case 22:o=e.sent,s=0;case 24:if(!(s1&&void 0!==arguments[1]?arguments[1]:new Uint8ClampedArray(3);if(!Array.isArray(e))return t;var r=t||new Uint8ClampedArray(3);switch(e.length){case 0:return null;case 1:return Ur.singletons.gray.getRgbItem(e,0,r,0),r;case 3:return Ur.singletons.rgb.getRgbItem(e,0,r,0),r;case 4:return Ur.singletons.cmyk.getRgbItem(e,0,r,0),r;default:return t}}function xR(e){return Array.from(e,(function(e){return e/255}))}function RR(e,t){var r=e.getArray("QuadPoints");if(!St(r,null)||0===r.length||r.length%8>0)return null;for(var A=new Float32Array(r.length),n=0,i=r.length;nt[2]||Bt[3]))return null;A.set([f,Q,C,Q,f,B,C,B],n)}return A}function GR(e,t,r){var A=pR(ge.getAxialAlignedBoundingBox(t,r),4),n=A[0],i=A[1],a=A[2],o=A[3];if(n===a||i===o)return[1,0,0,1,e[0],e[1]];var s=(e[2]-e[0])/(a-n),c=(e[3]-e[1])/(o-i);return[s,0,0,c,e[0]-n*s,e[1]-i*c]}var NR=function(){return kR((function e(t){wR(this,e);var r=t.dict,A=t.xref,n=t.annotationGlobals,i=t.ref,a=t.orphanFields,o=null==a?void 0:a.get(i);o&&r.set("Parent",o),this.setTitle(r.get("T")),this.setContents(r.get("Contents")),this.setModificationDate(r.get("M")),this.setFlags(r.get("F")),this.setRectangle(r.getArray("Rect")),this.setColor(r.getArray("C")),this.setBorderStyle(r),this.setAppearance(r),this.setOptionalContent(r);var s=r.get("MK");this.setBorderAndBackgroundColors(s),this.setRotation(s,r),this.ref=t.ref instanceof Ye?t.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);var c=!!(128&this.flags),g=!!(512&this.flags);if(this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:t.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:t.subtype,hasOwnCanvas:!1,noRotate:!!(16&this.flags),noHTML:c&&g,isEditable:!1,structParent:-1},n.structTreeRoot){var u=r.get("StructParent");this.data.structParent=u=Number.isInteger(u)&&u>=0?u:-1,n.structTreeRoot.addAnnotationIdToPage(t.pageRef,u)}if(t.collectFields){var l=r.get("Kids");if(Array.isArray(l)){var h,I=[],f=QR(l);try{for(f.s();!(h=f.n()).done;){var C=h.value;C instanceof Ye&&I.push(C.toString())}}catch(e){f.e(e)}finally{f.f()}0!==I.length&&(this.data.kidIds=I)}this.data.actions=Mt(A,r,b),this.data.fieldName=this._constructFieldName(r),this.data.pageIndex=t.pageIndex}var B=r.get("IT");B instanceof Ue&&(this.data.it=B.name),this._isOffscreenCanvasSupported=t.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}),[{key:"_hasFlag",value:function(e,t){return!!(e&t)}},{key:"_buildFlags",value:function(e,t){var r=this.flags;if(void 0===e){if(void 0===t)return;return t?-5&r:-3&r|4}return e?(r|=4,t?-33&r|2:-3&r|v):(r&=-35,t?-5&r:4|r)}},{key:"_isViewable",value:function(e){return!this._hasFlag(e,1)&&!this._hasFlag(e,v)}},{key:"_isPrintable",value:function(e){return this._hasFlag(e,4)&&!this._hasFlag(e,2)&&!this._hasFlag(e,1)}},{key:"mustBeViewed",value:function(e,t){var r,A=null==e||null===(r=e.get(this.data.id))||void 0===r?void 0:r.noView;return void 0!==A?!A:this.viewable&&!this._hasFlag(this.flags,2)}},{key:"mustBePrinted",value:function(e){var t,r=null==e||null===(t=e.get(this.data.id))||void 0===t?void 0:t.noPrint;return void 0!==r?!r:this.printable}},{key:"mustBeViewedWhenEditing",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?!this.data.isEditable:!(null!=t&&t.has(this.data.id))}},{key:"viewable",get:function(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}},{key:"printable",get:function(){return null!==this.data.quadPoints&&0!==this.flags&&this._isPrintable(this.flags)}},{key:"_parseStringHelper",value:function(e){var t="string"==typeof e?Ie(e):"";return{str:t,dir:t&&"rtl"===UI(t).dir?"rtl":"ltr"}}},{key:"setDefaultAppearance",value:function(e){var t=e.dict,r=e.annotationGlobals,A=yt({dict:t,key:"DA"})||r.acroForm.get("DA");this._defaultAppearance="string"==typeof A?A:"",this.data.defaultAppearanceData=dC(this._defaultAppearance)}},{key:"setTitle",value:function(e){this._title=this._parseStringHelper(e)}},{key:"setContents",value:function(e){this._contents=this._parseStringHelper(e)}},{key:"setModificationDate",value:function(e){this.modificationDate="string"==typeof e?e:null}},{key:"setFlags",value:function(e){this.flags=Number.isInteger(e)&&e>0?e:0,1&this.flags&&"Annotation"!==this.constructor.name&&(this.flags^=1)}},{key:"hasFlag",value:function(e){return this._hasFlag(this.flags,e)}},{key:"setRectangle",value:function(e){this.rectangle=Rt(e,[0,0,0,0])}},{key:"setColor",value:function(e){this.color=FR(e)}},{key:"setLineEndings",value:function(e){if(this.lineEndings=["None","None"],Array.isArray(e)&&2===e.length)for(var t=0;t<2;t++){var r=e[t];if(r instanceof Ue)switch(r.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[t]=r.name;continue}q("Ignoring invalid lineEnding: ".concat(r))}}},{key:"setRotation",value:function(e,t){this.rotation=0;var r=e instanceof He?e.get("R")||0:t.get("Rotate")||0;Number.isInteger(r)&&0!==r&&((r%=360)<0&&(r+=360),r%90==0&&(this.rotation=r))}},{key:"setBorderAndBackgroundColors",value:function(e){e instanceof He?(this.borderColor=FR(e.getArray("BC"),null),this.backgroundColor=FR(e.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}},{key:"setBorderStyle",value:function(e){if(this.borderStyle=new LR,e instanceof He)if(e.has("BS")){var t=e.get("BS");if(t instanceof He){var r=t.get("Type");r&&!Ke(r,"Border")||(this.borderStyle.setWidth(t.get("W"),this.rectangle),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}}else if(e.has("Border")){var A=e.getArray("Border");Array.isArray(A)&&A.length>=3&&(this.borderStyle.setHorizontalCornerRadius(A[0]),this.borderStyle.setVerticalCornerRadius(A[1]),this.borderStyle.setWidth(A[2],this.rectangle),4===A.length&&this.borderStyle.setDashArray(A[3],!0))}else this.borderStyle.setWidth(0)}},{key:"setAppearance",value:function(e){this.appearance=null;var t=e.get("AP");if(t instanceof He){var r=t.get("N");if(r instanceof ze)this.appearance=r;else if(r instanceof He){var A=e.get("AS");if(A instanceof Ue&&r.has(A.name)){var n=r.get(A.name);n instanceof ze&&(this.appearance=n)}}}}},{key:"setOptionalContent",value:function(e){this.oc=null;var t=e.get("OC");t instanceof Ue?q("setOptionalContent: Support for /Name-entry is not implemented."):t instanceof He&&(this.oc=t)}},{key:"loadResources",value:function(e,t){return t.dict.getAsync("Resources").then((function(t){if(t)return new bE(t,e,t.xref).load().then((function(){return t}))}))}},{key:"getOperatorList",value:(r=yR(ER().mark((function e(t,r,A,n){var i,a,o,s,c,g,u,l,h,I,f,B,Q;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=this.data,a=i.hasOwnCanvas,o=i.id,s=i.rect,c=this.appearance,!(g=!!(a&&2&A))||s[0]!==s[2]&&s[1]!==s[3]){e.next=6;break}return this.data.hasOwnCanvas=!1,e.abrupt("return",{opList:new kf,separateForm:!1,separateCanvas:!1});case 6:if(c){e.next=11;break}if(g){e.next=9;break}return e.abrupt("return",{opList:new kf,separateForm:!1,separateCanvas:!1});case 9:(c=new or("")).dict=new He;case 11:return u=c.dict,e.next=14,this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"],c);case 14:if(l=e.sent,h=xt(u.getArray("BBox"),[0,0,1,1]),I=Ft(u.getArray("Matrix"),C),f=GR(s,h,I),B=new kf,!this.oc){e.next=23;break}return e.next=22,t.parseMarkedContentProps(this.oc,null);case 22:Q=e.sent;case 23:return void 0!==Q&&B.addOp(J,["OC",Q]),B.addOp(80,[o,s,f,I,g]),e.next=27,t.getOperatorList({stream:c,task:r,resources:l,operatorList:B,fallbackFontDict:this._fallbackFontDict});case 27:return B.addOp(81,[]),void 0!==Q&&B.addOp(H,[]),this.reset(),e.abrupt("return",{opList:B,separateForm:!1,separateCanvas:g});case 31:case"end":return e.stop()}}),e,this)}))),function(e,t,A,n){return r.apply(this,arguments)})},{key:"save",value:(t=yR(ER().mark((function e(t,r,A){return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)}))),function(e,r,A){return t.apply(this,arguments)})},{key:"hasTextContent",get:function(){return!1}},{key:"extractTextContent",value:(e=yR(ER().mark((function e(t,r,A){var n,i,a,o,s,c,g,u,l,h,I;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.appearance){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.loadResources(["ExtGState","Font","Properties","XObject"],this.appearance);case 4:return n=e.sent,i=[],a=[],o=null,e.t0=Math.Infinity,u={desiredSize:e.t0,ready:!0,enqueue(e,t){s=QR(e.items);try{for(s.s();!(c=s.n()).done;)void 0!==(g=c.value).str&&(o||(o=g.transform.slice(-2)),a.push(g.str),g.hasEOL&&(i.push(a.join("").trimEnd()),a.length=0))}catch(e){s.e(e)}finally{s.f()}}},e.next=12,t.getTextContent({stream:this.appearance,task:r,resources:n,includeMarkedContent:!0,keepWhiteSpace:!0,sink:u,viewBox:A});case 12:this.reset(),a.length&&i.push(a.join("").trimEnd()),(i.length>1||i[0])&&(l=this.appearance.dict,h=xt(l.getArray("BBox"),null),I=Ft(l.getArray("Matrix"),null),this.data.textPosition=this._transformPoint(o,h,I),this.data.textContent=i);case 15:case"end":return e.stop()}}),e,this)}))),function(t,r,A){return e.apply(this,arguments)})},{key:"_transformPoint",value:function(e,t,r){var A=this.data.rect;t||(t=[0,0,1,1]),r||(r=[1,0,0,1,0,0]);var n=GR(A,t,r);return n[4]-=A[0],n[5]-=A[1],e=ge.applyTransform(e,n),ge.applyTransform(e,r)}},{key:"getFieldObject",value:function(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}},{key:"reset",value:function(){var e,t=QR(this._streams);try{for(t.s();!(e=t.n()).done;)e.value.reset()}catch(e){t.e(e)}finally{t.f()}}},{key:"_constructFieldName",value:function(e){if(!e.has("T")&&!e.has("Parent"))return q("Unknown field name, falling back to empty field name."),"";if(!e.has("Parent"))return Ie(e.get("T"));var t=[];e.has("T")&&t.unshift(Ie(e.get("T")));var r=e,A=new Pe;for(e.objId&&A.put(e.objId);r.has("Parent")&&(r=r.get("Parent"))instanceof He&&(!r.objId||!A.has(r.objId));)r.objId&&A.put(r.objId),r.has("T")&&t.unshift(Ie(r.get("T")));return t.join(".")}}]);var e,t,r}(),LR=function(){return kR((function e(){wR(this,e),this.width=1,this.rawWidth=1,this.style=1,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}),[{key:"setWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0];if(e instanceof Ue)this.width=0;else if("number"==typeof e){if(e>0){this.rawWidth=e;var r=(t[2]-t[0])/2,A=(t[3]-t[1])/2;r>0&&A>0&&(e>r||e>A)&&(q("AnnotationBorderStyle.setWidth - ignoring width: ".concat(e)),e=1)}this.width=e}}},{key:"setStyle",value:function(e){if(e instanceof Ue)switch(e.name){case"S":this.style=1;break;case"D":this.style=2;break;case"B":this.style=3;break;case"I":this.style=4;break;case"U":this.style=5}}},{key:"setDashArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Array.isArray(e)){var r,A=!0,n=!0,i=QR(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!(+a>=0)){A=!1;break}a>0&&(n=!1)}}catch(e){i.e(e)}finally{i.f()}0===e.length||A&&!n?(this.dashArray=e,t&&this.setStyle(Ue.get("D"))):this.width=0}else e&&(this.width=0)}},{key:"setHorizontalCornerRadius",value:function(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}},{key:"setVerticalCornerRadius",value:function(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}])}(),UR=function(e){function t(e){var r;wR(this,t),r=lR(this,t,[e]);var A=e.dict;if(A.has("IRT")){var n=A.getRaw("IRT");r.data.inReplyTo=n instanceof Ye?n.toString():null;var i=A.get("RT");r.data.replyType=i instanceof Ue?i.name:"R"}var a=null;if(r.data.replyType===p){var o=A.get("IRT");r.setTitle(o.get("T")),r.data.titleObj=r._title,r.setContents(o.get("Contents")),r.data.contentsObj=r._contents,o.has("CreationDate")?(r.setCreationDate(o.get("CreationDate")),r.data.creationDate=r.creationDate):r.data.creationDate=null,o.has("M")?(r.setModificationDate(o.get("M")),r.data.modificationDate=r.modificationDate):r.data.modificationDate=null,a=o.getRaw("Popup"),o.has("C")?(r.setColor(o.getArray("C")),r.data.color=r.color):r.data.color=null}else r.data.titleObj=r._title,r.setCreationDate(A.get("CreationDate")),r.data.creationDate=r.creationDate,a=A.getRaw("Popup"),A.has("C")||(r.data.color=null);return r.data.popupRef=a instanceof Ye?a.toString():null,A.has("RC")&&(r.data.richText=oR.getRichTextAsHtml(A.get("RC"))),r}return CR(t,NR),kR(t,[{key:"setCreationDate",value:function(e){this.creationDate="string"==typeof e?e:null}},{key:"_setDefaultAppearance",value:function(e){var t=e.xref,r=e.extra,A=e.strokeColor,n=e.fillColor,i=e.blendMode,a=e.strokeAlpha,o=e.fillAlpha,s=e.pointsCallback,c=Number.MAX_VALUE,g=Number.MAX_VALUE,u=Number.MIN_VALUE,l=Number.MIN_VALUE,h=["q"];r&&h.push(r),A&&h.push("".concat(A[0]," ").concat(A[1]," ").concat(A[2]," RG")),n&&h.push("".concat(n[0]," ").concat(n[1]," ").concat(n[2]," rg"));var I=this.data.quadPoints;I||(I=Float32Array.from([this.rectangle[0],this.rectangle[3],this.rectangle[2],this.rectangle[3],this.rectangle[0],this.rectangle[1],this.rectangle[2],this.rectangle[1]]));for(var f=0,C=I.length;f0?t:null}},{key:"amendSavedDict",value:function(e,t){}},{key:"save",value:(n=yR(ER().mark((function e(t,r,A){var n,i,a,o,s,c,g,u,l,h,I,f,B,Q,E,d,y,p,v,m,w,b,k,D;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null==A?void 0:A.get(this.data.id),a=this._buildFlags(null==i?void 0:i.noView,null==i?void 0:i.noPrint),o=null==i?void 0:i.value,s=null==i?void 0:i.rotation,o!==this.data.fieldValue&&void 0!==o){e.next=7;break}if(this._hasValueFromXFA||void 0!==s||void 0!==a){e.next=6;break}return e.abrupt("return",null);case 6:o||(o=this.data.fieldValue);case 7:if(void 0!==s||this._hasValueFromXFA||!Array.isArray(o)||!Array.isArray(this.data.fieldValue)||!Be(o,this.data.fieldValue)||void 0!==a){e.next=9;break}return e.abrupt("return",null);case 9:if(void 0===s&&(s=this.rotation),c=null,this._needAppearances){e.next=19;break}return e.next=14,this._getAppearance(t,r,8,A);case 14:if(null!==(c=e.sent)||void 0!==a){e.next=17;break}return e.abrupt("return",null);case 17:e.next=19;break;case 19:if(g=!1,null!==(n=c)&&void 0!==n&&n.needAppearances&&(g=!0,c=null),u=t.xref,(l=u.fetchIfRef(this.ref))instanceof He){e.next=25;break}return e.abrupt("return",null);case 25:h=new He(u),I=QR(l.getKeys());try{for(I.s();!(f=I.n()).done;)"AP"!==(B=f.value)&&h.set(B,l.getRaw(B))}catch(e){I.e(e)}finally{I.f()}if(void 0!==a&&(h.set("F",a),null!==c||g||(Q=l.getRaw("AP"))&&h.set("AP",Q)),E={path:this.data.fieldName,value:o},h.set("V",Array.isArray(o)?o.map(jt):jt(o)),this.amendSavedDict(A,h),(d=this._getMKDict(s))&&h.set("MK",d),y=[],p=[{ref:this.ref,data:"",xfa:E,needAppearances:g}],null===c){e.next=53;break}return v=u.getNewTemporaryRef(),m=new He(u),h.set("AP",m),m.set("N",v),w=this._getSaveFieldResources(u),b=new or(c),(k=b.dict=new He(u)).set("Subtype",Ue.get("Form")),k.set("Resources",w),k.set("BBox",[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]]),(D=this.getRotationMatrix(A))!==C&&k.set("Matrix",D),e.next=51,iQ(v,b,y,u);case 51:p.push({ref:v,data:y.join(""),xfa:null,needAppearances:!1}),y.length=0;case 53:return h.set("M","D:".concat(Qe())),e.next=56,iQ(this.ref,h,y,u);case 56:return p[0].data=y.join(""),e.abrupt("return",p);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"_getAppearance",value:(A=yR(ER().mark((function e(r,A,n,i){var a,o,s,c,g,u,l,h,I,f,C,B,Q,d,y,p,v,w,b,k,D,S,F,x,R,G,N,L,U,M,J,H,Y,P,O,K,T,j,Z,_,X,V,z,$;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.hasFieldFlag(m)){e.next=3;break}return e.abrupt("return",null);case 3:if((a=null==i?void 0:i.get(this.data.id))&&(o=a.formattedValue||a.value,s=a.rotation),void 0!==s||void 0!==o||this._needAppearances){e.next=8;break}if(this._hasValueFromXFA&&!this.appearance){e.next=8;break}return e.abrupt("return",null);case 8:if(c=this.getBorderAndBackgroundAppearances(i),void 0!==o){e.next=13;break}if(o=this.data.fieldValue){e.next=13;break}return e.abrupt("return","/Tx BMC q ".concat(c,"Q EMC"));case 13:if(Array.isArray(o)&&1===o.length&&(o=o[0]),W("string"==typeof o,"Expected \`value\` to be a string."),o=o.trimEnd(),this.data.combo&&(g=this.data.options.find((function(e){var t=e.exportValue;return o===t})),o=(null==g?void 0:g.displayValue)||o),""!==o){e.next=19;break}return e.abrupt("return","/Tx BMC q ".concat(c,"Q EMC"));case 19:return void 0===s&&(s=this.rotation),u=-1,this.data.multiLine?(l=o.split(/\\r\\n?|\\n/).map((function(e){return e.normalize("NFC")})),u=l.length):l=[o.replace(/\\r\\n?|\\n/,"").normalize("NFC")],h=1,I=2,f=this.data.rect[3]-this.data.rect[1],C=this.data.rect[2]-this.data.rect[0],90!==s&&270!==s||(C=(B=[f,C])[0],f=B[1]),this._defaultAppearance||(this.data.defaultAppearanceData=dC(this._defaultAppearance="/Helvetica 0 Tf 0 g")),e.next=30,t._getFontData(r,A,this.data.defaultAppearanceData,this._fieldResources.mergedResources);case 30:Q=e.sent,v=[],w=!1,b=QR(l);try{for(b.s();!(k=b.n()).done;)D=k.value,(S=Q.encodeString(D)).length>1&&(w=!0),v.push(S.join(""))}catch(e){b.e(e)}finally{b.f()}if(!(w&&8&n)){e.next=37;break}return e.abrupt("return",{needAppearances:!0});case 37:if(!w||!this._isOffscreenCanvasSupported){e.next=59;break}if(F=this.data.comb?"monospace":"sans-serif",x=new vC(r.xref,F),R=x.createFontResources(l.join("")),G=R.getRaw("Font"),this._fieldResources.mergedResources.has("Font")){N=this._fieldResources.mergedResources.get("Font"),L=QR(G.getKeys());try{for(L.s();!(U=L.n()).done;)M=U.value,N.set(M,G.getRaw(M))}catch(e){L.e(e)}finally{L.f()}}else this._fieldResources.mergedResources.set("Font",G);return J=x.fontName.name,e.next=46,t._getFontData(r,A,{fontName:J,fontSize:0},R);case 46:for(Q=e.sent,H=0,Y=v.length;H2)){e.next=76;break}return e.abrupt("return","/Tx BMC q ".concat(c,"BT ")+d+" 1 0 0 1 ".concat(Tt(I)," ").concat(Tt(V)," Tm (").concat(Lt(v[0]),") Tj")+" ET Q EMC");case 76:return z={shift:0},$=this._renderText(v[0],Q,y,C,X,z,I,V),e.abrupt("return","/Tx BMC q ".concat(c,"BT ")+d+" 1 0 0 1 0 0 Tm ".concat($)+" ET Q EMC");case 79:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return A.apply(this,arguments)})},{key:"_getTextWidth",value:function(e,t){return t.charsToGlyphs(e).reduce((function(e,t){return e+t.width}),0)/1e3}},{key:"_computeFontSize",value:function(e,t,r,A,n){var i=this,a=this.data.defaultAppearanceData.fontSize,o=(a||12)*Q,s=Math.round(e/o);if(!a){var c=function(e){return Math.floor(100*e)/100};if(-1===n){var g=this._getTextWidth(r,A);a=c(Math.min(e/Q,t/g)),s=1}else{var u,l=r.split(/\\r\\n?|\\n/),h=[],I=QR(l);try{for(I.s();!(u=I.n()).done;){var f=u.value,C=A.encodeString(f).join(""),B=A.charsToGlyphs(C),E=A.getCharPositions(C);h.push({line:C,glyphs:B,positions:E})}}catch(e){I.e(e)}finally{I.f()}var d=function(r){for(var n=0,a=0,o=h;ae)return!0}return!1};for(s=Math.max(s,n);d(a=c((o=e/s)/Q));)s++}var y=this.data.defaultAppearanceData,p=y.fontName,v=y.fontColor;this._defaultAppearance=function(e){var t=e.fontSize,r=e.fontColor;return"/".concat(Nt(e.fontName)," ").concat(t," Tf ").concat(pC(r,!0))}({fontSize:a,fontName:p,fontColor:v})}return[this._defaultAppearance,a,e/s]}},{key:"_renderText",value:function(e,t,r,A,n,i,a,o){var s,c=Tt((s=1===n?(A-this._getTextWidth(e,t)*r)/2:2===n?A-this._getTextWidth(e,t)*r-a:a)-i.shift);return i.shift=s,o=Tt(o),"".concat(c," ").concat(o," Td (").concat(Lt(e),") Tj")}},{key:"_getSaveFieldResources",value:function(e){var t,r=this._fieldResources,A=r.localResources,n=r.appearanceResources,i=r.acroFormResources,a=null===(t=this.data.defaultAppearanceData)||void 0===t?void 0:t.fontName;if(!a)return A||He.empty;for(var o=0,s=[A,n];o2)&&(n=null),r.data.textAlignment=n;var i=yt({dict:A,key:"MaxLen"});return(!Number.isInteger(i)||i<0)&&(i=0),r.data.maxLen=i,r.data.multiLine=r.hasFieldFlag(4096),r.data.comb=r.hasFieldFlag(16777216)&&!r.hasFieldFlag(4096)&&!r.hasFieldFlag(m)&&!r.hasFieldFlag(1048576)&&0!==r.data.maxLen,r.data.doNotScroll=r.hasFieldFlag(8388608),r}return CR(t,MR),kR(t,[{key:"hasTextContent",get:function(){return!!this.appearance&&!this._needAppearances}},{key:"_getCombAppearance",value:function(e,t,r,A,n,i,a,o,s,c,g){var u,l=n/this.data.maxLen,h=this.getBorderAndBackgroundAppearances(g),I=[],f=QR(t.getCharPositions(r));try{for(f.s();!(u=f.n()).done;){var C=pR(u.value,2),B=C[0],Q=C[1];I.push("(".concat(Lt(r.substring(B,Q)),") Tj"))}}catch(e){f.e(e)}finally{f.f()}var E=I.join(" ".concat(Tt(l)," 0 Td "));return"/Tx BMC q ".concat(h,"BT ")+e+" 1 0 0 1 ".concat(Tt(a)," ").concat(Tt(o+s)," Tm ").concat(E)+" ET Q EMC"}},{key:"_getMultilineAppearance",value:function(e,t,r,A,n,i,a,o,s,c,g,u){for(var l=[],h=n-2*o,I={shift:0},f=0,C=t.length;f4&&void 0!==arguments[4]?arguments[4]:{};e=n.line||e;var i=n.glyphs||t.charsToGlyphs(e);if(i.length<=1)return[e];for(var a=n.positions||t.getCharPositions(e),o=r/1e3,s=[],c=-1,g=-1,u=-1,l=0,h=0,I=0,f=i.length;IA?(s.push(e.substring(l,B)),l=B,h=d,c=-1,u=-1):(h+=d,c=B,g=Q,u=I):h+d>A?-1!==c?(s.push(e.substring(l,g)),l=g,I=u+1,c=-1,h=0):(s.push(e.substring(l,B)),l=B,h=d):h+=d}return l0,r.data.options=[];var i=yt({dict:A,key:"Opt"});if(Array.isArray(i))for(var a=0,o=i.length;a=0&&h0?this.data.fieldValue[0]:null;return{id:this.data.id,value:t,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:e}}},{key:"amendSavedDict",value:function(e,t){var r;if(this.hasIndices){var A=null==e||null===(r=e.get(this.data.id))||void 0===r?void 0:r.value;Array.isArray(A)||(A=[A]);for(var n=[],i=this.data.options,a=0,o=0,s=i.length;av&&(v=D,m=k)}catch(e){w.e(e)}finally{w.f()}S=this._computeFontSize(p,l-2*g,m,E,-1),F=pR(S,2),d=F[0],y=F[1]}if(R=((x=y*Q)-y)/2,G=Math.floor(u/x),N=0,f.length>0&&(L=Math.min.apply(Math,f),U=Math.max.apply(Math,f),(N=Math.max(0,U-G+1))>L&&(N=L)),M=Math.min(N+G+1,I),J=["/Tx BMC q","1 1 ".concat(l," ").concat(u," re W n")],f.length){J.push("0.600006 0.756866 0.854904 rg"),H=QR(f);try{for(H.s();!(Y=H.n()).done;)P=Y.value,N<=P&&P1)){e.next=25;break}return e.abrupt("return",null);case 25:x=R.join(""),D.push(x),G=0,N=f.charsToGlyphs(x),L=QR(N);try{for(L.s();!(U=L.n()).done;)M=U.value,G+=M.width*b}catch(e){L.e(e)}finally{L.f()}k=Math.max(k,G);case 32:e.next=20;break;case 34:e.next=39;break;case 36:e.prev=36,e.t0=e.catch(18),S.e(e.t0);case 39:return e.prev=39,S.f(),e.finish(39);case 42:J=1,k>p&&(J=p/k),H=1,P=1*s,(O=(Y=Q*s)*w.length)>v&&(H=v/O),K=Math.min(J,H),T=s*K,e.t1=g,e.next=0===e.t1?54:90===e.t1?58:180===e.t1?62:270===e.t1?66:70;break;case 54:return W=[1,0,0,1],j=[c[0],c[1],p,v],q=[c[0],c[3]-P],e.abrupt("break",70);case 58:return W=[0,1,-1,0],j=[c[1],-c[2],p,v],q=[c[1],-c[0]-P],e.abrupt("break",70);case 62:return W=[-1,0,0,-1],j=[-c[2],-c[3],p,v],q=[-c[2],-c[1]-P],e.abrupt("break",70);case 66:return W=[0,-1,1,0],j=[-c[3],c[0],p,v],q=[-c[3],c[2]-P],e.abrupt("break",70);case 70:for((Z=["q","".concat(W.join(" ")," 0 0 cm"),"".concat(j.join(" ")," re W n"),"BT","".concat(pC(o,!0)),"0 Tc /Helv ".concat(Tt(T)," Tf")]).push("".concat(q.join(" ")," Td (").concat(Lt(D[0]),") Tj")),_=Tt(Y),X=1,V=D.length;X1&&void 0!==arguments[1]?arguments[1]:null;return e?!!this.data.isEditable&&(sR(AG,this,this.data.hasOwnCanvas),this.data.hasOwnCanvas=!0,!0):(this.data.hasOwnCanvas=(this,(t=AG).get(cR(t,this))),!(null!=r&&r.has(this.data.id)))}}],[{key:"createImage",value:(A=yR(ER().mark((function e(t,r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A=t.width,n=t.height,i=new OffscreenCanvas(A,n),(a=i.getContext("2d",{alpha:!0})).drawImage(t,0,0),o=a.getImageData(0,0,A,n).data,s=new Uint32Array(o.buffer),(c=s.some(se.isLittleEndian?function(e){return e>>>24!=255}:function(e){return 255!=(255&e)}))&&(a.fillStyle="white",a.fillRect(0,0,A,n),a.drawImage(t,0,0)),g=i.convertToBlob({type:"image/jpeg",quality:1}).then((function(e){return e.arrayBuffer()})),u=Ue.get("XObject"),l=Ue.get("Image"),(h=new He(r)).set("Type",u),h.set("Subtype",l),h.set("BitsPerComponent",8),h.set("ColorSpace",Ue.get("DeviceRGB")),h.set("Filter",Ue.get("DCTDecode")),h.set("BBox",[0,0,A,n]),h.set("Width",A),h.set("Height",n),I=null,c){if(f=new Uint8Array(s.length),se.isLittleEndian)for(C=0,B=s.length;C>>24;else for(Q=0,E=s.length;Q=0&&o<=1?o:null,r}return CR(t,UR),kR(t)}();function aG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oG(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function EG(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function dG(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){EG(i,A,n,a,o,"next",e)}function o(e){EG(i,A,n,a,o,"throw",e)}a(void 0)}))}}function yG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||pG(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pG(e,t){if(e){if("string"==typeof e)return vG(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vG(e,t):void 0}}function vG(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(this._persistentRefsCache);try{for(t.s();!(e=t.n()).done;){var r=yG(e.value,2),A=r[0],n=r[1];this._cacheMap.set(A,n)}}catch(e){t.e(e)}finally{t.f()}}this._persistentRefsCache=null}},{key:"setStartXRef",value:function(e){this.startXRefQueue=[e]}},{key:"parse",value:function(){var e,t,r,A=arguments.length>0&&void 0!==arguments[0]&&arguments[0];A?(q("Indexing all PDF objects"),e=this.indexObjects()):e=this.readXRef(),e.assignXref(this),this.trailer=e;try{t=e.get("Encrypt")}catch(e){if(e instanceof Ct)throw e;q('XRef.parse - Invalid "Encrypt" reference: "'.concat(e,'".'))}if(t instanceof He){var n=e.get("ID"),i=null!=n&&n.length?n[0]:"";t.suppressEncryption=!0,this.encrypt=new KB(t,i,this.pdfManager.password)}try{r=e.get("Root")}catch(e){if(e instanceof Ct)throw e;q('XRef.parse - Invalid "Root" reference: "'.concat(e,'".'))}if(r instanceof He)try{if(r.get("Pages")instanceof He)return void(this.root=r)}catch(e){if(e instanceof Ct)throw e;q('XRef.parse - Invalid "Pages" reference: "'.concat(e,'".'))}if(!A)throw new Et;throw new $("Invalid Root reference.")}},{key:"processXRefTable",value:function(e){if("tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2}),!Te(this.readXRefTable(e),"trailer"))throw new re("Invalid XRef table: could not find trailer dictionary");var t=e.getObj();if(t instanceof He||!t.dict||(t=t.dict),!(t instanceof He))throw new re("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,t}},{key:"readXRefTable",value:function(e){var t,r=e.lexer.stream,A=this.tableState;for(r.pos=A.streamPos,e.buf1=A.parserBuf1,e.buf2=A.parserBuf2;;){if(!("firstEntryNum"in A)||!("entryCount"in A)){if(Te(t=e.getObj(),"trailer"))break;A.firstEntryNum=t,A.entryCount=e.getObj()}var n=A.firstEntryNum,i=A.entryCount;if(!Number.isInteger(n)||!Number.isInteger(i))throw new re("Invalid XRef table: wrong types in subsection header");for(var a=A.entryNum;a0;){var o=yG(a,2),s=o[0],c=o[1];if(!Number.isInteger(s)||!Number.isInteger(c))throw new re("Invalid XRef range fields: ".concat(s,", ").concat(c));if(!Number.isInteger(A)||!Number.isInteger(n)||!Number.isInteger(i))throw new re("Invalid XRef entry fields length: ".concat(s,", ").concat(c));for(var g=t.entryNum;g=e.length);)r+=String.fromCharCode(A),A=e[t];return r}function t(e,t,r){for(var A=r.length,n=e.length,i=0;t=A)break;t++,i++}return i}var r=/\\b(endobj|\\d+\\s+\\d+\\s+obj|xref|trailer\\s*<<)\\b/g,A=/\\b(startxref|\\d+\\s+\\d+\\s+obj)\\b/g,n=/^(\\d+)\\s+(\\d+)\\s+obj\\b/,i=new Uint8Array([116,114,97,105,108,101,114]),a=new Uint8Array([115,116,97,114,116,120,114,101,102]),o=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();var s=this.stream;s.pos=0;for(var c=s.getBytes(),g=ne(c),u=c.length,l=s.start,h=[],I=[];l=u)break;f=c[l]}while(10!==f&&13!==f);else++l}for(var S=0,F=I;S0&&void 0!==arguments[0]&&arguments[0],t=this.stream,r=new Set;this.startXRefQueue.length;){try{var A=this.startXRefQueue[0];if(r.has(A)){q("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}r.add(A),t.pos=A+t.start;var n=new Jo({lexer:new Oo(t),xref:this,allowStreams:!0}),i=n.getObj(),a=void 0;if(Te(i,"xref")){var o;a=this.processXRefTable(n),this.topDict||(this.topDict=a),i=a.get("XRefStm"),Number.isInteger(i)&&!this._xrefStms.has(i)&&(this._xrefStms.add(i),this.startXRefQueue.push(i),null!==(o=kG(SG,this))&&void 0!==o||bG(SG,this,i))}else{if(!Number.isInteger(i))throw new re("Invalid XRef stream header");if(!(Number.isInteger(n.getObj())&&Te(n.getObj(),"obj")&&(i=n.getObj())instanceof ze))throw new re("Invalid XRef stream");if(a=this.processXRefStream(i),this.topDict||(this.topDict=a),!a)throw new re("Failed to read XRef stream")}i=a.get("Prev"),Number.isInteger(i)?this.startXRefQueue.push(i):i instanceof Ye&&this.startXRefQueue.push(i.num)}catch(e){if(e instanceof Ct)throw e;T("(while reading XRef): "+e)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!e)throw new Et}},{key:"lastXRefStreamPos",get:function(){var e;return null!==(e=kG(SG,this))&&void 0!==e?e:this._xrefStms.size>0?Math.max.apply(Math,function(e){return function(e){if(Array.isArray(e))return vG(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pG(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this._xrefStms)):null}},{key:"getEntry",value:function(e){var t=this.entries[e];return t&&!t.free&&t.offset?t:null}},{key:"fetchIfRef",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e instanceof Ye?this.fetch(e,t):e}},{key:"fetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(e instanceof Ye))throw new Error("ref object is not a reference");var r=e.num,A=this._cacheMap.get(r);if(void 0!==A)return A instanceof He&&!A.objId&&(A.objId=e.toString()),A;var n=this.getEntry(r);if(null===n)return this._cacheMap.set(r,n),n;if(this._pendingRefs.has(e))return this._pendingRefs.remove(e),q("Ignoring circular reference: ".concat(e,".")),xe;this._pendingRefs.put(e);try{n=n.uncompressed?this.fetchUncompressed(e,n,t):this.fetchCompressed(e,n,t),this._pendingRefs.remove(e)}catch(t){throw this._pendingRefs.remove(e),t}return n instanceof He?n.objId=e.toString():n instanceof ze&&(n.dict.objId=e.toString()),n}},{key:"fetchUncompressed",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=e.gen,n=e.num;if(t.gen!==A){var i="Inconsistent generation in XRef: ".concat(e);if(this._generationFallback&&t.gen=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function GG(e){return function(e){if(Array.isArray(e))return UG(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||LG(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NG(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=LG(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function LG(e,t){if(e){if("string"==typeof e)return UG(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?UG(e,t):void 0}}function UG(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]&&arguments[1],r=yt({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&r[0]instanceof He?He.merge({xref:this.xref,dictArray:r}):r[0]:r}},{key:"content",get:function(){return this.pageDict.getArray("Contents")}},{key:"resources",get:function(){var e=this._getInheritableProperty("Resources");return _(this,"resources",e instanceof He?e:He.empty)}},{key:"_getBoundingBox",value:function(e){if(this.xfaData)return this.xfaData.bbox;var t=Rt(this._getInheritableProperty(e,!0),null);if(t){if(t[2]-t[0]>0&&t[3]-t[1]>0)return t;q("Empty, or invalid, /".concat(e," entry."))}return null}},{key:"mediaBox",get:function(){return _(this,"mediaBox",this._getBoundingBox("MediaBox")||_G)}},{key:"cropBox",get:function(){return _(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}},{key:"userUnit",get:function(){var e=this.pageDict.get("UserUnit");return("number"!=typeof e||e<=0)&&(e=1),_(this,"userUnit",e)}},{key:"view",get:function(){var e=this.cropBox,t=this.mediaBox;if(e!==t&&!Be(e,t)){var r=ge.intersect(e,t);if(r&&r[2]-r[0]>0&&r[3]-r[1]>0)return _(this,"view",r);q("Empty /CropBox and /MediaBox intersection.")}return _(this,"view",t)}},{key:"rotate",get:function(){var e=this._getInheritableProperty("Rotate")||0;return e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360),_(this,"rotate",e)}},{key:"_onSubStreamError",value:function(e,t){if(!this.evaluatorOptions.ignoreErrors)throw e;q("getContentStream - ignoring sub-stream (".concat(t,'): "').concat(e,'".'))}},{key:"getContentStream",value:function(){var e=this;return this.pdfManager.ensure(this,"content").then((function(t){return t instanceof ze?t:Array.isArray(t)?new VA(t,e._onSubStreamError.bind(e)):new sr}))}},{key:"xfaData",get:function(){return _(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}},{key:"saveNewAnnotations",value:(A=JG(RG().mark((function e(t,r,A,n){var i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.xfaFactory){e.next=2;break}throw new Error("XFA: Cannot save new annotations.");case 2:return i=new eC({xref:this.xref,handler:t,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),a=new Oe,o=new Pe,e.next=7,ZG(XG,this,zG).call(this,A,a,o);case 7:return s=this.pageDict,c=this.annotations.filter((function(e){return!(e instanceof Ye&&a.has(e))})),e.next=11,SR.saveNewAnnotations(i,r,A,n);case 11:g=e.sent,u=NG(g.annotations);try{for(u.s();!(l=u.n()).done;)(h=l.value.ref)instanceof Ye&&!o.has(h)&&c.push(h)}catch(e){u.e(e)}finally{u.f()}return I=s.get("Annots"),s.set("Annots",c),f=[],e.next=19,iQ(this.ref,s,f,this.xref);case 19:I&&s.set("Annots",I),(C=g.dependencies).push.apply(C,[{ref:this.ref,data:f.join("")}].concat(GG(g.annotations))),B=NG(a);try{for(B.s();!(Q=B.n()).done;)E=Q.value,C.push({ref:E,data:null})}catch(e){B.e(e)}finally{B.f()}return e.abrupt("return",C);case 25:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return A.apply(this,arguments)})},{key:"save",value:function(e,t,r){var A=new eC({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions});return this._parsedAnnotations.then((function(e){var n,i=[],a=NG(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;i.push(o.save(A,t,r).catch((function(e){return q("save - ignoring annotation data during "+'"'.concat(t.name,'" task: "').concat(e,'".')),null})))}}catch(e){a.e(e)}finally{a.f()}return Promise.all(i).then((function(e){return e.filter((function(e){return!!e}))}))}))}},{key:"loadResources",value:function(e){var t=this;return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then((function(){return new bE(t.resources,e,t.xref).load()}))}},{key:"getOperatorList",value:function(e){var t=this,r=e.handler,A=e.sink,n=e.task,i=e.intent,a=e.cacheKey,o=e.annotationStorage,s=void 0===o?null:o,c=e.modifiedIds,g=void 0===c?null:c,u=this.getContentStream(),l=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),h=new eC({xref:this.xref,handler:r,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),I=this.xfaFactory?null:qt(s),f=null==I?void 0:I.get(this.pageIndex),C=Promise.resolve(null),B=null;if(f){var Q,E,y=this.pdfManager.ensureDoc("annotationGlobals"),p=new Set,v=NG(f);try{for(v.s();!(E=v.n()).done;){var m=E.value,w=m.bitmapId,b=m.bitmap;!w||b||p.has(w)||p.add(w)}}catch(e){v.e(e)}finally{v.f()}var k=this.evaluatorOptions.isOffscreenCanvasSupported;if(p.size>0){var D,S=f.slice(),F=NG(s);try{for(F.s();!(D=F.n()).done;){var x=xG(D.value,2),R=x[0],G=x[1];R.startsWith(d)&&G.bitmap&&p.has(G.bitmapId)&&S.push(G)}}catch(e){F.e(e)}finally{F.f()}Q=SR.generateImages(S,this.xref,k)}else Q=SR.generateImages(f,this.xref,k);B=new Pe,C=Promise.all([y,ZG(XG,this,zG).call(this,f,B,null)]).then((function(e){var t=xG(e,1)[0];return t?SR.printNewAnnotations(t,h,n,f,Q):null}))}var N=Promise.all([u,l]).then((function(e){var o=xG(e,1)[0],s=new kf(i,A);return r.send("StartRenderPage",{transparency:h.hasBlendModes(t.resources,t.nonBlendModesSet),pageIndex:t.pageIndex,cacheKey:a}),h.getOperatorList({stream:o,task:n,resources:t.resources,operatorList:s}).then((function(){return s}))}));return Promise.all([N,this._parsedAnnotations,C]).then((function(e){var t=xG(e,3),r=t[0],A=t[1],a=t[2];if(a){A=A.filter((function(e){return!(e.ref&&B.has(e.ref))}));for(var o=function(e,t){var r=a[e];if(r.refToReplace){var n=A.findIndex((function(e){return e.ref&&je(e.ref,r.refToReplace)}));n>=0&&(A.splice(n,1,r),a.splice(e--,1),t--)}c=e,u=t},c=0,u=a.length;c2&&void 0!==arguments[2]?arguments[2]:1024,A=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=t.length,i=e.peekBytes(r),a=i.length-n;if(a<=0)return!1;if(A)for(var o=n-1,s=i.length-1;s>=o;){for(var c=0;c=n)return e.pos+=s-o,!0;s--}else for(var g=0;g<=a;){for(var u=0;u=n)return e.pos+=g,!0;g++}return!1}var nN=new WeakSet,iN=function(){return qG((function e(t,r){if(KG(this,e),WG(this,nN),r.length<=0)throw new $("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=t,this.stream=r,this.xref=new FG(r,t),this._pagePromises=new Map,this._version=null;var A={font:0};this._globalIdFactory=function(){return qG((function e(){KG(this,e)}),null,[{key:"getDocId",value:function(){return"g_".concat(t.docId)}},{key:"createFontId",value:function(){return"f".concat(++A.font)}},{key:"createObjId",value:function(){j("Abstract method \`createObjId\` called.")}},{key:"getPageObjId",value:function(){j("Abstract method \`getPageObjId\` called.")}}])}()}),[{key:"parse",value:function(e){this.xref.parse(e),this.catalog=new fE(this.pdfManager,this.xref)}},{key:"linearization",get:function(){var e=null;try{e=Ko.create(this.stream)}catch(e){if(e instanceof Ct)throw e;T(e)}return _(this,"linearization",e)}},{key:"startXRef",get:function(){var e=this.stream,t=0;if(this.linearization){if(e.reset(),AN(e,rN)){e.skip(6);for(var r=e.peekByte();Dt(r);)e.pos++,r=e.peekByte();t=e.pos-e.start}}else{for(var A=tN.length,n=!1,i=e.end;!n&&i>0;)(i-=1024-A)<0&&(i=0),e.pos=i,n=AN(e,tN,1024,!0);if(n){var a;e.skip(9);do{a=e.getByte()}while(Dt(a));for(var o="";a>=32&&a<=57;)o+=String.fromCharCode(a),a=e.getByte();t=parseInt(o,10),isNaN(t)&&(t=0)}}return _(this,"startXRef",t)}},{key:"checkHeader",value:function(){var e=this.stream;if(e.reset(),AN(e,eN)){e.moveStart(),e.skip(eN.length);for(var t,r="";(t=e.getByte())>32&&r.length<7;)r+=String.fromCharCode(t);It.test(r)?this._version=r:q("Invalid PDF header version: ".concat(r))}}},{key:"parseStartXRef",value:function(){this.xref.setStartXRef(this.startXRef)}},{key:"numPages",get:function(){return _(this,"numPages",this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages)}},{key:"_hasOnlyDocumentSignatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!Array.isArray(e)&&e.every((function(e){if(!((e=t.xref.fetchIfRef(e))instanceof He))return!1;if(e.has("Kids"))return++r>10?(q("_hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):t._hasOnlyDocumentSignatures(e.get("Kids"),r);var A=Ke(e.get("FT"),"Sig"),n=e.get("Rect"),i=Array.isArray(n)&&n.every((function(e){return 0===e}));return A&&i}))}},{key:"_xfaStreams",get:function(){var e=this.catalog.acroForm;if(!e)return null;var t=e.get("XFA"),r={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if(t instanceof ze&&!t.isEmpty)return r["xdp:xdp"]=t,r;if(!Array.isArray(t)||0===t.length)return null;for(var A=0,n=t.length;A0;e.hasFields=A;var n=t.get("XFA");e.hasXfa=Array.isArray(n)&&n.length>0||n instanceof ze&&!n.isEmpty;var i=!!(1&t.get("SigFlags")),a=i&&this._hasOnlyDocumentSignatures(r);e.hasAcroForm=A&&!a,e.hasSignatures=i}catch(e){if(e instanceof Ct)throw e;q('Cannot fetch form information: "'.concat(e,'".'))}return _(this,"formInfo",e)}},{key:"documentInfo",get:function(){var e,t={PDFFormatVersion:this.version,Language:this.catalog.lang,EncryptFilterName:this.xref.encrypt?this.xref.encrypt.filterName:null,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};try{e=this.xref.trailer.get("Info")}catch(e){if(e instanceof Ct)throw e;T("The document information dictionary is invalid.")}if(!(e instanceof He))return _(this,"documentInfo",t);var r,A=NG(e.getKeys());try{for(A.s();!(r=A.n()).done;){var n=r.value,i=e.get(n);switch(n){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof i){t[n]=Ie(i);continue}break;case"Trapped":if(i instanceof Ue){t[n]=i;continue}break;default:var a=void 0;switch(typeof i){case"string":a=Ie(i);break;case"number":case"boolean":a=i;break;default:i instanceof Ue&&(a=i)}if(void 0===a){q('Bad value, for custom key "'.concat(n,'", in Info: ').concat(i,"."));continue}t.Custom||(t.Custom=Object.create(null)),t.Custom[n]=a;continue}q('Bad value, for key "'.concat(n,'", in Info: ').concat(i,"."))}}catch(e){A.e(e)}finally{A.f()}return _(this,"documentInfo",t)}},{key:"fingerprints",get:function(){function e(e){return"string"==typeof e&&e.length>0&&"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"!==e}function t(e){var t,r=[],A=NG(e);try{for(A.s();!(t=A.n()).done;){var n=t.value.toString(16);r.push(n.padStart(2,"0"))}}catch(e){A.e(e)}finally{A.f()}return r.join("")}var r,A,n=this.xref.trailer.get("ID");return Array.isArray(n)&&e(n[0])?(r=ie(n[0]),n[1]!==n[0]&&e(n[1])&&(A=ie(n[1]))):r=xB(this.stream.getByteRange(0,1024),0,1024),_(this,"fingerprints",[t(r),A?t(A):null])}},{key:"_getLinearizationPage",value:(n=JG(RG().mark((function e(t){var r,A,n,i,a,o;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.catalog,A=this.linearization,n=this.xref,i=Ye.get(A.objectNumberFirst,0),e.prev=2,e.next=5,n.fetchAsync(i);case 5:if(!((a=e.sent)instanceof He)){e.next=16;break}if(!((o=a.getRaw("Type"))instanceof Ye)){e.next=12;break}return e.next=11,n.fetchAsync(o);case 11:o=e.sent;case 12:if(!Ke(o,"Page")&&(a.has("Type")||a.has("Kids")||!a.has("Contents"))){e.next=16;break}return r.pageKidsCountCache.has(i)||r.pageKidsCountCache.put(i,1),r.pageIndexCache.has(i)||r.pageIndexCache.put(i,0),e.abrupt("return",[a,i]);case 16:throw new re("The Linearization dictionary doesn't point to a valid Page dictionary.");case 19:return e.prev=19,e.t0=e.catch(2),q('_getLinearizationPage: "'.concat(e.t0.message,'".')),e.abrupt("return",r.getPageDict(t));case 23:case"end":return e.stop()}}),e,this,[[2,19]])}))),function(e){return n.apply(this,arguments)})},{key:"getPage",value:function(e){var t=this,r=this._pagePromises.get(e);if(r)return r;var A,n=this.catalog,i=this.linearization,a=this.xfaFactory;return A=(A=a?Promise.resolve([He.empty,null]):(null==i?void 0:i.pageFirst)===e?this._getLinearizationPage(e):n.getPageDict(e)).then((function(r){var A=xG(r,2),i=A[0],o=A[1];return new VG({pdfManager:t.pdfManager,xref:t.xref,pageIndex:e,pageDict:i,ref:o,globalIdFactory:t._globalIdFactory,fontCache:n.fontCache,builtInCMapCache:n.builtInCMapCache,standardFontDataCache:n.standardFontDataCache,globalImageCache:n.globalImageCache,systemFontCache:n.systemFontCache,nonBlendModesSet:n.nonBlendModesSet,xfaFactory:a})})),this._pagePromises.set(e,A),A}},{key:"checkFirstPage",value:(A=JG(RG().mark((function e(){var t=arguments;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.length>0&&void 0!==t[0]&&t[0])){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,this.getPage(0);case 6:e.next=15;break;case 8:if(e.prev=8,e.t0=e.catch(3),!(e.t0 instanceof Qt)){e.next=15;break}return this._pagePromises.delete(0),e.next=14,this.cleanup();case 14:throw new Et;case 15:case"end":return e.stop()}}),e,this,[[3,8]])}))),function(){return A.apply(this,arguments)})},{key:"checkLastPage",value:(r=JG(RG().mark((function e(){var t,r,A,n,i,a,o,s,c,g,u,l,h,I=arguments;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=I.length>0&&void 0!==I[0]&&I[0],r=this.catalog,A=this.pdfManager,r.setActualNumPages(),e.prev=3,e.next=6,Promise.all([A.ensureDoc("xfaFactory"),A.ensureDoc("linearization"),A.ensureCatalog("numPages")]);case 6:if(!this.xfaFactory){e.next=10;break}return e.abrupt("return");case 10:n=this.linearization?this.linearization.numPages:r.numPages;case 11:if(Number.isInteger(n)){e.next=15;break}throw new re("Page count is not an integer.");case 15:if(!(n<=1)){e.next=17;break}return e.abrupt("return");case 17:return e.next=19,this.getPage(n-1);case 19:e.next=44;break;case 21:return e.prev=21,e.t0=e.catch(3),this._pagePromises.delete(n-1),e.next=26,this.cleanup();case 26:if(!(e.t0 instanceof Qt)||t){e.next=28;break}throw new Et;case 28:return q("checkLastPage - invalid /Pages tree /Count: ".concat(n,".")),e.prev=29,e.next=32,r.getAllPageDicts(t);case 32:i=e.sent,e.next=41;break;case 35:if(e.prev=35,e.t1=e.catch(29),!(e.t1 instanceof Qt)||t){e.next=39;break}throw new Et;case 39:return r.setActualNumPages(1),e.abrupt("return");case 41:a=NG(i);try{for(a.s();!(o=a.n()).done;)s=xG(o.value,2),c=s[0],g=xG(s[1],2),u=g[0],l=g[1],h=void 0,u instanceof Error?(h=Promise.reject(u)).catch((function(){})):h=Promise.resolve(new VG({pdfManager:A,xref:this.xref,pageIndex:c,pageDict:u,ref:l,globalIdFactory:this._globalIdFactory,fontCache:r.fontCache,builtInCMapCache:r.builtInCMapCache,standardFontDataCache:r.standardFontDataCache,globalImageCache:r.globalImageCache,systemFontCache:r.systemFontCache,nonBlendModesSet:r.nonBlendModesSet,xfaFactory:null})),this._pagePromises.set(c,h)}catch(e){a.e(e)}finally{a.f()}r.setActualNumPages(i.size);case 44:case"end":return e.stop()}}),e,this,[[3,21],[29,35]])}))),function(){return r.apply(this,arguments)})},{key:"fontFallback",value:function(e,t){return this.catalog.fontFallback(e,t)}},{key:"cleanup",value:(t=JG(RG().mark((function e(){var t,r=arguments;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],e.abrupt("return",this.catalog?this.catalog.cleanup(t):JC());case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"fieldObjects",get:function(){var e=this,t=this.pdfManager.ensureDoc("formInfo").then(function(){var t=JG(RG().mark((function t(r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B;return RG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.hasFields){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,Promise.all([e.pdfManager.ensureDoc("annotationGlobals"),e.pdfManager.ensureCatalog("acroForm")]);case 4:if(A=t.sent,n=xG(A,2),i=n[0],a=n[1],i){t.next=10;break}return t.abrupt("return",null);case 10:return o=new Pe,s=Object.create(null),c=new Map,g=new Oe,t.t0=NG,t.next=17,a.getAsync("Fields");case 17:t.t1=t.sent,u=(0,t.t0)(t.t1),t.prev=19,u.s();case 21:if((l=u.n()).done){t.next=27;break}return h=l.value,t.next=25,ZG(nN,e,aN).call(e,"",null,h,c,i,o,g);case 25:t.next=21;break;case 27:t.next=32;break;case 29:t.prev=29,t.t2=t.catch(19),u.e(t.t2);case 32:return t.prev=32,u.f(),t.finish(32);case 35:I=[],f=NG(c),t.prev=37,B=RG().mark((function e(){var t,r,A;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=xG(C.value,2),r=t[0],A=t[1],I.push(Promise.all(A).then((function(e){(e=e.filter((function(e){return!!e}))).length>0&&(s[r]=e)})));case 2:case"end":return e.stop()}}),e)})),f.s();case 40:if((C=f.n()).done){t.next=44;break}return t.delegateYield(B(),"t3",42);case 42:t.next=40;break;case 44:t.next=49;break;case 46:t.prev=46,t.t4=t.catch(37),f.e(t.t4);case 49:return t.prev=49,f.f(),t.finish(49);case 52:return t.next=54,Promise.all(I);case 54:return t.abrupt("return",{allFields:s,orphanFields:g});case 55:case"end":return t.stop()}}),t,null,[[19,29,32,35],[37,46,49,52]])})));return function(e){return t.apply(this,arguments)}}());return _(this,"fieldObjects",t)}},{key:"hasJSActions",get:function(){return _(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}},{key:"_parseHasJSActions",value:(e=JG(RG().mark((function e(){var t,r,A,n;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);case 2:if(t=e.sent,r=xG(t,2),A=r[0],n=r[1],!A){e.next=8;break}return e.abrupt("return",!0);case 8:if(!n){e.next=10;break}return e.abrupt("return",Object.values(n.allFields).some((function(e){return e.some((function(e){return null!==e.actions}))})));case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"calculationOrderIds",get:function(){var e,t=null===(e=this.catalog.acroForm)||void 0===e?void 0:e.get("CO");if(!Array.isArray(t)||0===t.length)return _(this,"calculationOrderIds",null);var r,A=[],n=NG(t);try{for(n.s();!(r=n.n()).done;){var i=r.value;i instanceof Ye&&A.push(i.toString())}}catch(e){n.e(e)}finally{n.f()}return _(this,"calculationOrderIds",A.length?A:null)}},{key:"annotationGlobals",get:function(){return _(this,"annotationGlobals",SR.createGlobals(this.pdfManager))}}]);var e,t,r,A,n,i,a,o}();function aN(e,t,r,A,n,i,a){return oN.apply(this,arguments)}function oN(){return(oN=JG(RG().mark((function e(t,r,A,n,i,a,o){var s,c,g,u,l,h,I,f,C;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=this.xref,A instanceof Ye&&!a.has(A)){e.next=3;break}return e.abrupt("return");case 3:return a.put(A),e.next=6,s.fetchAsync(A);case 6:if((c=e.sent)instanceof He){e.next=9;break}return e.abrupt("return");case 9:if(!c.has("T")){e.next=18;break}return e.t0=Ie,e.next=13,c.getAsync("T");case 13:e.t1=e.sent,g=(0,e.t0)(e.t1),t=""===t?g:"".concat(t,".").concat(g),e.next=39;break;case 18:u=c;case 19:if(!((u=u.getRaw("Parent")||r)instanceof Ye)){e.next=27;break}if(!a.has(u)){e.next=24;break}return e.abrupt("break",39);case 24:return e.next=26,s.fetchAsync(u);case 26:u=e.sent;case 27:if(u instanceof He){e.next=29;break}return e.abrupt("break",39);case 29:if(!u.has("T")){e.next=37;break}return e.t2=Ie,e.next=33,u.getAsync("T");case 33:return e.t3=e.sent,l=(0,e.t2)(e.t3),t=""===t?l:"".concat(t,".").concat(l),e.abrupt("break",39);case 37:e.next=19;break;case 39:if(r&&!c.has("Parent")&&Ke(c.get("Subtype"),"Widget")&&o.put(A,r),n.has(t)||n.set(t,[]),n.get(t).push(SR.create(s,A,i,null,!0,o,null).then((function(e){return null==e?void 0:e.getFieldObject()})).catch((function(e){return q('#collectFieldObjects: "'.concat(e,'".')),null}))),c.has("Kids")){e.next=44;break}return e.abrupt("return");case 44:return e.next=46,c.getAsync("Kids");case 46:if(h=e.sent,!Array.isArray(h)){e.next=65;break}I=NG(h),e.prev=49,I.s();case 51:if((f=I.n()).done){e.next=57;break}return C=f.value,e.next=55,ZG(nN,this,aN).call(this,t,A,C,n,i,a,o);case 55:e.next=51;break;case 57:e.next=62;break;case 59:e.prev=59,e.t4=e.catch(49),I.e(e.t4);case 62:return e.prev=62,I.f(),e.finish(62);case 65:case"end":return e.stop()}}),e,this,[[49,59,62,65]])})))).apply(this,arguments)}function sN(e,t,r){return t=gN(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cN()?Reflect.construct(t,r||[],gN(e).constructor):t.apply(e,r))}function cN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cN=function(){return!!e})()}function gN(e){return gN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gN(e)}function uN(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lN(e,t)}function lN(e,t){return lN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lN(e,t)}function hN(){hN=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function IN(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function fN(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){IN(i,A,n,a,o,"next",e)}function o(e){IN(i,A,n,a,o,"throw",e)}a(void 0)}))}}function CN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BN(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];return this.pdfDocument.cleanup(e)}},{key:"ensure",value:(e=fN(hN().mark((function e(t,r,A){return hN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:j("Abstract method \`ensure\` called");case 1:case"end":return e.stop()}}),e)}))),function(t,r,A){return e.apply(this,arguments)})},{key:"requestRange",value:function(e,t){j("Abstract method \`requestRange\` called")}},{key:"requestLoadedStream",value:function(){j("Abstract method \`requestLoadedStream\` called")}},{key:"sendProgressiveData",value:function(e){j("Abstract method \`sendProgressiveData\` called")}},{key:"updatePassword",value:function(e){this._password=e}},{key:"terminate",value:function(e){j("Abstract method \`terminate\` called")}}]);var e}(),yN=function(e){function t(e){var r;CN(this,t),r=sN(this,t,[e]);var A=new ar(e.source);return r.pdfDocument=new iN(r,A),r._loadedStreamPromise=Promise.resolve(A),r}return uN(t,dN),QN(t,[{key:"ensure",value:(r=fN(hN().mark((function e(t,r,A){var n;return hN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(n=t[r])){e.next=3;break}return e.abrupt("return",n.apply(t,A));case 3:return e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,t,A){return r.apply(this,arguments)})},{key:"requestRange",value:function(e,t){return Promise.resolve()}},{key:"requestLoadedStream",value:function(){return this._loadedStreamPromise}},{key:"terminate",value:function(e){}}]);var r}(),pN=function(e){function t(e){var r;return CN(this,t),(r=sN(this,t,[e])).streamManager=new dr(e.source,{msgHandler:e.handler,length:e.length,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize}),r.pdfDocument=new iN(r,r.streamManager.getStream()),r}return uN(t,dN),QN(t,[{key:"ensure",value:(r=fN(hN().mark((function e(t,r,A){var n;return hN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"function"!=typeof(n=t[r])){e.next=4;break}return e.abrupt("return",n.apply(t,A));case 4:return e.abrupt("return",n);case 7:if(e.prev=7,e.t0=e.catch(0),e.t0 instanceof Ct){e.next=11;break}throw e.t0;case 11:return e.next=13,this.requestRange(e.t0.begin,e.t0.end);case 13:return e.abrupt("return",this.ensure(t,r,A));case 14:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(e,t,A){return r.apply(this,arguments)})},{key:"requestRange",value:function(e,t){return this.streamManager.requestRange(e,t)}},{key:"requestLoadedStream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.streamManager.requestAllChunks(e)}},{key:"sendProgressiveData",value:function(e){this.streamManager.onReceiveData({chunk:e})}},{key:"terminate",value:function(e){this.streamManager.abort(e)}}]);var r}();function vN(){vN=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function mN(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function wN(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var o=this.desiredSize;this.desiredSize-=i,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),n.postMessage({sourceName:r,targetName:A,stream:4,streamId:t,chunk:e},a)}},close(){this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:r,targetName:A,stream:3,streamId:t}),delete i.streamSinks[t])},error(e){W(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:r,targetName:A,stream:5,streamId:t,reason:DN(e)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[t]=o,new Promise((function(t){t(a(e.data,o))})).then((function(){n.postMessage({sourceName:r,targetName:A,stream:8,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:A,stream:8,streamId:t,reason:DN(e)})}))}function RN(e){var t=e.streamId,r=this.sourceName,A=e.sourceName,n=this.comObj,i=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case 8:e.success?i.startCall.resolve():i.startCall.reject(DN(e.reason));break;case 7:e.success?i.pullCall.resolve():i.pullCall.reject(DN(e.reason));break;case 6:if(!a){n.postMessage({sourceName:r,targetName:A,stream:7,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null===(t=a.onPull)||void 0===t?void 0:t.call(a))})).then((function(){n.postMessage({sourceName:r,targetName:A,stream:7,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:A,stream:7,streamId:t,reason:DN(e)})}));break;case 4:if(W(i,"enqueue should have stream controller"),i.isClosed)break;i.controller.enqueue(e.chunk);break;case 3:if(W(i,"close should have stream controller"),i.isClosed)break;i.isClosed=!0,i.controller.close(),kN(SN,this,GN).call(this,i,t);break;case 5:W(i,"error should have stream controller"),i.controller.error(DN(e.reason)),kN(SN,this,GN).call(this,i,t);break;case 2:e.success?i.cancelCall.resolve():i.cancelCall.reject(DN(e.reason)),kN(SN,this,GN).call(this,i,t);break;case 1:if(!a)break;new Promise((function(t){var r;t(null===(r=a.onCancel)||void 0===r?void 0:r.call(a,DN(e.reason)))})).then((function(){n.postMessage({sourceName:r,targetName:A,stream:2,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:A,stream:2,streamId:t,reason:DN(e)})})),a.sinkCapability.reject(DN(e.reason)),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}function GN(e,t){return NN.apply(this,arguments)}function NN(){var e;return e=vN().mark((function e(t,r){var A,n,i;return vN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([null===(A=t.startCall)||void 0===A?void 0:A.promise,null===(n=t.pullCall)||void 0===n?void 0:n.promise,null===(i=t.cancelCall)||void 0===i?void 0:i.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return e.stop()}}),e,this)})),NN=function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){mN(i,A,n,a,o,"next",e)}function o(e){mN(i,A,n,a,o,"throw",e)}a(void 0)}))},NN.apply(this,arguments)}function LN(){LN=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function UN(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function MN(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){UN(i,A,n,a,o,"next",e)}function o(e){UN(i,A,n,a,o,"throw",e)}a(void 0)}))}}function JN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(this._rangeRequestReaders.slice(0));try{for(A.s();!(r=A.n()).done;)r.value.cancel(e)}catch(e){A.e(e)}finally{A.f()}}}])}(),TN=function(){return PN((function e(t){var r=this;HN(this,e),this._msgHandler=t,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;var A=this._msgHandler.sendWithStream("GetReader");this._reader=A.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((function(e){r._isStreamingSupported=e.isStreamingSupported,r._isRangeSupported=e.isRangeSupported,r._contentLength=e.contentLength}))}),[{key:"headersReady",get:function(){return this._headersReady}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"read",value:(e=MN(LN().mark((function e(){var t,r;return LN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._reader.read();case 2:if(t=e.sent,r=t.value,!t.done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return e.abrupt("return",{value:r.buffer,done:!1});case 8:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader.cancel(e)}}]);var e}(),qN=function(){return PN((function e(t,r,A){HN(this,e),this._msgHandler=A,this.onProgress=null;var n=this._msgHandler.sendWithStream("GetRangeReader",{begin:t,end:r});this._reader=n.getReader()}),[{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(e=MN(LN().mark((function e(){var t,r;return LN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._reader.read();case 2:if(t=e.sent,r=t.value,!t.done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return e.abrupt("return",{value:r.buffer,done:!1});case 8:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader.cancel(e)}}]);var e}();function jN(){jN=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function WN(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_N(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ZN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||_N(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _N(e,t){if(e){if("string"==typeof e)return XN(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?XN(e,t):void 0}}function XN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=S.INFOS?Date.now():0;r.getOperatorList({handler:I,sink:t,task:n,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage,modifiedIds:e.modifiedIds}).then((function(e){B(n),i&&T("page=".concat(A+1," - getOperatorList: time=")+"".concat(Date.now()-i,"ms, len=").concat(e.length)),t.close()}),(function(e){B(n),n.terminated||t.error(e)}))}))})),I.on("GetTextContent",(function(e,t){var A=e.pageIndex,n=e.includeMarkedContent,i=e.disableNormalization;r.getPage(A).then((function(e){var r=new nL("GetTextContent: page "+A);C(r);var o=a>=S.INFOS?Date.now():0;e.extractTextContent({handler:I,task:r,sink:t,includeMarkedContent:n,disableNormalization:i}).then((function(){B(r),o&&T("page=".concat(A+1," - getTextContent: time=")+"".concat(Date.now()-o,"ms")),t.close()}),(function(e){B(r),r.terminated||t.error(e)}))}))})),I.on("GetStructTree",(function(e){return r.getPage(e.pageIndex).then((function(e){return r.ensure(e,"getStructTree")}))})),I.on("FontFallback",(function(e){return r.fontFallback(e.id,I)})),I.on("Cleanup",(function(e){return r.cleanup(!0)})),I.on("Terminate",(function(e){A=!0;var t=[];if(r){r.terminate(new Ae("Worker was terminated."));var a=r.cleanup();t.push(a),r=null}else JC();n&&n(new Ae("Worker was terminated."));var o,s=WN(i);try{for(s.s();!(o=s.n()).done;){var c=o.value;t.push(c.finished),c.terminate()}}catch(e){s.e(e)}finally{s.f()}return Promise.all(t).then((function(){I.destroy(),I=null}))})),I.on("Ready",(function(t){!function(e){function t(e){f(),I.send("GetDoc",{pdfInfo:e})}function i(e){if(f(),e instanceof V){var t=new nL("PasswordException: response ".concat(e.code));C(t),I.sendWithPromise("PasswordRequest",e).then((function(e){var A=e.password;B(t),r.updatePassword(A),a()})).catch((function(){B(t),I.send("DocException",e)}))}else e instanceof $||e instanceof ee||e instanceof te||e instanceof z?I.send("DocException",e):I.send("DocException",new z(e.message,e.toString()))}function a(){f(),Q(!1).then(t,(function(e){f(),e instanceof Et?r.requestLoadedStream().then((function(){f(),Q(!0).then(t,i)})):i(e)}))}f(),function(e){var t,r=e.data,A=e.password,i=e.disableAutoFetch,a=e.rangeChunkSize,o=e.length,c=e.docBaseUrl,g=e.enableXfa,u=e.evaluatorOptions,l={source:null,disableAutoFetch:i,docBaseUrl:c,docId:s,enableXfa:g,evaluatorOptions:u,handler:I,length:o,password:A,rangeChunkSize:a},h=Promise.withResolvers();if(r){try{l.source=r,t=new yN(l),h.resolve(t)}catch(e){h.reject(e)}return h.promise}var C,B=[];try{C=new KN(I)}catch(e){return h.reject(e),h.promise}var Q=C.getFullReader();Q.headersReady.then((function(){if(Q.isRangeSupported){l.source=C,l.length=Q.contentLength,l.disableAutoFetch||(l.disableAutoFetch=Q.isStreamingSupported),t=new pN(l);for(var e=0,r=B;e{var n=r(3749),i=r(8055),a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not a function")}},9052:(t,e,r)=>{var n=r(8413),i=r(8055),a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not a constructor")}},7330:(t,e,r)=>{var n=r(4597),i=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a("Can't set "+i(t)+" as a prototype")}},4376:(t,e,r)=>{var n=r(418).has;t.exports=function(t){return n(t),t}},1458:(t,e,r)=>{var n=r(5811),i=r(5304),a=r(1601).f,o=n("unscopables"),s=Array.prototype;void 0===s[o]&&a(s,o,{configurable:!0,value:i(null)}),t.exports=function(t){s[o][t]=!0}},8149:(t,e,r)=>{var n=r(6903).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},3399:(t,e,r)=>{var n=r(6921),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},7447:(t,e,r)=>{var n=r(2674),i=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not an object")}},387:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},8242:(t,e,r)=>{var n=r(4032),i=r(5026),a=r(9872),o=n.ArrayBuffer,s=n.TypeError;t.exports=o&&i(o.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==a(t))throw new s("ArrayBuffer expected");return t.byteLength}},8102:(t,e,r)=>{var n=r(4032),i=r(2116),a=r(8242),o=n.ArrayBuffer,s=o&&o.prototype,u=s&&i(s.slice);t.exports=function(t){if(0!==a(t))return!1;if(!u)return!1;try{return u(t,0,0),!1}catch(t){return!0}}},7060:(t,e,r)=>{var n=r(3455);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},6033:(t,e,r)=>{var n=r(8102),i=TypeError;t.exports=function(t){if(n(t))throw new i("ArrayBuffer is detached");return t}},4676:(t,e,r)=>{var n=r(4032),i=r(2608),a=r(5026),o=r(9088),s=r(6033),u=r(8242),c=r(7395),l=r(6572),h=n.structuredClone,f=n.ArrayBuffer,d=n.DataView,v=Math.min,p=f.prototype,y=d.prototype,g=i(p.slice),m=a(p,"resizable","get"),b=a(p,"maxByteLength","get"),w=i(y.getInt8),k=i(y.setInt8);t.exports=(l||c)&&function(t,e,r){var n,i=u(t),a=void 0===e?i:o(e),p=!m||!m(t);if(s(t),l&&(t=h(t,{transfer:[t]}),i===a&&(r||p)))return t;if(i>=a&&(!r||p))n=g(t,0,a);else{var y=r&&!p&&b?{maxByteLength:b(t)}:void 0;n=new f(a,y);for(var x=new d(t),A=new d(n),_=v(a,i),E=0;E<_;E++)k(A,E,w(x,E))}return l||c(t),n}},4356:(t,e,r)=>{var n,i,a,o=r(387),s=r(2444),u=r(4032),c=r(3749),l=r(2674),h=r(9649),f=r(1179),d=r(8055),v=r(139),p=r(8552),y=r(8986),g=r(6921),m=r(2611),b=r(9415),w=r(5811),k=r(5936),x=r(8301),A=x.enforce,_=x.get,E=u.Int8Array,S=E&&E.prototype,O=u.Uint8ClampedArray,T=O&&O.prototype,P=E&&m(E),L=S&&m(S),M=Object.prototype,C=u.TypeError,j=w("toStringTag"),I=k("TYPED_ARRAY_TAG"),R="TypedArrayConstructor",F=o&&!!b&&"Opera"!==f(u.opera),D=!1,N={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},W={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=m(t);if(l(e)){var r=_(e);return r&&h(r,R)?r[R]:B(e)}},G=function(t){if(!l(t))return!1;var e=f(t);return h(N,e)||h(W,e)};for(n in N)(a=(i=u[n])&&i.prototype)?A(a)[R]=i:F=!1;for(n in W)(a=(i=u[n])&&i.prototype)&&(A(a)[R]=i);if((!F||!c(P)||P===Function.prototype)&&(P=function(){throw new C("Incorrect invocation")},F))for(n in N)u[n]&&b(u[n],P);if((!F||!L||L===M)&&(L=P.prototype,F))for(n in N)u[n]&&b(u[n].prototype,L);if(F&&m(T)!==L&&b(T,L),s&&!h(L,j))for(n in D=!0,y(L,j,{configurable:!0,get:function(){return l(this)?this[I]:void 0}}),N)u[n]&&v(u[n],I,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:F,TYPED_ARRAY_TAG:D&&I,aTypedArray:function(t){if(G(t))return t;throw new C("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||g(P,t)))return t;throw new C(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(s){if(r)for(var i in N){var a=u[i];if(a&&h(a.prototype,t))try{delete a.prototype[t]}catch(r){try{a.prototype[t]=e}catch(t){}}}L[t]&&!r||p(L,t,r?e:F&&S[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(s){if(b){if(r)for(n in N)if((i=u[n])&&h(i,t))try{delete i[t]}catch(t){}if(P[t]&&!r)return;try{return p(P,t,r?e:F&&P[t]||e)}catch(t){}}for(n in N)!(i=u[n])||i[t]&&!r||p(i,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!l(t))return!1;var e=f(t);return"DataView"===e||h(N,e)||h(W,e)},isTypedArray:G,TypedArray:P,TypedArrayPrototype:L}},7226:(t,e,r)=>{var n=r(4032),i=r(2608),a=r(2444),o=r(387),s=r(2542),u=r(139),c=r(8986),l=r(4183),h=r(3455),f=r(3399),d=r(1211),v=r(5806),p=r(9088),y=r(3505),g=r(1306),m=r(2611),b=r(9415),w=r(9557),k=r(4224),x=r(3951),A=r(2924),_=r(6911),E=r(8301),S=s.PROPER,O=s.CONFIGURABLE,T="ArrayBuffer",P="DataView",L="prototype",M="Wrong index",C=E.getterFor(T),j=E.getterFor(P),I=E.set,R=n[T],F=R,D=F&&F[L],N=n[P],W=N&&N[L],B=Object.prototype,G=n.Array,H=n.RangeError,U=i(w),z=i([].reverse),V=g.pack,q=g.unpack,Y=function(t){return[255&t]},X=function(t){return[255&t,t>>8&255]},K=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Q=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},J=function(t){return V(y(t),23,4)},$=function(t){return V(t,52,8)},Z=function(t,e,r){c(t[L],e,{configurable:!0,get:function(){return r(this)[e]}})},tt=function(t,e,r,n){var i=j(t),a=p(r),o=!!n;if(a+e>i.byteLength)throw new H(M);var s=i.bytes,u=a+i.byteOffset,c=k(s,u,u+e);return o?c:z(c)},et=function(t,e,r,n,i,a){var o=j(t),s=p(r),u=n(+i),c=!!a;if(s+e>o.byteLength)throw new H(M);for(var l=o.bytes,h=s+o.byteOffset,f=0;f>24)},setUint8:function(t,e){it(this,t,e<<24>>24)}},{unsafe:!0})}else D=(F=function(t){f(this,D);var e=p(t);I(this,{type:T,bytes:U(G(e),0),byteLength:e}),a||(this.byteLength=e,this.detached=!1)})[L],W=(N=function(t,e,r){f(this,W),f(t,D);var n=C(t),i=n.byteLength,o=d(e);if(o<0||o>i)throw new H("Wrong offset");if(o+(r=void 0===r?i-o:v(r))>i)throw new H("Wrong length");I(this,{type:P,buffer:t,byteLength:r,byteOffset:o,bytes:n.bytes}),a||(this.buffer=t,this.byteLength=r,this.byteOffset=o)})[L],a&&(Z(F,"byteLength",C),Z(N,"buffer",j),Z(N,"byteLength",j),Z(N,"byteOffset",j)),l(W,{getInt8:function(t){return tt(this,1,t)[0]<<24>>24},getUint8:function(t){return tt(this,1,t)[0]},getInt16:function(t){var e=tt(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=tt(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return Q(tt(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return Q(tt(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return q(tt(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return q(tt(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){et(this,1,t,Y,e)},setUint8:function(t,e){et(this,1,t,Y,e)},setInt16:function(t,e){et(this,2,t,X,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){et(this,2,t,X,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){et(this,4,t,K,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){et(this,4,t,K,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){et(this,4,t,J,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){et(this,8,t,$,e,arguments.length>2&&arguments[2])}});_(F,T),_(N,P),t.exports={ArrayBuffer:F,DataView:N}},6677:(t,e,r)=>{var n=r(4165),i=r(9002),a=r(7878),o=r(1870),s=Math.min;t.exports=[].copyWithin||function(t,e){var r=n(this),u=a(r),c=i(t,u),l=i(e,u),h=arguments.length>2?arguments[2]:void 0,f=s((void 0===h?u:i(h,u))-l,u-c),d=1;for(l0;)l in r?r[c]=r[l]:o(r,c),c+=d,l+=d;return r}},9557:(t,e,r)=>{var n=r(4165),i=r(9002),a=r(7878);t.exports=function(t){for(var e=n(this),r=a(e),o=arguments.length,s=i(o>1?arguments[1]:void 0,r),u=o>2?arguments[2]:void 0,c=void 0===u?r:i(u,r);c>s;)e[s++]=t;return e}},3147:(t,e,r)=>{var n=r(5645).forEach,i=r(1814)("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},7434:(t,e,r)=>{var n=r(7878);t.exports=function(t,e,r){for(var i=0,a=arguments.length>2?r:n(e),o=new t(a);a>i;)o[i]=e[i++];return o}},3948:(t,e,r)=>{var n=r(4864),i=r(3453),a=r(4165),o=r(3535),s=r(993),u=r(8413),c=r(7878),l=r(3552),h=r(6961),f=r(7507),d=Array;t.exports=function(t){var e=a(t),r=u(this),v=arguments.length,p=v>1?arguments[1]:void 0,y=void 0!==p;y&&(p=n(p,v>2?arguments[2]:void 0));var g,m,b,w,k,x,A=f(e),_=0;if(!A||this===d&&s(A))for(g=c(e),m=r?new this(g):d(g);g>_;_++)x=y?p(e[_],_):e[_],l(m,_,x);else for(m=r?new this:[],k=(w=h(e,A)).next;!(b=i(k,w)).done;_++)x=y?o(w,p,[b.value,_],!0):b.value,l(m,_,x);return m.length=_,m}},7921:(t,e,r)=>{var n=r(3637),i=r(9002),a=r(7878),o=function(t){return function(e,r,o){var s=n(e),u=a(s);if(0===u)return!t&&-1;var c,l=i(o,u);if(t&&r!=r){for(;u>l;)if((c=s[l++])!=c)return!0}else for(;u>l;l++)if((t||l in s)&&s[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},767:(t,e,r)=>{var n=r(4864),i=r(9455),a=r(4165),o=r(7878),s=function(t){var e=1===t;return function(r,s,u){for(var c,l=a(r),h=i(l),f=o(h),d=n(s,u);f-- >0;)if(d(c=h[f],f,l))switch(t){case 0:return c;case 1:return f}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},5645:(t,e,r)=>{var n=r(4864),i=r(2608),a=r(9455),o=r(4165),s=r(7878),u=r(1453),c=i([].push),l=function(t){var e=1===t,r=2===t,i=3===t,l=4===t,h=6===t,f=7===t,d=5===t||h;return function(v,p,y,g){for(var m,b,w=o(v),k=a(w),x=s(k),A=n(p,y),_=0,E=g||u,S=e?E(v,x):r||f?E(v,0):void 0;x>_;_++)if((d||_ in k)&&(b=A(m=k[_],_,w),t))if(e)S[_]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return _;case 2:c(S,m)}else switch(t){case 4:return!1;case 7:c(S,m)}return h?-1:i||l?l:S}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},3499:(t,e,r)=>{var n=r(3881),i=r(3637),a=r(1211),o=r(7878),s=r(1814),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),f=l||!h;t.exports=f?function(t){if(l)return n(c,this,arguments)||0;var e=i(this),r=o(e);if(0===r)return-1;var s=r-1;for(arguments.length>1&&(s=u(s,a(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in e&&e[s]===t)return s||0;return-1}:c},9077:(t,e,r)=>{var n=r(3455),i=r(5811),a=r(6415),o=i("species");t.exports=function(t){return a>=51||!n((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},1814:(t,e,r)=>{var n=r(3455);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},4734:(t,e,r)=>{var n=r(4186),i=r(4165),a=r(9455),o=r(7878),s=TypeError,u="Reduce of empty array with no initial value",c=function(t){return function(e,r,c,l){var h=i(e),f=a(h),d=o(h);if(n(r),0===d&&c<2)throw new s(u);var v=t?d-1:0,p=t?-1:1;if(c<2)for(;;){if(v in f){l=f[v],v+=p;break}if(v+=p,t?v<0:d<=v)throw new s(u)}for(;t?v>=0:d>v;v+=p)v in f&&(l=r(l,f[v],v,h));return l}};t.exports={left:c(!1),right:c(!0)}},7375:(t,e,r)=>{var n=r(2444),i=r(5448),a=TypeError,o=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!o(t,"length").writable)throw new a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4224:(t,e,r)=>{var n=r(2608);t.exports=n([].slice)},5272:(t,e,r)=>{var n=r(4224),i=Math.floor,a=function(t,e){var r=t.length;if(r<8)for(var o,s,u=1;u0;)t[s]=t[--s];s!==u++&&(t[s]=o)}else for(var c=i(r/2),l=a(n(t,0,c),e),h=a(n(t,c),e),f=l.length,d=h.length,v=0,p=0;v{var n=r(5448),i=r(8413),a=r(2674),o=r(5811)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===s||n(e.prototype))||a(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?s:e}},1453:(t,e,r)=>{var n=r(2329);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},6444:(t,e,r)=>{var n=r(7878);t.exports=function(t,e){for(var r=n(t),i=new e(r),a=0;a{var n=r(7878),i=r(1211),a=RangeError;t.exports=function(t,e,r,o){var s=n(t),u=i(r),c=u<0?s+u:u;if(c>=s||c<0)throw new a("Incorrect index");for(var l=new e(s),h=0;h{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e+"+/",n=e+"-_",i=function(t){for(var e={},r=0;r<64;r++)e[t.charAt(r)]=r;return e};t.exports={i2c:r,c2i:i(r),i2cUrl:n,c2iUrl:i(n)}},3535:(t,e,r)=>{var n=r(7447),i=r(5235);t.exports=function(t,e,r,a){try{return a?e(n(r)[0],r[1]):e(r)}catch(e){i(t,"throw",e)}}},4348:(t,e,r)=>{var n=r(5811)("iterator"),i=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){i=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var r=!1;try{var a={};a[n]=function(){return{next:function(){return{done:r=!0}}}},t(a)}catch(t){}return r}},9872:(t,e,r)=>{var n=r(2608),i=n({}.toString),a=n("".slice);t.exports=function(t){return a(i(t),8,-1)}},1179:(t,e,r)=>{var n=r(3724),i=r(3749),a=r(9872),o=r(5811)("toStringTag"),s=Object,u="Arguments"===a(function(){return arguments}());t.exports=n?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),o))?r:u?a(e):"Object"===(n=a(e))&&i(e.callee)?"Arguments":n}},2042:(t,e,r)=>{var n=r(5304),i=r(8986),a=r(4183),o=r(4864),s=r(3399),u=r(6021),c=r(1804),l=r(656),h=r(9393),f=r(5409),d=r(2444),v=r(5227).fastKey,p=r(8301),y=p.set,g=p.getterFor;t.exports={getConstructor:function(t,e,r,l){var h=t((function(t,i){s(t,f),y(t,{type:e,index:n(null),first:null,last:null,size:0}),d||(t.size=0),u(i)||c(i,t[l],{that:t,AS_ENTRIES:r})})),f=h.prototype,p=g(e),m=function(t,e,r){var n,i,a=p(t),o=b(t,e);return o?o.value=r:(a.last=o={index:i=v(e,!0),key:e,value:r,previous:n=a.last,next:null,removed:!1},a.first||(a.first=o),n&&(n.next=o),d?a.size++:t.size++,"F"!==i&&(a.index[i]=o)),t},b=function(t,e){var r,n=p(t),i=v(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===e)return r};return a(f,{clear:function(){for(var t=p(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=n(null),d?t.size=0:this.size=0},delete:function(t){var e=this,r=p(e),n=b(e,t);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first===n&&(r.first=i),r.last===n&&(r.last=a),d?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=p(this),n=o(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),a(f,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return m(this,0===t?0:t,e)}}:{add:function(t){return m(this,t=0===t?0:t,t)}}),d&&i(f,"size",{configurable:!0,get:function(){return p(this).size}}),h},setStrong:function(t,e,r){var n=e+" Iterator",i=g(e),a=g(n);l(t,e,(function(t,e){y(this,{type:n,target:t,state:i(t),kind:e,last:null})}),(function(){for(var t=a(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?h("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=null,h(void 0,!0))}),r?"entries":"values",!r,!0),f(e)}}},8153:(t,e,r)=>{var n=r(2608),i=r(4183),a=r(5227).getWeakData,o=r(3399),s=r(7447),u=r(6021),c=r(2674),l=r(1804),h=r(5645),f=r(9649),d=r(8301),v=d.set,p=d.getterFor,y=h.find,g=h.findIndex,m=n([].splice),b=0,w=function(t){return t.frozen||(t.frozen=new k)},k=function(){this.entries=[]},x=function(t,e){return y(t.entries,(function(t){return t[0]===e}))};k.prototype={get:function(t){var e=x(this,t);if(e)return e[1]},has:function(t){return!!x(this,t)},set:function(t,e){var r=x(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=g(this.entries,(function(e){return e[0]===t}));return~e&&m(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var h=t((function(t,i){o(t,d),v(t,{type:e,id:b++,frozen:null}),u(i)||l(i,t[n],{that:t,AS_ENTRIES:r})})),d=h.prototype,y=p(e),g=function(t,e,r){var n=y(t),i=a(s(e),!0);return!0===i?w(n).set(e,r):i[n.id]=r,t};return i(d,{delete:function(t){var e=y(this);if(!c(t))return!1;var r=a(t);return!0===r?w(e).delete(t):r&&f(r,e.id)&&delete r[e.id]},has:function(t){var e=y(this);if(!c(t))return!1;var r=a(t);return!0===r?w(e).has(t):r&&f(r,e.id)}}),i(d,r?{get:function(t){var e=y(this);if(c(t)){var r=a(t);if(!0===r)return w(e).get(t);if(r)return r[e.id]}},set:function(t,e){return g(this,t,e)}}:{add:function(t){return g(this,t,!0)}}),h}}},9556:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(2608),o=r(5868),s=r(8552),u=r(5227),c=r(1804),l=r(3399),h=r(3749),f=r(6021),d=r(2674),v=r(3455),p=r(4348),y=r(6911),g=r(3951);t.exports=function(t,e,r){var m=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),w=m?"set":"add",k=i[t],x=k&&k.prototype,A=k,_={},E=function(t){var e=a(x[t]);s(x,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(o(t,!h(k)||!(b||x.forEach&&!v((function(){(new k).entries().next()})))))A=r.getConstructor(e,t,m,w),u.enable();else if(o(t,!0)){var S=new A,O=S[w](b?{}:-0,1)!==S,T=v((function(){S.has(1)})),P=p((function(t){new k(t)})),L=!b&&v((function(){for(var t=new k,e=5;e--;)t[w](e,e);return!t.has(-0)}));P||((A=e((function(t,e){l(t,x);var r=g(new k,t,A);return f(e)||c(e,r[w],{that:r,AS_ENTRIES:m}),r}))).prototype=x,x.constructor=A),(T||L)&&(E("delete"),E("has"),m&&E("get")),(L||O)&&E(w),b&&x.clear&&delete x.clear}return _[t]=A,n({global:!0,constructor:!0,forced:A!==k},_),y(A,t),b||r.setStrong(A,t,m),A}},2924:(t,e,r)=>{var n=r(9649),i=r(2919),a=r(1139),o=r(1601);t.exports=function(t,e,r){for(var s=i(e),u=o.f,c=a.f,l=0;l{var n=r(5811)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},5139:(t,e,r)=>{var n=r(3455);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},9393:t=>{t.exports=function(t,e){return{value:t,done:e}}},139:(t,e,r)=>{var n=r(2444),i=r(1601),a=r(4004);t.exports=n?function(t,e,r){return i.f(t,e,a(1,r))}:function(t,e,r){return t[e]=r,t}},4004:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},3552:(t,e,r)=>{var n=r(2444),i=r(1601),a=r(4004);t.exports=function(t,e,r){n?i.f(t,e,a(0,r)):t[e]=r}},952:(t,e,r)=>{var n=r(7447),i=r(3118),a=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new a("Incorrect hint");return i(this,t)}},8986:(t,e,r)=>{var n=r(1147),i=r(1601);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},8552:(t,e,r)=>{var n=r(3749),i=r(1601),a=r(1147),o=r(5801);t.exports=function(t,e,r,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(n(r)&&a(r,c,s),s.global)u?t[e]=r:o(e,r);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},4183:(t,e,r)=>{var n=r(8552);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},5801:(t,e,r)=>{var n=r(4032),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},1870:(t,e,r)=>{var n=r(8055),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+n(e)+" of "+n(t))}},2444:(t,e,r)=>{var n=r(3455);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},7395:(t,e,r)=>{var n,i,a,o,s=r(4032),u=r(9685),c=r(6572),l=s.structuredClone,h=s.ArrayBuffer,f=s.MessageChannel,d=!1;if(c)d=function(t){l(t,{transfer:[t]})};else if(h)try{f||(n=u("worker_threads"))&&(f=n.MessageChannel),f&&(i=new f,a=new h(2),o=function(t){i.port1.postMessage(null,[t])},2===a.byteLength&&(o(a),0===a.byteLength&&(d=o)))}catch(t){}t.exports=d},5751:(t,e,r)=>{var n=r(4032),i=r(2674),a=n.document,o=i(a)&&i(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},9573:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},4090:t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},2760:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},4784:(t,e,r)=>{var n=r(5751)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},5175:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7085:(t,e,r)=>{var n=r(7607).match(/firefox\\/(\\d+)/i);t.exports=!!n&&+n[1]},5123:(t,e,r)=>{var n=r(7607);t.exports=/MSIE|Trident/.test(n)},9081:(t,e,r)=>{var n=r(7607);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},9352:(t,e,r)=>{var n=r(7607);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},4529:(t,e,r)=>{var n=r(7351);t.exports="NODE"===n},628:(t,e,r)=>{var n=r(7607);t.exports=/web0s(?!.*chrome)/i.test(n)},7607:(t,e,r)=>{var n=r(4032).navigator,i=n&&n.userAgent;t.exports=i?String(i):""},6415:(t,e,r)=>{var n,i,a=r(4032),o=r(7607),s=a.process,u=a.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\\/(\\d+)/))&&(i=+n[1]),t.exports=i},1911:(t,e,r)=>{var n=r(7607).match(/AppleWebKit\\/(\\d+)\\./);t.exports=!!n&&+n[1]},7351:(t,e,r)=>{var n=r(4032),i=r(7607),a=r(9872),o=function(t){return i.slice(0,t.length)===t};t.exports=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===a(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},3633:(t,e,r)=>{var n=r(2608),i=Error,a=n("".replace),o=String(new i("zxcasd").stack),s=/\\n\\s*at [^:]*:[^\\n]*/,u=s.test(o);t.exports=function(t,e){if(u&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=a(t,s,"");return t}},4171:(t,e,r)=>{var n=r(139),i=r(3633),a=r(3427),o=Error.captureStackTrace;t.exports=function(t,e,r,s){a&&(o?o(t,e):n(t,"stack",i(r,s)))}},3427:(t,e,r)=>{var n=r(3455),i=r(4004);t.exports=!n((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},2912:(t,e,r)=>{var n=r(2444),i=r(3455),a=r(7447),o=r(8363),s=Error.prototype.toString,u=i((function(){if(n){var t=Object.create(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==s.call(t))return!0}return"2: 1"!==s.call({message:1,name:2})||"Error"!==s.call({})}));t.exports=u?function(){var t=a(this),e=o(t.name,"Error"),r=o(t.message);return e?r?e+": "+r:e:r}:s},5366:(t,e,r)=>{var n=r(4032),i=r(1139).f,a=r(139),o=r(8552),s=r(5801),u=r(2924),c=r(5868);t.exports=function(t,e){var r,l,h,f,d,v=t.target,p=t.global,y=t.stat;if(r=p?n:y?n[v]||s(v,{}):n[v]&&n[v].prototype)for(l in e){if(f=e[l],h=t.dontCallGetSet?(d=i(r,l))&&d.value:r[l],!c(p?l:v+(y?".":"#")+l,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;u(f,h)}(t.sham||h&&h.sham)&&a(f,"sham",!0),o(r,l,f,t)}}},3455:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},4364:(t,e,r)=>{r(2823);var n=r(3453),i=r(8552),a=r(9867),o=r(3455),s=r(5811),u=r(139),c=s("species"),l=RegExp.prototype;t.exports=function(t,e,r,h){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!==""[t](e)})),v=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!d||!v||r){var p=/./[f],y=e(f,""[t],(function(t,e,r,i,o){var s=e.exec;return s===a||s===l.exec?d&&!o?{done:!0,value:n(p,e,r,i)}:{done:!0,value:n(t,r,e,i)}:{done:!1}}));i(String.prototype,t,y[0]),i(l,f,y[1])}h&&u(l[f],"sham",!0)}},2851:(t,e,r)=>{var n=r(5448),i=r(7878),a=r(9573),o=r(4864),s=function(t,e,r,u,c,l,h,f){for(var d,v,p=c,y=0,g=!!h&&o(h,f);y0&&n(d)?(v=i(d),p=s(t,e,d,v,p,l-1)-1):(a(p+1),t[p]=d),p++),y++;return p};t.exports=s},568:(t,e,r)=>{var n=r(3455);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},3881:(t,e,r)=>{var n=r(9128),i=Function.prototype,a=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(a):function(){return o.apply(a,arguments)})},4864:(t,e,r)=>{var n=r(2116),i=r(4186),a=r(9128),o=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},9128:(t,e,r)=>{var n=r(3455);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},2230:(t,e,r)=>{var n=r(2608),i=r(4186),a=r(2674),o=r(9649),s=r(4224),u=r(9128),c=Function,l=n([].concat),h=n([].join),f={};t.exports=u?c.bind:function(t){var e=i(this),r=e.prototype,n=s(arguments,1),u=function(){var r=l(n,s(arguments));return this instanceof u?function(t,e,r){if(!o(f,e)){for(var n=[],i=0;i{var n=r(9128),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},2542:(t,e,r)=>{var n=r(2444),i=r(9649),a=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,s=i(a,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},5026:(t,e,r)=>{var n=r(2608),i=r(4186);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},2116:(t,e,r)=>{var n=r(9872),i=r(2608);t.exports=function(t){if("Function"===n(t))return i(t)}},2608:(t,e,r)=>{var n=r(9128),i=Function.prototype,a=i.call,o=n&&i.bind.bind(a,a);t.exports=n?o:function(t){return function(){return a.apply(t,arguments)}}},9685:(t,e,r)=>{var n=r(4032),i=r(4529);t.exports=function(t){if(i){try{return n.process.getBuiltinModule(t)}catch(t){}try{return Function('return require("'+t+'")')()}catch(t){}}}},8711:(t,e,r)=>{var n=r(4032),i=r(3749);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},3447:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},1750:(t,e,r)=>{var n=r(3453),i=r(7447),a=r(3447),o=r(7507);t.exports=function(t,e){e&&"string"==typeof t||i(t);var r=o(t);return a(i(void 0!==r?n(r,t):t))}},7507:(t,e,r)=>{var n=r(1179),i=r(8622),a=r(6021),o=r(5597),s=r(5811)("iterator");t.exports=function(t){if(!a(t))return i(t,s)||i(t,"@@iterator")||o[n(t)]}},6961:(t,e,r)=>{var n=r(3453),i=r(4186),a=r(7447),o=r(8055),s=r(7507),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return a(n(r,t));throw new u(o(t)+" is not iterable")}},213:(t,e,r)=>{var n=r(2608),i=r(5448),a=r(3749),o=r(9872),s=r(687),u=n([].push);t.exports=function(t){if(a(t))return t;if(i(t)){for(var e=t.length,r=[],n=0;n{var n=r(4186),i=r(6021);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},3885:(t,e,r)=>{var n=r(4186),i=r(7447),a=r(3453),o=r(1211),s=r(3447),u="Invalid size",c=RangeError,l=TypeError,h=Math.max,f=function(t,e){this.set=t,this.size=h(e,0),this.has=n(t.has),this.keys=n(t.keys)};f.prototype={getIterator:function(){return s(i(a(this.keys,this.set)))},includes:function(t){return a(this.has,this.set,t)}},t.exports=function(t){i(t);var e=+t.size;if(e!=e)throw new l(u);var r=o(e);if(r<0)throw new c(u);return new f(t,r)}},3966:(t,e,r)=>{var n=r(2608),i=r(4165),a=Math.floor,o=n("".charAt),s=n("".replace),u=n("".slice),c=/\\$([$&'\`]|\\d{1,2}|<[^>]*>)/g,l=/\\$([$&'\`]|\\d{1,2})/g;t.exports=function(t,e,r,n,h,f){var d=r+t.length,v=n.length,p=l;return void 0!==h&&(h=i(h),p=c),s(f,p,(function(i,s){var c;switch(o(s,0)){case"$":return"$";case"&":return t;case"\`":return u(e,0,r);case"'":return u(e,d);case"<":c=h[u(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>v){var f=a(l/10);return 0===f?i:f<=v?void 0===n[f-1]?o(s,1):n[f-1]+o(s,1):i}c=n[l-1]}return void 0===c?"":c}))}},4032:function(t){var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||e("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9649:(t,e,r)=>{var n=r(2608),i=r(4165),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(i(t),e)}},2645:t=>{t.exports={}},4885:t=>{t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},3085:(t,e,r)=>{var n=r(8711);t.exports=n("document","documentElement")},8829:(t,e,r)=>{var n=r(2444),i=r(3455),a=r(5751);t.exports=!n&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},1306:t=>{var e=Array,r=Math.abs,n=Math.pow,i=Math.floor,a=Math.log,o=Math.LN2;t.exports={pack:function(t,s,u){var c,l,h,f=e(u),d=8*u-s-1,v=(1<>1,y=23===s?n(2,-24)-n(2,-77):0,g=t<0||0===t&&1/t<0?1:0,m=0;for((t=r(t))!=t||t===1/0?(l=t!=t?1:0,c=v):(c=i(a(t)/o),t*(h=n(2,-c))<1&&(c--,h*=2),(t+=c+p>=1?y/h:y*n(2,1-p))*h>=2&&(c++,h/=2),c+p>=v?(l=0,c=v):c+p>=1?(l=(t*h-1)*n(2,s),c+=p):(l=t*n(2,p-1)*n(2,s),c=0));s>=8;)f[m++]=255&l,l/=256,s-=8;for(c=c<0;)f[m++]=255&c,c/=256,d-=8;return f[m-1]|=128*g,f},unpack:function(t,e){var r,i=t.length,a=8*i-e-1,o=(1<>1,u=a-7,c=i-1,l=t[c--],h=127&l;for(l>>=7;u>0;)h=256*h+t[c--],u-=8;for(r=h&(1<<-u)-1,h>>=-u,u+=e;u>0;)r=256*r+t[c--],u-=8;if(0===h)h=1-s;else{if(h===o)return r?NaN:l?-1/0:1/0;r+=n(2,e),h-=s}return(l?-1:1)*r*n(2,h-e)}}},9455:(t,e,r)=>{var n=r(2608),i=r(3455),a=r(9872),o=Object,s=n("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===a(t)?s(t,""):o(t)}:o},3951:(t,e,r)=>{var n=r(3749),i=r(2674),a=r(9415);t.exports=function(t,e,r){var o,s;return a&&n(o=e.constructor)&&o!==r&&i(s=o.prototype)&&s!==r.prototype&&a(t,s),t}},6906:(t,e,r)=>{var n=r(2608),i=r(3749),a=r(2205),o=n(Function.toString);i(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},2483:(t,e,r)=>{var n=r(2674),i=r(139);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},5227:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(2645),o=r(2674),s=r(9649),u=r(1601).f,c=r(3408),l=r(6442),h=r(8812),f=r(5936),d=r(568),v=!1,p=f("meta"),y=0,g=function(t){u(t,p,{value:{objectID:"O"+y++,weakData:{}}})},m=t.exports={enable:function(){m.enable=function(){},v=!0;var t=c.f,e=i([].splice),r={};r[p]=1,t(r).length&&(c.f=function(r){for(var n=t(r),i=0,a=n.length;i{var n,i,a,o=r(6206),s=r(4032),u=r(2674),c=r(139),l=r(9649),h=r(2205),f=r(2343),d=r(2645),v="Object already initialized",p=s.TypeError,y=s.WeakMap;if(o||h.state){var g=h.state||(h.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,n=function(t,e){if(g.has(t))throw new p(v);return e.facade=t,g.set(t,e),e},i=function(t){return g.get(t)||{}},a=function(t){return g.has(t)}}else{var m=f("state");d[m]=!0,n=function(t,e){if(l(t,m))throw new p(v);return e.facade=t,c(t,m,e),e},i=function(t){return l(t,m)?t[m]:{}},a=function(t){return l(t,m)}}t.exports={set:n,get:i,has:a,enforce:function(t){return a(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=i(e)).type!==t)throw new p("Incompatible receiver, "+t+" required");return r}}}},993:(t,e,r)=>{var n=r(5811),i=r(5597),a=n("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[a]===t)}},5448:(t,e,r)=>{var n=r(9872);t.exports=Array.isArray||function(t){return"Array"===n(t)}},5415:(t,e,r)=>{var n=r(1179);t.exports=function(t){var e=n(t);return"BigInt64Array"===e||"BigUint64Array"===e}},3749:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},8413:(t,e,r)=>{var n=r(2608),i=r(3455),a=r(3749),o=r(1179),s=r(8711),u=r(6906),c=function(){},l=s("Reflect","construct"),h=/^\\s*(?:class|function)\\b/,f=n(h.exec),d=!h.test(c),v=function(t){if(!a(t))return!1;try{return l(c,[],t),!0}catch(t){return!1}},p=function(t){if(!a(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!f(h,u(t))}catch(t){return!0}};p.sham=!0,t.exports=!l||i((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?p:v},3007:(t,e,r)=>{var n=r(9649);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},5868:(t,e,r)=>{var n=r(3455),i=r(3749),a=/#|\\.prototype\\./,o=function(t,e){var r=u[s(t)];return r===l||r!==c&&(i(e)?n(e):!!e)},s=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},u=o.data={},c=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},2599:(t,e,r)=>{var n=r(2674),i=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&i(t)===t}},6021:t=>{t.exports=function(t){return null==t}},2674:(t,e,r)=>{var n=r(3749);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},4597:(t,e,r)=>{var n=r(2674);t.exports=function(t){return n(t)||null===t}},8507:t=>{t.exports=!1},6484:(t,e,r)=>{var n=r(2674),i=r(9872),a=r(5811)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[a])?!!e:"RegExp"===i(t))}},2277:(t,e,r)=>{var n=r(8711),i=r(3749),a=r(6921),o=r(4752),s=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&a(e.prototype,s(t))}},2939:(t,e,r)=>{var n=r(3453);t.exports=function(t,e,r){for(var i,a,o=r?t:t.iterator,s=t.next;!(i=n(s,o)).done;)if(void 0!==(a=e(i.value)))return a}},1804:(t,e,r)=>{var n=r(4864),i=r(3453),a=r(7447),o=r(8055),s=r(993),u=r(7878),c=r(6921),l=r(6961),h=r(7507),f=r(5235),d=TypeError,v=function(t,e){this.stopped=t,this.result=e},p=v.prototype;t.exports=function(t,e,r){var y,g,m,b,w,k,x,A=r&&r.that,_=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),S=!(!r||!r.IS_ITERATOR),O=!(!r||!r.INTERRUPTED),T=n(e,A),P=function(t){return y&&f(y,"normal",t),new v(!0,t)},L=function(t){return _?(a(t),O?T(t[0],t[1],P):T(t[0],t[1])):O?T(t,P):T(t)};if(E)y=t.iterator;else if(S)y=t;else{if(!(g=h(t)))throw new d(o(t)+" is not iterable");if(s(g)){for(m=0,b=u(t);b>m;m++)if((w=L(t[m]))&&c(p,w))return w;return new v(!1)}y=l(t,g)}for(k=E?t.next:y.next;!(x=i(k,y)).done;){try{w=L(x.value)}catch(t){f(y,"throw",t)}if("object"==typeof w&&w&&c(p,w))return w}return new v(!1)}},5235:(t,e,r)=>{var n=r(3453),i=r(7447),a=r(8622);t.exports=function(t,e,r){var o,s;i(t);try{if(!(o=a(t,"return"))){if("throw"===e)throw r;return r}o=n(o,t)}catch(t){s=!0,o=t}if("throw"===e)throw r;if(s)throw o;return i(o),r}},282:(t,e,r)=>{var n=r(2857).IteratorPrototype,i=r(5304),a=r(4004),o=r(6911),s=r(5597),u=function(){return this};t.exports=function(t,e,r,c){var l=e+" Iterator";return t.prototype=i(n,{next:a(+!c,r)}),o(t,l,!1,!0),s[l]=u,t}},2342:(t,e,r)=>{var n=r(3453),i=r(5304),a=r(139),o=r(4183),s=r(5811),u=r(8301),c=r(8622),l=r(2857).IteratorPrototype,h=r(9393),f=r(5235),d=s("toStringTag"),v="IteratorHelper",p="WrapForValidIterator",y=u.set,g=function(t){var e=u.getterFor(t?p:v);return o(i(l),{next:function(){var r=e(this);if(t)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return h(n,r.done)}catch(t){throw r.done=!0,t}},return:function(){var r=e(this),i=r.iterator;if(r.done=!0,t){var a=c(i,"return");return a?n(a,i):h(void 0,!0)}if(r.inner)try{f(r.inner.iterator,"normal")}catch(t){return f(i,"throw",t)}return f(i,"normal"),h(void 0,!0)}})},m=g(!0),b=g(!1);a(b,d,"Iterator Helper"),t.exports=function(t,e){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=e?p:v,n.nextHandler=t,n.counter=0,n.done=!1,y(this,n)};return r.prototype=e?m:b,r}},656:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(8507),o=r(2542),s=r(3749),u=r(282),c=r(2611),l=r(9415),h=r(6911),f=r(139),d=r(8552),v=r(5811),p=r(5597),y=r(2857),g=o.PROPER,m=o.CONFIGURABLE,b=y.IteratorPrototype,w=y.BUGGY_SAFARI_ITERATORS,k=v("iterator"),x="keys",A="values",_="entries",E=function(){return this};t.exports=function(t,e,r,o,v,y,S){u(r,e,o);var O,T,P,L=function(t){if(t===v&&R)return R;if(!w&&t&&t in j)return j[t];switch(t){case x:case A:case _:return function(){return new r(this,t)}}return function(){return new r(this)}},M=e+" Iterator",C=!1,j=t.prototype,I=j[k]||j["@@iterator"]||v&&j[v],R=!w&&I||L(v),F="Array"===e&&j.entries||I;if(F&&(O=c(F.call(new t)))!==Object.prototype&&O.next&&(a||c(O)===b||(l?l(O,b):s(O[k])||d(O,k,E)),h(O,M,!0,!0),a&&(p[M]=E)),g&&v===A&&I&&I.name!==A&&(!a&&m?f(j,"name",A):(C=!0,R=function(){return i(I,this)})),v)if(T={values:L(A),keys:y?R:L(x),entries:L(_)},S)for(P in T)(w||C||!(P in j))&&d(j,P,T[P]);else n({target:e,proto:!0,forced:w||C},T);return a&&!S||j[k]===R||d(j,k,R,{name:v}),p[e]=R,T}},4009:(t,e,r)=>{var n=r(3453),i=r(4186),a=r(7447),o=r(3447),s=r(2342),u=r(3535),c=s((function(){var t=this.iterator,e=a(n(this.next,t));if(!(this.done=!!e.done))return u(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return a(this),i(t),new c(o(this),{mapper:t})}},2857:(t,e,r)=>{var n,i,a,o=r(3455),s=r(3749),u=r(2674),c=r(5304),l=r(2611),h=r(8552),f=r(5811),d=r(8507),v=f("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(i=l(l(a)))!==Object.prototype&&(n=i):p=!0),!u(n)||o((function(){var t={};return n[v].call(t)!==t}))?n={}:d&&(n=c(n)),s(n[v])||h(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},5597:t=>{t.exports={}},7878:(t,e,r)=>{var n=r(5806);t.exports=function(t){return n(t.length)}},1147:(t,e,r)=>{var n=r(2608),i=r(3455),a=r(3749),o=r(9649),s=r(2444),u=r(2542).CONFIGURABLE,c=r(6906),l=r(8301),h=l.enforce,f=l.get,d=String,v=Object.defineProperty,p=n("".slice),y=n("".replace),g=n([].join),m=s&&!i((function(){return 8!==v((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===p(d(e),0,7)&&(e="["+y(d(e),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||u&&t.name!==e)&&(s?v(t,"name",{value:e,configurable:!0}):t.name=e),m&&r&&o(r,"arity")&&t.length!==r.arity&&v(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?s&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=h(t);return o(n,"source")||(n.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return a(this)&&f(this).source||c(this)}),"toString")},9676:(t,e,r)=>{var n=r(550),i=Math.abs,a=2220446049250313e-31,o=1/a;t.exports=function(t,e,r,s){var u=+t,c=i(u),l=n(u);if(cr||f!=f?l*(1/0):l*f}},3505:(t,e,r)=>{var n=r(9676);t.exports=Math.fround||function(t){return n(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},550:t=>{t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},2789:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},755:(t,e,r)=>{var n,i,a,o,s,u=r(4032),c=r(5725),l=r(4864),h=r(1369).set,f=r(3529),d=r(9352),v=r(9081),p=r(628),y=r(4529),g=u.MutationObserver||u.WebKitMutationObserver,m=u.document,b=u.process,w=u.Promise,k=c("queueMicrotask");if(!k){var x=new f,A=function(){var t,e;for(y&&(t=b.domain)&&t.exit();e=x.get();)try{e()}catch(t){throw x.head&&n(),t}t&&t.enter()};d||y||p||!g||!m?!v&&w&&w.resolve?((o=w.resolve(void 0)).constructor=w,s=l(o.then,o),n=function(){s(A)}):y?n=function(){b.nextTick(A)}:(h=l(h,u),n=function(){h(A)}):(i=!0,a=m.createTextNode(""),new g(A).observe(a,{characterData:!0}),n=function(){a.data=i=!i}),k=function(t){x.head||n(),x.add(t)}}t.exports=k},9371:(t,e,r)=>{var n=r(4186),i=TypeError,a=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new a(t)}},8363:(t,e,r)=>{var n=r(687);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},821:t=>{var e=RangeError;t.exports=function(t){if(t==t)return t;throw new e("NaN is not allowed")}},3631:(t,e,r)=>{var n=r(6484),i=TypeError;t.exports=function(t){if(n(t))throw new i("The method doesn't accept regular expressions");return t}},8069:(t,e,r)=>{var n=r(2444),i=r(2608),a=r(3453),o=r(3455),s=r(496),u=r(6005),c=r(9221),l=r(4165),h=r(9455),f=Object.assign,d=Object.defineProperty,v=i([].concat);t.exports=!f||o((function(){if(n&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(t){e[t]=t})),7!==f({},t)[r]||s(f({},e)).join("")!==i}))?function(t,e){for(var r=l(t),i=arguments.length,o=1,f=u.f,d=c.f;i>o;)for(var p,y=h(arguments[o++]),g=f?v(s(y),f(y)):s(y),m=g.length,b=0;m>b;)p=g[b++],n&&!a(d,y,p)||(r[p]=y[p]);return r}:f},5304:(t,e,r)=>{var n,i=r(7447),a=r(9217),o=r(5175),s=r(2645),u=r(3085),c=r(5751),l=r(2343),h="prototype",f="script",d=l("IE_PROTO"),v=function(){},p=function(t){return"<"+f+">"+t+""},y=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;g="undefined"!=typeof document?document.domain&&n?y(n):(e=c("iframe"),r="java"+f+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):y(n);for(var i=o.length;i--;)delete g[h][o[i]];return g()};s[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(v[h]=i(t),r=new v,v[h]=null,r[d]=t):r=g(),void 0===e?r:a.f(r,e)}},9217:(t,e,r)=>{var n=r(2444),i=r(782),a=r(1601),o=r(7447),s=r(3637),u=r(496);e.f=n&&!i?Object.defineProperties:function(t,e){o(t);for(var r,n=s(e),i=u(e),c=i.length,l=0;c>l;)a.f(t,r=i[l++],n[r]);return t}},1601:(t,e,r)=>{var n=r(2444),i=r(8829),a=r(782),o=r(7447),s=r(6201),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=n?a?function(t,e,r){if(o(t),e=s(e),o(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=l(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:h in r?r[h]:n[h],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(o(t),e=s(e),o(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1139:(t,e,r)=>{var n=r(2444),i=r(3453),a=r(9221),o=r(4004),s=r(3637),u=r(6201),c=r(9649),l=r(8829),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=u(e),l)try{return h(t,e)}catch(t){}if(c(t,e))return o(!i(a.f,t,e),t[e])}},6442:(t,e,r)=>{var n=r(9872),i=r(3637),a=r(3408).f,o=r(4224),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===n(t)?function(t){try{return a(t)}catch(t){return o(s)}}(t):a(i(t))}},3408:(t,e,r)=>{var n=r(2468),i=r(5175).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},6005:(t,e)=>{e.f=Object.getOwnPropertySymbols},2611:(t,e,r)=>{var n=r(9649),i=r(3749),a=r(4165),o=r(2343),s=r(5139),u=o("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=a(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?l:null}},8812:(t,e,r)=>{var n=r(3455),i=r(2674),a=r(9872),o=r(7060),s=Object.isExtensible,u=n((function(){s(1)}));t.exports=u||o?function(t){return!!i(t)&&(!o||"ArrayBuffer"!==a(t))&&(!s||s(t))}:s},6921:(t,e,r)=>{var n=r(2608);t.exports=n({}.isPrototypeOf)},2468:(t,e,r)=>{var n=r(2608),i=r(9649),a=r(3637),o=r(7921).indexOf,s=r(2645),u=n([].push);t.exports=function(t,e){var r,n=a(t),c=0,l=[];for(r in n)!i(s,r)&&i(n,r)&&u(l,r);for(;e.length>c;)i(n,r=e[c++])&&(~o(l,r)||u(l,r));return l}},496:(t,e,r)=>{var n=r(2468),i=r(5175);t.exports=Object.keys||function(t){return n(t,i)}},9221:(t,e)=>{var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},9415:(t,e,r)=>{var n=r(5026),i=r(2674),a=r(7222),o=r(7330);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return a(r),o(n),i(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},8885:(t,e,r)=>{var n=r(2444),i=r(3455),a=r(2608),o=r(2611),s=r(496),u=r(3637),c=a(r(9221).f),l=a([].push),h=n&&i((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),f=function(t){return function(e){for(var r,i=u(e),a=s(i),f=h&&null===o(i),d=a.length,v=0,p=[];d>v;)r=a[v++],n&&!(f?r in i:c(i,r))||l(p,t?[r,i[r]]:i[r]);return p}};t.exports={entries:f(!0),values:f(!1)}},3003:(t,e,r)=>{var n=r(3724),i=r(1179);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},3118:(t,e,r)=>{var n=r(3453),i=r(3749),a=r(2674),o=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!a(s=n(r,t)))return s;if(i(r=t.valueOf)&&!a(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!a(s=n(r,t)))return s;throw new o("Can't convert object to primitive value")}},2919:(t,e,r)=>{var n=r(8711),i=r(2608),a=r(3408),o=r(6005),s=r(7447),u=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=a.f(s(t)),r=o.f;return r?u(e,r(t)):e}},1448:(t,e,r)=>{var n=r(2608),i=r(9649),a=SyntaxError,o=parseInt,s=String.fromCharCode,u=n("".charAt),c=n("".slice),l=n(/./.exec),h={'\\\\"':'"',"\\\\\\\\":"\\\\","\\\\/":"/","\\\\b":"\\b","\\\\f":"\\f","\\\\n":"\\n","\\\\r":"\\r","\\\\t":"\\t"},f=/^[\\da-f]{4}$/i,d=/^[\\u0000-\\u001F]$/;t.exports=function(t,e){for(var r=!0,n="";e{var n=r(4032);t.exports=n},6703:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9492:(t,e,r)=>{var n=r(4032),i=r(5318),a=r(3749),o=r(5868),s=r(6906),u=r(5811),c=r(7351),l=r(8507),h=r(6415),f=i&&i.prototype,d=u("species"),v=!1,p=a(n.PromiseRejectionEvent),y=o("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===h)return!0;if(l&&(!f.catch||!f.finally))return!0;if(!h||h<51||!/native code/.test(t)){var r=new i((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[d]=n,!(v=r.then((function(){}))instanceof n))return!0}return!(e||"BROWSER"!==c&&"DENO"!==c||p)}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:p,SUBCLASSING:v}},5318:(t,e,r)=>{var n=r(4032);t.exports=n.Promise},1774:(t,e,r)=>{var n=r(7447),i=r(2674),a=r(9371);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=a.f(t);return(0,r.resolve)(e),r.promise}},2041:(t,e,r)=>{var n=r(5318),i=r(4348),a=r(9492).CONSTRUCTOR;t.exports=a||!i((function(t){n.all(t).then(void 0,(function(){}))}))},2848:(t,e,r)=>{var n=r(1601).f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},3529:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},4410:(t,e,r)=>{var n=r(3453),i=r(7447),a=r(3749),o=r(9872),s=r(9867),u=TypeError;t.exports=function(t,e){var r=t.exec;if(a(r)){var c=n(r,t,e);return null!==c&&i(c),c}if("RegExp"===o(t))return n(s,t,e);throw new u("RegExp#exec called on incompatible receiver")}},9867:(t,e,r)=>{var n,i,a=r(3453),o=r(2608),s=r(687),u=r(747),c=r(1837),l=r(4593),h=r(5304),f=r(8301).get,d=r(3651),v=r(9502),p=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,g=y,m=o("".charAt),b=o("".indexOf),w=o("".replace),k=o("".slice),x=(i=/b*/g,a(y,n=/a/,"a"),a(y,i,"a"),0!==n.lastIndex||0!==i.lastIndex),A=c.BROKEN_CARET,_=void 0!==/()??/.exec("")[1];(x||_||A||d||v)&&(g=function(t){var e,r,n,i,o,c,l,d=this,v=f(d),E=s(t),S=v.raw;if(S)return S.lastIndex=d.lastIndex,e=a(g,S,E),d.lastIndex=S.lastIndex,e;var O=v.groups,T=A&&d.sticky,P=a(u,d),L=d.source,M=0,C=E;if(T&&(P=w(P,"y",""),-1===b(P,"g")&&(P+="g"),C=k(E,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\\n"!==m(E,d.lastIndex-1))&&(L="(?: "+L+")",C=" "+C,M++),r=new RegExp("^(?:"+L+")",P)),_&&(r=new RegExp("^"+L+"$(?!\\\\s)",P)),x&&(n=d.lastIndex),i=a(y,T?r:d,C),T?i?(i.input=k(i.input,M),i[0]=k(i[0],M),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:x&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),_&&i&&i.length>1&&a(p,i[0],r,(function(){for(o=1;o{var n=r(7447);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4554:(t,e,r)=>{var n=r(3453),i=r(9649),a=r(6921),o=r(747),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!a(s,t)?e:n(o,t)}},1837:(t,e,r)=>{var n=r(3455),i=r(4032).RegExp,a=n((function(){var t=i("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),o=a||n((function(){return!i("a","y").sticky})),s=a||n((function(){var t=i("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:o,UNSUPPORTED_Y:a}},3651:(t,e,r)=>{var n=r(3455),i=r(4032).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.test("\\n")&&"s"===t.flags)}))},9502:(t,e,r)=>{var n=r(3455),i=r(4032).RegExp;t.exports=n((function(){var t=i("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},7222:(t,e,r)=>{var n=r(6021),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},5725:(t,e,r)=>{var n=r(4032),i=r(2444),a=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return n[t];var e=a(n,t);return e&&e.value}},8550:(t,e,r)=>{var n=r(418),i=r(5605),a=n.Set,o=n.add;t.exports=function(t){var e=new a;return i(t,(function(t){o(e,t)})),e}},4656:(t,e,r)=>{var n=r(4376),i=r(418),a=r(8550),o=r(82),s=r(3885),u=r(5605),c=r(2939),l=i.has,h=i.remove;t.exports=function(t){var e=n(this),r=s(t),i=a(e);return o(e)<=r.size?u(e,(function(t){r.includes(t)&&h(i,t)})):c(r.getIterator(),(function(t){l(e,t)&&h(i,t)})),i}},418:(t,e,r)=>{var n=r(2608),i=Set.prototype;t.exports={Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i}},2446:(t,e,r)=>{var n=r(4376),i=r(418),a=r(82),o=r(3885),s=r(5605),u=r(2939),c=i.Set,l=i.add,h=i.has;t.exports=function(t){var e=n(this),r=o(t),i=new c;return a(e)>r.size?u(r.getIterator(),(function(t){h(e,t)&&l(i,t)})):s(e,(function(t){r.includes(t)&&l(i,t)})),i}},4545:(t,e,r)=>{var n=r(4376),i=r(418).has,a=r(82),o=r(3885),s=r(5605),u=r(2939),c=r(5235);t.exports=function(t){var e=n(this),r=o(t);if(a(e)<=r.size)return!1!==s(e,(function(t){if(r.includes(t))return!1}),!0);var l=r.getIterator();return!1!==u(l,(function(t){if(i(e,t))return c(l,"normal",!1)}))}},7918:(t,e,r)=>{var n=r(4376),i=r(82),a=r(5605),o=r(3885);t.exports=function(t){var e=n(this),r=o(t);return!(i(e)>r.size)&&!1!==a(e,(function(t){if(!r.includes(t))return!1}),!0)}},6111:(t,e,r)=>{var n=r(4376),i=r(418).has,a=r(82),o=r(3885),s=r(2939),u=r(5235);t.exports=function(t){var e=n(this),r=o(t);if(a(e){var n=r(2608),i=r(2939),a=r(418),o=a.Set,s=a.proto,u=n(s.forEach),c=n(s.keys),l=c(new o).next;t.exports=function(t,e,r){return r?i({iterator:c(t),next:l},e):u(t,e)}},1716:(t,e,r)=>{var n=r(8711),i=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var e=n("Set");try{(new e)[t](i(0));try{return(new e)[t](i(-1)),!1}catch(t){return!0}}catch(t){return!1}}},82:(t,e,r)=>{var n=r(5026),i=r(418);t.exports=n(i.proto,"size","get")||function(t){return t.size}},5409:(t,e,r)=>{var n=r(8711),i=r(8986),a=r(5811),o=r(2444),s=a("species");t.exports=function(t){var e=n(t);o&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},4498:(t,e,r)=>{var n=r(4376),i=r(418),a=r(8550),o=r(3885),s=r(2939),u=i.add,c=i.has,l=i.remove;t.exports=function(t){var e=n(this),r=o(t).getIterator(),i=a(e);return s(r,(function(t){c(e,t)?l(i,t):u(i,t)})),i}},6911:(t,e,r)=>{var n=r(1601).f,i=r(9649),a=r(5811)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,a)&&n(t,a,{configurable:!0,value:e})}},9500:(t,e,r)=>{var n=r(4376),i=r(418).add,a=r(8550),o=r(3885),s=r(2939);t.exports=function(t){var e=n(this),r=o(t).getIterator(),u=a(e);return s(r,(function(t){i(u,t)})),u}},2343:(t,e,r)=>{var n=r(4593),i=r(5936),a=n("keys");t.exports=function(t){return a[t]||(a[t]=i(t))}},2205:(t,e,r)=>{var n=r(8507),i=r(4032),a=r(5801),o="__core-js_shared__",s=t.exports=i[o]||a(o,{});(s.versions||(s.versions=[])).push({version:"3.38.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4593:(t,e,r)=>{var n=r(2205);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},1365:(t,e,r)=>{var n=r(7447),i=r(9052),a=r(6021),o=r(5811)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||a(r=n(s)[o])?e:i(r)}},6903:(t,e,r)=>{var n=r(2608),i=r(1211),a=r(687),o=r(7222),s=n("".charAt),u=n("".charCodeAt),c=n("".slice),l=function(t){return function(e,r){var n,l,h=a(o(e)),f=i(r),d=h.length;return f<0||f>=d?t?"":void 0:(n=u(h,f))<55296||n>56319||f+1===d||(l=u(h,f+1))<56320||l>57343?t?s(h,f):n:t?c(h,f,f+2):l-56320+(n-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},4903:(t,e,r)=>{var n=r(7607);t.exports=/Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(n)},6437:(t,e,r)=>{var n=r(2608),i=r(5806),a=r(687),o=r(6605),s=r(7222),u=n(o),c=n("".slice),l=Math.ceil,h=function(t){return function(e,r,n){var o,h,f=a(s(e)),d=i(r),v=f.length,p=void 0===n?" ":a(n);return d<=v||""===p?f:((h=u(p,l((o=d-v)/p.length))).length>o&&(h=c(h,0,o)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},5141:(t,e,r)=>{var n=r(2608),i=2147483647,a=/[^\\0-\\u007E]/,o=/[.\\u3002\\uFF0E\\uFF61]/g,s="Overflow: input needs wider integers to process",u=RangeError,c=n(o.exec),l=Math.floor,h=String.fromCharCode,f=n("".charCodeAt),d=n([].join),v=n([].push),p=n("".replace),y=n("".split),g=n("".toLowerCase),m=function(t){return t+22+75*(t<26)},b=function(t,e,r){var n=0;for(t=r?l(t/700):t>>1,t+=l(t/e);t>455;)t=l(t/35),n+=36;return l(n+36*t/(t+38))},w=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r=55296&&i<=56319&&r=o&&nl((i-c)/k))throw new u(s);for(c+=(w-o)*k,o=w,r=0;ri)throw new u(s);if(n===o){for(var x=c,A=36;;){var _=A<=p?1:A>=p+26?26:A-p;if(x<_)break;var E=x-_,S=36-_;v(e,h(m(_+E%S))),x=l(E/S),A+=36}v(e,h(m(x))),p=b(c,k,g===y),c=0,g++}}c++,o++}return d(e,"")};t.exports=function(t){var e,r,n=[],i=y(p(g(t),o,"."),".");for(e=0;e{var n=r(1211),i=r(687),a=r(7222),o=RangeError;t.exports=function(t){var e=i(a(this)),r="",s=n(t);if(s<0||s===1/0)throw new o("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(r+=e);return r}},2882:(t,e,r)=>{var n=r(9418).end,i=r(3794);t.exports=i("trimEnd")?function(){return n(this)}:"".trimEnd},3794:(t,e,r)=>{var n=r(2542).PROPER,i=r(3455),a=r(2284);t.exports=function(t){return i((function(){return!!a[t]()||"​…᠎"!=="​…᠎"[t]()||n&&a[t].name!==t}))}},9418:(t,e,r)=>{var n=r(2608),i=r(7222),a=r(687),o=r(2284),s=n("".replace),u=RegExp("^["+o+"]+"),c=RegExp("(^|[^"+o+"])["+o+"]+$"),l=function(t){return function(e){var r=a(i(e));return 1&t&&(r=s(r,u,"")),2&t&&(r=s(r,c,"$1")),r}};t.exports={start:l(1),end:l(2),trim:l(3)}},6572:(t,e,r)=>{var n=r(4032),i=r(3455),a=r(6415),o=r(7351),s=n.structuredClone;t.exports=!!s&&!i((function(){if("DENO"===o&&a>92||"NODE"===o&&a>94||"BROWSER"===o&&a>97)return!1;var t=new ArrayBuffer(8),e=s(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},6943:(t,e,r)=>{var n=r(6415),i=r(3455),a=r(4032).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},3042:(t,e,r)=>{var n=r(3453),i=r(8711),a=r(5811),o=r(8552);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=a("toPrimitive");e&&!e[s]&&o(e,s,(function(t){return n(r,this)}),{arity:1})}},8592:(t,e,r)=>{var n=r(6943);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},1369:(t,e,r)=>{var n,i,a,o,s=r(4032),u=r(3881),c=r(4864),l=r(3749),h=r(9649),f=r(3455),d=r(3085),v=r(4224),p=r(5751),y=r(7900),g=r(9352),m=r(4529),b=s.setImmediate,w=s.clearImmediate,k=s.process,x=s.Dispatch,A=s.Function,_=s.MessageChannel,E=s.String,S=0,O={},T="onreadystatechange";f((function(){n=s.location}));var P=function(t){if(h(O,t)){var e=O[t];delete O[t],e()}},L=function(t){return function(){P(t)}},M=function(t){P(t.data)},C=function(t){s.postMessage(E(t),n.protocol+"//"+n.host)};b&&w||(b=function(t){y(arguments.length,1);var e=l(t)?t:A(t),r=v(arguments,1);return O[++S]=function(){u(e,void 0,r)},i(S),S},w=function(t){delete O[t]},m?i=function(t){k.nextTick(L(t))}:x&&x.now?i=function(t){x.now(L(t))}:_&&!g?(o=(a=new _).port2,a.port1.onmessage=M,i=c(o.postMessage,o)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!f(C)?(i=C,s.addEventListener("message",M,!1)):i=T in p("script")?function(t){d.appendChild(p("script"))[T]=function(){d.removeChild(this),P(t)}}:function(t){setTimeout(L(t),0)}),t.exports={set:b,clear:w}},9002:(t,e,r)=>{var n=r(1211),i=Math.max,a=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):a(r,e)}},1198:(t,e,r)=>{var n=r(8921),i=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw new i("Can't convert number to bigint");return BigInt(e)}},9088:(t,e,r)=>{var n=r(1211),i=r(5806),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=i(e);if(e!==r)throw new a("Wrong length or index");return r}},3637:(t,e,r)=>{var n=r(9455),i=r(7222);t.exports=function(t){return n(i(t))}},1211:(t,e,r)=>{var n=r(2789);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},5806:(t,e,r)=>{var n=r(1211),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},4165:(t,e,r)=>{var n=r(7222),i=Object;t.exports=function(t){return i(n(t))}},8402:(t,e,r)=>{var n=r(5590),i=RangeError;t.exports=function(t,e){var r=n(t);if(r%e)throw new i("Wrong offset");return r}},5590:(t,e,r)=>{var n=r(1211),i=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw new i("The argument can't be less than 0");return e}},8921:(t,e,r)=>{var n=r(3453),i=r(2674),a=r(2277),o=r(8622),s=r(3118),u=r(5811),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,u=o(t,l);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!i(r)||a(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},6201:(t,e,r)=>{var n=r(8921),i=r(2277);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},3724:(t,e,r)=>{var n={};n[r(5811)("toStringTag")]="z",t.exports="[object z]"===String(n)},687:(t,e,r)=>{var n=r(1179),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},5215:t=>{var e=Math.round;t.exports=function(t){var r=e(t);return r<0?0:r>255?255:255&r}},8055:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},8975:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(3453),o=r(2444),s=r(949),u=r(4356),c=r(7226),l=r(3399),h=r(4004),f=r(139),d=r(2599),v=r(5806),p=r(9088),y=r(8402),g=r(5215),m=r(6201),b=r(9649),w=r(1179),k=r(2674),x=r(2277),A=r(5304),_=r(6921),E=r(9415),S=r(3408).f,O=r(2291),T=r(5645).forEach,P=r(5409),L=r(8986),M=r(1601),C=r(1139),j=r(7434),I=r(8301),R=r(3951),F=I.get,D=I.set,N=I.enforce,W=M.f,B=C.f,G=i.RangeError,H=c.ArrayBuffer,U=H.prototype,z=c.DataView,V=u.NATIVE_ARRAY_BUFFER_VIEWS,q=u.TYPED_ARRAY_TAG,Y=u.TypedArray,X=u.TypedArrayPrototype,K=u.isTypedArray,Q="BYTES_PER_ELEMENT",J="Wrong length",$=function(t,e){L(t,e,{configurable:!0,get:function(){return F(this)[e]}})},Z=function(t){var e;return _(U,t)||"ArrayBuffer"===(e=w(t))||"SharedArrayBuffer"===e},tt=function(t,e){return K(t)&&!x(e)&&e in t&&d(+e)&&e>=0},et=function(t,e){return e=m(e),tt(t,e)?h(2,t[e]):B(t,e)},rt=function(t,e,r){return e=m(e),!(tt(t,e)&&k(r)&&b(r,"value"))||b(r,"get")||b(r,"set")||r.configurable||b(r,"writable")&&!r.writable||b(r,"enumerable")&&!r.enumerable?W(t,e,r):(t[e]=r.value,t)};o?(V||(C.f=et,M.f=rt,$(X,"buffer"),$(X,"byteOffset"),$(X,"byteLength"),$(X,"length")),n({target:"Object",stat:!0,forced:!V},{getOwnPropertyDescriptor:et,defineProperty:rt}),t.exports=function(t,e,r){var o=t.match(/\\d+/)[0]/8,u=t+(r?"Clamped":"")+"Array",c="get"+t,h="set"+t,d=i[u],m=d,b=m&&m.prototype,w={},x=function(t,e){W(t,e,{get:function(){return function(t,e){var r=F(t);return r.view[c](e*o+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,n){var i=F(t);i.view[h](e*o+i.byteOffset,r?g(n):n,!0)}(this,e,t)},enumerable:!0})};V?s&&(m=e((function(t,e,r,n){return l(t,b),R(k(e)?Z(e)?void 0!==n?new d(e,y(r,o),n):void 0!==r?new d(e,y(r,o)):new d(e):K(e)?j(m,e):a(O,m,e):new d(p(e)),t,m)})),E&&E(m,Y),T(S(d),(function(t){t in m||f(m,t,d[t])})),m.prototype=b):(m=e((function(t,e,r,n){l(t,b);var i,s,u,c=0,h=0;if(k(e)){if(!Z(e))return K(e)?j(m,e):a(O,m,e);i=e,h=y(r,o);var f=e.byteLength;if(void 0===n){if(f%o)throw new G(J);if((s=f-h)<0)throw new G(J)}else if((s=v(n)*o)+h>f)throw new G(J);u=s/o}else u=p(e),i=new H(s=u*o);for(D(t,{buffer:i,byteOffset:h,byteLength:s,length:u,view:new z(i)});c{var n=r(4032),i=r(3455),a=r(4348),o=r(4356).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,u=n.Int8Array;t.exports=!o||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!a((function(t){new u,new u(null),new u(1.5),new u(t)}),!0)||i((function(){return 1!==new u(new s(2),1,void 0).length}))},85:(t,e,r)=>{var n=r(7434),i=r(580);t.exports=function(t,e){return n(i(t),e)}},2291:(t,e,r)=>{var n=r(4864),i=r(3453),a=r(9052),o=r(4165),s=r(7878),u=r(6961),c=r(7507),l=r(993),h=r(5415),f=r(4356).aTypedArrayConstructor,d=r(1198);t.exports=function(t){var e,r,v,p,y,g,m,b,w=a(this),k=o(t),x=arguments.length,A=x>1?arguments[1]:void 0,_=void 0!==A,E=c(k);if(E&&!l(E))for(b=(m=u(k,E)).next,k=[];!(g=i(b,m)).done;)k.push(g.value);for(_&&x>2&&(A=n(A,arguments[2])),r=s(k),v=new(f(w))(r),p=h(v),e=0;r>e;e++)y=_?A(k[e],e):k[e],v[e]=p?d(y):+y;return v}},580:(t,e,r)=>{var n=r(4356),i=r(1365),a=n.aTypedArrayConstructor,o=n.getTypedArrayConstructor;t.exports=function(t){return a(i(t,o(t)))}},5936:(t,e,r)=>{var n=r(2608),i=0,a=Math.random(),o=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+a,36)}},8200:(t,e,r)=>{var n=r(3455),i=r(5811),a=r(2444),o=r(8507),s=i("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),r.delete("a",2),r.delete("b",void 0),o&&(!t.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!e.size&&(o||!a)||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host}))},4752:(t,e,r)=>{var n=r(6943);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},782:(t,e,r)=>{var n=r(2444),i=r(3455);t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7900:t=>{var e=TypeError;t.exports=function(t,r){if(t{var n=r(4032),i=r(3749),a=n.WeakMap;t.exports=i(a)&&/native code/.test(String(a))},5343:(t,e,r)=>{var n=r(8799),i=r(9649),a=r(4559),o=r(1601).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||o(e,t,{value:a.f(t)})}},4559:(t,e,r)=>{var n=r(5811);e.f=n},5811:(t,e,r)=>{var n=r(4032),i=r(4593),a=r(9649),o=r(5936),s=r(6943),u=r(4752),c=n.Symbol,l=i("wks"),h=u?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return a(l,t)||(l[t]=s&&a(c,t)?c[t]:h("Symbol."+t)),l[t]}},2284:t=>{t.exports="\\t\\n\\v\\f\\r                 \\u2028\\u2029\\ufeff"},9257:(t,e,r)=>{var n=r(8711),i=r(9649),a=r(139),o=r(6921),s=r(9415),u=r(2924),c=r(2848),l=r(3951),h=r(8363),f=r(2483),d=r(4171),v=r(2444),p=r(8507);t.exports=function(t,e,r,y){var g="stackTraceLimit",m=y?2:1,b=t.split("."),w=b[b.length-1],k=n.apply(null,b);if(k){var x=k.prototype;if(!p&&i(x,"cause")&&delete x.cause,!r)return k;var A=n("Error"),_=e((function(t,e){var r=h(y?e:t,void 0),n=y?new k(t):new k;return void 0!==r&&a(n,"message",r),d(n,_,n.stack,2),this&&o(x,this)&&l(n,this,_),arguments.length>m&&f(n,arguments[m]),n}));if(_.prototype=x,"Error"!==w?s?s(_,A):u(_,A,{name:!0}):v&&g in k&&(c(_,k,g),c(_,k,"prepareStackTrace")),u(_,k),!p)try{x.name!==w&&a(x,"name",w),x.constructor=_}catch(t){}return _}}},5015:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(7226),o=r(5409),s="ArrayBuffer",u=a[s];n({global:!0,constructor:!0,forced:i[s]!==u},{ArrayBuffer:u}),o(s)},9261:(t,e,r)=>{var n=r(2444),i=r(8986),a=r(8102),o=ArrayBuffer.prototype;n&&!("detached"in o)&&i(o,"detached",{configurable:!0,get:function(){return a(this)}})},6209:(t,e,r)=>{var n=r(5366),i=r(2116),a=r(3455),o=r(7226),s=r(7447),u=r(9002),c=r(5806),l=r(1365),h=o.ArrayBuffer,f=o.DataView,d=f.prototype,v=i(h.prototype.slice),p=i(d.getUint8),y=i(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(v&&void 0===e)return v(s(this),t);for(var r=s(this).byteLength,n=u(t,r),i=u(void 0===e?r:e,r),a=new(l(this,h))(c(i-n)),o=new f(this),d=new f(a),g=0;n{var n=r(5366),i=r(4676);i&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},3700:(t,e,r)=>{var n=r(5366),i=r(4676);i&&n({target:"ArrayBuffer",proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},6347:(t,e,r)=>{var n=r(5366),i=r(4165),a=r(7878),o=r(1211),s=r(1458);n({target:"Array",proto:!0},{at:function(t){var e=i(this),r=a(e),n=o(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}}),s("at")},3234:(t,e,r)=>{var n=r(5366),i=r(3455),a=r(5448),o=r(2674),s=r(4165),u=r(7878),c=r(9573),l=r(3552),h=r(1453),f=r(9077),d=r(5811),v=r(6415),p=d("isConcatSpreadable"),y=v>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),g=function(t){if(!o(t))return!1;var e=t[p];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,arity:1,forced:!y||!f("concat")},{concat:function(t){var e,r,n,i,a,o=s(this),f=h(o,0),d=0;for(e=-1,n=arguments.length;e{var n=r(5366),i=r(5645).filter;n({target:"Array",proto:!0,forced:!r(9077)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},4302:(t,e,r)=>{var n=r(5366),i=r(2851),a=r(4186),o=r(4165),s=r(7878),u=r(1453);n({target:"Array",proto:!0},{flatMap:function(t){var e,r=o(this),n=s(r);return a(t),(e=u(r,0)).length=i(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},6746:(t,e,r)=>{var n=r(5366),i=r(3948);n({target:"Array",stat:!0,forced:!r(4348)((function(t){Array.from(t)}))},{from:i})},8551:(t,e,r)=>{var n=r(5366),i=r(7921).includes,a=r(3455),o=r(1458);n({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},3276:(t,e,r)=>{var n=r(5366),i=r(2116),a=r(7921).indexOf,o=r(1814),s=i([].indexOf),u=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:u||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return u?s(this,t,e)||0:a(this,t,e)}})},9024:(t,e,r)=>{var n=r(3637),i=r(1458),a=r(5597),o=r(8301),s=r(1601).f,u=r(656),c=r(9393),l=r(8507),h=r(2444),f="Array Iterator",d=o.set,v=o.getterFor(f);t.exports=u(Array,"Array",(function(t,e){d(this,{type:f,target:n(t),index:0,kind:e})}),(function(){var t=v(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,c(void 0,!0);switch(t.kind){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)}),"values");var p=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!l&&h&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(t){}},3177:(t,e,r)=>{var n=r(5366),i=r(3499);n({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},5550:(t,e,r)=>{var n=r(5366),i=r(5645).map;n({target:"Array",proto:!0,forced:!r(9077)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9138:(t,e,r)=>{var n=r(5366),i=r(4165),a=r(7878),o=r(7375),s=r(9573);n({target:"Array",proto:!0,arity:1,forced:r(3455)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=i(this),r=a(e),n=arguments.length;s(r+n);for(var u=0;u{var n=r(5366),i=r(4734).left,a=r(1814),o=r(6415);n({target:"Array",proto:!0,forced:!r(4529)&&o>79&&o<83||!a("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},4413:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(5448),o=i([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),o(this)}})},750:(t,e,r)=>{var n=r(5366),i=r(5448),a=r(8413),o=r(2674),s=r(9002),u=r(7878),c=r(3637),l=r(3552),h=r(5811),f=r(9077),d=r(4224),v=f("slice"),p=h("species"),y=Array,g=Math.max;n({target:"Array",proto:!0,forced:!v},{slice:function(t,e){var r,n,h,f=c(this),v=u(f),m=s(t,v),b=s(void 0===e?v:e,v);if(i(f)&&(r=f.constructor,(a(r)&&(r===y||i(r.prototype))||o(r)&&null===(r=r[p]))&&(r=void 0),r===y||void 0===r))return d(f,m,b);for(n=new(void 0===r?y:r)(g(b-m,0)),h=0;m{var n=r(5366),i=r(2608),a=r(4186),o=r(4165),s=r(7878),u=r(1870),c=r(687),l=r(3455),h=r(5272),f=r(1814),d=r(7085),v=r(5123),p=r(6415),y=r(1911),g=[],m=i(g.sort),b=i(g.push),w=l((function(){g.sort(void 0)})),k=l((function(){g.sort(null)})),x=f("sort"),A=!l((function(){if(p)return p<70;if(!(d&&d>3)){if(v)return!0;if(y)return y<603;var t,e,r,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)g.push({k:e+n,v:r})}for(g.sort((function(t,e){return e.v-t.v})),n=0;nc(r)?1:-1}}(t)),r=s(i),n=0;n{var n=r(5366),i=r(4165),a=r(9002),o=r(1211),s=r(7878),u=r(7375),c=r(9573),l=r(1453),h=r(3552),f=r(1870),d=r(9077)("splice"),v=Math.max,p=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var r,n,d,y,g,m,b=i(this),w=s(b),k=a(t,w),x=arguments.length;for(0===x?r=n=0:1===x?(r=0,n=w-k):(r=x-2,n=p(v(o(e),0),w-k)),c(w+r-n),d=l(b,n),y=0;yw-n+r;y--)f(b,y-1)}else if(r>n)for(y=w-n;y>k;y--)m=y+r-1,(g=y+n-1)in b?b[m]=b[g]:f(b,m);for(y=0;y{r(1458)("flatMap")},6851:(t,e,r)=>{var n=r(5366),i=r(3455),a=r(4165),o=r(8921);n({target:"Date",proto:!0,arity:1,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=a(this),r=o(e,"number");return"number"!=typeof r||isFinite(r)?e.toISOString():null}})},7316:(t,e,r)=>{var n=r(9649),i=r(8552),a=r(952),o=r(5811)("toPrimitive"),s=Date.prototype;n(s,o)||i(s,o,a)},184:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(3881),o=r(9257),s="WebAssembly",u=i[s],c=7!==new Error("e",{cause:7}).cause,l=function(t,e){var r={};r[t]=o(t,e,c),n({global:!0,constructor:!0,arity:1,forced:c},r)},h=function(t,e){if(u&&u[t]){var r={};r[t]=o(s+"."+t,e,c),n({target:s,stat:!0,constructor:!0,arity:1,forced:c},r)}};l("Error",(function(t){return function(e){return a(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return a(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return a(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return a(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return a(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return a(t,this,arguments)}})),l("URIError",(function(t){return function(e){return a(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return a(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return a(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return a(t,this,arguments)}}))},8169:(t,e,r)=>{var n=r(5366),i=r(4032);n({global:!0,forced:i.globalThis!==i},{globalThis:i})},9750:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(3881),o=r(3453),s=r(2608),u=r(3455),c=r(3749),l=r(2277),h=r(4224),f=r(213),d=r(6943),v=String,p=i("JSON","stringify"),y=s(/./.exec),g=s("".charAt),m=s("".charCodeAt),b=s("".replace),w=s(1..toString),k=/[\\uD800-\\uDFFF]/g,x=/^[\\uD800-\\uDBFF]$/,A=/^[\\uDC00-\\uDFFF]$/,_=!d||u((function(){var t=i("Symbol")("stringify detection");return"[null]"!==p([t])||"{}"!==p({a:t})||"{}"!==p(Object(t))})),E=u((function(){return'"\\\\udf06\\\\ud834"'!==p("\\udf06\\ud834")||'"\\\\udead"'!==p("\\udead")})),S=function(t,e){var r=h(arguments),n=f(e);if(c(n)||void 0!==t&&!l(t))return r[1]=function(t,e){if(c(n)&&(e=o(n,this,v(t),e)),!l(e))return e},a(p,null,r)},O=function(t,e,r){var n=g(r,e-1),i=g(r,e+1);return y(x,t)&&!y(A,i)||y(A,t)&&!y(x,n)?"\\\\u"+w(m(t,0),16):t};p&&n({target:"JSON",stat:!0,arity:3,forced:_||E},{stringify:function(t,e,r){var n=h(arguments),i=a(_?S:p,null,n);return E&&"string"==typeof i?b(i,k,O):i}})},7531:(t,e,r)=>{var n=r(4032);r(6911)(n.JSON,"JSON",!0)},6539:(t,e,r)=>{r(9556)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(2042))},1425:(t,e,r)=>{r(6539)},3821:(t,e,r)=>{var n=r(5366),i=Math.hypot,a=Math.abs,o=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!i&&i(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,i=0,s=0,u=arguments.length,c=0;s0?(n=r/c)*n:r;return c===1/0?1/0:c*o(i)}})},1999:(t,e,r)=>{r(6911)(Math,"Math",!0)},8674:(t,e,r)=>{var n=r(5366),i=r(8885).entries;n({target:"Object",stat:!0},{entries:function(t){return i(t)}})},4129:(t,e,r)=>{var n=r(5366),i=r(1804),a=r(3552);n({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,r){a(e,t,r)}),{AS_ENTRIES:!0}),e}})},702:(t,e,r)=>{var n=r(5366),i=r(2444),a=r(2919),o=r(3637),s=r(1139),u=r(3552);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,r,n=o(t),i=s.f,c=a(n),l={},h=0;c.length>h;)void 0!==(r=i(n,e=c[h++]))&&u(l,e,r);return l}})},1309:(t,e,r)=>{var n=r(5366),i=r(6943),a=r(3455),o=r(6005),s=r(4165);n({target:"Object",stat:!0,forced:!i||a((function(){o.f(1)}))},{getOwnPropertySymbols:function(t){var e=o.f;return e?e(s(t)):[]}})},3379:(t,e,r)=>{var n=r(3724),i=r(8552),a=r(3003);n||i(Object.prototype,"toString",a,{unsafe:!0})},482:(t,e,r)=>{var n=r(5366),i=r(8885).values;n({target:"Object",stat:!0},{values:function(t){return i(t)}})},5204:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(9371),s=r(6703),u=r(1804);n({target:"Promise",stat:!0,forced:r(2041)},{allSettled:function(t){var e=this,r=o.f(e),n=r.resolve,c=r.reject,l=s((function(){var r=a(e.resolve),o=[],s=0,c=1;u(t,(function(t){var a=s++,u=!1;c++,i(r,e,t).then((function(t){u||(u=!0,o[a]={status:"fulfilled",value:t},--c||n(o))}),(function(t){u||(u=!0,o[a]={status:"rejected",reason:t},--c||n(o))}))})),--c||n(o)}));return l.error&&c(l.value),r.promise}})},6195:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(9371),s=r(6703),u=r(1804);n({target:"Promise",stat:!0,forced:r(2041)},{all:function(t){var e=this,r=o.f(e),n=r.resolve,c=r.reject,l=s((function(){var r=a(e.resolve),o=[],s=0,l=1;u(t,(function(t){var a=s++,u=!1;l++,i(r,e,t).then((function(t){u||(u=!0,o[a]=t,--l||n(o))}),c)})),--l||n(o)}));return l.error&&c(l.value),r.promise}})},1459:(t,e,r)=>{var n=r(5366),i=r(8507),a=r(9492).CONSTRUCTOR,o=r(5318),s=r(8711),u=r(3749),c=r(8552),l=o&&o.prototype;if(n({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&u(o)){var h=s("Promise").prototype.catch;l.catch!==h&&c(l,"catch",h,{unsafe:!0})}},9236:(t,e,r)=>{var n,i,a,o=r(5366),s=r(8507),u=r(4529),c=r(4032),l=r(3453),h=r(8552),f=r(9415),d=r(6911),v=r(5409),p=r(4186),y=r(3749),g=r(2674),m=r(3399),b=r(1365),w=r(1369).set,k=r(755),x=r(4885),A=r(6703),_=r(3529),E=r(8301),S=r(5318),O=r(9492),T=r(9371),P="Promise",L=O.CONSTRUCTOR,M=O.REJECTION_EVENT,C=O.SUBCLASSING,j=E.getterFor(P),I=E.set,R=S&&S.prototype,F=S,D=R,N=c.TypeError,W=c.document,B=c.process,G=T.f,H=G,U=!!(W&&W.createEvent&&c.dispatchEvent),z="unhandledrejection",V=function(t){var e;return!(!g(t)||!y(e=t.then))&&e},q=function(t,e){var r,n,i,a=e.value,o=1===e.state,s=o?t.ok:t.fail,u=t.resolve,c=t.reject,h=t.domain;try{s?(o||(2===e.rejection&&J(e),e.rejection=1),!0===s?r=a:(h&&h.enter(),r=s(a),h&&(h.exit(),i=!0)),r===t.promise?c(new N("Promise-chain cycle")):(n=V(r))?l(n,r,u,c):u(r)):c(a)}catch(t){h&&!i&&h.exit(),c(t)}},Y=function(t,e){t.notified||(t.notified=!0,k((function(){for(var r,n=t.reactions;r=n.get();)q(r,t);t.notified=!1,e&&!t.rejection&&K(t)})))},X=function(t,e,r){var n,i;U?((n=W.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!M&&(i=c["on"+t])?i(n):t===z&&x("Unhandled promise rejection",r)},K=function(t){l(w,c,(function(){var e,r=t.facade,n=t.value;if(Q(t)&&(e=A((function(){u?B.emit("unhandledRejection",n,r):X(z,r,n)})),t.rejection=u||Q(t)?2:1,e.error))throw e.value}))},Q=function(t){return 1!==t.rejection&&!t.parent},J=function(t){l(w,c,(function(){var e=t.facade;u?B.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)}))},$=function(t,e,r){return function(n){t(e,n,r)}},Z=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Y(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new N("Promise can't be resolved itself");var n=V(e);n?k((function(){var r={done:!1};try{l(n,e,$(tt,r,t),$(Z,r,t))}catch(e){Z(r,e,t)}})):(t.value=e,t.state=1,Y(t,!1))}catch(e){Z({done:!1},e,t)}}};if(L&&(D=(F=function(t){m(this,D),p(t),l(n,this);var e=j(this);try{t($(tt,e),$(Z,e))}catch(t){Z(e,t)}}).prototype,(n=function(t){I(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new _,rejection:!1,state:0,value:null})}).prototype=h(D,"then",(function(t,e){var r=j(this),n=G(b(this,F));return r.parent=!0,n.ok=!y(t)||t,n.fail=y(e)&&e,n.domain=u?B.domain:void 0,0===r.state?r.reactions.add(n):k((function(){q(n,r)})),n.promise})),i=function(){var t=new n,e=j(t);this.promise=t,this.resolve=$(tt,e),this.reject=$(Z,e)},T.f=G=function(t){return t===F||void 0===t?new i(t):H(t)},!s&&y(S)&&R!==Object.prototype)){a=R.then,C||h(R,"then",(function(t,e){var r=this;return new F((function(t,e){l(a,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete R.constructor}catch(t){}f&&f(R,D)}o({global:!0,constructor:!0,wrap:!0,forced:L},{Promise:F}),d(F,P,!1,!0),v(P)},2431:(t,e,r)=>{var n=r(5366),i=r(8507),a=r(5318),o=r(3455),s=r(8711),u=r(3749),c=r(1365),l=r(1774),h=r(8552),f=a&&a.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!a&&o((function(){f.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,s("Promise")),r=u(t);return this.then(r?function(r){return l(e,t()).then((function(){return r}))}:t,r?function(r){return l(e,t()).then((function(){throw r}))}:t)}}),!i&&u(a)){var d=s("Promise").prototype.finally;f.finally!==d&&h(f,"finally",d,{unsafe:!0})}},1234:(t,e,r)=>{r(9236),r(6195),r(1459),r(5167),r(5257),r(1128)},5167:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(9371),s=r(6703),u=r(1804);n({target:"Promise",stat:!0,forced:r(2041)},{race:function(t){var e=this,r=o.f(e),n=r.reject,c=s((function(){var o=a(e.resolve);u(t,(function(t){i(o,e,t).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},5257:(t,e,r)=>{var n=r(5366),i=r(9371);n({target:"Promise",stat:!0,forced:r(9492).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return(0,e.reject)(t),e.promise}})},1128:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(8507),o=r(5318),s=r(9492).CONSTRUCTOR,u=r(1774),c=i("Promise"),l=a&&!s;n({target:"Promise",stat:!0,forced:a||s},{resolve:function(t){return u(l&&this===c?o:this,t)}})},9732:(t,e,r)=>{var n=r(5366),i=r(9371);n({target:"Promise",stat:!0},{withResolvers:function(){var t=i.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},489:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(3881),o=r(2230),s=r(9052),u=r(7447),c=r(2674),l=r(5304),h=r(3455),f=i("Reflect","construct"),d=Object.prototype,v=[].push,p=h((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),y=!h((function(){f((function(){}))})),g=p||y;n({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){s(t),u(e);var r=arguments.length<3?t:s(arguments[2]);if(y&&!p)return f(t,e,r);if(t===r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return a(v,n,e),new(a(o,t,n))}var i=r.prototype,h=l(c(i)?i:d),g=a(t,h,e);return c(g)?g:h}})},7288:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(2674),o=r(7447),s=r(3007),u=r(1139),c=r(2611);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,l,h=arguments.length<3?e:arguments[2];return o(e)===h?e[r]:(n=u.f(e,r))?s(n)?n.value:void 0===n.get?void 0:i(n.get,h):a(l=c(e))?t(l,r,h):void 0}})},176:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(6911);n({global:!0},{Reflect:{}}),a(i.Reflect,"Reflect",!0)},4592:(t,e,r)=>{var n=r(2444),i=r(4032),a=r(2608),o=r(5868),s=r(3951),u=r(139),c=r(5304),l=r(3408).f,h=r(6921),f=r(6484),d=r(687),v=r(4554),p=r(1837),y=r(2848),g=r(8552),m=r(3455),b=r(9649),w=r(8301).enforce,k=r(5409),x=r(5811),A=r(3651),_=r(9502),E=x("match"),S=i.RegExp,O=S.prototype,T=i.SyntaxError,P=a(O.exec),L=a("".charAt),M=a("".replace),C=a("".indexOf),j=a("".slice),I=/^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/,R=/a/g,F=/a/g,D=new S(R)!==R,N=p.MISSED_STICKY,W=p.UNSUPPORTED_Y;if(o("RegExp",n&&(!D||N||A||_||m((function(){return F[E]=!1,S(R)!==R||S(F)===F||"/a/i"!==String(S(R,"i"))}))))){for(var B=function(t,e){var r,n,i,a,o,l,p=h(O,this),y=f(t),g=void 0===e,m=[],k=t;if(!p&&y&&g&&t.constructor===B)return t;if((y||h(O,t))&&(t=t.source,g&&(e=v(k))),t=void 0===t?"":d(t),e=void 0===e?"":d(e),k=t,A&&"dotAll"in R&&(n=!!e&&C(e,"s")>-1)&&(e=M(e,/s/g,"")),r=e,N&&"sticky"in R&&(i=!!e&&C(e,"y")>-1)&&W&&(e=M(e,/y/g,"")),_&&(a=function(t){for(var e,r=t.length,n=0,i="",a=[],o=c(null),s=!1,u=!1,l=0,h="";n<=r;n++){if("\\\\"===(e=L(t,n)))e+=L(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:if(i+=e,"?:"===j(t,n+1,n+3))continue;P(I,j(t,n+1))&&(n+=2,u=!0),l++;continue;case">"===e&&u:if(""===h||b(o,h))throw new T("Invalid capture group name");o[h]=!0,a[a.length]=[h,l],u=!1,h="";continue}u?h+=e:i+=e}return[i,a]}(t),t=a[0],m=a[1]),o=s(S(t,e),p?this:O,B),(n||i||m.length)&&(l=w(o),n&&(l.dotAll=!0,l.raw=B(function(t){for(var e,r=t.length,n=0,i="",a=!1;n<=r;n++)"\\\\"!==(e=L(t,n))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),i+=e):i+="[\\\\s\\\\S]":i+=e+L(t,++n);return i}(t),r)),i&&(l.sticky=!0),m.length&&(l.groups=m)),t!==k)try{u(o,"source",""===k?"(?:)":k)}catch(t){}return o},G=l(S),H=0;G.length>H;)y(B,S,G[H++]);O.constructor=B,B.prototype=O,g(i,"RegExp",B,{constructor:!0})}k("RegExp")},8345:(t,e,r)=>{var n=r(2444),i=r(3651),a=r(9872),o=r(8986),s=r(8301).get,u=RegExp.prototype,c=TypeError;n&&i&&o(u,"dotAll",{configurable:!0,get:function(){if(this!==u){if("RegExp"===a(this))return!!s(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},2823:(t,e,r)=>{var n=r(5366),i=r(9867);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2865:(t,e,r)=>{var n=r(2444),i=r(1837).MISSED_STICKY,a=r(9872),o=r(8986),s=r(8301).get,u=RegExp.prototype,c=TypeError;n&&i&&o(u,"sticky",{configurable:!0,get:function(){if(this!==u){if("RegExp"===a(this))return!!s(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},5594:(t,e,r)=>{r(2823);var n,i,a=r(5366),o=r(3453),s=r(3749),u=r(7447),c=r(687),l=(n=!1,(i=/[ac]/).exec=function(){return n=!0,/./.exec.apply(this,arguments)},!0===i.test("abc")&&n),h=/./.test;a({target:"RegExp",proto:!0,forced:!l},{test:function(t){var e=u(this),r=c(t),n=e.exec;if(!s(n))return o(h,e,r);var i=o(n,e,r);return null!==i&&(u(i),!0)}})},8397:(t,e,r)=>{var n=r(2542).PROPER,i=r(8552),a=r(7447),o=r(687),s=r(3455),u=r(4554),c="toString",l=RegExp.prototype,h=l[c],f=s((function(){return"/a/b"!==h.call({source:"a",flags:"b"})})),d=n&&h.name!==c;(f||d)&&i(l,c,(function(){var t=a(this);return"/"+o(t.source)+"/"+o(u(t))}),{unsafe:!0})},4645:(t,e,r)=>{r(9556)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(2042))},5130:(t,e,r)=>{var n=r(5366),i=r(4656);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("difference")},{difference:i})},5636:(t,e,r)=>{var n=r(5366),i=r(3455),a=r(2446);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("intersection")||i((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:a})},8509:(t,e,r)=>{var n=r(5366),i=r(4545);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("isDisjointFrom")},{isDisjointFrom:i})},7332:(t,e,r)=>{var n=r(5366),i=r(7918);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("isSubsetOf")},{isSubsetOf:i})},6555:(t,e,r)=>{var n=r(5366),i=r(6111);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("isSupersetOf")},{isSupersetOf:i})},9255:(t,e,r)=>{r(4645)},3296:(t,e,r)=>{var n=r(5366),i=r(4498);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("symmetricDifference")},{symmetricDifference:i})},4594:(t,e,r)=>{var n=r(5366),i=r(9500);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("union")},{union:i})},8653:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(7222),o=r(1211),s=r(687),u=r(3455),c=i("".charAt);n({target:"String",proto:!0,forced:u((function(){return"\\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=s(a(this)),r=e.length,n=o(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:c(e,i)}})},9657:(t,e,r)=>{var n,i=r(5366),a=r(2116),o=r(1139).f,s=r(5806),u=r(687),c=r(3631),l=r(7222),h=r(860),f=r(8507),d=a("".slice),v=Math.min,p=h("endsWith");i({target:"String",proto:!0,forced:!(!f&&!p&&(n=o(String.prototype,"endsWith"),n&&!n.writable)||p)},{endsWith:function(t){var e=u(l(this));c(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:v(s(r),n),a=u(t);return d(e,i-a.length,i)===a}})},2217:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(9002),o=RangeError,s=String.fromCharCode,u=String.fromCodePoint,c=i([].join);n({target:"String",stat:!0,arity:1,forced:!!u&&1!==u.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,i=0;n>i;){if(e=+arguments[i++],a(e,1114111)!==e)throw new o(e+" is not a valid code point");r[i]=e<65536?s(e):s(55296+((e-=65536)>>10),e%1024+56320)}return c(r,"")}})},2467:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(3631),o=r(7222),s=r(687),u=r(860),c=i("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~c(s(o(this)),s(a(t)),arguments.length>1?arguments[1]:void 0)}})},7460:(t,e,r)=>{var n=r(6903).charAt,i=r(687),a=r(8301),o=r(656),s=r(9393),u="String Iterator",c=a.set,l=a.getterFor(u);o(String,"String",(function(t){c(this,{type:u,string:i(t),index:0})}),(function(){var t,e=l(this),r=e.string,i=e.index;return i>=r.length?s(void 0,!0):(t=n(r,i),e.index+=t.length,s(t,!1))}))},1281:(t,e,r)=>{var n=r(3453),i=r(4364),a=r(7447),o=r(6021),s=r(5806),u=r(687),c=r(7222),l=r(8622),h=r(8149),f=r(4410);i("match",(function(t,e,r){return[function(e){var r=c(this),i=o(e)?void 0:l(e,t);return i?n(i,e,r):new RegExp(e)[t](u(r))},function(t){var n=a(this),i=u(t),o=r(e,n,i);if(o.done)return o.value;if(!n.global)return f(n,i);var c=n.unicode;n.lastIndex=0;for(var l,d=[],v=0;null!==(l=f(n,i));){var p=u(l[0]);d[v]=p,""===p&&(n.lastIndex=h(i,s(n.lastIndex),c)),v++}return 0===v?null:d}]}))},4853:(t,e,r)=>{var n=r(5366),i=r(6437).end;n({target:"String",proto:!0,forced:r(4903)},{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9484:(t,e,r)=>{var n=r(5366),i=r(6437).start;n({target:"String",proto:!0,forced:r(4903)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},6794:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(2608),o=r(7222),s=r(3749),u=r(6021),c=r(6484),l=r(687),h=r(8622),f=r(4554),d=r(3966),v=r(5811),p=r(8507),y=v("replace"),g=TypeError,m=a("".indexOf),b=a("".replace),w=a("".slice),k=Math.max;n({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,a,v,x,A,_,E,S,O,T=o(this),P=0,L="";if(!u(t)){if((r=c(t))&&(n=l(o(f(t))),!~m(n,"g")))throw new g("\`.replaceAll\` does not allow non-global regexes");if(a=h(t,y))return i(a,t,T,e);if(p&&r)return b(l(T),t,e)}for(v=l(T),x=l(t),(A=s(e))||(e=l(e)),_=x.length,E=k(1,_),S=m(v,x);-1!==S;)O=A?l(e(x,S,v)):d(x,v,S,[],void 0,e),L+=w(v,P,S)+O,P=S+_,S=S+E>v.length?-1:m(v,x,S+E);return P{var n=r(3881),i=r(3453),a=r(2608),o=r(4364),s=r(3455),u=r(7447),c=r(3749),l=r(6021),h=r(1211),f=r(5806),d=r(687),v=r(7222),p=r(8149),y=r(8622),g=r(3966),m=r(4410),b=r(5811)("replace"),w=Math.max,k=Math.min,x=a([].concat),A=a([].push),_=a("".indexOf),E=a("".slice),S="$0"==="a".replace(/./,"$0"),O=!!/./[b]&&""===/./[b]("a","$0");o("replace",(function(t,e,r){var a=O?"$":"$0";return[function(t,r){var n=v(this),a=l(t)?void 0:y(t,b);return a?i(a,t,n,r):i(e,d(n),t,r)},function(t,i){var o=u(this),s=d(t);if("string"==typeof i&&-1===_(i,a)&&-1===_(i,"$<")){var l=r(e,o,s,i);if(l.done)return l.value}var v=c(i);v||(i=d(i));var y,b=o.global;b&&(y=o.unicode,o.lastIndex=0);for(var S,O=[];null!==(S=m(o,s))&&(A(O,S),b);)""===d(S[0])&&(o.lastIndex=p(s,f(o.lastIndex),y));for(var T,P="",L=0,M=0;M=L&&(P+=E(s,L,I)+C,L=I+j.length)}return P+E(s,L)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!S||O)},4072:(t,e,r)=>{var n=r(3453),i=r(2608),a=r(4364),o=r(7447),s=r(6021),u=r(7222),c=r(1365),l=r(8149),h=r(5806),f=r(687),d=r(8622),v=r(4410),p=r(1837),y=r(3455),g=p.UNSUPPORTED_Y,m=Math.min,b=i([].push),w=i("".slice),k=!y((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),x="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;a("split",(function(t,e,r){var i="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:n(e,this,t,r)}:e;return[function(e,r){var a=u(this),o=s(e)?void 0:d(e,t);return o?n(o,e,a,r):n(i,f(a),e,r)},function(t,n){var a=o(this),s=f(t);if(!x){var u=r(i,a,s,n,i!==e);if(u.done)return u.value}var d=c(a,RegExp),p=a.unicode,y=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(g?"g":"y"),k=new d(g?"^(?:"+a.source+")":a,y),A=void 0===n?4294967295:n>>>0;if(0===A)return[];if(0===s.length)return null===v(k,s)?[s]:[];for(var _=0,E=0,S=[];E{var n,i=r(5366),a=r(2116),o=r(1139).f,s=r(5806),u=r(687),c=r(3631),l=r(7222),h=r(860),f=r(8507),d=a("".slice),v=Math.min,p=h("startsWith");i({target:"String",proto:!0,forced:!(!f&&!p&&(n=o(String.prototype,"startsWith"),n&&!n.writable)||p)},{startsWith:function(t){var e=u(l(this));c(t);var r=s(v(arguments.length>1?arguments[1]:void 0,e.length)),n=u(t);return d(e,r,r+n.length)===n}})},98:(t,e,r)=>{r(3185);var n=r(5366),i=r(2882);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==i},{trimEnd:i})},3185:(t,e,r)=>{var n=r(5366),i=r(2882);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==i},{trimRight:i})},9210:(t,e,r)=>{var n=r(5366),i=r(9418).trim;n({target:"String",proto:!0,forced:r(3794)("trim")},{trim:function(){return i(this)}})},4172:(t,e,r)=>{r(5343)("asyncIterator")},2873:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(3453),o=r(2608),s=r(8507),u=r(2444),c=r(6943),l=r(3455),h=r(9649),f=r(6921),d=r(7447),v=r(3637),p=r(6201),y=r(687),g=r(4004),m=r(5304),b=r(496),w=r(3408),k=r(6442),x=r(6005),A=r(1139),_=r(1601),E=r(9217),S=r(9221),O=r(8552),T=r(8986),P=r(4593),L=r(2343),M=r(2645),C=r(5936),j=r(5811),I=r(4559),R=r(5343),F=r(3042),D=r(6911),N=r(8301),W=r(5645).forEach,B=L("hidden"),G="Symbol",H="prototype",U=N.set,z=N.getterFor(G),V=Object[H],q=i.Symbol,Y=q&&q[H],X=i.RangeError,K=i.TypeError,Q=i.QObject,J=A.f,$=_.f,Z=k.f,tt=S.f,et=o([].push),rt=P("symbols"),nt=P("op-symbols"),it=P("wks"),at=!Q||!Q[H]||!Q[H].findChild,ot=function(t,e,r){var n=J(V,e);n&&delete V[e],$(t,e,r),n&&t!==V&&$(V,e,n)},st=u&&l((function(){return 7!==m($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?ot:$,ut=function(t,e){var r=rt[t]=m(Y);return U(r,{type:G,tag:t,description:e}),u||(r.description=e),r},ct=function(t,e,r){t===V&&ct(nt,e,r),d(t);var n=p(e);return d(r),h(rt,n)?(r.enumerable?(h(t,B)&&t[B][n]&&(t[B][n]=!1),r=m(r,{enumerable:g(0,!1)})):(h(t,B)||$(t,B,g(1,m(null))),t[B][n]=!0),st(t,n,r)):$(t,n,r)},lt=function(t,e){d(t);var r=v(e),n=b(r).concat(vt(r));return W(n,(function(e){u&&!a(ht,r,e)||ct(t,e,r[e])})),t},ht=function(t){var e=p(t),r=a(tt,this,e);return!(this===V&&h(rt,e)&&!h(nt,e))&&(!(r||!h(this,e)||!h(rt,e)||h(this,B)&&this[B][e])||r)},ft=function(t,e){var r=v(t),n=p(e);if(r!==V||!h(rt,n)||h(nt,n)){var i=J(r,n);return!i||!h(rt,n)||h(r,B)&&r[B][n]||(i.enumerable=!0),i}},dt=function(t){var e=Z(v(t)),r=[];return W(e,(function(t){h(rt,t)||h(M,t)||et(r,t)})),r},vt=function(t){var e=t===V,r=Z(e?nt:v(t)),n=[];return W(r,(function(t){!h(rt,t)||e&&!h(V,t)||et(n,rt[t])})),n};c||(O(Y=(q=function(){if(f(Y,this))throw new K("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,e=C(t),r=function(t){var n=void 0===this?i:this;n===V&&a(r,nt,t),h(n,B)&&h(n[B],e)&&(n[B][e]=!1);var o=g(1,t);try{st(n,e,o)}catch(t){if(!(t instanceof X))throw t;ot(n,e,o)}};return u&&at&&st(V,e,{configurable:!0,set:r}),ut(e,t)})[H],"toString",(function(){return z(this).tag})),O(q,"withoutSetter",(function(t){return ut(C(t),t)})),S.f=ht,_.f=ct,E.f=lt,A.f=ft,w.f=k.f=dt,x.f=vt,I.f=function(t){return ut(j(t),t)},u&&(T(Y,"description",{configurable:!0,get:function(){return z(this).description}}),s||O(V,"propertyIsEnumerable",ht,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:q}),W(b(it),(function(t){R(t)})),n({target:G,stat:!0,forced:!c},{useSetter:function(){at=!0},useSimple:function(){at=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?m(t):lt(m(t),e)},defineProperty:ct,defineProperties:lt,getOwnPropertyDescriptor:ft}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:dt}),F(),D(q,G),M[B]=!0},4551:(t,e,r)=>{var n=r(5366),i=r(2444),a=r(4032),o=r(2608),s=r(9649),u=r(3749),c=r(6921),l=r(687),h=r(8986),f=r(2924),d=a.Symbol,v=d&&d.prototype;if(i&&u(d)&&(!("description"in v)||void 0!==d().description)){var p={},y=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=c(v,this)?new d(t):void 0===t?d():d(t);return""===t&&(p[e]=!0),e};f(y,d),y.prototype=v,v.constructor=y;var g="Symbol(description detection)"===String(d("description detection")),m=o(v.valueOf),b=o(v.toString),w=/^Symbol\\((.*)\\)[^)]+$/,k=o("".replace),x=o("".slice);h(v,"description",{configurable:!0,get:function(){var t=m(this);if(s(p,t))return"";var e=b(t),r=g?x(e,7,-1):k(e,w,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:y})}},4182:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(9649),o=r(687),s=r(4593),u=r(8592),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=o(t);if(a(c,e))return c[e];var r=i("Symbol")(e);return c[e]=r,l[r]=e,r}})},7651:(t,e,r)=>{r(2873),r(4182),r(7876),r(9750),r(1309)},7876:(t,e,r)=>{var n=r(5366),i=r(9649),a=r(2277),o=r(8055),s=r(4593),u=r(8592),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!a(t))throw new TypeError(o(t)+" is not a symbol");if(i(c,t))return c[t]}})},5268:(t,e,r)=>{var n=r(5343),i=r(3042);n("toPrimitive"),i()},5997:(t,e,r)=>{var n=r(8711),i=r(5343),a=r(6911);i("toStringTag"),a(n("Symbol"),"Symbol")},3740:(t,e,r)=>{var n=r(4356),i=r(7878),a=r(1211),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",(function(t){var e=o(this),r=i(e),n=a(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}))},6542:(t,e,r)=>{var n=r(2608),i=r(4356),a=n(r(6677)),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,e){return a(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},5738:(t,e,r)=>{var n=r(4356),i=r(5645).every,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},2900:(t,e,r)=>{var n=r(4356),i=r(9557),a=r(1198),o=r(1179),s=r(3453),u=r(2608),c=r(3455),l=n.aTypedArray,h=n.exportTypedArrayMethod,f=u("".slice);h("fill",(function(t){var e=arguments.length;l(this);var r="Big"===f(o(this),0,3)?a(t):+t;return s(i,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},2051:(t,e,r)=>{var n=r(4356),i=r(5645).filter,a=r(85),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}))},4211:(t,e,r)=>{var n=r(4356),i=r(5645).findIndex,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},5294:(t,e,r)=>{var n=r(4356),i=r(767).findLastIndex,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},9791:(t,e,r)=>{var n=r(4356),i=r(767).findLast,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},3198:(t,e,r)=>{var n=r(4356),i=r(5645).find,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},4306:(t,e,r)=>{r(8975)("Float32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},6473:(t,e,r)=>{r(8975)("Float64",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},1526:(t,e,r)=>{var n=r(4356),i=r(5645).forEach,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(t){i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},6032:(t,e,r)=>{var n=r(4356),i=r(7921).includes,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},3659:(t,e,r)=>{var n=r(4356),i=r(7921).indexOf,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},1237:(t,e,r)=>{r(8975)("Int32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},932:(t,e,r)=>{var n=r(4032),i=r(3455),a=r(2608),o=r(4356),s=r(9024),u=r(5811)("iterator"),c=n.Uint8Array,l=a(s.values),h=a(s.keys),f=a(s.entries),d=o.aTypedArray,v=o.exportTypedArrayMethod,p=c&&c.prototype,y=!i((function(){p[u].call([1])})),g=!!p&&p.values&&p[u]===p.values&&"values"===p.values.name,m=function(){return l(d(this))};v("entries",(function(){return f(d(this))}),y),v("keys",(function(){return h(d(this))}),y),v("values",m,y||!g,{name:"values"}),v(u,m,y||!g,{name:"values"})},8553:(t,e,r)=>{var n=r(4356),i=r(2608),a=n.aTypedArray,o=n.exportTypedArrayMethod,s=i([].join);o("join",(function(t){return s(a(this),t)}))},7612:(t,e,r)=>{var n=r(4356),i=r(3881),a=r(3499),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return i(a,o(this),e>1?[t,arguments[1]]:[t])}))},8579:(t,e,r)=>{var n=r(4356),i=r(5645).map,a=r(580),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(t))(e)}))}))},7576:(t,e,r)=>{var n=r(4356),i=r(4734).right,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return i(a(this),t,e,e>1?arguments[1]:void 0)}))},7719:(t,e,r)=>{var n=r(4356),i=r(4734).left,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return i(a(this),t,e,e>1?arguments[1]:void 0)}))},2891:(t,e,r)=>{var n=r(4356),i=n.aTypedArray,a=n.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var t,e=this,r=i(e).length,n=o(r/2),a=0;a{var n=r(4032),i=r(3453),a=r(4356),o=r(7878),s=r(8402),u=r(4165),c=r(3455),l=n.RangeError,h=n.Int8Array,f=h&&h.prototype,d=f&&f.set,v=a.aTypedArray,p=a.exportTypedArrayMethod,y=!c((function(){var t=new Uint8ClampedArray(2);return i(d,t,{length:1,0:3},1),3!==t[1]})),g=y&&a.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));p("set",(function(t){v(this);var e=s(arguments.length>1?arguments[1]:void 0,1),r=u(t);if(y)return i(d,this,r,e);var n=this.length,a=o(r),c=0;if(a+e>n)throw new l("Wrong length");for(;c{var n=r(4356),i=r(580),a=r(3455),o=r(4224),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(t,e){for(var r=o(s(this),t,e),n=i(this),a=0,u=r.length,c=new n(u);u>a;)c[a]=r[a++];return c}),a((function(){new Int8Array(1).slice()})))},9637:(t,e,r)=>{var n=r(4356),i=r(5645).some,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},2709:(t,e,r)=>{var n=r(4032),i=r(2116),a=r(3455),o=r(4186),s=r(5272),u=r(4356),c=r(7085),l=r(5123),h=r(6415),f=r(1911),d=u.aTypedArray,v=u.exportTypedArrayMethod,p=n.Uint16Array,y=p&&i(p.prototype.sort),g=!(!y||a((function(){y(new p(2),null)}))&&a((function(){y(new p(2),{})}))),m=!!y&&!a((function(){if(h)return h<74;if(c)return c<67;if(l)return!0;if(f)return f<602;var t,e,r=new p(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(y(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));v("sort",(function(t){return void 0!==t&&o(t),m?y(this,t):s(d(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!m||g)},8941:(t,e,r)=>{var n=r(4032),i=r(3881),a=r(4356),o=r(3455),s=r(4224),u=n.Int8Array,c=a.aTypedArray,l=a.exportTypedArrayMethod,h=[].toLocaleString,f=!!u&&o((function(){h.call(new u(1))}));l("toLocaleString",(function(){return i(h,f?s(c(this)):c(this),s(arguments))}),o((function(){return[1,2].toLocaleString()!==new u([1,2]).toLocaleString()}))||!o((function(){u.prototype.toLocaleString.call([1,2])})))},1579:(t,e,r)=>{var n=r(6444),i=r(4356),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;o("toReversed",(function(){return n(a(this),s(this))}))},6236:(t,e,r)=>{var n=r(4356),i=r(2608),a=r(4186),o=r(7434),s=n.aTypedArray,u=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,l=i(n.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),r=o(u(e),e);return l(r,t)}))},7716:(t,e,r)=>{var n=r(4356).exportTypedArrayMethod,i=r(3455),a=r(4032),o=r(2608),s=a.Uint8Array,u=s&&s.prototype||{},c=[].toString,l=o([].join);i((function(){c.call({})}))&&(c=function(){return l(this)});var h=u.toString!==c;n("toString",c,h)},2044:(t,e,r)=>{r(8975)("Uint32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},7329:(t,e,r)=>{r(8975)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},1913:(t,e,r)=>{var n=r(920),i=r(4356),a=r(5415),o=r(1211),s=r(1198),u=i.aTypedArray,c=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var r=u(this),i=o(t),l=a(r)?s(e):+e;return n(r,c(r),i,l)}}.with,!h)},6722:(t,e,r)=>{var n,i=r(568),a=r(4032),o=r(2608),s=r(4183),u=r(5227),c=r(9556),l=r(8153),h=r(2674),f=r(8301).enforce,d=r(3455),v=r(6206),p=Object,y=Array.isArray,g=p.isExtensible,m=p.isFrozen,b=p.isSealed,w=p.freeze,k=p.seal,x=!a.ActiveXObject&&"ActiveXObject"in a,A=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},_=c("WeakMap",A,l),E=_.prototype,S=o(E.set);if(v)if(x){n=l.getConstructor(A,"WeakMap",!0),u.enable();var O=o(E.delete),T=o(E.has),P=o(E.get);s(E,{delete:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),O(this,t)||e.frozen.delete(t)}return O(this,t)},has:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),T(this,t)||e.frozen.has(t)}return T(this,t)},get:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),T(this,t)?P(this,t):e.frozen.get(t)}return P(this,t)},set:function(t,e){if(h(t)&&!g(t)){var r=f(this);r.frozen||(r.frozen=new n),T(this,t)?S(this,t,e):r.frozen.set(t,e)}else S(this,t,e);return this}})}else i&&d((function(){var t=w([]);return S(new _,t,1),!m(t)}))&&s(E,{set:function(t,e){var r;return y(t)&&(m(t)?r=w:b(t)&&(r=k)),S(this,t,e),r&&r(t),this}})},8492:(t,e,r)=>{r(6722)},1176:(t,e,r)=>{r(9556)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(8153))},7121:(t,e,r)=>{r(1176)},4192:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(3399),o=r(7447),s=r(3749),u=r(2611),c=r(8986),l=r(3552),h=r(3455),f=r(9649),d=r(5811),v=r(2857).IteratorPrototype,p=r(2444),y=r(8507),g="constructor",m="Iterator",b=d("toStringTag"),w=TypeError,k=i[m],x=y||!s(k)||k.prototype!==v||!h((function(){k({})})),A=function(){if(a(this,v),u(this)===v)throw new w("Abstract class Iterator not directly constructable")},_=function(t,e){p?c(v,t,{configurable:!0,get:function(){return e},set:function(e){if(o(this),this===v)throw new w("You can't redefine this property");f(this,t)?this[t]=e:l(this,t,e)}}):v[t]=e};f(v,b)||_(b,m),!x&&f(v,g)&&v[g]!==Object||_(g,A),A.prototype=v,n({global:!0,constructor:!0,forced:x},{Iterator:A})},7895:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(7447),o=r(3447),s=r(821),u=r(5590),c=r(2342),l=r(8507),h=c((function(){for(var t,e=this.iterator,r=this.next;this.remaining;)if(this.remaining--,t=a(i(r,e)),this.done=!!t.done)return;if(t=a(i(r,e)),!(this.done=!!t.done))return t.value}));n({target:"Iterator",proto:!0,real:!0,forced:l},{drop:function(t){a(this);var e=u(s(+t));return new h(o(this),{remaining:e})}})},463:(t,e,r)=>{var n=r(5366),i=r(1804),a=r(4186),o=r(7447),s=r(3447);n({target:"Iterator",proto:!0,real:!0},{every:function(t){o(this),a(t);var e=s(this),r=0;return!i(e,(function(e,n){if(!t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},8856:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(7447),s=r(3447),u=r(2342),c=r(3535),l=r(8507),h=u((function(){for(var t,e,r=this.iterator,n=this.predicate,a=this.next;;){if(t=o(i(a,r)),this.done=!!t.done)return;if(e=t.value,c(r,n,[e,this.counter++],!0))return e}}));n({target:"Iterator",proto:!0,real:!0,forced:l},{filter:function(t){return o(this),a(t),new h(s(this),{predicate:t})}})},9166:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(7447),s=r(3447),u=r(1750),c=r(2342),l=r(5235),h=r(8507),f=c((function(){for(var t,e,r=this.iterator,n=this.mapper;;){if(e=this.inner)try{if(!(t=o(i(e.next,e.iterator))).done)return t.value;this.inner=null}catch(t){l(r,"throw",t)}if(t=o(i(this.next,r)),this.done=!!t.done)return;try{this.inner=u(n(t.value,this.counter++),!1)}catch(t){l(r,"throw",t)}}}));n({target:"Iterator",proto:!0,real:!0,forced:h},{flatMap:function(t){return o(this),a(t),new f(s(this),{mapper:t,inner:null})}})},1565:(t,e,r)=>{var n=r(5366),i=r(1804),a=r(4186),o=r(7447),s=r(3447);n({target:"Iterator",proto:!0,real:!0},{forEach:function(t){o(this),a(t);var e=s(this),r=0;i(e,(function(e){t(e,r++)}),{IS_RECORD:!0})}})},5342:(t,e,r)=>{var n=r(5366),i=r(4009);n({target:"Iterator",proto:!0,real:!0,forced:r(8507)},{map:i})},9582:(t,e,r)=>{var n=r(5366),i=r(1804),a=r(4186),o=r(7447),s=r(3447);n({target:"Iterator",proto:!0,real:!0},{some:function(t){o(this),a(t);var e=s(this),r=0;return i(e,(function(e,n){if(t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},31:(t,e,r)=>{var n=r(5366),i=r(2444),a=r(4032),o=r(8711),s=r(2608),u=r(3453),c=r(3749),l=r(2674),h=r(5448),f=r(9649),d=r(687),v=r(7878),p=r(3552),y=r(3455),g=r(1448),m=r(6943),b=a.JSON,w=a.Number,k=a.SyntaxError,x=b&&b.parse,A=o("Object","keys"),_=Object.getOwnPropertyDescriptor,E=s("".charAt),S=s("".slice),O=s(/./.exec),T=s([].push),P=/^\\d$/,L=/^[1-9]$/,M=/^[\\d-]$/,C=/^[\\t\\n\\r ]$/,j=function(t,e,r,n){var i,a,o,s,c,d=t[e],p=n&&d===n.value,y=p&&"string"==typeof n.source?{source:n.source}:{};if(l(d)){var g=h(d),m=p?n.nodes:g?[]:{};if(g)for(i=m.length,o=v(d),s=0;s{var n=r(5366),i=r(4032),a=r(8711),o=r(2608),s=r(3453),u=r(3455),c=r(687),l=r(7900),h=r(2996).c2i,f=/[^\\d+/a-z]/i,d=/[\\t\\n\\f\\r ]+/g,v=/[=]{1,2}$/,p=a("atob"),y=String.fromCharCode,g=o("".charAt),m=o("".replace),b=o(f.exec),w=!!p&&!u((function(){return"hi"!==p("aGk=")})),k=w&&u((function(){return""!==p(" ")})),x=w&&!u((function(){p("a")})),A=w&&!u((function(){p()})),_=w&&1!==p.length;n({global:!0,bind:!0,enumerable:!0,forced:!w||k||x||A||_},{atob:function(t){if(l(arguments.length,1),w&&!k&&!x)return s(p,i,t);var e,r,n,o=m(c(t),d,""),u="",A=0,_=0;if(o.length%4==0&&(o=m(o,v,"")),(e=o.length)%4==1||b(f,o))throw new(a("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;A>(-2*_&6)));return u}})},8316:(t,e,r)=>{var n=r(4032),i=r(2760),a=r(4784),o=r(3147),s=r(139),u=function(t){if(t&&t.forEach!==o)try{s(t,"forEach",o)}catch(e){t.forEach=o}};for(var c in i)i[c]&&u(n[c]&&n[c].prototype);u(a)},3577:(t,e,r)=>{var n=r(4032),i=r(2760),a=r(4784),o=r(9024),s=r(139),u=r(6911),c=r(5811)("iterator"),l=o.values,h=function(t,e){if(t){if(t[c]!==l)try{s(t,c,l)}catch(e){t[c]=l}if(u(t,e,!0),i[e])for(var r in o)if(t[r]!==o[r])try{s(t,r,o[r])}catch(e){t[r]=o[r]}}};for(var f in i)h(n[f]&&n[f].prototype,f);h(a,"DOMTokenList")},4967:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(9685),o=r(3455),s=r(5304),u=r(4004),c=r(1601).f,l=r(8552),h=r(8986),f=r(9649),d=r(3399),v=r(7447),p=r(2912),y=r(8363),g=r(4090),m=r(3633),b=r(8301),w=r(2444),k=r(8507),x="DOMException",A="DATA_CLONE_ERR",_=i("Error"),E=i(x)||function(){try{(new(i("MessageChannel")||a("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name===A&&25===t.code)return t.constructor}}(),S=E&&E.prototype,O=_.prototype,T=b.set,P=b.getterFor(x),L="stack"in new _(x),M=function(t){return f(g,t)&&g[t].m?g[t].c:0},C=function(){d(this,j);var t=arguments.length,e=y(t<1?void 0:arguments[0]),r=y(t<2?void 0:arguments[1],"Error"),n=M(r);if(T(this,{type:x,name:r,message:e,code:n}),w||(this.name=r,this.message=e,this.code=n),L){var i=new _(e);i.name=x,c(this,"stack",u(1,m(i.stack,1)))}},j=C.prototype=s(O),I=function(t){return{enumerable:!0,configurable:!0,get:t}},R=function(t){return I((function(){return P(this)[t]}))};w&&(h(j,"code",R("code")),h(j,"message",R("message")),h(j,"name",R("name"))),c(j,"constructor",u(1,C));var F=o((function(){return!(new E instanceof _)})),D=F||o((function(){return O.toString!==p||"2: 1"!==String(new E(1,2))})),N=F||o((function(){return 25!==new E(1,"DataCloneError").code})),W=F||25!==E[A]||25!==S[A],B=k?D||N||W:F;n({global:!0,constructor:!0,forced:B},{DOMException:B?C:E});var G=i(x),H=G.prototype;for(var U in D&&(k||E===G)&&l(H,"toString",p),N&&w&&E===G&&h(H,"code",I((function(){return M(v(this).name)}))),g)if(f(g,U)){var z=g[U],V=z.s,q=u(6,z.c);f(G,V)||c(G,V,q),f(H,V)||c(H,V,q)}},6403:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(8711),o=r(4004),s=r(1601).f,u=r(9649),c=r(3399),l=r(3951),h=r(8363),f=r(4090),d=r(3633),v=r(2444),p=r(8507),y="DOMException",g=a("Error"),m=a(y),b=function(){c(this,w);var t=arguments.length,e=h(t<1?void 0:arguments[0]),r=h(t<2?void 0:arguments[1],"Error"),n=new m(e,r),i=new g(e);return i.name=y,s(n,"stack",o(1,d(i.stack,1))),l(n,this,b),n},w=b.prototype=m.prototype,k="stack"in new g(y),x="stack"in new m(1,2),A=m&&v&&Object.getOwnPropertyDescriptor(i,y),_=!(!A||A.writable&&A.configurable),E=k&&!_&&!x;n({global:!0,constructor:!0,forced:p||E},{DOMException:E?b:m});var S=a(y),O=S.prototype;if(O.constructor!==S)for(var T in p||s(O,"constructor",o(1,S)),f)if(u(f,T)){var P=f[T],L=P.s;u(S,L)||s(S,L,o(6,P.c))}},3355:(t,e,r)=>{var n=r(8711),i="DOMException";r(6911)(n(i),i)},9734:(t,e,r)=>{r(9024),r(2217);var n=r(5366),i=r(4032),a=r(5725),o=r(8711),s=r(3453),u=r(2608),c=r(2444),l=r(8200),h=r(8552),f=r(8986),d=r(4183),v=r(6911),p=r(282),y=r(8301),g=r(3399),m=r(3749),b=r(9649),w=r(4864),k=r(1179),x=r(7447),A=r(2674),_=r(687),E=r(5304),S=r(4004),O=r(6961),T=r(7507),P=r(9393),L=r(7900),M=r(5811),C=r(5272),j=M("iterator"),I="URLSearchParams",R=I+"Iterator",F=y.set,D=y.getterFor(I),N=y.getterFor(R),W=a("fetch"),B=a("Request"),G=a("Headers"),H=B&&B.prototype,U=G&&G.prototype,z=i.TypeError,V=i.encodeURIComponent,q=String.fromCharCode,Y=o("String","fromCodePoint"),X=parseInt,K=u("".charAt),Q=u([].join),J=u([].push),$=u("".replace),Z=u([].shift),tt=u([].splice),et=u("".split),rt=u("".slice),nt=u(/./.exec),it=/\\+/g,at=/^[0-9a-f]+$/i,ot=function(t,e){var r=rt(t,e,e+2);return nt(at,r)?X(r,16):NaN},st=function(t){for(var e=0,r=128;r>0&&0!=(t&r);r>>=1)e++;return e},ut=function(t){var e=null;switch(t.length){case 1:e=t[0];break;case 2:e=(31&t[0])<<6|63&t[1];break;case 3:e=(15&t[0])<<12|(63&t[1])<<6|63&t[2];break;case 4:e=(7&t[0])<<18|(63&t[1])<<12|(63&t[2])<<6|63&t[3]}return e>1114111?null:e},ct=function(t){for(var e=(t=$(t,it," ")).length,r="",n=0;ne){r+="%",n++;continue}var a=ot(t,n+1);if(a!=a){r+=i,n++;continue}n+=2;var o=st(a);if(0===o)i=q(a);else{if(1===o||o>4){r+="�",n++;continue}for(var s=[a],u=1;ue||"%"!==K(t,n));){var c=ot(t,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;J(s,c),n+=2,u++}if(s.length!==o){r+="�";continue}var l=ut(s);null===l?r+="�":i=Y(l)}}r+=i,n++}return r},lt=/[!'()~]|%20/g,ht={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ft=function(t){return ht[t]},dt=function(t){return $(V(t),lt,ft)},vt=p((function(t,e){F(this,{type:R,target:D(t).entries,index:0,kind:e})}),I,(function(){var t=N(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,P(void 0,!0);var n=e[r];switch(t.kind){case"keys":return P(n.key,!1);case"values":return P(n.value,!1)}return P([n.key,n.value],!1)}),!0),pt=function(t){this.entries=[],this.url=null,void 0!==t&&(A(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===K(t,0)?rt(t,1):t:_(t)))};pt.prototype={type:I,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,i,a,o,u,c=this.entries,l=T(t);if(l)for(r=(e=O(t,l)).next;!(n=s(r,e)).done;){if(a=(i=O(x(n.value))).next,(o=s(a,i)).done||(u=s(a,i)).done||!s(a,i).done)throw new z("Expected sequence with length 2");J(c,{key:_(o.value),value:_(u.value)})}else for(var h in t)b(t,h)&&J(c,{key:h,value:_(t[h])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,i=et(t,"&"),a=0;a0?arguments[0]:void 0));c||(this.size=t.entries.length)},gt=yt.prototype;if(d(gt,{append:function(t,e){var r=D(this);L(arguments.length,2),J(r.entries,{key:_(t),value:_(e)}),c||this.length++,r.updateURL()},delete:function(t){for(var e=D(this),r=L(arguments.length,1),n=e.entries,i=_(t),a=r<2?void 0:arguments[1],o=void 0===a?a:_(a),s=0;se.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=D(this).entries,n=w(t,arguments.length>1?arguments[1]:void 0),i=0;i1?wt(arguments[1]):{})}}),m(B)){var kt=function(t){return g(this,H),new B(t,arguments.length>1?wt(arguments[1]):{})};H.constructor=kt,kt.prototype=H,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:kt})}}t.exports={URLSearchParams:yt,getState:D}},1531:(t,e,r)=>{var n=r(8552),i=r(2608),a=r(687),o=r(7900),s=URLSearchParams,u=s.prototype,c=i(u.append),l=i(u.delete),h=i(u.forEach),f=i([].push),d=new s("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&n(u,"delete",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=[];h(this,(function(t,e){f(n,{key:e,value:t})})),o(e,1);for(var i,s=a(t),u=a(r),d=0,v=0,p=!1,y=n.length;d{var n=r(8552),i=r(2608),a=r(687),o=r(7900),s=URLSearchParams,u=s.prototype,c=i(u.getAll),l=i(u.has),h=new s("a=1");!h.has("a",2)&&h.has("a",void 0)||n(u,"has",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=c(this,t);o(e,1);for(var i=a(r),s=0;s{r(9734)},4145:(t,e,r)=>{var n=r(2444),i=r(2608),a=r(8986),o=URLSearchParams.prototype,s=i(o.forEach);n&&!("size"in o)&&a(o,"size",{get:function(){var t=0;return s(this,(function(){t++})),t},configurable:!0,enumerable:!0})},161:(t,e,r)=>{r(7460);var n,i=r(5366),a=r(2444),o=r(8200),s=r(4032),u=r(4864),c=r(2608),l=r(8552),h=r(8986),f=r(3399),d=r(9649),v=r(8069),p=r(3948),y=r(4224),g=r(6903).codeAt,m=r(5141),b=r(687),w=r(6911),k=r(7900),x=r(9734),A=r(8301),_=A.set,E=A.getterFor("URL"),S=x.URLSearchParams,O=x.getState,T=s.URL,P=s.TypeError,L=s.parseInt,M=Math.floor,C=Math.pow,j=c("".charAt),I=c(/./.exec),R=c([].join),F=c(1..toString),D=c([].pop),N=c([].push),W=c("".replace),B=c([].shift),G=c("".split),H=c("".slice),U=c("".toLowerCase),z=c([].unshift),V="Invalid scheme",q="Invalid host",Y="Invalid port",X=/[a-z]/i,K=/[\\d+-.a-z]/i,Q=/\\d/,J=/^0x/i,$=/^[0-7]+$/,Z=/^\\d+$/,tt=/^[\\da-f]+$/i,et=/[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/,rt=/[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/,nt=/^[\\u0000-\\u0020]+/,it=/(^|[^\\u0000-\\u0020])[\\u0000-\\u0020]+$/,at=/[\\t\\n\\r]/g,ot=function(t){var e,r,n,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)z(e,t%256),t=M(t/256);return R(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,i=0,a=0;a<8;a++)0!==t[a]?(i>r&&(e=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r?n:e}(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=F(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},st={},ut=v({},st,{" ":1,'"':1,"<":1,">":1,"\`":1}),ct=v({},ut,{"#":1,"?":1,"{":1,"}":1}),lt=v({},ct,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\\\":1,"]":1,"^":1,"|":1}),ht=function(t,e){var r=g(t,0);return r>32&&r<127&&!d(e,t)?t:encodeURIComponent(t)},ft={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var r;return 2===t.length&&I(X,j(t,0))&&(":"===(r=j(t,1))||!e&&"|"===r)},vt=function(t){var e;return t.length>1&&dt(H(t,0,2))&&(2===t.length||"/"===(e=j(t,2))||"\\\\"===e||"?"===e||"#"===e)},pt=function(t){return"."===t||"%2e"===U(t)},yt={},gt={},mt={},bt={},wt={},kt={},xt={},At={},_t={},Et={},St={},Ot={},Tt={},Pt={},Lt={},Mt={},Ct={},jt={},It={},Rt={},Ft={},Dt=function(t,e,r){var n,i,a,o=b(t);if(e){if(i=this.parse(o))throw new P(i);this.searchParams=null}else{if(void 0!==r&&(n=new Dt(r,!0)),i=this.parse(o,null,n))throw new P(i);(a=O(new S)).bindURL(this),this.searchParams=a}};Dt.prototype={type:"URL",parse:function(t,e,r){var i,a,o,s,u,c=this,l=e||yt,h=0,f="",v=!1,g=!1,m=!1;for(t=b(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=W(t,nt,""),t=W(t,it,"$1")),t=W(t,at,""),i=p(t);h<=i.length;){switch(a=i[h],l){case yt:if(!a||!I(X,a)){if(e)return V;l=mt;continue}f+=U(a),l=gt;break;case gt:if(a&&(I(K,a)||"+"===a||"-"===a||"."===a))f+=U(a);else{if(":"!==a){if(e)return V;f="",l=mt,h=0;continue}if(e&&(c.isSpecial()!==d(ft,f)||"file"===f&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=f,e)return void(c.isSpecial()&&ft[c.scheme]===c.port&&(c.port=null));f="","file"===c.scheme?l=Pt:c.isSpecial()&&r&&r.scheme===c.scheme?l=bt:c.isSpecial()?l=At:"/"===i[h+1]?(l=wt,h++):(c.cannotBeABaseURL=!0,N(c.path,""),l=It)}break;case mt:if(!r||r.cannotBeABaseURL&&"#"!==a)return V;if(r.cannotBeABaseURL&&"#"===a){c.scheme=r.scheme,c.path=y(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,l=Ft;break}l="file"===r.scheme?Pt:kt;continue;case bt:if("/"!==a||"/"!==i[h+1]){l=kt;continue}l=_t,h++;break;case wt:if("/"===a){l=Et;break}l=jt;continue;case kt:if(c.scheme=r.scheme,a===n)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=y(r.path),c.query=r.query;else if("/"===a||"\\\\"===a&&c.isSpecial())l=xt;else if("?"===a)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=y(r.path),c.query="",l=Rt;else{if("#"!==a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=y(r.path),c.path.length--,l=jt;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=y(r.path),c.query=r.query,c.fragment="",l=Ft}break;case xt:if(!c.isSpecial()||"/"!==a&&"\\\\"!==a){if("/"!==a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,l=jt;continue}l=Et}else l=_t;break;case At:if(l=_t,"/"!==a||"/"!==j(f,h+1))continue;h++;break;case _t:if("/"!==a&&"\\\\"!==a){l=Et;continue}break;case Et:if("@"===a){v&&(f="%40"+f),v=!0,o=p(f);for(var w=0;w65535)return Y;c.port=c.isSpecial()&&A===ft[c.scheme]?null:A,f=""}if(e)return;l=Ct;continue}return Y}f+=a;break;case Pt:if(c.scheme="file","/"===a||"\\\\"===a)l=Lt;else{if(!r||"file"!==r.scheme){l=jt;continue}switch(a){case n:c.host=r.host,c.path=y(r.path),c.query=r.query;break;case"?":c.host=r.host,c.path=y(r.path),c.query="",l=Rt;break;case"#":c.host=r.host,c.path=y(r.path),c.query=r.query,c.fragment="",l=Ft;break;default:vt(R(y(i,h),""))||(c.host=r.host,c.path=y(r.path),c.shortenPath()),l=jt;continue}}break;case Lt:if("/"===a||"\\\\"===a){l=Mt;break}r&&"file"===r.scheme&&!vt(R(y(i,h),""))&&(dt(r.path[0],!0)?N(c.path,r.path[0]):c.host=r.host),l=jt;continue;case Mt:if(a===n||"/"===a||"\\\\"===a||"?"===a||"#"===a){if(!e&&dt(f))l=jt;else if(""===f){if(c.host="",e)return;l=Ct}else{if(s=c.parseHost(f))return s;if("localhost"===c.host&&(c.host=""),e)return;f="",l=Ct}continue}f+=a;break;case Ct:if(c.isSpecial()){if(l=jt,"/"!==a&&"\\\\"!==a)continue}else if(e||"?"!==a)if(e||"#"!==a){if(a!==n&&(l=jt,"/"!==a))continue}else c.fragment="",l=Ft;else c.query="",l=Rt;break;case jt:if(a===n||"/"===a||"\\\\"===a&&c.isSpecial()||!e&&("?"===a||"#"===a)){if(".."===(u=U(u=f))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"===a||"\\\\"===a&&c.isSpecial()||N(c.path,"")):pt(f)?"/"===a||"\\\\"===a&&c.isSpecial()||N(c.path,""):("file"===c.scheme&&!c.path.length&&dt(f)&&(c.host&&(c.host=""),f=j(f,0)+":"),N(c.path,f)),f="","file"===c.scheme&&(a===n||"?"===a||"#"===a))for(;c.path.length>1&&""===c.path[0];)B(c.path);"?"===a?(c.query="",l=Rt):"#"===a&&(c.fragment="",l=Ft)}else f+=ht(a,ct);break;case It:"?"===a?(c.query="",l=Rt):"#"===a?(c.fragment="",l=Ft):a!==n&&(c.path[0]+=ht(a,st));break;case Rt:e||"#"!==a?a!==n&&("'"===a&&c.isSpecial()?c.query+="%27":c.query+="#"===a?"%23":ht(a,st)):(c.fragment="",l=Ft);break;case Ft:a!==n&&(c.fragment+=ht(a,ut))}h++}},parseHost:function(t){var e,r,n;if("["===j(t,0)){if("]"!==j(t,t.length-1))return q;if(e=function(t){var e,r,n,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,f=function(){return j(t,h)};if(":"===f()){if(":"!==j(t,1))return;h+=2,l=++c}for(;f();){if(8===c)return;if(":"!==f()){for(e=r=0;r<4&&I(tt,f());)e=16*e+L(f(),16),h++,r++;if("."===f()){if(0===r)return;if(h-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."===f()&&n<4))return;h++}if(!I(Q,f()))return;for(;I(Q,f());){if(a=L(f(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;u[c++]=e}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(o=c-l,c=7;0!==c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!==c)return;return u}(H(t,1,-1)),!e)return q;this.host=e}else if(this.isSpecial()){if(t=m(t),I(et,t))return q;if(e=function(t){var e,r,n,i,a,o,s,u=G(t,".");if(u.length&&""===u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(r=[],n=0;n1&&"0"===j(i,0)&&(a=I(J,i)?16:8,i=H(i,8===a?1:2)),""===i)o=0;else{if(!I(10===a?Z:8===a?$:tt,i))return t;o=L(i,a)}N(r,o)}for(n=0;n=C(256,5-e))return null}else if(o>255)return null;for(s=D(r),n=0;n1?arguments[1]:void 0,n=_(e,new Dt(t,!1,r));a||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Wt=Nt.prototype,Bt=function(t,e){return{get:function(){return E(this)[t]()},set:e&&function(t){return E(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&(h(Wt,"href",Bt("serialize","setHref")),h(Wt,"origin",Bt("getOrigin")),h(Wt,"protocol",Bt("getProtocol","setProtocol")),h(Wt,"username",Bt("getUsername","setUsername")),h(Wt,"password",Bt("getPassword","setPassword")),h(Wt,"host",Bt("getHost","setHost")),h(Wt,"hostname",Bt("getHostname","setHostname")),h(Wt,"port",Bt("getPort","setPort")),h(Wt,"pathname",Bt("getPathname","setPathname")),h(Wt,"search",Bt("getSearch","setSearch")),h(Wt,"searchParams",Bt("getSearchParams")),h(Wt,"hash",Bt("getHash","setHash"))),l(Wt,"toJSON",(function(){return E(this).serialize()}),{enumerable:!0}),l(Wt,"toString",(function(){return E(this).serialize()}),{enumerable:!0}),T){var Gt=T.createObjectURL,Ht=T.revokeObjectURL;Gt&&l(Nt,"createObjectURL",u(Gt,T)),Ht&&l(Nt,"revokeObjectURL",u(Ht,T))}w(Nt,"URL"),i({global:!0,constructor:!0,forced:!o,sham:!a},{URL:Nt})},5728:(t,e,r)=>{r(161)},4136:(t,e,r)=>{var n=r(5366),i=r(3453);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n,i=globalThis.pdfjsLib={};function a(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rY,AnnotationEditorLayer:()=>Ak,AnnotationEditorParamsType:()=>_,AnnotationEditorType:()=>A,AnnotationEditorUIManager:()=>Kn,AnnotationLayer:()=>np,AnnotationMode:()=>x,CMapCompressionType:()=>T,ColorPicker:()=>Tg,DOMSVGFactory:()=>me,DrawLayer:()=>Vk,FeatureTest:()=>J,GlobalWorkerOptions:()=>mu,ImageKind:()=>S,InvalidPDFException:()=>U,MissingPDFException:()=>z,OPS:()=>P,OutputScale:()=>Fe,PDFDataRangeTransport:()=>rf,PDFDateString:()=>Le,PDFWorker:()=>pf,PasswordResponses:()=>L,PermissionFlag:()=>E,PixelsPerInch:()=>Vt,RenderingCancelledException:()=>we,TextLayer:()=>uh,UnexpectedResponseException:()=>V,Util:()=>Z,VerbosityLevel:()=>O,XfaLayer:()=>td,build:()=>Bf,createValidAbsoluteUrl:()=>N,fetchData:()=>ve,getDocument:()=>$h,getFilenameFromUrl:()=>Ae,getPdfFilenameFromUrl:()=>_e,getXfaPageViewport:()=>Me,isDataScheme:()=>ke,isPdfFile:()=>xe,noContextMenu:()=>Te,normalizeUnicode:()=>it,setLayerDimensions:()=>Re,shadow:()=>W,version:()=>Wf}),r(8169),r(7651),r(4551),r(5268),r(184),r(3234),r(6746),r(8551),r(9024),r(9138),r(750),r(5015),r(6209),r(9261),r(3700),r(3632),r(7316),r(1425),r(3379),r(489),r(2823),r(5594),r(8397),r(2467),r(1281),r(9484),r(4672),r(6794),r(9264),r(7329),r(2044),r(3740),r(6542),r(5738),r(2900),r(2051),r(3198),r(4211),r(9791),r(5294),r(1526),r(6032),r(3659),r(932),r(8553),r(7612),r(8579),r(7719),r(7576),r(2891),r(2605),r(4863),r(9637),r(2709),r(8941),r(1579),r(6236),r(7716),r(1913),r(3577),r(5728),r(4136),r(4520),r(1531),r(3678),r(4145);var m=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),b=[1,0,0,1,0,0],w=[.001,0,0,.001,0,0],k=1.35,x={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},A={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},_={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},E={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},S={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},O={ERRORS:0,WARNINGS:1,INFOS:5},T={NONE:0,BINARY:1},P={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},L={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},M=O.WARNINGS;function C(t){Number.isInteger(t)&&(M=t)}function j(){return M}function I(t){M>=O.INFOS&&console.log("Info: ".concat(t))}function R(t){M>=O.WARNINGS&&console.log("Warning: ".concat(t))}function F(t){throw new Error(t)}function D(t,e){t||F(e)}function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(r&&"string"==typeof t){if(r.addDefaultProtocol&&t.startsWith("www.")){var n=t.match(/\\./g);(null==n?void 0:n.length)>=2&&(t="http://".concat(t))}if(r.tryConvertEncoding)try{t=decodeURIComponent(escape(t))}catch(t){}}var i=e?new URL(t,e):new URL(t);if(function(t){switch(null==t?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch(t){}return null}function W(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!0,writable:!1}),r}var B=function(){function t(t,e){this.message=t,this.name=e}return t.prototype=new Error,t.constructor=t,t}(),G=function(t){function e(t,r){var n;return f(this,e),(n=d(this,e,[t,"PasswordException"])).code=r,n}return y(e,B),l(e)}(),H=function(t){function e(t,r){var n;return f(this,e),(n=d(this,e,[t,"UnknownErrorException"])).details=r,n}return y(e,B),l(e)}(),U=function(t){function e(t){return f(this,e),d(this,e,[t,"InvalidPDFException"])}return y(e,B),l(e)}(),z=function(t){function e(t){return f(this,e),d(this,e,[t,"MissingPDFException"])}return y(e,B),l(e)}(),V=function(t){function e(t,r){var n;return f(this,e),(n=d(this,e,[t,"UnexpectedResponseException"])).status=r,n}return y(e,B),l(e)}(),q=function(t){function e(t){return f(this,e),d(this,e,[t,"FormatError"])}return y(e,B),l(e)}(),Y=function(t){function e(t){return f(this,e),d(this,e,[t,"AbortException"])}return y(e,B),l(e)}();function X(t){"object"==typeof t&&void 0!==(null==t?void 0:t.length)||F("Invalid argument for bytesToString");var e=t.length,r=8192;if(e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}(t);try{for(n.s();!(e=n.n()).done;){var i=o(e.value,2),a=i[0],u=i[1];r[a]=u}}catch(t){n.e(t)}finally{n.f()}return r}var J=function(){return l((function t(){f(this,t)}),null,[{key:"isLittleEndian",get:function(){return W(this,"isLittleEndian",((t=new Uint8Array(4))[0]=1,1===new Uint32Array(t.buffer,0,1)[0]));var t}},{key:"isEvalSupported",get:function(){return W(this,"isEvalSupported",function(){try{return new Function(""),!0}catch(t){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function(){return W(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function(){var t,e;return"undefined"!=typeof navigator&&"string"==typeof(null===(t=navigator)||void 0===t?void 0:t.platform)?W(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:"string"==typeof(null===(e=navigator)||void 0===e?void 0:e.userAgent)&&navigator.userAgent.includes("Firefox")}):W(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}},{key:"isCSSRoundSupported",get:function(){var t,e;return W(this,"isCSSRoundSupported",null===(t=globalThis.CSS)||void 0===t||null===(e=t.supports)||void 0===e?void 0:e.call(t,"width: round(1.5px, 1px)"))}}])}(),$=Array.from(Array(256).keys(),(function(t){return t.toString(16).padStart(2,"0")})),Z=function(){function t(){f(this,t)}return l(t,null,[{key:"makeHexColor",value:function(t,e,r){return"#".concat($[t]).concat($[e]).concat($[r])}},{key:"scaleMinMax",value:function(t,e){var r;t[0]?(t[0]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[3],e[3]*=t[3]):(r=e[0],e[0]=e[1],e[1]=r,r=e[2],e[2]=e[3],e[3]=r,t[1]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}},{key:"transform",value:function(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}},{key:"applyTransform",value:function(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}},{key:"applyInverseTransform",value:function(t,e){var r=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/r,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,e){var r=this.applyTransform(t,e),n=this.applyTransform(t.slice(2,4),e),i=this.applyTransform([t[0],t[3]],e),a=this.applyTransform([t[2],t[1]],e);return[Math.min(r[0],n[0],i[0],a[0]),Math.min(r[1],n[1],i[1],a[1]),Math.max(r[0],n[0],i[0],a[0]),Math.max(r[1],n[1],i[1],a[1])]}},{key:"inverseTransform",value:function(t){var e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}},{key:"singularValueDecompose2dScale",value:function(t){var e=[t[0],t[2],t[1],t[3]],r=t[0]*e[0]+t[1]*e[2],n=t[0]*e[1]+t[1]*e[3],i=t[2]*e[0]+t[3]*e[2],a=t[2]*e[1]+t[3]*e[3],o=(r+a)/2,s=Math.sqrt(Math.pow(r+a,2)-4*(r*a-i*n))/2,u=o+s||1,c=o-s||1;return[Math.sqrt(u),Math.sqrt(c)]}},{key:"normalizeRect",value:function(t){var e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}},{key:"intersect",value:function(t,e){var r=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),n=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(r>n)return null;var i=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return i>a?null:[r,i,n,a]}},{key:"bezierBoundingBox",value:function(e,r,n,i,o,s,u,c,l){return l?(l[0]=Math.min(l[0],e,u),l[1]=Math.min(l[1],r,c),l[2]=Math.max(l[2],e,u),l[3]=Math.max(l[3],r,c)):l=[Math.min(e,u),Math.min(r,c),Math.max(e,u),Math.max(r,c)],a(t,this,et).call(this,e,n,o,u,r,i,s,c,3*(3*(n-o)-e+u),6*(e-2*n+o),3*(n-e),l),a(t,this,et).call(this,e,n,o,u,r,i,s,c,3*(3*(i-s)-r+c),6*(r-2*i+s),3*(i-r),l),l}}])}();function tt(t,e,r,n,i,a,o,s,u,c){if(!(u<=0||u>=1)){var l=1-u,h=u*u,f=h*u,d=l*(l*(l*t+3*u*e)+3*h*r)+f*n,v=l*(l*(l*i+3*u*a)+3*h*o)+f*s;c[0]=Math.min(c[0],d),c[1]=Math.min(c[1],v),c[2]=Math.max(c[2],d),c[3]=Math.max(c[3],v)}}function et(t,e,r,i,o,s,u,c,l,h,f,d){if(Math.abs(l)<1e-12)Math.abs(h)>=1e-12&&a(n,this,tt).call(this,t,e,r,i,o,s,u,c,-f/h,d);else{var v=Math.pow(h,2)-4*f*l;if(!(v<0)){var p=Math.sqrt(v),y=2*l;a(n,this,tt).call(this,t,e,r,i,o,s,u,c,(-h+p)/y,d),a(n,this,tt).call(this,t,e,r,i,o,s,u,c,(-h-p)/y,d)}}}n=Z;var rt=null,nt=null;function it(t){return rt||(rt=/([\\xA0\\xB5\\u037E\\u0EB3\\u2000-\\u200A\\u202F\\u2126\\uFB00-\\uFB04\\uFB06\\uFB20-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBA1\\uFBA4-\\uFBA9\\uFBAE-\\uFBB1\\uFBD3-\\uFBDC\\uFBDE-\\uFBE7\\uFBEA-\\uFBF8\\uFBFC\\uFBFD\\uFC00-\\uFC5D\\uFC64-\\uFCF1\\uFCF5-\\uFD3D\\uFD88\\uFDF4\\uFDFA\\uFDFB\\uFE71\\uFE77\\uFE79\\uFE7B\\uFE7D]+)|(\\uFB05+)/g,nt=new Map([["ſt","ſt"]])),t.replaceAll(rt,(function(t,e,r){return e?e.normalize("NFKC"):nt.get(r)}))}var at="pdfjs_internal_id_";function ot(){ot=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function st(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ut(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){st(a,n,i,o,s,"next",t)}function s(t){st(a,n,i,o,s,"throw",t)}o(void 0)}))}}function ct(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ht(t,e){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2];if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");var n=this._createSVG("svg:svg");return n.setAttribute("version","1.1"),r||(n.setAttribute("width","".concat(t,"px")),n.setAttribute("height","".concat(e,"px"))),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox","0 0 ".concat(t," ").concat(e)),n}},{key:"createElement",value:function(t){if("string"!=typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}},{key:"_createSVG",value:function(t){F("Abstract method \`_createSVG\` called.")}}])}();function kt(){kt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function xt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=St(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function At(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function _t(t){return function(t){if(Array.isArray(t))return Ot(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||St(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||St(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(t,e){if(t){if("string"==typeof t)return Ot(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ot(t,e):void 0}}function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]&&arguments[0]&&0!==Rt(Zt,this,re).size||(Ft(Xt,this)&&(Ft(Xt,this).parentNode.parentNode.remove(),Dt(Xt,this,null)),Ft(Yt,this)&&(Ft(Yt,this).clear(),Dt(Yt,this,null)),Dt($t,this,0))}}])}();function ee(t){return Ft(Yt,t)||Dt(Yt,t,new Map)}function re(t){return Ft(Jt,t)||Dt(Jt,t,new Map)}function ne(t){if(!Ft(Xt,t)){var e=Ft(Qt,t).createElement("div"),r=e.style;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;var n=Ft(Qt,t).createElementNS(zt,"svg");n.setAttribute("width",0),n.setAttribute("height",0),Dt(Xt,t,Ft(Qt,t).createElementNS(zt,"defs")),e.append(n),n.append(Ft(Xt,t)),Ft(Qt,t).body.append(e)}return Ft(Xt,t)}function ie(t){if(1===t.length){for(var e=t[0],r=new Array(256),n=0;n<256;n++)r[n]=e[n]/255;var i=r.join(",");return[i,i,i]}for(var a=Et(t,3),o=a[0],s=a[1],u=a[2],c=new Array(256),l=new Array(256),h=new Array(256),f=0;f<256;f++)c[f]=o[f]/255,l[f]=s[f]/255,h[f]=u[f]/255;return[c.join(","),l.join(","),h.join(",")]}function ae(t){if(void 0===Ft(qt,this)){Dt(qt,this,"");var e=Ft(Qt,this).URL;e!==Ft(Qt,this).baseURI&&(ke(e)?R('#createUrl: ignore "data:"-URL for performance reasons.'):Dt(qt,this,e.split("#",1)[0]))}return"url(".concat(Ft(qt,this),"#").concat(t,")")}function oe(t){var e=Ft(Qt,this).createElementNS(zt,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(e)}function se(t){var e=Ft(Qt,this).createElementNS(zt,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(e)}function ue(t){var e=Ft(Qt,this).createElementNS(zt,"filter");return e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("id",t),Rt(Zt,this,ne).append(e),e}function ce(t,e,r){var n=Ft(Qt,this).createElementNS(zt,e);n.setAttribute("type","discrete"),n.setAttribute("tableValues",r),t.append(n)}function le(t,e,r,n){var i=Ft(Qt,this).createElementNS(zt,"feComponentTransfer");n.append(i),Nt(Zt,this,ce).call(this,i,"feFuncR",t),Nt(Zt,this,ce).call(this,i,"feFuncG",e),Nt(Zt,this,ce).call(this,i,"feFuncB",r)}function he(t,e){var r=Ft(Qt,this).createElementNS(zt,"feComponentTransfer");e.append(r),Nt(Zt,this,ce).call(this,r,"feFuncA",t)}function fe(t){return Rt(Zt,this,ne).style.color=t,Ce(getComputedStyle(Rt(Zt,this,ne)).getPropertyValue("color"))}var de=function(t){function e(t){var r,n=t.ownerDocument,i=void 0===n?globalThis.document:n,a=t.enableHWA,o=void 0!==a&&a;return Gt(this,e),(r=Tt(this,e,[{enableHWA:o}]))._document=i,r}return Mt(e,gt),Bt(e,[{key:"_createCanvas",value:function(t,e){var r=this._document.createElement("canvas");return r.width=t,r.height=e,r}}])}();function ve(t){return pe.apply(this,arguments)}function pe(){var t;return t=kt().mark((function t(e){var r,n,i=arguments;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i.length>1&&void 0!==i[1]?i[1]:"text",!Oe(e,document.baseURI)){t.next=14;break}return t.next=4,fetch(e);case 4:if((n=t.sent).ok){t.next=7;break}throw new Error(n.statusText);case 7:t.t0=r,t.next="arraybuffer"===t.t0?10:"blob"===t.t0?11:"json"===t.t0?12:13;break;case 10:return t.abrupt("return",n.arrayBuffer());case 11:return t.abrupt("return",n.blob());case 12:return t.abrupt("return",n.json());case 13:return t.abrupt("return",n.text());case 14:return t.abrupt("return",new Promise((function(t,n){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType=r,i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE)if(200!==i.status&&0!==i.status)n(new Error(i.statusText));else{switch(r){case"arraybuffer":case"blob":case"json":return void t(i.response)}t(i.responseText)}},i.send(null)})));case 15:case"end":return t.stop()}}),t)})),pe=function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){At(a,n,i,o,s,"next",t)}function s(t){At(a,n,i,o,s,"throw",t)}o(void 0)}))},pe.apply(this,arguments)}var ye=function(t){function e(){return Gt(this,e),Tt(this,e,arguments)}return Mt(e,mt),Bt(e,[{key:"_fetchData",value:function(t,e){return ve(t,this.isCompressed?"arraybuffer":"text").then((function(t){return{cMapData:t instanceof ArrayBuffer?new Uint8Array(t):K(t),compressionType:e}}))}}])}(),ge=function(t){function e(){return Gt(this,e),Tt(this,e,arguments)}return Mt(e,bt),Bt(e,[{key:"_fetchData",value:function(t){return ve(t,"arraybuffer").then((function(t){return new Uint8Array(t)}))}}])}(),me=function(t){function e(){return Gt(this,e),Tt(this,e,arguments)}return Mt(e,wt),Bt(e,[{key:"_createSVG",value:function(t){return document.createElementNS(zt,t)}}])}(),be=function(){function t(e){var r=e.viewBox,n=e.scale,i=e.rotation,a=e.offsetX,o=void 0===a?0:a,s=e.offsetY,u=void 0===s?0:s,c=e.dontFlip,l=void 0!==c&&c;Gt(this,t),this.viewBox=r,this.scale=n,this.rotation=i,this.offsetX=o,this.offsetY=u;var h,f,d,v,p,y,g,m,b=(r[2]+r[0])/2,w=(r[3]+r[1])/2;switch((i%=360)<0&&(i+=360),i){case 180:h=-1,f=0,d=0,v=1;break;case 90:h=0,f=1,d=1,v=0;break;case 270:h=0,f=-1,d=-1,v=0;break;case 0:h=1,f=0,d=0,v=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}l&&(d=-d,v=-v),0===h?(p=Math.abs(w-r[1])*n+o,y=Math.abs(b-r[0])*n+u,g=(r[3]-r[1])*n,m=(r[2]-r[0])*n):(p=Math.abs(b-r[0])*n+o,y=Math.abs(w-r[1])*n+u,g=(r[2]-r[0])*n,m=(r[3]-r[1])*n),this.transform=[h*n,f*n,d*n,v*n,p-h*n*b-d*n*w,y-f*n*b-v*n*w],this.width=g,this.height=m}return Bt(t,[{key:"rawDims",get:function(){var t=this.viewBox;return W(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.scale,n=void 0===r?this.scale:r,i=e.rotation,a=void 0===i?this.rotation:i,o=e.offsetX,s=void 0===o?this.offsetX:o,u=e.offsetY,c=void 0===u?this.offsetY:u,l=e.dontFlip,h=void 0!==l&&l;return new t({viewBox:this.viewBox.slice(),scale:n,rotation:a,offsetX:s,offsetY:c,dontFlip:h})}},{key:"convertToViewportPoint",value:function(t,e){return Z.applyTransform([t,e],this.transform)}},{key:"convertToViewportRectangle",value:function(t){var e=Z.applyTransform([t[0],t[1]],this.transform),r=Z.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(t,e){return Z.applyInverseTransform([t,e],this.transform)}}])}(),we=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Gt(this,e),(r=Tt(this,e,[t,"RenderingCancelledException"])).extraDelay=n,r}return Mt(e,B),Bt(e)}();function ke(t){for(var e=t.length,r=0;r1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof t)return e;if(ke(t))return R('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;var r=/[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i,n=/^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/.exec(t),i=r.exec(n[1])||r.exec(n[2])||r.exec(n[3]);if(i&&(i=i[0]).includes("%"))try{i=r.exec(decodeURIComponent(i))[0]}catch(t){}return i||e}var Ee,Se=function(){return Bt((function t(){Gt(this,t),Ht(this,"started",Object.create(null)),Ht(this,"times",[])}),[{key:"time",value:function(t){t in this.started&&R("Timer is already running for ".concat(t)),this.started[t]=Date.now()}},{key:"timeEnd",value:function(t){t in this.started||R("Timer has not been started for ".concat(t)),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}},{key:"toString",value:function(){var t,e=[],r=0,n=xt(this.times);try{for(n.s();!(t=n.n()).done;){var i=t.value.name;r=Math.max(i.length,r)}}catch(t){n.e(t)}finally{n.f()}var a,o=xt(this.times);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=s.name,c=s.start,l=s.end;e.push("".concat(u.padEnd(r)," ").concat(l-c,"ms\\n"))}}catch(t){o.e(t)}finally{o.f()}return e.join("")}}])}();function Oe(t,e){try{var r=(e?new URL(t,e):new URL(t)).protocol;return"http:"===r||"https:"===r}catch(t){return!1}}function Te(t){t.preventDefault()}function Pe(t){console.log("Deprecated API usage: "+t)}var Le=function(){return Bt((function t(){Gt(this,t)}),null,[{key:"toDateObject",value:function(t){if(!t||"string"!=typeof t)return null;Ee||(Ee=new RegExp("^D:(\\\\d{4})(\\\\d{2})?(\\\\d{2})?(\\\\d{2})?(\\\\d{2})?(\\\\d{2})?([Z|+|-])?(\\\\d{2})?'?(\\\\d{2})?'?"));var e=Ee.exec(t);if(!e)return null;var r=parseInt(e[1],10),n=parseInt(e[2],10);n=n>=1&&n<=12?n-1:0;var i=parseInt(e[3],10);i=i>=1&&i<=31?i:1;var a=parseInt(e[4],10);a=a>=0&&a<=23?a:0;var o=parseInt(e[5],10);o=o>=0&&o<=59?o:0;var s=parseInt(e[6],10);s=s>=0&&s<=59?s:0;var u=e[7]||"Z",c=parseInt(e[8],10);c=c>=0&&c<=23?c:0;var l=parseInt(e[9],10)||0;return l=l>=0&&l<=59?l:0,"-"===u?(a+=c,o+=l):"+"===u&&(a-=c,o-=l),new Date(Date.UTC(r,n,i,a,o,s))}}])}();function Me(t,e){var r=e.scale,n=void 0===r?1:r,i=e.rotation,a=void 0===i?0:i,o=t.attributes.style,s=o.width,u=o.height,c=[0,0,parseInt(s),parseInt(u)];return new be({viewBox:c,scale:n,rotation:a})}function Ce(t){if(t.startsWith("#")){var e=parseInt(t.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map((function(t){return parseInt(t)})):t.startsWith("rgba(")?t.slice(5,-1).split(",").map((function(t){return parseInt(t)})).slice(0,3):(R('Not a valid color format: "'.concat(t,'"')),[0,0,0])}function je(t){var e=t.getTransform();return[e.a,e.b,e.c,e.d,e.e,e.f]}function Ie(t){var e=t.getTransform().invertSelf();return[e.a,e.b,e.c,e.d,e.e,e.f]}function Re(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e instanceof be){var i=e.rawDims,a=i.pageWidth,o=i.pageHeight,s=t.style,u=J.isCSSRoundSupported,c="var(--scale-factor) * ".concat(a,"px"),l="var(--scale-factor) * ".concat(o,"px"),h=u?"round(down, ".concat(c,", var(--scale-round-x, 1px))"):"calc(".concat(c,")"),f=u?"round(down, ".concat(l,", var(--scale-round-y, 1px))"):"calc(".concat(l,")");r&&e.rotation%180!=0?(s.width=f,s.height=h):(s.width=h,s.height=f)}n&&t.setAttribute("data-main-rotation",e.rotation)}var Fe=function(){return Bt((function t(){Gt(this,t);var e=window.devicePixelRatio||1;this.sx=e,this.sy=e}),[{key:"scaled",get:function(){return 1!==this.sx||1!==this.sy}},{key:"symmetric",get:function(){return this.sx===this.sy}}])}();function De(t,e){if(t){if("string"==typeof t)return Ne(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ne(t,e):void 0}}function Ne(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Be(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Ge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function He(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(t);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.y+o.height;if(!(sn?(i=u,n=s):e?u>i&&(i=u):u=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Er(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Sr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Er(a,n,i,o,s,"next",t)}function s(t){Er(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Or(t,e){jr(t,e),e.add(t)}function Tr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pr(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Nr(t,e){if(t){if("string"==typeof t)return Wr(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wr(t,e):void 0}}function Wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]?arguments[0]:128;Tr(this,t),Cr(this,Qr,[]),Cr(this,Jr,!1),Cr(this,$r,void 0),Cr(this,Zr,-1),Rr($r,this,e)}),[{key:"add",value:function(t){var e=t.cmd,r=t.undo,n=t.post,i=t.mustExec,a=t.type,o=void 0===a?NaN:a,s=t.overwriteIfSameType,u=void 0!==s&&s,c=t.keepUndo,l=void 0!==c&&c;if(i&&e(),!Ir(Jr,this)){var h={cmd:e,undo:r,post:n,type:o};if(-1===Ir(Zr,this))return Ir(Qr,this).length>0&&(Ir(Qr,this).length=0),Rr(Zr,this,0),void Ir(Qr,this).push(h);if(u&&Ir(Qr,this)[Ir(Zr,this)].type===o)return l&&(h.undo=Ir(Qr,this)[Ir(Zr,this)].undo),void(Ir(Qr,this)[Ir(Zr,this)]=h);var f=Ir(Zr,this)+1;f===Ir($r,this)?Ir(Qr,this).splice(0,1):(Rr(Zr,this,f),f1&&void 0!==arguments[1]&&arguments[1];null===(e=Ir(hn,this))||void 0===e||e.editAltText(this,t,r)}},{key:"switchToMode",value:function(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}},{key:"setPreference",value:function(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}},{key:"onSetPreference",value:function(t){var e=t.name,r=t.value;"enableNewAltTextWhenAddingImage"===e&&Rr(An,this,r)}},{key:"onPageChanging",value:function(t){var e=t.pageNumber;Rr(yn,this,e-1)}},{key:"focusMainContainer",value:function(){Ir(Vn,this).focus()}},{key:"findParent",value:function(t,e){var r,n=Dr(Ir(ln,this).values());try{for(n.s();!(r=n.n()).done;){var i=r.value,a=i.div.getBoundingClientRect(),o=a.x,s=a.y,u=a.width,c=a.height;if(t>=o&&t<=o+u&&e>=s&&e<=s+c)return i}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"disableUserSelect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ir(qn,this).classList.toggle("noUserSelect",t)}},{key:"addShouldRescale",value:function(t){Ir(wn,this).add(t)}},{key:"removeShouldRescale",value:function(t){Ir(wn,this).delete(t)}},{key:"onScaleChanging",value:function(t){var e=t.scale;this.commitOrRemove(),this.viewParameters.realScale=e*Vt.PDF_TO_CSS_UNITS;var r,n=Dr(Ir(wn,this));try{for(n.s();!(r=n.n()).done;)r.value.onScaleChanging()}catch(t){n.e(t)}finally{n.f()}}},{key:"onRotationChanging",value:function(t){var e=t.pagesRotation;this.commitOrRemove(),this.viewParameters.rotation=e}},{key:"highlightSelection",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=document.getSelection();if(r&&!r.isCollapsed){var n=r.anchorNode,i=r.anchorOffset,a=r.focusNode,o=r.focusOffset,s=r.toString(),u=Fr(Xn,this,Qn).call(this,r).closest(".textLayer"),c=this.getSelectionBoxes(u);if(c){r.empty();var l=Fr(Xn,this,Jn).call(this,u),h=Ir(Dn,this)===A.NONE,f=function(){null==l||l.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:c,anchorNode:n,anchorOffset:i,focusNode:a,focusOffset:o,text:s}),h&&t.showAllEditors("highlight",!0,!0)};h?this.switchToMode(A.HIGHLIGHT,f):f()}}}},{key:"addToAnnotationStorage",value:function(t){t.isEmpty()||!Ir(fn,this)||Ir(fn,this).has(t.id)||Ir(fn,this).setValue(t.id,t)}},{key:"blur",value:function(){if(this.isShiftKeyDown=!1,Ir(Tn,this)&&(Rr(Tn,this,!1),Fr(Xn,this,ti).call(this,"main_toolbar")),this.hasSelection){var t,e=document.activeElement,r=Dr(Ir(Nn,this));try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n.div.contains(e)){Rr(In,this,[n,e]),n._focusEventsAllowed=!1;break}}}catch(t){r.e(t)}finally{r.f()}}}},{key:"focus",value:function(){if(Ir(In,this)){var t=Ar(Ir(In,this),2),e=t[0],r=t[1];Rr(In,this,null),r.addEventListener("focusin",(function(){e._focusEventsAllowed=!0}),{once:!0,signal:this._signal}),r.focus()}}},{key:"addEditListeners",value:function(){Fr(Xn,this,ii).call(this),Fr(Xn,this,oi).call(this)}},{key:"removeEditListeners",value:function(){Fr(Xn,this,ai).call(this),Fr(Xn,this,si).call(this)}},{key:"dragOver",value:function(t){var e,r=Dr(t.dataTransfer.items);try{for(r.s();!(e=r.n()).done;){var n,i=e.value.type,a=Dr(Ir(bn,this));try{for(a.s();!(n=a.n()).done;)if(n.value.isHandlingMimeForPasting(i))return t.dataTransfer.dropEffect="copy",void t.preventDefault()}catch(t){a.e(t)}finally{a.f()}}}catch(t){r.e(t)}finally{r.f()}}},{key:"drop",value:function(t){var e,r=Dr(t.dataTransfer.items);try{for(r.s();!(e=r.n()).done;){var n,i=e.value,a=Dr(Ir(bn,this));try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o.isHandlingMimeForPasting(i.type))return o.paste(i,this.currentLayer),void t.preventDefault()}}catch(t){a.e(t)}finally{a.f()}}}catch(t){r.e(t)}finally{r.f()}}},{key:"copy",value:function(t){var e;if(t.preventDefault(),null===(e=Ir(un,this))||void 0===e||e.commitOrRemove(),this.hasSelection){var r,n=[],i=Dr(Ir(Nn,this));try{for(i.s();!(r=i.n()).done;){var a=r.value.serialize(!0);a&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}0!==n.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(n))}}},{key:"cut",value:function(t){this.copy(t),this.delete()}},{key:"paste",value:(r=Sr(_r().mark((function t(e){var r,n,i,a,o,s,u,c,l,h,f,d,v,p,y,g,m=this;return _r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.preventDefault(),r=e.clipboardData,n=Dr(r.items),t.prev=3,n.s();case 5:if((i=n.n()).done){t.next=27;break}a=i.value,o=Dr(Ir(bn,this)),t.prev=8,o.s();case 10:if((s=o.n()).done){t.next=17;break}if(!(u=s.value).isHandlingMimeForPasting(a.type)){t.next=15;break}return u.paste(a,this.currentLayer),t.abrupt("return");case 15:t.next=10;break;case 17:t.next=22;break;case 19:t.prev=19,t.t0=t.catch(8),o.e(t.t0);case 22:return t.prev=22,o.f(),t.finish(22);case 25:t.next=5;break;case 27:t.next=32;break;case 29:t.prev=29,t.t1=t.catch(3),n.e(t.t1);case 32:return t.prev=32,n.f(),t.finish(32);case 35:if(c=r.getData("application/pdfjs")){t.next=38;break}return t.abrupt("return");case 38:t.prev=38,c=JSON.parse(c),t.next=46;break;case 42:return t.prev=42,t.t2=t.catch(38),R('paste: "'.concat(t.t2.message,'".')),t.abrupt("return");case 46:if(Array.isArray(c)){t.next=48;break}return t.abrupt("return");case 48:this.unselectAll(),l=this.currentLayer,t.prev=50,h=[],f=Dr(c),t.prev=53,f.s();case 55:if((d=f.n()).done){t.next=65;break}return v=d.value,t.next=59,l.deserialize(v);case 59:if(p=t.sent){t.next=62;break}return t.abrupt("return");case 62:h.push(p);case 63:t.next=55;break;case 65:t.next=70;break;case 67:t.prev=67,t.t3=t.catch(53),f.e(t.t3);case 70:return t.prev=70,f.f(),t.finish(70);case 73:y=function(){for(var t=0,e=h;t1&&void 0!==c[1]?c[1]:null,n=c.length>2&&void 0!==c[2]&&c[2],Ir(Dn,this)!==e){t.next=4;break}return t.abrupt("return");case 4:if(!Ir(Yn,this)){t.next=9;break}return t.next=7,Ir(Yn,this).promise;case 7:if(Ir(Yn,this)){t.next=9;break}return t.abrupt("return");case 9:if(Rr(Yn,this,Promise.withResolvers()),Rr(Dn,this,e),e!==A.NONE){t.next=16;break}return this.setEditingState(!1),Fr(Xn,this,di).call(this),Ir(Yn,this).resolve(),t.abrupt("return");case 16:return this.setEditingState(!0),t.next=19,Fr(Xn,this,hi).call(this);case 19:this.unselectAll(),i=Dr(Ir(ln,this).values());try{for(i.s();!(a=i.n()).done;)a.value.updateMode(e)}catch(t){i.e(t)}finally{i.f()}if(r){t.next=26;break}return n&&this.addNewEditorFromKeyboard(),Ir(Yn,this).resolve(),t.abrupt("return");case 26:o=Dr(Ir(cn,this).values());try{for(o.s();!(s=o.n()).done;)(u=s.value).annotationElementId===r?(this.setSelected(u),u.enterInEditMode()):u.unselect()}catch(t){o.e(t)}finally{o.f()}Ir(Yn,this).resolve();case 29:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"addNewEditorFromKeyboard",value:function(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}},{key:"updateToolbar",value:function(t){t!==Ir(Dn,this)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}},{key:"updateParams",value:function(t,e){var r;if(Ir(bn,this)){switch(t){case _.CREATE:return void this.currentLayer.addNewEditor();case _.HIGHLIGHT_DEFAULT_COLOR:null===(r=Ir(Rn,this))||void 0===r||r.updateColor(e);break;case _.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(Ir(Gn,this)||Rr(Gn,this,new Map)).set(t,e),this.showAllEditors("highlight",e)}var n,i=Dr(Ir(Nn,this));try{for(i.s();!(n=i.n()).done;)n.value.updateParams(t,e)}catch(t){i.e(t)}finally{i.f()}var a,o=Dr(Ir(bn,this));try{for(o.s();!(a=o.n()).done;)a.value.updateDefaultParams(t,e)}catch(t){o.e(t)}finally{o.f()}}}},{key:"showAllEditors",value:function(t,e){var r,n,i,a=Dr(Ir(cn,this).values());try{for(a.s();!(i=a.n()).done;){var o=i.value;o.editorType===t&&o.show(e)}}catch(t){a.e(t)}finally{a.f()}(null===(r=null===(n=Ir(Gn,this))||void 0===n?void 0:n.get(_.HIGHLIGHT_SHOW_ALL))||void 0===r||r)!==e&&Fr(Xn,this,li).call(this,[[_.HIGHLIGHT_SHOW_ALL,e]])}},{key:"enableWaiting",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Ir(Cn,this)!==t){Rr(Cn,this,t);var e,r=Dr(Ir(ln,this).values());try{for(r.s();!(e=r.n()).done;){var n=e.value;t?n.disableClick():n.enableClick(),n.div.classList.toggle("waiting",t)}}catch(t){r.e(t)}finally{r.f()}}}},{key:"getEditors",value:function(t){var e,r=[],n=Dr(Ir(cn,this).values());try{for(n.s();!(e=n.n()).done;){var i=e.value;i.pageIndex===t&&r.push(i)}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"getEditor",value:function(t){return Ir(cn,this).get(t)}},{key:"addEditor",value:function(t){Ir(cn,this).set(t.id,t)}},{key:"removeEditor",value:function(t){var e,r=this;t.div.contains(document.activeElement)&&(Ir(En,this)&&clearTimeout(Ir(En,this)),Rr(En,this,setTimeout((function(){r.focusMainContainer(),Rr(En,r,null)}),0))),Ir(cn,this).delete(t.id),this.unselect(t),t.annotationElementId&&Ir(gn,this).has(t.annotationElementId)||null===(e=Ir(fn,this))||void 0===e||e.remove(t.id)}},{key:"addDeletedAnnotationElement",value:function(t){Ir(gn,this).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}},{key:"isDeletedAnnotationElement",value:function(t){return Ir(gn,this).has(t)}},{key:"removeDeletedAnnotationElement",value:function(t){Ir(gn,this).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}},{key:"setActiveEditor",value:function(t){Ir(un,this)!==t&&(Rr(un,this,t),t&&Fr(Xn,this,li).call(this,t.propertiesToUpdate))}},{key:"updateUI",value:function(t){(function(t){var e,r=null,n=Dr(Ir(Nn,t));try{for(n.s();!(e=n.n()).done;)r=e.value}catch(t){n.e(t)}finally{n.f()}return r})(Fr(Xn,this))===t&&Fr(Xn,this,li).call(this,t.propertiesToUpdate)}},{key:"toggleSelected",value:function(t){if(Ir(Nn,this).has(t))return Ir(Nn,this).delete(t),t.unselect(),void Fr(Xn,this,ci).call(this,{hasSelectedEditor:this.hasSelection});Ir(Nn,this).add(t),t.select(),Fr(Xn,this,li).call(this,t.propertiesToUpdate),Fr(Xn,this,ci).call(this,{hasSelectedEditor:!0})}},{key:"setSelected",value:function(t){var e,r=Dr(Ir(Nn,this));try{for(r.s();!(e=r.n()).done;){var n=e.value;n!==t&&n.unselect()}}catch(t){r.e(t)}finally{r.f()}Ir(Nn,this).clear(),Ir(Nn,this).add(t),t.select(),Fr(Xn,this,li).call(this,t.propertiesToUpdate),Fr(Xn,this,ci).call(this,{hasSelectedEditor:!0})}},{key:"isSelected",value:function(t){return Ir(Nn,this).has(t)}},{key:"firstSelectedEditor",get:function(){return Ir(Nn,this).values().next().value}},{key:"unselect",value:function(t){t.unselect(),Ir(Nn,this).delete(t),Fr(Xn,this,ci).call(this,{hasSelectedEditor:this.hasSelection})}},{key:"hasSelection",get:function(){return 0!==Ir(Nn,this).size}},{key:"isEnterHandled",get:function(){return 1===Ir(Nn,this).size&&this.firstSelectedEditor.isEnterHandled}},{key:"undo",value:function(){Ir(vn,this).undo(),Fr(Xn,this,ci).call(this,{hasSomethingToUndo:Ir(vn,this).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:Fr(Xn,this,pi).call(this)})}},{key:"redo",value:function(){Ir(vn,this).redo(),Fr(Xn,this,ci).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:Ir(vn,this).hasSomethingToRedo(),isEmpty:Fr(Xn,this,pi).call(this)})}},{key:"addCommands",value:function(t){Ir(vn,this).add(t),Fr(Xn,this,ci).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:Fr(Xn,this,pi).call(this)})}},{key:"delete",value:function(){var t=this;if(this.commitOrRemove(),this.hasSelection){var e=xr(Ir(Nn,this));this.addCommands({cmd:function(){var t,r=Dr(e);try{for(r.s();!(t=r.n()).done;)t.value.remove()}catch(t){r.e(t)}finally{r.f()}},undo:function(){var r,n=Dr(e);try{for(n.s();!(r=n.n()).done;){var i=r.value;Fr(Xn,t,vi).call(t,i)}}catch(t){n.e(t)}finally{n.f()}},mustExec:!0})}}},{key:"commitOrRemove",value:function(){var t;null===(t=Ir(un,this))||void 0===t||t.commitOrRemove()}},{key:"hasSomethingToControl",value:function(){return Ir(un,this)||this.hasSelection}},{key:"selectAll",value:function(){var t,e=Dr(Ir(Nn,this));try{for(e.s();!(t=e.n()).done;)t.value.commit()}catch(t){e.e(t)}finally{e.f()}Fr(Xn,this,yi).call(this,Ir(cn,this).values())}},{key:"unselectAll",value:function(){if((!Ir(un,this)||(Ir(un,this).commitOrRemove(),Ir(Dn,this)===A.NONE))&&this.hasSelection){var t,e=Dr(Ir(Nn,this));try{for(e.s();!(t=e.n()).done;)t.value.unselect()}catch(t){e.e(t)}finally{e.f()}Ir(Nn,this).clear(),Fr(Xn,this,ci).call(this,{hasSelectedEditor:!1})}}},{key:"translateSelectedEditors",value:function(t,e){var r=this;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove(),this.hasSelection){Ir(Un,this)[0]+=t,Ir(Un,this)[1]+=e;var n=Ar(Ir(Un,this),2),i=n[0],a=n[1],o=xr(Ir(Nn,this));Ir(zn,this)&&clearTimeout(Ir(zn,this)),Rr(zn,this,setTimeout((function(){Rr(zn,r,null),Ir(Un,r)[0]=Ir(Un,r)[1]=0,r.addCommands({cmd:function(){var t,e=Dr(o);try{for(e.s();!(t=e.n()).done;){var n=t.value;Ir(cn,r).has(n.id)&&n.translateInPage(i,a)}}catch(t){e.e(t)}finally{e.f()}},undo:function(){var t,e=Dr(o);try{for(e.s();!(t=e.n()).done;){var n=t.value;Ir(cn,r).has(n.id)&&n.translateInPage(-i,-a)}}catch(t){e.e(t)}finally{e.f()}},mustExec:!1})}),1e3));var s,u=Dr(o);try{for(u.s();!(s=u.n()).done;)s.value.translateInPage(t,e)}catch(t){u.e(t)}finally{u.f()}}}},{key:"setUpDragSession",value:function(){if(this.hasSelection){this.disableUserSelect(!0),Rr(mn,this,new Map);var t,e=Dr(Ir(Nn,this));try{for(e.s();!(t=e.n()).done;){var r=t.value;Ir(mn,this).set(r,{savedX:r.x,savedY:r.y,savedPageIndex:r.pageIndex,newX:0,newY:0,newPageIndex:-1})}}catch(t){e.e(t)}finally{e.f()}}}},{key:"endDragSession",value:function(){var t=this;if(!Ir(mn,this))return!1;this.disableUserSelect(!1);var e=Ir(mn,this);Rr(mn,this,null);var r,n=!1,i=Dr(e);try{for(i.s();!(r=i.n()).done;){var a=Ar(r.value,2),o=a[0],s=o.x,u=o.y,c=o.pageIndex,l=a[1];l.newX=s,l.newY=u,l.newPageIndex=c,n||(n=s!==l.savedX||u!==l.savedY||c!==l.savedPageIndex)}}catch(t){i.e(t)}finally{i.f()}if(!n)return!1;var h=function(e,r,n,i){if(Ir(cn,t).has(e.id)){var a=Ir(ln,t).get(i);a?e._setParentAndPosition(a,r,n):(e.pageIndex=i,e.x=r,e.y=n)}};return this.addCommands({cmd:function(){var t,r=Dr(e);try{for(r.s();!(t=r.n()).done;){var n=Ar(t.value,2),i=n[0],a=n[1],o=a.newX,s=a.newY,u=a.newPageIndex;h(i,o,s,u)}}catch(t){r.e(t)}finally{r.f()}},undo:function(){var t,r=Dr(e);try{for(r.s();!(t=r.n()).done;){var n=Ar(t.value,2),i=n[0],a=n[1],o=a.savedX,s=a.savedY,u=a.savedPageIndex;h(i,o,s,u)}}catch(t){r.e(t)}finally{r.f()}},mustExec:!0}),!0}},{key:"dragSelectedEditors",value:function(t,e){if(Ir(mn,this)){var r,n=Dr(Ir(mn,this).keys());try{for(n.s();!(r=n.n()).done;)r.value.drag(t,e)}catch(t){n.e(t)}finally{n.f()}}}},{key:"rebuild",value:function(t){if(null===t.parent){var e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}},{key:"isEditorHandlingKeyboard",get:function(){var t;return(null===(t=this.getActive())||void 0===t?void 0:t.shouldGetKeyboardEvents())||1===Ir(Nn,this).size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}},{key:"isActive",value:function(t){return Ir(un,this)===t}},{key:"getActive",value:function(){return Ir(un,this)}},{key:"getMode",value:function(){return Ir(Dn,this)}},{key:"imageManager",get:function(){return W(this,"imageManager",new Yr)}},{key:"getSelectionBoxes",value:function(t){if(!t)return null;for(var e=document.getSelection(),r=0,n=e.rangeCount;r0&&void 0!==arguments[0]?arguments[0]:"";Ir(Dn,this)===A.HIGHLIGHT?this.highlightSelection(t):Ir(kn,this)&&Fr(Xn,this,$n).call(this)}function ei(){document.addEventListener("selectionchange",Fr(Xn,this,Zn).bind(this),{signal:this._signal})}function ri(){if(!Ir(Sn,this)){Rr(Sn,this,new AbortController);var t=this.combinedSignal(Ir(Sn,this));window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})}}function ni(){var t;null===(t=Ir(Sn,this))||void 0===t||t.abort(),Rr(Sn,this,null)}function ii(){if(!Ir(jn,this)){Rr(jn,this,new AbortController);var t=this.combinedSignal(Ir(jn,this));window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})}}function ai(){var t;null===(t=Ir(jn,this))||void 0===t||t.abort(),Rr(jn,this,null)}function oi(){if(!Ir(pn,this)){Rr(pn,this,new AbortController);var t=this.combinedSignal(Ir(pn,this));document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})}}function si(){var t;null===(t=Ir(pn,this))||void 0===t||t.abort(),Rr(pn,this,null)}function ui(){var t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}function ci(t){var e=this;Object.entries(t).some((function(t){var r=Ar(t,2),n=r[0],i=r[1];return Ir(Hn,e)[n]!==i}))&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(Ir(Hn,this),t)}),Ir(Dn,this)===A.HIGHLIGHT&&!1===t.hasSelectedEditor&&Fr(Xn,this,li).call(this,[[_.HIGHLIGHT_FREE,!0]]))}function li(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}function hi(){return fi.apply(this,arguments)}function fi(){return(fi=Sr(_r().mark((function t(){var e,r,n,i,a,o;return _r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Ir(Mn,this)){t.next=9;break}Rr(Mn,this,!0),e=[],r=Dr(Ir(ln,this).values());try{for(r.s();!(n=r.n()).done;)i=n.value,e.push(i.enable())}catch(t){r.e(t)}finally{r.f()}return t.next=7,Promise.all(e);case 7:a=Dr(Ir(cn,this).values());try{for(a.s();!(o=a.n()).done;)o.value.enable()}catch(t){a.e(t)}finally{a.f()}case 9:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function di(){if(this.unselectAll(),Ir(Mn,this)){Rr(Mn,this,!1);var t,e=Dr(Ir(ln,this).values());try{for(e.s();!(t=e.n()).done;)t.value.disable()}catch(t){e.e(t)}finally{e.f()}var r,n=Dr(Ir(cn,this).values());try{for(n.s();!(r=n.n()).done;)r.value.disable()}catch(t){n.e(t)}finally{n.f()}}}function vi(t){var e=Ir(ln,this).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}function pi(){if(0===Ir(cn,this).size)return!0;if(1===Ir(cn,this).size){var t,e=Dr(Ir(cn,this).values());try{for(e.s();!(t=e.n()).done;)return t.value.isEmpty()}catch(t){e.e(t)}finally{e.f()}}return!1}function yi(t){var e,r=Dr(Ir(Nn,this));try{for(r.s();!(e=r.n()).done;)e.value.unselect()}catch(t){r.e(t)}finally{r.f()}Ir(Nn,this).clear();var n,i=Dr(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;a.isEmpty()||(Ir(Nn,this).add(a),a.select())}}catch(t){i.e(t)}finally{i.f()}Fr(Xn,this,ci).call(this,{hasSelectedEditor:this.hasSelection})}function gi(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mi(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function mi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function wi(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ki(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){wi(a,n,i,o,s,"next",t)}function s(t){wi(a,n,i,o,s,"throw",t)}o(void 0)}))}}function xi(t,e){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];if(!Oi(Bi,this)||Oi(Li,this))return null===(t=Oi(Fi,this))||void 0===t||t.remove(),void Ti(Fi,this,null);if(!Oi(Fi,this)){var r=Ti(Fi,this,document.createElement("div"));r.className="noAltTextBadge",Oi(Di,this).div.append(r)}Oi(Fi,this).classList.toggle("hidden",!e)}},{key:"serialize",value:function(t){var e=Oi(Li,this);return t||Oi(Ni,this)!==e||(e=Oi(Wi,this)),{altText:e,decorative:Oi(Mi,this),guessedText:Oi(Ni,this),textWithDisclaimer:Oi(Wi,this)}}},{key:"data",get:function(){return{altText:Oi(Li,this),decorative:Oi(Mi,this)}},set:function(t){var e=t.altText,r=t.decorative,n=t.guessedText,i=t.textWithDisclaimer,a=t.cancel,o=void 0!==a&&a;n&&(Ti(Ni,this,n),Ti(Wi,this,i)),Oi(Li,this)===e&&Oi(Mi,this)===r||(o||(Ti(Li,this,e),Ti(Mi,this,r)),Pi(Gi,this,zi).call(this))}},{key:"toggle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Oi(Ci,this)&&(!t&&Oi(Ii,this)&&(clearTimeout(Oi(Ii,this)),Ti(Ii,this,null)),Oi(Ci,this).disabled=!t)}},{key:"shown",value:function(){Oi(Di,this)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:Si(Gi,this,Ui)}})}},{key:"destroy",value:function(){var t,e;null===(t=Oi(Ci,this))||void 0===t||t.remove(),Ti(Ci,this,null),Ti(ji,this,null),null===(e=Oi(Fi,this))||void 0===e||e.remove(),Ti(Fi,this,null)}}],n=[{key:"initialize",value:function(e){t._l10nPromise||(t._l10nPromise=e)}}],r&&xi(e.prototype,r),n&&xi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n,i}();function Ui(t){return(Oi(Li,t)?"added":null===Oi(Li,t)&&t.guessedText&&"review")||"missing"}function zi(){return Vi.apply(this,arguments)}function Vi(){return(Vi=ki(bi().mark((function t(){var e,r,n,i,a,o,s=this;return bi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=Oi(Ci,this)){t.next=3;break}return t.abrupt("return");case 3:if(!Oi(Bi,this)){t.next=11;break}if(e.classList.toggle("done",!!Oi(Li,this)),on._l10nPromise.get(Ki._[Si(Gi,this,Ui)]).then((function(t){e.setAttribute("aria-label",t);var r,n=gi(e.childNodes);try{for(n.s();!(r=n.n()).done;){var i=r.value;if(i.nodeType===Node.TEXT_NODE){i.textContent=t;break}}}catch(t){n.e(t)}finally{n.f()}})),Oi(Li,this)){t.next=9;break}return null===(r=Oi(ji,this))||void 0===r||r.remove(),t.abrupt("return");case 9:t.next=17;break;case 11:if(Oi(Li,this)||Oi(Mi,this)){t.next=15;break}return e.classList.remove("done"),null===(n=Oi(ji,this))||void 0===n||n.remove(),t.abrupt("return");case 15:e.classList.add("done"),on._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then((function(t){e.setAttribute("aria-label",t)}));case 17:if((i=Oi(ji,this))||(Ti(ji,this,i=document.createElement("span")),i.className="tooltip",i.setAttribute("role","tooltip"),i.id="alt-text-tooltip-".concat(Oi(Di,this).id),(a=Oi(Di,this)._uiManager._signal).addEventListener("abort",(function(){clearTimeout(Oi(Ii,s)),Ti(Ii,s,null)}),{once:!0}),e.addEventListener("mouseenter",(function(){Ti(Ii,s,setTimeout((function(){Ti(Ii,s,null),Oi(ji,s).classList.add("show"),Oi(Di,s)._reportTelemetry({action:"alt_text_tooltip"})}),100))}),{signal:a}),e.addEventListener("mouseleave",(function(){var t;Oi(Ii,s)&&(clearTimeout(Oi(Ii,s)),Ti(Ii,s,null)),null===(t=Oi(ji,s))||void 0===t||t.classList.remove("show")}),{signal:a})),!Oi(Mi,this)){t.next=25;break}return t.next=22,on._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip");case 22:t.t0=t.sent,t.next=26;break;case 25:t.t0=Oi(Li,this);case 26:i.innerText=t.t0,i.parentNode||e.append(i),null==(o=Oi(Di,this).getImageForAltText())||o.setAttribute("aria-describedby",i.id);case 30:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}on=Hi;var qi,Yi,Xi,Ki={_:null};function Qi(t,e,r){return e=$i(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ji()?Reflect.construct(e,r||[],$i(t).constructor):e.apply(t,r))}function Ji(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ji=function(){return!!t})()}function $i(t){return $i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$i(t)}function Zi(t,e){return Zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zi(t,e)}function ta(t){return function(t){if(Array.isArray(t))return sa(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||oa(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ea(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=oa(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function ra(){ra=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function na(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ia(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){na(a,n,i,o,s,"next",t)}function s(t){na(a,n,i,o,s,"throw",t)}o(void 0)}))}}function aa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||oa(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oa(t,e){if(t){if("string"==typeof t)return sa(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sa(t,e):void 0}}function sa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1||this.y<0||this.y>1)){var a=this.div.getBoundingClientRect(),o=a.x,s=a.y;this.parent.findNewParent(this,o,s)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}var u=this.x,c=this.y,l=aa(this.getBaseTranslation(),2);u+=l[0],c+=l[1],this.div.style.left="".concat((100*u).toFixed(2),"%"),this.div.style.top="".concat((100*c).toFixed(2),"%"),this.div.scrollIntoView({block:"nearest"})}},{key:"_hasBeenMoved",get:function(){return!!ya(Ta,this)&&(ya(Ta,this)[0]!==this.x||ya(Ta,this)[1]!==this.y)}},{key:"getBaseTranslation",value:function(){var e=aa(this.parentDimensions,2),r=e[0],n=e[1],i=t._borderLineWidth,a=i/r,o=i/n;switch(this.rotation){case 90:return[-a,o];case 180:return[a,o];case 270:return[a,-o];default:return[-a,-o]}}},{key:"_mustFixPosition",get:function(){return!0}},{key:"fixAndSetPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.rotation,e=aa(this.pageDimensions,2),r=e[0],n=e[1],i=this.x,a=this.y,o=this.width,s=this.height;if(o*=r,s*=n,i*=r,a*=n,this._mustFixPosition)switch(t){case 0:i=Math.max(0,Math.min(r-o,i)),a=Math.max(0,Math.min(n-s,a));break;case 90:i=Math.max(0,Math.min(r-s,i)),a=Math.min(n,Math.max(o,a));break;case 180:i=Math.min(r,Math.max(o,i)),a=Math.min(n,Math.max(s,a));break;case 270:i=Math.min(r,Math.max(s,i)),a=Math.max(0,Math.min(n-o,a))}this.x=i/=r,this.y=a/=n;var u=aa(this.getBaseTranslation(),2);i+=u[0],a+=u[1];var c=this.div.style;c.left="".concat((100*i).toFixed(2),"%"),c.top="".concat((100*a).toFixed(2),"%"),this.moveInDOM()}},{key:"screenToPageTranslation",value:function(e,r){return Ga.call(t,e,r,this.parentRotation)}},{key:"pageTranslationToScreen",value:function(e,r){return Ga.call(t,e,r,360-this.parentRotation)}},{key:"parentScale",get:function(){return this._uiManager.viewParameters.realScale}},{key:"parentRotation",get:function(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}},{key:"parentDimensions",get:function(){var t=this.parentScale,e=aa(this.pageDimensions,2);return[e[0]*t,e[1]*t]}},{key:"setDims",value:function(t,e){var r=aa(this.parentDimensions,2),n=r[0],i=r[1];this.div.style.width="".concat((100*t/n).toFixed(2),"%"),ya(xa,this)||(this.div.style.height="".concat((100*e/i).toFixed(2),"%"))}},{key:"fixDims",value:function(){var t=this.div.style,e=t.height,r=t.width,n=r.endsWith("%"),i=!ya(xa,this)&&e.endsWith("%");if(!n||!i){var a=aa(this.parentDimensions,2),o=a[0],s=a[1];n||(t.width="".concat((100*parseFloat(r)/o).toFixed(2),"%")),ya(xa,this)||i||(t.height="".concat((100*parseFloat(e)/s).toFixed(2),"%"))}}},{key:"getInitialTranslation",value:function(){return[0,0]}},{key:"altTextFinish",value:function(){var t;null===(t=ya(wa,this))||void 0===t||t.finish()}},{key:"addEditToolbar",value:(i=ia(ra().mark((function t(){return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._editToolbar&&!ya(La,this)){t.next=2;break}return t.abrupt("return",this._editToolbar);case 2:if(this._editToolbar=new ir(this),this.div.append(this._editToolbar.render()),!ya(wa,this)){t.next=7;break}return t.next=7,this._editToolbar.addAltText(ya(wa,this));case 7:return t.abrupt("return",this._editToolbar);case 8:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"removeEditToolbar",value:function(){var t;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,null===(t=ya(wa,this))||void 0===t||t.destroy())}},{key:"addContainer",value:function(t){var e,r=null===(e=this._editToolbar)||void 0===e?void 0:e.div;r?r.before(t):this.div.append(t)}},{key:"getClientDimensions",value:function(){return this.div.getBoundingClientRect()}},{key:"addAltTextButton",value:(n=ia(ra().mark((function e(){return ra().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ya(wa,this)){e.next=2;break}return e.abrupt("return");case 2:return Hi.initialize(t._l10nPromise),pa(wa,this,new Hi(this)),ya(ma,this)&&(ya(wa,this).data=ya(ma,this),pa(ma,this,null)),e.next=7,this.addEditToolbar();case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"altTextData",get:function(){var t;return null===(t=ya(wa,this))||void 0===t?void 0:t.data},set:function(t){ya(wa,this)&&(ya(wa,this).data=t)}},{key:"guessedAltText",get:function(){var t;return null===(t=ya(wa,this))||void 0===t?void 0:t.guessedText}},{key:"setGuessedAltText",value:(r=ia(ra().mark((function t(e){var r;return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(r=ya(wa,this))||void 0===r?void 0:r.setGuessedText(e);case 2:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"serializeAltText",value:function(t){var e;return null===(e=ya(wa,this))||void 0===e?void 0:e.serialize(t)}},{key:"hasAltText",value:function(){return!!ya(wa,this)&&!ya(wa,this).isEmpty()}},{key:"hasAltTextData",value:function(){var t,e;return null!==(t=null===(e=ya(wa,this))||void 0===e?void 0:e.hasData())&&void 0!==t&&t}},{key:"render",value:function(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=ya(ka,this)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),ga(Na,this,Ka).call(this);var t=aa(this.parentDimensions,2),e=t[0],r=t[1];this.parentRotation%180!=0&&(this.div.style.maxWidth="".concat((100*r/e).toFixed(2),"%"),this.div.style.maxHeight="".concat((100*e/r).toFixed(2),"%"));var n=aa(this.getInitialTranslation(),2),i=n[0],a=n[1];return this.translate(i,a),Br(this,this.div,["pointerdown"]),this.div}},{key:"pointerdown",value:function(t){var e=J.platform.isMac;0!==t.button||t.ctrlKey&&e?t.preventDefault():(pa(Oa,this,!0),this._isDraggable?ga(Na,this,Xa).call(this,t):ga(Na,this,Ya).call(this,t))}},{key:"isSelected",get:function(){return this._uiManager.isSelected(this)}},{key:"moveInDOM",value:function(){var t=this;ya(Ca,this)&&clearTimeout(ya(Ca,this)),pa(Ca,this,setTimeout((function(){var e;pa(Ca,t,null),null===(e=t.parent)||void 0===e||e.moveEditorInDOM(t)}),0))}},{key:"_setParentAndPosition",value:function(t,e,r){t.changeParent(this),this.x=e,this.y=r,this.fixAndSetPosition()}},{key:"getRect",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.rotation,n=this.parentScale,i=aa(this.pageDimensions,2),a=i[0],o=i[1],s=aa(this.pageTranslation,2),u=s[0],c=s[1],l=t/n,h=e/n,f=this.x*a,d=this.y*o,v=this.width*a,p=this.height*o;switch(r){case 0:return[f+l+u,o-d-h-p+c,f+l+v+u,o-d-h+c];case 90:return[f+h+u,o-d+l+c,f+h+p+u,o-d+l+v+c];case 180:return[f-l-v+u,o-d+h+c,f-l+u,o-d+h+p+c];case 270:return[f-h-p+u,o-d-l-v+c,f-h+u,o-d-l+c];default:throw new Error("Invalid rotation")}}},{key:"getRectInCurrentCoords",value:function(t,e){var r=aa(t,4),n=r[0],i=r[1],a=r[2],o=r[3],s=a-n,u=o-i;switch(this.rotation){case 0:return[n,e-o,s,u];case 90:return[n,e-i,u,s];case 180:return[a,e-i,s,u];case 270:return[a,e-o,u,s];default:throw new Error("Invalid rotation")}}},{key:"onceAdded",value:function(){}},{key:"isEmpty",value:function(){return!1}},{key:"enableEditMode",value:function(){pa(La,this,!0)}},{key:"disableEditMode",value:function(){pa(La,this,!1)}},{key:"isInEditMode",value:function(){return ya(La,this)}},{key:"shouldGetKeyboardEvents",value:function(){return ya(Ma,this)}},{key:"needsToBeRebuilt",value:function(){return this.div&&!this.isAttachedToDOM}},{key:"rebuild",value:function(){ga(Na,this,Ka).call(this)}},{key:"rotate",value:function(t){}},{key:"serializeDeleted",value:function(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:(null===(t=this._initialData)||void 0===t?void 0:t.popupRef)||""}}},{key:"serialize",value:function(){F("An editor must be serializable")}},{key:"hasBeenModified",get:function(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}},{key:"remove",value:function(){var t;if(null===(t=ya(Ea,this))||void 0===t||t.abort(),pa(Ea,this,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),ya(Ca,this)&&(clearTimeout(ya(Ca,this)),pa(Ca,this,null)),ga(Na,this,to).call(this),this.removeEditToolbar(),ya(Ra,this)){var e,r=ea(ya(Ra,this).values());try{for(r.s();!(e=r.n()).done;){var n=e.value;clearTimeout(n)}}catch(t){r.e(t)}finally{r.f()}pa(Ra,this,null)}this.parent=null}},{key:"isResizable",get:function(){return!1}},{key:"makeResizable",value:function(){this.isResizable&&(ga(Na,this,Ua).call(this),ya(Aa,this).classList.remove("hidden"),Br(this,this.div,["keydown"]))}},{key:"toolbarPosition",get:function(){return null}},{key:"keydown",value:function(e){if(this.isResizable&&e.target===this.div&&"Enter"===e.key){this._uiManager.setSelected(this),pa(_a,this,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});var r=ya(Aa,this).children;if(!ya(ba,this)){pa(ba,this,Array.from(r));var n,i=ga(Na,this,Qa).bind(this),a=ga(Na,this,Ja).bind(this),o=this._uiManager._signal,s=ea(ya(ba,this));try{for(s.s();!(n=s.n()).done;){var u=n.value,c=u.getAttribute("data-resizer-name");u.setAttribute("role","spinbutton"),u.addEventListener("keydown",i,{signal:o}),u.addEventListener("blur",a,{signal:o}),u.addEventListener("focus",ga(Na,this,$a).bind(this,c),{signal:o}),u.setAttribute("data-l10n-id",t._l10nResizer[c])}}catch(t){s.e(t)}finally{s.f()}}var l,h=ya(ba,this)[0],f=0,d=ea(r);try{for(d.s();!(l=d.n()).done&&l.value!==h;)f++}catch(t){d.e(t)}finally{d.f()}var v=(360-this.rotation+this.parentRotation)%360/90*(ya(ba,this).length/4);if(v!==f){if(vf)for(var y=0;y1&&void 0!==arguments[1]&&arguments[1]){ya(Ra,this)||pa(Ra,this,new Map);var n=e.action,i=ya(Ra,this).get(n);return i&&clearTimeout(i),i=setTimeout((function(){r._reportTelemetry(e),ya(Ra,r).delete(n),0===ya(Ra,r).size&&pa(Ra,r,null)}),t._telemetryTimeout),void ya(Ra,this).set(n,i)}e.type||(e.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;this.div.classList.toggle("hidden",!t),this._isVisible=t}},{key:"enable",value:function(){this.div&&(this.div.tabIndex=0),pa(ka,this,!1)}},{key:"disable",value:function(){this.div&&(this.div.tabIndex=-1),pa(ka,this,!0)}},{key:"renderAnnotationElement",value:function(t){var e=t.container.querySelector(".annotationContent");if(e){if("CANVAS"===e.nodeName){var r=e;(e=document.createElement("div")).classList.add("annotationContent",this.editorType),r.before(e)}}else(e=document.createElement("div")).classList.add("annotationContent",this.editorType),t.container.prepend(e);return e}},{key:"resetAnnotationElement",value:function(t){var e=t.container.firstChild;"DIV"===(null==e?void 0:e.nodeName)&&e.classList.contains("annotationContent")&&e.remove()}}],[{key:"_resizerKeyboardManager",get:function(){var e=t.prototype._resizeWithKeyboard,r=Kn.TRANSLATE_SMALL,n=Kn.TRANSLATE_BIG;return W(this,"_resizerKeyboardManager",new rn([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-r,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[r,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-r]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,r]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,n]}],[["Escape","mac+Escape"],t.prototype._stopResizingWithKeyboard]]))}},{key:"_defaultLineColor",get:function(){return W(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}},{key:"deleteAnnotationElement",value:function(t){var e=new eo({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}},{key:"initialize",value:function(e,r,n){if(t._l10nResizer||(t._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),t._l10nPromise||(t._l10nPromise=new Map([].concat(ta(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-new-alt-text-added-button-label","pdfjs-editor-new-alt-text-missing-button-label","pdfjs-editor-new-alt-text-to-review-button-label"].map((function(t){return[t,e.get(t)]}))),ta(["pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer"].map((function(t){return[t,e.get.bind(e,t)]})))))),null!=n&&n.strings){var i,a=ea(n.strings);try{for(a.s();!(i=a.n()).done;){var o=i.value;t._l10nPromise.set(o,e.get(o))}}catch(t){a.e(t)}finally{a.f()}}if(-1===t._borderLineWidth){var s=getComputedStyle(document.documentElement);t._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}}},{key:"updateDefaultParams",value:function(t,e){}},{key:"defaultPropertiesToUpdate",get:function(){return[]}},{key:"isHandlingMimeForPasting",value:function(t){return!1}},{key:"paste",value:function(t,e){F("Not implemented")}},{key:"deserialize",value:(e=ia(ra().mark((function t(e,r,n){var i,a,o,s,u,c,l,h,f,d;return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=new this.prototype.constructor({parent:r,id:r.getNextId(),uiManager:n})).rotation=e.rotation,pa(ma,i,e.accessibilityData),a=aa(i.pageDimensions,2),o=a[0],s=a[1],u=i.getRectInCurrentCoords(e.rect,s),c=aa(u,4),l=c[0],h=c[1],f=c[2],d=c[3],i.x=l/o,i.y=h/s,i.width=f/o,i.height=d/s,t.abrupt("return",i);case 10:case"end":return t.stop()}}),t,this)}))),function(t,r,n){return e.apply(this,arguments)})},{key:"MIN_SIZE",get:function(){return 16}},{key:"canCreateNewEmptyEditor",value:function(){return!0}}]);var e,r,n,i}();function Ba(t,e,r){var n=aa(t,2),i=n[0],a=n[1],o=aa(this.screenToPageTranslation(e,r),2);e=o[0],r=o[1],this.x+=e/i,this.y+=r/a,this.fixAndSetPosition()}function Ga(t,e,r){switch(r){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}}function Ha(t){switch(t){case 90:var e=aa(this.pageDimensions,2),r=e[0],n=e[1];return[0,-r/n,n/r,0];case 180:return[-1,0,0,-1];case 270:var i=aa(this.pageDimensions,2),a=i[0],o=i[1];return[0,a/o,-o/a,0];default:return[1,0,0,1]}}function Ua(){if(!ya(Aa,this)){pa(Aa,this,document.createElement("div")),ya(Aa,this).classList.add("resizers");for(var t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal,r=0,n=t;r>>8,e[r++]=255&a)}}else{if(!ArrayBuffer.isView(t))throw new Error("Invalid data format, must be a string or TypedArray.");r=(e=t.slice()).byteLength}for(var o=r>>2,s=r-4*o,u=new Uint32Array(e.buffer,0,o),c=0,l=0,h=this.h1,f=this.h2,d=3432918353,v=461845907,p=11601,y=13715,g=0;g>>17)*v&ao|c*y&oo)<<13|h>>>19)+3864292196:f=5*(f=(f^=l=(l=(l=(l=u[g])*d&ao|l*p&oo)<<15|l>>>17)*v&ao|l*y&oo)<<13|f>>>19)+3864292196;switch(c=0,s){case 3:c^=e[4*o+2]<<16;case 2:c^=e[4*o+1]<<8;case 1:c=(c=(c=(c^=e[4*o])*d&ao|c*p&oo)<<15|c>>>17)*v&ao|c*y&oo,1&o?h^=c:f^=c}this.h1=h,this.h2=f}},{key:"hexdigest",value:function(){var t=this.h1,e=this.h2;return t=3981806797*(t^=e>>>1)&ao|36045*t&oo,t=444984403*(t^=(e=4283543511*e&ao|(2950163797*(e<<16|t>>>16)&ao)>>>16)>>>1)&ao|60499*t&oo,((t^=(e=3301882366*e&ao|(3120437893*(e<<16|t>>>16)&ao)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}])}();function uo(t,e,r){return e=lo(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,co()?Reflect.construct(e,r||[],lo(t).constructor):e.apply(t,r))}function co(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(co=function(){return!!t})()}function lo(t){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lo(t)}function ho(t,e){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ho(t,e)}function fo(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||po(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vo(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=po(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function po(t,e){if(t){if("string"==typeof t)return yo(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yo(t,e):void 0}}function yo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0?Q(_o(Po,this)):null}},{key:"setAll",value:function(t){for(var e=0,r=Object.entries(t);e0?{map:e,hash:r.hexdigest(),transfer:n}:So}},{key:"editorStats",get:function(){var t,e=null,r=new Map,n=vo(_o(Po,this).values());try{for(n.s();!(t=n.n()).done;){var i,a=t.value;if(a instanceof Wa){var o=a.telemetryFinalData;if(o){var s=o.type;r.has(s)||r.set(s,Object.getPrototypeOf(a).constructor),e||(e=Object.create(null));for(var u=(i=e)[s]||(i[s]=new Map),c=0,l=Object.entries(o);c=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Do(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function No(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Do(a,n,i,o,s,"next",t)}function s(t){Do(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Wo(t,e){if(t){if("string"==typeof t)return Bo(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bo(t,e):void 0}}function Bo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.nativeFontFaces);try{for(e.s();!(t=e.n()).done;){var r=t.value;this._document.fonts.delete(r)}}catch(t){e.e(t)}finally{e.f()}this.nativeFontFaces.clear(),Vo(qo,this).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"loadSystemFont",value:(e=No(Fo().mark((function t(e){var r,n,i,a,o,s;return Fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.systemFontInfo,n=e._inspectFont,r&&!Vo(qo,this).has(r.loadedName)){t.next=3;break}return t.abrupt("return");case 3:if(D(!this.disableFontFace,"loadSystemFont shouldn't be called when \`disableFontFace\` is set."),!this.isFontLoadingAPISupported){t.next=20;break}return i=r.loadedName,a=r.src,o=r.style,s=new FontFace(i,a,o),this.addNativeFontFace(s),t.prev=8,t.next=11,s.load();case 11:Vo(qo,this).add(i),null==n||n(r),t.next=19;break;case 15:t.prev=15,t.t0=t.catch(8),R("Cannot load system font: ".concat(r.baseFontName,", installing it could help to improve PDF rendering.")),this.removeNativeFontFace(s);case 19:return t.abrupt("return");case 20:F("Not implemented: loadSystemFont without the Font Loading API.");case 21:case"end":return t.stop()}}),t,this,[[8,15]])}))),function(t){return e.apply(this,arguments)})},{key:"bind",value:(t=No(Fo().mark((function t(e){var r,n,i=this;return Fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.attached||e.missingFile&&!e.systemFontInfo)){t.next=2;break}return t.abrupt("return");case 2:if(e.attached=!0,!e.systemFontInfo){t.next=7;break}return t.next=6,this.loadSystemFont(e);case 6:case 21:return t.abrupt("return");case 7:if(!this.isFontLoadingAPISupported){t.next=22;break}if(!(r=e.createNativeFontFace())){t.next=21;break}return this.addNativeFontFace(r),t.prev=11,t.next=14,r.loaded;case 14:t.next=21;break;case 16:throw t.prev=16,t.t0=t.catch(11),R("Failed to load font '".concat(r.family,"': '").concat(t.t0,"'.")),e.disableFontFace=!0,t.t0;case 22:if(!(n=e.createFontFaceRule())){t.next=29;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){t.next=27;break}return t.abrupt("return");case 27:return t.next=29,new Promise((function(t){var r=i._queueLoadingCallback(t);i._prepareFontLoadEvent(e,r)}));case 29:case"end":return t.stop()}}),t,this,[[11,16]])}))),function(e){return t.apply(this,arguments)})},{key:"isFontLoadingAPISupported",get:function(){var t;return W(this,"isFontLoadingAPISupported",!(null===(t=this._document)||void 0===t||!t.fonts))}},{key:"isSyncFontLoadingSupported",get:function(){var t,e=!1;return(m||"undefined"!=typeof navigator&&"string"==typeof(null===(t=navigator)||void 0===t?void 0:t.userAgent)&&/Mozilla\\/5.0.*?rv:\\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),W(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(t){var e=this.loadingRequests,r={done:!1,complete:function(){for(D(!r.done,"completeRequest() cannot be called twice."),r.done=!0;e.length>0&&e[0].done;){var t=e.shift();setTimeout(t.callback,0)}},callback:t};return e.push(r),r}},{key:"_loadTestFont",get:function(){return W(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}},{key:"_prepareFontLoadEvent",value:function(t,e){function r(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function n(t,e,r,n){return t.substring(0,e)+n+t.substring(e+r)}var i,a,o=this._document.createElement("canvas");o.width=1,o.height=1;var s,u=o.getContext("2d"),c=0,l="lt".concat(Date.now()).concat(this.loadTestFontId++),h=this._loadTestFont,f=1482184792,d=r(h=n(h,976,l.length,l),16);for(i=0,a=l.length-3;i>24&255,s>>16&255,s>>8&255,255&s)));var v="url(data:font/opentype;base64,".concat(btoa(h),");"),p='@font-face {font-family:"'.concat(l,'";src:').concat(v,"}");this.insertRule(p);var y=this._document.createElement("div");y.style.visibility="hidden",y.style.width=y.style.height="10px",y.style.position="absolute",y.style.top=y.style.left="0px";for(var g=0,m=[t.loadedName,l];g30)return R("Load test font never loaded."),void r();u.font="30px "+e,u.fillText(".",0,20),u.getImageData(0,0,1,1).data[3]>0?r():setTimeout(t.bind(null,e,r))}(l,(function(){y.remove(),e.complete()}))}}]);var t,e}(),Xo=function(){return Uo((function t(e,r){var n=r.disableFontFace,i=void 0!==n&&n,a=r.inspectFont,o=void 0===a?null:a;for(var s in Go(this,t),this.compiledGlyphs=Object.create(null),e)this[s]=e[s];this.disableFontFace=!0===i,this._inspectFont=o}),[{key:"createNativeFontFace",value:function(){var t,e;if(!this.data||this.disableFontFace)return null;if(this.cssFontInfo){var r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}else e=new FontFace(this.loadedName,this.data,{});return null===(t=this._inspectFont)||void 0===t||t.call(this,this),e}},{key:"createFontFaceRule",value:function(){var t;if(!this.data||this.disableFontFace)return null;var e,r=X(this.data),n="url(data:".concat(this.mimetype,";base64,").concat(btoa(r),");");if(this.cssFontInfo){var i="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(i+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),e='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(i,"src:").concat(n,"}")}else e='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(n,"}");return null===(t=this._inspectFont)||void 0===t||t.call(this,this,n),e}},{key:"getPathGenerator",value:function(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];var r;try{r=t.get(this.loadedName+"_path_"+e)}catch(t){R('getPathGenerator - ignoring character: "'.concat(t,'".'))}if(!Array.isArray(r)||0===r.length)return this.compiledGlyphs[e]=function(t,e){};for(var n=[],i=function(t){switch(r[t++]){case 0:var e=Ro(r.slice(t,t+6),6),i=e[0],o=e[1],s=e[2],u=e[3],c=e[4],l=e[5];n.push((function(t){return t.bezierCurveTo(i,o,s,u,c,l)})),t+=6;break;case 1:var h=Ro(r.slice(t,t+2),2),f=h[0],d=h[1];n.push((function(t){return t.moveTo(f,d)})),t+=2;break;case 2:var v=Ro(r.slice(t,t+2),2),p=v[0],y=v[1];n.push((function(t){return t.lineTo(p,y)})),t+=2;break;case 3:var g=Ro(r.slice(t,t+4),4),m=g[0],b=g[1],w=g[2],k=g[3];n.push((function(t){return t.quadraticCurveTo(m,b,w,k)})),t+=4;break;case 4:n.push((function(t){return t.restore()}));break;case 5:n.push((function(t){return t.save()}));break;case 6:D(2===n.length,"Scale command is only valid at the third position.");break;case 7:var x=Ro(r.slice(t,t+6),6),A=x[0],_=x[1],E=x[2],S=x[3],O=x[4],T=x[5];n.push((function(t){return t.transform(A,_,E,S,O,T)})),t+=6;break;case 8:var P=Ro(r.slice(t,t+2),2),L=P[0],M=P[1];n.push((function(t){return t.translate(L,M)})),t+=2}a=t},a=0,o=r.length;a=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function as(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}if(m){var os=Promise.withResolvers(),ss=null,us=function(){var t,e=(t=is().mark((function t(){var e,r,n,i,a,o;return is().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,import("fs");case 2:return e=t.sent,t.next=5,import("http");case 5:return r=t.sent,t.next=8,import("https");case 8:return n=t.sent,t.next=11,import("url");case 11:return i=t.sent,t.prev=12,t.next=15,import("canvas");case 15:a=t.sent,t.next=20;break;case 18:t.prev=18,t.t0=t.catch(12);case 20:return t.prev=20,t.next=23,import("path2d");case 23:o=t.sent,t.next=28;break;case 26:t.prev=26,t.t1=t.catch(20);case 28:return t.abrupt("return",new Map(Object.entries({fs:e,http:r,https:n,url:i,canvas:a,path2d:o})));case 29:case"end":return t.stop()}}),t,null,[[12,18],[20,26]])})),function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){as(a,n,i,o,s,"next",t)}function s(t){as(a,n,i,o,s,"throw",t)}o(void 0)}))});return function(){return e.apply(this,arguments)}}();us().then((function(t){if(ss=t,os.resolve(),!globalThis.DOMMatrix){var e,r=null===(e=t.get("canvas"))||void 0===e?void 0:e.DOMMatrix;r?globalThis.DOMMatrix=r:R("Cannot polyfill \`DOMMatrix\`, rendering may be broken.")}if(!globalThis.Path2D){var n,i,a,o=null===(n=t.get("canvas"))||void 0===n?void 0:n.CanvasRenderingContext2D,s=null===(i=t.get("path2d"))||void 0===i?void 0:i.applyPath2DToCanvasRenderingContext,u=null===(a=t.get("path2d"))||void 0===a?void 0:a.Path2D;o&&s&&u?(s(o),globalThis.Path2D=u):R("Cannot polyfill \`Path2D\`, rendering may be broken.")}}),(function(t){R("loadPackages: ".concat(t)),ss=new Map,os.resolve()}))}var cs=function(){return rs((function t(){ts(this,t)}),null,[{key:"promise",get:function(){return os.promise}},{key:"get",value:function(t){var e;return null===(e=ss)||void 0===e?void 0:e.get(t)}}])}(),ls=function(t){return cs.get("fs").promises.readFile(t).then((function(t){return new Uint8Array(t)}))},hs=function(t){function e(){return ts(this,e),Ko(this,e,arguments)}return $o(e,pt),rs(e)}(),fs=function(t){function e(){return ts(this,e),Ko(this,e,arguments)}return $o(e,gt),rs(e,[{key:"_createCanvas",value:function(t,e){return cs.get("canvas").createCanvas(t,e)}}])}(),ds=function(t){function e(){return ts(this,e),Ko(this,e,arguments)}return $o(e,mt),rs(e,[{key:"_fetchData",value:function(t,e){return ls(t).then((function(t){return{cMapData:t,compressionType:e}}))}}])}(),vs=function(t){function e(){return ts(this,e),Ko(this,e,arguments)}return $o(e,bt),rs(e,[{key:"_fetchData",value:function(t){return ls(t)}}])}();function ps(t){return function(t){if(Array.isArray(t))return ms(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gs(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ys(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=gs(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function gs(t,e){if(t){if("string"==typeof t)return ms(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ms(t,e):void 0}}function ms(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rc[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u),c[n+1]>c[i+1]&&(u=n,n=i,i=u,u=o,o=s,s=u),c[r+1]>c[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u);var d=(c[r]+e.offsetX)*e.scaleX,v=(c[r+1]+e.offsetY)*e.scaleY,p=(c[n]+e.offsetX)*e.scaleX,y=(c[n+1]+e.offsetY)*e.scaleY,g=(c[i]+e.offsetX)*e.scaleX,m=(c[i+1]+e.offsetY)*e.scaleY;if(!(v>=m))for(var b,w,k,x,A,_,E,S,O=l[a],T=l[a+1],P=l[a+2],L=l[o],M=l[o+1],C=l[o+2],j=l[s],I=l[s+1],R=l[s+2],F=Math.round(v),D=Math.round(m),N=F;N<=D;N++){if(Nm?1:y===m?0:(y-N)/(y-m)),w=L-(L-j)*B,k=M-(M-I)*B,x=C-(C-R)*B}var G=void 0;A=d-(d-g)*(G=Nm?1:(v-N)/(v-m)),_=O-(O-j)*G,E=T-(T-I)*G,S=P-(P-R)*G;for(var H=Math.round(Math.min(b,A)),U=Math.round(Math.max(b,A)),z=f*N+4*H,V=H;V<=U;V++)(G=(b-V)/(b-A))<0?G=0:G>1&&(G=1),h[z++]=w-(w-_)*G|0,h[z++]=k-(k-E)*G|0,h[z++]=x-(x-S)*G|0,h[z++]=255}}function Rs(t,e,r){var n,i,a=e.coords,o=e.colors;switch(e.type){case"lattice":var s=e.verticesPerRow,u=Math.floor(a.length/s)-1,c=s-1;for(n=0;n=Math.ceil(d*g)?b=s:k=!0,_>=Math.ceil(v*m)?w=u:x=!0;var E=this.getSizeAndScale(b,this.ctx.canvas.width,g),S=this.getSizeAndScale(w,this.ctx.canvas.height,m),O=t.cachedCanvases.getCanvas("pattern",E.size,S.size),T=O.context,P=o.createCanvasGraphics(T);if(P.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(P,n,a),T.translate(-E.scale*c,-S.scale*l),P.transform(E.scale,0,0,S.scale,0,0),T.save(),this.clipBbox(P,c,l,h,f),P.baseTransform=je(P.ctx),P.executeOperatorList(r),P.endDrawing(),T.restore(),k||x){var L=O.canvas;k&&(b=s),x&&(w=u);for(var M=this.getSizeAndScale(b,this.ctx.canvas.width,g),C=this.getSizeAndScale(w,this.ctx.canvas.height,m),j=M.size,R=C.size,F=t.cachedCanvases.getCanvas("pattern-workaround",j,R),D=F.context,N=k?Math.floor(d/s):0,W=x?Math.floor(v/u):0,B=0;B<=N;B++)for(var G=0;G<=W;G++)D.drawImage(L,j*B,R*G,j,R,0,0,j,R);return{canvas:F.canvas,scaleX:M.scale,scaleY:C.scale,offsetX:c,offsetY:l}}return{canvas:O.canvas,scaleX:E.scale,scaleY:S.scale,offsetX:c,offsetY:l}}},{key:"getSizeAndScale",value:function(e,r,n){var i=Math.max(t.MAX_PATTERN_SIZE,r),a=Math.ceil(e*n);return a>=i?a=i:n=a/e,{scale:n,size:a}}},{key:"clipBbox",value:function(t,e,r,n,i){var a=n-e,o=i-r;t.ctx.rect(e,r,a,o),t.current.updateRectMinMax(je(t.ctx),[e,r,n,i]),t.clip(),t.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(t,e,r){var n=t.ctx,i=t.current;switch(e){case 1:var a=this.ctx;n.fillStyle=a.fillStyle,n.strokeStyle=a.strokeStyle,i.fillColor=a.fillStyle,i.strokeColor=a.strokeStyle;break;case 2:var o=Z.makeHexColor(r[0],r[1],r[2]);n.fillStyle=o,n.strokeStyle=o,i.fillColor=o,i.strokeColor=o;break;default:throw new q("Unsupported paint type: ".concat(e))}}},{key:"getPattern",value:function(t,e,r,n){var i=r;n!==Ls&&(i=Z.transform(i,e.baseTransform),this.matrix&&(i=Z.transform(i,this.matrix)));var a=this.createPatternCanvas(e),o=new DOMMatrix(i);o=(o=o.translate(a.offsetX,a.offsetY)).scale(1/a.scaleX,1/a.scaleY);var s=t.createPattern(a.canvas,"repeat");return s.setTransform(o),s}}])}();function Ws(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r>3,y=7&a,g=e.length;i=new Uint32Array(i.buffer);for(var m=0,b=0;b=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function zs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Vs(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vs(t,e){if(t){if("string"==typeof t)return qs(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qs(t,e):void 0}}function qs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]?arguments[0]:Ts,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[this.minX,this.minY,this.maxX,this.maxY];if(t===Ps){e||F("Stroke bounding box must include transform.");var n=Z.singularValueDecompose2dScale(e),i=n[0]*this.lineWidth/2,a=n[1]*this.lineWidth/2;r[0]-=i,r[1]-=a,r[2]+=i,r[3]+=a}return r}},{key:"updateClipFromPath",value:function(){var t=Z.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}},{key:"isEmptyClip",value:function(){return this.minX===1/0}},{key:"startNewPathAndClipBox",value:function(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ts,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Z.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}])}();function eu(t,e){if("undefined"!=typeof ImageData&&e instanceof ImageData)t.putImageData(e,0,0);else{var r,n,i,a,o,s=e.height,u=e.width,c=s%Js,l=(s-c)/Js,h=0===c?l:l+1,f=t.createImageData(u,Js),d=0,v=e.data,p=f.data;if(e.kind===S.GRAYSCALE_1BPP){var y=v.byteLength,g=new Uint32Array(p.buffer,0,p.byteLength>>2),m=g.length,b=u+7>>3,w=4294967295,k=J.isLittleEndian?4278190080:255;for(n=0;nb?u:8*x-7,E=-8&_,O=0,T=0;A>=1}for(;r=l&&(o=u*(a=c)),r=0,i=o;i--;)p[r++]=v[d++],p[r++]=v[d++],p[r++]=v[d++],p[r++]=255;t.putImageData(f,0,n*Js)}}}}function ru(t,e){if(e.bitmap)t.drawImage(e.bitmap,0,0);else for(var r=e.height,n=e.width,i=r%Js,a=(r-i)/Js,o=0===i?a:a+1,s=t.createImageData(n,Js),u=0,c=e.data,l=s.data,h=0;h1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}},{key:"beginDrawing",value:function(t){var e,r,n=t.transform,i=t.viewport,a=t.transparency,o=void 0!==a&&a,s=t.background,u=void 0===s?null:s,c=this.ctx.canvas.width,l=this.ctx.canvas.height,h=this.ctx.fillStyle;if(this.ctx.fillStyle=u||"#ffffff",this.ctx.fillRect(0,0,c,l),this.ctx.fillStyle=h,o){var f,d=this.cachedCanvases.getCanvas("transparent",c,l);this.compositeCtx=this.ctx,this.transparentCanvas=d.canvas,this.ctx=d.context,this.ctx.save(),(f=this.ctx).transform.apply(f,Gs(je(this.compositeCtx)))}this.ctx.save(),iu(this.ctx),n&&((r=this.ctx).transform.apply(r,Gs(n)),this.outputScaleX=n[0],this.outputScaleY=n[0]),(e=this.ctx).transform.apply(e,Gs(i.transform)),this.viewportScale=i.scale,this.baseTransform=je(this.ctx)}},{key:"executeOperatorList",value:function(t,e,r,n){var i=t.argsArray,a=t.fnArray,o=e||0,s=i.length;if(s===o)return o;for(var u,c=s-o>10&&"function"==typeof r,l=c?Date.now()+15:0,h=0,f=this.commonObjs,d=this.objs;;){if(void 0!==n&&o===n.nextBreakPoint)return n.breakIt(o,r),o;if((u=a[o])!==P.dependency)this[u].apply(this,i[o]);else{var v,p=Us(i[o]);try{for(p.s();!(v=p.n()).done;){var y=v.value,g=y.startsWith("g_")?f:d;if(!g.has(y))return g.get(y,r),o}}catch(t){p.e(t)}finally{p.f()}}if(++o===s)return o;if(c&&++h>10){if(Date.now()>l)return r(),o;h=0}}}},{key:"endDrawing",value:function(){Hs(lu,this,fu).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();var t,e=Us(this._cachedBitmapsMap.values());try{for(e.s();!(t=e.n()).done;){var r,n=t.value,i=Us(n.values());try{for(i.s();!(r=i.n()).done;){var a=r.value;"undefined"!=typeof HTMLCanvasElement&&a instanceof HTMLCanvasElement&&(a.width=a.height=0)}}catch(t){i.e(t)}finally{i.f()}n.clear()}}catch(t){e.e(t)}finally{e.f()}this._cachedBitmapsMap.clear(),Hs(lu,this,du).call(this)}},{key:"_scaleImage",value:function(t,e){for(var r,n,i=t.width,a=t.height,o=Math.max(Math.hypot(e[0],e[1]),1),s=Math.max(Math.hypot(e[2],e[3]),1),u=i,c=a,l="prescale1";o>2&&u>1||s>2&&c>1;){var h=u,f=c;o>2&&u>1&&(o/=u/(h=u>=16384?Math.floor(u/2)-1||1:Math.ceil(u/2))),s>2&&c>1&&(s/=c/(f=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2)),(n=(r=this.cachedCanvases.getCanvas(l,h,f)).context).clearRect(0,0,h,f),n.drawImage(t,0,0,u,c,0,0,h,f),t=r.canvas,u=h,c=f,l="prescale1"===l?"prescale2":"prescale1"}return{img:t,paintWidth:u,paintHeight:c}}},{key:"_createMaskCanvas",value:function(t){var e,r,n,i,a=this.ctx,o=t.width,s=t.height,u=this.current.fillColor,c=this.current.patternFill,l=je(a);if((t.bitmap||t.data)&&t.count>1){var h=t.bitmap||t.data.buffer;r=JSON.stringify(c?l:[l.slice(0,4),u]),(e=this._cachedBitmapsMap.get(h))||(e=new Map,this._cachedBitmapsMap.set(h,e));var f=e.get(r);if(f&&!c)return{canvas:f,offsetX:Math.round(Math.min(l[0],l[2])+l[4]),offsetY:Math.round(Math.min(l[1],l[3])+l[5])};n=f}n||ru((i=this.cachedCanvases.getCanvas("maskCanvas",o,s)).context,t);var d=Z.transform(l,[1/o,0,0,-1/s,0,0]);d=Z.transform(d,[1,0,0,1,0,-s]);var v=zs(Z.getAxialAlignedBoundingBox([0,0,o,s],d),4),p=v[0],y=v[1],g=v[2],m=v[3],b=Math.round(g-p)||1,w=Math.round(m-y)||1,k=this.cachedCanvases.getCanvas("fillCanvas",b,w),x=k.context,A=p,_=y;x.translate(-A,-_),x.transform.apply(x,Gs(d)),n||(n=(n=this._scaleImage(i.canvas,Ie(x))).img,e&&c&&e.set(r,n)),x.imageSmoothingEnabled=au(je(x),t.interpolate),Zs(x,n,0,0,n.width,n.height,0,0,o,s),x.globalCompositeOperation="source-in";var E=Z.transform(Ie(x),[1,0,0,1,-A,-_]);return x.fillStyle=c?u.getPattern(a,this,E,Ts):u,x.fillRect(0,0,o,s),e&&!c&&(this.cachedCanvases.delete("fillCanvas"),e.set(r,k.canvas)),{canvas:k.canvas,offsetX:Math.round(A),offsetY:Math.round(_)}}},{key:"setLineWidth",value:function(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}},{key:"setLineCap",value:function(t){this.ctx.lineCap=ou[t]}},{key:"setLineJoin",value:function(t){this.ctx.lineJoin=su[t]}},{key:"setMiterLimit",value:function(t){this.ctx.miterLimit=t}},{key:"setDash",value:function(t,e){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(t),r.lineDashOffset=e)}},{key:"setRenderingIntent",value:function(t){}},{key:"setFlatness",value:function(t){}},{key:"setGState",value:function(t){var e,r=Us(t);try{for(r.s();!(e=r.n()).done;){var n=zs(e.value,2),i=n[0],a=n[1];switch(i){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=a;break;case"ca":this.current.fillAlpha=a,this.ctx.globalAlpha=a;break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask=a?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(a)}}}catch(t){r.e(t)}finally{r.f()}}},{key:"inSMaskMode",get:function(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function(){var t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var t=this.ctx.canvas.width,e=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(r,t,e);this.suspendedCtx=this.ctx,this.ctx=n.context;var i=this.ctx;i.setTransform.apply(i,Gs(je(this.suspendedCtx))),nu(this.suspendedCtx,i),function(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=function(){t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){e.save(),this.__originalSave()},t.restore=function(){e.restore(),this.__originalRestore()},t.translate=function(t,r){e.translate(t,r),this.__originalTranslate(t,r)},t.scale=function(t,r){e.scale(t,r),this.__originalScale(t,r)},t.transform=function(t,r,n,i,a,o){e.transform(t,r,n,i,a,o),this.__originalTransform(t,r,n,i,a,o)},t.setTransform=function(t,r,n,i,a,o){e.setTransform(t,r,n,i,a,o),this.__originalSetTransform(t,r,n,i,a,o)},t.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},t.rotate=function(t){e.rotate(t),this.__originalRotate(t)},t.clip=function(t){e.clip(t),this.__originalClip(t)},t.moveTo=function(t,r){e.moveTo(t,r),this.__originalMoveTo(t,r)},t.lineTo=function(t,r){e.lineTo(t,r),this.__originalLineTo(t,r)},t.bezierCurveTo=function(t,r,n,i,a,o){e.bezierCurveTo(t,r,n,i,a,o),this.__originalBezierCurveTo(t,r,n,i,a,o)},t.rect=function(t,r,n,i){e.rect(t,r,n,i),this.__originalRect(t,r,n,i)},t.closePath=function(){e.closePath(),this.__originalClosePath()},t.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}(i,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),nu(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}},{key:"compose",value:function(t){if(this.current.activeSMask){t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var e=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}}},{key:"composeSMask",value:function(t,e,r,n){var i=n[0],a=n[1],o=n[2]-i,s=n[3]-a;0!==o&&0!==s&&(this.genericComposeSMask(e.context,r,o,s,e.subtype,e.backdrop,e.transferMap,i,a,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(r.canvas,0,0),t.restore())}},{key:"genericComposeSMask",value:function(t,e,r,n,i,a,o,s,u,c,l){var h=t.canvas,f=s-c,d=u-l;if(a)if(f<0||d<0||f+r>h.width||d+n>h.height){var v=this.cachedCanvases.getCanvas("maskExtension",r,n),p=v.context;p.drawImage(h,-f,-d),a.some((function(t){return 0!==t}))&&(p.globalCompositeOperation="destination-atop",p.fillStyle=Z.makeHexColor.apply(Z,Gs(a)),p.fillRect(0,0,r,n),p.globalCompositeOperation="source-over"),h=v.canvas,f=d=0}else if(a.some((function(t){return 0!==t}))){t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);var y=new Path2D;y.rect(f,d,r,n),t.clip(y),t.globalCompositeOperation="destination-atop",t.fillStyle=Z.makeHexColor.apply(Z,Gs(a)),t.fillRect(f,d,r,n),t.restore()}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),"Alpha"===i&&o?e.filter=this.filterFactory.addAlphaFilter(o):"Luminosity"===i&&(e.filter=this.filterFactory.addLuminosityFilter(o));var g=new Path2D;g.rect(s,u,r,n),e.clip(g),e.globalCompositeOperation="destination-in",e.drawImage(h,f,d,r,n,s,u,r,n),e.restore()}},{key:"save",value:function(){this.inSMaskMode?(nu(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();var t=this.current;this.stateStack.push(t),this.current=t.clone()}},{key:"restore",value:function(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),nu(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function(t,e,r,n,i,a){this.ctx.transform(t,e,r,n,i,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(t,e,r){for(var n,i,a=this.ctx,o=this.current,s=o.x,u=o.y,c=je(a),l=0===c[0]&&0===c[3]||0===c[1]&&0===c[2],h=l?r.slice(0):null,f=0,d=0,v=t.length;f0&&void 0!==arguments[0])||arguments[0],e=this.ctx,r=this.current.strokeColor;e.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof r&&null!=r&&r.getPattern?(e.save(),e.strokeStyle=r.getPattern(e,this,Ie(e),Ps),this.rescaleAndStroke(!1),e.restore()):this.rescaleAndStroke(!0)),t&&this.consumePath(this.current.getClippedPathBoundingBox()),e.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(e.save(),e.fillStyle=r.getPattern(e,this,Ie(e),Ts),n=!0);var i=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==i&&(this.pendingEOFill?(e.fill("evenodd"),this.pendingEOFill=!1):e.fill()),n&&e.restore(),t&&this.consumePath(i)}},{key:"eoFill",value:function(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function(){this.consumePath()}},{key:"clip",value:function(){this.pendingClip=uu}},{key:"eoClip",value:function(){this.pendingClip=cu}},{key:"beginText",value:function(){this.current.textMatrix=b,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function(){var t=this.pendingTextPaths,e=this.ctx;if(void 0!==t){e.save(),e.beginPath();var r,n=Us(t);try{for(n.s();!(r=n.n()).done;){var i=r.value;e.setTransform.apply(e,Gs(i.transform)),e.translate(i.x,i.y),i.addToPath(e,i.fontSize)}}catch(t){n.e(t)}finally{n.f()}e.restore(),e.clip(),e.beginPath(),delete this.pendingTextPaths}else e.beginPath()}},{key:"setCharSpacing",value:function(t){this.current.charSpacing=t}},{key:"setWordSpacing",value:function(t){this.current.wordSpacing=t}},{key:"setHScale",value:function(t){this.current.textHScale=t/100}},{key:"setLeading",value:function(t){this.current.leading=-t}},{key:"setFont",value:function(t,e){var r,n=this.commonObjs.get(t),i=this.current;if(!n)throw new Error("Can't find font for ".concat(t));if(i.fontMatrix=n.fontMatrix||w,0!==i.fontMatrix[0]&&0!==i.fontMatrix[3]||R("Invalid font matrix for font "+t),e<0?(e=-e,i.fontDirection=-1):i.fontDirection=1,this.current.font=n,this.current.fontSize=e,!n.isType3Font){var a=n.loadedName||"sans-serif",o=(null===(r=n.systemFontInfo)||void 0===r?void 0:r.css)||'"'.concat(a,'", ').concat(n.fallbackName),s="normal";n.black?s="900":n.bold&&(s="bold");var u=n.italic?"italic":"normal",c=e;e<16?c=16:e>100&&(c=100),this.current.fontSizeScale=e/c,this.ctx.font="".concat(u," ").concat(s," ").concat(c,"px ").concat(o)}}},{key:"setTextRenderingMode",value:function(t){this.current.textRenderingMode=t}},{key:"setTextRise",value:function(t){this.current.textRise=t}},{key:"moveText",value:function(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e}},{key:"setLeadingMoveText",value:function(t,e){this.setLeading(-e),this.moveText(t,e)}},{key:"setTextMatrix",value:function(t,e,r,n,i,a){this.current.textMatrix=[t,e,r,n,i,a],this.current.textMatrixScale=Math.hypot(t,e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function(t,e,r,n){var i,a=this.ctx,o=this.current,s=o.font,u=o.textRenderingMode,c=o.fontSize/o.fontSizeScale,l=3&u,h=!!(4&u),f=o.patternFill&&!s.missingFile;(s.disableFontFace||h||f)&&(i=s.getPathGenerator(this.commonObjs,t)),s.disableFontFace||f?(a.save(),a.translate(e,r),a.beginPath(),i(a,c),n&&a.setTransform.apply(a,Gs(n)),0!==l&&2!==l||a.fill(),1!==l&&2!==l||a.stroke(),a.restore()):(0!==l&&2!==l||a.fillText(t,e,r),1!==l&&2!==l||a.strokeText(t,e,r)),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:je(a),x:e,y:r,fontSize:c,addToPath:i})}},{key:"isFontSubpixelAAEnabled",get:function(){var t=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;t.scale(1.5,1),t.fillText("I",0,10);for(var e=t.getImageData(0,0,10,10).data,r=!1,n=3;n0&&e[n]<255){r=!0;break}return W(this,"isFontSubpixelAAEnabled",r)}},{key:"showText",value:function(t){var e=this.current,r=e.font;if(r.isType3Font)return this.showType3Text(t);var n=e.fontSize;if(0!==n){var i,a=this.ctx,o=e.fontSizeScale,s=e.charSpacing,u=e.wordSpacing,c=e.fontDirection,l=e.textHScale*c,h=t.length,f=r.vertical,d=f?1:-1,v=r.defaultVMetrics,p=n*e.fontMatrix[0],y=0===e.textRenderingMode&&!r.disableFontFace&&!e.patternFill;if(a.save(),a.transform.apply(a,Gs(e.textMatrix)),a.translate(e.x,e.y+e.textRise),c>0?a.scale(l,-1):a.scale(l,1),e.patternFill){a.save();var g=e.fillColor.getPattern(a,this,Ie(a),Ts);i=je(a),a.restore(),a.fillStyle=g}var m=e.lineWidth,b=e.textMatrixScale;if(0===b||0===m){var w=3&e.textRenderingMode;1!==w&&2!==w||(m=this.getSinglePixelWidth())}else m/=b;if(1!==o&&(a.scale(o,o),m/=o),a.lineWidth=m,r.isInvalidPDFjsFont){var k,x=[],A=0,_=Us(t);try{for(_.s();!(k=_.n()).done;){var E=k.value;x.push(E.unicode),A+=E.width}}catch(t){_.e(t)}finally{_.f()}return a.fillText(x.join(""),0,0),e.x+=A*p*l,a.restore(),void this.compose()}var S,O=0;for(S=0;S0){var W=1e3*a.measureText(M).width/n*o;if(R1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(t)?e=this.cachedPatterns.get(t):(e=function(t){switch(t[0]){case"RadialAxial":return new js(t);case"Mesh":return new Fs(t);case"Dummy":return new Ds}throw new Error("Unknown IR type: ".concat(t[0]))}(this.getObject(t)),this.cachedPatterns.set(t,e)),r&&(e.matrix=r),e}},{key:"shadingFill",value:function(t){if(this.contentVisible){var e=this.ctx;this.save();var r=this._getPattern(t);e.fillStyle=r.getPattern(e,this,Ie(e),Ls);var n=Ie(e);if(n){var i=e.canvas,a=i.width,o=i.height,s=zs(Z.getAxialAlignedBoundingBox([0,0,a,o],n),4),u=s[0],c=s[1],l=s[2],h=s[3];this.ctx.fillRect(u,c,l-u,h-c)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}},{key:"beginInlineImage",value:function(){F("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){F("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(t,e){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform.apply(this,Gs(t)),this.baseTransform=je(this.ctx),e)){var r=e[2]-e[0],n=e[3]-e[1];this.ctx.rect(e[0],e[1],r,n),this.current.updateRectMinMax(je(this.ctx),e),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(t){if(this.contentVisible){this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);var e=this.ctx;t.isolated||I("TODO: Support non-isolated groups."),t.knockout&&R("Knockout groups not supported.");var r=je(e);if(t.matrix&&e.transform.apply(e,Gs(t.matrix)),!t.bbox)throw new Error("Bounding box is required.");var n=Z.getAxialAlignedBoundingBox(t.bbox,je(e)),i=[0,0,e.canvas.width,e.canvas.height];n=Z.intersect(n,i)||[0,0,0,0];var a=Math.floor(n[0]),o=Math.floor(n[1]),s=Math.max(Math.ceil(n[2])-a,1),u=Math.max(Math.ceil(n[3])-o,1);this.current.startNewPathAndClipBox([0,0,s,u]);var c="groupAt"+this.groupLevel;t.smask&&(c+="_smask_"+this.smaskCounter++%2);var l=this.cachedCanvases.getCanvas(c,s,u),h=l.context;h.translate(-a,-o),h.transform.apply(h,Gs(r)),t.smask?this.smaskStack.push({canvas:l.canvas,context:h,offsetX:a,offsetY:o,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(a,o),e.save()),nu(e,h),this.ctx=h,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++}}},{key:"endGroup",value:function(t){if(this.contentVisible){this.groupLevel--;var e=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{var n;this.ctx.restore();var i=je(this.ctx);this.restore(),this.ctx.save(),(n=this.ctx).setTransform.apply(n,Gs(i));var a=Z.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],i);this.ctx.drawImage(e.canvas,0,0),this.ctx.restore(),this.compose(a)}}}},{key:"beginAnnotation",value:function(t,e,r,n,i){var a;if(Hs(lu,this,fu).call(this),iu(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&(a=this.ctx).setTransform.apply(a,Gs(this.baseTransform)),e){var o=e[2]-e[0],s=e[3]-e[1];if(i&&this.annotationCanvasMap){(r=r.slice())[4]-=e[0],r[5]-=e[1],(e=e.slice())[0]=e[1]=0,e[2]=o,e[3]=s;var u=zs(Z.singularValueDecompose2dScale(je(this.ctx)),2),c=u[0],l=u[1],h=this.viewportScale,f=Math.ceil(o*this.outputScaleX*h),d=Math.ceil(s*this.outputScaleY*h);this.annotationCanvas=this.canvasFactory.create(f,d);var v=this.annotationCanvas,p=v.canvas,y=v.context;this.annotationCanvasMap.set(t,p),this.annotationCanvas.savedCtx=this.ctx,this.ctx=y,this.ctx.save(),this.ctx.setTransform(c,0,0,-l,0,s*l),iu(this.ctx)}else iu(this.ctx),this.endPath(),this.ctx.rect(e[0],e[1],o,s),this.ctx.clip(),this.ctx.beginPath()}this.current=new tu(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,Gs(r)),this.transform.apply(this,Gs(n))}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx.restore(),Hs(lu,this,du).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}},{key:"paintImageMaskXObject",value:function(t){if(this.contentVisible){var e=t.count;(t=this.getObject(t.data,t)).count=e;var r=this.ctx,n=this.processingType3;if(n&&(void 0===n.compiled&&(n.compiled=function(t){var e=t.width,r=t.height;if(e>1e3||r>1e3)return null;var n,i,a,o,s=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),u=e+1,c=new Uint8Array(u*(r+1)),l=e+7&-8,h=new Uint8Array(l*r),f=0,d=Us(t.data);try{for(d.s();!(o=d.n()).done;)for(var v=o.value,p=128;p>0;)h[f++]=v&p?0:255,p>>=1}catch(t){d.e(t)}finally{d.f()}var y=0;for(0!==h[f=0]&&(c[0]=1,++y),i=1;i>2)+(h[f+1]?4:0)+(h[f-l+1]?8:0)]&&(c[a+i]=s[g],++y),f++;if(h[f-l]!==h[f]&&(c[a+i]=h[f]?2:4,++y),y>1e3)return null}for(a=n*u,0!==h[f=l*(r-1)]&&(c[a]=8,++y),i=1;i1e3)return null;var m=new Int32Array([0,u,-1,0,-u,0,0,0,1]),b=new Path2D;for(n=0;y&&n<=r;n++){for(var w=n*u,k=w+e;w>4,c[w]&=A>>2|A<<2),b.lineTo(w%u,w/u|0),c[w]||--y}while(x!==w);--n}}return h=null,c=null,function(t){t.save(),t.scale(1/e,-1/r),t.translate(0,-r),t.fill(b),t.beginPath(),t.restore()}}(t)),n.compiled))n.compiled(r);else{var i=this._createMaskCanvas(t),a=i.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(a,i.offsetX,i.offsetY),r.restore(),this.compose()}}}},{key:"paintImageMaskXObjectRepeat",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){t=this.getObject(t.data,t);var o=this.ctx;o.save();var s=je(o);o.transform(e,r,n,i,0,0);var u=this._createMaskCanvas(t);o.setTransform(1,0,0,1,u.offsetX-s[4],u.offsetY-s[5]);for(var c=0,l=a.length;cy?p/y:1,e=v>y?v/y:1}}this._cachedScaleForStroking[0]=t,this._cachedScaleForStroking[1]=e}return this._cachedScaleForStroking}},{key:"rescaleAndStroke",value:function(t){var e=this.ctx,r=this.current.lineWidth,n=zs(this.getScaleForStroking(),2),i=n[0],a=n[1];if(e.lineWidth=r||1,1!==i||1!==a){var o=e.getLineDash();if(t&&e.save(),e.scale(i,a),o.length>0){var s=Math.max(i,a);e.setLineDash(o.map((function(t){return t/s}))),e.lineDashOffset/=s}e.stroke(),t&&e.restore()}else e.stroke()}},{key:"isContentVisible",value:function(){for(var t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}])}();function fu(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}function du(){if(this.pageColors){var t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){var e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}}for(var vu in P)void 0!==hu.prototype[vu]&&(hu.prototype[P[vu]]=hu.prototype[vu]);function pu(t,e){for(var r=0;r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function xu(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Au(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var s=this.desiredSize;this.desiredSize-=a,s>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:r,targetName:n,stream:4,streamId:e,chunk:t},o)}},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:n,stream:3,streamId:e}),delete a.streamSinks[e])},error(t){D(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:n,stream:5,streamId:e,reason:Su(t)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};s.sinkCapability.resolve(),s.ready=s.sinkCapability.promise,this.streamSinks[e]=s,new Promise((function(e){e(o(t.data,s))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:8,streamId:e,success:!0})}),(function(t){i.postMessage({sourceName:r,targetName:n,stream:8,streamId:e,reason:Su(t)})}))}function Lu(t){var e=t.streamId,r=this.sourceName,n=t.sourceName,i=this.comObj,a=this.streamControllers[e],o=this.streamSinks[e];switch(t.stream){case 8:t.success?a.startCall.resolve():a.startCall.reject(Su(t.reason));break;case 7:t.success?a.pullCall.resolve():a.pullCall.reject(Su(t.reason));break;case 6:if(!o){i.postMessage({sourceName:r,targetName:n,stream:7,streamId:e,success:!0});break}o.desiredSize<=0&&t.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=t.desiredSize,new Promise((function(t){var e;t(null===(e=o.onPull)||void 0===e?void 0:e.call(o))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:7,streamId:e,success:!0})}),(function(t){i.postMessage({sourceName:r,targetName:n,stream:7,streamId:e,reason:Su(t)})}));break;case 4:if(D(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case 3:if(D(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),Eu(Ou,this,Mu).call(this,a,e);break;case 5:D(a,"error should have stream controller"),a.controller.error(Su(t.reason)),Eu(Ou,this,Mu).call(this,a,e);break;case 2:t.success?a.cancelCall.resolve():a.cancelCall.reject(Su(t.reason)),Eu(Ou,this,Mu).call(this,a,e);break;case 1:if(!o)break;new Promise((function(e){var r;e(null===(r=o.onCancel)||void 0===r?void 0:r.call(o,Su(t.reason)))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:2,streamId:e,success:!0})}),(function(t){i.postMessage({sourceName:r,targetName:n,stream:2,streamId:e,reason:Su(t)})})),o.sinkCapability.reject(Su(t.reason)),o.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}function Mu(t,e){return Cu.apply(this,arguments)}function Cu(){var t;return t=ku().mark((function t(e,r){var n,i,a;return ku().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.allSettled([null===(n=e.startCall)||void 0===n?void 0:n.promise,null===(i=e.pullCall)||void 0===i?void 0:i.promise,null===(a=e.cancelCall)||void 0===a?void 0:a.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return t.stop()}}),t,this)})),Cu=function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){xu(a,n,i,o,s,"next",t)}function s(t){xu(a,n,i,o,s,"throw",t)}o(void 0)}))},Cu.apply(this,arguments)}function ju(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function zu(t,e){if(t){if("string"==typeof t)return Vu(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vu(t,e):void 0}}function Vu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r2&&void 0!==arguments[2]&&arguments[2];t!==ec&&F("Internal method \`_setVisible\` called."),Zu(ic,this,r),Zu(ac,this,e)}}])}(),sc=new WeakMap,uc=new WeakMap,cc=new WeakMap,lc=new WeakMap,hc=new WeakSet,fc=function(){return Xu((function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(qu(this,t),function(t,e){Ju(t,e),e.add(t)}(this,hc),Qu(this,sc,null),Qu(this,uc,new Map),Qu(this,cc,null),Qu(this,lc,null),this.renderingIntent=r,this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,Zu(lc,this,e.order);var n,i=Uu(e.groups);try{for(i.s();!(n=i.n()).done;){var a=n.value;$u(uc,this).set(a.id,new oc(r,a))}}catch(t){i.e(t)}finally{i.f()}if("OFF"===e.baseState){var o,s=Uu($u(uc,this).values());try{for(s.s();!(o=s.n()).done;)o.value._setVisible(ec,!1)}catch(t){s.e(t)}finally{s.f()}}var u,c=Uu(e.on);try{for(c.s();!(u=c.n()).done;){var l=u.value;$u(uc,this).get(l)._setVisible(ec,!0)}}catch(t){c.e(t)}finally{c.f()}var h,f=Uu(e.off);try{for(f.s();!(h=f.n()).done;){var d=h.value;$u(uc,this).get(d)._setVisible(ec,!1)}}catch(t){f.e(t)}finally{f.f()}Zu(cc,this,this.getHash())}}),[{key:"isVisible",value:function(t){if(0===$u(uc,this).size)return!0;if(!t)return I("Optional content group not defined."),!0;if("OCG"===t.type)return $u(uc,this).has(t.id)?$u(uc,this).get(t.id).visible:(R("Optional content group not found: ".concat(t.id)),!0);if("OCMD"===t.type){if(t.expression)return tc(hc,this,dc).call(this,t.expression);if(!t.policy||"AnyOn"===t.policy){var e,r=Uu(t.ids);try{for(r.s();!(e=r.n()).done;){var n=e.value;if(!$u(uc,this).has(n))return R("Optional content group not found: ".concat(n)),!0;if($u(uc,this).get(n).visible)return!0}}catch(t){r.e(t)}finally{r.f()}return!1}if("AllOn"===t.policy){var i,a=Uu(t.ids);try{for(a.s();!(i=a.n()).done;){var o=i.value;if(!$u(uc,this).has(o))return R("Optional content group not found: ".concat(o)),!0;if(!$u(uc,this).get(o).visible)return!1}}catch(t){a.e(t)}finally{a.f()}return!0}if("AnyOff"===t.policy){var s,u=Uu(t.ids);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(!$u(uc,this).has(c))return R("Optional content group not found: ".concat(c)),!0;if(!$u(uc,this).get(c).visible)return!0}}catch(t){u.e(t)}finally{u.f()}return!1}if("AllOff"===t.policy){var l,h=Uu(t.ids);try{for(h.s();!(l=h.n()).done;){var f=l.value;if(!$u(uc,this).has(f))return R("Optional content group not found: ".concat(f)),!0;if($u(uc,this).get(f).visible)return!1}}catch(t){h.e(t)}finally{h.f()}return!0}return R("Unknown optional content policy ".concat(t.policy,".")),!0}return R("Unknown group type ".concat(t.type,".")),!0}},{key:"setVisibility",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=$u(uc,this).get(t);r?(r._setVisible(ec,!!e,!0),Zu(sc,this,null)):R("Optional content group not found: ".concat(t))}},{key:"setOCGState",value:function(t){var e,r,n=t.state,i=(t.preserveRB,Uu(n));try{for(i.s();!(r=i.n()).done;){var a=r.value;switch(a){case"ON":case"OFF":case"Toggle":e=a;continue}var o=$u(uc,this).get(a);if(o)switch(e){case"ON":o._setVisible(ec,!0);break;case"OFF":o._setVisible(ec,!1);break;case"Toggle":o._setVisible(ec,!o.visible)}}}catch(t){i.e(t)}finally{i.f()}Zu(sc,this,null)}},{key:"hasInitialVisibility",get:function(){return null===$u(cc,this)||this.getHash()===$u(cc,this)}},{key:"getOrder",value:function(){return $u(uc,this).size?$u(lc,this)?$u(lc,this).slice():function(t){return function(t){if(Array.isArray(t))return Vu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||zu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}($u(uc,this).keys()):null}},{key:"getGroups",value:function(){return $u(uc,this).size>0?Q($u(uc,this)):null}},{key:"getGroup",value:function(t){return $u(uc,this).get(t)||null}},{key:"getHash",value:function(){if(null!==$u(sc,this))return $u(sc,this);var t,e=new so,r=Uu($u(uc,this));try{for(r.s();!(t=r.n()).done;){var n=Hu(t.value,2),i=n[0],a=n[1];e.update("".concat(i,":").concat(a.visible))}}catch(t){r.e(t)}finally{r.f()}return Zu(sc,this,e.hexdigest())}}])}();function dc(t){var e=t.length;if(e<2)return!0;for(var r=t[0],n=1;n=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function pc(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function yc(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){pc(a,n,i,o,s,"next",t)}function s(t){pc(a,n,i,o,s,"throw",t)}o(void 0)}))}}function gc(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mc(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function mc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0){var f=c instanceof Uint8Array&&c.byteLength===c.buffer.byteLength?c.buffer:new Uint8Array(c).buffer;this._queuedChunks.push(f)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!s,this._isRangeSupported=!a,this._contentLength=u,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((function(t,e){n._onReceiveData({begin:t,chunk:e})})),e.addProgressListener((function(t,e){n._onProgress({loaded:t,total:e})})),e.addProgressiveReadListener((function(t){n._onReceiveData({chunk:t})})),e.addProgressiveDoneListener((function(){n._onProgressiveDone()})),e.transportReady()}),[{key:"_onReceiveData",value:function(t){var e=t.begin,r=t.chunk,n=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;void 0===e?this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n):D(this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(n),!0)})),"_onReceiveData - no \`PDFDataTransportStreamRangeReader\` instance found.")}},{key:"_progressiveDataLength",get:function(){var t,e;return null!==(t=null===(e=this._fullRequestReader)||void 0===e?void 0:e._loaded)&&void 0!==t?t:0}},{key:"_onProgress",value:function(t){var e,r,n,i;void 0===t.total?null===(e=this._rangeReaders[0])||void 0===e||null===(r=e.onProgress)||void 0===r||r.call(e,{loaded:t.loaded}):null===(n=this._fullRequestReader)||void 0===n||null===(i=n.onProgress)||void 0===i||i.call(n,{loaded:t.loaded,total:t.total})}},{key:"_onProgressiveDone",value:function(){var t;null===(t=this._fullRequestReader)||void 0===t||t.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(t){var e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}},{key:"getFullReader",value:function(){D(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var t=this._queuedChunks;return this._queuedChunks=null,new _c(this,t,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(t,e){if(e<=this._progressiveDataLength)return null;var r=new Ec(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(t){var e;null===(e=this._fullRequestReader)||void 0===e||e.cancel(t);var r,n=gc(this._rangeReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(t)}catch(t){n.e(t)}finally{n.f()}this._pdfDataRangeTransport.abort()}}])}(),_c=function(){return kc((function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;bc(this,t),this._stream=e,this._done=n||!1,this._filename=xe(i)?i:null,this._queuedChunks=r||[],this._loaded=0;var a,o=gc(this._queuedChunks);try{for(o.s();!(a=o.n()).done;){var s=a.value;this._loaded+=s.byteLength}}catch(t){o.e(t)}finally{o.f()}this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}),[{key:"_enqueue",value:function(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}},{key:"read",value:(t=yc(vc().mark((function t(){var e,r;return vc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._queuedChunks.length>0)){t.next=3;break}return e=this._queuedChunks.shift(),t.abrupt("return",{value:e,done:!1});case 3:if(!this._done){t.next=5;break}return t.abrupt("return",{value:void 0,done:!0});case 5:return r=Promise.withResolvers(),this._requests.push(r),t.abrupt("return",r.promise);case 8:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._done=!0;var e,r=gc(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]);var t}(),Ec=function(){return kc((function t(e,r,n){bc(this,t),this._stream=e,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}),[{key:"_enqueue",value:function(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});var e,r=gc(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=yc(vc().mark((function t(){var e,r;return vc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._queuedChunk){t.next=4;break}return e=this._queuedChunk,this._queuedChunk=null,t.abrupt("return",{value:e,done:!1});case 4:if(!this._done){t.next=6;break}return t.abrupt("return",{value:void 0,done:!0});case 6:return r=Promise.withResolvers(),this._requests.push(r),t.abrupt("return",r.promise);case 9:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._done=!0;var e,r=gc(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]);var t}();function Sc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Oc(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oc(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Ic(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Rc(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Ic(a,n,i,o,s,"next",t)}function s(t){Ic(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Fc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(t)}catch(t){n.e(t)}finally{n.f()}}}])}(),zc=function(){return Wc((function t(e){var r=this;Dc(this,t),this._stream=e,this._reader=null,this._loaded=0,this._filename=null;var n=e.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=Promise.withResolvers(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange;var i=new Headers(e.headers),a=n.url;fetch(a,Gc(i,this._withCredentials,this._abortController)).then((function(t){if(!Cc(t.status))throw Mc(t.status,a);r._reader=t.body.getReader(),r._headersCapability.resolve();var n=t.headers,i=Pc({responseHeaders:n,isHttp:e.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),o=i.allowRangeRequests,s=i.suggestedLength;r._isRangeSupported=o,r._contentLength=s||r._contentLength,r._filename=Lc(n),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new Y("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}),[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=Rc(jc().mark((function t(){var e,r,n,i;return jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._headersCapability.promise;case 2:return t.next=4,this._reader.read();case 4:if(r=t.sent,n=r.value,!(i=r.done)){t.next=9;break}return t.abrupt("return",{value:n,done:i});case 9:return this._loaded+=n.byteLength,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded,total:this._contentLength}),t.abrupt("return",{value:Hc(n),done:!1});case 12:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){var e;null===(e=this._reader)||void 0===e||e.cancel(t),this._abortController.abort()}}]);var t}(),Vc=function(){return Wc((function t(e,r,n){var i=this;Dc(this,t),this._stream=e,this._reader=null,this._loaded=0;var a=e.source;this._withCredentials=a.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!a.disableStream,this._abortController=new AbortController;var o=new Headers(e.headers);o.append("Range","bytes=".concat(r,"-").concat(n-1));var s=a.url;fetch(s,Gc(o,this._withCredentials,this._abortController)).then((function(t){if(!Cc(t.status))throw Mc(t.status,s);i._readCapability.resolve(),i._reader=t.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}),[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=Rc(jc().mark((function t(){var e,r,n,i;return jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._readCapability.promise;case 2:return t.next=4,this._reader.read();case 4:if(r=t.sent,n=r.value,!(i=r.done)){t.next=9;break}return t.abrupt("return",{value:n,done:i});case 9:return this._loaded+=n.byteLength,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded}),t.abrupt("return",{value:Hc(n),done:!1});case 12:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){var e;null===(e=this._reader)||void 0===e||e.cancel(t),this._abortController.abort()}}]);var t}();function qc(){qc=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Yc(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Xc(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Yc(a,n,i,o,s,"next",t)}function s(t){Yc(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Kc(t,e){return Jc(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Zc(t,e)||Qc()}function Qc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Jc(t){if(Array.isArray(t))return t}function $c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Zc(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Zc(t,e){if(t){if("string"==typeof t)return tl(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tl(t,e):void 0}}function tl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&t in this.pendingRequests)if(delete this.pendingRequests[t],0===n.status&&this.isHttp){var i;null===(i=r.onError)||void 0===i||i.call(r,n.status)}else{var a=n.status||200;if(200===a&&206===r.expectedStatus||a===r.expectedStatus){var o=function(t){var e=t.response;return"string"!=typeof e?e:K(e).buffer}(n);if(206===a){var s=n.getResponseHeader("Content-Range"),u=/bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(s);r.onDone({begin:parseInt(u[1],10),chunk:o})}else if(o)r.onDone({begin:0,chunk:o});else{var c;null===(c=r.onError)||void 0===c||c.call(r,n.status)}}else{var l;null===(l=r.onError)||void 0===l||l.call(r,n.status)}}}}},{key:"getRequestXhr",value:function(t){return this.pendingRequests[t].xhr}},{key:"isPendingRequest",value:function(t){return t in this.pendingRequests}},{key:"abortRequest",value:function(t){var e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}])}(),ol=function(){return nl((function t(e){el(this,t),this._source=e,this._manager=new al(e),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}),[{key:"_onRangeRequestReaderClosed",value:function(t){var e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}},{key:"getFullReader",value:function(){return D(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new sl(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(t,e){var r=new ul(this._manager,t,e);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(t){var e;null===(e=this._fullRequestReader)||void 0===e||e.cancel(t);var r,n=$c(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(t)}catch(t){n.e(t)}finally{n.f()}}}])}(),sl=function(){return nl((function t(e,r){el(this,t),this._manager=e;var n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url,this._fullRequestId=e.requestFull(n),this._headersCapability=Promise.withResolvers(),this._disableRange=r.disableRange||!1,this._contentLength=r.length,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}),[{key:"_onHeadersReceived",value:function(){var t=this._fullRequestId,e=this._manager.getRequestXhr(t),r=new Headers(e.getAllResponseHeaders().trim().split(/[\\r\\n]+/).map((function(t){var e=function(t){return Jc(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Zc(t)||Qc()}(t.split(": "));return[e[0],e.slice(1).join(": ")]}))),n=Pc({responseHeaders:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),i=n.allowRangeRequests,a=n.suggestedLength;i&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=Lc(r),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}},{key:"_onDone",value:function(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0}}},{key:"_onError",value:function(t){this._storedError=Mc(t,this._url),this._headersCapability.reject(this._storedError);var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.reject(this._storedError)}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(t){var e;null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"read",value:(t=Xc(qc().mark((function t(){var e,r;return qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._storedError){t.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){t.next=5;break}return e=this._cachedChunks.shift(),t.abrupt("return",{value:e,done:!1});case 5:if(!this._done){t.next=7;break}return t.abrupt("return",{value:void 0,done:!0});case 7:return r=Promise.withResolvers(),this._requests.push(r),t.abrupt("return",r.promise);case 10:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._done=!0,this._headersCapability.reject(t);var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]);var t}(),ul=function(){return nl((function t(e,r,n){el(this,t),this._manager=e;var i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(r,n,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}),[{key:"_close",value:function(){var t;null===(t=this.onClosed)||void 0===t||t.call(this,this)}},{key:"_onDone",value:function(t){var e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;var r,n=$c(this._requests);try{for(n.s();!(r=n.n()).done;)r.value.resolve({value:void 0,done:!0})}catch(t){n.e(t)}finally{n.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(t){this._storedError=Mc(t,this._url);var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.reject(this._storedError)}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(t){var e;this.isStreamingSupported||null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:t.loaded})}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=Xc(qc().mark((function t(){var e,r;return qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._storedError){t.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){t.next=6;break}return e=this._queuedChunk,this._queuedChunk=null,t.abrupt("return",{value:e,done:!1});case 6:if(!this._done){t.next=8;break}return t.abrupt("return",{value:void 0,done:!0});case 8:return r=Promise.withResolvers(),this._requests.push(r),t.abrupt("return",r.promise);case 11:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._done=!0;var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]);var t}();function cl(t,e,r){return e=hl(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ll()?Reflect.construct(e,r||[],hl(t).constructor):e.apply(t,r))}function ll(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ll=function(){return!!t})()}function hl(t){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hl(t)}function fl(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dl(t,e)}function dl(t,e){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dl(t,e)}function vl(){vl=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function pl(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function yl(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){pl(a,n,i,o,s,"next",t)}function s(t){pl(a,n,i,o,s,"throw",t)}o(void 0)}))}}function gl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(t)}catch(t){n.e(t)}finally{n.f()}}}])}(),Sl=function(){return wl((function t(e){ml(this,t),this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;var r=e.source;this._contentLength=r.length,this._loaded=0,this._filename=null,this._disableRange=r.disableRange||!1,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!r.disableStream,this._isRangeSupported=!r.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}),[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=yl(vl().mark((function t(){var e,r,n;return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._readCapability.promise;case 2:if(!this._done){t.next=4;break}return t.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){t.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){t.next=10;break}return this._readCapability=Promise.withResolvers(),t.abrupt("return",this.read());case 10:return this._loaded+=r.length,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded,total:this._contentLength}),n=new Uint8Array(r).buffer,t.abrupt("return",{value:n,done:!1});case 14:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function(t){this._storedError=t,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(t){var e=this;this._readableStream=t,t.on("readable",(function(){e._readCapability.resolve()})),t.on("end",(function(){t.destroy(),e._done=!0,e._readCapability.resolve()})),t.on("error",(function(t){e._error(t)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Y("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t}(),Ol=function(){return wl((function t(e){ml(this,t),this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();var r=e.source;this._isStreamingSupported=!r.disableStream}),[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=yl(vl().mark((function t(){var e,r,n;return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._readCapability.promise;case 2:if(!this._done){t.next=4;break}return t.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){t.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){t.next=10;break}return this._readCapability=Promise.withResolvers(),t.abrupt("return",this.read());case 10:return this._loaded+=r.length,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded}),n=new Uint8Array(r).buffer,t.abrupt("return",{value:n,done:!1});case 14:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function(t){this._storedError=t,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(t){var e=this;this._readableStream=t,t.on("readable",(function(){e._readCapability.resolve()})),t.on("end",(function(){t.destroy(),e._done=!0,e._readCapability.resolve()})),t.on("error",(function(t){e._error(t)})),this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t}(),Tl=function(t){function e(t){var r;ml(this,e),r=cl(this,e,[t]);var n=Object.fromEntries(t.headers);return r._request=Al(r._url,n,(function(e){if(404===e.statusCode){var n=new z('Missing PDF "'.concat(r._url,'".'));return r._storedError=n,void r._headersCapability.reject(n)}r._headersCapability.resolve(),r._setReadableStream(e);var i=new Headers(r._readableStream.headers),a=Pc({responseHeaders:i,isHttp:t.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),o=a.allowRangeRequests,s=a.suggestedLength;r._isRangeSupported=o,r._contentLength=s||r._contentLength,r._filename=Lc(i)})),r._request.on("error",(function(t){r._storedError=t,r._headersCapability.reject(t)})),r._request.end(),r}return fl(e,Sl),wl(e)}(),Pl=function(t){function e(t,r,n){var i;ml(this,e),i=cl(this,e,[t]);var a=Object.fromEntries(t.headers);return a.Range="bytes=".concat(r,"-").concat(n-1),i._request=Al(i._url,a,(function(t){if(404!==t.statusCode)i._setReadableStream(t);else{var e=new z('Missing PDF "'.concat(i._url,'".'));i._storedError=e}})),i._request.on("error",(function(t){i._storedError=t})),i._request.end(),i}return fl(e,Ol),wl(e)}(),Ll=function(t){function e(t){var r;ml(this,e),r=cl(this,e,[t]);var n=cs.get("fs");return n.promises.lstat(r._url).then((function(t){r._contentLength=t.size,r._setReadableStream(n.createReadStream(r._url)),r._headersCapability.resolve()}),(function(t){"ENOENT"===t.code&&(t=new z('Missing PDF "'.concat(r._url,'".'))),r._storedError=t,r._headersCapability.reject(t)})),r}return fl(e,Sl),wl(e)}(),Ml=function(t){function e(t,r,n){var i;ml(this,e),i=cl(this,e,[t]);var a=cs.get("fs");return i._setReadableStream(a.createReadStream(i._url,{start:r,end:n-1})),i}return fl(e,Ol),wl(e)}();function Cl(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return jl(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function jl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0)){Bl(t,this,yh)._.clear();var e,r=Cl(Bl(t,this,gh)._.values());try{for(r.s();!(e=r.n()).done;)e.value.canvas.remove()}catch(t){r.e(t)}finally{r.f()}Bl(t,this,gh)._.clear()}}}])}();function ch(t){var e,r;if(!Nl(Vl,this)){null!==(r=(e=Nl(Xl,this)).ctx)&&void 0!==r||(e.ctx=fh.call(_l,Nl(Yl,this)));var n,i=Nl(ih,this),a=Nl(rh,this),o=Cl(t);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(i.length>1e5)return R("Ignoring additional textDivs for performance reasons."),void Wl(Vl,this,!0);if(void 0!==s.str)a.push(s.str),Bl(sh,this,lh).call(this,s);else if("beginMarkedContentProps"===s.type||"beginMarkedContent"===s.type){var u=Nl(zl,this);Wl(zl,this,document.createElement("span")),Nl(zl,this).classList.add("markedContent"),null!==s.id&&Nl(zl,this).setAttribute("id","".concat(s.id)),u.append(Nl(zl,this))}else"endMarkedContent"===s.type&&Wl(zl,this,Nl(zl,this).parentNode)}}catch(t){o.e(t)}finally{o.f()}}}function lh(t){var e=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};Nl(ih,this).push(e);var n=Z.transform(Nl(oh,this),t.transform),i=Math.atan2(n[1],n[0]),a=Nl(eh,this)[t.fontName];a.vertical&&(i+=Math.PI/2);var o=Nl(ql,this)&&a.fontSubstitution||a.fontFamily;o=_l.fontFamilyMap.get(o)||o;var s,u,c=Math.hypot(n[2],n[3]),l=c*ph.call(_l,o,Nl(Yl,this));0===i?(s=n[4],u=n[5]-l):(s=n[4]+l*Math.sin(i),u=n[5]-l*Math.cos(i));var h="calc(var(--scale-factor)*",f=e.style;Nl(zl,this)===Nl($l,this)?(f.left="".concat((100*s/Nl(Ql,this)).toFixed(2),"%"),f.top="".concat((100*u/Nl(Kl,this)).toFixed(2),"%")):(f.left="".concat(h).concat(s.toFixed(2),"px)"),f.top="".concat(h).concat(u.toFixed(2),"px)")),f.fontSize="".concat(h).concat((bh._*c).toFixed(2),"px)"),f.fontFamily=o,r.fontSize=c,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,Nl(ql,this)&&(e.dataset.fontName=a.fontSubstitutionLoadedName||t.fontName),0!==i&&(r.angle=i*(180/Math.PI));var d=!1;if(t.str.length>1)d=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){var v=Math.abs(t.transform[0]),p=Math.abs(t.transform[3]);v!==p&&Math.max(v,p)/Math.min(v,p)>1.5&&(d=!0)}if(d&&(r.canvasWidth=a.vertical?t.height:t.width),Nl(ah,this).set(e,r),Nl(Xl,this).div=e,Nl(Xl,this).properties=r,Bl(sh,this,hh).call(this,Nl(Xl,this)),r.hasText&&Nl(zl,this).append(e),r.hasEOL){var y=document.createElement("br");y.setAttribute("role","presentation"),Nl(zl,this).append(y)}}function hh(t){var e=t.div,r=t.properties,n=t.ctx,i=e.style,a="";if(bh._>1&&(a="scale(".concat(1/bh._,")")),0!==r.canvasWidth&&r.hasText){var o=i.fontFamily,s=r.canvasWidth,u=r.fontSize;dh.call(_l,n,u*Nl(th,this),o);var c=n.measureText(e.textContent).width;c>0&&(a="scaleX(".concat(s*Nl(th,this)/c,") ").concat(a))}0!==r.angle&&(a="rotate(".concat(r.angle,"deg) ").concat(a)),a.length>0&&(i.transform=a)}function fh(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=Bl(_l,this,gh)._.get(t||(t=""));if(!e){var r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=t,document.body.append(r),e=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),Bl(_l,this,gh)._.set(t,e),Bl(_l,this,mh)._.set(e,{size:0,family:""})}return e}function dh(t,e,r){var n=Bl(_l,this,mh)._.get(t);e===n.size&&r===n.family||(t.font="".concat(e,"px ").concat(r),n.size=e,n.family=r)}function vh(){if(null===Bl(_l,this,bh)._){var t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),bh._=Bl(_l,this,t.getBoundingClientRect().height),t.remove()}}function ph(t,e){var r=Bl(_l,this,yh)._.get(t);if(r)return r;var n=Bl(_l,this,fh).call(this,e);n.canvas.width=n.canvas.height=Gl,Bl(_l,this,dh).call(this,n,Gl,t);var i=n.measureText(""),a=i.fontBoundingBoxAscent,o=Math.abs(i.fontBoundingBoxDescent);if(a){var s=a/(a+o);return Bl(_l,this,yh)._.set(t,s),n.canvas.width=n.canvas.height=0,s}n.strokeStyle="red",n.clearRect(0,0,Gl,Gl),n.strokeText("g",0,0);var u=n.getImageData(0,0,Gl,Gl).data;o=0;for(var c=u.length-1-3;c>=0;c-=4)if(u[c]>0){o=Math.ceil(c/4/Gl);break}n.clearRect(0,0,Gl,Gl),n.strokeText("A",0,Gl),a=0;for(var l=0,h=(u=n.getImageData(0,0,Gl,Gl).data).length;l0){a=Gl-Math.floor(l/4/Gl);break}n.canvas.width=n.canvas.height=0;var f=a?a/(a+o):Hl;return Bl(_l,this,yh)._.set(t,f),f}_l=uh;var yh={_:new Map},gh={_:new Map},mh={_:new WeakMap},bh={_:null},wh={_:new Set};function kh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(n.children);try{for(u.s();!(s=u.n()).done;)e(s.value)}catch(t){u.e(t)}finally{u.f()}}}}(e),n}},{key:"shouldBuildText",value:function(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}])}();function Sh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Oh(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Nh(t,e){if(t){if("string"==typeof t)return Wh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wh(t,e):void 0}}function Wh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Gh(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Hh(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Gh(a,n,i,o,s,"next",t)}function s(t){Gh(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Uh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zh(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};"string"==typeof r||r instanceof URL?r={url:r}:(r instanceof ArrayBuffer||ArrayBuffer.isView(r))&&(r={data:r});var n=new tf,i=n.docId,a=r.url?function(t){if(t instanceof URL)return t.href;try{return new URL(t,window.location).href}catch(e){if(m&&"string"==typeof t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(r.url):null,o=r.data?function(t){if(m&&"undefined"!=typeof Buffer&&t instanceof Buffer)throw new Error("Please provide binary data as \`Uint8Array\`, rather than \`Buffer\`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if("string"==typeof t)return K(t);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)||"object"==typeof t&&!isNaN(null==t?void 0:t.length))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(r.data):null,s=r.httpHeaders||null,u=!0===r.withCredentials,c=null!==(t=r.password)&&void 0!==t?t:null,l=r.range instanceof rf?r.range:null,h=Number.isInteger(r.rangeChunkSize)&&r.rangeChunkSize>0?r.rangeChunkSize:Yh,f=r.worker instanceof pf?r.worker:null,d=r.verbosity,v="string"!=typeof r.docBaseUrl||ke(r.docBaseUrl)?null:r.docBaseUrl,p="string"==typeof r.cMapUrl?r.cMapUrl:null,y=!1!==r.cMapPacked,g=r.CMapReaderFactory||Kh,b="string"==typeof r.standardFontDataUrl?r.standardFontDataUrl:null,w=r.StandardFontDataFactory||Jh,k=!0!==r.stopAtErrors,x=Number.isInteger(r.maxImageSize)&&r.maxImageSize>-1?r.maxImageSize:-1,A=!1!==r.isEvalSupported,_="boolean"==typeof r.isOffscreenCanvasSupported?r.isOffscreenCanvasSupported:!m,E=Number.isInteger(r.canvasMaxAreaInBytes)?r.canvasMaxAreaInBytes:-1,S="boolean"==typeof r.disableFontFace?r.disableFontFace:m,O=!0===r.fontExtraProperties,T=!0===r.enableXfa,P=r.ownerDocument||globalThis.document,L=!0===r.disableRange,M=!0===r.disableStream,j=!0===r.disableAutoFetch,I=!0===r.pdfBug,R=r.CanvasFactory||Xh,F=r.FilterFactory||Qh,D=!0===r.enableHWA,N=l?l.length:null!==(e=r.length)&&void 0!==e?e:NaN,W="boolean"==typeof r.useSystemFonts?r.useSystemFonts:!m&&!S,B="boolean"==typeof r.useWorkerFetch?r.useWorkerFetch:g===ye&&w===ge&&p&&b&&Oe(p,document.baseURI)&&Oe(b,document.baseURI);r.canvasFactory&&Pe("\`canvasFactory\`-instance option, please use \`CanvasFactory\` instead."),r.filterFactory&&Pe("\`filterFactory\`-instance option, please use \`FilterFactory\` instead."),C(d);var G={canvasFactory:new R({ownerDocument:P,enableHWA:D}),filterFactory:new F({docId:i,ownerDocument:P}),cMapReaderFactory:B?null:new g({baseUrl:p,isCompressed:y}),standardFontDataFactory:B?null:new w({baseUrl:b})};if(!f){var H={verbosity:d,port:mu.workerPort};f=H.port?pf.fromPort(H):new pf(H),n._worker=f}var U={docId:i,apiVersion:"4.7.0",data:o,password:c,disableAutoFetch:j,rangeChunkSize:h,length:N,docBaseUrl:v,enableXfa:T,evaluatorOptions:{maxImageSize:x,disableFontFace:S,ignoreErrors:k,isEvalSupported:A,isOffscreenCanvasSupported:_,canvasMaxAreaInBytes:E,fontExtraProperties:O,useSystemFonts:W,cMapUrl:B?p:null,standardFontDataUrl:B?b:null}},z={disableFontFace:S,fontExtraProperties:O,ownerDocument:P,pdfBug:I,styleElement:null,loadingParams:{disableAutoFetch:j,enableXfa:T}};return f.promise.then((function(){if(n.destroyed)throw new Error("Loading aborted");if(f.destroyed)throw new Error("Worker was destroyed");var t,e=f.messageHandler.sendWithPromise("GetDocRequest",U,o?[o.buffer]:null);if(l)t=new Ac(l,{disableRange:L,disableStream:M});else if(!o){if(!a)throw new Error("getDocument - no \`url\` parameter provided.");var r;r=m?"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&Oe(a)?Uc:El:Oe(a)?Uc:ol,t=new r({url:a,length:N,httpHeaders:s,withCredentials:u,rangeChunkSize:h,disableRange:L,disableStream:M})}return e.then((function(e){if(n.destroyed)throw new Error("Loading aborted");if(f.destroyed)throw new Error("Worker was destroyed");var r=new Tu(i,e,f.port),a=new Of(r,n,t,z,G);n._transport=a,r.send("Ready",null)}))})).catch(n._capability.reject),n}function Zh(t){return"object"==typeof t&&Number.isInteger(null==t?void 0:t.num)&&t.num>=0&&Number.isInteger(null==t?void 0:t.gen)&&t.gen>=0}var tf=function(){return Vh((function t(){var e,r;Uh(this,t),this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d".concat((ef._=(e=ef._,r=e++,e),r)),this.destroyed=!1,this.onPassword=null,this.onProgress=null}),[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:(t=Hh(Bh().mark((function t(){var e,r,n;return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.destroyed=!0,t.prev=1,null!==(e=this._worker)&&void 0!==e&&e.port&&(this._worker._pendingDestroy=!0),t.next=5,null===(r=this._transport)||void 0===r?void 0:r.destroy();case 5:t.next=11;break;case 7:throw t.prev=7,t.t0=t.catch(1),null!==(n=this._worker)&&void 0!==n&&n.port&&delete this._worker._pendingDestroy,t.t0;case 11:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 13:case"end":return t.stop()}}),t,this,[[1,7]])}))),function(){return t.apply(this,arguments)})}]);var t}(),ef={_:0},rf=function(){return Vh((function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;Uh(this,t),this.length=e,this.initialData=r,this.progressiveDone=n,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}),[{key:"addRangeListener",value:function(t){this._rangeListeners.push(t)}},{key:"addProgressListener",value:function(t){this._progressListeners.push(t)}},{key:"addProgressiveReadListener",value:function(t){this._progressiveReadListeners.push(t)}},{key:"addProgressiveDoneListener",value:function(t){this._progressiveDoneListeners.push(t)}},{key:"onDataRange",value:function(t,e){var r,n=Dh(this._rangeListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(t,e)}catch(t){n.e(t)}finally{n.f()}}},{key:"onDataProgress",value:function(t,e){var r=this;this._readyCapability.promise.then((function(){var n,i=Dh(r._progressListeners);try{for(i.s();!(n=i.n()).done;)(0,n.value)(t,e)}catch(t){i.e(t)}finally{i.f()}}))}},{key:"onDataProgressiveRead",value:function(t){var e=this;this._readyCapability.promise.then((function(){var r,n=Dh(e._progressiveReadListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(t)}catch(t){n.e(t)}finally{n.f()}}))}},{key:"onDataProgressiveDone",value:function(){var t=this;this._readyCapability.promise.then((function(){var e,r=Dh(t._progressiveDoneListeners);try{for(r.s();!(e=r.n()).done;)(0,e.value)()}catch(t){r.e(t)}finally{r.f()}}))}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(t,e){F("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}])}(),nf=function(){return Vh((function t(e,r){Uh(this,t),this._pdfInfo=e,this._transport=r}),[{key:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"canvasFactory",get:function(){return this._transport.canvasFactory}},{key:"filterFactory",get:function(){return this._transport.filterFactory}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function(){return this._pdfInfo.fingerprints}},{key:"isPureXfa",get:function(){return W(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"allXfaHtml",get:function(){return this._transport._htmlForXfa}},{key:"getPage",value:function(t){return this._transport.getPage(t)}},{key:"getPageIndex",value:function(t){return this._transport.getPageIndex(t)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(t){return this._transport.getDestination(t)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,e=void 0===t?"display":t,r=this._transport.getRenderingIntent(e).renderingIntent;return this._transport.getOptionalContentConfig(r)}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"saveDocument",value:function(){return this._transport.saveDocument()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"cachedPageNumber",value:function(t){return this._transport.cachedPageNumber(t)}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}])}(),af=new WeakMap,of=new WeakMap,sf=new WeakSet,uf=function(){return Vh((function t(e,r,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Uh(this,t),Mh(this,sf),Ch(this,af,null),Ch(this,of,!1),this._pageIndex=e,this._pageInfo=r,this._transport=n,this._stats=i?new Se:null,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new Cf,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}),[{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"getViewport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.scale,r=t.rotation,n=void 0===r?this.rotate:r,i=t.offsetX,a=void 0===i?0:i,o=t.offsetY,s=void 0===o?0:o,u=t.dontFlip,c=void 0!==u&&u;return new be({viewBox:this.view,scale:e,rotation:n,offsetX:a,offsetY:s,dontFlip:c})}},{key:"getAnnotations",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,e=void 0===t?"display":t,r=this._transport.getRenderingIntent(e).renderingIntent;return this._transport.getAnnotations(this._pageIndex,r)}},{key:"getJSActions",value:function(){return this._transport.getPageJSActions(this._pageIndex)}},{key:"filterFactory",get:function(){return this._transport.filterFactory}},{key:"isPureXfa",get:function(){return W(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"getXfa",value:(t=Hh(Bh().mark((function t(){var e;return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(null===(e=this._transport._htmlForXfa)||void 0===e?void 0:e.children[this._pageIndex])||null);case 1:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(t){var e,r,n=this,i=t.canvasContext,a=t.viewport,o=t.intent,s=void 0===o?"display":o,u=t.annotationMode,c=void 0===u?x.ENABLE:u,l=t.transform,h=void 0===l?null:l,f=t.background,d=void 0===f?null:f,v=t.optionalContentConfigPromise,p=void 0===v?null:v,y=t.annotationCanvasMap,g=void 0===y?null:y,m=t.pageColors,b=void 0===m?null:m,w=t.printAnnotationStorage,k=void 0===w?null:w,A=t.isEditing,_=void 0!==A&&A;null===(e=this._stats)||void 0===e||e.time("Overall");var E=this._transport.getRenderingIntent(s,c,k,_),S=E.renderingIntent,O=E.cacheKey;Rh(of,this,!1),Fh(sf,this,lf).call(this),p||(p=this._transport.getOptionalContentConfig(S));var T=this._intentStates.get(O);T||(T=Object.create(null),this._intentStates.set(O,T)),T.streamReaderCancelTimeout&&(clearTimeout(T.streamReaderCancelTimeout),T.streamReaderCancelTimeout=null);var P,L=!!(4&S);T.displayReadyCapability||(T.displayReadyCapability=Promise.withResolvers(),T.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(P=this._stats)||void 0===P||P.time("Page Request"),this._pumpOperatorList(E));var M=function(t){var e;T.renderTasks.delete(C),(n._maybeCleanupAfterRender||L)&&Rh(of,n,!0),Fh(sf,n,cf).call(n,!L),t?(C.capability.reject(t),n._abortOperatorList({intentState:T,reason:t instanceof Error?t:new Error(t)})):C.capability.resolve(),n._stats&&(n._stats.timeEnd("Rendering"),n._stats.timeEnd("Overall"),null!==(e=globalThis.Stats)&&void 0!==e&&e.enabled&&globalThis.Stats.add(n.pageNumber,n._stats))},C=new Df({callback:M,params:{canvasContext:i,viewport:a,transform:h,background:d},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:g,operatorList:T.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!L,pdfBug:this._pdfBug,pageColors:b});((r=T).renderTasks||(r.renderTasks=new Set)).add(C);var j=C.task;return Promise.all([T.displayReadyCapability.promise,p]).then((function(t){var e,r=Lh(t,2),i=r[0],a=r[1];if(n.destroyed)M();else{if(null===(e=n._stats)||void 0===e||e.time("Rendering"),!(a.renderingIntent&S))throw new Error("Must use the same \`intent\`-argument when calling the \`PDFPageProxy.render\` and \`PDFDocumentProxy.getOptionalContentConfig\` methods.");C.initializeGraphics({transparency:i,optionalContentConfig:a}),C.operatorListChanged()}})).catch(M),j}},{key:"getOperatorList",value:function(){var t,e,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.intent,a=void 0===i?"display":i,o=n.annotationMode,s=void 0===o?x.ENABLE:o,u=n.printAnnotationStorage,c=void 0===u?null:u,l=n.isEditing,h=void 0!==l&&l,f=this._transport.getRenderingIntent(a,s,c,h,!0),d=this._intentStates.get(f.cacheKey);return d||(d=Object.create(null),this._intentStates.set(f.cacheKey,d)),d.opListReadCapability||((t=Object.create(null)).operatorListChanged=function(){d.operatorList.lastChunk&&(d.opListReadCapability.resolve(d.operatorList),d.renderTasks.delete(t))},d.opListReadCapability=Promise.withResolvers(),((e=d).renderTasks||(e.renderTasks=new Set)).add(t),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(r=this._stats)||void 0===r||r.time("Page Request"),this._pumpOperatorList(f)),d.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.includeMarkedContent,r=void 0!==e&&e,n=t.disableNormalization,i=void 0!==n&&n;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===r,disableNormalization:!0===i},{highWaterMark:100,size:t=>t.items.length})}},{key:"getTextContent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(t){return Eh.textContent(t)}));var e=this.streamTextContent(t);return new Promise((function(t,r){var n=e.getReader(),i={items:[],styles:Object.create(null),lang:null};!function e(){n.read().then((function(r){var n,a,o=r.value;r.done?t(i):(null!==(n=i.lang)&&void 0!==n||(i.lang=o.lang),Object.assign(i.styles,o.styles),(a=i.items).push.apply(a,function(t){return function(t){if(Array.isArray(t))return Wh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Nh(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.items)),e())}),r)}()}))}},{key:"getStructTree",value:function(){return this._transport.getStructTree(this._pageIndex)}},{key:"_destroy",value:function(){this.destroyed=!0;var t,e=[],r=Dh(this._intentStates.values());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(this._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),!n.opListReadCapability){var i,a=Dh(n.renderTasks);try{for(a.s();!(i=a.n()).done;){var o=i.value;e.push(o.completed),o.cancel()}}catch(t){a.e(t)}finally{a.f()}}}}catch(t){r.e(t)}finally{r.f()}return this.objs.clear(),Rh(of,this,!1),Fh(sf,this,lf).call(this),Promise.all(e)}},{key:"cleanup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Rh(of,this,!0);var e=Fh(sf,this,cf).call(this,!1);return t&&e&&this._stats&&(this._stats=new Se),e}},{key:"_startRenderPage",value:function(t,e){var r,n,i=this._intentStates.get(e);i&&(null===(r=this._stats)||void 0===r||r.timeEnd("Page Request"),null===(n=i.displayReadyCapability)||void 0===n||n.resolve(t))}},{key:"_renderPageChunk",value:function(t,e){for(var r=0,n=t.length;r0)return;if(n instanceof we){var o=100;return n.extraDelay>0&&n.extraDelay<1e3&&(o+=n.extraDelay),void(r.streamReaderCancelTimeout=setTimeout((function(){r.streamReaderCancelTimeout=null,e._abortOperatorList({intentState:r,reason:n,force:!0})}),o))}}if(r.streamReader.cancel(new Y(n.message)).catch((function(){})),r.streamReader=null,!this._transport.destroyed){var s,u=Dh(this._intentStates);try{for(u.s();!(s=u.n()).done;){var c=Lh(s.value,2),l=c[0];if(c[1]===r){this._intentStates.delete(l);break}}}catch(t){u.e(t)}finally{u.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]);var t}();function cf(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Fh(sf,this,lf).call(this),!Ih(of,this)||this.destroyed)return!1;if(e)return Rh(af,this,setTimeout((function(){Rh(af,t,null),Fh(sf,t,cf).call(t,!1)}),5e3)),!1;var r,n=Dh(this._intentStates.values());try{for(n.s();!(r=n.n()).done;){var i=r.value,a=i.renderTasks,o=i.operatorList;if(a.size>0||!o.lastChunk)return!1}}catch(t){n.e(t)}finally{n.f()}return this._intentStates.clear(),this.objs.clear(),Rh(of,this,!1),!0}function lf(){Ih(af,this)&&(clearTimeout(Ih(af,this)),Rh(af,this,null))}var hf=new WeakMap,ff=new WeakMap,df=function(){return Vh((function t(){Uh(this,t),Ch(this,hf,new Set),Ch(this,ff,Promise.resolve())}),[{key:"postMessage",value:function(t,e){var r=this,n={data:structuredClone(t,e?{transfer:e}:null)};Ih(ff,this).then((function(){var t,e=Dh(Ih(hf,r));try{for(e.s();!(t=e.n()).done;)t.value.call(r,n)}catch(t){e.e(t)}finally{e.f()}}))}},{key:"addEventListener",value:function(t,e){Ih(hf,this).add(e)}},{key:"removeEventListener",value:function(t,e){Ih(hf,this).delete(e)}},{key:"terminate",value:function(){Ih(hf,this).clear()}}])}(),vf=new WeakSet,pf=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.name,n=void 0===r?null:r,i=e.port,a=void 0===i?null:i,o=e.verbosity,s=void 0===o?j():o;if(Uh(this,t),Mh(this,vf),this.name=n,this.destroyed=!1,this.verbosity=s,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,a){var u;if(null!==(u=wf._)&&void 0!==u&&u.has(a))throw new Error("Cannot use more than one PDFWorker per port.");return(wf._||(wf._=new WeakMap)).set(a,this),void this._initializeFromPort(a)}this._initialize()}return Vh(t,[{key:"promise",get:function(){return m?Promise.all([cs.promise,this._readyCapability.promise]):this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{key:"_initializeFromPort",value:function(t){this._port=t,this._messageHandler=new Tu("main","worker",t),this._messageHandler.on("ready",(function(){})),Fh(vf,this,yf).call(this)}},{key:"_initialize",value:function(){var e=this;if(bf._||gf())this._setupFakeWorker();else{var r=t.workerSrc;try{t._isSameOrigin(window.location.href,r)||(r=t._createCDNWrapper(new URL(r,window.location).href));var n=new Worker(r,{type:"module"}),i=new Tu("main","worker",n),a=function(){o.abort(),i.destroy(),n.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},o=new AbortController;n.addEventListener("error",(function(){e._webWorker||a()}),{signal:o.signal}),i.on("test",(function(t){o.abort(),!e.destroyed&&t?(e._messageHandler=i,e._port=n,e._webWorker=n,Fh(vf,e,yf).call(e)):a()})),i.on("ready",(function(t){if(o.abort(),e.destroyed)a();else try{s()}catch(t){e._setupFakeWorker()}}));var s=function(){var t=new Uint8Array;i.send("test",t,[t.buffer])};return void s()}catch(t){I("The worker has been disabled.")}this._setupFakeWorker()}}},{key:"_setupFakeWorker",value:function(){var e=this;bf._||(R("Setting up fake worker."),bf._=!0),t._setupFakeWorkerGlobal.then((function(t){var r,n;if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var i=new df;e._port=i;var a="fake".concat((mf._=(r=mf._,n=r++,r),n)),o=new Tu(a+"_worker",a,i);t.setup(o,i),e._messageHandler=new Tu(a,a+"_worker",i),Fh(vf,e,yf).call(e)}})).catch((function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}},{key:"destroy",value:function(){var t;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),null===(t=wf._)||void 0===t||t.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"fromPort",value:function(e){var r;if(null==e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");var n=null===(r=Fh(t,this,wf)._)||void 0===r?void 0:r.get(e.port);if(n){if(n._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\\nPlease remember to await \`PDFDocumentLoadingTask.destroy()\`-calls.");return n}return new t(e)}},{key:"workerSrc",get:function(){if(mu.workerSrc)return mu.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_setupFakeWorkerGlobal",get:function(){var e=this,r=function(){var r=Hh(Bh().mark((function r(){var n;return Bh().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!Ph(t,e,gf)){r.next=2;break}return r.abrupt("return",Ph(t,e,gf));case 2:return r.next=4,import(e.workerSrc);case 4:return n=r.sent,r.abrupt("return",n.WorkerMessageHandler);case 6:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();return W(this,"_setupFakeWorkerGlobal",r())}}])}();function yf(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}function gf(t){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(t){return null}}_h=pf;var mf={_:0},bf={_:!1},wf={_:void 0};m&&(bf._=Fh(_h,_h,!0),mu.workerSrc||(mu.workerSrc="./pdf.worker.mjs")),_h._isSameOrigin=function(t,e){var r;try{if(!(r=new URL(t)).origin||"null"===r.origin)return!1}catch(t){return!1}var n=new URL(e,r);return r.origin===n.origin},_h._createCDNWrapper=function(t){var e='await import("'.concat(t,'");');return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};var kf=new WeakMap,xf=new WeakMap,Af=new WeakMap,_f=new WeakMap,Ef=new WeakMap,Sf=new WeakSet,Of=function(){return Vh((function t(e,r,n,i,a){Uh(this,t),Mh(this,Sf),Ch(this,kf,new Map),Ch(this,xf,new Map),Ch(this,Af,new Map),Ch(this,_f,new Map),Ch(this,Ef,null),this.messageHandler=e,this.loadingTask=r,this.commonObjs=new Cf,this.fontLoader=new Yo({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=a.canvasFactory,this.filterFactory=a.filterFactory,this.cMapReaderFactory=a.cMapReaderFactory,this.standardFontDataFactory=a.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}),[{key:"annotationStorage",get:function(){return W(this,"annotationStorage",new Mo)}},{key:"getRenderingIntent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.ENABLE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=2,o=So;switch(t){case"any":a=1;break;case"display":break;case"print":a=4;break;default:R("getRenderingIntent - invalid intent: ".concat(t))}var s=4&a&&r instanceof Io?r:this.annotationStorage;switch(e){case x.DISABLE:a+=64;break;case x.ENABLE:break;case x.ENABLE_FORMS:a+=16;break;case x.ENABLE_STORAGE:a+=32,o=s.serializable;break;default:R("getRenderingIntent - invalid annotationMode: ".concat(e))}n&&(a+=128),i&&(a+=256);var u=s.modifiedIds,c=u.ids,l=u.hash;return{renderingIntent:a,cacheKey:[a,o.hash,l].join("_"),annotationStorageSerializable:o,modifiedIds:c}}},{key:"destroy",value:function(){var t,e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),null===(t=Ih(Ef,this))||void 0===t||t.reject(new Error("Worker was destroyed during onPassword callback"));var r,n=[],i=Dh(Ih(xf,this).values());try{for(i.s();!(r=i.n()).done;){var a=r.value;n.push(a._destroy())}}catch(t){i.e(t)}finally{i.f()}Ih(xf,this).clear(),Ih(Af,this).clear(),Ih(_f,this).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var o=this.messageHandler.sendWithPromise("Terminate",null);return n.push(o),Promise.all(n).then((function(){var t;e.commonObjs.clear(),e.fontLoader.clear(),Ih(kf,e).clear(),e.filterFactory.destroy(),uh.cleanup(),null===(t=e._networkStream)||void 0===t||t.cancelAllRequests(new Y("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var t=this,e=this.messageHandler,r=this.loadingTask;e.on("GetReader",(function(e,r){D(t._networkStream,"GetReader - no \`IPDFStream\` instance available."),t._fullReader=t._networkStream.getFullReader(),t._fullReader.onProgress=function(e){t._lastProgress={loaded:e.loaded,total:e.total}},r.onPull=function(){t._fullReader.read().then((function(t){var e=t.value;t.done?r.close():(D(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(e),1,[e]))})).catch((function(t){r.error(t)}))},r.onCancel=function(e){t._fullReader.cancel(e),r.ready.catch((function(e){if(!t.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(function(e){var n=Promise.withResolvers(),i=t._fullReader;return i.headersReady.then((function(){var e;i.isStreamingSupported&&i.isRangeSupported||(t._lastProgress&&(null===(e=r.onProgress)||void 0===e||e.call(r,t._lastProgress)),i.onProgress=function(t){var e;null===(e=r.onProgress)||void 0===e||e.call(r,{loaded:t.loaded,total:t.total})});n.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),n.reject),n.promise})),e.on("GetRangeReader",(function(e,r){D(t._networkStream,"GetRangeReader - no \`IPDFStream\` instance available.");var n=t._networkStream.getRangeReader(e.begin,e.end);n?(r.onPull=function(){n.read().then((function(t){var e=t.value;t.done?r.close():(D(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(e),1,[e]))})).catch((function(t){r.error(t)}))},r.onCancel=function(e){n.cancel(e),r.ready.catch((function(e){if(!t.destroyed)throw e}))}):r.close()})),e.on("GetDoc",(function(e){var n=e.pdfInfo;t._numPages=n.numPages,t._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,r._capability.resolve(new nf(n,t))})),e.on("DocException",(function(t){var e;switch(t.name){case"PasswordException":e=new G(t.message,t.code);break;case"InvalidPDFException":e=new U(t.message);break;case"MissingPDFException":e=new z(t.message);break;case"UnexpectedResponseException":e=new V(t.message,t.status);break;case"UnknownErrorException":e=new H(t.message,t.details);break;default:F("DocException - expected a valid Error.")}r._capability.reject(e)})),e.on("PasswordRequest",(function(e){if(Rh(Ef,t,Promise.withResolvers()),r.onPassword)try{r.onPassword((function(e){e instanceof Error?Ih(Ef,t).reject(e):Ih(Ef,t).resolve({password:e})}),e.code)}catch(e){Ih(Ef,t).reject(e)}else Ih(Ef,t).reject(new G(e.message,e.code));return Ih(Ef,t).promise})),e.on("DataLoaded",(function(e){var n;null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:e.length,total:e.length}),t.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(function(e){t.destroyed||Ih(xf,t).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(function(r){var n,i=Lh(r,3),a=i[0],o=i[1],s=i[2];if(t.destroyed)return null;if(t.commonObjs.has(a))return null;switch(o){case"Font":var u=t._params,c=u.disableFontFace,l=u.fontExtraProperties,h=u.pdfBug;if("error"in s){var f=s.error;R("Error during font loading: ".concat(f)),t.commonObjs.resolve(a,f);break}var d=h&&null!==(n=globalThis.FontInspector)&&void 0!==n&&n.enabled?function(t,e){return globalThis.FontInspector.fontAdded(t,e)}:null,v=new Xo(s,{disableFontFace:c,inspectFont:d});t.fontLoader.bind(v).catch((function(){return e.sendWithPromise("FontFallback",{id:a})})).finally((function(){!l&&v.data&&(v.data=null),t.commonObjs.resolve(a,v)}));break;case"CopyLocalImage":var p=s.imageRef;D(p,"The imageRef must be defined.");var y,g=Dh(Ih(xf,t).values());try{for(g.s();!(y=g.n()).done;){var m,b=Dh(y.value.objs);try{for(b.s();!(m=b.n()).done;){var w=Lh(m.value,2)[1];if((null==w?void 0:w.ref)===p)return w.dataLen?(t.commonObjs.resolve(a,structuredClone(w)),w.dataLen):null}}catch(t){b.e(t)}finally{b.f()}}}catch(t){g.e(t)}finally{g.f()}break;case"FontPath":case"Image":case"Pattern":t.commonObjs.resolve(a,s);break;default:throw new Error("Got unknown common object type ".concat(o))}return null})),e.on("obj",(function(e){var r=Lh(e,4),n=r[0],i=r[1],a=r[2],o=r[3];if(!t.destroyed){var s,u=Ih(xf,t).get(i);if(!u.objs.has(n))if(0!==u._intentStates.size)switch(a){case"Image":u.objs.resolve(n,o),(null==o?void 0:o.dataLen)>1e7&&(u._maybeCleanupAfterRender=!0);break;case"Pattern":u.objs.resolve(n,o);break;default:throw new Error("Got unknown object type ".concat(a))}else null==o||null===(s=o.bitmap)||void 0===s||s.close()}})),e.on("DocProgress",(function(e){var n;t.destroyed||null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(function(e){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.cMapReaderFactory?t.cMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the \`useWorkerFetch\` parameter."))})),e.on("FetchStandardFontData",(function(e){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.standardFontDataFactory?t.standardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the \`useWorkerFetch\` parameter."))}))}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"saveDocument",value:function(){var t,e,r=this;this.annotationStorage.size<=0&&R("saveDocument called while \`annotationStorage\` is empty, please use the getData-method instead.");var n=this.annotationStorage.serializable,i=n.map,a=n.transfer;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:i,filename:null!==(t=null===(e=this._fullReader)||void 0===e?void 0:e.filename)&&void 0!==t?t:null},a).finally((function(){r.annotationStorage.resetModified()}))}},{key:"getPage",value:function(t){var e=this;if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));var r=t-1,n=Ih(Af,this).get(r);if(n)return n;var i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then((function(n){if(e.destroyed)throw new Error("Transport destroyed");n.refStr&&Ih(_f,e).set(n.refStr,t);var i=new uf(r,n,e,e._params.pdfBug);return Ih(xf,e).set(r,i),i}));return Ih(Af,this).set(r,i),i}},{key:"getPageIndex",value:function(t){return Zh(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}},{key:"getAnnotations",value:function(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}},{key:"getFieldObjects",value:function(){return Fh(Sf,this,Tf).call(this,"GetFieldObjects")}},{key:"hasJSActions",value:function(){return Fh(Sf,this,Tf).call(this,"HasJSActions")}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getDocJSActions",value:function(){return Fh(Sf,this,Tf).call(this,"GetDocJSActions")}},{key:"getPageJSActions",value:function(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}},{key:"getStructTree",value:function(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(t){return Fh(Sf,this,Tf).call(this,"GetOptionalContentConfig").then((function(e){return new fc(e,t)}))}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var t=this,e="GetMetadata",r=Ih(kf,this).get(e);if(r)return r;var n=this.messageHandler.sendWithPromise(e,null).then((function(e){var r,n,i,a;return{info:e[0],metadata:e[1]?new Gu(e[1]):null,contentDispositionFilename:null!==(r=null===(n=t._fullReader)||void 0===n?void 0:n.filename)&&void 0!==r?r:null,contentLength:null!==(i=null===(a=t._fullReader)||void 0===a?void 0:a.contentLength)&&void 0!==i?i:null}}));return Ih(kf,this).set(e,n),n}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:(t=Hh(Bh().mark((function t(){var e,r,n,i,a=arguments;return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=a.length>0&&void 0!==a[0]&&a[0],!this.destroyed){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.messageHandler.sendWithPromise("Cleanup",null);case 5:r=Dh(Ih(xf,this).values()),t.prev=6,r.s();case 8:if((n=r.n()).done){t.next=15;break}if((i=n.value).cleanup()){t.next=13;break}throw new Error("startCleanup: Page ".concat(i.pageNumber," is currently rendering."));case 13:t.next=8;break;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(6),r.e(t.t0);case 20:return t.prev=20,r.f(),t.finish(20);case 23:this.commonObjs.clear(),e||this.fontLoader.clear(),Ih(kf,this).clear(),this.filterFactory.destroy(!0),uh.cleanup();case 28:case"end":return t.stop()}}),t,this,[[6,17,20,23]])}))),function(){return t.apply(this,arguments)})},{key:"cachedPageNumber",value:function(t){var e;if(!Zh(t))return null;var r=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);return null!==(e=Ih(_f,this).get(r))&&void 0!==e?e:null}}]);var t}();function Tf(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Ih(kf,this).get(t);if(r)return r;var n=this.messageHandler.sendWithPromise(t,e);return Ih(kf,this).set(t,n),n}var Pf=Symbol("INITIAL_DATA"),Lf=new WeakMap,Mf=new WeakSet,Cf=function(){return Vh((function t(){Uh(this,t),Mh(this,Mf),Ch(this,Lf,Object.create(null))}),[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var r=Fh(Mf,this,jf).call(this,t);return r.promise.then((function(){return e(r.data)})),null}var n=Ih(Lf,this)[t];if(!n||n.data===Pf)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return n.data}},{key:"has",value:function(t){var e=Ih(Lf,this)[t];return!!e&&e.data!==Pf}},{key:"resolve",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Fh(Mf,this,jf).call(this,t);r.data=e,r.resolve()}},{key:"clear",value:function(){for(var t in Ih(Lf,this)){var e,r=Ih(Lf,this)[t].data;null==r||null===(e=r.bitmap)||void 0===e||e.close()}Rh(Lf,this,Object.create(null))}},{key:Symbol.iterator,value:Bh().mark((function t(){var e,r;return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=Bh().keys(Ih(Lf,this));case 1:if((t.t1=t.t0()).done){t.next=10;break}if(e=t.t1.value,(r=Ih(Lf,this)[e].data)!==Pf){t.next=6;break}return t.abrupt("continue",1);case 6:return t.next=8,[e,r];case 8:t.next=1;break;case 10:case"end":return t.stop()}}),t,this)}))}])}();function jf(t){var e;return(e=Ih(Lf,this))[t]||(e[t]=Oh(Oh({},Promise.withResolvers()),{},{data:Pf}))}var If=new WeakMap,Rf=function(){return Vh((function t(e){Uh(this,t),Ch(this,If,null),Rh(If,this,e),this.onContinue=null}),[{key:"promise",get:function(){return Ih(If,this).capability.promise}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;Ih(If,this).cancel(null,t)}},{key:"separateAnnots",get:function(){var t=Ih(If,this).operatorList.separateAnnots;if(!t)return!1;var e=Ih(If,this).annotationCanvasMap;return t.form||t.canvas&&(null==e?void 0:e.size)>0}}])}(),Ff=new WeakMap,Df=function(){return Vh((function t(e){var r=e.callback,n=e.params,i=e.objs,a=e.commonObjs,o=e.annotationCanvasMap,s=e.operatorList,u=e.pageIndex,c=e.canvasFactory,l=e.filterFactory,h=e.useRequestAnimationFrame,f=void 0!==h&&h,d=e.pdfBug,v=void 0!==d&&d,p=e.pageColors,y=void 0===p?null:p;Uh(this,t),Ch(this,Ff,null),this.callback=r,this.params=n,this.objs=i,this.commonObjs=a,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=u,this.canvasFactory=c,this.filterFactory=l,this._pdfBug=v,this.pageColors=y,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===f&&"undefined"!=typeof window,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new Rf(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}),[{key:"completed",get:function(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function(t){var e,r,n=t.transparency,i=void 0!==n&&n,a=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(Nf._.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Nf._.add(this._canvas)}this._pdfBug&&null!==(e=globalThis.StepperManager)&&void 0!==e&&e.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var o=this.params,s=o.canvasContext,u=o.viewport,c=o.transform,l=o.background;this.gfx=new hu(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:a},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:c,viewport:u,transparency:i,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,null===(r=this.graphicsReadyCallback)||void 0===r||r.call(this)}}},{key:"cancel",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1,this.cancelled=!0,null===(t=this.gfx)||void 0===t||t.endDrawing(),Ih(Ff,this)&&(window.cancelAnimationFrame(Ih(Ff,this)),Rh(Ff,this,null)),Nf._.delete(this._canvas),this.callback(e||new we("Rendering cancelled, page ".concat(this._pageIndex+1),r))}},{key:"operatorListChanged",value:function(){var t;this.graphicsReady?(null===(t=this.stepper)||void 0===t||t.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var t=this;this._useRequestAnimationFrame?Rh(Ff,this,window.requestAnimationFrame((function(){Rh(Ff,t,null),t._nextBound().catch(t._cancelBound)}))):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:(t=Hh(Bh().mark((function t(){return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Nf._.delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}]);var t}(),Nf={_:new WeakSet},Wf="4.7.0",Bf="";function Gf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hf(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Qf(t,e){if(t){if("string"==typeof t)return Jf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jf(t,e):void 0}}function Jf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0;){var f,d,v=Xf(h.at(-1),3),p=v[0],y=v[1],g=v[2];if(y+1!==p.children.length){var m=p.children[++h.at(-1)[1]];if(null!==m){var b=m.name;if("#text"!==b){var w=null!=m&&null!==(f=m.attributes)&&void 0!==f&&f.xmlns?document.createElementNS(m.attributes.xmlns,b):document.createElement(b);if(g.append(w),m.attributes&&this.setAttributes({html:w,element:m,storage:e,intent:i,linkService:r}),(null===(d=m.children)||void 0===d?void 0:d.length)>0)h.push([m,-1,w]);else if(m.value){var k=document.createTextNode(m.value);o&&Eh.shouldBuildText(b)&&c.push(k),w.append(k)}}else{var x=document.createTextNode(m.value);c.push(x),g.append(x)}}}else h.pop()}var A,_=Kf(s.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(_.s();!(A=_.n()).done;)A.value.setAttribute("readOnly",!0)}catch(t){_.e(t)}finally{_.f()}return{textDivs:c}}},{key:"update",value:function(t){var e="matrix(".concat(t.viewport.transform.join(","),")");t.div.style.transform=e,t.div.hidden=!1}}])}();function ed(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rd(t,e,r){return(e=Td(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nd(){nd=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function id(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ad(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){id(a,n,i,o,s,"next",t)}function s(t){id(a,n,i,o,s,"throw",t)}o(void 0)}))}}function od(t,e,r){e||(e=[]);var n=e.length++;return Object.defineProperty({},"_",{set:function(i){e[n]=i,t.apply(r,e)}})}function sd(t,e,r){return r(_d(t,e))}function ud(){return ud="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fd(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},ud.apply(null,arguments)}function cd(t){return function(t){if(Array.isArray(t))return md(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gd(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ld(t,e,r){return e=fd(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,hd()?Reflect.construct(e,r||[],fd(t).constructor):e.apply(t,r))}function hd(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hd=function(){return!!t})()}function fd(t){return fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fd(t)}function dd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vd(t,e)}function vd(t,e){return vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vd(t,e)}function pd(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=gd(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function yd(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||gd(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gd(t,e){if(t){if("string"==typeof t)return md(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?md(t,e):void 0}}function md(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},n=r.isRenderable,i=void 0!==n&&n,a=r.ignoreBorder,o=void 0!==a&&a,s=r.createQuadrilaterals,u=void 0!==s&&s;Ed(this,t),bd(this,Fd),wd(this,jd,null),wd(this,Id,!1),wd(this,Rd,null),this.isRenderable=i,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,i&&(this.container=this._createContainer(o)),u&&this._createQuadrilaterals()}return Od(t,[{key:"_isEditable",get:function(){return this.data.isEditable}},{key:"hasPopupData",get:function(){return t._hasPopupData(this.data)}},{key:"updateEdited",value:function(t){var e;if(this.container){Ad(jd,this)||xd(jd,this,{rect:this.data.rect.slice(0)});var r=t.rect;r&&_d(Fd,this,Nd).call(this,r),null===(e=Ad(Rd,this))||void 0===e||e.popup.updateEdited(t)}}},{key:"resetEdited",value:function(){var t;Ad(jd,this)&&(_d(Fd,this,Nd).call(this,Ad(jd,this).rect),null===(t=Ad(Rd,this))||void 0===t||t.popup.resetEdited(),xd(jd,this,null))}},{key:"_createContainer",value:function(t){var e=this.data,r=this.parent,n=r.page,i=r.viewport,a=document.createElement("section");a.setAttribute("data-annotation-id",e.id),this instanceof Vd||(a.tabIndex=Pd);var o=a.style;if(o.zIndex=this.parent.zIndex++,e.popupRef&&a.setAttribute("aria-haspopup","dialog"),e.alternativeText&&(a.title=e.alternativeText),e.noRotate&&a.classList.add("norotate"),!e.rect||this instanceof $d){var s=e.rotation;return e.hasOwnCanvas||0===s||this.setRotation(s,a),a}var u=Md(e.rect),c=u.width,l=u.height;if(!t&&e.borderStyle.width>0){o.borderWidth="".concat(e.borderStyle.width,"px");var h=e.borderStyle.horizontalCornerRadius,f=e.borderStyle.verticalCornerRadius;if(h>0||f>0){var d="calc(".concat(h,"px * var(--scale-factor)) / calc(").concat(f,"px * var(--scale-factor))");o.borderRadius=d}else if(this instanceof Kd){var v="calc(".concat(c,"px * var(--scale-factor)) / calc(").concat(l,"px * var(--scale-factor))");o.borderRadius=v}switch(e.borderStyle.style){case 1:o.borderStyle="solid";break;case 2:o.borderStyle="dashed";break;case 3:R("Unimplemented border style: beveled");break;case 4:R("Unimplemented border style: inset");break;case 5:o.borderBottomStyle="solid"}var p=e.borderColor||null;p?(xd(Id,this,!0),o.borderColor=Z.makeHexColor(0|p[0],0|p[1],0|p[2])):o.borderWidth=0}var y=Z.normalizeRect([e.rect[0],n.view[3]-e.rect[1]+n.view[1],e.rect[2],n.view[3]-e.rect[3]+n.view[1]]),g=i.rawDims,m=g.pageWidth,b=g.pageHeight,w=g.pageX,k=g.pageY;o.left="".concat(100*(y[0]-w)/m,"%"),o.top="".concat(100*(y[1]-k)/b,"%");var x=e.rotation;return e.hasOwnCanvas||0===x?(o.width="".concat(100*c/m,"%"),o.height="".concat(100*l/b,"%")):this.setRotation(x,a),a}},{key:"setRotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(this.data.rect){var r,n,i=this.parent.viewport.rawDims,a=i.pageWidth,o=i.pageHeight,s=Md(this.data.rect),u=s.width,c=s.height;t%180==0?(r=100*u/a,n=100*c/o):(r=100*c/a,n=100*u/o),e.style.width="".concat(r,"%"),e.style.height="".concat(n,"%"),e.setAttribute("data-main-rotation",(360-t)%360)}}},{key:"_commonActions",get:function(){var t=this,e=function(e,r,n){var i=n.detail[e],a=i[0],o=i.slice(1);n.target.style[r]=Yf["".concat(a,"_HTML")](o),t.annotationStorage.setValue(t.data.id,{[r]:Yf["".concat(a,"_rgb")](o)})};return W(this,"_commonActions",{display:function(e){var r=e.detail.display,n=r%2==1;t.container.style.visibility=n?"hidden":"visible",t.annotationStorage.setValue(t.data.id,{noView:n,noPrint:1===r||2===r})},print:function(e){t.annotationStorage.setValue(t.data.id,{noPrint:!e.detail.print})},hidden:function(e){var r=e.detail.hidden;t.container.style.visibility=r?"hidden":"visible",t.annotationStorage.setValue(t.data.id,{noPrint:r,noView:r})},focus:function(t){setTimeout((function(){return t.target.focus({preventScroll:!1})}),0)},userName:function(t){t.target.title=t.detail.userName},readonly:function(t){t.target.disabled=t.detail.readonly},required:function(e){t._setRequired(e.target,e.detail.required)},bgColor:function(t){e("bgColor","backgroundColor",t)},fillColor:function(t){e("fillColor","backgroundColor",t)},fgColor:function(t){e("fgColor","color",t)},textColor:function(t){e("textColor","color",t)},borderColor:function(t){e("borderColor","borderColor",t)},strokeColor:function(t){e("strokeColor","borderColor",t)},rotation:function(e){var r=e.detail.rotation;t.setRotation(r),t.annotationStorage.setValue(t.data.id,{rotation:r})}})}},{key:"_dispatchEventFromSandbox",value:function(t,e){for(var r=this._commonActions,n=0,i=Object.keys(e.detail);n','')],this.container.classList.add("hasBorder")}var y=a-n,g=o-i,m=this.svgFactory,b=m.createElement("svg");b.classList.add("quadrilateralsContainer"),b.setAttribute("width",0),b.setAttribute("height",0);var w=m.createElement("defs");b.append(w);var k=m.createElement("clipPath"),x="clippath_".concat(this.data.id);k.setAttribute("id",x),k.setAttribute("clipPathUnits","objectBoundingBox"),w.append(k);for(var A=2,_=t.length;A<_;A+=8){var E,S=t[A],O=t[A+1],T=t[A+2],P=t[A+3],L=m.createElement("rect"),M=(T-n)/y,C=(o-O)/g,j=(S-T)/y,I=(O-P)/g;L.setAttribute("x",M),L.setAttribute("y",C),L.setAttribute("width",j),L.setAttribute("height",I),k.append(L),null===(E=f)||void 0===E||E.push(''))}Ad(Id,this)&&(f.push("')"),d.backgroundImage=f.join("")),this.container.append(b),this.container.style.clipPath="url(#".concat(x,")")}}}},{key:"_createPopup",value:function(){var t=this.container,e=this.data;t.setAttribute("aria-haspopup","dialog");var r=xd(Rd,this,new $d({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:"popup_".concat(e.id),rotation:e.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(r.render())}},{key:"render",value:function(){F("Abstract method \`AnnotationElement.render\` called")}},{key:"_getElementsByName",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[];if(this._fieldObjects){var n=this._fieldObjects[t];if(n){var i,a=pd(n);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=o.page,u=o.id,c=o.exportValues;if(-1!==s&&u!==e){var l="string"==typeof c?c:null,h=document.querySelector('[data-element-id="'.concat(u,'"]'));!h||Ld.has(h)?r.push({id:u,exportValue:l,domElement:h}):R("_getElementsByName - element not allowed: ".concat(u))}}}catch(t){a.e(t)}finally{a.f()}}return r}var f,d=pd(document.getElementsByName(t));try{for(d.s();!(f=d.n()).done;){var v=f.value,p=v.exportValue,y=v.getAttribute("data-element-id");y!==e&&Ld.has(v)&&r.push({id:y,exportValue:p,domElement:v})}}catch(t){d.e(t)}finally{d.f()}return r}},{key:"show",value:function(){var t;this.container&&(this.container.hidden=!1),null===(t=this.popup)||void 0===t||t.maybeShow()}},{key:"hide",value:function(){var t;this.container&&(this.container.hidden=!0),null===(t=this.popup)||void 0===t||t.forceHide()}},{key:"getElementsToTriggerPopup",value:function(){return this.container}},{key:"addHighlightArea",value:function(){var t=this.getElementsToTriggerPopup();if(Array.isArray(t)){var e,r=pd(t);try{for(r.s();!(e=r.n()).done;)e.value.classList.add("highlightArea")}catch(t){r.e(t)}finally{r.f()}}else t.classList.add("highlightArea")}},{key:"_editOnDoubleClick",value:function(){var t=this;if(this._isEditable){var e=this.annotationEditorType,r=this.data.id;this.container.addEventListener("dblclick",(function(){var n;null===(n=t.linkService.eventBus)||void 0===n||n.dispatch("switchannotationeditormode",{source:t,mode:e,editId:r})}))}}}],[{key:"_hasPopupData",value:function(t){var e=t.titleObj,r=t.contentsObj,n=t.richText;return!!(null!=e&&e.str||null!=r&&r.str||null!=n&&n.str)}}])}();function Nd(t){var e=this.container.style,r=this.data,n=r.rect,i=r.rotation,a=this.parent.viewport.rawDims,o=a.pageWidth,s=a.pageHeight,u=a.pageX,c=a.pageY;null==n||n.splice.apply(n,[0,4].concat(cd(t)));var l=Md(t),h=l.width,f=l.height;e.left="".concat(100*(t[0]-u)/o,"%"),e.top="".concat(100*(s-t[3]+c)/s,"%"),0===i?(e.width="".concat(100*h/o,"%"),e.height="".concat(100*f/s,"%")):this.setRotation(i)}var Wd=new WeakSet,Bd=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Ed(this,e),bd(r=ld(this,e,[t,{isRenderable:!0,ignoreBorder:!(null==n||!n.ignoreBorder),createQuadrilaterals:!0}]),Wd),r.isTooltipOnly=t.data.isTooltipOnly,r}return dd(e,Dd),Od(e,[{key:"render",value:function(){var t=this.data,e=this.linkService,r=document.createElement("a");r.setAttribute("data-element-id",t.id);var n=!1;return t.url?(e.addLinkAttributes(r,t.url,t.newWindow),n=!0):t.action?(this._bindNamedAction(r,t.action),n=!0):t.attachment?(_d(Wd,this,Hd).call(this,r,t.attachment,t.attachmentDest),n=!0):t.setOCGState?(_d(Wd,this,Ud).call(this,r,t.setOCGState),n=!0):t.dest?(this._bindLink(r,t.dest),n=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,t),n=!0),t.resetForm?(this._bindResetFormAction(r,t.resetForm),n=!0):this.isTooltipOnly&&!n&&(this._bindLink(r,""),n=!0)),this.container.classList.add("linkAnnotation"),n&&this.container.append(r),this.container}},{key:"_bindLink",value:function(t,e){var r=this;t.href=this.linkService.getDestinationHash(e),t.onclick=function(){return e&&r.linkService.goToDestination(e),!1},(e||""===e)&&_d(Wd,this,Gd).call(this)}},{key:"_bindNamedAction",value:function(t,e){var r=this;t.href=this.linkService.getAnchorUrl(""),t.onclick=function(){return r.linkService.executeNamedAction(e),!1},_d(Wd,this,Gd).call(this)}},{key:"_bindJSAction",value:function(t,e){var r=this;t.href=this.linkService.getAnchorUrl("");for(var n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),i=function(){var i=o[a],s=n.get(i);if(!s)return 1;t[s]=function(){var t;return null===(t=r.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:r,detail:{id:e.id,name:i}}),!1}},a=0,o=Object.keys(e.actions);a2&&void 0!==arguments[2]?arguments[2]:null;t.href=this.linkService.getAnchorUrl(""),e.description&&(t.title=e.description),t.onclick=function(){var t;return null===(t=r.downloadManager)||void 0===t||t.openOrDownloadData(e.content,e.filename,n),!1},_d(Wd,this,Gd).call(this)}function Ud(t,e){var r=this;t.href=this.linkService.getAnchorUrl(""),t.onclick=function(){return r.linkService.executeSetOCGState(e),!1},_d(Wd,this,Gd).call(this)}var zd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:!0}])}return dd(e,Dd),Od(e,[{key:"render",value:function(){this.container.classList.add("textAnnotation");var t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}])}(),Vd=function(t){function e(){return Ed(this,e),ld(this,e,arguments)}return dd(e,Dd),Od(e,[{key:"render",value:function(){return this.container}},{key:"showElementAndHideCanvas",value:function(t){var e;this.data.hasOwnCanvas&&("CANVAS"===(null===(e=t.previousSibling)||void 0===e?void 0:e.nodeName)&&(t.previousSibling.hidden=!0),t.hidden=!1)}},{key:"_getKeyModifier",value:function(t){return J.platform.isMac?t.metaKey:t.ctrlKey}},{key:"_setEventListener",value:function(t,e,r,n,i){var a=this;r.includes("mouse")?t.addEventListener(r,(function(t){var e;null===(e=a.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:n,value:i(t),shift:t.shiftKey,modifier:a._getKeyModifier(t)}})})):t.addEventListener(r,(function(t){var o;if("blur"===r){if(!e.focused||!t.relatedTarget)return;e.focused=!1}else if("focus"===r){if(e.focused)return;e.focused=!0}i&&(null===(o=a.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:n,value:i(t)}}))}))}},{key:"_setEventListeners",value:function(t,e,r,n){var i,a=pd(r);try{for(a.s();!(i=a.n()).done;){var o,s,u,c=yd(i.value,2),l=c[0],h=c[1];("Action"===h||null!==(o=this.data.actions)&&void 0!==o&&o[h])&&("Focus"!==h&&"Blur"!==h||e||(e={focused:!1}),this._setEventListener(t,e,l,h,n),"Focus"!==h||null!==(s=this.data.actions)&&void 0!==s&&s.Blur?"Blur"!==h||null!==(u=this.data.actions)&&void 0!==u&&u.Focus||this._setEventListener(t,e,"focus","Focus",null):this._setEventListener(t,e,"blur","Blur",null))}}catch(t){a.e(t)}finally{a.f()}}},{key:"_setBackgroundColor",value:function(t){var e=this.data.backgroundColor||null;t.style.backgroundColor=null===e?"transparent":Z.makeHexColor(e[0],e[1],e[2])}},{key:"_setTextStyle",value:function(t){var e,r=this.data.defaultAppearanceData.fontColor,n=this.data.defaultAppearanceData.fontSize||9,i=t.style,a=function(t){return Math.round(10*t)/10};if(this.data.multiLine){var o=Math.abs(this.data.rect[3]-this.data.rect[1]-2),s=o/(Math.round(o/(k*n))||1);e=Math.min(n,a(s/k))}else{var u=Math.abs(this.data.rect[3]-this.data.rect[1]-2);e=Math.min(n,a(u/k))}i.fontSize="calc(".concat(e,"px * var(--scale-factor))"),i.color=Z.makeHexColor(r[0],r[1],r[2]),null!==this.data.textAlignment&&(i.textAlign=["left","center","right"][this.data.textAlignment])}},{key:"_setRequired",value:function(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}])}(),qd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue}])}return dd(e,Vd),Od(e,[{key:"setPropertyOnSiblings",value:function(t,e,r,n){var i,a=this.annotationStorage,o=pd(this._getElementsByName(t.name,t.id));try{for(o.s();!(i=o.n()).done;){var s=i.value;s.domElement&&(s.domElement[e]=r),a.setValue(s.id,{[n]:r})}}catch(t){o.e(t)}finally{o.f()}}},{key:"render",value:function(){var t=this,e=this.annotationStorage,r=this.data.id;this.container.classList.add("textWidgetAnnotation");var n=null;if(this.renderForms){var i,a=e.getValue(r,{value:this.data.fieldValue}),o=a.value||"",s=e.getValue(r,{charLimit:this.data.maxLen}).charLimit;s&&o.length>s&&(o=o.slice(0,s));var u=a.formattedValue||(null===(i=this.data.textContent)||void 0===i?void 0:i.join("\\n"))||null;u&&this.data.comb&&(u=u.replaceAll(/\\s+/g,""));var c,l,h={userValue:o,formattedValue:u,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?((n=document.createElement("textarea")).textContent=null!==(c=u)&&void 0!==c?c:o,this.data.doNotScroll&&(n.style.overflowY="hidden")):((n=document.createElement("input")).type="text",n.setAttribute("value",null!==(l=u)&&void 0!==l?l:o),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),Ld.add(n),n.setAttribute("data-element-id",r),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=Pd,this._setRequired(n,this.data.required),s&&(n.maxLength=s),n.addEventListener("input",(function(i){e.setValue(r,{value:i.target.value}),t.setPropertyOnSiblings(n,"value",i.target.value,"value"),h.formattedValue=null})),n.addEventListener("resetform",(function(e){var r,i=null!==(r=t.data.defaultFieldValue)&&void 0!==r?r:"";n.value=h.userValue=i,h.formattedValue=null}));var f=function(t){var e=h.formattedValue;null!=e&&(t.target.value=e),t.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var d;n.addEventListener("focus",(function(e){var r;if(!h.focused){var n=e.target;h.userValue&&(n.value=h.userValue),h.lastCommittedValue=n.value,h.commitKey=1,null!==(r=t.data.actions)&&void 0!==r&&r.Focus||(h.focused=!0)}})),n.addEventListener("updatefromsandbox",(function(n){t.showElementAndHideCanvas(n.target);var i={value(t){var n;h.userValue=null!==(n=t.detail.value)&&void 0!==n?n:"",e.setValue(r,{value:h.userValue.toString()}),t.target.value=h.userValue},formattedValue(t){var n=t.detail.formattedValue;h.formattedValue=n,null!=n&&t.target!==document.activeElement&&(t.target.value=n),e.setValue(r,{formattedValue:n})},selRange(t){var e;(e=t.target).setSelectionRange.apply(e,cd(t.detail.selRange))},charLimit:function(n){var i,a=n.detail.charLimit,o=n.target;if(0!==a){o.setAttribute("maxLength",a);var s=h.userValue;!s||s.length<=a||(s=s.slice(0,a),o.value=h.userValue=s,e.setValue(r,{value:s}),null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:s,willCommit:!0,commitKey:1,selStart:o.selectionStart,selEnd:o.selectionEnd}}))}else o.removeAttribute("maxLength")}};t._dispatchEventFromSandbox(i,n)})),n.addEventListener("keydown",(function(e){var n;h.commitKey=1;var i=-1;if("Escape"===e.key?i=0:"Enter"!==e.key||t.data.multiLine?"Tab"===e.key&&(h.commitKey=3):i=2,-1!==i){var a=e.target.value;h.lastCommittedValue!==a&&(h.lastCommittedValue=a,h.userValue=a,null===(n=t.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:a,willCommit:!0,commitKey:i,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}}));var v=f;f=null,n.addEventListener("blur",(function(e){var n;if(h.focused&&e.relatedTarget){null!==(n=t.data.actions)&&void 0!==n&&n.Blur||(h.focused=!1);var i,a=e.target.value;h.userValue=a,h.lastCommittedValue!==a&&(null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:a,willCommit:!0,commitKey:h.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})),v(e)}})),null!==(d=this.data.actions)&&void 0!==d&&d.Keystroke&&n.addEventListener("beforeinput",(function(e){var n;h.lastCommittedValue=null;var i=e.data,a=e.target,o=a.value,s=a.selectionStart,u=a.selectionEnd,c=s,l=u;switch(e.inputType){case"deleteWordBackward":var f=o.substring(0,s).match(/\\w*[^\\w]*$/);f&&(c-=f[0].length);break;case"deleteWordForward":var d=o.substring(s).match(/^[^\\w]*\\w*/);d&&(l+=d[0].length);break;case"deleteContentBackward":s===u&&(c-=1);break;case"deleteContentForward":s===u&&(l+=1)}e.preventDefault(),null===(n=t.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:o,change:i||"",willCommit:!1,selStart:c,selEnd:l}})})),this._setEventListeners(n,h,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.value}))}if(f&&n.addEventListener("blur",f),this.data.comb){var p=(this.data.rect[2]-this.data.rect[0])/s;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(p,"px * var(--scale-factor) - 1ch)")}}else(n=document.createElement("div")).textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell",this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}])}(),Yd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:!!t.data.hasOwnCanvas}])}return dd(e,Vd),Od(e)}(),Xd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:t.renderForms}])}return dd(e,Vd),Od(e,[{key:"render",value:function(){var t=this,e=this.annotationStorage,r=this.data,n=r.id,i=e.getValue(n,{value:r.exportValue===r.fieldValue}).value;"string"==typeof i&&(i="Off"!==i,e.setValue(n,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");var a=document.createElement("input");return Ld.add(a),a.setAttribute("data-element-id",n),a.disabled=r.readOnly,this._setRequired(a,this.data.required),a.type="checkbox",a.name=r.fieldName,i&&a.setAttribute("checked",!0),a.setAttribute("exportValue",r.exportValue),a.tabIndex=Pd,a.addEventListener("change",(function(i){var a,o=i.target,s=o.name,u=o.checked,c=pd(t._getElementsByName(s,n));try{for(c.s();!(a=c.n()).done;){var l=a.value,h=u&&l.exportValue===r.exportValue;l.domElement&&(l.domElement.checked=h),e.setValue(l.id,{value:h})}}catch(t){c.e(t)}finally{c.f()}e.setValue(n,{value:u})})),a.addEventListener("resetform",(function(t){var e=r.defaultFieldValue||"Off";t.target.checked=e===r.exportValue})),this.enableScripting&&this.hasJSActions&&(a.addEventListener("updatefromsandbox",(function(r){var i={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(n,{value:t.target.checked})}};t._dispatchEventFromSandbox(i,r)})),this._setEventListeners(a,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}])}(),Kd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:t.renderForms}])}return dd(e,Vd),Od(e,[{key:"render",value:function(){var t=this;this.container.classList.add("buttonWidgetAnnotation","radioButton");var e=this.annotationStorage,r=this.data,n=r.id,i=e.getValue(n,{value:r.fieldValue===r.buttonValue}).value;if("string"==typeof i&&(i=i!==r.buttonValue,e.setValue(n,{value:i})),i){var a,o=pd(this._getElementsByName(r.fieldName,n));try{for(o.s();!(a=o.n()).done;){var s=a.value;e.setValue(s.id,{value:!1})}}catch(t){o.e(t)}finally{o.f()}}var u=document.createElement("input");if(Ld.add(u),u.setAttribute("data-element-id",n),u.disabled=r.readOnly,this._setRequired(u,this.data.required),u.type="radio",u.name=r.fieldName,i&&u.setAttribute("checked",!0),u.tabIndex=Pd,u.addEventListener("change",(function(r){var i,a=r.target,o=a.name,s=a.checked,u=pd(t._getElementsByName(o,n));try{for(u.s();!(i=u.n()).done;){var c=i.value;e.setValue(c.id,{value:!1})}}catch(t){u.e(t)}finally{u.f()}e.setValue(n,{value:s})})),u.addEventListener("resetform",(function(t){var e=r.defaultFieldValue;t.target.checked=null!=e&&e===r.buttonValue})),this.enableScripting&&this.hasJSActions){var c=r.buttonValue;u.addEventListener("updatefromsandbox",(function(r){var i={value:function(r){var i,a=c===r.detail.value,o=pd(t._getElementsByName(r.target.name));try{for(o.s();!(i=o.n()).done;){var s=i.value,u=a&&s.id===n;s.domElement&&(s.domElement.checked=u),e.setValue(s.id,{value:u})}}catch(t){o.e(t)}finally{o.f()}}};t._dispatchEventFromSandbox(i,r)})),this._setEventListeners(u,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}return this._setBackgroundColor(u),this._setDefaultPropertiesFromJS(u),this.container.append(u),this.container}}])}(),Qd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{ignoreBorder:t.data.hasAppearance}])}return dd(e,Bd),Od(e,[{key:"render",value:function(){var t=this,r=function(t,e,r,n){var i=ud(fd(t.prototype),"render",r);return"function"==typeof i?function(t){return i.apply(r,t)}:i}(e,0,this)([]);r.classList.add("buttonWidgetAnnotation","pushButton");var n=r.lastChild;return this.enableScripting&&this.hasJSActions&&n&&(this._setDefaultPropertiesFromJS(n),n.addEventListener("updatefromsandbox",(function(e){t._dispatchEventFromSandbox({},e)}))),r}}])}(),Jd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:t.renderForms}])}return dd(e,Vd),Od(e,[{key:"render",value:function(){var t=this;this.container.classList.add("choiceWidgetAnnotation");var e=this.annotationStorage,r=this.data.id,n=e.getValue(r,{value:this.data.fieldValue}),i=document.createElement("select");Ld.add(i),i.setAttribute("data-element-id",r),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=Pd;var a=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",(function(e){var r,n=t.data.defaultFieldValue,a=pd(i.options);try{for(a.s();!(r=a.n()).done;){var o=r.value;o.selected=o.value===n}}catch(t){a.e(t)}finally{a.f()}}));var o,s=pd(this.data.options);try{for(s.s();!(o=s.n()).done;){var u=o.value,c=document.createElement("option");c.textContent=u.displayValue,c.value=u.exportValue,n.value.includes(u.exportValue)&&(c.setAttribute("selected",!0),a=!1),i.append(c)}}catch(t){s.e(t)}finally{s.f()}var l=null;if(a){var h=document.createElement("option");h.value=" ",h.setAttribute("hidden",!0),h.setAttribute("selected",!0),i.prepend(h),l=function(){h.remove(),i.removeEventListener("input",l),l=null},i.addEventListener("input",l)}var f=function(t){var e=t?"value":"textContent",r=i.options;return i.multiple?Array.prototype.filter.call(r,(function(t){return t.selected})).map((function(t){return t[e]})):-1===r.selectedIndex?null:r[r.selectedIndex][e]},d=f(!1),v=function(t){var e=t.target.options;return Array.prototype.map.call(e,(function(t){return{displayValue:t.textContent,exportValue:t.value}}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",(function(n){var a={value(t){var n;null===(n=l)||void 0===n||n();var a,o=t.detail.value,s=new Set(Array.isArray(o)?o:[o]),u=pd(i.options);try{for(u.s();!(a=u.n()).done;){var c=a.value;c.selected=s.has(c.value)}}catch(t){u.e(t)}finally{u.f()}e.setValue(r,{value:f(!0)}),d=f(!1)},multipleSelection(t){i.multiple=!0},remove(t){var n=i.options,a=t.detail.remove;if(n[a].selected=!1,i.remove(a),n.length>0){var o=Array.prototype.findIndex.call(n,(function(t){return t.selected}));-1===o&&(n[0].selected=!0)}e.setValue(r,{value:f(!0),items:v(t)}),d=f(!1)},clear(t){for(;0!==i.length;)i.remove(0);e.setValue(r,{value:null,items:[]}),d=f(!1)},insert(t){var n=t.detail.insert,a=n.index,o=n.displayValue,s=n.exportValue,u=i.children[a],c=document.createElement("option");c.textContent=o,c.value=s,u?u.before(c):i.append(c),e.setValue(r,{value:f(!0),items:v(t)}),d=f(!1)},items(t){for(var n=t.detail.items;0!==i.length;)i.remove(0);var a,o=pd(n);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=s.displayValue,c=s.exportValue,l=document.createElement("option");l.textContent=u,l.value=c,i.append(l)}}catch(t){o.e(t)}finally{o.f()}i.options.length>0&&(i.options[0].selected=!0),e.setValue(r,{value:f(!0),items:v(t)}),d=f(!1)},indices(t){var n,i=new Set(t.detail.indices),a=pd(t.target.options);try{for(a.s();!(n=a.n()).done;){var o=n.value;o.selected=i.has(o.index)}}catch(t){a.e(t)}finally{a.f()}e.setValue(r,{value:f(!0)}),d=f(!1)},editable(t){t.target.disabled=!t.detail.editable}};t._dispatchEventFromSandbox(a,n)})),i.addEventListener("input",(function(n){var i,a=f(!0),o=f(!1);e.setValue(r,{value:a}),n.preventDefault(),null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:d,change:o,changeEx:a,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(function(t){return t.target.value}))):i.addEventListener("input",(function(t){e.setValue(r,{value:f(!0)})})),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}])}(),$d=function(t){function e(t){var r;Ed(this,e);var n=t.data,i=t.elements;return(r=ld(this,e,[t,{isRenderable:Dd._hasPopupData(n)}])).elements=i,r.popup=null,r}return dd(e,Dd),Od(e,[{key:"render",value:function(){this.container.classList.add("popupAnnotation");var t,e=this.popup=new bv({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),r=[],n=pd(this.elements);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.popup=e,r.push(i.data.id),i.addHighlightArea()}}catch(t){n.e(t)}finally{n.f()}return this.container.setAttribute("aria-controls",r.map((function(t){return"".concat(at).concat(t)})).join(",")),this.container}}])}(),Zd=new WeakMap,tv=new WeakMap,ev=new WeakMap,rv=new WeakMap,nv=new WeakMap,iv=new WeakMap,av=new WeakMap,ov=new WeakMap,sv=new WeakMap,uv=new WeakMap,cv=new WeakMap,lv=new WeakMap,hv=new WeakMap,fv=new WeakMap,dv=new WeakMap,vv=new WeakMap,pv=new WeakMap,yv=new WeakMap,gv=new WeakMap,mv=new WeakSet,bv=function(){return Od((function t(e){var r=e.container,n=e.color,i=e.elements,a=e.titleObj,o=e.modificationDate,s=e.contentsObj,u=e.richText,c=e.parent,l=e.rect,h=e.parentRect,f=e.open;Ed(this,t),bd(this,mv),wd(this,Zd,_d(mv,this,_v).bind(this)),wd(this,tv,_d(mv,this,Tv).bind(this)),wd(this,ev,_d(mv,this,Ov).bind(this)),wd(this,rv,_d(mv,this,Sv).bind(this)),wd(this,nv,null),wd(this,iv,null),wd(this,av,null),wd(this,ov,null),wd(this,sv,null),wd(this,uv,null),wd(this,cv,null),wd(this,lv,!1),wd(this,hv,null),wd(this,fv,null),wd(this,dv,null),wd(this,vv,null),wd(this,pv,null),wd(this,yv,null),wd(this,gv,!1),xd(iv,this,r),xd(pv,this,a),xd(av,this,s),xd(vv,this,u),xd(uv,this,c),xd(nv,this,n),xd(dv,this,l),xd(cv,this,h),xd(sv,this,i),xd(ov,this,Le.toDateObject(o)),this.trigger=i.flatMap((function(t){return t.getElementsToTriggerPopup()}));var d,v=pd(this.trigger);try{for(v.s();!(d=v.n()).done;){var p=d.value;p.addEventListener("click",Ad(rv,this)),p.addEventListener("mouseenter",Ad(ev,this)),p.addEventListener("mouseleave",Ad(tv,this)),p.classList.add("popupTriggerArea")}}catch(t){v.e(t)}finally{v.f()}var y,g=pd(i);try{for(g.s();!(y=g.n()).done;){var m;null===(m=y.value.container)||void 0===m||m.addEventListener("keydown",Ad(Zd,this))}}catch(t){g.e(t)}finally{g.f()}Ad(iv,this).hidden=!0,f&&_d(mv,this,Sv).call(this)}),[{key:"render",value:function(){if(!Ad(hv,this)){var t=xd(hv,this,document.createElement("div"));if(t.className="popup",Ad(nv,this)){var e=t.style.outlineColor=Z.makeHexColor.apply(Z,cd(Ad(nv,this)));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?t.style.backgroundColor="color-mix(in srgb, ".concat(e," 30%, white)"):t.style.backgroundColor=Z.makeHexColor.apply(Z,cd(Ad(nv,this).map((function(t){return Math.floor(.7*(255-t)+t)}))))}var r=document.createElement("span");r.className="header";var n=document.createElement("h1");r.append(n);var i=Ad(pv,this);if(n.dir=i.dir,n.textContent=i.str,t.append(r),Ad(ov,this)){var a=document.createElement("span");a.classList.add("popupDate"),a.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),a.setAttribute("data-l10n-args",JSON.stringify({dateObj:Ad(ov,this).valueOf()})),r.append(a)}var o=sd(mv,this,wv);if(o)td.render({xfaHtml:o,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{var s=this._formatContents(Ad(av,this));t.append(s)}Ad(iv,this).append(t)}}},{key:"_formatContents",value:function(t){var e=t.str,r=t.dir,n=document.createElement("p");n.classList.add("popupContent"),n.dir=r;for(var i=e.split(/(?:\\r\\n?|\\n)/),a=0,o=i.length;a0}},{key:"render",value:function(){var t=ad(nd().mark((function t(e){var r,n,i,a,o,s,u,c,l,h,f,d,v,p,y,g;return nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.annotations,Re(n=this.div,this.viewport),i=new Map,a={data:null,layer:n,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new me,annotationStorage:e.annotationStorage||new Mo,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null},o=pd(r),t.prev=6,o.s();case 8:if((s=o.n()).done){t.next=35;break}if(!(u=s.value).noHTML){t.next=12;break}return t.abrupt("continue",33);case 12:if(c=16===u.annotationType){t.next=19;break}if(l=Md(u.rect),h=l.width,f=l.height,!(h<=0||f<=0)){t.next=17;break}return t.abrupt("continue",33);case 17:t.next=23;break;case 19:if(d=i.get(u.id)){t.next=22;break}return t.abrupt("continue",33);case 22:a.elements=d;case 23:if(a.data=u,(v=Cd.create(a)).isRenderable){t.next=27;break}return t.abrupt("continue",33);case 27:return!c&&u.popupRef&&((p=i.get(u.popupRef))?p.push(v):i.set(u.popupRef,[v])),y=v.render(),u.hidden&&(y.style.visibility="hidden"),t.next=32,_d(rp,this,ip).call(this,y,u.id);case 32:v._isEditable&&(Ad(tp,this).set(v.data.id,v),null===(g=this._annotationEditorUIManager)||void 0===g||g.renderAnnotationElement(v));case 33:t.next=8;break;case 35:t.next=40;break;case 37:t.prev=37,t.t0=t.catch(6),o.e(t.t0);case 40:return t.prev=40,o.f(),t.finish(40);case 43:_d(rp,this,op).call(this);case 44:case"end":return t.stop()}}),t,this,[[6,37,40,43]])})));return function(e){return t.apply(this,arguments)}}()},{key:"update",value:function(t){var e=t.viewport,r=this.div;this.viewport=e,Re(r,{rotation:e.rotation}),_d(rp,this,op).call(this),r.hidden=!1}},{key:"getEditableAnnotations",value:function(){return Array.from(Ad(tp,this).values())}},{key:"getEditableAnnotation",value:function(t){return Ad(tp,this).get(t)}}])}();function ip(t,e){return ap.apply(this,arguments)}function ap(){return(ap=ad(nd().mark((function t(e,r){var n,i,a,o,s,u,c,l,h,f;return nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.firstChild||e,o=a.id="".concat(at).concat(r),t.next=4,null===(n=Ad(ep,this))||void 0===n?void 0:n.getAriaAttributes(o);case 4:if(s=t.sent){u=pd(s);try{for(u.s();!(c=u.n()).done;)l=yd(c.value,2),h=l[0],f=l[1],a.setAttribute(h,f)}catch(t){u.e(t)}finally{u.f()}}this.div.append(e),null===(i=Ad($v,this))||void 0===i||i.moveElementInDOM(this.div,e,a,!1);case 8:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function op(){if(Ad(Zv,this)){var t,e=this.div,r=pd(Ad(Zv,this));try{for(r.s();!(t=r.n()).done;){var n=yd(t.value,2),i=n[0],a=n[1],o=e.querySelector('[data-annotation-id="'.concat(i,'"]'));if(o){a.className="annotationContent";var s=o.firstChild;s?"CANVAS"===s.nodeName?s.replaceWith(a):s.classList.contains("annotationContent")?s.after(a):s.before(a):o.append(a)}}}catch(t){r.e(t)}finally{r.f()}Ad(Zv,this).clear()}}function sp(){sp=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function up(t){return function(t){if(Array.isArray(t))return dp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fp(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cp(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function lp(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=fp(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function hp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||fp(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fp(t,e){if(t){if("string"==typeof t)return dp(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dp(t,e):void 0}}function dp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();var r=e._internalPadding*this.parentScale,n=this.getRect(r,r),i=Wa._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:Op(Mp,this)),a={annotationType:A.FREETEXT,color:i,fontSize:Op(Rp,this),value:Pp(Fp,this,zp).call(this),pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?a:this.annotationElementId&&!Pp(Fp,this,qp).call(this,a)?null:(a.id=this.annotationElementId,a)}},{key:"renderAnnotationElement",value:function(t){var r=bp(e,"renderAnnotationElement",this,3)([t]);if(this.deleted)return r;var n=r.style;n.fontSize="calc(".concat(Op(Rp,this),"px * var(--scale-factor))"),n.color=Op(Mp,this),r.replaceChildren();var i,a=lp(Op(Cp,this).split("\\n"));try{for(a.s();!(i=a.n()).done;){var o=i.value,s=document.createElement("div");s.append(o?document.createTextNode(o):document.createElement("br")),r.append(s)}}catch(t){a.e(t)}finally{a.f()}var u=e._internalPadding*this.parentScale;return t.updateEdited({rect:this.getRect(u,u),popupContent:Op(Cp,this)}),r}},{key:"resetAnnotationElement",value:function(t){bp(e,"resetAnnotationElement",this,3)([t]),t.resetEdited()}}],[{key:"_keyboardManager",get:function(){var t=e.prototype,r=function(t){return t.isEmpty()},n=Kn.TRANSLATE_SMALL,i=Kn.TRANSLATE_BIG;return W(this,"_keyboardManager",new rn([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-n,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[n,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[i,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-n],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:r}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,n],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,i],checker:r}]]))}},{key:"initialize",value:function(t,e){Wa.initialize(t,e,{strings:["pdfjs-free-text-default-content"]});var r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}},{key:"updateDefaultParams",value:function(t,r){switch(t){case _.FREETEXT_SIZE:e._defaultFontSize=r;break;case _.FREETEXT_COLOR:e._defaultColor=r}}},{key:"defaultPropertiesToUpdate",get:function(){return[[_.FREETEXT_SIZE,e._defaultFontSize],[_.FREETEXT_COLOR,e._defaultColor||Wa._defaultLineColor]]}},{key:"deserialize",value:(r=sp().mark((function t(r,n,i){var a,o,s,u,c,l,h,f,d,v,p,y,g,m;return sp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,!(r instanceof Pv)){t.next=6;break}if(s=(o=r).data,u=s.defaultAppearanceData,c=u.fontSize,l=u.fontColor,h=s.rect,f=s.rotation,d=s.id,v=s.popupRef,p=o.textContent,y=o.textPosition,g=o.parent.page.pageNumber,p&&0!==p.length){t.next=5;break}return t.abrupt("return",null);case 5:a=r={annotationType:A.FREETEXT,color:Array.from(l),fontSize:c,value:p.join("\\n"),position:y,pageIndex:g-1,rect:h.slice(0),rotation:f,id:d,deleted:!1,popupRef:v};case 6:return t.next=8,bp(e,"deserialize",this,2)([r,n,i]);case 8:return m=t.sent,Tp(Rp,m,r.fontSize),Tp(Mp,m,Z.makeHexColor.apply(Z,up(r.color))),Tp(Cp,m,Vp.call(e,r.value)),m.annotationElementId=r.id||null,m._initialData=a,t.abrupt("return",m);case 15:case"end":return t.stop()}}),t,this)})),n=function(){var t=this,e=arguments;return new Promise((function(n,i){var a=r.apply(t,e);function o(t){cp(a,n,i,o,s,"next",t)}function s(t){cp(a,n,i,o,s,"throw",t)}o(void 0)}))},function(t,e,r){return n.apply(this,arguments)})}]);var r,n}();function Np(t){var e=this,r=function(t){e.editorDiv.style.fontSize="calc(".concat(t,"px * var(--scale-factor))"),e.translate(0,-(t-Op(Rp,e))*e.parentScale),Tp(Rp,e,t),Pp(Fp,e,Gp).call(e)},n=Op(Rp,this);this.addCommands({cmd:r.bind(this,t),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function Wp(t){var e=this,r=function(t){Tp(Mp,e,e.editorDiv.style.color=t)},n=Op(Mp,this);this.addCommands({cmd:r.bind(this,t),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function Bp(){var t=[];this.editorDiv.normalize();var e,r=null,n=lp(this.editorDiv.childNodes);try{for(n.s();!(e=n.n()).done;){var i,a=e.value;(null===(i=r)||void 0===i?void 0:i.nodeType)===Node.TEXT_NODE&&"BR"===a.nodeName||(t.push(Hp.call(Jv,a)),r=a)}}catch(t){n.e(t)}finally{n.f()}return t.join("\\n")}function Gp(){var t,e=hp(this.parentDimensions,2),r=e[0],n=e[1];if(this.isAttachedToDOM)t=this.div.getBoundingClientRect();else{var i=this.currentLayer,a=this.div,o=a.style.display,s=a.classList.contains("hidden");a.classList.remove("hidden"),a.style.display="hidden",i.div.append(this.div),t=a.getBoundingClientRect(),a.remove(),a.style.display=o,a.classList.toggle("hidden",s)}this.rotation%180==this.parentRotation%180?(this.width=t.width/r,this.height=t.height/n):(this.width=t.height/r,this.height=t.width/n),this.fixAndSetPosition()}function Hp(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll(Lp,"")}function Up(){if(this.editorDiv.replaceChildren(),Op(Cp,this)){var t,e=lp(Op(Cp,this).split("\\n"));try{for(e.s();!(t=e.n()).done;){var r=t.value,n=document.createElement("div");n.append(r?document.createTextNode(r):document.createElement("br")),this.editorDiv.append(n)}}catch(t){e.e(t)}finally{e.f()}}}function zp(){return Op(Cp,this).replaceAll(" "," ")}function Vp(t){return t.replaceAll(" "," ")}function qp(t){var e=this._initialData,r=e.value,n=e.fontSize,i=e.color,a=e.pageIndex;return this._hasBeenMoved||t.value!==r||t.fontSize!==n||t.color.some((function(t,e){return t!==i[e]}))||t.pageIndex!==a}function Yp(t,e,r){return e=Kp(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xp()?Reflect.construct(e,r||[],Kp(t).constructor):e.apply(t,r))}function Xp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xp=function(){return!!t})()}function Kp(t){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kp(t)}function Qp(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jp(t,e)}function Jp(t,e){return Jp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jp(t,e)}function $p(t){return function(t){if(Array.isArray(t))return ry(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ey(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||ey(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ty(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ey(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function ey(t,e){if(t){if("string"==typeof t)return ry(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ry(t,e):void 0}}function ry(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];ny(this,t),sy(this,yy),uy(this,dy,void 0),uy(this,vy,[]),uy(this,py,[]);var a,o=1/0,s=-1/0,u=1/0,c=-1/0,l=Math.pow(10,-4),h=ty(e);try{for(h.s();!(a=h.n()).done;){var f=a.value,d=f.x,v=f.y,p=f.width,y=f.height,g=Math.floor((d-r)/l)*l,m=Math.ceil((d+p+r)/l)*l,b=Math.floor((v-r)/l)*l,w=Math.ceil((v+y+r)/l)*l,k=[g,b,w,!0],x=[m,b,w,!1];hy(vy,this).push(k,x),o=Math.min(o,g),s=Math.max(s,m),u=Math.min(u,b),c=Math.max(c,w)}}catch(t){h.e(t)}finally{h.f()}var A,_=s-o+2*n,E=c-u+2*n,S=o-n,O=u-n,T=hy(vy,this).at(i?-1:-2),P=[T[0],T[2]],L=ty(hy(vy,this));try{for(L.s();!(A=L.n()).done;){var M=A.value,C=Zp(M,3),j=C[0],I=C[1],R=C[2];M[0]=(j-S)/_,M[1]=(I-O)/E,M[2]=(R-O)/E}}catch(t){L.e(t)}finally{L.f()}ly(dy,this,{x:S,y:O,width:_,height:E,lastPoint:P})}),[{key:"getOutlines",value:function(){hy(vy,this).sort((function(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}));var t,e=[],r=ty(hy(vy,this));try{for(r.s();!(t=r.n()).done;){var n=t.value;n[3]?(e.push.apply(e,$p(fy(yy,this,xy).call(this,n))),fy(yy,this,wy).call(this,n)):(fy(yy,this,ky).call(this,n),e.push.apply(e,$p(fy(yy,this,xy).call(this,n))))}}catch(t){r.e(t)}finally{r.f()}return fy(yy,this,my).call(this,e)}}])}();function my(t){var e,r=[],n=new Set,i=ty(t);try{for(i.s();!(e=i.n()).done;){var a=e.value,o=Zp(a,3),s=o[0],u=o[1],c=o[2];r.push([s,u,a],[s,c,a])}}catch(t){i.e(t)}finally{i.f()}r.sort((function(t,e){return t[1]-e[1]||t[0]-e[0]}));for(var l=0,h=r.length;l0;){var y=n.values().next().value,g=Zp(y,5),m=g[0],b=g[1],w=g[2],k=g[3],x=g[4];n.delete(y);var A=m,_=b;for(v=[m,w],p.push(v);;){var E=void 0;if(n.has(k))E=k;else{if(!n.has(x))break;E=x}n.delete(E);var S=Zp(E,5);m=S[0],b=S[1],w=S[2],k=S[3],x=S[4],A!==m&&(v.push(A,_,m,_===b?b:w),A=m),_=_===b?w:b}v.push(A,_)}return new Sy(p,hy(dy,this))}function by(t){for(var e=hy(py,this),r=0,n=e.length-1;r<=n;){var i=r+n>>1,a=e[i][0];if(a===t)return i;a=0;c--){var l=Zp(hy(py,this)[c],2),h=l[0],f=l[1];if(h!==r)break;if(h===r&&f===n)return void hy(py,this).splice(c,1)}}function xy(t){for(var e=Zp(t,3),r=e[0],n=e[1],i=e[2],a=[[r,n,i]],o=fy(yy,this,by).call(this,i),s=0;s=c)if(p>l)a[h][1]=l;else{if(1===f)return[];a.splice(h,1),h--,f--}else a[h][2]=c,p>l&&a.push([r,l,p])}return a}var Ay=function(){return ay((function t(){ny(this,t)}),[{key:"toSVGPath",value:function(){throw new Error("Abstract method \`toSVGPath\` must be implemented.")}},{key:"box",get:function(){throw new Error("Abstract getter \`box\` must be implemented.")}},{key:"serialize",value:function(t,e){throw new Error("Abstract method \`serialize\` must be implemented.")}},{key:"free",get:function(){return this instanceof tg}}])}(),_y=new WeakMap,Ey=new WeakMap,Sy=function(t){function e(t,r){var n;return ny(this,e),uy(n=Yp(this,e),_y,void 0),uy(n,Ey,void 0),ly(Ey,n,t),ly(_y,n,r),n}return Qp(e,Ay),ay(e,[{key:"toSVGPath",value:function(){var t,e=[],r=ty(hy(Ey,this));try{for(r.s();!(t=r.n()).done;){var n=t.value,i=Zp(n,2),a=i[0],o=i[1];e.push("M".concat(a," ").concat(o));for(var s=2;s5&&void 0!==arguments[5]?arguments[5]:0;ny(this,t),sy(this,By),uy(this,Oy,void 0),uy(this,Ty,[]),uy(this,Py,void 0),uy(this,Ly,void 0),uy(this,My,[]),uy(this,Cy,new Float64Array(18)),uy(this,jy,void 0),uy(this,Iy,void 0),uy(this,Ry,void 0),uy(this,Fy,void 0),uy(this,Dy,void 0),uy(this,Ny,void 0),uy(this,Wy,[]),ly(Oy,this,r),ly(Ny,this,i*n),ly(Ly,this,a),hy(Cy,this).set([NaN,NaN,NaN,NaN,o,s],6),ly(Py,this,u),ly(Fy,this,zy._*n),ly(Ry,this,Vy._*n),ly(Dy,this,n),hy(Wy,this).push(o,s)}),[{key:"free",get:function(){return!0}},{key:"isEmpty",value:function(){return isNaN(hy(Cy,this)[8])}},{key:"add",value:function(t){var e,r=t.x,n=t.y;ly(jy,this,r),ly(Iy,this,n);var i=Zp(hy(Oy,this),4),a=i[0],o=i[1],s=i[2],u=i[3],c=Zp(hy(Cy,this).subarray(8,12),4),l=c[0],h=c[1],f=c[2],d=c[3],v=r-f,p=n-d,y=Math.hypot(v,p);if(y=6;y-=6)isNaN(e[y])?v.push("L".concat(e[y+4]," ").concat(e[y+5])):v.push("C".concat(e[y]," ").concat(e[y+1]," ").concat(e[y+2]," ").concat(e[y+3]," ").concat(e[y+4]," ").concat(e[y+5]));return v.push("L".concat(e[4]," ").concat(e[5]," Z")),v.join(" ")}},{key:"getOutlines",value:function(){for(var t,e,r=hy(My,this),n=hy(Ty,this),i=hy(Cy,this),a=i.subarray(4,6),o=i.subarray(16,18),s=Zp(hy(Oy,this),4),u=s[0],c=s[1],l=s[2],h=s[3],f=new Float64Array((null!==(t=null===(e=hy(Wy,this))||void 0===e?void 0:e.length)&&void 0!==t?t:0)+2),d=0,v=f.length-2;d=6;_-=6)for(var E=0;E<6;E+=2)isNaN(n[_+E])?(k[x]=k[x+1]=NaN,x+=2):(k[x]=n[_+E],k[x+1]=n[_+E+1],x+=2);return k.set([NaN,NaN,NaN,NaN,n[4],n[5]],x),new tg(k,f,hy(Oy,this),hy(Dy,this),hy(Py,this),hy(Ly,this))}}])}();function Hy(){var t=hy(Cy,this).subarray(4,6),e=hy(Cy,this).subarray(16,18),r=Zp(hy(Oy,this),4),n=r[0],i=r[1],a=r[2],o=r[3];return[(hy(jy,this)+(t[0]-e[0])/2-n)/a,(hy(Iy,this)+(t[1]-e[1])/2-i)/o,(hy(jy,this)+(e[0]-t[0])/2-n)/a,(hy(Iy,this)+(e[1]-t[1])/2-i)/o]}var Uy,zy={_:8},Vy={_:zy._+2},qy=new WeakMap,Yy=new WeakMap,Xy=new WeakMap,Ky=new WeakMap,Qy=new WeakMap,Jy=new WeakMap,$y=new WeakMap,Zy=new WeakSet,tg=function(t){function e(t,r,n,i,a,o){var s;ny(this,e),sy(s=Yp(this,e),Zy),uy(s,qy,void 0),uy(s,Yy,null),uy(s,Xy,void 0),uy(s,Ky,void 0),uy(s,Qy,void 0),uy(s,Jy,void 0),uy(s,$y,void 0),ly($y,s,t),ly(Qy,s,r),ly(qy,s,n),ly(Jy,s,i),ly(Xy,s,a),ly(Ky,s,o),fy(Zy,s,ng).call(s,o);for(var u=hy(Yy,s),c=u.x,l=u.y,h=u.width,f=u.height,d=0,v=t.length;d=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function og(t,e){if(t){if("string"==typeof t)return sg(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sg(t,e):void 0}}function sg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rt.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Hg(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Ug(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Hg(a,n,i,o,s,"next",t)}function s(t){Hg(a,n,i,o,s,"throw",t)}o(void 0)}))}}function zg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Vg(t){for(var e=1;e-1?(am(bm,r,!0),om(Sm,r,Pm).call(r,t),om(Sm,r,Im).call(r)):im(lm,r)&&(am(um,r,t.anchorNode),am(cm,r,t.anchorOffset),am(vm,r,t.focusNode),am(pm,r,t.focusOffset),om(Sm,r,Tm).call(r),om(Sm,r,Im).call(r),r.rotate(r.rotation)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$g(t,e)}(e,Wa),function(t,e,r){return e&&qg(t.prototype,e),r&&qg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"telemetryInitialData",get:function(){return{action:"added",type:im(bm,this)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:im(_m,this),methodOfCreation:im(Em,this)}}},{key:"telemetryFinalData",get:function(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}},{key:"translateInPage",value:function(t,e){}},{key:"toolbarPosition",get:function(){return im(wm,this)}},{key:"updateParams",value:function(t,e){switch(t){case _.HIGHLIGHT_COLOR:om(Sm,this,Lm).call(this,e);break;case _.HIGHLIGHT_THICKNESS:om(Sm,this,Mm).call(this,e)}}},{key:"propertiesToUpdate",get:function(){return[[_.HIGHLIGHT_COLOR,this.color||e._defaultColor],[_.HIGHLIGHT_THICKNESS,im(_m,this)||e._defaultThickness],[_.HIGHLIGHT_FREE,im(bm,this)]]}},{key:"addEditToolbar",value:(n=Ug(Gg().mark((function t(){var r;return Gg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Kg(e,"addEditToolbar",this,3)([]);case 2:if(r=t.sent){t.next=5;break}return t.abrupt("return",null);case 5:return this._uiManager.highlightColors&&(am(fm,this,new Tg({editor:this})),r.addColorPicker(im(fm,this))),t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"disableEditing",value:function(){Kg(e,"disableEditing",this,3)([]),this.div.classList.toggle("disabled",!0)}},{key:"enableEditing",value:function(){Kg(e,"enableEditing",this,3)([]),this.div.classList.toggle("disabled",!1)}},{key:"fixAndSetPosition",value:function(){return Kg(e,"fixAndSetPosition",this,3)([om(Sm,this,Nm).call(this)])}},{key:"getBaseTranslation",value:function(){return[0,0]}},{key:"getRect",value:function(t,r){return Kg(e,"getRect",this,3)([t,r,om(Sm,this,Nm).call(this)])}},{key:"onceAdded",value:function(){this.annotationElementId||this.parent.addUndoableEditor(this),this.div.focus()}},{key:"remove",value:function(){om(Sm,this,jm).call(this),this._reportTelemetry({action:"deleted"}),Kg(e,"remove",this,3)([])}},{key:"rebuild",value:function(){this.parent&&(Kg(e,"rebuild",this,3)([]),null!==this.div&&(om(Sm,this,Im).call(this),this.isAttachedToDOM||this.parent.add(this)))}},{key:"setParent",value:function(t){var r=!1;if(this.parent&&!t)om(Sm,this,jm).call(this);else if(t){var n;om(Sm,this,Im).call(this,t),r=!this.parent&&(null===(n=this.div)||void 0===n?void 0:n.classList.contains("selectedEditor"))}Kg(e,"setParent",this,3)([t]),this.show(this._isVisible),r&&this.select()}},{key:"rotate",value:function(t){var r,n=this.parent.drawLayer;im(bm,this)?(t=(t-this.rotation+360)%360,r=Rm.call(e,im(gm,this).box,t)):r=Rm.call(e,this,t),n.rotate(im(mm,this),t),n.rotate(im(xm,this),t),n.updateBox(im(mm,this),r),n.updateBox(im(xm,this),Rm.call(e,im(dm,this).box,t))}},{key:"render",value:function(){if(this.div)return this.div;var t=Kg(e,"render",this,3)([]);im(Am,this)&&(t.setAttribute("aria-label",im(Am,this)),t.setAttribute("role","mark")),im(bm,this)?t.classList.add("free"):this.div.addEventListener("keydown",om(Sm,this,Fm).bind(this),{signal:this._uiManager._signal});var r=am(ym,this,document.createElement("div"));t.append(r),r.setAttribute("aria-hidden","true"),r.className="internal",r.style.clipPath=im(hm,this);var n=Ng(this.parentDimensions,2),i=n[0],a=n[1];return this.setDims(this.width*i,this.height*a),Br(this,im(ym,this),["pointerover","pointerleave"]),this.enableEditing(),t}},{key:"pointerover",value:function(){this.isSelected||this.parent.drawLayer.addClass(im(xm,this),"hovered")}},{key:"pointerleave",value:function(){this.isSelected||this.parent.drawLayer.removeClass(im(xm,this),"hovered")}},{key:"_moveCaret",value:function(t){switch(this.parent.unselect(this),t){case 0:case 2:om(Sm,this,Dm).call(this,!0);break;case 1:case 3:om(Sm,this,Dm).call(this,!1)}}},{key:"select",value:function(){var t,r;Kg(e,"select",this,3)([]),im(xm,this)&&(null===(t=this.parent)||void 0===t||t.drawLayer.removeClass(im(xm,this),"hovered"),null===(r=this.parent)||void 0===r||r.drawLayer.addClass(im(xm,this),"selected"))}},{key:"unselect",value:function(){var t;Kg(e,"unselect",this,3)([]),im(xm,this)&&(null===(t=this.parent)||void 0===t||t.drawLayer.removeClass(im(xm,this),"selected"),im(bm,this)||om(Sm,this,Dm).call(this,!1))}},{key:"_mustFixPosition",get:function(){return!im(bm,this)}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;Kg(e,"show",this,3)([t]),this.parent&&(this.parent.drawLayer.show(im(mm,this),t),this.parent.drawLayer.show(im(xm,this),t))}},{key:"serialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();var e=this.getRect(0,0),r=Wa._colorManager.convert(this.color),n={annotationType:A.HIGHLIGHT,color:r,opacity:im(km,this),thickness:im(_m,this),quadPoints:om(Sm,this,Wm).call(this),outlines:om(Sm,this,Bm).call(this,e),pageIndex:this.pageIndex,rect:e,rotation:om(Sm,this,Nm).call(this),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!om(Sm,this,Um).call(this,n)?null:(n.id=this.annotationElementId,n)}},{key:"renderAnnotationElement",value:function(t){return t.updateEdited({rect:this.getRect(0,0)}),null}}],[{key:"_keyboardManager",get:function(){var t=e.prototype;return W(this,"_keyboardManager",new rn([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}},{key:"computeTelemetryFinalData",value:function(t){return{numberOfColors:t.get("color").size}}},{key:"initialize",value:function(t,r){var n;Wa.initialize(t,r),e._defaultColor||(e._defaultColor=(null===(n=r.highlightColors)||void 0===n?void 0:n.values().next().value)||"#fff066")}},{key:"updateDefaultParams",value:function(t,r){switch(t){case _.HIGHLIGHT_DEFAULT_COLOR:e._defaultColor=r;break;case _.HIGHLIGHT_THICKNESS:e._defaultThickness=r}}},{key:"defaultPropertiesToUpdate",get:function(){return[[_.HIGHLIGHT_DEFAULT_COLOR,e._defaultColor],[_.HIGHLIGHT_THICKNESS,e._defaultThickness]]}},{key:"startHighlighting",value:function(t,r,n){var i=this,a=n.target,o=n.x,s=n.y,u=a.getBoundingClientRect(),c=u.x,l=u.y,h=u.width,f=u.height,d=new AbortController,v=t.combinedSignal(d),p=function(r){d.abort(),om(e,i,Hm).call(i,t,r)};window.addEventListener("blur",p,{signal:v}),window.addEventListener("pointerup",p,{signal:v}),window.addEventListener("pointerdown",(function(t){t.preventDefault(),t.stopPropagation()}),{capture:!0,passive:!1,signal:v}),window.addEventListener("contextmenu",Te,{signal:v}),a.addEventListener("pointermove",om(e,this,Gm).bind(this,t),{signal:v}),this._freeHighlight=new Gy({x:o,y:s},[c,l,h,f],t.scale,this._defaultThickness/2,r,.001);var y=t.drawLayer.highlight(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0);this._freeHighlightId=y.id,this._freeHighlightClipId=y.clipPathId}},{key:"deserialize",value:(r=Ug(Gg().mark((function t(r,n,i){var a,o,s,u,c,l,h,f,d,v,p,y,g,m,b,w,k,x,_,E,S,O,T,P,L,M,C,j,I,R,F,D,N,W,B,G,H,U,z,V,q,Y,X;return Gg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,r instanceof Hv?(s=(o=r).data,u=s.quadPoints,c=s.rect,l=s.rotation,h=s.id,f=s.color,d=s.opacity,v=s.popupRef,p=o.parent.page.pageNumber,a=r={annotationType:A.HIGHLIGHT,color:Array.from(f),opacity:d,quadPoints:u,boxes:null,pageIndex:p-1,rect:c.slice(0),rotation:l,id:h,deleted:!1,popupRef:v}):r instanceof Gv&&(g=(y=r).data,m=g.inkLists,b=g.rect,w=g.rotation,k=g.id,x=g.color,_=g.borderStyle.rawWidth,E=g.popupRef,S=y.parent.page.pageNumber,a=r={annotationType:A.HIGHLIGHT,color:Array.from(x),thickness:_,inkLists:m,boxes:null,pageIndex:S-1,rect:b.slice(0),rotation:w,id:k,deleted:!1,popupRef:E}),T=(O=r).color,P=O.quadPoints,L=O.inkLists,M=O.opacity,t.next=5,Kg(e,"deserialize",this,2)([r,n,i]);case 5:if((C=t.sent).color=Z.makeHexColor.apply(Z,Dg(T)),am(km,C,M||1),L&&am(_m,C,r.thickness),C.annotationElementId=r.id||null,C._initialData=a,j=Ng(C.pageDimensions,2),I=j[0],R=j[1],F=Ng(C.pageTranslation,2),D=F[0],N=F[1],P){for(W=am(lm,C,[]),B=0;B=0)am(mm,this,r),am(hm,this,n),this.parent.drawLayer.finalizeLine(r,e),am(xm,this,this.parent.drawLayer.highlightOutline(im(dm,this)));else if(this.parent){var i=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(im(mm,this),e),this.parent.drawLayer.updateBox(im(mm,this),Rm.call(Rg,im(gm,this).box,(i-this.rotation+360)%360)),this.parent.drawLayer.updateLine(im(xm,this),im(dm,this)),this.parent.drawLayer.updateBox(im(xm,this),Rm.call(Rg,im(dm,this).box,i))}var a=e.box,o=a.x,s=a.y,u=a.width,c=a.height;switch(this.rotation){case 0:this.x=o,this.y=s,this.width=u,this.height=c;break;case 90:var l=Ng(this.parentDimensions,2),h=l[0],f=l[1];this.x=s,this.y=1-o,this.width=u*f/h,this.height=c*h/f;break;case 180:this.x=1-o,this.y=1-s,this.width=u,this.height=c;break;case 270:var d=Ng(this.parentDimensions,2),v=d[0],p=d[1];this.x=1-s,this.y=o,this.width=u*p/v,this.height=c*v/p}var y=im(dm,this).box.lastPoint;am(wm,this,[(y[0]-o)/u,(y[1]-s)/c])}function Lm(t){var e=this,r=function(t,r){var n,i,a;e.color=t,null===(n=e.parent)||void 0===n||n.drawLayer.changeColor(im(mm,e),t),null===(i=im(fm,e))||void 0===i||i.updateColor(t),am(km,e,r),null===(a=e.parent)||void 0===a||a.drawLayer.changeOpacity(im(mm,e),r)},n=this.color,i=im(km,this);this.addCommands({cmd:r.bind(this,t,Rg._defaultOpacity),undo:r.bind(this,n,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(t)},!0)}function Mm(t){var e=this,r=im(_m,this),n=function(t){am(_m,e,t),om(Sm,e,Cm).call(e,t)};this.addCommands({cmd:n.bind(this,t),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)}function Cm(t){if(im(bm,this)){om(Sm,this,Pm).call(this,{highlightOutlines:im(gm,this).getNewOutline(t/2)}),this.fixAndSetPosition();var e=Ng(this.parentDimensions,2),r=e[0],n=e[1];this.setDims(this.width*r,this.height*n)}}function jm(){null!==im(mm,this)&&this.parent&&(this.parent.drawLayer.remove(im(mm,this)),am(mm,this,null),this.parent.drawLayer.remove(im(xm,this)),am(xm,this,null))}function Im(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent;if(null===im(mm,this)){var e=t.drawLayer.highlight(im(gm,this),this.color,im(km,this));nm(am,[mm,this])._=e.id,nm(am,[hm,this])._=e.clipPathId,am(xm,this,t.drawLayer.highlightOutline(im(dm,this))),im(ym,this)&&(im(ym,this).style.clipPath=im(hm,this))}}function Rm(t,e){var r=t.x,n=t.y,i=t.width,a=t.height;switch(e){case 90:return{x:1-n-a,y:r,width:a,height:i};case 180:return{x:1-r-i,y:1-n-a,width:i,height:a};case 270:return{x:n,y:1-r-i,width:a,height:i}}return{x:r,y:n,width:i,height:a}}function Fm(t){Rg._keyboardManager.exec(this,t)}function Dm(t){if(im(um,this)){var e=window.getSelection();t?e.setPosition(im(um,this),im(cm,this)):e.setPosition(im(vm,this),im(pm,this))}}function Nm(){return im(bm,this)?this.rotation:0}function Wm(){if(im(bm,this))return null;var t,e=Ng(this.pageDimensions,2),r=e[0],n=e[1],i=Ng(this.pageTranslation,2),a=i[0],o=i[1],s=im(lm,this),u=new Float32Array(8*s.length),c=0,l=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Wg(t))){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(s);try{for(l.s();!(t=l.n()).done;){var h=t.value,f=h.x,d=h.y,v=h.width,p=h.height,y=f*r+a,g=(1-d-p)*n+o;u[c]=u[c+4]=y,u[c+1]=u[c+3]=g,u[c+2]=u[c+6]=y+v*r,u[c+5]=u[c+7]=g+p*n,c+=8}}catch(t){l.e(t)}finally{l.f()}return u}function Bm(t){return im(gm,this).serialize(t,om(Sm,this,Nm).call(this))}function Gm(t,e){this._freeHighlight.add(e)&&t.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)}function Hm(t,e){this._freeHighlight.isEmpty()?t.drawLayer.removeFreeHighlight(this._freeHighlightId):t.createAndAddNewEditor(e,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}function Um(t){var e=this._initialData.color;return t.color.some((function(t,r){return t!==e[r]}))}function zm(){zm=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Vm(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Km(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function qm(t){return function(t){if(Array.isArray(t))return Qm(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Km(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ym(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Xm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Km(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Km(t,e){if(t){if("string"==typeof t)return Qm(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qm(t,e):void 0}}function Qm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&t===i&&e===a)){var o,s,u=this.currentPath,c=hb(gb,this);if(u.push([t,e]),lb(wb,this,!0),u.length<=2)return(o=c).moveTo.apply(o,qm(u[0])),void c.lineTo(t,e);3===u.length&&(lb(gb,this,c=new Path2D),(s=c).moveTo.apply(s,qm(u[0]))),(r=fb(Ob,this,Wb)).call.apply(r,[this,c].concat(qm(u.at(-3)),qm(u.at(-2)),[t,e]))}}function Fb(){var t;if(0!==this.currentPath.length){var e=this.currentPath.at(-1);(t=hb(gb,this)).lineTo.apply(t,qm(e))}}function Db(t,e){var r,n=this;if(lb(Sb,this,null),t=Math.min(Math.max(t,0),this.canvas.width),e=Math.min(Math.max(e,0),this.canvas.height),fb(Ob,this,Rb).call(this,t,e),fb(Ob,this,Fb).call(this),1!==this.currentPath.length)r=fb(Ob,this,Bb).call(this);else{var i=[t,e];r=[[i,i.slice(),i.slice(),i]]}var a=hb(gb,this),o=this.currentPath;this.currentPath=[],lb(gb,this,new Path2D),this.addCommands({cmd:function(){n.allRawPaths.push(o),n.paths.push(r),n.bezierPath2D.push(a),n._uiManager.rebuild(n)},undo:function(){n.allRawPaths.pop(),n.paths.pop(),n.bezierPath2D.pop(),0===n.paths.length?n.remove():(n.canvas||(fb(Ob,n,Vb).call(n),fb(Ob,n,qb).call(n)),fb(Ob,n,rw).call(n))},mustExec:!0})}function Nb(){if(hb(wb,this)){lb(wb,this,!1);Math.ceil(this.thickness*this.parentScale);var t=this.currentPath.slice(-3),e=t.map((function(t){return t[0]})),r=t.map((function(t){return t[1]})),n=(Math.min.apply(Math,qm(e)),Math.max.apply(Math,qm(e)),Math.min.apply(Math,qm(r)),Math.max.apply(Math,qm(r)),this.ctx);n.save(),n.clearRect(0,0,this.canvas.width,this.canvas.height);var i,a=Vm(this.bezierPath2D);try{for(a.s();!(i=a.n()).done;){var o=i.value;n.stroke(o)}}catch(t){a.e(t)}finally{a.f()}n.stroke(hb(gb,this)),n.restore()}}function Wb(t,e,r,n,i,a,o){var s=(e+n)/2,u=(r+i)/2,c=(n+a)/2,l=(i+o)/2;t.bezierCurveTo(s+2*(n-s)/3,u+2*(i-u)/3,c+2*(n-c)/3,l+2*(i-l)/3,c,l)}function Bb(){var t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];var e,r=[],n=Xm(t[0],2),i=n[0],a=n[1];for(e=1;e0&&void 0!==arguments[0]&&arguments[0];if(!this.isEmpty())if(hb(mb,this)){var e=fb(Ob,this,tw).call(this),r=fb(Ob,this,ew).call(this);lb(pb,this,Math.max(Wa.MIN_SIZE,e[2]-e[0])),lb(vb,this,Math.max(Wa.MIN_SIZE,e[3]-e[1]));var n=Math.ceil(r+hb(pb,this)*this.scaleFactor),i=Math.ceil(r+hb(vb,this)*this.scaleFactor),a=Xm(this.parentDimensions,2),o=a[0],s=a[1];this.width=n/o,this.height=i/s,this.setAspectRatio(n,i);var u=this.translationX,c=this.translationY;this.translationX=-e[0],this.translationY=-e[1],fb(Ob,this,Yb).call(this),fb(Ob,this,Gb).call(this),lb(_b,this,n),lb(Eb,this,i),this.setDims(n,i);var l=t?r/this.scaleFactor/2:0;this.translate(u-this.translationX-l,c-this.translationY-l)}else fb(Ob,this,Gb).call(this)}function nw(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return iw(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iw(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function ow(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function sw(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){ow(a,n,i,o,s,"next",t)}function s(t){ow(a,n,i,o,s,"throw",t)}o(void 0)}))}}function uw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function cw(t){for(var e=1;e0&&void 0!==l[0]?l[0]:null,r=!(l.length>1&&void 0!==l[1])||l[1],!this.hasAltTextData()){t.next=4;break}return t.abrupt("return",null);case 4:if(n=this._uiManager.mlManager){t.next=7;break}throw new Error("No ML.");case 7:return t.next=9,n.isEnabledFor("altText");case 9:if(t.sent){t.next=11;break}throw new Error("ML isn't enabled for alt text.");case 11:return i=e||this.copyCanvas(null,null,!0).imageData,a=i.data,o=i.width,s=i.height,t.next=14,n.guess({name:"altText",request:{data:a,width:o,height:s,channels:a.length/(o*s)}});case 14:if(u=t.sent){t.next=17;break}throw new Error("No response from the AI service.");case 17:if(!u.error){t.next=19;break}throw new Error("Error from the AI service.");case 19:if(!u.cancel){t.next=21;break}return t.abrupt("return",null);case 21:if(u.output){t.next=23;break}throw new Error("No valid response from the AI service.");case 23:return c=u.output,t.next=26,this.setGuessedAltText(c);case 26:return r&&!this.hasAltTextData()&&(this.altTextData={alt:c,decorative:!1}),t.abrupt("return",c);case 28:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"remove",value:function(){var t,r;kw(Ew,this)&&(xw(_w,this,null),this._uiManager.imageManager.deleteId(kw(Ew,this)),null===(t=kw(Lw,this))||void 0===t||t.remove(),xw(Lw,this,null),null===(r=kw(Mw,this))||void 0===r||r.disconnect(),xw(Mw,this,null),kw(Cw,this)&&(clearTimeout(kw(Cw,this)),xw(Cw,this,null))),dw(e,"remove",this,3)([])}},{key:"rebuild",value:function(){this.parent?(dw(e,"rebuild",this,3)([]),null!==this.div&&(kw(Ew,this)&&null===kw(Lw,this)&&Aw(Rw,this,Ww).call(this),this.isAttachedToDOM||this.parent.add(this))):kw(Ew,this)&&Aw(Rw,this,Ww).call(this)}},{key:"onceAdded",value:function(){this._isDraggable=!0,this.div.focus()}},{key:"isEmpty",value:function(){return!(kw(Sw,this)||kw(_w,this)||kw(Ow,this)||kw(Tw,this)||kw(Ew,this))}},{key:"isResizable",get:function(){return!0}},{key:"render",value:function(){if(this.div)return this.div;var t,r;if(this.width&&(t=this.x,r=this.y),dw(e,"render",this,3)([]),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),kw(_w,this)?Aw(Rw,this,Bw).call(this):Aw(Rw,this,Ww).call(this),this.width&&!this.annotationElementId){var n=nw(this.parentDimensions,2),i=n[0],a=n[1];this.setAt(t*i,r*a,this.width*i,this.height*a)}return this.div}},{key:"copyCanvas",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t||(t=224);var n=kw(_w,this),i=n.width,a=n.height,o=new Fe,s=kw(_w,this),u=i,c=a,l=null;if(e){var h,f;if(i>e||a>e){var d=Math.min(e/i,e/a);u=Math.floor(i*d),c=Math.floor(a*d)}var v=(l=document.createElement("canvas")).width=Math.ceil(u*o.sx),p=l.height=Math.ceil(c*o.sy);kw(jw,this)||(s=Aw(Rw,this,Hw).call(this,v,p));var y=l.getContext("2d");y.filter=this._uiManager.hcmFilter;var g="white",m="#cfcfd8";"none"!==this._uiManager.hcmFilter?m="black":null!==(h=(f=window).matchMedia)&&void 0!==h&&h.call(f,"(prefers-color-scheme: dark)").matches&&(g="#8f8f9d",m="#42414d");var b=15*o.sx,w=15*o.sy,k=new OffscreenCanvas(2*b,2*w),x=k.getContext("2d");x.fillStyle=g,x.fillRect(0,0,2*b,2*w),x.fillStyle=m,x.fillRect(0,0,b,w),x.fillRect(b,w,b,w),y.fillStyle=y.createPattern(k,"repeat"),y.fillRect(0,0,v,p),y.drawImage(s,0,0,s.width,s.height,0,0,v,p)}var A=null;if(r){var _,E;if(o.symmetric&&s.widtht||a>t){var S=Math.min(t/i,t/a);_=Math.floor(i*S),E=Math.floor(a*S),kw(jw,this)||(s=Aw(Rw,this,Hw).call(this,_,E))}var O=new OffscreenCanvas(_,E).getContext("2d",{willReadFrequently:!0});O.drawImage(s,0,0,s.width,s.height,0,0,_,E),A={width:_,height:E,data:O.getImageData(0,0,_,E).data}}return{canvas:l,width:u,height:c,imageData:A}}},{key:"getImageForAltText",value:function(){return kw(Lw,this)}},{key:"serialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();var r={annotationType:A.STAMP,bitmapId:kw(Ew,this),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:kw(jw,this),structTreeParentId:this._structTreeParentId};if(t)return r.bitmapUrl=Aw(Rw,this,zw).call(this,!0),r.accessibilityData=this.serializeAltText(!0),r;var n=this.serializeAltText(!1),i=n.decorative,a=n.altText;if(!i&&a&&(r.accessibilityData={type:"Figure",alt:a}),this.annotationElementId){var o,s=Aw(Rw,this,qw).call(this,r);if(s.isSame)return null;s.isSameAltText?delete r.accessibilityData:r.accessibilityData.structParent=null!==(o=this._initialData.structParent)&&void 0!==o?o:-1}if(r.id=this.annotationElementId,null===e)return r;e.stamps||(e.stamps=new Map);var u=kw(jw,this)?(r.rect[2]-r.rect[0])*(r.rect[3]-r.rect[1]):null;if(e.stamps.has(kw(Ew,this))){if(kw(jw,this)){var c=e.stamps.get(kw(Ew,this));u>c.area&&(c.area=u,c.serialized.bitmap.close(),c.serialized.bitmap=Aw(Rw,this,zw).call(this,!1))}}else e.stamps.set(kw(Ew,this),{area:u,serialized:r}),r.bitmap=Aw(Rw,this,zw).call(this,!1);return r}},{key:"renderAnnotationElement",value:function(t){return t.updateEdited({rect:this.getRect(0,0)}),null}}],[{key:"initialize",value:function(t,e){Wa.initialize(t,e)}},{key:"supportedTypes",get:function(){return W(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((function(t){return"image/".concat(t)})))}},{key:"supportedTypesStr",get:function(){return W(this,"supportedTypesStr",this.supportedTypes.join(","))}},{key:"isHandlingMimeForPasting",value:function(t){return this.supportedTypes.includes(t)}},{key:"paste",value:function(t,e){e.pasteEditor(A.STAMP,{bitmapFile:t.getAsFile()})}},{key:"computeTelemetryFinalData",value:function(t){var e,r,n=t.get("hasAltText");return{hasAltText:null!==(e=n.get(!0))&&void 0!==e?e:0,hasNoAltText:null!==(r=n.get(!1))&&void 0!==r?r:0}}},{key:"deserialize",value:(r=sw(aw().mark((function t(r,n,i){var a,o,s,u,c,l,h,f,d,v,p,y,g,m,b,w,k,x,_,E,S,O,T,P,L;return aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,!(r instanceof qv)){t.next=22;break}return u=(s=r).data,c=u.rect,l=u.rotation,h=u.id,f=u.structParent,d=u.popupRef,v=s.container,p=s.parent.page.pageNumber,y=v.querySelector("canvas"),g=i.imageManager.getFromCanvas(v.id,y),y.remove(),t.next=8,n._structTree.getAriaAttributes("".concat(at).concat(h));case 8:if(t.t2=o=t.sent,t.t1=null===t.t2,t.t1){t.next=12;break}t.t1=void 0===o;case 12:if(!t.t1){t.next=16;break}t.t3=void 0,t.next=17;break;case 16:t.t3=o.get("aria-label");case 17:if(t.t0=t.t3,t.t0){t.next=20;break}t.t0="";case 20:m=t.t0,a=r={annotationType:A.STAMP,bitmapId:g.id,bitmap:g.bitmap,pageIndex:p-1,rect:c.slice(0),rotation:l,id:h,deleted:!1,accessibilityData:{decorative:!1,altText:m},isSvg:!1,structParent:f,popupRef:d};case 22:return t.next=24,dw(e,"deserialize",this,2)([r,n,i]);case 24:return b=t.sent,k=(w=r).rect,x=w.bitmap,_=w.bitmapUrl,E=w.bitmapId,S=w.isSvg,O=w.accessibilityData,E&&i.imageManager.isValidId(E)?(xw(Ew,b,E),x&&xw(_w,b,x)):xw(Ow,b,_),xw(jw,b,S),T=nw(b.pageDimensions,2),P=T[0],L=T[1],b.width=(k[2]-k[0])/P,b.height=(k[3]-k[1])/L,b.annotationElementId=r.id||null,O&&(b.altTextData=O),b._initialData=a,xw(Iw,b,!!a),t.abrupt("return",b);case 36:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})}]);var r,n}();function Dw(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?(xw(_w,this,t.bitmap),e||(xw(Ew,this,t.id),xw(jw,this,t.isSvg)),t.file&&xw(Pw,this,t.file.name),Aw(Rw,this,Bw).call(this)):this.remove()}function Nw(){if(xw(Sw,this,null),this._uiManager.enableWaiting(!1),kw(Lw,this)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&kw(_w,this))return this._editToolbar.hide(),void this._uiManager.editAltText(this,!0);if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&kw(_w,this)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch(t){}}this.div.focus()}}function Ww(){var t=this;if(kw(Ew,this))return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(kw(Ew,this)).then((function(e){return Aw(Rw,t,Dw).call(t,e,!0)})).finally((function(){return Aw(Rw,t,Nw).call(t)}));if(kw(Ow,this)){var e=kw(Ow,this);return xw(Ow,this,null),this._uiManager.enableWaiting(!0),void xw(Sw,this,this._uiManager.imageManager.getFromUrl(e).then((function(e){return Aw(Rw,t,Dw).call(t,e)})).finally((function(){return Aw(Rw,t,Nw).call(t)})))}if(kw(Tw,this)){var r=kw(Tw,this);return xw(Tw,this,null),this._uiManager.enableWaiting(!0),void xw(Sw,this,this._uiManager.imageManager.getFromFile(r).then((function(e){return Aw(Rw,t,Dw).call(t,e)})).finally((function(){return Aw(Rw,t,Nw).call(t)})))}var n=document.createElement("input");n.type="file",n.accept=db.supportedTypesStr;var i=this._uiManager._signal;xw(Sw,this,new Promise((function(e){n.addEventListener("change",sw(aw().mark((function r(){var i;return aw().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n.files&&0!==n.files.length){r.next=4;break}t.remove(),r.next=10;break;case 4:return t._uiManager.enableWaiting(!0),r.next=7,t._uiManager.imageManager.getFromFile(n.files[0]);case 7:i=r.sent,t._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:t._uiManager.useNewAltTextFlow}}),Aw(Rw,t,Dw).call(t,i);case 10:e();case 11:case"end":return r.stop()}}),r)}))),{signal:i}),n.addEventListener("cancel",(function(){t.remove(),e()}),{signal:i})})).finally((function(){return Aw(Rw,t,Nw).call(t)}))),n.click()}function Bw(){var t=this.div,e=kw(_w,this),r=e.width,n=e.height,i=nw(this.pageDimensions,2),a=i[0],o=i[1],s=.75;if(this.width)r=this.width*a,n=this.height*o;else if(r>s*a||n>s*o){var u=Math.min(s*a/r,s*o/n);r*=u,n*=u}var c=nw(this.parentDimensions,2),l=c[0],h=c[1];this.setDims(r*l/a,n*h/o),this._uiManager.enableWaiting(!1);var f=xw(Lw,this,document.createElement("canvas"));f.setAttribute("role","img"),this.addContainer(f),this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&!this.annotationElementId||(t.hidden=!1),Aw(Rw,this,Uw).call(this,r,n),Aw(Rw,this,Vw).call(this),kw(Iw,this)||(this.parent.addUndoableEditor(this),xw(Iw,this,!0)),this._reportTelemetry({action:"inserted_image"}),kw(Pw,this)&&f.setAttribute("aria-label",kw(Pw,this))}function Gw(t,e){var r,n=this,i=nw(this.parentDimensions,2),a=i[0],o=i[1];this.width=t/a,this.height=e/o,null!==(r=this._initialOptions)&&void 0!==r&&r.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==kw(Cw,this)&&clearTimeout(kw(Cw,this)),xw(Cw,this,setTimeout((function(){xw(Cw,n,null),Aw(Rw,n,Uw).call(n,t,e)}),200))}function Hw(t,e){for(var r=kw(_w,this),n=r.width,i=r.height,a=kw(_w,this);n>2*t||i>2*e;){var o=n,s=i;n>2*t&&(n=n>=16384?Math.floor(n/2)-1:Math.ceil(n/2)),i>2*e&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2));var u=new OffscreenCanvas(n,i);u.getContext("2d").drawImage(a,0,0,o,s,0,0,n,i),a=u.transferToImageBitmap()}return a}function Uw(t,e){var r=new Fe,n=Math.ceil(t*r.sx),i=Math.ceil(e*r.sy),a=kw(Lw,this);if(a&&(a.width!==n||a.height!==i)){a.width=n,a.height=i;var o=kw(jw,this)?kw(_w,this):Aw(Rw,this,Hw).call(this,n,i),s=a.getContext("2d");s.filter=this._uiManager.hcmFilter,s.drawImage(o,0,0,o.width,o.height,0,0,n,i)}}function zw(t){if(t){if(kw(jw,this)){var e=this._uiManager.imageManager.getSvgUrl(kw(Ew,this));if(e)return e}var r=document.createElement("canvas"),n=kw(_w,this);return r.width=n.width,r.height=n.height,r.getContext("2d").drawImage(kw(_w,this),0,0),r.toDataURL()}if(kw(jw,this)){var i=nw(this.pageDimensions,2),a=i[0],o=i[1],s=Math.round(this.width*a*Vt.PDF_TO_CSS_UNITS),u=Math.round(this.height*o*Vt.PDF_TO_CSS_UNITS),c=new OffscreenCanvas(s,u);return c.getContext("2d").drawImage(kw(_w,this),0,0,kw(_w,this).width,kw(_w,this).height,0,0,s,u),c.transferToImageBitmap()}return structuredClone(kw(_w,this))}function Vw(){var t=this;this._uiManager._signal&&(xw(Mw,this,new ResizeObserver((function(e){var r=e[0].contentRect;r.width&&r.height&&Aw(Rw,t,Gw).call(t,r.width,r.height)}))),kw(Mw,this).observe(this.div),this._uiManager._signal.addEventListener("abort",(function(){var e;null===(e=kw(Mw,t))||void 0===e||e.disconnect(),xw(Mw,t,null)}),{once:!0}))}function qw(t){var e,r=this._initialData,n=r.rect,i=r.pageIndex,a=r.accessibilityData.altText,o=t.rect.every((function(t,e){return Math.abs(t-n[e])<1})),s=t.pageIndex===i,u=((null===(e=t.accessibilityData)||void 0===e?void 0:e.alt)||"")===a;return{isSame:o&&s&&u,isSameAltText:u}}function Yw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xw(t){for(var e=1;e=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Qw(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Jw(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Qw(a,n,i,o,s,"next",t)}function s(t){Qw(a,n,i,o,s,"throw",t)}o(void 0)}))}}function $w(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Zw(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Zw(t,e){if(t){if("string"==typeof t)return tk(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tk(t,e):void 0}}function tk(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]?arguments[0]:sk(kk,this).getMode();switch(ck(xk,this,Tk).call(this),t){case A.NONE:return this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case A.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case A.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);var e,r=this.div.classList,n=$w(Lk._.values());try{for(n.s();!(e=n.n()).done;){var i=e.value;r.toggle("".concat(i._type,"Editing"),t===i._editorType)}}catch(t){n.e(t)}finally{n.f()}this.div.hidden=!1}},{key:"hasTextLayer",value:function(t){var e;return t===(null===(e=sk(bk,this))||void 0===e?void 0:e.div)}},{key:"addInkEditorIfNeeded",value:function(t){if(sk(kk,this).getMode()===A.INK){if(!t){var e,r=$w(sk(pk,this).values());try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.isEmpty())return void n.setInBackground()}}catch(t){r.e(t)}finally{r.f()}}this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}}},{key:"setEditingState",value:function(t){sk(kk,this).setEditingState(t)}},{key:"addCommands",value:function(t){sk(kk,this).addCommands(t)}},{key:"toggleDrawing",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("drawing",!t)}},{key:"togglePointerEvents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("disabled",!t)}},{key:"toggleAnnotationLayerPointerEvents",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(t=sk(fk,this))||void 0===t||t.div.classList.toggle("disabled",!e)}},{key:"enable",value:(e=Jw(Kw().mark((function t(){var e,r,n,i,a,o,s,u,c;return Kw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.div.tabIndex=0,this.togglePointerEvents(!0),e=new Set,r=$w(sk(pk,this).values());try{for(r.s();!(n=r.n()).done;)(i=n.value).enableEditing(),i.show(!0),i.annotationElementId&&(sk(kk,this).removeChangedExistingAnnotation(i),e.add(i.annotationElementId))}catch(t){r.e(t)}finally{r.f()}if(sk(fk,this)){t.next=7;break}return t.abrupt("return");case 7:a=sk(fk,this).getEditableAnnotations(),o=$w(a),t.prev=9,o.s();case 11:if((s=o.n()).done){t.next=27;break}if((u=s.value).hide(),!sk(kk,this).isDeletedAnnotationElement(u.data.id)){t.next=16;break}return t.abrupt("continue",25);case 16:if(!e.has(u.data.id)){t.next=18;break}return t.abrupt("continue",25);case 18:return t.next=20,this.deserialize(u);case 20:if(c=t.sent){t.next=23;break}return t.abrupt("continue",25);case 23:this.addOrRebuild(c),c.enableEditing();case 25:t.next=11;break;case 27:t.next=32;break;case 29:t.prev=29,t.t0=t.catch(9),o.e(t.t0);case 32:return t.prev=32,o.f(),t.finish(32);case 35:case"end":return t.stop()}}),t,this,[[9,29,32,35]])}))),function(){return e.apply(this,arguments)})},{key:"disable",value:function(){uk(mk,this,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);var t,e=new Map,r=new Map,n=$w(sk(pk,this).values());try{for(n.s();!(t=n.n()).done;){var i,a=t.value;a.disableEditing(),a.annotationElementId&&(null===a.serialize()?(r.set(a.annotationElementId,a),null===(i=this.getEditableAnnotation(a.annotationElementId))||void 0===i||i.show(),a.remove()):e.set(a.annotationElementId,a))}}catch(t){n.e(t)}finally{n.f()}if(sk(fk,this)){var o,s=$w(sk(fk,this).getEditableAnnotations());try{for(s.s();!(o=s.n()).done;){var u=o.value,c=u.data.id;if(!sk(kk,this).isDeletedAnnotationElement(c)){var l=r.get(c);l?(l.resetAnnotationElement(u),l.show(!1),u.show()):((l=e.get(c))&&(sk(kk,this).addChangedExistingAnnotation(l),l.renderAnnotationElement(u)&&l.show(!1)),u.show())}}}catch(t){s.e(t)}finally{s.f()}}ck(xk,this,Tk).call(this),this.isEmpty&&(this.div.hidden=!0);var h,f=this.div.classList,d=$w(Lk._.values());try{for(d.s();!(h=d.n()).done;){var v=h.value;f.remove("".concat(v._type,"Editing"))}}catch(t){d.e(t)}finally{d.f()}this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),uk(mk,this,!1)}},{key:"getEditableAnnotation",value:function(t){var e;return(null===(e=sk(fk,this))||void 0===e?void 0:e.getEditableAnnotation(t))||null}},{key:"setActiveEditor",value:function(t){sk(kk,this).getActive()!==t&&sk(kk,this).setActiveEditor(t)}},{key:"enableTextSelection",value:function(){var t;if(this.div.tabIndex=-1,null!==(t=sk(bk,this))&&void 0!==t&&t.div&&!sk(wk,this)){uk(wk,this,new AbortController);var e=sk(kk,this).combinedSignal(sk(wk,this));sk(bk,this).div.addEventListener("pointerdown",ck(xk,this,_k).bind(this),{signal:e}),sk(bk,this).div.classList.add("highlighting")}}},{key:"disableTextSelection",value:function(){var t;this.div.tabIndex=0,null!==(t=sk(bk,this))&&void 0!==t&&t.div&&sk(wk,this)&&(sk(wk,this).abort(),uk(wk,this,null),sk(bk,this).div.classList.remove("highlighting"))}},{key:"enableClick",value:function(){if(!sk(dk,this)){uk(dk,this,new AbortController);var t=sk(kk,this).combinedSignal(sk(dk,this));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t}),this.div.addEventListener("pointerup",this.pointerup.bind(this),{signal:t})}}},{key:"disableClick",value:function(){var t;null===(t=sk(dk,this))||void 0===t||t.abort(),uk(dk,this,null)}},{key:"attach",value:function(t){sk(pk,this).set(t.id,t);var e=t.annotationElementId;e&&sk(kk,this).isDeletedAnnotationElement(e)&&sk(kk,this).removeDeletedAnnotationElement(t)}},{key:"detach",value:function(t){var e;sk(pk,this).delete(t.id),null===(e=sk(lk,this))||void 0===e||e.removePointerInTextLayer(t.contentDiv),!sk(mk,this)&&t.annotationElementId&&sk(kk,this).addDeletedAnnotationElement(t)}},{key:"remove",value:function(t){this.detach(t),sk(kk,this).removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1,sk(gk,this)||this.addInkEditorIfNeeded(!1)}},{key:"changeParent",value:function(t){var e;t.parent!==this&&(t.parent&&t.annotationElementId&&(sk(kk,this).addDeletedAnnotationElement(t.annotationElementId),Wa.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),null===(e=t.parent)||void 0===e||e.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}},{key:"add",value:function(t){if(t.parent!==this||!t.isAttachedToDOM){if(this.changeParent(t),sk(kk,this).addEditor(t),this.attach(t),!t.isAttachedToDOM){var e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(),sk(kk,this).addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}},{key:"moveEditorInDOM",value:function(t){var e,r=this;if(t.isAttachedToDOM){var n=document.activeElement;t.div.contains(n)&&!sk(vk,this)&&(t._focusEventsAllowed=!1,uk(vk,this,setTimeout((function(){uk(vk,r,null),t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",(function(){t._focusEventsAllowed=!0}),{once:!0,signal:sk(kk,r)._signal}),n.focus())}),0))),t._structTreeParentId=null===(e=sk(lk,this))||void 0===e?void 0:e.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}}},{key:"addOrRebuild",value:function(t){t.needsToBeRebuilt()?(t.parent||(t.parent=this),t.rebuild(),t.show()):this.add(t)}},{key:"addUndoableEditor",value:function(t){this.addCommands({cmd:function(){return t._uiManager.rebuild(t)},undo:function(){t.remove()},mustExec:!1})}},{key:"getNextId",value:function(){return sk(kk,this).getId()}},{key:"combinedSignal",value:function(t){return sk(kk,this).combinedSignal(t)}},{key:"canCreateNewEmptyEditor",value:function(){var t;return null===(t=ok(xk,this,Ek))||void 0===t?void 0:t.canCreateNewEmptyEditor()}},{key:"pasteEditor",value:function(t,e){sk(kk,this).updateToolbar(t),sk(kk,this).updateMode(t);var r=ck(xk,this,Ok).call(this),n=r.offsetX,i=r.offsetY,a=this.getNextId(),o=ck(xk,this,Sk).call(this,Xw({parent:this,id:a,x:n,y:i,uiManager:sk(kk,this),isCentered:!0},e));o&&this.add(o)}},{key:"deserialize",value:(t=Jw(Kw().mark((function t(e){var r,n;return Kw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(r=Lk._.get(null!==(n=e.annotationType)&&void 0!==n?n:e.annotationEditorType))||void 0===r?void 0:r.deserialize(e,this,sk(kk,this));case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0=null;case 5:return t.abrupt("return",t.t0);case 6:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"createAndAddNewEditor",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getNextId(),i=ck(xk,this,Sk).call(this,Xw({parent:this,id:n,x:t.offsetX,y:t.offsetY,uiManager:sk(kk,this),isCentered:e},r));return i&&this.add(i),i}},{key:"addNewEditor",value:function(){this.createAndAddNewEditor(ck(xk,this,Ok).call(this),!0)}},{key:"setSelected",value:function(t){sk(kk,this).setSelected(t)}},{key:"toggleSelected",value:function(t){sk(kk,this).toggleSelected(t)}},{key:"unselect",value:function(t){sk(kk,this).unselect(t)}},{key:"pointerup",value:function(t){var e=J.platform.isMac;0!==t.button||t.ctrlKey&&e||t.target===this.div&&sk(yk,this)&&(uk(yk,this,!1),sk(hk,this)?sk(kk,this).getMode()!==A.STAMP?this.createAndAddNewEditor(t,!1):sk(kk,this).unselectAll():uk(hk,this,!0))}},{key:"pointerdown",value:function(t){if(sk(kk,this).getMode()===A.HIGHLIGHT&&this.enableTextSelection(),sk(yk,this))uk(yk,this,!1);else{var e=J.platform.isMac;if(!(0!==t.button||t.ctrlKey&&e)&&t.target===this.div){uk(yk,this,!0);var r=sk(kk,this).getActive();uk(hk,this,!r||r.isEmpty())}}}},{key:"findNewParent",value:function(t,e,r){var n=sk(kk,this).findParent(e,r);return null!==n&&n!==this&&(n.changeParent(t),!0)}},{key:"destroy",value:function(){var t;(null===(t=sk(kk,this).getActive())||void 0===t?void 0:t.parent)===this&&(sk(kk,this).commitOrRemove(),sk(kk,this).setActiveEditor(null)),sk(vk,this)&&(clearTimeout(sk(vk,this)),uk(vk,this,null));var e,r=$w(sk(pk,this).values());try{for(r.s();!(e=r.n()).done;){var n,i=e.value;null===(n=sk(lk,this))||void 0===n||n.removePointerInTextLayer(i.contentDiv),i.setParent(null),i.isAttachedToDOM=!1,i.div.remove()}}catch(t){r.e(t)}finally{r.f()}this.div=null,sk(pk,this).clear(),sk(kk,this).removeLayer(this)}},{key:"render",value:function(t){var e=t.viewport;this.viewport=e,Re(this.div,e);var r,n=$w(sk(kk,this).getEditors(this.pageIndex));try{for(n.s();!(r=n.n()).done;){var i=r.value;this.add(i),i.rebuild()}}catch(t){n.e(t)}finally{n.f()}this.updateMode()}},{key:"update",value:function(t){var e=t.viewport;sk(kk,this).commitOrRemove(),ck(xk,this,Tk).call(this);var r=this.viewport.rotation,n=e.rotation;if(this.viewport=e,Re(this.div,{rotation:n}),r!==n){var i,a=$w(sk(pk,this).values());try{for(a.s();!(i=a.n()).done;)i.value.rotate(n)}catch(t){a.e(t)}finally{a.f()}}this.addInkEditorIfNeeded(!1)}},{key:"pageDimensions",get:function(){var t=this.viewport.rawDims;return[t.pageWidth,t.pageHeight]}},{key:"scale",get:function(){return sk(kk,this).viewParameters.realScale}}]);var t,e}();function _k(t){var e=this;sk(kk,this).unselectAll();var r=t.target;if(r===sk(bk,this).div||("img"===r.getAttribute("role")||r.classList.contains("endOfContent"))&&sk(bk,this).div.contains(r)){var n=J.platform.isMac;if(0!==t.button||t.ctrlKey&&n)return;sk(kk,this).showAllEditors("highlight",!0,!0),sk(bk,this).div.classList.add("free"),this.toggleDrawing(),Om.startHighlighting(this,"ltr"===sk(kk,this).direction,{target:sk(bk,this).div,x:t.x,y:t.y}),sk(bk,this).div.addEventListener("pointerup",(function(){sk(bk,e).div.classList.remove("free"),e.toggleDrawing(!0)}),{once:!0,signal:sk(kk,this)._signal}),t.preventDefault()}}function Ek(t){return Lk._.get(sk(kk,t).getMode())}function Sk(t){var e=ok(xk,this,Ek);return e?new e.prototype.constructor(t):null}function Ok(){var t=this.div.getBoundingClientRect(),e=t.x,r=t.y,n=t.width,i=t.height,a=Math.max(0,e),o=Math.max(0,r),s=(a+Math.min(window.innerWidth,e+n))/2-e,u=(o+Math.min(window.innerHeight,r+i))/2-r,c=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Zw(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.viewport.rotation%180==0?[s,u]:[u,s],2);return{offsetX:c[0],offsetY:c[1]}}function Tk(){uk(gk,this,!0);var t,e=$w(sk(pk,this).values());try{for(e.s();!(t=e.n()).done;){var r=t.value;r.isEmpty()&&r.remove()}}catch(t){e.e(t)}finally{e.f()}uk(gk,this,!1)}rk(Ak,"_initialized",!1);var Pk,Lk={_:new Map([Dp,Tb,Fw,Om].map((function(t){return[t._editorType,t]})))};function Mk(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ck(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ck(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Ck(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0){var e,r=Mk(Nk(Hk,this).values());try{for(r.s();!(e=r.n()).done;){var n=e.value;n.remove(),t.append(n)}}catch(t){r.e(t)}finally{r.f()}}Dk(Bk,this,t)}}else Dk(Bk,this,t)}},{key:"highlight",value:function(e,r,n){var i,a,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=(Dk(Gk,this,(i=Nk(Gk,this),a=i++,i)),a),u=Wk(zk,this,Yk).call(this,e.box);u.classList.add("highlight"),e.free&&u.classList.add("free");var c=t._svgFactory.createElement("defs");u.append(c);var l=t._svgFactory.createElement("path");c.append(l);var h="path_p".concat(this.pageIndex,"_").concat(s);l.setAttribute("id",h),l.setAttribute("d",e.toSVGPath()),o&&Nk(Uk,this).set(s,l);var f=Wk(zk,this,Xk).call(this,c,h),d=t._svgFactory.createElement("use");return u.append(d),u.setAttribute("fill",r),u.setAttribute("fill-opacity",n),d.setAttribute("href","#".concat(h)),Nk(Hk,this).set(s,u),{id:s,clipPathId:"url(#".concat(f,")")}}},{key:"highlightOutline",value:function(e){var r,n,i=(Dk(Gk,this,(r=Nk(Gk,this),n=r++,r)),n),a=Wk(zk,this,Yk).call(this,e.box);a.classList.add("highlightOutline");var o=t._svgFactory.createElement("defs");a.append(o);var s=t._svgFactory.createElement("path");o.append(s);var u,c="path_p".concat(this.pageIndex,"_").concat(i);if(s.setAttribute("id",c),s.setAttribute("d",e.toSVGPath()),s.setAttribute("vector-effect","non-scaling-stroke"),e.free){a.classList.add("free");var l=t._svgFactory.createElement("mask");o.append(l),u="mask_p".concat(this.pageIndex,"_").concat(i),l.setAttribute("id",u),l.setAttribute("maskUnits","objectBoundingBox");var h=t._svgFactory.createElement("rect");l.append(h),h.setAttribute("width","1"),h.setAttribute("height","1"),h.setAttribute("fill","white");var f=t._svgFactory.createElement("use");l.append(f),f.setAttribute("href","#".concat(c)),f.setAttribute("stroke","none"),f.setAttribute("fill","black"),f.setAttribute("fill-rule","nonzero"),f.classList.add("mask")}var d=t._svgFactory.createElement("use");a.append(d),d.setAttribute("href","#".concat(c)),u&&d.setAttribute("mask","url(#".concat(u,")"));var v=d.cloneNode();return a.append(v),d.classList.add("mainOutline"),v.classList.add("secondaryOutline"),Nk(Hk,this).set(i,a),i}},{key:"finalizeLine",value:function(t,e){var r=Nk(Uk,this).get(t);Nk(Uk,this).delete(t),this.updateBox(t,e.box),r.setAttribute("d",e.toSVGPath())}},{key:"updateLine",value:function(t,e){Nk(Hk,this).get(t).firstChild.firstChild.setAttribute("d",e.toSVGPath())}},{key:"removeFreeHighlight",value:function(t){this.remove(t),Nk(Uk,this).delete(t)}},{key:"updatePath",value:function(t,e){Nk(Uk,this).get(t).setAttribute("d",e.toSVGPath())}},{key:"updateBox",value:function(e,r){qk.call(t,Nk(Hk,this).get(e),r)}},{key:"show",value:function(t,e){Nk(Hk,this).get(t).classList.toggle("hidden",!e)}},{key:"rotate",value:function(t,e){Nk(Hk,this).get(t).setAttribute("data-main-rotation",e)}},{key:"changeColor",value:function(t,e){Nk(Hk,this).get(t).setAttribute("fill",e)}},{key:"changeOpacity",value:function(t,e){Nk(Hk,this).get(t).setAttribute("fill-opacity",e)}},{key:"addClass",value:function(t,e){Nk(Hk,this).get(t).classList.add(e)}},{key:"removeClass",value:function(t,e){Nk(Hk,this).get(t).classList.remove(e)}},{key:"getSVGRoot",value:function(t){return Nk(Hk,this).get(t)}},{key:"remove",value:function(t){null!==Nk(Bk,this)&&(Nk(Hk,this).get(t).remove(),Nk(Hk,this).delete(t))}},{key:"destroy",value:function(){Dk(Bk,this,null);var t,e=Mk(Nk(Hk,this).values());try{for(e.s();!(t=e.n()).done;)t.value.remove()}catch(t){e.e(t)}finally{e.f()}Nk(Hk,this).clear()}}],[{key:"_svgFactory",get:function(){return W(this,"_svgFactory",new me)}}])}();function qk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.x,n=void 0===r?0:r,i=e.y,a=void 0===i?0:i,o=e.width,s=void 0===o?1:o,u=e.height,c=void 0===u?1:u,l=t.style;l.top="".concat(100*a,"%"),l.left="".concat(100*n,"%"),l.width="".concat(100*s,"%"),l.height="".concat(100*c,"%")}function Yk(t){var e=Pk._svgFactory.create(1,1,!0);return Nk(Bk,this).append(e),e.setAttribute("aria-hidden",!0),qk.call(Pk,e,t),e}function Xk(t,e){var r=Pk._svgFactory.createElement("clipPath");t.append(r);var n="clip_".concat(e);r.setAttribute("id",n),r.setAttribute("clipPathUnits","objectBoundingBox");var i=Pk._svgFactory.createElement("use");return r.append(i),i.setAttribute("href","#".concat(e)),i.classList.add("clip"),n}Pk=Vk;`;function yr(G,J){return typeof G=="string"?G:G instanceof Blob?URL.createObjectURL(G):G instanceof ArrayBuffer?URL.createObjectURL(new Blob([G],J)):G instanceof Response?URL.createObjectURL(G.blob()):G}function Le(G){return new Promise((J,oe)=>{let Se=document.createElement("script");Se.src=G,Se.onload=function(){J()},Se.onerror=function(){oe()},document.body.append(Se)})}function sr(G,J){return ar(this,null,function*(){J&&(J instanceof ArrayBuffer&&(J=new Blob([J])),Ir(G,URL.createObjectURL(J)))})}function Ir(G,J){let oe=document.createElement("a");oe.download=G,oe.style.display="none",oe.href=J,document.body.appendChild(oe),oe.click(),document.body.removeChild(oe)}function hn(G){var J,oe,Se,et,ie;for(J="",Se=G.length,oe=0;oe=1&&et<=127?J+=G.charAt(oe):et>2047?(ie=224|et>>12&15,J+=String.fromCharCode(ie),ie=128|et>>6&63,J+=String.fromCharCode(ie),ie=128|et>>0&63,J+=String.fromCharCode(ie)):(ie=192|et>>6&31,J+=String.fromCharCode(ie),ie=128|et>>0&63,J+=String.fromCharCode(ie));return J}var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Et(G){var J,oe,Se,et,ie,xe;for(Se=G.length,oe=0,J="";oe>2),J+=Oe.charAt((et&3)<<4),J+="==";break}if(ie=G.charCodeAt(oe++),oe==Se){J+=Oe.charAt(et>>2),J+=Oe.charAt((et&3)<<4|(ie&240)>>4),J+=Oe.charAt((ie&15)<<2),J+="=";break}xe=G.charCodeAt(oe++),J+=Oe.charAt(et>>2),J+=Oe.charAt((et&3)<<4|(ie&240)>>4),J+=Oe.charAt((ie&15)<<2|(xe&192)>>6),J+=Oe.charAt(xe&63)}return J}function qt(G){return Et(hn(G))}var nr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Iu<"u"?Iu:typeof self<"u"?self:{};function Nr(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}function zt(G,J){for(var oe=-1,Se=G==null?0:G.length,et=Array(Se);++oe-1}var xn=Dn,Wn=co;function Vi(G,J){var oe=this.__data__,Se=Wn(oe,G);return Se<0?(++this.size,oe.push([G,J])):oe[Se][1]=J,this}var uo=Vi,tn=un,xr=yo,Ei=gn,Ni=xn,ji=uo;function wa(G){var J=-1,oe=G==null?0:G.length;for(this.clear();++J-1&&G%1==0&&G-1&&G%1==0&&G<=d2}var $f=l1,g2=Ac,A1=$f,p2=Ts,h1="[object Arguments]",Kg="[object Array]",v2="[object Boolean]",Ll="[object Date]",nu="[object Error]",m2="[object Function]",y2="[object Map]",I2="[object Number]",zg="[object Object]",Vg="[object RegExp]",b2="[object Set]",Ls="[object String]",Lh="[object WeakMap]",Zg="[object ArrayBuffer]",f1="[object DataView]",Oh="[object Float32Array]",C2="[object Float64Array]",d1="[object Int8Array]",E2="[object Int16Array]",w2="[object Int32Array]",g1="[object Uint8Array]",Ph="[object Uint8ClampedArray]",Gh="[object Uint16Array]",B2="[object Uint32Array]",Da={};Da[Oh]=Da[C2]=Da[d1]=Da[E2]=Da[w2]=Da[g1]=Da[Ph]=Da[Gh]=Da[B2]=!0,Da[h1]=Da[Kg]=Da[Zg]=Da[v2]=Da[f1]=Da[Ll]=Da[nu]=Da[m2]=Da[y2]=Da[I2]=Da[zg]=Da[Vg]=Da[b2]=Da[Ls]=Da[Lh]=!1;function Q2(G){return p2(G)&&A1(G.length)&&!!Da[g2(G)]}var k2=Q2;function Xg(G){return function(J){return G(J)}}var Ol=Xg,ed={exports:{}};ed.exports,function(G,J){var oe=jn,Se=J&&!J.nodeType&&J,et=Se&&!0&&G&&!G.nodeType&&G,ie=et&&et.exports===Se,xe=ie&&oe.process,tt=function(){try{var Bt=et&&et.require&&et.require("util").types;return Bt||xe&&xe.binding&&xe.binding("util")}catch{}}();G.exports=tt}(ed,ed.exports);var $g=ed.exports,x2=k2,S2=Ol,p1=$g,v1=p1&&p1.isTypedArray,_2=v1?S2(v1):x2,m1=_2,D2=Tl,R2=Jg,F2=dc,y1=il,I1=Wg,b1=m1,Oi=Object.prototype,C1=Oi.hasOwnProperty;function E1(G,J){var oe=F2(G),Se=!oe&&R2(G),et=!oe&&!Se&&y1(G),ie=!oe&&!Se&&!et&&b1(G),xe=oe||Se||et||ie,tt=xe?D2(G.length,String):[],Bt=tt.length;for(var Gt in G)(J||C1.call(G,Gt))&&!(xe&&(Gt=="length"||et&&(Gt=="offset"||Gt=="parent")||ie&&(Gt=="buffer"||Gt=="byteLength"||Gt=="byteOffset")||I1(Gt,Bt)))&&tt.push(Gt);return tt}var UA=E1,mi=Object.prototype;function w1(G){var J=G&&G.constructor,oe=typeof J=="function"&&J.prototype||mi;return G===oe}var td=w1;function B1(G,J){return function(oe){return G(J(oe))}}var Q1=B1,rd=Q1,N2=rd(Object.keys,Object),mn=N2,e0=td,k1=mn,ir=Object.prototype,nd=ir.hasOwnProperty;function x1(G){if(!e0(G))return k1(G);var J=[];for(var oe in Object(G))nd.call(G,oe)&&oe!="constructor"&&J.push(oe);return J}var S1=x1,bo=Ur,t0=$f;function r0(G){return G!=null&&t0(G.length)&&!bo(G)}var _1=r0,D1=UA,M2=S1,n0=_1;function T2(G){return n0(G)?D1(G):M2(G)}var id=T2,On=Dc,R1=id;function F1(G,J){return G&&On(J,R1(J),G)}var N1=F1;function M1(G){var J=[];if(G!=null)for(var oe in Object(G))J.push(oe);return J}var L2=M1,O2=qa,P2=td,G2=L2,U2=Object.prototype,j2=U2.hasOwnProperty;function H2(G){if(!O2(G))return G2(G);var J=P2(G),oe=[];for(var Se in G)Se=="constructor"&&(J||!j2.call(G,Se))||oe.push(Se);return oe}var Y2=H2,T1=UA,J2=Y2,q2=_1;function W2(G){return q2(G)?T1(G,!0):J2(G)}var Uh=W2,K2=Dc,L1=Uh;function Pa(G,J){return G&&K2(J,L1(J),G)}var ad=Pa,ss={exports:{}};ss.exports,function(G,J){var oe=br,Se=J&&!J.nodeType&&J,et=Se&&!0&&G&&!G.nodeType&&G,ie=et&&et.exports===Se,xe=ie?oe.Buffer:void 0,tt=xe?xe.allocUnsafe:void 0;function Bt(Gt,Xt){if(Xt)return Gt.slice();var Yr=Gt.length,qr=tt?tt(Yr):new Gt.constructor(Yr);return Gt.copy(qr),qr}G.exports=Bt}(ss,ss.exports);var Fc=ss.exports;function jh(G,J){var oe=-1,Se=G.length;for(J||(J=Array(Se));++oeet?0:et+J),oe=oe>et?et:oe,oe<0&&(oe+=et),et=J>oe?0:oe-J>>>0,J>>>=0;for(var ie=Array(et);++Se0&&oe(tt)?J>1?q0(tt,J-1,oe,Se,et):hm(et,tt):Se||(et[et.length]=tt)}return et}var Ou=q0,go=Ou;function ws(G){var J=G==null?0:G.length;return J?go(G,1):[]}var wo=ws;function mc(G,J,oe){switch(oe.length){case 0:return G.call(J);case 1:return G.call(J,oe[0]);case 2:return G.call(J,oe[0],oe[1]);case 3:return G.call(J,oe[0],oe[1],oe[2])}return G.apply(J,oe)}var XA=mc,dm=XA,$A=Math.max;function Sb(G,J,oe){return J=$A(J===void 0?G.length-1:J,0),function(){for(var Se=arguments,et=-1,ie=$A(Se.length-J,0),xe=Array(ie);++et0){if(++J>=mm)return arguments[0]}else J=0;return G.apply(void 0,arguments)}}var W0=Rb,_d=vm,ym=W0,Im=ym(_d),K0=Im,bm=wo,fs=gm,Fb=K0;function Dd(G){return Fb(fs(G,void 0,bm),G+"")}var Rd=Dd,Nb=Cr,Cm=_i,Mb=em,Tb=xd,Em=Dc,wm=um,Bm=Rd,Qm=Gl,km=1,Lb=2,xm=4,Sm=Bm(function(G,J){var oe={};if(G==null)return oe;var Se=!1;J=Nb(J,function(ie){return ie=Tb(ie,G),Se||(Se=ie.length>1),ie}),Em(G,Qm(G),oe),Se&&(oe=Cm(oe,km|Lb|xm,wm));for(var et=J.length;et--;)Mb(oe,J[et]);return oe}),_m=Sm;const Ob=Nr(_m);var Pb=/\s/;function Gb(G){for(var J=G.length;J--&&Pb.test(G.charAt(J)););return J}var Dm=Gb,Ub=Dm,jb=/^\s+/;function Hb(G){return G&&G.slice(0,Ub(G)+1).replace(jb,"")}var Yb=Hb,z0=Yb,V0=qa,Rm=Al,Z0=0/0,th=/^[-+]0x[0-9a-f]+$/i,nA=/^0b[01]+$/i,Jb=/^0o[0-7]+$/i,qb=parseInt;function Wb(G){if(typeof G=="number")return G;if(Rm(G))return Z0;if(V0(G)){var J=typeof G.valueOf=="function"?G.valueOf():G;G=V0(J)?J+"":J}if(typeof G!="string")return G===0?G:+G;G=z0(G);var oe=nA.test(G);return oe||Jb.test(G)?qb(G.slice(2),oe?2:8):th.test(G)?Z0:+G}var X0=Wb,Kb=X0,Fd=1/0,zb=17976931348623157e292;function Vb(G){if(!G)return G===0?G:0;if(G=Kb(G),G===Fd||G===-Fd){var J=G<0?-1:1;return J*zb}return G===G?G:0}var Zb=Vb,Xb=Zb;function Fm(G){var J=Xb(G),oe=J%1;return J===J?oe?J-oe:J:0}var cf=Fm,$b=cf,Nm="Expected a function";function Pu(G,J){if(typeof J!="function")throw new TypeError(Nm);return G=$b(G),function(){if(--G<1)return J.apply(this,arguments)}}var eC=Pu,Mm=z1,Tm=Mm&&new Mm,$0=Tm,tC=eh,Lm=$0,rC=Lm?function(G,J){return Lm.set(G,J),G}:tC,Nd=rC,Om=Mi,nC=qa;function iC(G){return function(){var J=arguments;switch(J.length){case 0:return new G;case 1:return new G(J[0]);case 2:return new G(J[0],J[1]);case 3:return new G(J[0],J[1],J[2]);case 4:return new G(J[0],J[1],J[2],J[3]);case 5:return new G(J[0],J[1],J[2],J[3],J[4]);case 6:return new G(J[0],J[1],J[2],J[3],J[4],J[5]);case 7:return new G(J[0],J[1],J[2],J[3],J[4],J[5],J[6])}var oe=Om(G.prototype),Se=G.apply(oe,J);return nC(Se)?Se:oe}}var uf=iC,lf=uf,Md=br,Pm=1;function aC(G,J,oe){var Se=J&Pm,et=lf(G);function ie(){var xe=this&&this!==Md&&this instanceof ie?et:G;return xe.apply(Se?oe:this,arguments)}return ie}var oC=aC,ds=Math.max;function Af(G,J,oe,Se){for(var et=-1,ie=G.length,xe=oe.length,tt=-1,Bt=J.length,Gt=ds(ie-xe,0),Xt=Array(Bt+Gt),Yr=!Se;++tt1?"& ":"")+J[Se],J=J.join(oe>2?", ":" "),G.replace($m,`{ /* [wrapped with `+J+`] */ `)}var ey=SC;function ty(G,J,oe,Se){for(var et=G.length,ie=oe+(Se?1:-1);Se?ie--:++ie-1}var vf=pf,LC=ve,OC=vf,iy=1,ay=2,gs=8,PC=16,GC=32,sp=64,UC=128,Yd=256,jC=512,Jd=[["ary",UC],["bind",iy],["bindKey",ay],["curry",gs],["curryRight",PC],["flip",jC],["partial",GC],["partialRight",sp],["rearg",Yd]];function HC(G,J){return LC(Jd,function(oe){var Se="_."+oe[0];J&oe[1]&&!OC(G,Se)&&G.push(Se)}),G.sort()}var YC=HC,JC=Xm,oy=ey,qC=K0,sy=YC;function cp(G,J,oe){var Se=J+"";return qC(G,oy(Se,sy(JC(Se),oe)))}var ah=cp,oh=np,mf=ap,up=ah,qd=1,iA=2,vl=4,cy=8,uy=32,ly=64;function WC(G,J,oe,Se,et,ie,xe,tt,Bt,Gt){var Xt=J&cy,Yr=Xt?xe:void 0,qr=Xt?void 0:xe,Bn=Xt?ie:void 0,Zn=Xt?void 0:ie;J|=Xt?uy:ly,J&=~(Xt?ly:uy),J&vl||(J&=~(qd|iA));var Yn=[G,J,et,Bn,Yr,Zn,qr,tt,Bt,Gt],Xn=oe.apply(void 0,Yn);return oh(G)&&mf(Xn,Yn),Xn.placeholder=Se,up(Xn,G,J)}var Ay=WC;function KC(G){var J=G;return J.placeholder}var sh=KC,zC=od,VC=Wg,hy=Math.min;function ZC(G,J){for(var oe=G.length,Se=hy(J.length,oe),et=zC(G);Se--;){var ie=J[Se];G[Se]=VC(ie,oe)?et[ie]:void 0}return G}var XC=ZC,fy="__lodash_placeholder__";function lp(G,J){for(var oe=-1,Se=G.length,et=0,ie=[];++oe1&&Cn.reverse(),Xt&&Bt0&&(oe=J.apply(this,arguments)),G<=1&&(J=void 0),oe}}var gp=Cf,LE=eh,Ef=gm,pp=K0;function en(G,J){return pp(Ef(G,J,LE),G+"")}var Gs=en,OE=Gs,PE=Gu,GE=sh,UE=aA,jE=1,HE=32,vp=OE(function(G,J,oe){var Se=jE;if(oe.length){var et=UE(oe,GE(vp));Se|=HE}return PE(G,Se,J,oe,et)});vp.placeholder={};var My=vp,Ty=Gs,YE=Gu,JE=sh,qE=aA,WE=1,Ly=2,Oy=32,zd=Ty(function(G,J,oe){var Se=WE|Ly;if(oe.length){var et=qE(oe,JE(zd));Se|=Oy}return YE(J,Se,G,oe,et)});zd.placeholder={};var KE=zd,Py=Gu,Gy=8;function Uu(G,J,oe){J=oe?void 0:J;var Se=Py(G,Gy,void 0,void 0,void 0,void 0,void 0,J);return Se.placeholder=Uu.placeholder,Se}Uu.placeholder={};var mp=Uu,zE=Gu,ml=16;function Vd(G,J,oe){J=oe?void 0:J;var Se=zE(G,ml,void 0,void 0,void 0,void 0,void 0,J);return Se.placeholder=Vd.placeholder,Se}Vd.placeholder={};var wf=Vd,la=br,io=function(){return la.Date.now()},Wi=io,es=qa,Bf=Wi,ac=X0,ch="Expected a function",VE=Math.max,yc=Math.min;function uh(G,J,oe){var Se,et,ie,xe,tt,Bt,Gt=0,Xt=!1,Yr=!1,qr=!0;if(typeof G!="function")throw new TypeError(ch);J=ac(J)||0,es(oe)&&(Xt=!!oe.leading,Yr="maxWait"in oe,ie=Yr?VE(ac(oe.maxWait)||0,J):ie,qr="trailing"in oe?!!oe.trailing:qr);function Bn(Xi){var Ko=Se,js=et;return Se=et=void 0,Gt=Xi,xe=G.apply(js,Ko),xe}function Zn(Xi){return Gt=Xi,tt=setTimeout(ni,J),Xt?Bn(Xi):xe}function Yn(Xi){var Ko=Xi-Bt,js=Xi-Gt,Hu=J-Ko;return Yr?yc(Hu,ie-js):Hu}function Xn(Xi){var Ko=Xi-Bt,js=Xi-Gt;return Bt===void 0||Ko>=J||Ko<0||Yr&&js>=ie}function ni(){var Xi=Bf();if(Xn(Xi))return Cn(Xi);tt=setTimeout(ni,Yn(Xi))}function Cn(Xi){return tt=void 0,qr&&Se?Bn(Xi):(Se=et=void 0,xe)}function ja(){tt!==void 0&&clearTimeout(tt),Gt=0,Se=Bt=et=tt=void 0}function Za(){return tt===void 0?xe:Cn(Bf())}function Ha(){var Xi=Bf(),Ko=Xn(Xi);if(Se=arguments,et=this,Bt=Xi,Ko){if(tt===void 0)return Zn(Bt);if(Yr)return clearTimeout(tt),tt=setTimeout(ni,J),Bn(Bt)}return tt===void 0&&(tt=setTimeout(ni,J)),xe}return Ha.cancel=ja,Ha.flush=Za,Ha}var Uy=uh,yp="Expected a function";function Ip(G,J,oe){if(typeof G!="function")throw new TypeError(yp);return setTimeout(function(){G.apply(void 0,oe)},J)}var jy=Ip,ps=jy,Hy=Gs,ZE=Hy(function(G,J){return ps(G,1,J)}),XE=ZE,$E=jy,bp=Gs,ew=X0,Yy=bp(function(G,J,oe){return $E(G,ew(J)||0,oe)}),Cp=Yy,Ep=Gu,tw=512;function Ic(G){return Ep(G,tw)}var rw=Ic,nw="Expected a function";function iw(G){if(typeof G!="function")throw new TypeError(nw);return function(){var J=arguments;switch(J.length){case 0:return!G.call(this);case 1:return!G.call(this,J[0]);case 2:return!G.call(this,J[0],J[1]);case 3:return!G.call(this,J[0],J[1],J[2])}return!G.apply(this,J)}}var wp=iw,Jy=gp;function Bp(G){return Jy(2,G)}var Qp=Bp,qy="__lodash_hash_undefined__";function aw(G){return this.__data__.set(G,qy),this}var cu=aw;function Zd(G){return this.__data__.has(G)}var Wy=Zd,ow=pi,Ky=cu,zy=Wy;function Xd(G){var J=-1,oe=G==null?0:G.length;for(this.__data__=new ow;++Jtt))return!1;var Gt=ie.get(G),Xt=ie.get(J);if(Gt&&Xt)return Gt==J&&Xt==G;var Yr=-1,qr=!0,Bn=oe&cw?new sw:void 0;for(ie.set(G,J),ie.set(J,G);++Yr=Se?G:ks(G,J,oe)}var Ia=Cl,Ec=XA,cA=HA,gh=Gs,oc=Ia,ph=cf,ju="Expected a function",Yc=Math.max;function xs(G,J){if(typeof G!="function")throw new TypeError(ju);return J=J==null?0:Yc(ph(J),0),gh(function(oe){var Se=oe[J],et=oc(oe,0,J);return Se&&cA(et,Se),Ec(G,this,et)})}var Us=xs,vh=Uy,El=qa,Jc="Expected a function";function wl(G,J,oe){var Se=!0,et=!0;if(typeof G!="function")throw new TypeError(Jc);return El(oe)&&(Se="leading"in oe?!!oe.leading:Se,et="trailing"in oe?!!oe.trailing:et),vh(G,J,{leading:Se,maxWait:J,trailing:et})}var hu=wl,Bl=Uc;function Ql(G){return Bl(G,1)}var uA=Ql,rs=eh;function $e(G){return typeof G=="function"?G:rs}var wt=$e,mr=wt,pn=Na;function ra(G,J){return pn(mr(J),G)}var ui=ra,Hi={after:eC,ary:Uc,before:gp,bind:My,bindKey:KE,curry:mp,curryRight:wf,debounce:Uy,defer:XE,delay:Cp,flip:rw,memoize:hl,negate:wp,once:Qp,overArgs:ri,partial:Na,partialRight:lh,rearg:ts,rest:Cc,spread:Us,throttle:hu,unary:uA,wrap:ui};const Aa=(G,J)=>{const oe=G.__vccOpts||G;for(const[Se,et]of J)oe[Se]=et;return oe},ao=`data:text/javascript;base64,${qt(Fe)}`,Zi=`data:text/javascript;base64,${qt(Tt)}`;let Yi=!1,Qo=!1;const Ua=K.defineComponent({name:"VueOfficePdf",props:{src:[String,ArrayBuffer,Blob],requestOptions:{type:Object,default:()=>({})},staticFileUrl:{type:String,default:"https://unpkg.com/pdfjs-dist@3.1.81/"},options:{type:Object,default:()=>({})}},emits:["rendered","error"],setup(G,{emit:J}){let oe=null,Se=null;const et=K.ref(null),ie=K.ref(null),xe=K.ref([]),tt=K.ref(0);let Bt=0,Gt=0,Xt=0,Yr=0,qr=6,Bn=0,Zn=0,Yn=null,Xn=2;K.onBeforeUnmount(()=>{oe!==null&&(oe.destroy(),oe=null,Se=null,Yn&&clearTimeout(Yn))});function ni(){return Le(ao).then(()=>{if(window.pdfjsLib&&!Qo)Qo=!0,window.pdfjsLib.GlobalWorkerOptions.workerSrc=Zi;else return Promise.reject("window.pdfjsLib未找到")})}function Cn(){return new Promise($i=>{const Ki=()=>{window.pdfjsLib?$i():Yn=setTimeout(Ki,10)};Ki()})}function ja(){return window.pdfjsLib?Promise.resolve():Yi?Cn():(Yi=!0,ni())}function Za(){ie.value.innerHTML=""}function Ha(){if(!G.src){Za(),J("error",new Error("src不能为空"));return}Se=window.pdfjsLib.getDocument(Jt({url:yr(G.src,{type:"application/pdf"}),withCredentials:G.requestOptions&&G.requestOptions.withCredentials,cMapUrl:`${G.staticFileUrl.endsWith("/")?G.staticFileUrl:G.staticFileUrl+"/"}cmaps/`,cMapPacked:!0,enableXfa:!0},Ob(G.options,["width"]))),Se.promise.then($i=>{oe&&oe.destroy(),oe=$i,Xi(oe).then(Ki=>{Bt=oe.numPages,Yr=et.value.getBoundingClientRect().height,Gt=Ki.width,Xt=Ki.height,Bn=Ki.canvasWidth,Zn=Ki.canvasHeight;let oo=G.options.gap||10;qr=Math.ceil(Yr/(Xt+oo))+4;let Qi=(Xt+oo)*Bt-oo;ie.value.style.height=Qi+"px",Za(),Hu(1,Math.min(Bt,qr))})}).catch($i=>{J("error",$i)})}function Xi($i){return $i.getPage(1).then(Ki=>{let oo=G.options.width||ie.value.getBoundingClientRect().width-20,Qi=Ki.getViewport({scale:1});Qi.width>oo*1.5?Xn=.5:Qi.width>oo?Xn=1:Xn=2,Qi=Ki.getViewport({scale:Xn});const ko=window.devicePixelRatio>2?1.5:2;let Xa=Math.floor(Qi.width*ko),zo=Math.floor(Qi.height*ko),fa=Math.floor(Qi.width),vo=Math.floor(Qi.height);if(G.options.width){let Fp=G.options.width/fa;fa=Math.floor(G.options.width),vo=Math.floor(vo*Fp)}let Wc=ie.value.getBoundingClientRect().width-20;if(fa>Wc){let Fp=Wc/fa;fa=Math.floor(Wc),vo=Math.floor(vo*Fp)}return{width:fa,height:vo,canvasWidth:Xa,canvasHeight:zo}}).catch(Ki=>{J("error",Ki)})}const Ko=Hi.debounce(function($i){const{scrollTop:Ki}=$i.target;let oo=parseInt(getComputedStyle(ie.value).paddingTop)||0;const Qi=G.options.gap||10,ko=Math.max(Math.floor(Math.max(Ki-oo,0)/(Xt+Qi))-1,1),Xa=Math.min(ko+qr-1,Bt);Hu(ko,Xa)},60);function js($i){let Ki=parseInt(getComputedStyle(ie.value).paddingTop)||0,oo=G.options.gap||10;const Qi=document.createElement("canvas");return Qi.style.position="absolute",Qi.style.top=($i-1)*(Xt+oo)+Ki+"px",Qi.style.left="50%",Qi.style.transform="translate(-50%)",Qi.style.backgroundColor="#fff",Qi.setAttribute("data-id",$i),Qi.width=Bn,Qi.height=Zn,Qi.style.width=`${Gt}px`,Qi.style.height=`${Xt}px`,Qi}function Hu($i,Ki){let oo=ie.value,Qi=[...oo.childNodes],ko=[];if(oo.childNodes.length===0)for(let Xa=$i;Xa<=Ki;Xa++){let zo=js(Xa);oo.appendChild(zo),ko.push(qc(Xa,zo))}else{let Xa=+Qi[0].getAttribute("data-id"),zo=+Qi[Qi.length-1].getAttribute("data-id");if(Kizo)for(let fa=$i;fa<=Ki;fa++){let vo=js(fa);oo.appendChild(vo),ko.push(qc(fa,vo))}if($i=Xa){let fa=Qi[0];for(let vo=Xa-1;vo>=$i;vo--){let Wc=js(vo);oo.insertBefore(Wc,fa),fa=Wc,ko.push(qc(vo,Wc))}}for(let fa=0;fa<=zo-Xa;fa++){let vo=+Qi[fa].getAttribute("data-id");(vo<$i||vo>Ki)&&oo.removeChild(Qi[fa])}if(Ki>zo&&$i<=zo)for(let fa=zo+1;fa<=Ki;fa++){let vo=js(fa);oo.appendChild(vo),ko.push(qc(fa,vo))}}Promise.all(ko).then(Xa=>{J("rendered")}).catch(Xa=>{J("error",Xa)})}function qc($i,Ki){return oe.getPage($i).then(oo=>{const Qi=oo.getViewport({scale:Xn});let ko=window.devicePixelRatio>2?1.5:2;if(Bn*Qi.height!==Zn*Qi.width){let fa=Math.floor(Qi.width*ko),vo=Math.floor(Qi.height*ko),Wc=Zn/vo;ko=ko*Wc,Ki.width=fa*Wc,Ki.style.width=parseInt(Ki.style.width)*Wc+"px"}const Xa=Ki.getContext("2d"),zo=ko!==1?[ko,0,0,ko,0,0]:null;return oo.render({canvasContext:Xa,transform:zo,viewport:Qi}).promise})}function ig(){Hu(1,Math.min(Bt,qr))}K.onMounted(()=>{G.src&&ja().then(Ha).catch($i=>{console.warn($i)})}),K.watch(()=>G.src,()=>{ja().then(Ha).catch($i=>{console.warn($i)})});function iI($i){oe&&oe._transport&&oe._transport.getData().then(Ki=>{sr($i||`vue-office-pdf-${new Date().getTime()}.pdf`,Ki.buffer)})}return{containerRef:et,wrapperRef:ie,rootRef:xe,numPages:tt,save:iI,onScrollPdf:Ko,rerender:ig}}}),ha={ref:"wrapperRef",class:"vue-office-pdf-wrapper",style:{background:"gray",padding:"30px 0",position:"relative","box-sizing":"content-box"}};function ns(G,J,oe,Se,et,ie){return ee.openBlock(),ee.createElementBlock("div",{class:"vue-office-pdf",ref:"containerRef",style:{"text-align":"center","overflow-y":"auto",position:"relative"},onScroll:J[0]||(J[0]=(...xe)=>G.onScrollPdf&&G.onScrollPdf(...xe))},[ee.createElementVNode("div",ha,null,512),ee.renderSlot(G.$slots,"default")],544)}const vs=Aa(Ua,[["render",ns]]);return vs.install=function(G){G.component(vs.name,vs)},vs})})(e4);var c_=e4.exports;const u_=n1(c_);const l_={__name:"Pdf",props:{previewSrc:{type:String,required:!1,default:()=>""}},setup(D){const U={width:"100%",height:"100%"},K=()=>{console.log("rendered")},ee=ge=>{console.log("error",ge)};return(ge,Ue)=>(zr(),Ma(Ti(u_),{src:D.previewSrc,style:U,onRendered:K,onError:ee},null,8,["src"]))}},A_=zu(l_,[["__scopeId","data-v-af3a5934"]]);const h_=["textContent"],f_={__name:"txt",props:{previewSrc:{type:String,required:!1,default:()=>""}},setup(D){let U=Zt("");const K=D;i1(()=>K.previewSrc,()=>{ee()});const ee=()=>{U.value="",fetch(K.previewSrc,{responseType:"arraybuffer"}).then(ge=>ge.arrayBuffer()).then(ge=>{const Ue=new TextDecoder("gbk");U.value=Ue.decode(ge)})};return ee(),(ge,Ue)=>(zr(),Fn("div",null,[or("pre",{textContent:xa(Ti(U))},null,8,h_)]))}},d_=zu(f_,[["__scopeId","data-v-4cf50477"]]),g_={class:"container",id:"container"},p_={class:"center"},v_={class:"header___lEPyH"},m_={class:"chatHeader"},y_={class:"chatHeaderBox"},I_={style:{width:"100px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},b_={class:"chat-item"},C_={key:0},E_=["src"],w_={key:0},B_={key:1},Q_=["src"],k_={key:2},x_=["src"],S_={key:1},__=["onClick"],D_=["src"],R_={class:"icon-text"},F_=["onClick"],N_={class:"chat_bottom"},M_={class:"center-bottom"},T_={style:{width:"100%",display:"flex","justify-content":"space-between"},class:"uploadFileDis"},L_={key:0,class:"uploadFileList"},O_=["src"],P_={class:"center"},G_={class:"center",style:{padding:"0"}},U_={class:"center",style:{padding:"0"}},j_={class:"center"},H_={style:{width:"100%","text-align":"right"}},Y_=Of({__name:"index",setup(D){const U=Zt([{content:"你好! 我是你的助理,有什么可以帮到你的吗?",role:"assistant"}]),K=Zt({});Zt([]),Ta({add:!1}),Zt("");const ee=Zt(!1),ge=Zt(!1),Ue=Zt(!1),ht=Zt("1"),ut=Zt("未命名会话");let _t=Ta({}),Jt=Ta({name:"未命名会话"});const ar=Zt(0),Tt=Zt("");let Fe=null;const yr=Zt(""),Le=Zt(""),sr=Zt(""),Ir=Zt(2);Zt([]),Ta({});const hn=Ta({});Zt([]),Zt("");const Oe=Zt({});Zt([]);const Et=Zt([]);Zt(),Zt([]),Zt("");const qt=Zt(),nr=Ta({}),Nr=Zt(!1),zt=Zt(!1);let Cr=!1,Wr=Zt("docx"),un=Zt("");const Ea=X5().hrefUrl,Po={name:[{required:!0,message:"名称不允许为空"}]},Ds=async({values:Sr,errors:br})=>{if(br)return;let Ln={id:_t.id,dialog_id:_t.dialog_id,conversation_desc:Jt.name};const{code:Ai,data:ei}=await Qh(Ln);ei&&(ys.success("修改成功"),Dn(),ei!=null&&ei.id&&(sr.value=ei.id),Vs(sr.value))};let co=[];const kt=Sr=>!!/##[0-9]\$\$/.test(Sr),Qa=Sr=>Sr.split(` `),Ji=Sr=>Sr.replace(/\*\*|\#\#\#/g,""),La=Sr=>{let br=[],Ln=0,Ai=Sr.match(/##([0-9]+)\$\$/g);return Ai==null||Ai.map(ei=>{let Li=Sr.indexOf(ei);br.push({index:Li,item:ei,preIndex:Ln,len:Ai.length}),Ln=Li}),br},yo=(Sr,br,Ln,Ai)=>{if(kt(Ln)){if(br=="assistant"&&Ai){let ei=Ai/2-1>0?Ai/2-1:0;Sr.length==1&&(ei=0),Sr.length==ei&&(ei=Sr.length-1),co=Sr[ei].doc_aggs}}else co=[];return co},_a=(Sr,br)=>{let Ln="",Ai=br/2-1>0?br/2-1:0;Sr.length==1&&(Ai=0),Sr.length==Ai&&(Ai=Sr.length-1);let ei=0;return Sr[Ai].chunks.forEach(Li=>{Li.similarity>ei&&(ei=Li.similarity,Ln=Li.content_with_weight)}),Ln},ln=async Sr=>{Wr.value=Sr.doc_name.split(".").pop(),un.value=Ea+`/api/v1/document/get/${Sr.doc_id}?t=`+new Date().getTime(),zt.value=!0},gn=wA(()=>Sr=>{const br=Zt("");switch(br.value=Sr.split(".").pop(),br.value){case"pptx":case"ppt":case"pdf":return tQ;case"docx":case"doc":return rQ;case"xlsx":case"xls":return nQ;case"txt":return iQ;default:return aQ}}),cn=()=>{Nr.value=!0},Dn=()=>{Nr.value=!1},xn=Sr=>{},Wn=(Sr,br)=>{Et.value=[...Et.value,...Sr],sr.value=br};let Vi=Zt(!1);const uo=Sr=>{console.log(Et.value),Et.value.splice(Sr.index,1)},{toClipboard:tn}=DB(),xr=async Sr=>{await tn(Sr)};Zt(!1);const Ei=async(Sr,br="未命名会话")=>{var Ai,ei;console.log(br,"新建会话名称");const Ln=await Qh({dialog_id:Sr,conversation_desc:br});Ln.code==200?(sr.value=(Ai=Ln.data)==null?void 0:Ai.conversation_id,Vs((ei=Ln.data)==null?void 0:ei.conversation_id)):ys.error("创建会话失败,请重试")},Ni=Sr=>{Sr.preventDefault(),Le.value+=` `},ji=()=>{Tt.value="",Oa("click"),Et.value=[]},wa=()=>{let Sr=U.value[U.value.length-2].content;Go(Sr)},Oa=async Sr=>{var br,Ln;if((Sr.keyCode==13||Sr==="click")&&!Sr.shiftKey)if(Sr!=="click"&&Sr.preventDefault(),Le.value)if(sr.value)Go(Le.value),Le.value="";else{console.log(Le.value,"新建会话名称");const Ai=await Qh({dialog_id:"",conversation_desc:Le.value});if(Ai.code==200){sr.value=(br=Ai.data)==null?void 0:br.conversation_id;const{code:ei,data:Li}=await pg((Ln=Ai.data)==null?void 0:Ln.conversation_id);ei===200&&(console.log(Li,"新建会话详情"),Object.assign(_t,Li),Go(Le.value),Le.value="")}else ys.error("创建会话失败,请重试")}else ys.warning("消息不能为空")};let Ja=[],lo="";const Go=async Sr=>{var Ai;ee.value=!0,Ue.value=!0,Cr=!1,Tt.value="",ge.value=!0,U.value.push({content:Sr,role:"user"}),U.value.push({role:"last"}),$r();const br=await fetch("/api/tech/cloudminds/query?modeltype=localragflow",{method:"POST",headers:{Authorization:JI(),"Content-Type":"application/json"},body:JSON.stringify({conversation_id:sr.value,messages:Sr})}),Ln=(Ai=br==null?void 0:br.body)==null?void 0:Ai.pipeThrough(new TextDecoderStream).pipeThrough(new qI).getReader();for(ar.value=0;;){if(Cr){Ja.push(lo),zs(nr);break}const ei=await(Ln==null?void 0:Ln.read());if(ei){const{done:Li,value:lr}=ei;try{const Lt=JSON.parse((lr==null?void 0:lr.data)||""),ro=Lt==null?void 0:Lt.data;if(lo!=ro.message_id)lo=ro.message_id,Ja=[];else if(Ja.findIndex(Fs=>Fs===lo)>-1)break;typeof ro!="boolean"&&(yr.value=ro.content,ge.value=!1,da())}catch(Lt){console.warn(Lt)}if(Li){console.info("done"),Tt.value="",ge.value=!1,Vs(sr.value),ia.emit("queryAppUsageList");break}}}ee.value=!1,Ue.value=!1},Sc=async()=>{Ue.value=!1,ee.value=!1,Cr=!0,console.log("stopChat"),console.log(Tt.value,"displayedText"),console.log(U.value,"sessionDetailList");let br=[{content:U.value[U.value.length-2].content,role:"user"},{content:Tt.value,role:"assistant"}];U.value=U.value.splice(0,U.value.length-2).concat(br),console.log(U.value,"sessionDetailList2"),console.log(_t,"chatObj对象"),_t!=null&&_t.message&&(_t.message=_t.message.concat(br)),Object.assign(nr,{id:_t.id,conversation_id:_t.id,message:U.value})},zs=async Sr=>{const{code:br,data:Ln}=await Qh(Sr);Ln&&(clearTimeout(Fe),Fe=null,Vs(sr.value))},Vs=async Sr=>{sr.value=Sr;const{code:br,data:Ln}=await pg(Sr);br===200&&(console.log(Ln,"新建会话详情"),Object.assign(_t,Ln),U.value=Ln.message,K.value=Ln,ut.value=Ln.name,Jt.name=Ln.name,$r())},So=(Sr,br)=>{Ir.value=Ir.value+1,Et.value=[],ht.value=Sr,console.log(Sr,"val")},Rs=async Sr=>{Oe.value=Sr,sr.value=Sr.id,Jt.name=Sr.name;const{code:br,data:Ln}=await pg(Sr.id);br===200&&(Object.assign(_t,Ln),U.value=Ln.message,K.value=Ln,$r())},Or=Zt(null),$r=()=>{XI(()=>{const Sr=document.getElementById("home");Or.value.scrollTop(Sr.scrollHeight)})};t1(()=>{sr.value=""}),_h(()=>{document.getElementById("container").addEventListener("click",()=>{}),ia.on("newChat",()=>{Et.value=[],ht.value="1",_t={},Ir.value=Ir.value+1,sr.value="",U.value=[{content:"你好! 我是你的助理,有什么可以帮到你的吗?",role:"assistant"}],Jt.name="未命名会话"})}),bg(()=>{ia.off("newChat")});const jn=xB(),gi=wA(()=>jn.theme),da=()=>{Fe&&clearTimeout(Fe);const Sr=yr.value;ar.value{const Ln=vn("a-col"),Ai=vn("icon-down"),ei=vn("a-button"),Li=vn("icon-edit"),lr=vn("a-popover"),Lt=vn("a-comment"),ro=vn("a-tooltip"),Is=vn("a-card"),Fs=vn("a-textarea"),Zc=vn("icon-copy"),Eu=vn("icon-refresh"),Xc=vn("a-spin"),$c=vn("icon-record-stop"),_c=vn("a-scrollbar"),wu=vn("icon-send"),Sn=vn("icon-sync"),Zs=vn("icon-close-circle-fill"),ga=vn("a-row"),Bu=vn("a-modal"),Zu=vn("a-input"),Ml=vn("a-form-item"),Ac=vn("a-form");return zr(),Fn("div",g_,[Qr(ga,{gutter:[5,5],style:{"margin-top":"3px"}},{default:Fr(()=>[Qr(Ln,{span:1},{default:Fr(()=>[Qr(B9,{onCreateSession:Ei,onQuerySessionDetail:Rs,onChangeAgentType:So})]),_:1}),wh(Qr(Ln,{span:23},{default:Fr(()=>[or("div",p_,[or("div",v_,[or("div",m_,[or("div",y_,[Qr(lr,{position:"bottom",trigger:"click"},{content:Fr(()=>[Qr(ei,{type:"text",class:"button",style:{color:"#2a2a2b"},onClick:br[0]||(br[0]=sa=>cn())},{icon:Fr(()=>[Qr(Li)]),default:Fr(()=>[br[8]||(br[8]=Ya(" 修改名称 "))]),_:1})]),default:Fr(()=>[Qr(ei,{border:""},{default:Fr(()=>[or("span",I_,xa(Ti(Jt).name),1),Qr(Ai,{style:{"margin-left":"4px"}})]),_:1})]),_:1})])])]),Qr(_c,{ref_key:"scrollbar",ref:Or,id:"home",class:"chat-list",style:mu([{width:"80%",overflow:"auto",margin:"0px auto 20px"},{height:Et.value.length>0?"calc(100vh - 480px)":"calc(100vh - 380px)"}])},{default:Fr(()=>[(zr(!0),Fn(_s,null,lc(U.value,(sa,qa)=>(zr(),Fn("div",b_,[sa.role==="user"?(zr(),Ma(Lt,{key:0},{avatar:Fr(()=>br[9]||(br[9]=[or("img",{class:"icon-user-jpg",src:SB,alt:"本地图片"},null,-1)])),content:Fr(()=>[or("div",{class:qs({chartUserText:gi.value==="light"})},xa(sa.content),3)]),_:2},1024)):sa.role==="assistant"?(zr(),Ma(Lt,{key:1},{avatar:Fr(()=>br[10]||(br[10]=[or("img",{class:"icon-user-jpg",src:Vp,alt:"本地图片"},null,-1)])),content:Fr(()=>[kt(sa.content)?(zr(),Ma(Is,{key:0,style:{padding:"10px"}},{default:Fr(()=>[(zr(!0),Fn(_s,null,lc(Qa(sa.content),(Ao,xA)=>(zr(),Fn("div",{class:qs({chatItemAnswer:gi.value==="light"}),style:mu([{backgroundColor:gi.value==="light"?"#ffffff":"#000000"},{border:"none"}])},[kt(Ao)?(zr(),Fn("div",{key:0,class:qs({chatItemAnswer:gi.value==="light"}),style:mu([{backgroundColor:gi.value==="light"?"#ffffff":"#000000"},{border:"none"}])},[(zr(!0),Fn(_s,null,lc(La(Ao),(Vo,Xu)=>(zr(),Fn("div",{class:qs({chatItemAnswer:gi.value==="light"}),style:mu([{backgroundColor:gi.value==="light"?"#ffffff":"#000000"},{border:"none"}])},[Xu==0?(zr(),Fn("span",C_,[Ya(xa(Ao.substring(0,Vo.index))+" ",1),Qr(ro,{"background-color":"#3491FA",content:_a(K.value.reference,qa)},{default:Fr(()=>[or("img",{style:{width:"15px",height:"15px"},src:Ti(yB)},null,8,E_)]),_:2},1032,["content"]),Xu==Vo.len-1?(zr(),Fn("span",w_,xa(Ao.substring(Vo.index+5)),1)):Ca("",!0)])):Xu==Vo.len-1?(zr(),Fn("span",B_,[Ya(xa(Ao.substring(Vo.preIndex+Vo.item.length,Vo.index))+" ",1),Qr(ro,{"background-color":"#3491FA",content:_a(K.value.reference,qa)},{default:Fr(()=>[or("img",{style:{width:"15px",height:"15px"},src:Ti(yB)},null,8,Q_)]),_:2},1032,["content"]),Ya(" "+xa(Ao.substring(Vo.index+5)),1)])):(zr(),Fn("span",k_,[Ya(xa(Ao.substring(Vo.preIndex+Vo.item.length,Vo.index))+" ",1),Qr(ro,{"background-color":"#3491FA",content:_a(K.value.reference,qa)},{default:Fr(()=>[or("img",{style:{width:"15px",height:"15px"},src:Ti(yB)},null,8,x_)]),_:2},1032,["content"])]))],6))),256))],6)):(zr(),Fn("div",S_,xa(Ao),1))],6))),256))]),_:2},1024)):(zr(),Ma(Is,{key:1},{default:Fr(()=>[Qr(Fs,{readonly:"","auto-size":"","default-value":Ji(sa.content),class:qs({chatItemAnswer:gi.value==="light"}),style:mu([{backgroundColor:gi.value==="light"?"#ffffff":"#000000"},{border:"none"}])},null,8,["default-value","class","style"])]),_:2},1024))]),actions:Fr(()=>[or("div",null,[or("div",null,[(zr(!0),Fn(_s,null,lc(yo(K.value.reference,sa.role,sa.content,qa),(Ao,xA)=>(zr(),Fn("div",{key:xA,class:"icon-box",onClick:Vo=>ln(Ao)},[or("div",null,[or("img",{src:gn.value(Ao.doc_name),alt:""},null,8,D_)]),or("div",R_,xa(Ao.doc_name),1)],8,__))),128))])]),qa!=0?(zr(),Fn("span",{key:0,class:"action",onClick:Ao=>xr(sa.content)},[Qr(Zc),br[11]||(br[11]=Ya(" 复制 "))],8,F_)):Ca("",!0),qa!=0&&qa==U.value.length-1?(zr(),Fn("span",{key:1,class:"action",onClick:br[1]||(br[1]=Ao=>wa())},[Qr(Eu),br[12]||(br[12]=Ya(" 重新生成 "))])):Ca("",!0)]),_:2},1024)):sa.role==="last"?(zr(),Ma(Lt,{key:2},{avatar:Fr(()=>br[13]||(br[13]=[or("img",{class:"icon-user-jpg",src:Vp,alt:"本地图片"},null,-1)])),content:Fr(()=>[Qr(Xc,{loading:ge.value,dot:"",style:{width:"100%"}},{default:Fr(()=>[Qr(Fs,{readonly:"","auto-size":"",modelValue:Tt.value,"onUpdate:modelValue":br[2]||(br[2]=Ao=>Tt.value=Ao),class:qs({chatItemAnswer:gi.value==="light"}),style:mu([{backgroundColor:gi.value==="light"?"#ffffff":"#000000"},{border:"none"}])},null,8,["modelValue","class","style"])]),_:1},8,["loading"])]),actions:Fr(()=>[Tt.value!=""?(zr(),Fn("div",{key:0,class:"action",onClick:Sc,style:{background:"var(--color-bg-2)",color:"var(--color-primary-light-4)"}},[Qr($c),br[14]||(br[14]=Ya(" 停止生成 "))])):Ca("",!0)]),_:1})):Ca("",!0)]))),256))]),_:1},8,["style"]),or("div",N_,[or("div",M_,[Qr(Fs,{modelValue:Le.value,"onUpdate:modelValue":br[3]||(br[3]=sa=>Le.value=sa),onKeydown:[Ig(r1(Ni,["shift"]),["enter"]),Ig(Oa,["enter"])],placeholder:Et.value.length>0?"整理这些文件的核心内容":"输入您想了解的内容,Shift+Enter换行,Enter发送","allow-clear":"","show-word-limit":"",disabled:ee.value,class:qs({textItemAnswer:gi.value==="dark"}),style:mu([{backgroundColor:gi.value==="light"?"#ffffff":"#000000"},{border:"none"}]),"auto-size":{minRows:12,maxRows:5}},null,8,["modelValue","onKeydown","placeholder","disabled","class","style"]),or("div",T_,[Qr($S,{ref_key:"fileInput",ref:qt,sessionId:sr.value,hide:Ir.value,onSelectFileCallback:Wn},null,8,["sessionId","hide"]),Qr(ei,{disabled:ee.value,onClick:ji,type:"text",style:{"border-radius":"24px"},loading:Ue.value},{default:Fr(()=>[Qr(wu,{size:"32",style:{color:"#0960bd"}})]),_:1},8,["disabled","loading"])])]),Et.value.length>0?(zr(),Fn("div",L_,[(zr(!0),Fn(_s,null,lc(Et.value,(sa,qa)=>(zr(),Fn("div",{class:"files",key:qa,style:{position:"relative",width:"200px","margin-top":"10px","margin-right":"20px"}},[Qr(Lt,{author:sa.name,content:sa.size,style:{background:"var(--color-bg-2)",padding:"10px","border-radius":"10px","font-size":"12px"}},{avatar:Fr(()=>[Ti(Vi)?(zr(),Ma(Xc,{key:0,loading:Ti(Vi)},{icon:Fr(()=>[Qr(Sn)]),_:1},8,["loading"])):Ca("",!0),or("img",{src:gn.value(sa.name),alt:""},null,8,O_)]),_:2},1032,["author","content"]),Qr(Zs,{size:"18px",onClick:Ao=>uo(sa),style:{position:"absolute",right:"-4px",top:"-4px",color:"red",cursor:"pointer"}},null,8,["onClick"])]))),128))])):Ca("",!0)])])]),_:1},512),[[Bh,ht.value=="1"]]),wh(Qr(Ln,{span:23},{default:Fr(()=>[or("div",P_,[Qr(Y9,{modalObj:hn},null,8,["modalObj"])])]),_:1},512),[[Bh,ht.value=="2"]]),wh(Qr(Ln,{span:23},{default:Fr(()=>[or("div",G_,[Qr(RS,{onQuerySessionDetail:Rs,onChangeAgentType:So})])]),_:1},512),[[Bh,ht.value=="3"]]),wh(Qr(Ln,{span:23},{default:Fr(()=>[or("div",U_,[Qr(zS,{onCreateSession:Ei,onQuerySessionDetail:Rs,onChangeAgentType:So})])]),_:1},512),[[Bh,ht.value=="4"]]),wh(Qr(Ln,{span:23},{default:Fr(()=>[or("div",j_,[Qr(E6,{modalObj:hn},null,8,["modalObj"])])]),_:1},512),[[Bh,ht.value=="5"]])]),_:1}),Qr(Bu,{title:" ",visible:zt.value,"onUpdate:visible":br[4]||(br[4]=sa=>zt.value=sa),footer:!1,fullscreen:""},{default:Fr(()=>[Ti(Wr)=="docx"?(zr(),Ma(n_,{key:0,previewSrc:Ti(un)},null,8,["previewSrc"])):Ca("",!0),Ti(Wr)=="xlsx"?(zr(),Ma(s_,{key:1,previewSrc:Ti(un)},null,8,["previewSrc"])):Ca("",!0),Ti(Wr)=="pdf"?(zr(),Ma(A_,{key:2,previewSrc:Ti(un)},null,8,["previewSrc"])):Ca("",!0),Ti(Wr)=="txt"?(zr(),Ma(d_,{key:3,previewSrc:Ti(un)},null,8,["previewSrc"])):Ca("",!0)]),_:1},8,["visible"]),Qr(Bu,{visible:Nr.value,"onUpdate:visible":br[7]||(br[7]=sa=>Nr.value=sa),title:"修改名称",onBeforeOpen:xn,onCancel:Dn,footer:!1,"title-align":"start"},{default:Fr(()=>[Qr(Ac,{ref:"formRef",rules:Po,model:Ti(Jt),onSubmit:Ds},{default:Fr(()=>[Qr(Ml,{field:"name",label:"名称"},{default:Fr(()=>[Qr(Zu,{modelValue:Ti(Jt).name,"onUpdate:modelValue":br[5]||(br[5]=sa=>Ti(Jt).name=sa),placeholder:"请输入名称"},null,8,["modelValue"])]),_:1}),Qr(Ml,null,{default:Fr(()=>[or("div",H_,[Qr(ei,{onClick:br[6]||(br[6]=sa=>Nr.value=!1)},{default:Fr(()=>br[15]||(br[15]=[Ya("取消")])),_:1}),Qr(ei,{style:{"margin-left":"10px"},type:"primary","html-type":"submit"},{default:Fr(()=>br[16]||(br[16]=[Ya("确定")])),_:1})])]),_:1})]),_:1},8,["model"])]),_:1},8,["visible"])])}}});const V_=zu(Y_,[["__scopeId","data-v-623d2f32"]]);export{V_ as default};