import{bP as w0,bQ as wd,bR as yd,bS as Dd,bT as y0,bU as Ad,bV as Cd,bW as D0,bX as Td,bY as Sd,bO as ol,a4 as f,ab as Ve,a0 as de,a2 as $n,ac as mt,bZ as Fd,G as rt,A as Bo,bA as Xr,b_ as ll,b$ as Ml,ax as _r,ad as an,bF as Ui,ae as Ma,Q as Sr,c0 as bd,av as Ua,c1 as ka,R as Wi,S as Rt,T as $r,U as aa,V as sa,W as cl,c2 as kc,X as Ul,c3 as Po,Y as ul,Z as fl,$ as dr,au as Nr,a3 as Kr,ar as xn,a8 as lt,c4 as Qi,c5 as xi,a9 as lr,aa as Er,bK as nn,aF as ni,aG as ii,as as kd,at as Ns,a5 as Di,aC as Is,c6 as A0,K as Nd,c7 as C0,bL as Id,bM as Ir,c8 as Nc,aE as Jt,bJ as zs,ap as Ic,bI as Oc,bE as Bc,c9 as Od,ca as Bd,cb as Pd,bB as Ci,cc as jd,cd as Rd,ce as Ld,bN as fa,cf as T0,aq as Md,aA as sn,cg as S0,ch as Ud,az as Wd,ci as Pc,cj as oa,z as jc,ck as Wa,cl as F0,cm as b0,cn as zd,co as Vd,a1 as k0,cp as Et,cq as Hd,cr as N0,cs as I0,ct as jo,cu as $d,cv as Gd,cw as Rc,cx as Lc,cy as Xd,cz as Kd,bH as Yd,cA as qd}from"./index-F5308wi0.js";import{k as ht,l as Jd,I as Ro,n as Zd,o as zi,D as Mc,V as Uc,u as Qd,m as e1,a as t1,b as Lo,J as Lt,c as O0,v as Wl,f as r1,t as n1,h as B0,i as Ji,T as Qn,p as za,q as i1,e as Yi,r as Vs,s as a1,w as s1,x as o1,y as l1,z as c1,A as u1,B as f1,R as Mo,C as Wc,E as h1,S as d1,g as p1,F as m1,G as g1,H as vi,K as P0,L as hl,N as zc,M as x1,O as v1}from"./index-COHSasgJ.js";import{f as Gn}from"./formatSearchParams-C4IYAEpQ.js";import{S as _1,a as j0,c as E1}from"./simulation-BVbaiQyH.js";import{C as w1}from"./index.browser.esm-td0i8UXo.js";import{l as hs}from"./lossFormat-BiHP7XfF.js";import{u as y1}from"./uniq-C1h4ayRv.js";import{S as R0}from"./index-CSp3_H7k.js";import{S as Vc,r as D1,a as A1,n as L0,m as C1,s as T1,b as S1,c as Ii,d as Va,e as ze}from"./select-DwsZfEcO.js";import{r as F1}from"./index-BYn-cCFi.js";import{T as Os}from"./index-5SwdtDpC.js";import{i as b1}from"./isEmpty-CGFgSwqF.js";const k1=[w0,wd,yd,Dd,y0,Ad,Cd,D0,Td,Sd,{...ol.SOLANA,id:-3}],N1="3.0.0",M0="PHALCON_DEBUG_VERSION",U0={eth:{scanHrefPrefixAddress:"https://www.oklink.com/eth/address/",scanHrefPrefixTx:"https://www.oklink.com/eth/tx/",scanHrefPrefixToken:"https://www.oklink.com/eth/token/",scanHrefPrefixBlock:"https://www.oklink.com/eth/block/"},bsc:{scanHrefPrefixAddress:"https://www.oklink.com/bsc/address/",scanHrefPrefixTx:"https://www.oklink.com/bsc/tx/",scanHrefPrefixToken:"https://www.oklink.com/bsc/token/",scanHrefPrefixBlock:"https://www.oklink.com/bsc/block/"},solana:{scanHrefPrefixAddress:"https://www.oklink.com/sol/account/",scanHrefPrefixTx:"https://www.oklink.com/sol/tx/",scanHrefPrefixToken:"https://www.oklink.com/sol/token/",scanHrefPrefixBlock:"https://www.oklink.com/sol/block/"},arbitrum:{scanHrefPrefixAddress:"https://www.oklink.com/arbitrum/address/",scanHrefPrefixTx:"https://www.oklink.com/arbitrum/tx/",scanHrefPrefixToken:"https://www.oklink.com/arbitrum/token/",scanHrefPrefixBlock:"https://www.oklink.com/arbitrum/block/"},polygon:{scanHrefPrefixAddress:"https://www.oklink.com/polygon/address/",scanHrefPrefixTx:"https://www.oklink.com/polygon/tx/",scanHrefPrefixToken:"https://www.oklink.com/polygon/token/",scanHrefPrefixBlock:"https://www.oklink.com/polygon/block/"},optimism:{scanHrefPrefixAddress:"https://www.oklink.com/optimism/address/",scanHrefPrefixTx:"https://www.oklink.com/optimism/tx/",scanHrefPrefixToken:"https://www.oklink.com/optimism/token/",scanHrefPrefixBlock:"https://www.oklink.com/optimism/block/"},avalanche:{scanHrefPrefixAddress:"https://www.oklink.com/avax/address/",scanHrefPrefixTx:"https://www.oklink.com/avax/tx/",scanHrefPrefixToken:"https://www.oklink.com/avax/token/",scanHrefPrefixBlock:"https://www.oklink.com/avax/block/"},base:{scanHrefPrefixAddress:"https://www.oklink.com/base/address/",scanHrefPrefixTx:"https://www.oklink.com/base/tx/",scanHrefPrefixToken:"https://www.oklink.com/base/token/",scanHrefPrefixBlock:"https://www.oklink.com/base/block/"},fantom:{scanHrefPrefixAddress:"https://www.oklink.com/ftm/address/",scanHrefPrefixTx:"https://www.oklink.com/ftm/tx/",scanHrefPrefixToken:"https://www.oklink.com/ftm/token/",scanHrefPrefixBlock:"https://www.oklink.com/ftm/block/"},scroll:{scanHrefPrefixAddress:"https://www.oklink.com/scroll/address/",scanHrefPrefixTx:"https://www.oklink.com/scroll/tx/",scanHrefPrefixToken:"https://www.oklink.com/scroll/token/",scanHrefPrefixBlock:"https://www.oklink.com/scroll/block/"},kava:{scanHrefPrefixAddress:"https://www.oklink.com/kava/address/",scanHrefPrefixTx:"https://www.oklink.com/kava/tx/",scanHrefPrefixToken:"https://www.oklink.com/kava/token/",scanHrefPrefixBlock:"https://www.oklink.com/kava/block/"},"zksync-era":{scanHrefPrefixAddress:"https://www.oklink.com/zksync/address/",scanHrefPrefixTx:"https://www.oklink.com/zksync/tx/",scanHrefPrefixToken:"https://www.oklink.com/zksync/token/",scanHrefPrefixBlock:"https://www.oklink.com/zksync/block/"},linea:{scanHrefPrefixAddress:"https://www.oklink.com/linea/address/",scanHrefPrefixTx:"https://www.oklink.com/linea/tx/",scanHrefPrefixToken:"https://www.oklink.com/linea/token/",scanHrefPrefixBlock:"https://www.oklink.com/linea/block/"},manta:{scanHrefPrefixAddress:"https://www.oklink.com/manta/address/",scanHrefPrefixTx:"https://www.oklink.com/manta/tx/",scanHrefPrefixToken:"https://www.oklink.com/manta/token/",scanHrefPrefixBlock:"https://www.oklink.com/manta/block/"},sepolia:{scanHrefPrefixAddress:"https://www.oklink.com/sepolia-test/address/",scanHrefPrefixTx:"https://www.oklink.com/sepolia-test/tx/",scanHrefPrefixToken:"https://www.oklink.com/sepolia-test/token/",scanHrefPrefixBlock:"https://www.oklink.com/sepolia-test/block/"}},I1=e=>{const{chain:t,type:r,value:n}=e,i=U0[t];switch(r){case"txHash":return`${i==null?void 0:i.scanHrefPrefixTx}${n}?channelId=blksec`;case"address":return`${i==null?void 0:i.scanHrefPrefixAddress}${e.value}?channelId=blksec`;case"block":return`${i==null?void 0:i.scanHrefPrefixBlock}${e.value}?channelId=blksec`;case"token":return`${i==null?void 0:i.scanHrefPrefixToken}${e.value}?channelId=blksec`}};function Na({chain:e,className:t,type:r,containerClassName:n,value:i}){const a=U0[e],s=I1({chain:e,type:r,value:i});return a&&s?f.jsx("a",{className:Ve("cursor-pointer",n),href:s,target:"_blank",rel:"noopener noreferrer",children:f.jsx("img",{className:Ve(t,"size-4"),style:{borderRadius:2},src:"https://assets.blocksec.com/image/1723018754493/.svg",alt:""})}):f.jsx("span",{})}const O1="_spinner_1rksr_1",B1="_spinnerContainer_1rksr_6",P1="_bouncedelay_1rksr_1",j1="_circle1_1rksr_19",R1="_circle2_1rksr_23",L1="_circle3_1rksr_27",M1="_circle4_1rksr_31",U1="_container1_1rksr_35",W1="_container2_1rksr_44",z1="_container3_1rksr_59",fi={spinner:O1,spinnerContainer:B1,bouncedelay:P1,circle1:j1,circle2:R1,circle3:L1,circle4:M1,container1:U1,container2:W1,container3:z1},V1={dark:"#ffffff",light:"#9CA3AF"},Oi=({style:e={},className:t})=>{const{mode:r}=de.useContext($n),n=V1[r];return f.jsx("div",{className:Ve(fi.spinner,t),style:e,children:[1,2,3].map(i=>f.jsxs("div",{className:Ve(fi.spinnerContainer,fi[`container${i}`]),children:[f.jsx("div",{className:fi.circle1,style:{background:n}}),f.jsx("div",{className:fi.circle2,style:{background:n}}),f.jsx("div",{className:fi.circle3,style:{background:n}}),f.jsx("div",{className:fi.circle4,style:{background:n}})]},i))})},H1=(e,t)=>`https://api.dicebear.com/7.x/identicon/svg?seed=${e??"seed"}&radius=50`,Hs=e=>mt.getChainIdBySimpleName(e)===Fd.id;/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var $s={};$s.version="0.18.5";var W0=1252,$1=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],z0=function(e){$1.indexOf(e)!=-1&&(W0=e)};function G1(){z0(1252)}var Ha=function(e){z0(e)};function X1(){Ha(1200),G1()}var ds=function(t){return String.fromCharCode(t)},Hc=function(t){return String.fromCharCode(t)},_i,$c=null,ei="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function $a(e){for(var t="",r=0,n=0,i=0,a=0,s=0,o=0,c=0,l=0;l<e.length;)r=e.charCodeAt(l++),a=r>>2,n=e.charCodeAt(l++),s=(r&3)<<4|n>>4,i=e.charCodeAt(l++),o=(n&15)<<2|i>>6,c=i&63,isNaN(n)?o=c=64:isNaN(i)&&(c=64),t+=ei.charAt(a)+ei.charAt(s)+ei.charAt(o)+ei.charAt(c);return t}function Vn(e){var t="",r=0,n=0,i=0,a=0,s=0,o=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l<e.length;)a=ei.indexOf(e.charAt(l++)),s=ei.indexOf(e.charAt(l++)),r=a<<2|s>>4,t+=String.fromCharCode(r),o=ei.indexOf(e.charAt(l++)),n=(s&15)<<4|o>>2,o!==64&&(t+=String.fromCharCode(n)),c=ei.indexOf(e.charAt(l++)),i=(o&3)<<6|c,c!==64&&(t+=String.fromCharCode(i));return t}var wt=function(){return typeof rt<"u"&&typeof Bo<"u"&&typeof Bo.versions<"u"&&!!Bo.versions.node}(),Xn=function(){if(typeof rt<"u"){var e=!rt.from;if(!e)try{rt.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new rt(t,r):new rt(t)}:rt.from.bind(rt)}return function(){}}();function Ti(e){return wt?rt.alloc?rt.alloc(e):new rt(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Gc(e){return wt?rt.allocUnsafe?rt.allocUnsafe(e):new rt(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var on=function(t){return wt?Xn(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function _o(e){if(typeof ArrayBuffer>"u")return on(e);for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n!=e.length;++n)r[n]=e.charCodeAt(n)&255;return t}function es(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function K1(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}var cr=wt?function(e){return rt.concat(e.map(function(t){return rt.isBuffer(t)?t:Xn(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var n=new Uint8Array(r),i=0;for(t=0,r=0;t<e.length;r+=i,++t)if(i=e[t].length,e[t]instanceof Uint8Array)n.set(e[t],r);else{if(typeof e[t]=="string")throw"wtf";n.set(new Uint8Array(e[t]),r)}return n}return[].concat.apply([],e.map(function(a){return Array.isArray(a)?a:[].slice.call(a)}))};function Y1(e){for(var t=[],r=0,n=e.length+250,i=Ti(e.length+255),a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s<128)i[r++]=s;else if(s<2048)i[r++]=192|s>>6&31,i[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var o=e.charCodeAt(++a)&1023;i[r++]=240|s>>8&7,i[r++]=128|s>>2&63,i[r++]=128|o>>6&15|(s&3)<<4,i[r++]=128|o&63}else i[r++]=224|s>>12&15,i[r++]=128|s>>6&63,i[r++]=128|s&63;r>n&&(t.push(i.slice(0,r)),r=0,i=Ti(65535),n=65530)}return t.push(i.slice(0,r)),cr(t)}var Ia=/\u0000/g,ps=/[\u0001-\u0006]/g;function ea(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function ln(e,t){var r=""+e;return r.length>=t?r:Ut("0",t-r.length)+r}function zl(e,t){var r=""+e;return r.length>=t?r:Ut(" ",t-r.length)+r}function Gs(e,t){var r=""+e;return r.length>=t?r:r+Ut(" ",t-r.length)}function q1(e,t){var r=""+Math.round(e);return r.length>=t?r:Ut("0",t-r.length)+r}function J1(e,t){var r=""+e;return r.length>=t?r:Ut("0",t-r.length)+r}var Xc=Math.pow(2,32);function Vi(e,t){if(e>Xc||e<-Xc)return q1(e,t);var r=Math.round(e);return J1(r,t)}function Xs(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var Kc=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Uo=[["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"]];function Z1(e){return 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"秒 "',e}var Wt={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"秒 "'},Yc={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},Q1={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 Ks(e,t,r){for(var n=e<0?-1:1,i=e*n,a=0,s=1,o=0,c=1,l=0,u=0,m=Math.floor(i);l<t&&(m=Math.floor(i),o=m*s+a,u=m*l+c,!(i-m<5e-8));)i=1/(i-m),a=s,s=o,c=l,l=u;if(u>t&&(l>t?(u=c,o=a):(u=l,o=s)),!r)return[0,n*o,u];var d=Math.floor(n*o/u);return[d,n*o-d*u,u]}function ms(e,t,r){if(e>2958465||e<0)return null;var n=e|0,i=Math.floor(86400*(e-n)),a=0,s=[],o={D:n,T:i,u:86400*(e-n)-i,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),t&&t.date1904&&(n+=1462),o.u>.9999&&(o.u=0,++i==86400&&(o.T=i=0,++n,++o.D)),n===60)s=r?[1317,10,29]:[1900,2,29],a=3;else if(n===0)s=r?[1317,8,29]:[1900,1,0],a=6;else{n>60&&--n;var c=new Date(1900,0,1);c.setDate(c.getDate()+n-1),s=[c.getFullYear(),c.getMonth()+1,c.getDate()],a=c.getDay(),n<60&&(a=(a+6)%7),r&&(a=sp(c,s))}return o.y=s[0],o.m=s[1],o.d=s[2],o.S=i%60,i=Math.floor(i/60),o.M=i%60,i=Math.floor(i/60),o.H=i,o.q=a,o}var V0=new Date(1899,11,31,0,0,0),ep=V0.getTime(),tp=new Date(1900,2,1,0,0,0);function H0(e,t){var r=e.getTime();return t?r-=1461*24*60*60*1e3:e>=tp&&(r+=24*60*60*1e3),(r-(ep+(e.getTimezoneOffset()-V0.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Vl(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function rp(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function np(e){var t=e<0?12:11,r=Vl(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function ip(e){var t=Vl(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function ap(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=np(e):t===10?r=e.toFixed(10).substr(0,12):r=ip(e),Vl(rp(r.toUpperCase()))}function dl(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):ap(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return ai(14,H0(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function sp(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function op(e,t,r,n){var i="",a=0,s=0,o=r.y,c,l=0;switch(e){case 98:o=r.y+543;case 121:switch(t.length){case 1:case 2:c=o%100,l=2;break;default:c=o%1e4,l=4;break}break;case 109:switch(t.length){case 1:case 2:c=r.m,l=t.length;break;case 3:return Uo[r.m-1][1];case 5:return Uo[r.m-1][0];default:return Uo[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=r.d,l=t.length;break;case 3:return Kc[r.q][0];default:return Kc[r.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(r.H+11)%12,l=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=r.H,l=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=r.M,l=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?ln(r.S,t.length):(n>=2?s=n===3?1e3:100:s=n===1?10:1,a=Math.round(s*(r.S+r.u)),a>=60*s&&(a=0),t==="s"?a===0?"0":""+a/s:(i=ln(a,2+n),t==="ss"?i.substr(0,2):"."+i.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":c=r.D*24+r.H;break;case"[m]":case"[mm]":c=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":c=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}l=t.length===3?1:2;break;case 101:c=o,l=1;break}var u=l>0?ln(c,l):"";return u}function ti(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,n=e.substr(0,r);r!=e.length;r+=t)n+=(n.length>0?",":"")+e.substr(r,t);return n}var $0=/%/g;function lp(e,t,r){var n=t.replace($0,""),i=t.length-n.length;return Mn(e,n,r*Math.pow(10,2*i))+Ut("%",i)}function cp(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return Mn(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function G0(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+G0(e,-t);var i=e.indexOf(".");i===-1&&(i=e.indexOf("E"));var a=Math.floor(Math.log(t)*Math.LOG10E)%i;if(a<0&&(a+=i),r=(t/Math.pow(10,a)).toPrecision(n+1+(i+a)%i),r.indexOf("e")===-1){var s=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+a):r+="E+"+(s-a);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,i)+"."+r.substr(2+i),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,c,l,u){return c+l+u.substr(0,(i+a)%i)+"."+u.substr(a)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var X0=/# (\?+)( ?)\/( ?)(\d+)/;function up(e,t,r){var n=parseInt(e[4],10),i=Math.round(t*n),a=Math.floor(i/n),s=i-a*n,o=n;return r+(a===0?"":""+a)+" "+(s===0?Ut(" ",e[1].length+1+e[4].length):zl(s,e[1].length)+e[2]+"/"+e[3]+ln(o,e[4].length))}function fp(e,t,r){return r+(t===0?"":""+t)+Ut(" ",e[1].length+2+e[4].length)}var K0=/^#*0*\.([0#]+)/,Y0=/\).*[0#]/,q0=/\(###\) ###\\?-####/;function gr(e){for(var t="",r,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 qc(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function Jc(e,t){var r=e-Math.floor(e),n=Math.pow(10,t);return t<(""+Math.round(r*n)).length?0:Math.round(r*n)}function hp(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function dp(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function Vr(e,t,r){if(e.charCodeAt(0)===40&&!t.match(Y0)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Vr("n",n,r):"("+Vr("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return cp(e,t,r);if(t.indexOf("%")!==-1)return lp(e,t,r);if(t.indexOf("E")!==-1)return G0(t,r);if(t.charCodeAt(0)===36)return"$"+Vr(e,t.substr(t.charAt(1)==" "?2:1),r);var i,a,s,o,c=Math.abs(r),l=r<0?"-":"";if(t.match(/^00+$/))return l+Vi(c,t.length);if(t.match(/^[#?]+$/))return i=Vi(r,0),i==="0"&&(i=""),i.length>t.length?i:gr(t.substr(0,t.length-i.length))+i;if(a=t.match(X0))return up(a,c,l);if(t.match(/^#+0+$/))return l+Vi(c,t.length-t.indexOf("0"));if(a=t.match(K0))return i=qc(r,a[1].length).replace(/^([^\.]+)$/,"$1."+gr(a[1])).replace(/\.$/,"."+gr(a[1])).replace(/\.(\d*)$/,function(v,p){return"."+p+Ut("0",gr(a[1]).length-p.length)}),t.indexOf("0.")!==-1?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),a=t.match(/^(0*)\.(#*)$/))return l+qc(c,a[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=t.match(/^#{1,3},##0(\.?)$/))return l+ti(Vi(c,0));if(a=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Vr(e,t,-r):ti(""+(Math.floor(r)+hp(r,a[1].length)))+"."+ln(Jc(r,a[1].length),a[1].length);if(a=t.match(/^#,#*,#0/))return Vr(e,t.replace(/^#,#*,/,""),r);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=ea(Vr(e,t.replace(/[\\-]/g,""),r)),s=0,ea(ea(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return s<i.length?i.charAt(s++):v==="0"?"0":""}));if(t.match(q0))return i=Vr(e,"##########",r),"("+i.substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var u="";if(a=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(a[4].length,7),o=Ks(c,Math.pow(10,s)-1,!1),i=""+l,u=Mn("n",a[1],o[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),i+=u+a[2]+"/"+a[3],u=Gs(o[2],s),u.length<a[4].length&&(u=gr(a[4].substr(a[4].length-u.length))+u),i+=u,i;if(a=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(a[1].length,a[4].length),7),o=Ks(c,Math.pow(10,s)-1,!0),l+(o[0]||(o[1]?"":"0"))+" "+(o[1]?zl(o[1],s)+a[2]+"/"+a[3]+Gs(o[2],s):Ut(" ",2*s+1+a[2].length+a[3].length));if(a=t.match(/^[#0?]+$/))return i=Vi(r,0),t.length<=i.length?i:gr(t.substr(0,t.length-i.length))+i;if(a=t.match(/^([#0?]+)\.([#0]+)$/)){i=""+r.toFixed(Math.min(a[2].length,10)).replace(/([^0])0+$/,"$1"),s=i.indexOf(".");var m=t.indexOf(".")-s,d=t.length-i.length-m;return gr(t.substr(0,m)+i+t.substr(t.length-d))}if(a=t.match(/^00,000\.([#0]*0)$/))return s=Jc(r,a[1].length),r<0?"-"+Vr(e,t,-r):ti(dp(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?ln(0,3-v.length):"")+v})+"."+ln(s,a[1].length);switch(t){case"###,##0.00":return Vr(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var g=ti(Vi(c,0));return g!=="0"?l+g:"";case"###,###.00":return Vr(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return Vr(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function pp(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return Mn(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function mp(e,t,r){var n=t.replace($0,""),i=t.length-n.length;return Mn(e,n,r*Math.pow(10,2*i))+Ut("%",i)}function J0(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+J0(e,-t);var i=e.indexOf(".");i===-1&&(i=e.indexOf("E"));var a=Math.floor(Math.log(t)*Math.LOG10E)%i;if(a<0&&(a+=i),r=(t/Math.pow(10,a)).toPrecision(n+1+(i+a)%i),!r.match(/[Ee]/)){var s=Math.floor(Math.log(t)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+a):r+="E+"+(s-a),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,c,l,u){return c+l+u.substr(0,(i+a)%i)+"."+u.substr(a)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function pn(e,t,r){if(e.charCodeAt(0)===40&&!t.match(Y0)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?pn("n",n,r):"("+pn("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return pp(e,t,r);if(t.indexOf("%")!==-1)return mp(e,t,r);if(t.indexOf("E")!==-1)return J0(t,r);if(t.charCodeAt(0)===36)return"$"+pn(e,t.substr(t.charAt(1)==" "?2:1),r);var i,a,s,o,c=Math.abs(r),l=r<0?"-":"";if(t.match(/^00+$/))return l+ln(c,t.length);if(t.match(/^[#?]+$/))return i=""+r,r===0&&(i=""),i.length>t.length?i:gr(t.substr(0,t.length-i.length))+i;if(a=t.match(X0))return fp(a,c,l);if(t.match(/^#+0+$/))return l+ln(c,t.length-t.indexOf("0"));if(a=t.match(K0))return i=(""+r).replace(/^([^\.]+)$/,"$1."+gr(a[1])).replace(/\.$/,"."+gr(a[1])),i=i.replace(/\.(\d*)$/,function(v,p){return"."+p+Ut("0",gr(a[1]).length-p.length)}),t.indexOf("0.")!==-1?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),a=t.match(/^(0*)\.(#*)$/))return l+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=t.match(/^#{1,3},##0(\.?)$/))return l+ti(""+c);if(a=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+pn(e,t,-r):ti(""+r)+"."+Ut("0",a[1].length);if(a=t.match(/^#,#*,#0/))return pn(e,t.replace(/^#,#*,/,""),r);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=ea(pn(e,t.replace(/[\\-]/g,""),r)),s=0,ea(ea(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return s<i.length?i.charAt(s++):v==="0"?"0":""}));if(t.match(q0))return i=pn(e,"##########",r),"("+i.substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var u="";if(a=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(a[4].length,7),o=Ks(c,Math.pow(10,s)-1,!1),i=""+l,u=Mn("n",a[1],o[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),i+=u+a[2]+"/"+a[3],u=Gs(o[2],s),u.length<a[4].length&&(u=gr(a[4].substr(a[4].length-u.length))+u),i+=u,i;if(a=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(a[1].length,a[4].length),7),o=Ks(c,Math.pow(10,s)-1,!0),l+(o[0]||(o[1]?"":"0"))+" "+(o[1]?zl(o[1],s)+a[2]+"/"+a[3]+Gs(o[2],s):Ut(" ",2*s+1+a[2].length+a[3].length));if(a=t.match(/^[#0?]+$/))return i=""+r,t.length<=i.length?i:gr(t.substr(0,t.length-i.length))+i;if(a=t.match(/^([#0]+)\.([#0]+)$/)){i=""+r.toFixed(Math.min(a[2].length,10)).replace(/([^0])0+$/,"$1"),s=i.indexOf(".");var m=t.indexOf(".")-s,d=t.length-i.length-m;return gr(t.substr(0,m)+i+t.substr(t.length-d))}if(a=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+pn(e,t,-r):ti(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?ln(0,3-v.length):"")+v})+"."+ln(0,a[1].length);switch(t){case"###,###":case"##,###":case"#,###":var g=ti(""+c);return g!=="0"?l+g:"";default:if(t.match(/\.[0#?]*$/))return pn(e,t.slice(0,t.lastIndexOf(".")),r)+gr(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function Mn(e,t,r){return(r|0)===r?pn(e,t,r):Vr(e,t,r)}function gp(e){for(var t=[],r=!1,n=0,i=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:t[t.length]=e.substr(i,n-i),i=n+1}if(t[t.length]=e.substr(i),r===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var Z0=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function Q0(e){for(var t=0,r="",n="";t<e.length;)switch(r=e.charAt(t)){case"G":Xs(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(n=r;e.charAt(t++)!=="]"&&t<e.length;)n+=e.charAt(t);if(n.match(Z0))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-1||r=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function xp(e,t,r,n){for(var i=[],a="",s=0,o="",c="t",l,u,m,d="H";s<e.length;)switch(o=e.charAt(s)){case"G":if(!Xs(e,s))throw new Error("unrecognized character "+o+" in "+e);i[i.length]={t:"G",v:"General"},s+=7;break;case'"':for(a="";(m=e.charCodeAt(++s))!==34&&s<e.length;)a+=String.fromCharCode(m);i[i.length]={t:"t",v:a},++s;break;case"\\":var g=e.charAt(++s),v=g==="("||g===")"?g:"t";i[i.length]={t:v,v:g},++s;break;case"_":i[i.length]={t:"t",v:" "},s+=2;break;case"@":i[i.length]={t:"T",v:t},++s;break;case"B":case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(l==null&&(l=ms(t,r,e.charAt(s+1)==="2"),l==null))return"";i[i.length]={t:"X",v:e.substr(s,2)},c=o,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":o=o.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||l==null&&(l=ms(t,r),l==null))return"";for(a=o;++s<e.length&&e.charAt(s).toLowerCase()===o;)a+=o;o==="m"&&c.toLowerCase()==="h"&&(o="M"),o==="h"&&(o=d),i[i.length]={t:o,v:a},c=o;break;case"A":case"a":case"上":var p={t:o,v:o};if(l==null&&(l=ms(t,r)),e.substr(s,3).toUpperCase()==="A/P"?(l!=null&&(p.v=l.H>=12?"P":"A"),p.t="T",d="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(l!=null&&(p.v=l.H>=12?"PM":"AM"),p.t="T",s+=5,d="h"):e.substr(s,5).toUpperCase()==="上午/下午"?(l!=null&&(p.v=l.H>=12?"下午":"上午"),p.t="T",s+=5,d="h"):(p.t="t",++s),l==null&&p.t==="T")return"";i[i.length]=p,c=o;break;case"[":for(a=o;e.charAt(s++)!=="]"&&s<e.length;)a+=e.charAt(s);if(a.slice(-1)!=="]")throw'unterminated "[" block: |'+a+"|";if(a.match(Z0)){if(l==null&&(l=ms(t,r),l==null))return"";i[i.length]={t:"Z",v:a.toLowerCase()},c=a.charAt(1)}else a.indexOf("$")>-1&&(a=(a.match(/\$([^-\[\]]*)/)||[])[1]||"$",Q0(e)||(i[i.length]={t:"t",v:a}));break;case".":if(l!=null){for(a=o;++s<e.length&&(o=e.charAt(s))==="0";)a+=o;i[i.length]={t:"s",v:a};break}case"0":case"#":for(a=o;++s<e.length&&"0#?.,E+-%".indexOf(o=e.charAt(s))>-1;)a+=o;i[i.length]={t:"n",v:a};break;case"?":for(a=o;e.charAt(++s)===o;)a+=o;i[i.length]={t:o,v:a},c=o;break;case"*":++s,(e.charAt(s)==" "||e.charAt(s)=="*")&&++s;break;case"(":case")":i[i.length]={t:n===1?"t":o,v:o},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(a=o;s<e.length&&"0123456789".indexOf(e.charAt(++s))>-1;)a+=e.charAt(s);i[i.length]={t:"D",v:a};break;case" ":i[i.length]={t:o,v:o},++s;break;case"$":i[i.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(o)===-1)throw new Error("unrecognized character "+o+" in "+e);i[i.length]={t:"t",v:o},++s;break}var _=0,E=0,D;for(s=i.length-1,c="t";s>=0;--s)switch(i[s].t){case"h":case"H":i[s].t=d,c="h",_<1&&(_=1);break;case"s":(D=i[s].v.match(/\.0+$/))&&(E=Math.max(E,D[0].length-1)),_<3&&(_=3);case"d":case"y":case"M":case"e":c=i[s].t;break;case"m":c==="s"&&(i[s].t="M",_<2&&(_=2));break;case"X":break;case"Z":_<1&&i[s].v.match(/[Hh]/)&&(_=1),_<2&&i[s].v.match(/[Mm]/)&&(_=2),_<3&&i[s].v.match(/[Ss]/)&&(_=3)}switch(_){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M);break}var A="",S;for(s=0;s<i.length;++s)switch(i[s].t){case"t":case"T":case" ":case"D":break;case"X":i[s].v="",i[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":i[s].v=op(i[s].t.charCodeAt(0),i[s].v,l,E),i[s].t="t";break;case"n":case"?":for(S=s+1;i[S]!=null&&((o=i[S].t)==="?"||o==="D"||(o===" "||o==="t")&&i[S+1]!=null&&(i[S+1].t==="?"||i[S+1].t==="t"&&i[S+1].v==="/")||i[s].t==="("&&(o===" "||o==="n"||o===")")||o==="t"&&(i[S].v==="/"||i[S].v===" "&&i[S+1]!=null&&i[S+1].t=="?"));)i[s].v+=i[S].v,i[S]={v:"",t:";"},++S;A+=i[s].v,s=S-1;break;case"G":i[s].t="t",i[s].v=dl(t,r);break}var I="",U,R;if(A.length>0){A.charCodeAt(0)==40?(U=t<0&&A.charCodeAt(0)===45?-t:t,R=Mn("n",A,U)):(U=t<0&&n>1?-t:t,R=Mn("n",A,U),U<0&&i[0]&&i[0].t=="t"&&(R=R.substr(1),i[0].v="-"+i[0].v)),S=R.length-1;var Y=i.length;for(s=0;s<i.length;++s)if(i[s]!=null&&i[s].t!="t"&&i[s].v.indexOf(".")>-1){Y=s;break}var W=i.length;if(Y===i.length&&R.indexOf("E")===-1){for(s=i.length-1;s>=0;--s)i[s]==null||"n?".indexOf(i[s].t)===-1||(S>=i[s].v.length-1?(S-=i[s].v.length,i[s].v=R.substr(S+1,i[s].v.length)):S<0?i[s].v="":(i[s].v=R.substr(0,S+1),S=-1),i[s].t="t",W=s);S>=0&&W<i.length&&(i[W].v=R.substr(0,S+1)+i[W].v)}else if(Y!==i.length&&R.indexOf("E")===-1){for(S=R.indexOf(".")-1,s=Y;s>=0;--s)if(!(i[s]==null||"n?".indexOf(i[s].t)===-1)){for(u=i[s].v.indexOf(".")>-1&&s===Y?i[s].v.indexOf(".")-1:i[s].v.length-1,I=i[s].v.substr(u+1);u>=0;--u)S>=0&&(i[s].v.charAt(u)==="0"||i[s].v.charAt(u)==="#")&&(I=R.charAt(S--)+I);i[s].v=I,i[s].t="t",W=s}for(S>=0&&W<i.length&&(i[W].v=R.substr(0,S+1)+i[W].v),S=R.indexOf(".")+1,s=Y;s<i.length;++s)if(!(i[s]==null||"n?(".indexOf(i[s].t)===-1&&s!==Y)){for(u=i[s].v.indexOf(".")>-1&&s===Y?i[s].v.indexOf(".")+1:0,I=i[s].v.substr(0,u);u<i[s].v.length;++u)S<R.length&&(I+=R.charAt(S++));i[s].v=I,i[s].t="t",W=s}}}for(s=0;s<i.length;++s)i[s]!=null&&"n?".indexOf(i[s].t)>-1&&(U=n>1&&t<0&&s>0&&i[s-1].v==="-"?-t:t,i[s].v=Mn(i[s].t,i[s].v,U),i[s].t="t");var Z="";for(s=0;s!==i.length;++s)i[s]!=null&&(Z+=i[s].v);return Z}var Zc=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Qc(e,t){if(t==null)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function vp(e,t){var r=gp(e),n=r.length,i=r[n-1].indexOf("@");if(n<4&&i>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof t!="number")return[4,r.length===4||i>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=i>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=i>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=i>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var a=t>0?r[0]:t<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,a];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(Zc),o=r[1].match(Zc);return Qc(t,s)?[n,r[0]]:Qc(t,o)?[n,r[1]]:[n,r[s!=null&&o!=null?2:1]]}return[n,a]}function ai(e,t,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:Wt)[e],n==null&&(n=r.table&&r.table[Yc[e]]||Wt[Yc[e]]),n==null&&(n=Q1[e]||"General");break}if(Xs(n,0))return dl(t,r);t instanceof Date&&(t=H0(t,r.date1904));var i=vp(n,t);if(Xs(i[1]))return dl(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return xp(i[1],t,r,i[0])}function ef(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(Wt[r]==null){t<0&&(t=r);continue}if(Wt[r]==e){t=r;break}}t<0&&(t=391)}return Wt[t]=e,t}function Eo(e){for(var t=0;t!=392;++t)e[t]!==void 0&&ef(e[t],t)}function wo(){Wt=Z1()}var tf=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function _p(e){var t=typeof e=="number"?Wt[e]:e;return t=t.replace(tf,"(\\d+)"),new RegExp("^"+t+"$")}function Ep(e,t,r){var n=-1,i=-1,a=-1,s=-1,o=-1,c=-1;(t.match(tf)||[]).forEach(function(m,d){var g=parseInt(r[d+1],10);switch(m.toLowerCase().charAt(0)){case"y":n=g;break;case"d":a=g;break;case"h":s=g;break;case"s":c=g;break;case"m":s>=0?o=g:i=g;break}}),c>=0&&o==-1&&i>=0&&(o=i,i=-1);var l=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(i>=1?i:1)).slice(-2)+"-"+("00"+(a>=1?a:1)).slice(-2);l.length==7&&(l="0"+l),l.length==8&&(l="20"+l);var u=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return s==-1&&o==-1&&c==-1?l:n==-1&&i==-1&&a==-1?u:l+"T"+u}var wp=function(){var e={};e.version="1.2.0";function t(){for(var R=0,Y=new Array(256),W=0;W!=256;++W)R=W,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,R=R&1?-306674912^R>>>1:R>>>1,Y[W]=R;return typeof Int32Array<"u"?new Int32Array(Y):Y}var r=t();function n(R){var Y=0,W=0,Z=0,N=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(Z=0;Z!=256;++Z)N[Z]=R[Z];for(Z=0;Z!=256;++Z)for(W=R[Z],Y=256+Z;Y<4096;Y+=256)W=N[Y]=W>>>8^R[W&255];var M=[];for(Z=1;Z!=16;++Z)M[Z-1]=typeof Int32Array<"u"?N.subarray(Z*256,Z*256+256):N.slice(Z*256,Z*256+256);return M}var i=n(r),a=i[0],s=i[1],o=i[2],c=i[3],l=i[4],u=i[5],m=i[6],d=i[7],g=i[8],v=i[9],p=i[10],_=i[11],E=i[12],D=i[13],A=i[14];function S(R,Y){for(var W=Y^-1,Z=0,N=R.length;Z<N;)W=W>>>8^r[(W^R.charCodeAt(Z++))&255];return~W}function I(R,Y){for(var W=Y^-1,Z=R.length-15,N=0;N<Z;)W=A[R[N++]^W&255]^D[R[N++]^W>>8&255]^E[R[N++]^W>>16&255]^_[R[N++]^W>>>24]^p[R[N++]]^v[R[N++]]^g[R[N++]]^d[R[N++]]^m[R[N++]]^u[R[N++]]^l[R[N++]]^c[R[N++]]^o[R[N++]]^s[R[N++]]^a[R[N++]]^r[R[N++]];for(Z+=15;N<Z;)W=W>>>8^r[(W^R[N++])&255];return~W}function U(R,Y){for(var W=Y^-1,Z=0,N=R.length,M=0,G=0;Z<N;)M=R.charCodeAt(Z++),M<128?W=W>>>8^r[(W^M)&255]:M<2048?(W=W>>>8^r[(W^(192|M>>6&31))&255],W=W>>>8^r[(W^(128|M&63))&255]):M>=55296&&M<57344?(M=(M&1023)+64,G=R.charCodeAt(Z++)&1023,W=W>>>8^r[(W^(240|M>>8&7))&255],W=W>>>8^r[(W^(128|M>>2&63))&255],W=W>>>8^r[(W^(128|G>>6&15|(M&3)<<4))&255],W=W>>>8^r[(W^(128|G&63))&255]):(W=W>>>8^r[(W^(224|M>>12&15))&255],W=W>>>8^r[(W^(128|M>>6&63))&255],W=W>>>8^r[(W^(128|M&63))&255]);return~W}return e.table=r,e.bstr=S,e.buf=I,e.str=U,e}(),St=function(){var t={};t.version="1.2.1";function r(C,B){for(var F=C.split("/"),k=B.split("/"),P=0,j=0,ne=Math.min(F.length,k.length);P<ne;++P){if(j=F[P].length-k[P].length)return j;if(F[P]!=k[P])return F[P]<k[P]?-1:1}return F.length-k.length}function n(C){if(C.charAt(C.length-1)=="/")return C.slice(0,-1).indexOf("/")===-1?C:n(C.slice(0,-1));var B=C.lastIndexOf("/");return B===-1?C:C.slice(0,B+1)}function i(C){if(C.charAt(C.length-1)=="/")return i(C.slice(0,-1));var B=C.lastIndexOf("/");return B===-1?C:C.slice(B+1)}function a(C,B){typeof B=="string"&&(B=new Date(B));var F=B.getHours();F=F<<6|B.getMinutes(),F=F<<5|B.getSeconds()>>>1,C.write_shift(2,F);var k=B.getFullYear()-1980;k=k<<4|B.getMonth()+1,k=k<<5|B.getDate(),C.write_shift(2,k)}function s(C){var B=C.read_shift(2)&65535,F=C.read_shift(2)&65535,k=new Date,P=F&31;F>>>=5;var j=F&15;F>>>=4,k.setMilliseconds(0),k.setFullYear(F+1980),k.setMonth(j-1),k.setDate(P);var ne=B&31;B>>>=5;var fe=B&63;return B>>>=6,k.setHours(B),k.setMinutes(fe),k.setSeconds(ne<<1),k}function o(C){Br(C,0);for(var B={},F=0;C.l<=C.length-4;){var k=C.read_shift(2),P=C.read_shift(2),j=C.l+P,ne={};switch(k){case 21589:F=C.read_shift(1),F&1&&(ne.mtime=C.read_shift(4)),P>5&&(F&2&&(ne.atime=C.read_shift(4)),F&4&&(ne.ctime=C.read_shift(4))),ne.mtime&&(ne.mt=new Date(ne.mtime*1e3));break}C.l=j,B[k]=ne}return B}var c;function l(){return c||(c={})}function u(C,B){if(C[0]==80&&C[1]==75)return Tn(C,B);if((C[0]|32)==109&&(C[1]|32)==105)return bn(C,B);if(C.length<512)throw new Error("CFB file size "+C.length+" < 512");var F=3,k=512,P=0,j=0,ne=0,fe=0,te=0,ie=[],oe=C.slice(0,512);Br(oe,0);var he=m(oe);switch(F=he[0],F){case 3:k=512;break;case 4:k=4096;break;case 0:if(he[1]==0)return Tn(C,B);default:throw new Error("Major Version: Expected 3 or 4 saw "+F)}k!==512&&(oe=C.slice(0,k),Br(oe,28));var Ie=C.slice(0,k);d(oe,F);var De=oe.read_shift(4,"i");if(F===3&&De!==0)throw new Error("# Directory Sectors: Expected 0 saw "+De);oe.l+=4,ne=oe.read_shift(4,"i"),oe.l+=4,oe.chk("00100000","Mini Stream Cutoff Size: "),fe=oe.read_shift(4,"i"),P=oe.read_shift(4,"i"),te=oe.read_shift(4,"i"),j=oe.read_shift(4,"i");for(var Ae=-1,Se=0;Se<109&&(Ae=oe.read_shift(4,"i"),!(Ae<0));++Se)ie[Se]=Ae;var H=g(C,k);_(te,j,H,k,ie);var ce=D(H,ne,ie,k);ce[ne].name="!Directory",P>0&&fe!==G&&(ce[fe].name="!MiniFAT"),ce[ie[0]].name="!FAT",ce.fat_addrs=ie,ce.ssz=k;var we={},Me=[],qe=[],gt=[];A(ne,ce,H,Me,P,we,qe,fe),v(qe,gt,Me),Me.shift();var ot={FileIndex:qe,FullPaths:gt};return B&&B.raw&&(ot.raw={header:Ie,sectors:H}),ot}function m(C){if(C[C.l]==80&&C[C.l+1]==75)return[0,0];C.chk(b,"Header Signature: "),C.l+=16;var B=C.read_shift(2,"u");return[C.read_shift(2,"u"),B]}function d(C,B){var F=9;switch(C.l+=2,F=C.read_shift(2)){case 9:if(B!=3)throw new Error("Sector Shift: Expected 9 saw "+F);break;case 12:if(B!=4)throw new Error("Sector Shift: Expected 12 saw "+F);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+F)}C.chk("0600","Mini Sector Shift: "),C.chk("000000000000","Reserved: ")}function g(C,B){for(var F=Math.ceil(C.length/B)-1,k=[],P=1;P<F;++P)k[P-1]=C.slice(P*B,(P+1)*B);return k[F-1]=C.slice(F*B),k}function v(C,B,F){for(var k=0,P=0,j=0,ne=0,fe=0,te=F.length,ie=[],oe=[];k<te;++k)ie[k]=oe[k]=k,B[k]=F[k];for(;fe<oe.length;++fe)k=oe[fe],P=C[k].L,j=C[k].R,ne=C[k].C,ie[k]===k&&(P!==-1&&ie[P]!==P&&(ie[k]=ie[P]),j!==-1&&ie[j]!==j&&(ie[k]=ie[j])),ne!==-1&&(ie[ne]=k),P!==-1&&k!=ie[k]&&(ie[P]=ie[k],oe.lastIndexOf(P)<fe&&oe.push(P)),j!==-1&&k!=ie[k]&&(ie[j]=ie[k],oe.lastIndexOf(j)<fe&&oe.push(j));for(k=1;k<te;++k)ie[k]===k&&(j!==-1&&ie[j]!==j?ie[k]=ie[j]:P!==-1&&ie[P]!==P&&(ie[k]=ie[P]));for(k=1;k<te;++k)if(C[k].type!==0){if(fe=k,fe!=ie[fe])do fe=ie[fe],B[k]=B[fe]+"/"+B[k];while(fe!==0&&ie[fe]!==-1&&fe!=ie[fe]);ie[k]=-1}for(B[0]+="/",k=1;k<te;++k)C[k].type!==2&&(B[k]+="/")}function p(C,B,F){for(var k=C.start,P=C.size,j=[],ne=k;F&&P>0&&ne>=0;)j.push(B.slice(ne*M,ne*M+M)),P-=M,ne=Ei(F,ne*4);return j.length===0?ue(0):cr(j).slice(0,C.size)}function _(C,B,F,k,P){var j=G;if(C===G){if(B!==0)throw new Error("DIFAT chain shorter than expected")}else if(C!==-1){var ne=F[C],fe=(k>>>2)-1;if(!ne)return;for(var te=0;te<fe&&(j=Ei(ne,te*4))!==G;++te)P.push(j);_(Ei(ne,k-4),B-1,F,k,P)}}function E(C,B,F,k,P){var j=[],ne=[];P||(P=[]);var fe=k-1,te=0,ie=0;for(te=B;te>=0;){P[te]=!0,j[j.length]=te,ne.push(C[te]);var oe=F[Math.floor(te*4/k)];if(ie=te*4&fe,k<4+ie)throw new Error("FAT boundary crossed: "+te+" 4 "+k);if(!C[oe])break;te=Ei(C[oe],ie)}return{nodes:j,data:ou([ne])}}function D(C,B,F,k){var P=C.length,j=[],ne=[],fe=[],te=[],ie=k-1,oe=0,he=0,Ie=0,De=0;for(oe=0;oe<P;++oe)if(fe=[],Ie=oe+B,Ie>=P&&(Ie-=P),!ne[Ie]){te=[];var Ae=[];for(he=Ie;he>=0;){Ae[he]=!0,ne[he]=!0,fe[fe.length]=he,te.push(C[he]);var Se=F[Math.floor(he*4/k)];if(De=he*4&ie,k<4+De)throw new Error("FAT boundary crossed: "+he+" 4 "+k);if(!C[Se]||(he=Ei(C[Se],De),Ae[he]))break}j[Ie]={nodes:fe,data:ou([te])}}return j}function A(C,B,F,k,P,j,ne,fe){for(var te=0,ie=k.length?2:0,oe=B[C].data,he=0,Ie=0,De;he<oe.length;he+=128){var Ae=oe.slice(he,he+128);Br(Ae,64),Ie=Ae.read_shift(2),De=Kl(Ae,0,Ie-ie),k.push(De);var Se={name:De,type:Ae.read_shift(1),color:Ae.read_shift(1),L:Ae.read_shift(4,"i"),R:Ae.read_shift(4,"i"),C:Ae.read_shift(4,"i"),clsid:Ae.read_shift(16),state:Ae.read_shift(4,"i"),start:0,size:0},H=Ae.read_shift(2)+Ae.read_shift(2)+Ae.read_shift(2)+Ae.read_shift(2);H!==0&&(Se.ct=S(Ae,Ae.l-8));var ce=Ae.read_shift(2)+Ae.read_shift(2)+Ae.read_shift(2)+Ae.read_shift(2);ce!==0&&(Se.mt=S(Ae,Ae.l-8)),Se.start=Ae.read_shift(4,"i"),Se.size=Ae.read_shift(4,"i"),Se.size<0&&Se.start<0&&(Se.size=Se.type=0,Se.start=G,Se.name=""),Se.type===5?(te=Se.start,P>0&&te!==G&&(B[te].name="!StreamData")):Se.size>=4096?(Se.storage="fat",B[Se.start]===void 0&&(B[Se.start]=E(F,Se.start,B.fat_addrs,B.ssz)),B[Se.start].name=Se.name,Se.content=B[Se.start].data.slice(0,Se.size)):(Se.storage="minifat",Se.size<0?Se.size=0:te!==G&&Se.start!==G&&B[te]&&(Se.content=p(Se,B[te].data,(B[fe]||{}).data))),Se.content&&Br(Se.content,0),j[De]=Se,ne.push(Se)}}function S(C,B){return new Date((jr(C,B+4)/1e7*Math.pow(2,32)+jr(C,B)/1e7-11644473600)*1e3)}function I(C,B){return l(),u(c.readFileSync(C),B)}function U(C,B){var F=B&&B.type;switch(F||wt&&rt.isBuffer(C)&&(F="buffer"),F||"base64"){case"file":return I(C,B);case"base64":return u(on(Vn(C)),B);case"binary":return u(on(C),B)}return u(C,B)}function R(C,B){var F=B||{},k=F.root||"Root Entry";if(C.FullPaths||(C.FullPaths=[]),C.FileIndex||(C.FileIndex=[]),C.FullPaths.length!==C.FileIndex.length)throw new Error("inconsistent CFB structure");C.FullPaths.length===0&&(C.FullPaths[0]=k+"/",C.FileIndex[0]={name:k,type:5}),F.CLSID&&(C.FileIndex[0].clsid=F.CLSID),Y(C)}function Y(C){var B="Sh33tJ5";if(!St.find(C,"/"+B)){var F=ue(4);F[0]=55,F[1]=F[3]=50,F[2]=54,C.FileIndex.push({name:B,type:2,content:F,size:4,L:69,R:69,C:69}),C.FullPaths.push(C.FullPaths[0]+B),W(C)}}function W(C,B){R(C);for(var F=!1,k=!1,P=C.FullPaths.length-1;P>=0;--P){var j=C.FileIndex[P];switch(j.type){case 0:k?F=!0:(C.FileIndex.pop(),C.FullPaths.pop());break;case 1:case 2:case 5:k=!0,isNaN(j.R*j.L*j.C)&&(F=!0),j.R>-1&&j.L>-1&&j.R==j.L&&(F=!0);break;default:F=!0;break}}if(!(!F&&!B)){var ne=new Date(1987,1,19),fe=0,te=Object.create?Object.create(null):{},ie=[];for(P=0;P<C.FullPaths.length;++P)te[C.FullPaths[P]]=!0,C.FileIndex[P].type!==0&&ie.push([C.FullPaths[P],C.FileIndex[P]]);for(P=0;P<ie.length;++P){var oe=n(ie[P][0]);k=te[oe],k||(ie.push([oe,{name:i(oe).replace("/",""),type:1,clsid:q,ct:ne,mt:ne,content:null}]),te[oe]=!0)}for(ie.sort(function(De,Ae){return r(De[0],Ae[0])}),C.FullPaths=[],C.FileIndex=[],P=0;P<ie.length;++P)C.FullPaths[P]=ie[P][0],C.FileIndex[P]=ie[P][1];for(P=0;P<ie.length;++P){var he=C.FileIndex[P],Ie=C.FullPaths[P];if(he.name=i(Ie).replace("/",""),he.L=he.R=he.C=-(he.color=1),he.size=he.content?he.content.length:0,he.start=0,he.clsid=he.clsid||q,P===0)he.C=ie.length>1?1:-1,he.size=0,he.type=5;else if(Ie.slice(-1)=="/"){for(fe=P+1;fe<ie.length&&n(C.FullPaths[fe])!=Ie;++fe);for(he.C=fe>=ie.length?-1:fe,fe=P+1;fe<ie.length&&n(C.FullPaths[fe])!=n(Ie);++fe);he.R=fe>=ie.length?-1:fe,he.type=1}else n(C.FullPaths[P+1]||"")==n(Ie)&&(he.R=P+1),he.type=2}}}function Z(C,B){var F=B||{};if(F.fileType=="mad")return kn(C,F);switch(W(C),F.fileType){case"zip":return Yn(C,F)}var k=function(De){for(var Ae=0,Se=0,H=0;H<De.FileIndex.length;++H){var ce=De.FileIndex[H];if(ce.content){var we=ce.content.length;we>0&&(we<4096?Ae+=we+63>>6:Se+=we+511>>9)}}for(var Me=De.FullPaths.length+3>>2,qe=Ae+7>>3,gt=Ae+127>>7,ot=qe+Se+Me+gt,Je=ot+127>>7,Mt=Je<=109?0:Math.ceil((Je-109)/127);ot+Je+Mt+127>>7>Je;)Mt=++Je<=109?0:Math.ceil((Je-109)/127);var Kt=[1,Mt,Je,gt,Me,Se,Ae,0];return De.FileIndex[0].size=Ae<<6,Kt[7]=(De.FileIndex[0].start=Kt[0]+Kt[1]+Kt[2]+Kt[3]+Kt[4]+Kt[5])+(Kt[6]+7>>3),Kt}(C),P=ue(k[7]<<9),j=0,ne=0;{for(j=0;j<8;++j)P.write_shift(1,V[j]);for(j=0;j<8;++j)P.write_shift(2,0);for(P.write_shift(2,62),P.write_shift(2,3),P.write_shift(2,65534),P.write_shift(2,9),P.write_shift(2,6),j=0;j<3;++j)P.write_shift(2,0);for(P.write_shift(4,0),P.write_shift(4,k[2]),P.write_shift(4,k[0]+k[1]+k[2]+k[3]-1),P.write_shift(4,0),P.write_shift(4,4096),P.write_shift(4,k[3]?k[0]+k[1]+k[2]-1:G),P.write_shift(4,k[3]),P.write_shift(-4,k[1]?k[0]-1:G),P.write_shift(4,k[1]),j=0;j<109;++j)P.write_shift(-4,j<k[2]?k[1]+j:-1)}if(k[1])for(ne=0;ne<k[1];++ne){for(;j<236+ne*127;++j)P.write_shift(-4,j<k[2]?k[1]+j:-1);P.write_shift(-4,ne===k[1]-1?G:ne+1)}var fe=function(De){for(ne+=De;j<ne-1;++j)P.write_shift(-4,j+1);De&&(++j,P.write_shift(-4,G))};for(ne=j=0,ne+=k[1];j<ne;++j)P.write_shift(-4,re.DIFSECT);for(ne+=k[2];j<ne;++j)P.write_shift(-4,re.FATSECT);fe(k[3]),fe(k[4]);for(var te=0,ie=0,oe=C.FileIndex[0];te<C.FileIndex.length;++te)oe=C.FileIndex[te],oe.content&&(ie=oe.content.length,!(ie<4096)&&(oe.start=ne,fe(ie+511>>9)));for(fe(k[6]+7>>3);P.l&511;)P.write_shift(-4,re.ENDOFCHAIN);for(ne=j=0,te=0;te<C.FileIndex.length;++te)oe=C.FileIndex[te],oe.content&&(ie=oe.content.length,!(!ie||ie>=4096)&&(oe.start=ne,fe(ie+63>>6)));for(;P.l&511;)P.write_shift(-4,re.ENDOFCHAIN);for(j=0;j<k[4]<<2;++j){var he=C.FullPaths[j];if(!he||he.length===0){for(te=0;te<17;++te)P.write_shift(4,0);for(te=0;te<3;++te)P.write_shift(4,-1);for(te=0;te<12;++te)P.write_shift(4,0);continue}oe=C.FileIndex[j],j===0&&(oe.start=oe.size?oe.start-1:G);var Ie=j===0&&F.root||oe.name;if(ie=2*(Ie.length+1),P.write_shift(64,Ie,"utf16le"),P.write_shift(2,ie),P.write_shift(1,oe.type),P.write_shift(1,oe.color),P.write_shift(-4,oe.L),P.write_shift(-4,oe.R),P.write_shift(-4,oe.C),oe.clsid)P.write_shift(16,oe.clsid,"hex");else for(te=0;te<4;++te)P.write_shift(4,0);P.write_shift(4,oe.state||0),P.write_shift(4,0),P.write_shift(4,0),P.write_shift(4,0),P.write_shift(4,0),P.write_shift(4,oe.start),P.write_shift(4,oe.size),P.write_shift(4,0)}for(j=1;j<C.FileIndex.length;++j)if(oe=C.FileIndex[j],oe.size>=4096)if(P.l=oe.start+1<<9,wt&&rt.isBuffer(oe.content))oe.content.copy(P,P.l,0,oe.size),P.l+=oe.size+511&-512;else{for(te=0;te<oe.size;++te)P.write_shift(1,oe.content[te]);for(;te&511;++te)P.write_shift(1,0)}for(j=1;j<C.FileIndex.length;++j)if(oe=C.FileIndex[j],oe.size>0&&oe.size<4096)if(wt&&rt.isBuffer(oe.content))oe.content.copy(P,P.l,0,oe.size),P.l+=oe.size+63&-64;else{for(te=0;te<oe.size;++te)P.write_shift(1,oe.content[te]);for(;te&63;++te)P.write_shift(1,0)}if(wt)P.l=P.length;else for(;P.l<P.length;)P.write_shift(1,0);return P}function N(C,B){var F=C.FullPaths.map(function(te){return te.toUpperCase()}),k=F.map(function(te){var ie=te.split("/");return ie[ie.length-(te.slice(-1)=="/"?2:1)]}),P=!1;B.charCodeAt(0)===47?(P=!0,B=F[0].slice(0,-1)+B):P=B.indexOf("/")!==-1;var j=B.toUpperCase(),ne=P===!0?F.indexOf(j):k.indexOf(j);if(ne!==-1)return C.FileIndex[ne];var fe=!j.match(ps);for(j=j.replace(Ia,""),fe&&(j=j.replace(ps,"!")),ne=0;ne<F.length;++ne)if((fe?F[ne].replace(ps,"!"):F[ne]).replace(Ia,"")==j||(fe?k[ne].replace(ps,"!"):k[ne]).replace(Ia,"")==j)return C.FileIndex[ne];return null}var M=64,G=-2,b="d0cf11e0a1b11ae1",V=[208,207,17,224,161,177,26,225],q="00000000000000000000000000000000",re={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:G,FREESECT:-1,HEADER_SIGNATURE:b,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:q,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function le(C,B,F){l();var k=Z(C,F);c.writeFileSync(B,k)}function pe(C){for(var B=new Array(C.length),F=0;F<C.length;++F)B[F]=String.fromCharCode(C[F]);return B.join("")}function Ce(C,B){var F=Z(C,B);switch(B&&B.type||"buffer"){case"file":return l(),c.writeFileSync(B.filename,F),F;case"binary":return typeof F=="string"?F:pe(F);case"base64":return $a(typeof F=="string"?F:pe(F));case"buffer":if(wt)return rt.isBuffer(F)?F:Xn(F);case"array":return typeof F=="string"?on(F):F}return F}var Te;function O(C){try{var B=C.InflateRaw,F=new B;if(F._processChunk(new Uint8Array([3,0]),F._finishFlushFlag),F.bytesRead)Te=C;else throw new Error("zlib does not expose bytesRead")}catch(k){console.error("cannot use native zlib: "+(k.message||k))}}function K(C,B){if(!Te)return An(C,B);var F=Te.InflateRaw,k=new F,P=k._processChunk(C.slice(C.l),k._finishFlushFlag);return C.l+=k.bytesRead,P}function z(C){return Te?Te.deflateRawSync(C):pt(C)}var X=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ee=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],ye=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function xe(C){var B=(C<<1|C<<11)&139536|(C<<5|C<<15)&558144;return(B>>16|B>>8|B)&255}for(var me=typeof Uint8Array<"u",se=me?new Uint8Array(256):[],be=0;be<256;++be)se[be]=xe(be);function Le(C,B){var F=se[C&255];return B<=8?F>>>8-B:(F=F<<8|se[C>>8&255],B<=16?F>>>16-B:(F=F<<8|se[C>>16&255],F>>>24-B))}function Ye(C,B){var F=B&7,k=B>>>3;return(C[k]|(F<=6?0:C[k+1]<<8))>>>F&3}function We(C,B){var F=B&7,k=B>>>3;return(C[k]|(F<=5?0:C[k+1]<<8))>>>F&7}function ft(C,B){var F=B&7,k=B>>>3;return(C[k]|(F<=4?0:C[k+1]<<8))>>>F&15}function He(C,B){var F=B&7,k=B>>>3;return(C[k]|(F<=3?0:C[k+1]<<8))>>>F&31}function _e(C,B){var F=B&7,k=B>>>3;return(C[k]|(F<=1?0:C[k+1]<<8))>>>F&127}function Fe(C,B,F){var k=B&7,P=B>>>3,j=(1<<F)-1,ne=C[P]>>>k;return F<8-k||(ne|=C[P+1]<<8-k,F<16-k)||(ne|=C[P+2]<<16-k,F<24-k)||(ne|=C[P+3]<<24-k),ne&j}function Pe(C,B,F){var k=B&7,P=B>>>3;return k<=5?C[P]|=(F&7)<<k:(C[P]|=F<<k&255,C[P+1]=(F&7)>>8-k),B+3}function ge(C,B,F){var k=B&7,P=B>>>3;return F=(F&1)<<k,C[P]|=F,B+1}function Oe(C,B,F){var k=B&7,P=B>>>3;return F<<=k,C[P]|=F&255,F>>>=8,C[P+1]=F,B+8}function Qe(C,B,F){var k=B&7,P=B>>>3;return F<<=k,C[P]|=F&255,F>>>=8,C[P+1]=F&255,C[P+2]=F>>>8,B+16}function dt(C,B){var F=C.length,k=2*F>B?2*F:B+5,P=0;if(F>=B)return C;if(wt){var j=Gc(k);if(C.copy)C.copy(j);else for(;P<C.length;++P)j[P]=C[P];return j}else if(me){var ne=new Uint8Array(k);if(ne.set)ne.set(C);else for(;P<F;++P)ne[P]=C[P];return ne}return C.length=k,C}function st(C){for(var B=new Array(C),F=0;F<C;++F)B[F]=0;return B}function je(C,B,F){var k=1,P=0,j=0,ne=0,fe=0,te=C.length,ie=me?new Uint16Array(32):st(32);for(j=0;j<32;++j)ie[j]=0;for(j=te;j<F;++j)C[j]=0;te=C.length;var oe=me?new Uint16Array(te):st(te);for(j=0;j<te;++j)ie[P=C[j]]++,k<P&&(k=P),oe[j]=0;for(ie[0]=0,j=1;j<=k;++j)ie[j+16]=fe=fe+ie[j-1]<<1;for(j=0;j<te;++j)fe=C[j],fe!=0&&(oe[j]=ie[fe+16]++);var he=0;for(j=0;j<te;++j)if(he=C[j],he!=0)for(fe=Le(oe[j],k)>>k-he,ne=(1<<k+4-he)-1;ne>=0;--ne)B[fe|ne<<he]=he&15|j<<4;return k}var Nt=me?new Uint16Array(512):st(512),Be=me?new Uint16Array(32):st(32);if(!me){for(var Ze=0;Ze<512;++Ze)Nt[Ze]=0;for(Ze=0;Ze<32;++Ze)Be[Ze]=0}(function(){for(var C=[],B=0;B<32;B++)C.push(5);je(C,Be,32);var F=[];for(B=0;B<=143;B++)F.push(8);for(;B<=255;B++)F.push(9);for(;B<=279;B++)F.push(7);for(;B<=287;B++)F.push(8);je(F,Nt,288)})();var Ft=function(){for(var B=me?new Uint8Array(32768):[],F=0,k=0;F<ye.length-1;++F)for(;k<ye[F+1];++k)B[k]=F;for(;k<32768;++k)B[k]=29;var P=me?new Uint8Array(259):[];for(F=0,k=0;F<ee.length-1;++F)for(;k<ee[F+1];++k)P[k]=F;function j(fe,te){for(var ie=0;ie<fe.length;){var oe=Math.min(65535,fe.length-ie),he=ie+oe==fe.length;for(te.write_shift(1,+he),te.write_shift(2,oe),te.write_shift(2,~oe&65535);oe-- >0;)te[te.l++]=fe[ie++]}return te.l}function ne(fe,te){for(var ie=0,oe=0,he=me?new Uint16Array(32768):[];oe<fe.length;){var Ie=Math.min(65535,fe.length-oe);if(Ie<10){for(ie=Pe(te,ie,+(oe+Ie==fe.length)),ie&7&&(ie+=8-(ie&7)),te.l=ie/8|0,te.write_shift(2,Ie),te.write_shift(2,~Ie&65535);Ie-- >0;)te[te.l++]=fe[oe++];ie=te.l*8;continue}ie=Pe(te,ie,+(oe+Ie==fe.length)+2);for(var De=0;Ie-- >0;){var Ae=fe[oe];De=(De<<5^Ae)&32767;var Se=-1,H=0;if((Se=he[De])&&(Se|=oe&-32768,Se>oe&&(Se-=32768),Se<oe))for(;fe[Se+H]==fe[oe+H]&&H<250;)++H;if(H>2){Ae=P[H],Ae<=22?ie=Oe(te,ie,se[Ae+1]>>1)-1:(Oe(te,ie,3),ie+=5,Oe(te,ie,se[Ae-23]>>5),ie+=3);var ce=Ae<8?0:Ae-4>>2;ce>0&&(Qe(te,ie,H-ee[Ae]),ie+=ce),Ae=B[oe-Se],ie=Oe(te,ie,se[Ae]>>3),ie-=3;var we=Ae<4?0:Ae-2>>1;we>0&&(Qe(te,ie,oe-Se-ye[Ae]),ie+=we);for(var Me=0;Me<H;++Me)he[De]=oe&32767,De=(De<<5^fe[oe])&32767,++oe;Ie-=H-1}else Ae<=143?Ae=Ae+48:ie=ge(te,ie,1),ie=Oe(te,ie,se[Ae]),he[De]=oe&32767,++oe}ie=Oe(te,ie,0)-1}return te.l=(ie+7)/8|0,te.l}return function(te,ie){return te.length<8?j(te,ie):ne(te,ie)}}();function pt(C){var B=ue(50+Math.floor(C.length*1.1)),F=Ft(C,B);return B.slice(0,F)}var zt=me?new Uint16Array(32768):st(32768),It=me?new Uint16Array(32768):st(32768),$e=me?new Uint16Array(128):st(128),Zt=1,y=1;function nt(C,B){var F=He(C,B)+257;B+=5;var k=He(C,B)+1;B+=5;var P=ft(C,B)+4;B+=4;for(var j=0,ne=me?new Uint8Array(19):st(19),fe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],te=1,ie=me?new Uint8Array(8):st(8),oe=me?new Uint8Array(8):st(8),he=ne.length,Ie=0;Ie<P;++Ie)ne[X[Ie]]=j=We(C,B),te<j&&(te=j),ie[j]++,B+=3;var De=0;for(ie[0]=0,Ie=1;Ie<=te;++Ie)oe[Ie]=De=De+ie[Ie-1]<<1;for(Ie=0;Ie<he;++Ie)(De=ne[Ie])!=0&&(fe[Ie]=oe[De]++);var Ae=0;for(Ie=0;Ie<he;++Ie)if(Ae=ne[Ie],Ae!=0){De=se[fe[Ie]]>>8-Ae;for(var Se=(1<<7-Ae)-1;Se>=0;--Se)$e[De|Se<<Ae]=Ae&7|Ie<<3}var H=[];for(te=1;H.length<F+k;)switch(De=$e[_e(C,B)],B+=De&7,De>>>=3){case 16:for(j=3+Ye(C,B),B+=2,De=H[H.length-1];j-- >0;)H.push(De);break;case 17:for(j=3+We(C,B),B+=3;j-- >0;)H.push(0);break;case 18:for(j=11+_e(C,B),B+=7;j-- >0;)H.push(0);break;default:H.push(De),te<De&&(te=De);break}var ce=H.slice(0,F),we=H.slice(F);for(Ie=F;Ie<286;++Ie)ce[Ie]=0;for(Ie=k;Ie<30;++Ie)we[Ie]=0;return Zt=je(ce,zt,286),y=je(we,It,30),B}function ui(C,B){if(C[0]==3&&!(C[1]&3))return[Ti(B),2];for(var F=0,k=0,P=Gc(B||1<<18),j=0,ne=P.length>>>0,fe=0,te=0;!(k&1);){if(k=We(C,F),F+=3,k>>>1)k>>1==1?(fe=9,te=5):(F=nt(C,F),fe=Zt,te=y);else{F&7&&(F+=8-(F&7));var ie=C[F>>>3]|C[(F>>>3)+1]<<8;if(F+=32,ie>0)for(!B&&ne<j+ie&&(P=dt(P,j+ie),ne=P.length);ie-- >0;)P[j++]=C[F>>>3],F+=8;continue}for(;;){!B&&ne<j+32767&&(P=dt(P,j+32767),ne=P.length);var oe=Fe(C,F,fe),he=k>>>1==1?Nt[oe]:zt[oe];if(F+=he&15,he>>>=4,!(he>>>8&255))P[j++]=he;else{if(he==256)break;he-=257;var Ie=he<8?0:he-4>>2;Ie>5&&(Ie=0);var De=j+ee[he];Ie>0&&(De+=Fe(C,F,Ie),F+=Ie),oe=Fe(C,F,te),he=k>>>1==1?Be[oe]:It[oe],F+=he&15,he>>>=4;var Ae=he<4?0:he-2>>1,Se=ye[he];for(Ae>0&&(Se+=Fe(C,F,Ae),F+=Ae),!B&&ne<De&&(P=dt(P,De+100),ne=P.length);j<De;)P[j]=P[j-Se],++j}}}return B?[P,F+7>>>3]:[P.slice(0,j),F+7>>>3]}function An(C,B){var F=C.slice(C.l||0),k=ui(F,B);return C.l+=k[1],k[0]}function Cn(C,B){if(C)typeof console<"u"&&console.error(B);else throw new Error(B)}function Tn(C,B){var F=C;Br(F,0);var k=[],P=[],j={FileIndex:k,FullPaths:P};R(j,{root:B.root});for(var ne=F.length-4;(F[ne]!=80||F[ne+1]!=75||F[ne+2]!=5||F[ne+3]!=6)&&ne>=0;)--ne;F.l=ne+4,F.l+=4;var fe=F.read_shift(2);F.l+=6;var te=F.read_shift(4);for(F.l=te,ne=0;ne<fe;++ne){F.l+=20;var ie=F.read_shift(4),oe=F.read_shift(4),he=F.read_shift(2),Ie=F.read_shift(2),De=F.read_shift(2);F.l+=8;var Ae=F.read_shift(4),Se=o(F.slice(F.l+he,F.l+he+Ie));F.l+=he+Ie+De;var H=F.l;F.l=Ae+4,Kn(F,ie,oe,j,Se),F.l=H}return j}function Kn(C,B,F,k,P){C.l+=2;var j=C.read_shift(2),ne=C.read_shift(2),fe=s(C);if(j&8257)throw new Error("Unsupported ZIP encryption");for(var te=C.read_shift(4),ie=C.read_shift(4),oe=C.read_shift(4),he=C.read_shift(2),Ie=C.read_shift(2),De="",Ae=0;Ae<he;++Ae)De+=String.fromCharCode(C[C.l++]);if(Ie){var Se=o(C.slice(C.l,C.l+Ie));(Se[21589]||{}).mt&&(fe=Se[21589].mt),((P||{})[21589]||{}).mt&&(fe=P[21589].mt)}C.l+=Ie;var H=C.slice(C.l,C.l+ie);switch(ne){case 8:H=K(C,oe);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+ne)}var ce=!1;j&8&&(te=C.read_shift(4),te==134695760&&(te=C.read_shift(4),ce=!0),ie=C.read_shift(4),oe=C.read_shift(4)),ie!=B&&Cn(ce,"Bad compressed size: "+B+" != "+ie),oe!=F&&Cn(ce,"Bad uncompressed size: "+F+" != "+oe),Ge(k,De,H,{unsafe:!0,mt:fe})}function Yn(C,B){var F=B||{},k=[],P=[],j=ue(1),ne=F.compression?8:0,fe=0,te=0,ie=0,oe=0,he=0,Ie=C.FullPaths[0],De=Ie,Ae=C.FileIndex[0],Se=[],H=0;for(te=1;te<C.FullPaths.length;++te)if(De=C.FullPaths[te].slice(Ie.length),Ae=C.FileIndex[te],!(!Ae.size||!Ae.content||De=="Sh33tJ5")){var ce=oe,we=ue(De.length);for(ie=0;ie<De.length;++ie)we.write_shift(1,De.charCodeAt(ie)&127);we=we.slice(0,we.l),Se[he]=wp.buf(Ae.content,0);var Me=Ae.content;ne==8&&(Me=z(Me)),j=ue(30),j.write_shift(4,67324752),j.write_shift(2,20),j.write_shift(2,fe),j.write_shift(2,ne),Ae.mt?a(j,Ae.mt):j.write_shift(4,0),j.write_shift(-4,Se[he]),j.write_shift(4,Me.length),j.write_shift(4,Ae.content.length),j.write_shift(2,we.length),j.write_shift(2,0),oe+=j.length,k.push(j),oe+=we.length,k.push(we),oe+=Me.length,k.push(Me),j=ue(46),j.write_shift(4,33639248),j.write_shift(2,0),j.write_shift(2,20),j.write_shift(2,fe),j.write_shift(2,ne),j.write_shift(4,0),j.write_shift(-4,Se[he]),j.write_shift(4,Me.length),j.write_shift(4,Ae.content.length),j.write_shift(2,we.length),j.write_shift(2,0),j.write_shift(2,0),j.write_shift(2,0),j.write_shift(2,0),j.write_shift(4,0),j.write_shift(4,ce),H+=j.l,P.push(j),H+=we.length,P.push(we),++he}return j=ue(22),j.write_shift(4,101010256),j.write_shift(2,0),j.write_shift(2,0),j.write_shift(2,he),j.write_shift(2,he),j.write_shift(4,H),j.write_shift(4,oe),j.write_shift(2,0),cr([cr(k),cr(P),j])}var Ur={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function qn(C,B){if(C.ctype)return C.ctype;var F=C.name||"",k=F.match(/\.([^\.]+)$/);return k&&Ur[k[1]]||B&&(k=(F=B).match(/[\.\\]([^\.\\])+$/),k&&Ur[k[1]])?Ur[k[1]]:"application/octet-stream"}function Sn(C){for(var B=$a(C),F=[],k=0;k<B.length;k+=76)F.push(B.slice(k,k+76));return F.join(`\r
`)+`\r
`}function qr(C){var B=C.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(ie){var oe=ie.charCodeAt(0).toString(16).toUpperCase();return"="+(oe.length==1?"0"+oe:oe)});B=B.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),B.charAt(0)==`
`&&(B="=0D"+B.slice(1)),B=B.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var F=[],k=B.split(`\r
`),P=0;P<k.length;++P){var j=k[P];if(j.length==0){F.push("");continue}for(var ne=0;ne<j.length;){var fe=76,te=j.slice(ne,ne+fe);te.charAt(fe-1)=="="?fe--:te.charAt(fe-2)=="="?fe-=2:te.charAt(fe-3)=="="&&(fe-=3),te=j.slice(ne,ne+fe),ne+=fe,ne<j.length&&(te+="="),F.push(te)}}return F.join(`\r
`)}function Fn(C){for(var B=[],F=0;F<C.length;++F){for(var k=C[F];F<=C.length&&k.charAt(k.length-1)=="=";)k=k.slice(0,k.length-1)+C[++F];B.push(k)}for(var P=0;P<B.length;++P)B[P]=B[P].replace(/[=][0-9A-Fa-f]{2}/g,function(j){return String.fromCharCode(parseInt(j.slice(1),16))});return on(B.join(`\r
`))}function Jn(C,B,F){for(var k="",P="",j="",ne,fe=0;fe<10;++fe){var te=B[fe];if(!te||te.match(/^\s*$/))break;var ie=te.match(/^(.*?):\s*([^\s].*)$/);if(ie)switch(ie[1].toLowerCase()){case"content-location":k=ie[2].trim();break;case"content-type":j=ie[2].trim();break;case"content-transfer-encoding":P=ie[2].trim();break}}switch(++fe,P.toLowerCase()){case"base64":ne=on(Vn(B.slice(fe).join("")));break;case"quoted-printable":ne=Fn(B.slice(fe));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+P)}var oe=Ge(C,k.slice(F.length),ne,{unsafe:!0});j&&(oe.ctype=j)}function bn(C,B){if(pe(C.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var F=B&&B.root||"",k=(wt&&rt.isBuffer(C)?C.toString("binary"):pe(C)).split(`\r
`),P=0,j="";for(P=0;P<k.length;++P)if(j=k[P],!!/^Content-Location:/i.test(j)&&(j=j.slice(j.indexOf("file")),F||(F=j.slice(0,j.lastIndexOf("/")+1)),j.slice(0,F.length)!=F))for(;F.length>0&&(F=F.slice(0,F.length-1),F=F.slice(0,F.lastIndexOf("/")+1),j.slice(0,F.length)!=F););var ne=(k[1]||"").match(/boundary="(.*?)"/);if(!ne)throw new Error("MAD cannot find boundary");var fe="--"+(ne[1]||""),te=[],ie=[],oe={FileIndex:te,FullPaths:ie};R(oe);var he,Ie=0;for(P=0;P<k.length;++P){var De=k[P];De!==fe&&De!==fe+"--"||(Ie++&&Jn(oe,k.slice(he,P),F),he=P)}return oe}function kn(C,B){var F=B||{},k=F.boundary||"SheetJS";k="------="+k;for(var P=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+k.slice(2)+'"',"","",""],j=C.FullPaths[0],ne=j,fe=C.FileIndex[0],te=1;te<C.FullPaths.length;++te)if(ne=C.FullPaths[te].slice(j.length),fe=C.FileIndex[te],!(!fe.size||!fe.content||ne=="Sh33tJ5")){ne=ne.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(H){return"_x"+H.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(H){return"_u"+H.charCodeAt(0).toString(16)+"_"});for(var ie=fe.content,oe=wt&&rt.isBuffer(ie)?ie.toString("binary"):pe(ie),he=0,Ie=Math.min(1024,oe.length),De=0,Ae=0;Ae<=Ie;++Ae)(De=oe.charCodeAt(Ae))>=32&&De<128&&++he;var Se=he>=Ie*4/5;P.push(k),P.push("Content-Location: "+(F.root||"file:///C:/SheetJS/")+ne),P.push("Content-Transfer-Encoding: "+(Se?"quoted-printable":"base64")),P.push("Content-Type: "+qn(fe,ne)),P.push(""),P.push(Se?qr(oe):Sn(oe))}return P.push(k+`--\r
`),P.join(`\r
`)}function Nn(C){var B={};return R(B,C),B}function Ge(C,B,F,k){var P=k&&k.unsafe;P||R(C);var j=!P&&St.find(C,B);if(!j){var ne=C.FullPaths[0];B.slice(0,ne.length)==ne?ne=B:(ne.slice(-1)!="/"&&(ne+="/"),ne=(ne+B).replace("//","/")),j={name:i(B),type:2},C.FileIndex.push(j),C.FullPaths.push(ne),P||St.utils.cfb_gc(C)}return j.content=F,j.size=F?F.length:0,k&&(k.CLSID&&(j.clsid=k.CLSID),k.mt&&(j.mt=k.mt),k.ct&&(j.ct=k.ct)),j}function bt(C,B){R(C);var F=St.find(C,B);if(F){for(var k=0;k<C.FileIndex.length;++k)if(C.FileIndex[k]==F)return C.FileIndex.splice(k,1),C.FullPaths.splice(k,1),!0}return!1}function Dr(C,B,F){R(C);var k=St.find(C,B);if(k){for(var P=0;P<C.FileIndex.length;++P)if(C.FileIndex[P]==k)return C.FileIndex[P].name=i(F),C.FullPaths[P]=F,!0}return!1}function hn(C){W(C,!0)}return t.find=N,t.read=U,t.parse=u,t.write=Ce,t.writeFile=le,t.utils={cfb_new:Nn,cfb_add:Ge,cfb_del:bt,cfb_mov:Dr,cfb_gc:hn,ReadShift:Ba,CheckField:Ef,prep_blob:Br,bconcat:cr,use_zlib:O,_deflateRaw:pt,_inflateRaw:An,consts:re},t}();function yp(e){return typeof e=="string"?_o(e):Array.isArray(e)?K1(e):e}function ts(e,t,r){if(typeof Deno<"u"){if(r&&typeof t=="string")switch(r){case"utf8":t=new TextEncoder(r).encode(t);break;case"binary":t=_o(t);break;default:throw new Error("Unsupported encoding "+r)}return Deno.writeFileSync(e,t)}var n=r=="utf8"?Xa(t):t;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var i=new Blob([yp(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(i,e);if(typeof saveAs<"u")return saveAs(i,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var a=URL.createObjectURL(i);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(a)},6e4),chrome.downloads.download({url:a,filename:e,saveAs:!0});var s=document.createElement("a");if(s.download!=null)return s.download=e,s.href=a,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(a)},6e4),a}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var o=File(e);return o.open("w"),o.encoding="binary",Array.isArray(t)&&(t=es(t)),o.write(t),o.close(),t}catch(c){if(!c.message||!c.message.match(/onstruct/))throw c}throw new Error("cannot save file "+e)}function hr(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;++n)Object.prototype.hasOwnProperty.call(e,t[n])&&r.push(t[n]);return r}function eu(e,t){for(var r=[],n=hr(e),i=0;i!==n.length;++i)r[e[n[i]][t]]==null&&(r[e[n[i]][t]]=n[i]);return r}function Hl(e){for(var t=[],r=hr(e),n=0;n!==r.length;++n)t[e[r[n]]]=r[n];return t}function yo(e){for(var t=[],r=hr(e),n=0;n!==r.length;++n)t[e[r[n]]]=parseInt(r[n],10);return t}function Dp(e){for(var t=[],r=hr(e),n=0;n!==r.length;++n)t[e[r[n]]]==null&&(t[e[r[n]]]=[]),t[e[r[n]]].push(r[n]);return t}var Ys=new Date(1899,11,30,0,0,0);function br(e,t){var r=e.getTime(),n=Ys.getTime()+(e.getTimezoneOffset()-Ys.getTimezoneOffset())*6e4;return(r-n)/(24*60*60*1e3)}var rf=new Date,Ap=Ys.getTime()+(rf.getTimezoneOffset()-Ys.getTimezoneOffset())*6e4,tu=rf.getTimezoneOffset();function nf(e){var t=new Date;return t.setTime(e*24*60*60*1e3+Ap),t.getTimezoneOffset()!==tu&&t.setTime(t.getTime()+(t.getTimezoneOffset()-tu)*6e4),t}var ru=new Date("2017-02-19T19:06:09.000Z"),af=isNaN(ru.getFullYear())?new Date("2/19/17"):ru,Cp=af.getFullYear()==2017;function wr(e,t){var r=new Date(e);if(Cp)return t>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):t<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(e instanceof Date)return e;if(af.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return e.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var i=e.match(/\d+/g)||["2017","2","19","0","0","0"],a=new Date(+i[0],+i[1]-1,+i[2],+i[3]||0,+i[4]||0,+i[5]||0);return e.indexOf("Z")>-1&&(a=new Date(a.getTime()-a.getTimezoneOffset()*60*1e3)),a}function Do(e,t){if(wt&&rt.isBuffer(e))return e.toString("binary");if(typeof TextDecoder<"u")try{var r={"€":"€","‚":"‚",ƒ:"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰",Š:"Š","‹":"‹",Œ:"Œ",Ž:"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™",š:"š","›":"›",œ:"œ",ž:"ž",Ÿ:"Ÿ"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(a){return r[a]||a})}catch{}for(var n=[],i=0;i!=e.length;++i)n.push(String.fromCharCode(e[i]));return n.join("")}function kr(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 t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=kr(e[r]));return t}function Ut(e,t){for(var r="";r.length<t;)r+=e;return r}function Un(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,n=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return!isNaN(t=Number(n))||(n=n.replace(/[(](.*)[)]/,function(i,a){return r=-r,a}),!isNaN(t=Number(n)))?t/r:t}var Tp=["january","february","march","april","may","june","july","august","september","october","november","december"];function Ga(e){var t=new Date(e),r=new Date(NaN),n=t.getYear(),i=t.getMonth(),a=t.getDate();if(isNaN(a))return r;var s=e.toLowerCase();if(s.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(s=s.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),s.length>3&&Tp.indexOf(s)==-1)return r}else if(s.match(/[a-z]/))return r;return n<0||n>8099?r:(i>0||a>1)&&n!=101?t:e.match(/[^-0-9:,\/\\]/)?r:t}function at(e,t,r){if(e.FullPaths){if(typeof r=="string"){var n;return wt?n=Xn(r):n=Y1(r),St.utils.cfb_add(e,t,n)}St.utils.cfb_add(e,t,r)}else e.file(t,r)}function $l(){return St.utils.cfb_new()}var Xt=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
`,Sp={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},Gl=Hl(Sp),Xl=/[&<>'"]/g,Fp=/[\u0000-\u0008\u000b-\u001f]/g;function Ct(e){var t=e+"";return t.replace(Xl,function(r){return Gl[r]}).replace(Fp,function(r){return"_x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+"_"})}function nu(e){return Ct(e).replace(/ /g,"_x0020_")}var sf=/[\u0000-\u001f]/g;function bp(e){var t=e+"";return t.replace(Xl,function(r){return Gl[r]}).replace(/\n/g,"<br/>").replace(sf,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}function kp(e){var t=e+"";return t.replace(Xl,function(r){return Gl[r]}).replace(sf,function(r){return"&#x"+r.charCodeAt(0).toString(16).toUpperCase()+";"})}function Np(e){return e.replace(/(\r\n|[\r\n])/g,"&#10;")}function Ip(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function Wo(e){for(var t="",r=0,n=0,i=0,a=0,s=0,o=0;r<e.length;){if(n=e.charCodeAt(r++),n<128){t+=String.fromCharCode(n);continue}if(i=e.charCodeAt(r++),n>191&&n<224){s=(n&31)<<6,s|=i&63,t+=String.fromCharCode(s);continue}if(a=e.charCodeAt(r++),n<240){t+=String.fromCharCode((n&15)<<12|(i&63)<<6|a&63);continue}s=e.charCodeAt(r++),o=((n&7)<<18|(i&63)<<12|(a&63)<<6|s&63)-65536,t+=String.fromCharCode(55296+(o>>>10&1023)),t+=String.fromCharCode(56320+(o&1023))}return t}function iu(e){var t=Ti(2*e.length),r,n,i=1,a=0,s=0,o;for(n=0;n<e.length;n+=i)i=1,(o=e.charCodeAt(n))<128?r=o:o<224?(r=(o&31)*64+(e.charCodeAt(n+1)&63),i=2):o<240?(r=(o&15)*4096+(e.charCodeAt(n+1)&63)*64+(e.charCodeAt(n+2)&63),i=3):(i=4,r=(o&7)*262144+(e.charCodeAt(n+1)&63)*4096+(e.charCodeAt(n+2)&63)*64+(e.charCodeAt(n+3)&63),r-=65536,s=55296+(r>>>10&1023),r=56320+(r&1023)),s!==0&&(t[a++]=s&255,t[a++]=s>>>8,s=0),t[a++]=r%256,t[a++]=r>>>8;return t.slice(0,a).toString("ucs2")}function au(e){return Xn(e,"binary").toString("utf8")}var gs="foo bar baz☃🍣",Oa=wt&&(au(gs)==Wo(gs)&&au||iu(gs)==Wo(gs)&&iu)||Wo,Xa=wt?function(e){return Xn(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,i=0;r<e.length;)switch(n=e.charCodeAt(r++),!0){case n<128:t.push(String.fromCharCode(n));break;case n<2048:t.push(String.fromCharCode(192+(n>>6))),t.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,i=e.charCodeAt(r++)-56320+(n<<10),t.push(String.fromCharCode(240+(i>>18&7))),t.push(String.fromCharCode(144+(i>>12&63))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(i&63)));break;default:t.push(String.fromCharCode(224+(n>>12))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(n&63)))}return t.join("")},Op=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
`).replace(/<[^>]*>/g,""),i=0;i<e.length;++i)n=n.replace(e[i][0],e[i][1]);return n}}(),of=/(^\s|\s$|\n)/;function ur(e,t){return"<"+e+(t.match(of)?' xml:space="preserve"':"")+">"+t+"</"+e+">"}function Ka(e){return hr(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function ke(e,t,r){return"<"+e+(r!=null?Ka(r):"")+(t!=null?(t.match(of)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function pl(e,t){try{return e.toISOString().replace(/\.\d*/,"")}catch(r){if(t)throw r}return""}function Bp(e,t){switch(typeof e){case"string":var r=ke("vt:lpwstr",Ct(e));return r=r.replace(/&quot;/g,"_x0022_"),r;case"number":return ke((e|0)==e?"vt:i4":"vt:r8",Ct(String(e)));case"boolean":return ke("vt:bool",e?"true":"false")}if(e instanceof Date)return ke("vt:filetime",pl(e));throw new Error("Unable to serialize "+e)}var rr={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"},ha=["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"],Pr={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"};function Pp(e,t){for(var r=1-2*(e[t+7]>>>7),n=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),i=e[t+6]&15,a=5;a>=0;--a)i=i*256+e[t+a];return n==2047?i==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,i+=Math.pow(2,52)),r*Math.pow(2,n-52)*i)}function jp(e,t,r){var n=(t<0||1/t==-1/0?1:0)<<7,i=0,a=0,s=n?-t:t;isFinite(s)?s==0?i=a=0:(i=Math.floor(Math.log(s)/Math.LN2),a=s*Math.pow(2,52-i),i<=-1023&&(!isFinite(a)||a<Math.pow(2,52))?i=-1022:(a-=Math.pow(2,52),i+=1023)):(i=2047,a=isNaN(t)?26985:0);for(var o=0;o<=5;++o,a/=256)e[r+o]=a&255;e[r+6]=(i&15)<<4|a&15,e[r+7]=i>>4|n}var su=function(e){for(var t=[],r=10240,n=0;n<e[0].length;++n)if(e[0][n])for(var i=0,a=e[0][n].length;i<a;i+=r)t.push.apply(t,e[0][n].slice(i,i+r));return t},ou=wt?function(e){return e[0].length>0&&rt.isBuffer(e[0][0])?rt.concat(e[0].map(function(t){return rt.isBuffer(t)?t:Xn(t)})):su(e)}:su,lu=function(e,t,r){for(var n=[],i=t;i<r;i+=2)n.push(String.fromCharCode(Aa(e,i)));return n.join("").replace(Ia,"")},Kl=wt?function(e,t,r){return rt.isBuffer(e)?e.toString("utf16le",t,r).replace(Ia,""):lu(e,t,r)}:lu,cu=function(e,t,r){for(var n=[],i=t;i<t+r;++i)n.push(("0"+e[i].toString(16)).slice(-2));return n.join("")},lf=wt?function(e,t,r){return rt.isBuffer(e)?e.toString("hex",t,t+r):cu(e,t,r)}:cu,uu=function(e,t,r){for(var n=[],i=t;i<r;i++)n.push(String.fromCharCode(qi(e,i)));return n.join("")},rs=wt?function(t,r,n){return rt.isBuffer(t)?t.toString("utf8",r,n):uu(t,r,n)}:uu,cf=function(e,t){var r=jr(e,t);return r>0?rs(e,t+4,t+4+r-1):""},uf=cf,ff=function(e,t){var r=jr(e,t);return r>0?rs(e,t+4,t+4+r-1):""},hf=ff,df=function(e,t){var r=2*jr(e,t);return r>0?rs(e,t+4,t+4+r-1):""},pf=df,mf=function(t,r){var n=jr(t,r);return n>0?Kl(t,r+4,r+4+n):""},gf=mf,xf=function(e,t){var r=jr(e,t);return r>0?rs(e,t+4,t+4+r):""},vf=xf,_f=function(e,t){return Pp(e,t)},qs=_f,Yl=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};wt&&(uf=function(t,r){if(!rt.isBuffer(t))return cf(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},hf=function(t,r){if(!rt.isBuffer(t))return ff(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},pf=function(t,r){if(!rt.isBuffer(t))return df(t,r);var n=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n-1)},gf=function(t,r){if(!rt.isBuffer(t))return mf(t,r);var n=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n)},vf=function(t,r){if(!rt.isBuffer(t))return xf(t,r);var n=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+n)},qs=function(t,r){return rt.isBuffer(t)?t.readDoubleLE(r):_f(t,r)},Yl=function(t){return rt.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var qi=function(e,t){return e[t]},Aa=function(e,t){return e[t+1]*256+e[t]},Rp=function(e,t){var r=e[t+1]*256+e[t];return r<32768?r:(65535-r+1)*-1},jr=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},Ei=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},Lp=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function Ba(e,t){var r="",n,i,a=[],s,o,c,l;switch(t){case"dbcs":if(l=this.l,wt&&rt.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(c=0;c<e;++c)r+=String.fromCharCode(Aa(this,l)),l+=2;e*=2;break;case"utf8":r=rs(this,this.l,this.l+e);break;case"utf16le":e*=2,r=Kl(this,this.l,this.l+e);break;case"wstr":return Ba.call(this,e,"dbcs");case"lpstr-ansi":r=uf(this,this.l),e=4+jr(this,this.l);break;case"lpstr-cp":r=hf(this,this.l),e=4+jr(this,this.l);break;case"lpwstr":r=pf(this,this.l),e=4+2*jr(this,this.l);break;case"lpp4":e=4+jr(this,this.l),r=gf(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+jr(this,this.l),r=vf(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,r="";(s=qi(this,this.l+e++))!==0;)a.push(ds(s));r=a.join("");break;case"_wstr":for(e=0,r="";(s=Aa(this,this.l+e))!==0;)a.push(ds(s)),e+=2;e+=2,r=a.join("");break;case"dbcs-cont":for(r="",l=this.l,c=0;c<e;++c){if(this.lens&&this.lens.indexOf(l)!==-1)return s=qi(this,l),this.l=l+1,o=Ba.call(this,e-c,s?"dbcs-cont":"sbcs-cont"),a.join("")+o;a.push(ds(Aa(this,l))),l+=2}r=a.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(r="",l=this.l,c=0;c!=e;++c){if(this.lens&&this.lens.indexOf(l)!==-1)return s=qi(this,l),this.l=l+1,o=Ba.call(this,e-c,s?"dbcs-cont":"sbcs-cont"),a.join("")+o;a.push(ds(qi(this,l))),l+=1}r=a.join("");break;default:switch(e){case 1:return n=qi(this,this.l),this.l++,n;case 2:return n=(t==="i"?Rp:Aa)(this,this.l),this.l+=2,n;case 4:case-4:return t==="i"||!(this[this.l+3]&128)?(n=(e>0?Ei:Lp)(this,this.l),this.l+=4,n):(i=jr(this,this.l),this.l+=4,i);case 8:case-8:if(t==="f")return e==8?i=qs(this,this.l):i=qs([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,i;e=8;case 16:r=lf(this,this.l,e);break}}return this.l+=e,r}var Mp=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255},Up=function(e,t,r){e[r]=t&255,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},Wp=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255};function zp(e,t,r){var n=0,i=0;if(r==="dbcs"){for(i=0;i!=t.length;++i)Wp(this,t.charCodeAt(i),this.l+2*i);n=2*t.length}else if(r==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),i=0;i!=t.length;++i)this[this.l+i]=t.charCodeAt(i)&255;n=t.length}else if(r==="hex"){for(;i<e;++i)this[this.l++]=parseInt(t.slice(2*i,2*i+2),16)||0;return this}else if(r==="utf16le"){var a=Math.min(this.l+e,this.length);for(i=0;i<Math.min(t.length,e);++i){var s=t.charCodeAt(i);this[this.l++]=s&255,this[this.l++]=s>>8}for(;this.l<a;)this[this.l++]=0;return this}else switch(e){case 1:n=1,this[this.l]=t&255;break;case 2:n=2,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255;break;case 3:n=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:n=4,Mp(this,t,this.l);break;case 8:if(n=8,r==="f"){jp(this,t,this.l);break}case 16:break;case-4:n=4,Up(this,t,this.l);break}return this.l+=n,this}function Ef(e,t){var r=lf(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function Br(e,t){e.l=t,e.read_shift=Ba,e.chk=Ef,e.write_shift=zp}function En(e,t){e.l+=t}function ue(e){var t=Ti(e);return Br(t,0),t}function Fr(){var e=[],t=wt?256:2048,r=function(l){var u=ue(l);return Br(u,0),u},n=r(t),i=function(){n&&(n.length>n.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&e.push(n),n=null)},a=function(l){return n&&l<n.length-n.l?n:(i(),n=r(Math.max(l+1,t)))},s=function(){return i(),cr(e)},o=function(l){i(),n=l,n.l==null&&(n.l=n.length),a(t)};return{next:a,push:o,end:s,_bufs:e}}function Ee(e,t,r,n){var i=+t,a;if(!isNaN(i)){n||(n=P2[i].p||(r||[]).length||0),a=1+(i>=128?1:0)+1,n>=128&&++a,n>=16384&&++a,n>=2097152&&++a;var s=e.next(a);i<=127?s.write_shift(1,i):(s.write_shift(1,(i&127)+128),s.write_shift(1,i>>7));for(var o=0;o!=4;++o)if(n>=128)s.write_shift(1,(n&127)+128),n>>=7;else{s.write_shift(1,n);break}n>0&&Yl(r)&&e.push(r)}}function Pa(e,t,r){var n=kr(e);if(t.s?(n.cRel&&(n.c+=t.s.c),n.rRel&&(n.r+=t.s.r)):(n.cRel&&(n.c+=t.c),n.rRel&&(n.r+=t.r)),!r||r.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function fu(e,t,r){var n=kr(e);return n.s=Pa(n.s,t.s,r),n.e=Pa(n.e,t.s,r),n}function ja(e,t){if(e.cRel&&e.c<0)for(e=kr(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=kr(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=Tt(e);return!e.cRel&&e.cRel!=null&&(r=$p(r)),!e.rRel&&e.rRel!=null&&(r=Vp(r)),r}function zo(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+pr(e.s.c)+":"+(e.e.cRel?"":"$")+pr(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+fr(e.s.r)+":"+(e.e.rRel?"":"$")+fr(e.e.r):ja(e.s,t.biff)+":"+ja(e.e,t.biff)}function ql(e){return parseInt(Hp(e),10)-1}function fr(e){return""+(e+1)}function Vp(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function Hp(e){return e.replace(/\$(\d+)$/,"$1")}function Jl(e){for(var t=Gp(e),r=0,n=0;n!==t.length;++n)r=26*r+t.charCodeAt(n)-64;return r-1}function pr(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function $p(e){return e.replace(/^([A-Z])/,"$$$1")}function Gp(e){return e.replace(/^\$([A-Z])/,"$1")}function Xp(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function nr(e){for(var t=0,r=0,n=0;n<e.length;++n){var i=e.charCodeAt(n);i>=48&&i<=57?t=10*t+(i-48):i>=65&&i<=90&&(r=26*r+(i-64))}return{c:r-1,r:t-1}}function Tt(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function Mr(e){var t=e.indexOf(":");return t==-1?{s:nr(e),e:nr(e)}:{s:nr(e.slice(0,t)),e:nr(e.slice(t+1))}}function Gt(e,t){return typeof t>"u"||typeof t=="number"?Gt(e.s,e.e):(typeof e!="string"&&(e=Tt(e)),typeof t!="string"&&(t=Tt(t)),e==t?e:e+":"+t)}function jt(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,n=0,i=0,a=e.length;for(r=0;n<a&&!((i=e.charCodeAt(n)-64)<1||i>26);++n)r=26*r+i;for(t.s.c=--r,r=0;n<a&&!((i=e.charCodeAt(n)-48)<0||i>9);++n)r=10*r+i;if(t.s.r=--r,n===a||i!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++n,r=0;n!=a&&!((i=e.charCodeAt(n)-64)<1||i>26);++n)r=26*r+i;for(t.e.c=--r,r=0;n!=a&&!((i=e.charCodeAt(n)-48)<0||i>9);++n)r=10*r+i;return t.e.r=--r,t}function hu(e,t){var r=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=ai(e.z,r?br(t):t)}catch{}try{return e.w=ai((e.XF||{}).numFmtId||(r?14:0),r?br(t):t)}catch{return""+t}}function Hn(e,t,r){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),e.t=="e"?ns[e.v]||e.v:t==null?hu(e,e.v):hu(e,t))}function Bi(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",n={};return n[r]=e,{SheetNames:[r],Sheets:n}}function wf(e,t,r){var n=r||{},i=e?Array.isArray(e):n.dense;$c!=null&&i==null&&(i=$c);var a=e||(i?[]:{}),s=0,o=0;if(a&&n.origin!=null){if(typeof n.origin=="number")s=n.origin;else{var c=typeof n.origin=="string"?nr(n.origin):n.origin;s=c.r,o=c.c}a["!ref"]||(a["!ref"]="A1:A1")}var l={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(a["!ref"]){var u=jt(a["!ref"]);l.s.c=u.s.c,l.s.r=u.s.r,l.e.c=Math.max(l.e.c,u.e.c),l.e.r=Math.max(l.e.r,u.e.r),s==-1&&(l.e.r=s=u.e.r+1)}for(var m=0;m!=t.length;++m)if(t[m]){if(!Array.isArray(t[m]))throw new Error("aoa_to_sheet expects an array of arrays");for(var d=0;d!=t[m].length;++d)if(!(typeof t[m][d]>"u")){var g={v:t[m][d]},v=s+m,p=o+d;if(l.s.r>v&&(l.s.r=v),l.s.c>p&&(l.s.c=p),l.e.r<v&&(l.e.r=v),l.e.c<p&&(l.e.c=p),t[m][d]&&typeof t[m][d]=="object"&&!Array.isArray(t[m][d])&&!(t[m][d]instanceof Date))g=t[m][d];else if(Array.isArray(g.v)&&(g.f=t[m][d][1],g.v=g.v[0]),g.v===null)if(g.f)g.t="n";else if(n.nullError)g.t="e",g.v=0;else if(n.sheetStubs)g.t="z";else continue;else typeof g.v=="number"?g.t="n":typeof g.v=="boolean"?g.t="b":g.v instanceof Date?(g.z=n.dateNF||Wt[14],n.cellDates?(g.t="d",g.w=ai(g.z,br(g.v))):(g.t="n",g.v=br(g.v),g.w=ai(g.z,g.v))):g.t="s";if(i)a[v]||(a[v]=[]),a[v][p]&&a[v][p].z&&(g.z=a[v][p].z),a[v][p]=g;else{var _=Tt({c:p,r:v});a[_]&&a[_].z&&(g.z=a[_].z),a[_]=g}}}return l.s.c<1e7&&(a["!ref"]=Gt(l)),a}function da(e,t){return wf(null,e,t)}function Kp(e){return e.read_shift(4,"i")}function cn(e,t){return t||(t=ue(4)),t.write_shift(4,e),t}function mr(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function ir(e,t){var r=!1;return t==null&&(r=!0,t=ue(4+2*e.length)),t.write_shift(4,e.length),e.length>0&&t.write_shift(0,e,"dbcs"),r?t.slice(0,t.l):t}function Yp(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function qp(e,t){return t||(t=ue(4)),t.write_shift(2,0),t.write_shift(2,0),t}function Zl(e,t){var r=e.l,n=e.read_shift(1),i=mr(e),a=[],s={t:i,h:i};if(n&1){for(var o=e.read_shift(4),c=0;c!=o;++c)a.push(Yp(e));s.r=a}else s.r=[{ich:0,ifnt:0}];return e.l=r+t,s}function Jp(e,t){var r=!1;return t==null&&(r=!0,t=ue(15+4*e.t.length)),t.write_shift(1,0),ir(e.t,t),r?t.slice(0,t.l):t}var Zp=Zl;function Qp(e,t){var r=!1;return t==null&&(r=!0,t=ue(23+4*e.t.length)),t.write_shift(1,1),ir(e.t,t),t.write_shift(4,1),qp({ich:0,ifnt:0},t),r?t.slice(0,t.l):t}function Yr(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function Pi(e,t){return t==null&&(t=ue(8)),t.write_shift(-4,e.c),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}function ji(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}function Ri(e,t){return t==null&&(t=ue(4)),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}var em=mr,yf=ir;function Ql(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}function Js(e,t){var r=!1;return t==null&&(r=!0,t=ue(127)),t.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&t.write_shift(0,e,"dbcs"),r?t.slice(0,t.l):t}var tm=mr,ml=Ql,ec=Js;function Df(e){var t=e.slice(e.l,e.l+4),r=t[0]&1,n=t[0]&2;e.l+=4;var i=n===0?qs([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):Ei(t,0)>>2;return r?i/100:i}function Af(e,t){t==null&&(t=ue(4));var r=0,n=0,i=e*100;if(e==(e|0)&&e>=-(1<<29)&&e<1<<29?n=1:i==(i|0)&&i>=-(1<<29)&&i<1<<29&&(n=1,r=1),n)t.write_shift(-4,((r?i:e)<<2)+(r+2));else throw new Error("unsupported RkNumber "+e)}function Cf(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}function rm(e,t){return t||(t=ue(16)),t.write_shift(4,e.s.r),t.write_shift(4,e.e.r),t.write_shift(4,e.s.c),t.write_shift(4,e.e.c),t}var Li=Cf,pa=rm;function ma(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function Si(e,t){return(t||ue(8)).write_shift(8,e,"f")}function nm(e){var t={},r=e.read_shift(1),n=r>>>1,i=e.read_shift(1),a=e.read_shift(2,"i"),s=e.read_shift(1),o=e.read_shift(1),c=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=i;var l=hm[i];l&&(t.rgb=Du(l));break;case 2:t.rgb=Du([s,o,c]);break;case 3:t.theme=i;break}return a!=0&&(t.tint=a>0?a/32767:a/32768),t}function Zs(e,t){if(t||(t=ue(8)),!e||e.auto)return t.write_shift(4,0),t.write_shift(4,0),t;e.index!=null?(t.write_shift(1,2),t.write_shift(1,e.index)):e.theme!=null?(t.write_shift(1,6),t.write_shift(1,e.theme)):(t.write_shift(1,5),t.write_shift(1,0));var r=e.tint||0;if(r>0?r*=32767:r<0&&(r*=32768),t.write_shift(2,r),!e.rgb||e.theme!=null)t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0);else{var n=e.rgb||"FFFFFF";typeof n=="number"&&(n=("000000"+n.toString(16)).slice(-6)),t.write_shift(1,parseInt(n.slice(0,2),16)),t.write_shift(1,parseInt(n.slice(2,4),16)),t.write_shift(1,parseInt(n.slice(4,6),16)),t.write_shift(1,255)}return t}function im(e){var t=e.read_shift(1);e.l++;var r={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return r}function am(e,t){t||(t=ue(2));var r=(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0);return t.write_shift(1,r),t.write_shift(1,0),t}var Tf=2,Or=3,xs=11,Qs=19,vs=64,sm=65,om=71,lm=4108,cm=4126,or=80,du={1:{n:"CodePage",t:Tf},2:{n:"Category",t:or},3:{n:"PresentationFormat",t:or},4:{n:"ByteCount",t:Or},5:{n:"LineCount",t:Or},6:{n:"ParagraphCount",t:Or},7:{n:"SlideCount",t:Or},8:{n:"NoteCount",t:Or},9:{n:"HiddenCount",t:Or},10:{n:"MultimediaClipCount",t:Or},11:{n:"ScaleCrop",t:xs},12:{n:"HeadingPairs",t:lm},13:{n:"TitlesOfParts",t:cm},14:{n:"Manager",t:or},15:{n:"Company",t:or},16:{n:"LinksUpToDate",t:xs},17:{n:"CharacterCount",t:Or},19:{n:"SharedDoc",t:xs},22:{n:"HyperlinksChanged",t:xs},23:{n:"AppVersion",t:Or,p:"version"},24:{n:"DigSig",t:sm},26:{n:"ContentType",t:or},27:{n:"ContentStatus",t:or},28:{n:"Language",t:or},29:{n:"Version",t:or},255:{},2147483648:{n:"Locale",t:Qs},2147483651:{n:"Behavior",t:Qs},1919054434:{}},pu={1:{n:"CodePage",t:Tf},2:{n:"Title",t:or},3:{n:"Subject",t:or},4:{n:"Author",t:or},5:{n:"Keywords",t:or},6:{n:"Comments",t:or},7:{n:"Template",t:or},8:{n:"LastAuthor",t:or},9:{n:"RevNumber",t:or},10:{n:"EditTime",t:vs},11:{n:"LastPrinted",t:vs},12:{n:"CreatedDate",t:vs},13:{n:"ModifiedDate",t:vs},14:{n:"PageCount",t:Or},15:{n:"WordCount",t:Or},16:{n:"CharCount",t:Or},17:{n:"Thumbnail",t:om},18:{n:"Application",t:or},19:{n:"DocSecurity",t:Or},255:{},2147483648:{n:"Locale",t:Qs},2147483651:{n:"Behavior",t:Qs},1919054434:{}};function um(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var fm=um([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]),hm=kr(fm),ns={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},dm={"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"},_s={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 Sf(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function Ff(e,t){var r=Dp(dm),n=[],i;n[n.length]=Xt,n[n.length]=ke("Types",null,{xmlns:rr.CT,"xmlns:xsd":rr.xsd,"xmlns:xsi":rr.xsi}),n=n.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 ke("Default",null,{Extension:c[0],ContentType:c[1]})}));var a=function(c){e[c]&&e[c].length>0&&(i=e[c][0],n[n.length]=ke("Override",null,{PartName:(i[0]=="/"?"":"/")+i,ContentType:_s[c][t.bookType]||_s[c].xlsx}))},s=function(c){(e[c]||[]).forEach(function(l){n[n.length]=ke("Override",null,{PartName:(l[0]=="/"?"":"/")+l,ContentType:_s[c][t.bookType]||_s[c].xlsx})})},o=function(c){(e[c]||[]).forEach(function(l){n[n.length]=ke("Override",null,{PartName:(l[0]=="/"?"":"/")+l,ContentType:r[c][0]})})};return a("workbooks"),s("sheets"),s("charts"),o("themes"),["strs","styles"].forEach(a),["coreprops","extprops","custprops"].forEach(o),o("vba"),o("comments"),o("threadedcomments"),o("drawings"),s("metadata"),o("people"),n.length>2&&(n[n.length]="</Types>",n[1]=n[1].replace("/>",">")),n.join("")}var vt={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 bf(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function ta(e){var t=[Xt,ke("Relationships",null,{xmlns:rr.RELS})];return hr(e["!id"]).forEach(function(r){t[t.length]=ke("Relationship",null,e["!id"][r])}),t.length>2&&(t[t.length]="</Relationships>",t[1]=t[1].replace("/>",">")),t.join("")}function At(e,t,r,n,i,a){if(i||(i={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),t<0)for(t=e["!idx"];e["!id"]["rId"+t];++t);if(e["!idx"]=t+1,i.Id="rId"+t,i.Type=n,i.Target=r,[vt.HLINK,vt.XPATH,vt.XMISS].indexOf(i.Type)>-1&&(i.TargetMode="External"),e["!id"][i.Id])throw new Error("Cannot rewrite rId "+t);return e["!id"][i.Id]=i,e[("/"+i.Target).replace("//","/")]=i,t}function pm(e){var t=[Xt];t.push(`<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">
`),t.push(`  <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
`);for(var r=0;r<e.length;++r)t.push('  <manifest:file-entry manifest:full-path="'+e[r][0]+'" manifest:media-type="'+e[r][1]+`"/>
`);return t.push("</manifest:manifest>"),t.join("")}function mu(e,t,r){return['  <rdf:Description rdf:about="'+e+`">
`,'    <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(r||"odf")+"#"+t+`"/>
`,`  </rdf:Description>
`].join("")}function mm(e,t){return['  <rdf:Description rdf:about="'+e+`">
`,'    <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+t+`"/>
`,`  </rdf:Description>
`].join("")}function gm(e){var t=[Xt];t.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
`);for(var r=0;r!=e.length;++r)t.push(mu(e[r][0],e[r][1])),t.push(mm("",e[r][0]));return t.push(mu("","Document","pkg")),t.push("</rdf:RDF>"),t.join("")}function kf(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+$s.version+"</meta:generator></office:meta></office:document-meta>"}var Ai=[["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"]];function Vo(e,t,r,n,i){i[e]!=null||t==null||t===""||(i[e]=t,t=Ct(t),n[n.length]=r?ke(e,t,r):ur(e,t))}function Nf(e,t){var r=t||{},n=[Xt,ke("cp:coreProperties",null,{"xmlns:cp":rr.CORE_PROPS,"xmlns:dc":rr.dc,"xmlns:dcterms":rr.dcterms,"xmlns:dcmitype":rr.dcmitype,"xmlns:xsi":rr.xsi})],i={};if(!e&&!r.Props)return n.join("");e&&(e.CreatedDate!=null&&Vo("dcterms:created",typeof e.CreatedDate=="string"?e.CreatedDate:pl(e.CreatedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,i),e.ModifiedDate!=null&&Vo("dcterms:modified",typeof e.ModifiedDate=="string"?e.ModifiedDate:pl(e.ModifiedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,i));for(var a=0;a!=Ai.length;++a){var s=Ai[a],o=r.Props&&r.Props[s[1]]!=null?r.Props[s[1]]:e?e[s[1]]:null;o===!0?o="1":o===!1?o="0":typeof o=="number"&&(o=String(o)),o!=null&&Vo(s[0],o,null,n,i)}return n.length>2&&(n[n.length]="</cp:coreProperties>",n[1]=n[1].replace("/>",">")),n.join("")}var ra=[["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"]],If=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function Of(e){var t=[],r=ke;return e||(e={}),e.Application="SheetJS",t[t.length]=Xt,t[t.length]=ke("Properties",null,{xmlns:rr.EXT_PROPS,"xmlns:vt":rr.vt}),ra.forEach(function(n){if(e[n[1]]!==void 0){var i;switch(n[2]){case"string":i=Ct(String(e[n[1]]));break;case"bool":i=e[n[1]]?"true":"false";break}i!==void 0&&(t[t.length]=r(n[0],i))}}),t[t.length]=r("HeadingPairs",r("vt:vector",r("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+r("vt:variant",r("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=r("TitlesOfParts",r("vt:vector",e.SheetNames.map(function(n){return"<vt:lpstr>"+Ct(n)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}function Bf(e){var t=[Xt,ke("Properties",null,{xmlns:rr.CUST_PROPS,"xmlns:vt":rr.vt})];if(!e)return t.join("");var r=1;return hr(e).forEach(function(i){++r,t[t.length]=ke("property",Bp(e[i]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:r,name:Ct(i)})}),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var gu={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 xm(e,t){var r=[];return hr(gu).map(function(n){for(var i=0;i<Ai.length;++i)if(Ai[i][1]==n)return Ai[i];for(i=0;i<ra.length;++i)if(ra[i][1]==n)return ra[i];throw n}).forEach(function(n){if(e[n[1]]!=null){var i=t&&t.Props&&t.Props[n[1]]!=null?t.Props[n[1]]:e[n[1]];switch(n[2]){case"date":i=new Date(i).toISOString().replace(/\.\d*Z/,"Z");break}typeof i=="number"?i=String(i):i===!0||i===!1?i=i?"1":"0":i instanceof Date&&(i=new Date(i).toISOString().replace(/\.\d*Z/,"")),r.push(ur(gu[n[1]]||n[1],i))}}),ke("DocumentProperties",r.join(""),{xmlns:Pr.o})}function vm(e,t){var r=["Worksheets","SheetNames"],n="CustomDocumentProperties",i=[];return e&&hr(e).forEach(function(a){if(Object.prototype.hasOwnProperty.call(e,a)){for(var s=0;s<Ai.length;++s)if(a==Ai[s][1])return;for(s=0;s<ra.length;++s)if(a==ra[s][1])return;for(s=0;s<r.length;++s)if(a==r[s])return;var o=e[a],c="string";typeof o=="number"?(c="float",o=String(o)):o===!0||o===!1?(c="boolean",o=o?"1":"0"):o=String(o),i.push(ke(nu(a),o,{"dt:dt":c}))}}),t&&hr(t).forEach(function(a){if(Object.prototype.hasOwnProperty.call(t,a)&&!(e&&Object.prototype.hasOwnProperty.call(e,a))){var s=t[a],o="string";typeof s=="number"?(o="float",s=String(s)):s===!0||s===!1?(o="boolean",s=s?"1":"0"):s instanceof Date?(o="dateTime.tz",s=s.toISOString()):s=String(s),i.push(ke(nu(a),s,{"dt:dt":o}))}}),"<"+n+' xmlns="'+Pr.o+'">'+i.join("")+"</"+n+">"}function _m(e){var t=typeof e=="string"?new Date(Date.parse(e)):e,r=t.getTime()/1e3+11644473600,n=r%Math.pow(2,32),i=(r-n)/Math.pow(2,32);n*=1e7,i*=1e7;var a=n/Math.pow(2,32)|0;a>0&&(n=n%Math.pow(2,32),i+=a);var s=ue(8);return s.write_shift(4,n),s.write_shift(4,i),s}function xu(e,t){var r=ue(4),n=ue(4);switch(r.write_shift(4,e==80?31:e),e){case 3:n.write_shift(-4,t);break;case 5:n=ue(8),n.write_shift(8,t,"f");break;case 11:n.write_shift(4,t?1:0);break;case 64:n=_m(t);break;case 31:case 80:for(n=ue(4+2*(t.length+1)+(t.length%2?0:2)),n.write_shift(4,t.length+1),n.write_shift(0,t,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+t)}return cr([r,n])}var Pf=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function Em(e){switch(typeof e){case"boolean":return 11;case"number":return(e|0)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64;break}return-1}function vu(e,t,r){var n=ue(8),i=[],a=[],s=8,o=0,c=ue(8),l=ue(8);if(c.write_shift(4,2),c.write_shift(4,1200),l.write_shift(4,1),a.push(c),i.push(l),s+=8+c.length,!t){l=ue(8),l.write_shift(4,0),i.unshift(l);var u=[ue(4)];for(u[0].write_shift(4,e.length),o=0;o<e.length;++o){var m=e[o][0];for(c=ue(8+2*(m.length+1)+(m.length%2?0:2)),c.write_shift(4,o+2),c.write_shift(4,m.length+1),c.write_shift(0,m,"dbcs");c.l!=c.length;)c.write_shift(1,0);u.push(c)}c=cr(u),a.unshift(c),s+=8+c.length}for(o=0;o<e.length;++o)if(!(t&&!t[e[o][0]])&&!(Pf.indexOf(e[o][0])>-1||If.indexOf(e[o][0])>-1)&&e[o][1]!=null){var d=e[o][1],g=0;if(t){g=+t[e[o][0]];var v=r[g];if(v.p=="version"&&typeof d=="string"){var p=d.split(".");d=(+p[0]<<16)+(+p[1]||0)}c=xu(v.t,d)}else{var _=Em(d);_==-1&&(_=31,d=String(d)),c=xu(_,d)}a.push(c),l=ue(8),l.write_shift(4,t?g:2+o),i.push(l),s+=8+c.length}var E=8*(a.length+1);for(o=0;o<a.length;++o)i[o].write_shift(4,E),E+=a[o].length;return n.write_shift(4,s),n.write_shift(4,a.length),cr([n].concat(i).concat(a))}function _u(e,t,r,n,i,a){var s=ue(i?68:48),o=[s];s.write_shift(2,65534),s.write_shift(2,0),s.write_shift(4,842412599),s.write_shift(16,St.utils.consts.HEADER_CLSID,"hex"),s.write_shift(4,i?2:1),s.write_shift(16,t,"hex"),s.write_shift(4,i?68:48);var c=vu(e,r,n);if(o.push(c),i){var l=vu(i,null,null);s.write_shift(16,a,"hex"),s.write_shift(4,68+c.length),o.push(l)}return cr(o)}function wm(e,t){t||(t=ue(e));for(var r=0;r<e;++r)t.write_shift(1,0);return t}function ym(e,t){return e.read_shift(t)===1}function xr(e,t){return t||(t=ue(2)),t.write_shift(2,+!!e),t}function jf(e){return e.read_shift(2,"u")}function Gr(e,t){return t||(t=ue(2)),t.write_shift(2,e),t}function Rf(e,t,r){return r||(r=ue(2)),r.write_shift(1,t=="e"?+e:+!!e),r.write_shift(1,t=="e"?1:0),r}function Lf(e,t,r){var n=e.read_shift(r&&r.biff>=12?2:1),i="sbcs-cont";if(r&&r.biff>=8,!r||r.biff==8){var a=e.read_shift(1);a&&(i="dbcs-cont")}else r.biff==12&&(i="wstr");r.biff>=2&&r.biff<=5&&(i="cpstr");var s=n?e.read_shift(n,i):"";return s}function Dm(e){var t=e.t||"",r=ue(3);r.write_shift(2,t.length),r.write_shift(1,1);var n=ue(2*t.length);n.write_shift(2*t.length,t,"utf16le");var i=[r,n];return cr(i)}function Am(e,t,r){var n;if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}var i=e.read_shift(1);return i===0?n=e.read_shift(t,"sbcs-cont"):n=e.read_shift(t,"dbcs-cont"),n}function Cm(e,t,r){var n=e.read_shift(r&&r.biff==2?1:2);return n===0?(e.l++,""):Am(e,n,r)}function Tm(e,t,r){if(r.biff>5)return Cm(e,t,r);var n=e.read_shift(1);return n===0?(e.l++,""):e.read_shift(n,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function Mf(e,t,r){return r||(r=ue(3+2*e.length)),r.write_shift(2,e.length),r.write_shift(1,1),r.write_shift(31,e,"utf16le"),r}function Eu(e,t){t||(t=ue(6+e.length*2)),t.write_shift(4,1+e.length);for(var r=0;r<e.length;++r)t.write_shift(2,e.charCodeAt(r));return t.write_shift(2,0),t}function Sm(e){var t=ue(512),r=0,n=e.Target;n.slice(0,7)=="file://"&&(n=n.slice(7));var i=n.indexOf("#"),a=i>-1?31:23;switch(n.charAt(0)){case"#":a=28;break;case".":a&=-3;break}t.write_shift(4,2),t.write_shift(4,a);var s=[8,6815827,6619237,4849780,83];for(r=0;r<s.length;++r)t.write_shift(4,s[r]);if(a==28)n=n.slice(1),Eu(n,t);else if(a&2){for(s="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<s.length;++r)t.write_shift(1,parseInt(s[r],16));var o=i>-1?n.slice(0,i):n;for(t.write_shift(4,2*(o.length+1)),r=0;r<o.length;++r)t.write_shift(2,o.charCodeAt(r));t.write_shift(2,0),a&8&&Eu(i>-1?n.slice(i+1):"",t)}else{for(s="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),r=0;r<s.length;++r)t.write_shift(1,parseInt(s[r],16));for(var c=0;n.slice(c*3,c*3+3)=="../"||n.slice(c*3,c*3+3)=="..\\";)++c;for(t.write_shift(2,c),t.write_shift(4,n.length-3*c+1),r=0;r<n.length-3*c;++r)t.write_shift(1,n.charCodeAt(r+3*c)&255);for(t.write_shift(1,0),t.write_shift(2,65535),t.write_shift(2,57005),r=0;r<6;++r)t.write_shift(4,0)}return t.slice(0,t.l)}function Fi(e,t,r,n){return n||(n=ue(6)),n.write_shift(2,e),n.write_shift(2,t),n.write_shift(2,r||0),n}function Fm(e,t,r){var n=r.biff>8?4:2,i=e.read_shift(n),a=e.read_shift(n,"i"),s=e.read_shift(n,"i");return[i,a,s]}function bm(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),i=e.read_shift(2);return{s:{c:n,r:t},e:{c:i,r}}}function Uf(e,t){return t||(t=ue(8)),t.write_shift(2,e.s.r),t.write_shift(2,e.e.r),t.write_shift(2,e.s.c),t.write_shift(2,e.e.c),t}function tc(e,t,r){var n=1536,i=16;switch(r.bookType){case"biff8":break;case"biff5":n=1280,i=8;break;case"biff4":n=4,i=6;break;case"biff3":n=3,i=6;break;case"biff2":n=2,i=4;break;case"xla":break;default:throw new Error("unsupported BIFF version")}var a=ue(i);return a.write_shift(2,n),a.write_shift(2,t),i>4&&a.write_shift(2,29282),i>6&&a.write_shift(2,1997),i>8&&(a.write_shift(2,49161),a.write_shift(2,1),a.write_shift(2,1798),a.write_shift(2,0)),a}function km(e,t){var r=!t||t.biff==8,n=ue(r?112:54);for(n.write_shift(t.biff==8?2:1,7),r&&n.write_shift(1,0),n.write_shift(4,859007059),n.write_shift(4,5458548|(r?0:536870912));n.l<n.length;)n.write_shift(1,r?0:32);return n}function Nm(e,t){var r=!t||t.biff>=8?2:1,n=ue(8+r*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),t.biff>=8&&n.write_shift(1,1),n.write_shift(r*e.name.length,e.name,t.biff<8?"sbcs":"utf16le");var i=n.slice(0,n.l);return i.l=n.l,i}function Im(e,t){var r=ue(8);r.write_shift(4,e.Count),r.write_shift(4,e.Unique);for(var n=[],i=0;i<e.length;++i)n[i]=Dm(e[i]);var a=cr([r].concat(n));return a.parts=[r.length].concat(n.map(function(s){return s.length})),a}function Om(){var e=ue(18);return e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,29280),e.write_shift(2,17600),e.write_shift(2,56),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,1),e.write_shift(2,500),e}function Bm(e){var t=ue(18),r=1718;return e&&e.RTL&&(r|=64),t.write_shift(2,r),t.write_shift(4,0),t.write_shift(4,64),t.write_shift(4,0),t.write_shift(4,0),t}function Pm(e,t){var r=e.name||"Arial",n=t&&t.biff==5,i=n?15+r.length:16+2*r.length,a=ue(i);return a.write_shift(2,(e.sz||12)*20),a.write_shift(4,0),a.write_shift(2,400),a.write_shift(4,0),a.write_shift(2,0),a.write_shift(1,r.length),n||a.write_shift(1,1),a.write_shift((n?1:2)*r.length,r,n?"sbcs":"utf16le"),a}function jm(e,t,r,n){var i=ue(10);return Fi(e,t,n,i),i.write_shift(4,r),i}function Rm(e,t,r,n,i){var a=!i||i.biff==8,s=ue(8+ +a+(1+a)*r.length);return Fi(e,t,n,s),s.write_shift(2,r.length),a&&s.write_shift(1,1),s.write_shift((1+a)*r.length,r,a?"utf16le":"sbcs"),s}function Lm(e,t,r,n){var i=r&&r.biff==5;n||(n=ue(i?3+t.length:5+2*t.length)),n.write_shift(2,e),n.write_shift(i?1:2,t.length),i||n.write_shift(1,1),n.write_shift((i?1:2)*t.length,t,i?"sbcs":"utf16le");var a=n.length>n.l?n.slice(0,n.l):n;return a.l==null&&(a.l=a.length),a}function Mm(e,t){var r=t.biff==8||!t.biff?4:2,n=ue(2*r+6);return n.write_shift(r,e.s.r),n.write_shift(r,e.e.r+1),n.write_shift(2,e.s.c),n.write_shift(2,e.e.c+1),n.write_shift(2,0),n}function wu(e,t,r,n){var i=r&&r.biff==5;n||(n=ue(i?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,t<<4));var a=0;return e.numFmtId>0&&i&&(a|=1024),n.write_shift(4,a),n.write_shift(4,0),i||n.write_shift(4,0),n.write_shift(2,0),n}function Um(e){var t=ue(8);return t.write_shift(4,0),t.write_shift(2,0),t.write_shift(2,0),t}function Wm(e,t,r,n,i,a){var s=ue(8);return Fi(e,t,n,s),Rf(r,a,s),s}function zm(e,t,r,n){var i=ue(14);return Fi(e,t,n,i),Si(r,i),i}function Vm(e,t,r){if(r.biff<8)return Hm(e,t,r);for(var n=[],i=e.l+t,a=e.read_shift(r.biff>8?4:2);a--!==0;)n.push(Fm(e,r.biff>8?12:6,r));if(e.l!=i)throw new Error("Bad ExternSheet: "+e.l+" != "+i);return n}function Hm(e,t,r){e[e.l+1]==3&&e[e.l]++;var n=Lf(e,t,r);return n.charCodeAt(0)==3?n.slice(1):n}function $m(e){var t=ue(2+e.length*8);t.write_shift(2,e.length);for(var r=0;r<e.length;++r)Uf(e[r],t);return t}function Gm(e){var t=ue(24),r=nr(e[0]);t.write_shift(2,r.r),t.write_shift(2,r.r),t.write_shift(2,r.c),t.write_shift(2,r.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),i=0;i<16;++i)t.write_shift(1,parseInt(n[i],16));return cr([t,Sm(e[1])])}function Xm(e){var t=e[1].Tooltip,r=ue(10+2*(t.length+1));r.write_shift(2,2048);var n=nr(e[0]);r.write_shift(2,n.r),r.write_shift(2,n.r),r.write_shift(2,n.c),r.write_shift(2,n.c);for(var i=0;i<t.length;++i)r.write_shift(2,t.charCodeAt(i));return r.write_shift(2,0),r}function Km(e){return e||(e=ue(4)),e.write_shift(2,1),e.write_shift(2,1),e}function Ym(e,t,r){if(!r.cellStyles)return En(e,t);var n=r&&r.biff>=12?4:2,i=e.read_shift(n),a=e.read_shift(n),s=e.read_shift(n),o=e.read_shift(n),c=e.read_shift(2);n==2&&(e.l+=2);var l={s:i,e:a,w:s,ixfe:o,flags:c};return(r.biff>=5||!r.biff)&&(l.level=c>>8&7),l}function qm(e,t){var r=ue(12);r.write_shift(2,t),r.write_shift(2,t),r.write_shift(2,e.width*256),r.write_shift(2,0);var n=0;return e.hidden&&(n|=1),r.write_shift(1,n),n=e.level||0,r.write_shift(1,n),r.write_shift(2,0),r}function Jm(e){for(var t=ue(2*e),r=0;r<e;++r)t.write_shift(2,r+1);return t}function Zm(e,t,r){var n=ue(15);return as(n,e,t),n.write_shift(8,r,"f"),n}function Qm(e,t,r){var n=ue(9);return as(n,e,t),n.write_shift(2,r),n}var eg=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},t=Hl({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 r(o,c){var l=[],u=Ti(1);switch(c.type){case"base64":u=on(Vn(o));break;case"binary":u=on(o);break;case"buffer":case"array":u=o;break}Br(u,0);var m=u.read_shift(1),d=!!(m&136),g=!1,v=!1;switch(m){case 2:break;case 3:break;case 48:g=!0,d=!0;break;case 49:g=!0,d=!0;break;case 131:break;case 139:break;case 140:v=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+m.toString(16))}var p=0,_=521;m==2&&(p=u.read_shift(2)),u.l+=3,m!=2&&(p=u.read_shift(4)),p>1048576&&(p=1e6),m!=2&&(_=u.read_shift(2));var E=u.read_shift(2),D=c.codepage||1252;m!=2&&(u.l+=16,u.read_shift(1),u[u.l]!==0&&(D=e[u[u.l]]),u.l+=1,u.l+=2),v&&(u.l+=36);for(var A=[],S={},I=Math.min(u.length,m==2?521:_-10-(g?264:0)),U=v?32:11;u.l<I&&u[u.l]!=13;)switch(S={},S.name=_i.utils.decode(D,u.slice(u.l,u.l+U)).replace(/[\u0000\r\n].*$/g,""),u.l+=U,S.type=String.fromCharCode(u.read_shift(1)),m!=2&&!v&&(S.offset=u.read_shift(4)),S.len=u.read_shift(1),m==2&&(S.offset=u.read_shift(2)),S.dec=u.read_shift(1),S.name.length&&A.push(S),m!=2&&(u.l+=v?13:14),S.type){case"B":(!g||S.len!=8)&&c.WTF&&console.log("Skipping "+S.name+":"+S.type);break;case"G":case"P":c.WTF&&console.log("Skipping "+S.name+":"+S.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+S.type)}if(u[u.l]!==13&&(u.l=_-1),u.read_shift(1)!==13)throw new Error("DBF Terminator not found "+u.l+" "+u[u.l]);u.l=_;var R=0,Y=0;for(l[0]=[],Y=0;Y!=A.length;++Y)l[0][Y]=A[Y].name;for(;p-- >0;){if(u[u.l]===42){u.l+=E;continue}for(++u.l,l[++R]=[],Y=0,Y=0;Y!=A.length;++Y){var W=u.slice(u.l,u.l+A[Y].len);u.l+=A[Y].len,Br(W,0);var Z=_i.utils.decode(D,W);switch(A[Y].type){case"C":Z.trim().length&&(l[R][Y]=Z.replace(/\s+$/,""));break;case"D":Z.length===8?l[R][Y]=new Date(+Z.slice(0,4),+Z.slice(4,6)-1,+Z.slice(6,8)):l[R][Y]=Z;break;case"F":l[R][Y]=parseFloat(Z.trim());break;case"+":case"I":l[R][Y]=v?W.read_shift(-4,"i")^2147483648:W.read_shift(4,"i");break;case"L":switch(Z.trim().toUpperCase()){case"Y":case"T":l[R][Y]=!0;break;case"N":case"F":l[R][Y]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+Z+"|")}break;case"M":if(!d)throw new Error("DBF Unexpected MEMO for type "+m.toString(16));l[R][Y]="##MEMO##"+(v?parseInt(Z.trim(),10):W.read_shift(4));break;case"N":Z=Z.replace(/\u0000/g,"").trim(),Z&&Z!="."&&(l[R][Y]=+Z||0);break;case"@":l[R][Y]=new Date(W.read_shift(-8,"f")-621356832e5);break;case"T":l[R][Y]=new Date((W.read_shift(4)-2440588)*864e5+W.read_shift(4));break;case"Y":l[R][Y]=W.read_shift(4,"i")/1e4+W.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":l[R][Y]=-W.read_shift(-8,"f");break;case"B":if(g&&A[Y].len==8){l[R][Y]=W.read_shift(8,"f");break}case"G":case"P":W.l+=A[Y].len;break;case"0":if(A[Y].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+A[Y].type)}}}if(m!=2&&u.l<u.length&&u[u.l++]!=26)throw new Error("DBF EOF Marker missing "+(u.l-1)+" of "+u.length+" "+u[u.l-1].toString(16));return c&&c.sheetRows&&(l=l.slice(0,c.sheetRows)),c.DBF=A,l}function n(o,c){var l=c||{};l.dateNF||(l.dateNF="yyyymmdd");var u=da(r(o,l),l);return u["!cols"]=l.DBF.map(function(m){return{wch:m.len,DBF:m}}),delete l.DBF,u}function i(o,c){try{return Bi(n(o,c),c)}catch(l){if(c&&c.WTF)throw l}return{SheetNames:[],Sheets:{}}}var a={B:8,C:250,L:1,D:8,"?":0,"":0};function s(o,c){var l=c||{};if(+l.codepage>=0&&Ha(+l.codepage),l.type=="string")throw new Error("Cannot write DBF to JS string");var u=Fr(),m=io(o,{header:1,raw:!0,cellDates:!0}),d=m[0],g=m.slice(1),v=o["!cols"]||[],p=0,_=0,E=0,D=1;for(p=0;p<d.length;++p){if(((v[p]||{}).DBF||{}).name){d[p]=v[p].DBF.name,++E;continue}if(d[p]!=null){if(++E,typeof d[p]=="number"&&(d[p]=d[p].toString(10)),typeof d[p]!="string")throw new Error("DBF Invalid column name "+d[p]+" |"+typeof d[p]+"|");if(d.indexOf(d[p])!==p){for(_=0;_<1024;++_)if(d.indexOf(d[p]+"_"+_)==-1){d[p]+="_"+_;break}}}}var A=jt(o["!ref"]),S=[],I=[],U=[];for(p=0;p<=A.e.c-A.s.c;++p){var R="",Y="",W=0,Z=[];for(_=0;_<g.length;++_)g[_][p]!=null&&Z.push(g[_][p]);if(Z.length==0||d[p]==null){S[p]="?";continue}for(_=0;_<Z.length;++_){switch(typeof Z[_]){case"number":Y="B";break;case"string":Y="C";break;case"boolean":Y="L";break;case"object":Y=Z[_]instanceof Date?"D":"C";break;default:Y="C"}W=Math.max(W,String(Z[_]).length),R=R&&R!=Y?"C":Y}W>250&&(W=250),Y=((v[p]||{}).DBF||{}).type,Y=="C"&&v[p].DBF.len>W&&(W=v[p].DBF.len),R=="B"&&Y=="N"&&(R="N",U[p]=v[p].DBF.dec,W=v[p].DBF.len),I[p]=R=="C"||Y=="N"?W:a[R]||0,D+=I[p],S[p]=R}var N=u.next(32);for(N.write_shift(4,318902576),N.write_shift(4,g.length),N.write_shift(2,296+32*E),N.write_shift(2,D),p=0;p<4;++p)N.write_shift(4,0);for(N.write_shift(4,0|(+t[W0]||3)<<8),p=0,_=0;p<d.length;++p)if(d[p]!=null){var M=u.next(32),G=(d[p].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);M.write_shift(1,G,"sbcs"),M.write_shift(1,S[p]=="?"?"C":S[p],"sbcs"),M.write_shift(4,_),M.write_shift(1,I[p]||a[S[p]]||0),M.write_shift(1,U[p]||0),M.write_shift(1,2),M.write_shift(4,0),M.write_shift(1,0),M.write_shift(4,0),M.write_shift(4,0),_+=I[p]||a[S[p]]||0}var b=u.next(264);for(b.write_shift(4,13),p=0;p<65;++p)b.write_shift(4,0);for(p=0;p<g.length;++p){var V=u.next(D);for(V.write_shift(1,0),_=0;_<d.length;++_)if(d[_]!=null)switch(S[_]){case"L":V.write_shift(1,g[p][_]==null?63:g[p][_]?84:70);break;case"B":V.write_shift(8,g[p][_]||0,"f");break;case"N":var q="0";for(typeof g[p][_]=="number"&&(q=g[p][_].toFixed(U[_]||0)),E=0;E<I[_]-q.length;++E)V.write_shift(1,32);V.write_shift(1,q,"sbcs");break;case"D":g[p][_]?(V.write_shift(4,("0000"+g[p][_].getFullYear()).slice(-4),"sbcs"),V.write_shift(2,("00"+(g[p][_].getMonth()+1)).slice(-2),"sbcs"),V.write_shift(2,("00"+g[p][_].getDate()).slice(-2),"sbcs")):V.write_shift(8,"00000000","sbcs");break;case"C":var re=String(g[p][_]!=null?g[p][_]:"").slice(0,I[_]);for(V.write_shift(1,re,"sbcs"),E=0;E<I[_]-re.length;++E)V.write_shift(1,32);break}}return u.next(1).write_shift(1,26),u.end()}return{to_workbook:i,to_sheet:n,from_sheet:s}}(),tg=function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+hr(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(d,g){var v=e[g];return typeof v=="number"?Hc(v):v},n=function(d,g,v){var p=g.charCodeAt(0)-32<<4|v.charCodeAt(0)-48;return p==59?d:Hc(p)};e["|"]=254;function i(d,g){switch(g.type){case"base64":return a(Vn(d),g);case"binary":return a(d,g);case"buffer":return a(wt&&rt.isBuffer(d)?d.toString("binary"):es(d),g);case"array":return a(Do(d),g)}throw new Error("Unrecognized type "+g.type)}function a(d,g){var v=d.split(/[\n\r]+/),p=-1,_=-1,E=0,D=0,A=[],S=[],I=null,U={},R=[],Y=[],W=[],Z=0,N;for(+g.codepage>=0&&Ha(+g.codepage);E!==v.length;++E){Z=0;var M=v[E].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(t,r),G=M.replace(/;;/g,"\0").split(";").map(function(X){return X.replace(/\u0000/g,";")}),b=G[0],V;if(M.length>0)switch(b){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":G[1].charAt(0)=="P"&&S.push(M.slice(3).replace(/;;/g,";"));break;case"C":var q=!1,re=!1,le=!1,pe=!1,Ce=-1,Te=-1;for(D=1;D<G.length;++D)switch(G[D].charAt(0)){case"A":break;case"X":_=parseInt(G[D].slice(1))-1,re=!0;break;case"Y":for(p=parseInt(G[D].slice(1))-1,re||(_=0),N=A.length;N<=p;++N)A[N]=[];break;case"K":V=G[D].slice(1),V.charAt(0)==='"'?V=V.slice(1,V.length-1):V==="TRUE"?V=!0:V==="FALSE"?V=!1:isNaN(Un(V))?isNaN(Ga(V).getDate())||(V=wr(V)):(V=Un(V),I!==null&&Q0(I)&&(V=nf(V))),q=!0;break;case"E":pe=!0;var O=Qg(G[D].slice(1),{r:p,c:_});A[p][_]=[A[p][_],O];break;case"S":le=!0,A[p][_]=[A[p][_],"S5S"];break;case"G":break;case"R":Ce=parseInt(G[D].slice(1))-1;break;case"C":Te=parseInt(G[D].slice(1))-1;break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+M)}if(q&&(A[p][_]&&A[p][_].length==2?A[p][_][0]=V:A[p][_]=V,I=null),le){if(pe)throw new Error("SYLK shared formula cannot have own formula");var K=Ce>-1&&A[Ce][Te];if(!K||!K[1])throw new Error("SYLK shared formula cannot find base");A[p][_][1]=ex(K[1],{r:p-Ce,c:_-Te})}break;case"F":var z=0;for(D=1;D<G.length;++D)switch(G[D].charAt(0)){case"X":_=parseInt(G[D].slice(1))-1,++z;break;case"Y":for(p=parseInt(G[D].slice(1))-1,N=A.length;N<=p;++N)A[N]=[];break;case"M":Z=parseInt(G[D].slice(1))/20;break;case"F":break;case"G":break;case"P":I=S[parseInt(G[D].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(W=G[D].slice(1).split(" "),N=parseInt(W[0],10);N<=parseInt(W[1],10);++N)Z=parseInt(W[2],10),Y[N-1]=Z===0?{hidden:!0}:{wch:Z},rc(Y[N-1]);break;case"C":_=parseInt(G[D].slice(1))-1,Y[_]||(Y[_]={});break;case"R":p=parseInt(G[D].slice(1))-1,R[p]||(R[p]={}),Z>0?(R[p].hpt=Z,R[p].hpx=$f(Z)):Z===0&&(R[p].hidden=!0);break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+M)}z<1&&(I=null);break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+M)}}return R.length>0&&(U["!rows"]=R),Y.length>0&&(U["!cols"]=Y),g&&g.sheetRows&&(A=A.slice(0,g.sheetRows)),[A,U]}function s(d,g){var v=i(d,g),p=v[0],_=v[1],E=da(p,g);return hr(_).forEach(function(D){E[D]=_[D]}),E}function o(d,g){return Bi(s(d,g),g)}function c(d,g,v,p){var _="C;Y"+(v+1)+";X"+(p+1)+";K";switch(d.t){case"n":_+=d.v||0,d.f&&!d.F&&(_+=";E"+ic(d.f,{r:v,c:p}));break;case"b":_+=d.v?"TRUE":"FALSE";break;case"e":_+=d.w||d.v;break;case"d":_+='"'+(d.w||d.v)+'"';break;case"s":_+='"'+d.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return _}function l(d,g){g.forEach(function(v,p){var _="F;W"+(p+1)+" "+(p+1)+" ";v.hidden?_+="0":(typeof v.width=="number"&&!v.wpx&&(v.wpx=eo(v.width)),typeof v.wpx=="number"&&!v.wch&&(v.wch=to(v.wpx)),typeof v.wch=="number"&&(_+=Math.round(v.wch))),_.charAt(_.length-1)!=" "&&d.push(_)})}function u(d,g){g.forEach(function(v,p){var _="F;";v.hidden?_+="M0;":v.hpt?_+="M"+20*v.hpt+";":v.hpx&&(_+="M"+20*ro(v.hpx)+";"),_.length>2&&d.push(_+"R"+(p+1))})}function m(d,g){var v=["ID;PWXL;N;E"],p=[],_=jt(d["!ref"]),E,D=Array.isArray(d),A=`\r
`;v.push("P;PGeneral"),v.push("F;P0;DG0G8;M255"),d["!cols"]&&l(v,d["!cols"]),d["!rows"]&&u(v,d["!rows"]),v.push("B;Y"+(_.e.r-_.s.r+1)+";X"+(_.e.c-_.s.c+1)+";D"+[_.s.c,_.s.r,_.e.c,_.e.r].join(" "));for(var S=_.s.r;S<=_.e.r;++S)for(var I=_.s.c;I<=_.e.c;++I){var U=Tt({r:S,c:I});E=D?(d[S]||[])[I]:d[U],!(!E||E.v==null&&(!E.f||E.F))&&p.push(c(E,d,S,I))}return v.join(A)+A+p.join(A)+A+"E"+A}return{to_workbook:o,to_sheet:s,from_sheet:m}}(),rg=function(){function e(a,s){switch(s.type){case"base64":return t(Vn(a),s);case"binary":return t(a,s);case"buffer":return t(wt&&rt.isBuffer(a)?a.toString("binary"):es(a),s);case"array":return t(Do(a),s)}throw new Error("Unrecognized type "+s.type)}function t(a,s){for(var o=a.split(`
`),c=-1,l=-1,u=0,m=[];u!==o.length;++u){if(o[u].trim()==="BOT"){m[++c]=[],l=0;continue}if(!(c<0)){var d=o[u].trim().split(","),g=d[0],v=d[1];++u;for(var p=o[u]||"";(p.match(/["]/g)||[]).length&1&&u<o.length-1;)p+=`
`+o[++u];switch(p=p.trim(),+g){case-1:if(p==="BOT"){m[++c]=[],l=0;continue}else if(p!=="EOD")throw new Error("Unrecognized DIF special command "+p);break;case 0:p==="TRUE"?m[c][l]=!0:p==="FALSE"?m[c][l]=!1:isNaN(Un(v))?isNaN(Ga(v).getDate())?m[c][l]=v:m[c][l]=wr(v):m[c][l]=Un(v),++l;break;case 1:p=p.slice(1,p.length-1),p=p.replace(/""/g,'"'),p&&p.match(/^=".*"$/)&&(p=p.slice(2,-1)),m[c][l++]=p!==""?p:null;break}if(p==="EOD")break}}return s&&s.sheetRows&&(m=m.slice(0,s.sheetRows)),m}function r(a,s){return da(e(a,s),s)}function n(a,s){return Bi(r(a,s),s)}var i=function(){var a=function(c,l,u,m,d){c.push(l),c.push(u+","+m),c.push('"'+d.replace(/"/g,'""')+'"')},s=function(c,l,u,m){c.push(l+","+u),c.push(l==1?'"'+m.replace(/"/g,'""')+'"':m)};return function(c){var l=[],u=jt(c["!ref"]),m,d=Array.isArray(c);a(l,"TABLE",0,1,"sheetjs"),a(l,"VECTORS",0,u.e.r-u.s.r+1,""),a(l,"TUPLES",0,u.e.c-u.s.c+1,""),a(l,"DATA",0,0,"");for(var g=u.s.r;g<=u.e.r;++g){s(l,-1,0,"BOT");for(var v=u.s.c;v<=u.e.c;++v){var p=Tt({r:g,c:v});if(m=d?(c[g]||[])[v]:c[p],!m){s(l,1,0,"");continue}switch(m.t){case"n":var _=m.w;!_&&m.v!=null&&(_=m.v),_==null?m.f&&!m.F?s(l,1,0,"="+m.f):s(l,1,0,""):s(l,0,_,"V");break;case"b":s(l,0,m.v?1:0,m.v?"TRUE":"FALSE");break;case"s":s(l,1,0,isNaN(m.v)?m.v:'="'+m.v+'"');break;case"d":m.w||(m.w=ai(m.z||Wt[14],br(wr(m.v)))),s(l,0,m.w,"V");break;default:s(l,1,0,"")}}}s(l,-1,0,"EOD");var E=`\r
`,D=l.join(E);return D}}();return{to_workbook:n,to_sheet:r,from_sheet:i}}(),Wf=function(){function e(m){return m.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
`)}function t(m){return m.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function r(m,d){for(var g=m.split(`
`),v=-1,p=-1,_=0,E=[];_!==g.length;++_){var D=g[_].trim().split(":");if(D[0]==="cell"){var A=nr(D[1]);if(E.length<=A.r)for(v=E.length;v<=A.r;++v)E[v]||(E[v]=[]);switch(v=A.r,p=A.c,D[2]){case"t":E[v][p]=e(D[3]);break;case"v":E[v][p]=+D[3];break;case"vtf":var S=D[D.length-1];case"vtc":switch(D[3]){case"nl":E[v][p]=!!+D[4];break;default:E[v][p]=+D[4];break}D[2]=="vtf"&&(E[v][p]=[E[v][p],S])}}}return d&&d.sheetRows&&(E=E.slice(0,d.sheetRows)),E}function n(m,d){return da(r(m,d),d)}function i(m,d){return Bi(n(m,d),d)}var a=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
`),s=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
`)+`
`,o=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
`),c="--SocialCalcSpreadsheetControlSave--";function l(m){if(!m||!m["!ref"])return"";for(var d=[],g=[],v,p="",_=Mr(m["!ref"]),E=Array.isArray(m),D=_.s.r;D<=_.e.r;++D)for(var A=_.s.c;A<=_.e.c;++A)if(p=Tt({r:D,c:A}),v=E?(m[D]||[])[A]:m[p],!(!v||v.v==null||v.t==="z")){switch(g=["cell",p,"t"],v.t){case"s":case"str":g.push(t(v.v));break;case"n":v.f?(g[2]="vtf",g[3]="n",g[4]=v.v,g[5]=t(v.f)):(g[2]="v",g[3]=v.v);break;case"b":g[2]="vt"+(v.f?"f":"c"),g[3]="nl",g[4]=v.v?"1":"0",g[5]=t(v.f||(v.v?"TRUE":"FALSE"));break;case"d":var S=br(wr(v.v));g[2]="vtc",g[3]="nd",g[4]=""+S,g[5]=v.w||ai(v.z||Wt[14],S);break;case"e":continue}d.push(g.join(":"))}return d.push("sheet:c:"+(_.e.c-_.s.c+1)+":r:"+(_.e.r-_.s.r+1)+":tvf:1"),d.push("valueformat:1:text-wiki"),d.join(`
`)}function u(m){return[a,s,o,s,l(m),c].join(`
`)}return{to_workbook:i,to_sheet:n,from_sheet:u}}(),ng=function(){function e(u,m,d,g,v){v.raw?m[d][g]=u:u===""||(u==="TRUE"?m[d][g]=!0:u==="FALSE"?m[d][g]=!1:isNaN(Un(u))?isNaN(Ga(u).getDate())?m[d][g]=u:m[d][g]=wr(u):m[d][g]=Un(u))}function t(u,m){var d=m||{},g=[];if(!u||u.length===0)return g;for(var v=u.split(/[\r\n]/),p=v.length-1;p>=0&&v[p].length===0;)--p;for(var _=10,E=0,D=0;D<=p;++D)E=v[D].indexOf(" "),E==-1?E=v[D].length:E++,_=Math.max(_,E);for(D=0;D<=p;++D){g[D]=[];var A=0;for(e(v[D].slice(0,_).trim(),g,D,A,d),A=1;A<=(v[D].length-_)/10+1;++A)e(v[D].slice(_+(A-1)*10,_+A*10).trim(),g,D,A,d)}return d.sheetRows&&(g=g.slice(0,d.sheetRows)),g}var r={44:",",9:"	",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function i(u){for(var m={},d=!1,g=0,v=0;g<u.length;++g)(v=u.charCodeAt(g))==34?d=!d:!d&&v in r&&(m[v]=(m[v]||0)+1);v=[];for(g in m)Object.prototype.hasOwnProperty.call(m,g)&&v.push([m[g],g]);if(!v.length){m=n;for(g in m)Object.prototype.hasOwnProperty.call(m,g)&&v.push([m[g],g])}return v.sort(function(p,_){return p[0]-_[0]||n[p[1]]-n[_[1]]}),r[v.pop()[1]]||44}function a(u,m){var d=m||{},g="",v=d.dense?[]:{},p={s:{c:0,r:0},e:{c:0,r:0}};u.slice(0,4)=="sep="?u.charCodeAt(5)==13&&u.charCodeAt(6)==10?(g=u.charAt(4),u=u.slice(7)):u.charCodeAt(5)==13||u.charCodeAt(5)==10?(g=u.charAt(4),u=u.slice(6)):g=i(u.slice(0,1024)):d&&d.FS?g=d.FS:g=i(u.slice(0,1024));var _=0,E=0,D=0,A=0,S=0,I=g.charCodeAt(0),U=!1,R=0,Y=u.charCodeAt(0);u=u.replace(/\r\n/mg,`
`);var W=d.dateNF!=null?_p(d.dateNF):null;function Z(){var N=u.slice(A,S),M={};if(N.charAt(0)=='"'&&N.charAt(N.length-1)=='"'&&(N=N.slice(1,-1).replace(/""/g,'"')),N.length===0)M.t="z";else if(d.raw)M.t="s",M.v=N;else if(N.trim().length===0)M.t="s",M.v=N;else if(N.charCodeAt(0)==61)N.charCodeAt(1)==34&&N.charCodeAt(N.length-1)==34?(M.t="s",M.v=N.slice(2,-1).replace(/""/g,'"')):tx(N)?(M.t="n",M.f=N.slice(1)):(M.t="s",M.v=N);else if(N=="TRUE")M.t="b",M.v=!0;else if(N=="FALSE")M.t="b",M.v=!1;else if(!isNaN(D=Un(N)))M.t="n",d.cellText!==!1&&(M.w=N),M.v=D;else if(!isNaN(Ga(N).getDate())||W&&N.match(W)){M.z=d.dateNF||Wt[14];var G=0;W&&N.match(W)&&(N=Ep(N,d.dateNF,N.match(W)||[]),G=1),d.cellDates?(M.t="d",M.v=wr(N,G)):(M.t="n",M.v=br(wr(N,G))),d.cellText!==!1&&(M.w=ai(M.z,M.v instanceof Date?br(M.v):M.v)),d.cellNF||delete M.z}else M.t="s",M.v=N;if(M.t=="z"||(d.dense?(v[_]||(v[_]=[]),v[_][E]=M):v[Tt({c:E,r:_})]=M),A=S+1,Y=u.charCodeAt(A),p.e.c<E&&(p.e.c=E),p.e.r<_&&(p.e.r=_),R==I)++E;else if(E=0,++_,d.sheetRows&&d.sheetRows<=_)return!0}e:for(;S<u.length;++S)switch(R=u.charCodeAt(S)){case 34:Y===34&&(U=!U);break;case I:case 10:case 13:if(!U&&Z())break e;break}return S-A>0&&Z(),v["!ref"]=Gt(p),v}function s(u,m){return!(m&&m.PRN)||m.FS||u.slice(0,4)=="sep="||u.indexOf("	")>=0||u.indexOf(",")>=0||u.indexOf(";")>=0?a(u,m):da(t(u,m),m)}function o(u,m){var d="",g=m.type=="string"?[0,0,0,0]:mE(u,m);switch(m.type){case"base64":d=Vn(u);break;case"binary":d=u;break;case"buffer":m.codepage==65001?d=u.toString("utf8"):m.codepage&&typeof _i<"u"?d=_i.utils.decode(m.codepage,u):d=wt&&rt.isBuffer(u)?u.toString("binary"):es(u);break;case"array":d=Do(u);break;case"string":d=u;break;default:throw new Error("Unrecognized type "+m.type)}return g[0]==239&&g[1]==187&&g[2]==191?d=Oa(d.slice(3)):m.type!="string"&&m.type!="buffer"&&m.codepage==65001?d=Oa(d):m.type=="binary"&&typeof _i<"u"&&m.codepage&&(d=_i.utils.decode(m.codepage,_i.utils.encode(28591,d))),d.slice(0,19)=="socialcalc:version:"?Wf.to_sheet(m.type=="string"?d:Oa(d),m):s(d,m)}function c(u,m){return Bi(o(u,m),m)}function l(u){for(var m=[],d=jt(u["!ref"]),g,v=Array.isArray(u),p=d.s.r;p<=d.e.r;++p){for(var _=[],E=d.s.c;E<=d.e.c;++E){var D=Tt({r:p,c:E});if(g=v?(u[p]||[])[E]:u[D],!g||g.v==null){_.push("          ");continue}for(var A=(g.w||(Hn(g),g.w)||"").slice(0,10);A.length<10;)A+=" ";_.push(A+(E===0?" ":""))}m.push(_.join(""))}return m.join(`
`)}return{to_workbook:c,to_sheet:o,from_sheet:l}}(),yu=function(){function e(O,K,z){if(O){Br(O,O.l||0);for(var X=z.Enum||Ce;O.l<O.length;){var ee=O.read_shift(2),ye=X[ee]||X[65535],xe=O.read_shift(2),me=O.l+xe,se=ye.f&&ye.f(O,xe,z);if(O.l=me,K(se,ye,ee))return}}}function t(O,K){switch(K.type){case"base64":return r(on(Vn(O)),K);case"binary":return r(on(O),K);case"buffer":case"array":return r(O,K)}throw"Unsupported type "+K.type}function r(O,K){if(!O)return O;var z=K||{},X=z.dense?[]:{},ee="Sheet1",ye="",xe=0,me={},se=[],be=[],Le={s:{r:0,c:0},e:{r:0,c:0}},Ye=z.sheetRows||0;if(O[2]==0&&(O[3]==8||O[3]==9)&&O.length>=16&&O[14]==5&&O[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(O[2]==2)z.Enum=Ce,e(O,function(_e,Fe,Pe){switch(Pe){case 0:z.vers=_e,_e>=4096&&(z.qpro=!0);break;case 6:Le=_e;break;case 204:_e&&(ye=_e);break;case 222:ye=_e;break;case 15:case 51:z.qpro||(_e[1].v=_e[1].v.slice(1));case 13:case 14:case 16:Pe==14&&(_e[2]&112)==112&&(_e[2]&15)>1&&(_e[2]&15)<15&&(_e[1].z=z.dateNF||Wt[14],z.cellDates&&(_e[1].t="d",_e[1].v=nf(_e[1].v))),z.qpro&&_e[3]>xe&&(X["!ref"]=Gt(Le),me[ee]=X,se.push(ee),X=z.dense?[]:{},Le={s:{r:0,c:0},e:{r:0,c:0}},xe=_e[3],ee=ye||"Sheet"+(xe+1),ye="");var ge=z.dense?(X[_e[0].r]||[])[_e[0].c]:X[Tt(_e[0])];if(ge){ge.t=_e[1].t,ge.v=_e[1].v,_e[1].z!=null&&(ge.z=_e[1].z),_e[1].f!=null&&(ge.f=_e[1].f);break}z.dense?(X[_e[0].r]||(X[_e[0].r]=[]),X[_e[0].r][_e[0].c]=_e[1]):X[Tt(_e[0])]=_e[1];break}},z);else if(O[2]==26||O[2]==14)z.Enum=Te,O[2]==14&&(z.qpro=!0,O.l=0),e(O,function(_e,Fe,Pe){switch(Pe){case 204:ee=_e;break;case 22:_e[1].v=_e[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(_e[3]>xe&&(X["!ref"]=Gt(Le),me[ee]=X,se.push(ee),X=z.dense?[]:{},Le={s:{r:0,c:0},e:{r:0,c:0}},xe=_e[3],ee="Sheet"+(xe+1)),Ye>0&&_e[0].r>=Ye)break;z.dense?(X[_e[0].r]||(X[_e[0].r]=[]),X[_e[0].r][_e[0].c]=_e[1]):X[Tt(_e[0])]=_e[1],Le.e.c<_e[0].c&&(Le.e.c=_e[0].c),Le.e.r<_e[0].r&&(Le.e.r=_e[0].r);break;case 27:_e[14e3]&&(be[_e[14e3][0]]=_e[14e3][1]);break;case 1537:be[_e[0]]=_e[1],_e[0]==xe&&(ee=_e[1]);break}},z);else throw new Error("Unrecognized LOTUS BOF "+O[2]);if(X["!ref"]=Gt(Le),me[ye||ee]=X,se.push(ye||ee),!be.length)return{SheetNames:se,Sheets:me};for(var We={},ft=[],He=0;He<be.length;++He)me[se[He]]?(ft.push(be[He]||se[He]),We[be[He]]=me[be[He]]||me[se[He]]):(ft.push(be[He]),We[be[He]]={"!ref":"A1"});return{SheetNames:ft,Sheets:We}}function n(O,K){var z=K||{};if(+z.codepage>=0&&Ha(+z.codepage),z.type=="string")throw new Error("Cannot write WK1 to JS string");var X=Fr(),ee=jt(O["!ref"]),ye=Array.isArray(O),xe=[];Ne(X,0,a(1030)),Ne(X,6,c(ee));for(var me=Math.min(ee.e.r,8191),se=ee.s.r;se<=me;++se)for(var be=fr(se),Le=ee.s.c;Le<=ee.e.c;++Le){se===ee.s.r&&(xe[Le]=pr(Le));var Ye=xe[Le]+be,We=ye?(O[se]||[])[Le]:O[Ye];if(!(!We||We.t=="z"))if(We.t=="n")(We.v|0)==We.v&&We.v>=-32768&&We.v<=32767?Ne(X,13,g(se,Le,We.v)):Ne(X,14,p(se,Le,We.v));else{var ft=Hn(We);Ne(X,15,m(se,Le,ft.slice(0,239)))}}return Ne(X,1),X.end()}function i(O,K){var z=K||{};if(+z.codepage>=0&&Ha(+z.codepage),z.type=="string")throw new Error("Cannot write WK3 to JS string");var X=Fr();Ne(X,0,s(O));for(var ee=0,ye=0;ee<O.SheetNames.length;++ee)(O.Sheets[O.SheetNames[ee]]||{})["!ref"]&&Ne(X,27,pe(O.SheetNames[ee],ye++));var xe=0;for(ee=0;ee<O.SheetNames.length;++ee){var me=O.Sheets[O.SheetNames[ee]];if(!(!me||!me["!ref"])){for(var se=jt(me["!ref"]),be=Array.isArray(me),Le=[],Ye=Math.min(se.e.r,8191),We=se.s.r;We<=Ye;++We)for(var ft=fr(We),He=se.s.c;He<=se.e.c;++He){We===se.s.r&&(Le[He]=pr(He));var _e=Le[He]+ft,Fe=be?(me[We]||[])[He]:me[_e];if(!(!Fe||Fe.t=="z"))if(Fe.t=="n")Ne(X,23,Z(We,He,xe,Fe.v));else{var Pe=Hn(Fe);Ne(X,22,R(We,He,xe,Pe.slice(0,239)))}}++xe}}return Ne(X,1),X.end()}function a(O){var K=ue(2);return K.write_shift(2,O),K}function s(O){var K=ue(26);K.write_shift(2,4096),K.write_shift(2,4),K.write_shift(4,0);for(var z=0,X=0,ee=0,ye=0;ye<O.SheetNames.length;++ye){var xe=O.SheetNames[ye],me=O.Sheets[xe];if(!(!me||!me["!ref"])){++ee;var se=Mr(me["!ref"]);z<se.e.r&&(z=se.e.r),X<se.e.c&&(X=se.e.c)}}return z>8191&&(z=8191),K.write_shift(2,z),K.write_shift(1,ee),K.write_shift(1,X),K.write_shift(2,0),K.write_shift(2,0),K.write_shift(1,1),K.write_shift(1,2),K.write_shift(4,0),K.write_shift(4,0),K}function o(O,K,z){var X={s:{c:0,r:0},e:{c:0,r:0}};return K==8&&z.qpro?(X.s.c=O.read_shift(1),O.l++,X.s.r=O.read_shift(2),X.e.c=O.read_shift(1),O.l++,X.e.r=O.read_shift(2),X):(X.s.c=O.read_shift(2),X.s.r=O.read_shift(2),K==12&&z.qpro&&(O.l+=2),X.e.c=O.read_shift(2),X.e.r=O.read_shift(2),K==12&&z.qpro&&(O.l+=2),X.s.c==65535&&(X.s.c=X.e.c=X.s.r=X.e.r=0),X)}function c(O){var K=ue(8);return K.write_shift(2,O.s.c),K.write_shift(2,O.s.r),K.write_shift(2,O.e.c),K.write_shift(2,O.e.r),K}function l(O,K,z){var X=[{c:0,r:0},{t:"n",v:0},0,0];return z.qpro&&z.vers!=20768?(X[0].c=O.read_shift(1),X[3]=O.read_shift(1),X[0].r=O.read_shift(2),O.l+=2):(X[2]=O.read_shift(1),X[0].c=O.read_shift(2),X[0].r=O.read_shift(2)),X}function u(O,K,z){var X=O.l+K,ee=l(O,K,z);if(ee[1].t="s",z.vers==20768){O.l++;var ye=O.read_shift(1);return ee[1].v=O.read_shift(ye,"utf8"),ee}return z.qpro&&O.l++,ee[1].v=O.read_shift(X-O.l,"cstr"),ee}function m(O,K,z){var X=ue(7+z.length);X.write_shift(1,255),X.write_shift(2,K),X.write_shift(2,O),X.write_shift(1,39);for(var ee=0;ee<X.length;++ee){var ye=z.charCodeAt(ee);X.write_shift(1,ye>=128?95:ye)}return X.write_shift(1,0),X}function d(O,K,z){var X=l(O,K,z);return X[1].v=O.read_shift(2,"i"),X}function g(O,K,z){var X=ue(7);return X.write_shift(1,255),X.write_shift(2,K),X.write_shift(2,O),X.write_shift(2,z,"i"),X}function v(O,K,z){var X=l(O,K,z);return X[1].v=O.read_shift(8,"f"),X}function p(O,K,z){var X=ue(13);return X.write_shift(1,255),X.write_shift(2,K),X.write_shift(2,O),X.write_shift(8,z,"f"),X}function _(O,K,z){var X=O.l+K,ee=l(O,K,z);if(ee[1].v=O.read_shift(8,"f"),z.qpro)O.l=X;else{var ye=O.read_shift(2);S(O.slice(O.l,O.l+ye),ee),O.l+=ye}return ee}function E(O,K,z){var X=K&32768;return K&=-32769,K=(X?O:0)+(K>=8192?K-16384:K),(X?"":"$")+(z?pr(K):fr(K))}var D={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]},A=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function S(O,K){Br(O,0);for(var z=[],X=0,ee="",ye="",xe="",me="";O.l<O.length;){var se=O[O.l++];switch(se){case 0:z.push(O.read_shift(8,"f"));break;case 1:ye=E(K[0].c,O.read_shift(2),!0),ee=E(K[0].r,O.read_shift(2),!1),z.push(ye+ee);break;case 2:{var be=E(K[0].c,O.read_shift(2),!0),Le=E(K[0].r,O.read_shift(2),!1);ye=E(K[0].c,O.read_shift(2),!0),ee=E(K[0].r,O.read_shift(2),!1),z.push(be+Le+":"+ye+ee)}break;case 3:if(O.l<O.length){console.error("WK1 premature formula end");return}break;case 4:z.push("("+z.pop()+")");break;case 5:z.push(O.read_shift(2));break;case 6:{for(var Ye="";se=O[O.l++];)Ye+=String.fromCharCode(se);z.push('"'+Ye.replace(/"/g,'""')+'"')}break;case 8:z.push("-"+z.pop());break;case 23:z.push("+"+z.pop());break;case 22:z.push("NOT("+z.pop()+")");break;case 20:case 21:me=z.pop(),xe=z.pop(),z.push(["AND","OR"][se-20]+"("+xe+","+me+")");break;default:if(se<32&&A[se])me=z.pop(),xe=z.pop(),z.push(xe+A[se]+me);else if(D[se]){if(X=D[se][1],X==69&&(X=O[O.l++]),X>z.length){console.error("WK1 bad formula parse 0x"+se.toString(16)+":|"+z.join("|")+"|");return}var We=z.slice(-X);z.length-=X,z.push(D[se][0]+"("+We.join(",")+")")}else return se<=7?console.error("WK1 invalid opcode "+se.toString(16)):se<=24?console.error("WK1 unsupported op "+se.toString(16)):se<=30?console.error("WK1 invalid opcode "+se.toString(16)):se<=115?console.error("WK1 unsupported function opcode "+se.toString(16)):console.error("WK1 unrecognized opcode "+se.toString(16))}}z.length==1?K[1].f=""+z[0]:console.error("WK1 bad formula parse |"+z.join("|")+"|")}function I(O){var K=[{c:0,r:0},{t:"n",v:0},0];return K[0].r=O.read_shift(2),K[3]=O[O.l++],K[0].c=O[O.l++],K}function U(O,K){var z=I(O);return z[1].t="s",z[1].v=O.read_shift(K-4,"cstr"),z}function R(O,K,z,X){var ee=ue(6+X.length);ee.write_shift(2,O),ee.write_shift(1,z),ee.write_shift(1,K),ee.write_shift(1,39);for(var ye=0;ye<X.length;++ye){var xe=X.charCodeAt(ye);ee.write_shift(1,xe>=128?95:xe)}return ee.write_shift(1,0),ee}function Y(O,K){var z=I(O);z[1].v=O.read_shift(2);var X=z[1].v>>1;if(z[1].v&1)switch(X&7){case 0:X=(X>>3)*5e3;break;case 1:X=(X>>3)*500;break;case 2:X=(X>>3)/20;break;case 3:X=(X>>3)/200;break;case 4:X=(X>>3)/2e3;break;case 5:X=(X>>3)/2e4;break;case 6:X=(X>>3)/16;break;case 7:X=(X>>3)/64;break}return z[1].v=X,z}function W(O,K){var z=I(O),X=O.read_shift(4),ee=O.read_shift(4),ye=O.read_shift(2);if(ye==65535)return X===0&&ee===3221225472?(z[1].t="e",z[1].v=15):X===0&&ee===3489660928?(z[1].t="e",z[1].v=42):z[1].v=0,z;var xe=ye&32768;return ye=(ye&32767)-16446,z[1].v=(1-xe*2)*(ee*Math.pow(2,ye+32)+X*Math.pow(2,ye)),z}function Z(O,K,z,X){var ee=ue(14);if(ee.write_shift(2,O),ee.write_shift(1,z),ee.write_shift(1,K),X==0)return ee.write_shift(4,0),ee.write_shift(4,0),ee.write_shift(2,65535),ee;var ye=0,xe=0,me=0,se=0;return X<0&&(ye=1,X=-X),xe=Math.log2(X)|0,X/=Math.pow(2,xe-31),se=X>>>0,se&2147483648||(X/=2,++xe,se=X>>>0),X-=se,se|=2147483648,se>>>=0,X*=Math.pow(2,32),me=X>>>0,ee.write_shift(4,me),ee.write_shift(4,se),xe+=16383+(ye?32768:0),ee.write_shift(2,xe),ee}function N(O,K){var z=W(O);return O.l+=K-14,z}function M(O,K){var z=I(O),X=O.read_shift(4);return z[1].v=X>>6,z}function G(O,K){var z=I(O),X=O.read_shift(8,"f");return z[1].v=X,z}function b(O,K){var z=G(O);return O.l+=K-10,z}function V(O,K){return O[O.l+K-1]==0?O.read_shift(K,"cstr"):""}function q(O,K){var z=O[O.l++];z>K-1&&(z=K-1);for(var X="";X.length<z;)X+=String.fromCharCode(O[O.l++]);return X}function re(O,K,z){if(!(!z.qpro||K<21)){var X=O.read_shift(1);O.l+=17,O.l+=1,O.l+=2;var ee=O.read_shift(K-21,"cstr");return[X,ee]}}function le(O,K){for(var z={},X=O.l+K;O.l<X;){var ee=O.read_shift(2);if(ee==14e3){for(z[ee]=[0,""],z[ee][0]=O.read_shift(2);O[O.l];)z[ee][1]+=String.fromCharCode(O[O.l]),O.l++;O.l++}}return z}function pe(O,K){var z=ue(5+O.length);z.write_shift(2,14e3),z.write_shift(2,K);for(var X=0;X<O.length;++X){var ee=O.charCodeAt(X);z[z.l++]=ee>127?95:ee}return z[z.l++]=0,z}var Ce={0:{n:"BOF",f:jf},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:o},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:d},14:{n:"NUMBER",f:v},15:{n:"LABEL",f:u},16:{n:"FORMULA",f:_},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:u},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:V},222:{n:"SHEETNAMELP",f:q},65535:{n:""}},Te={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:U},23:{n:"NUMBER17",f:W},24:{n:"NUMBER18",f:Y},25:{n:"FORMULA19",f:N},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:le},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:M},38:{n:"??"},39:{n:"NUMBER27",f:G},40:{n:"FORMULA28",f:b},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:V},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:re},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:n,book_to_wk3:i,to_workbook:t}}(),ig=/^\s|\s$|[\t\n\r]/;function zf(e,t){if(!t.bookSST)return"";var r=[Xt];r[r.length]=ke("sst",null,{xmlns:ha[0],count:e.Count,uniqueCount:e.Unique});for(var n=0;n!=e.length;++n)if(e[n]!=null){var i=e[n],a="<si>";i.r?a+=i.r:(a+="<t",i.t||(i.t=""),i.t.match(ig)&&(a+=' xml:space="preserve"'),a+=">"+Ct(i.t)+"</t>"),a+="</si>",r[r.length]=a}return r.length>2&&(r[r.length]="</sst>",r[1]=r[1].replace("/>",">")),r.join("")}function ag(e){return[e.read_shift(4),e.read_shift(4)]}function sg(e,t){return t||(t=ue(8)),t.write_shift(4,e.Count),t.write_shift(4,e.Unique),t}var og=Jp;function lg(e){var t=Fr();Ee(t,159,sg(e));for(var r=0;r<e.length;++r)Ee(t,19,og(e[r]));return Ee(t,160),t.end()}function cg(e){for(var t=[],r=e.split(""),n=0;n<r.length;++n)t[n]=r[n].charCodeAt(0);return t}function Vf(e){var t=0,r,n=cg(e),i=n.length+1,a,s,o,c,l;for(r=Ti(i),r[0]=n.length,a=1;a!=i;++a)r[a]=n[a-1];for(a=i-1;a>=0;--a)s=r[a],o=t&16384?1:0,c=t<<1&32767,l=o|c,t=l^s;return t^52811}var ug=function(){function e(i,a){switch(a.type){case"base64":return t(Vn(i),a);case"binary":return t(i,a);case"buffer":return t(wt&&rt.isBuffer(i)?i.toString("binary"):es(i),a);case"array":return t(Do(i),a)}throw new Error("Unrecognized type "+a.type)}function t(i,a){var s=a||{},o=s.dense?[]:{},c=i.match(/\\trowd.*?\\row\b/g);if(!c.length)throw new Error("RTF missing table");var l={s:{c:0,r:0},e:{c:0,r:c.length-1}};return c.forEach(function(u,m){Array.isArray(o)&&(o[m]=[]);for(var d=/\\\w+\b/g,g=0,v,p=-1;v=d.exec(u);){switch(v[0]){case"\\cell":var _=u.slice(g,d.lastIndex-v[0].length);if(_[0]==" "&&(_=_.slice(1)),++p,_.length){var E={v:_,t:"s"};Array.isArray(o)?o[m][p]=E:o[Tt({r:m,c:p})]=E}break}g=d.lastIndex}p>l.e.c&&(l.e.c=p)}),o["!ref"]=Gt(l),o}function r(i,a){return Bi(e(i,a),a)}function n(i){for(var a=["{\\rtf1\\ansi"],s=jt(i["!ref"]),o,c=Array.isArray(i),l=s.s.r;l<=s.e.r;++l){a.push("\\trowd\\trautofit1");for(var u=s.s.c;u<=s.e.c;++u)a.push("\\cellx"+(u+1));for(a.push("\\pard\\intbl"),u=s.s.c;u<=s.e.c;++u){var m=Tt({r:l,c:u});o=c?(i[l]||[])[u]:i[m],!(!o||o.v==null&&(!o.f||o.F))&&(a.push(" "+(o.w||(Hn(o),o.w))),a.push("\\cell"))}a.push("\\pard\\intbl\\row")}return a.join("")+"}"}return{to_workbook:r,to_sheet:e,from_sheet:n}}();function Du(e){for(var t=0,r=1;t!=3;++t)r=r*256+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}var fg=6,Wn=fg;function eo(e){return Math.floor((e+Math.round(128/Wn)/256)*Wn)}function to(e){return Math.floor((e-5)/Wn*100+.5)/100}function gl(e){return Math.round((e*Wn+5)/Wn*256)/256}function rc(e){e.width?(e.wpx=eo(e.width),e.wch=to(e.wpx),e.MDW=Wn):e.wpx?(e.wch=to(e.wpx),e.width=gl(e.wch),e.MDW=Wn):typeof e.wch=="number"&&(e.width=gl(e.wch),e.wpx=eo(e.width),e.MDW=Wn),e.customWidth&&delete e.customWidth}var hg=96,Hf=hg;function ro(e){return e*96/Hf}function $f(e){return e*Hf/96}function dg(e){var t=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var n=r[0];n<=r[1];++n)e[n]!=null&&(t[t.length]=ke("numFmt",null,{numFmtId:n,formatCode:Ct(e[n])}))}),t.length===1?"":(t[t.length]="</numFmts>",t[0]=ke("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}function pg(e){var t=[];return t[t.length]=ke("cellXfs",null),e.forEach(function(r){t[t.length]=ke("xf",null,r)}),t[t.length]="</cellXfs>",t.length===2?"":(t[0]=ke("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}function Gf(e,t){var r=[Xt,ke("styleSheet",null,{xmlns:ha[0],"xmlns:vt":rr.vt})],n;return e.SSF&&(n=dg(e.SSF))!=null&&(r[r.length]=n),r[r.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',r[r.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',r[r.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',r[r.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(n=pg(t.cellXfs))&&(r[r.length]=n),r[r.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',r[r.length]='<dxfs count="0"/>',r[r.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',r.length>2&&(r[r.length]="</styleSheet>",r[1]=r[1].replace("/>",">")),r.join("")}function mg(e,t){var r=e.read_shift(2),n=mr(e);return[r,n]}function gg(e,t,r){r||(r=ue(6+4*t.length)),r.write_shift(2,e),ir(t,r);var n=r.length>r.l?r.slice(0,r.l):r;return r.l==null&&(r.l=r.length),n}function xg(e,t,r){var n={};n.sz=e.read_shift(2)/20;var i=im(e);i.fItalic&&(n.italic=1),i.fCondense&&(n.condense=1),i.fExtend&&(n.extend=1),i.fShadow&&(n.shadow=1),i.fOutline&&(n.outline=1),i.fStrikeout&&(n.strike=1);var a=e.read_shift(2);switch(a===700&&(n.bold=1),e.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript";break}var s=e.read_shift(1);s!=0&&(n.underline=s);var o=e.read_shift(1);o>0&&(n.family=o);var c=e.read_shift(1);switch(c>0&&(n.charset=c),e.l++,n.color=nm(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=mr(e),n}function vg(e,t){t||(t=ue(25+4*32)),t.write_shift(2,e.sz*20),am(e,t),t.write_shift(2,e.bold?700:400);var r=0;e.vertAlign=="superscript"?r=1:e.vertAlign=="subscript"&&(r=2),t.write_shift(2,r),t.write_shift(1,e.underline||0),t.write_shift(1,e.family||0),t.write_shift(1,e.charset||0),t.write_shift(1,0),Zs(e.color,t);var n=0;return e.scheme=="major"&&(n=1),e.scheme=="minor"&&(n=2),t.write_shift(1,n),ir(e.name,t),t.length>t.l?t.slice(0,t.l):t}var _g=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],Ho,Eg=En;function Au(e,t){t||(t=ue(4*3+8*7+16*1)),Ho||(Ho=Hl(_g));var r=Ho[e.patternType];r==null&&(r=40),t.write_shift(4,r);var n=0;if(r!=40)for(Zs({auto:1},t),Zs({auto:1},t);n<12;++n)t.write_shift(4,0);else{for(;n<4;++n)t.write_shift(4,0);for(;n<12;++n)t.write_shift(4,0)}return t.length>t.l?t.slice(0,t.l):t}function wg(e,t){var r=e.l+t,n=e.read_shift(2),i=e.read_shift(2);return e.l=r,{ixfe:n,numFmtId:i}}function Xf(e,t,r){r||(r=ue(16)),r.write_shift(2,t||0),r.write_shift(2,e.numFmtId||0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(1,0),r.write_shift(1,0);var n=0;return r.write_shift(1,n),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(1,0),r}function va(e,t){return t||(t=ue(10)),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(4,0),t.write_shift(4,0),t}var yg=En;function Dg(e,t){return t||(t=ue(51)),t.write_shift(1,0),va(null,t),va(null,t),va(null,t),va(null,t),va(null,t),t.length>t.l?t.slice(0,t.l):t}function Ag(e,t){return t||(t=ue(12+4*10)),t.write_shift(4,e.xfId),t.write_shift(2,1),t.write_shift(1,+e.builtinId),t.write_shift(1,0),Js(e.name||"",t),t.length>t.l?t.slice(0,t.l):t}function Cg(e,t,r){var n=ue(2052);return n.write_shift(4,e),Js(t,n),Js(r,n),n.length>n.l?n.slice(0,n.l):n}function Tg(e,t){if(t){var r=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var i=n[0];i<=n[1];++i)t[i]!=null&&++r}),r!=0&&(Ee(e,615,cn(r)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var i=n[0];i<=n[1];++i)t[i]!=null&&Ee(e,44,gg(i,t[i]))}),Ee(e,616))}}function Sg(e){var t=1;Ee(e,611,cn(t)),Ee(e,43,vg({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),Ee(e,612)}function Fg(e){var t=2;Ee(e,603,cn(t)),Ee(e,45,Au({patternType:"none"})),Ee(e,45,Au({patternType:"gray125"})),Ee(e,604)}function bg(e){var t=1;Ee(e,613,cn(t)),Ee(e,46,Dg()),Ee(e,614)}function kg(e){var t=1;Ee(e,626,cn(t)),Ee(e,47,Xf({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),Ee(e,627)}function Ng(e,t){Ee(e,617,cn(t.length)),t.forEach(function(r){Ee(e,47,Xf(r,0))}),Ee(e,618)}function Ig(e){var t=1;Ee(e,619,cn(t)),Ee(e,48,Ag({xfId:0,builtinId:0,name:"Normal"})),Ee(e,620)}function Og(e){var t=0;Ee(e,505,cn(t)),Ee(e,506)}function Bg(e){var t=0;Ee(e,508,Cg(t,"TableStyleMedium9","PivotStyleMedium4")),Ee(e,509)}function Pg(e,t){var r=Fr();return Ee(r,278),Tg(r,e.SSF),Sg(r),Fg(r),bg(r),kg(r),Ng(r,t.cellXfs),Ig(r),Og(r),Bg(r),Ee(r,279),r.end()}function Kf(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var r=[Xt];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}function jg(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:mr(e)}}function Rg(e){var t=ue(12+2*e.name.length);return t.write_shift(4,e.flags),t.write_shift(4,e.version),ir(e.name,t),t.slice(0,t.l)}function Lg(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function Mg(e){var t=ue(4+8*e.length);t.write_shift(4,e.length);for(var r=0;r<e.length;++r)t.write_shift(4,e[r][0]),t.write_shift(4,e[r][1]);return t}function Ug(e,t){var r=ue(8+2*t.length);return r.write_shift(4,e),ir(t,r),r.slice(0,r.l)}function Wg(e){return e.l+=4,e.read_shift(4)!=0}function zg(e,t){var r=ue(8);return r.write_shift(4,e),r.write_shift(4,1),r}function Vg(){var e=Fr();return Ee(e,332),Ee(e,334,cn(1)),Ee(e,335,Rg({name:"XLDAPR",version:12e4,flags:3496657072})),Ee(e,336),Ee(e,339,Ug(1,"XLDAPR")),Ee(e,52),Ee(e,35,cn(514)),Ee(e,4096,cn(0)),Ee(e,4097,Gr(1)),Ee(e,36),Ee(e,53),Ee(e,340),Ee(e,337,zg(1)),Ee(e,51,Mg([[1,0]])),Ee(e,338),Ee(e,333),e.end()}function Yf(){var e=[Xt];return e.push(`<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">
  <metadataTypes count="1">
    <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>
  </metadataTypes>
  <futureMetadata name="XLDAPR" count="1">
    <bk>
      <extLst>
        <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">
          <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>
        </ext>
      </extLst>
    </bk>
  </futureMetadata>
  <cellMetadata count="1">
    <bk>
      <rc t="1" v="0"/>
    </bk>
  </cellMetadata>
</metadata>`),e.join("")}function Hg(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=Tt(r);var n=e.read_shift(1);return n&2&&(t.l="1"),n&8&&(t.a="1"),t}var Zi=1024;function qf(e,t){for(var r=[21600,21600],n=["m0,0l0",r[1],r[0],r[1],r[0],"0xe"].join(","),i=[ke("xml",null,{"xmlns:v":Pr.v,"xmlns:o":Pr.o,"xmlns:x":Pr.x,"xmlns:mv":Pr.mv}).replace(/\/>/,">"),ke("o:shapelayout",ke("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),ke("v:shapetype",[ke("v:stroke",null,{joinstyle:"miter"}),ke("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:r.join(","),path:n})];Zi<e*1e3;)Zi+=1e3;return t.forEach(function(a){var s=nr(a[0]),o={color2:"#BEFF82",type:"gradient"};o.type=="gradient"&&(o.angle="-180");var c=o.type=="gradient"?ke("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,l=ke("v:fill",c,o),u={on:"t",obscured:"t"};++Zi,i=i.concat(["<v:shape"+Ka({id:"_x0000_s"+Zi,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(a[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",l,ke("v:shadow",null,u),ke("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",ur("x:Anchor",[s.c+1,0,s.r+1,0,s.c+3,20,s.r+5,20].join(",")),ur("x:AutoFill","False"),ur("x:Row",String(s.r)),ur("x:Column",String(s.c)),a[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),i.push("</xml>"),i.join("")}function Jf(e){var t=[Xt,ke("comments",null,{xmlns:ha[0]})],r=[];return t.push("<authors>"),e.forEach(function(n){n[1].forEach(function(i){var a=Ct(i.a);r.indexOf(a)==-1&&(r.push(a),t.push("<author>"+a+"</author>")),i.T&&i.ID&&r.indexOf("tc="+i.ID)==-1&&(r.push("tc="+i.ID),t.push("<author>tc="+i.ID+"</author>"))})}),r.length==0&&(r.push("SheetJ5"),t.push("<author>SheetJ5</author>")),t.push("</authors>"),t.push("<commentList>"),e.forEach(function(n){var i=0,a=[];if(n[1][0]&&n[1][0].T&&n[1][0].ID?i=r.indexOf("tc="+n[1][0].ID):n[1].forEach(function(c){c.a&&(i=r.indexOf(Ct(c.a))),a.push(c.t||"")}),t.push('<comment ref="'+n[0]+'" authorId="'+i+'"><text>'),a.length<=1)t.push(ur("t",Ct(a[0]||"")));else{for(var s=`Comment:
    `+a[0]+`
`,o=1;o<a.length;++o)s+=`Reply:
    `+a[o]+`
`;t.push(ur("t",Ct(s)))}t.push("</text></comment>")}),t.push("</commentList>"),t.length>2&&(t[t.length]="</comments>",t[1]=t[1].replace("/>",">")),t.join("")}function $g(e,t,r){var n=[Xt,ke("ThreadedComments",null,{xmlns:rr.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(i){var a="";(i[1]||[]).forEach(function(s,o){if(!s.T){delete s.ID;return}s.a&&t.indexOf(s.a)==-1&&t.push(s.a);var c={ref:i[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+r.tcid++).slice(-12)+"}"};o==0?a=c.id:c.parentId=a,s.ID=c.id,s.a&&(c.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(s.a)).slice(-12)+"}"),n.push(ke("threadedComment",ur("text",s.t||""),c))})}),n.push("</ThreadedComments>"),n.join("")}function Gg(e){var t=[Xt,ke("personList",null,{xmlns:rr.TCMNT,"xmlns:x":ha[0]}).replace(/[\/]>/,">")];return e.forEach(function(r,n){t.push(ke("person",null,{displayName:r,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:r,providerId:"None"}))}),t.push("</personList>"),t.join("")}function Xg(e){var t={};t.iauthor=e.read_shift(4);var r=Li(e);return t.rfx=r.s,t.ref=Tt(r.s),e.l+=16,t}function Kg(e,t){return t==null&&(t=ue(36)),t.write_shift(4,e[1].iauthor),pa(e[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}var Yg=mr;function qg(e){return ir(e.slice(0,54))}function Jg(e){var t=Fr(),r=[];return Ee(t,628),Ee(t,630),e.forEach(function(n){n[1].forEach(function(i){r.indexOf(i.a)>-1||(r.push(i.a.slice(0,54)),Ee(t,632,qg(i.a)))})}),Ee(t,631),Ee(t,633),e.forEach(function(n){n[1].forEach(function(i){i.iauthor=r.indexOf(i.a);var a={s:nr(n[0]),e:nr(n[0])};Ee(t,635,Kg([a,i])),i.t&&i.t.length>0&&Ee(t,637,Qp(i)),Ee(t,636),delete i.iauthor})}),Ee(t,634),Ee(t,629),t.end()}function Zg(e,t){t.FullPaths.forEach(function(r,n){if(n!=0){var i=r.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");i.slice(-1)!=="/"&&St.utils.cfb_add(e,i,t.FileIndex[n].content)}})}var Zf=["xlsb","xlsm","xlam","biff8","xla"],Qg=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(n,i,a,s){var o=!1,c=!1;a.length==0?c=!0:a.charAt(0)=="["&&(c=!0,a=a.slice(1,-1)),s.length==0?o=!0:s.charAt(0)=="["&&(o=!0,s=s.slice(1,-1));var l=a.length>0?parseInt(a,10)|0:0,u=s.length>0?parseInt(s,10)|0:0;return o?u+=t.c:--u,c?l+=t.r:--l,i+(o?"":"$")+pr(u)+(c?"":"$")+fr(l)}return function(i,a){return t=a,i.replace(e,r)}}(),nc=/(^|[^._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,ic=function(){return function(t,r){return t.replace(nc,function(n,i,a,s,o,c){var l=Jl(s)-(a?0:r.c),u=ql(c)-(o?0:r.r),m=u==0?"":o?u+1:"["+u+"]",d=l==0?"":a?l+1:"["+l+"]";return i+"R"+m+"C"+d})}}();function ex(e,t){return e.replace(nc,function(r,n,i,a,s,o){return n+(i=="$"?i+a:pr(Jl(a)+t.c))+(s=="$"?s+o:fr(ql(o)+t.r))})}function tx(e){return e.length!=1}function Ht(e){e.l+=1}function si(e,t){var r=e.read_shift(2);return[r&16383,r>>14&1,r>>15&1]}function Qf(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return eh(e);r.biff==12&&(n=4)}var i=e.read_shift(n),a=e.read_shift(n),s=si(e),o=si(e);return{s:{r:i,c:s[0],cRel:s[1],rRel:s[2]},e:{r:a,c:o[0],cRel:o[1],rRel:o[2]}}}function eh(e){var t=si(e),r=si(e),n=e.read_shift(1),i=e.read_shift(1);return{s:{r:t[0],c:n,cRel:t[1],rRel:t[2]},e:{r:r[0],c:i,cRel:r[1],rRel:r[2]}}}function rx(e,t,r){if(r.biff<8)return eh(e);var n=e.read_shift(r.biff==12?4:2),i=e.read_shift(r.biff==12?4:2),a=si(e),s=si(e);return{s:{r:n,c:a[0],cRel:a[1],rRel:a[2]},e:{r:i,c:s[0],cRel:s[1],rRel:s[2]}}}function th(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return nx(e);var n=e.read_shift(r&&r.biff==12?4:2),i=si(e);return{r:n,c:i[0],cRel:i[1],rRel:i[2]}}function nx(e){var t=si(e),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function ix(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}function ax(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return sx(e);var i=e.read_shift(n>=12?4:2),a=e.read_shift(2),s=(a&16384)>>14,o=(a&32768)>>15;if(a&=16383,o==1)for(;i>524287;)i-=1048576;if(s==1)for(;a>8191;)a=a-16384;return{r:i,c:a,cRel:s,rRel:o}}function sx(e){var t=e.read_shift(2),r=e.read_shift(1),n=(t&32768)>>15,i=(t&16384)>>14;return t&=16383,n==1&&t>=8192&&(t=t-16384),i==1&&r>=128&&(r=r-256),{r:t,c:r,cRel:i,rRel:n}}function ox(e,t,r){var n=(e[e.l++]&96)>>5,i=Qf(e,r.biff>=2&&r.biff<=5?6:8,r);return[n,i]}function lx(e,t,r){var n=(e[e.l++]&96)>>5,i=e.read_shift(2,"i"),a=8;if(r)switch(r.biff){case 5:e.l+=12,a=6;break;case 12:a=12;break}var s=Qf(e,a,r);return[n,i,s]}function cx(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[n]}function ux(e,t,r){var n=(e[e.l++]&96)>>5,i=e.read_shift(2),a=8;if(r)switch(r.biff){case 5:e.l+=12,a=6;break;case 12:a=12;break}return e.l+=a,[n,i]}function fx(e,t,r){var n=(e[e.l++]&96)>>5,i=rx(e,t-1,r);return[n,i]}function hx(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r.biff==2?6:r.biff==12?14:7,[n]}function Cu(e){var t=e[e.l+1]&1,r=1;return e.l+=4,[t,r]}function dx(e,t,r){e.l+=2;for(var n=e.read_shift(r&&r.biff==2?1:2),i=[],a=0;a<=n;++a)i.push(e.read_shift(r&&r.biff==2?1:2));return i}function px(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function mx(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function gx(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function xx(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=r&&r.biff==2?3:4,[n]}function rh(e){var t=e.read_shift(1),r=e.read_shift(1);return[t,r]}function vx(e){return e.read_shift(2),rh(e)}function _x(e){return e.read_shift(2),rh(e)}function Ex(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var i=th(e,0,r);return[n,i]}function wx(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var i=ax(e,0,r);return[n,i]}function yx(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var i=e.read_shift(2);r&&r.biff==5&&(e.l+=12);var a=th(e,0,r);return[n,i,a]}function Dx(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var i=e.read_shift(r&&r.biff<=3?1:2);return[Dv[i],ah[i],n]}function Ax(e,t,r){var n=e[e.l++],i=e.read_shift(1),a=r&&r.biff<=3?[n==88?-1:0,e.read_shift(1)]:Cx(e);return[i,(a[0]===0?ah:yv)[a[1]]]}function Cx(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function Tx(e,t,r){e.l+=r&&r.biff==2?3:4}function Sx(e,t,r){if(e.l++,r&&r.biff==12)return[e.read_shift(4,"i"),0];var n=e.read_shift(2),i=e.read_shift(r&&r.biff==2?1:2);return[n,i]}function Fx(e){return e.l++,ns[e.read_shift(1)]}function bx(e){return e.l++,e.read_shift(2)}function kx(e){return e.l++,e.read_shift(1)!==0}function Nx(e){return e.l++,ma(e)}function Ix(e,t,r){return e.l++,Lf(e,t-1,r)}function Ox(e,t){var r=[e.read_shift(1)];if(t==12)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2;break}switch(r[0]){case 4:r[1]=ym(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:r[1]=ns[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:r[1]=ma(e);break;case 2:r[1]=Tm(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function Bx(e,t,r){for(var n=e.read_shift(r.biff==12?4:2),i=[],a=0;a!=n;++a)i.push((r.biff==12?Li:bm)(e));return i}function Px(e,t,r){var n=0,i=0;r.biff==12?(n=e.read_shift(4),i=e.read_shift(4)):(i=1+e.read_shift(1),n=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--n,--i==0&&(i=256));for(var a=0,s=[];a!=n&&(s[a]=[]);++a)for(var o=0;o!=i;++o)s[a][o]=Ox(e,r.biff);return s}function jx(e,t,r){var n=e.read_shift(1)>>>5&3,i=!r||r.biff>=8?4:2,a=e.read_shift(i);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[n,0,a]}function Rx(e,t,r){if(r.biff==5)return Lx(e);var n=e.read_shift(1)>>>5&3,i=e.read_shift(2),a=e.read_shift(4);return[n,i,a]}function Lx(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[t,r,n]}function Mx(e,t,r){var n=e.read_shift(1)>>>5&3;e.l+=r&&r.biff==2?3:4;var i=e.read_shift(r&&r.biff==2?1:2);return[n,i]}function Ux(e,t,r){var n=e.read_shift(1)>>>5&3,i=e.read_shift(r&&r.biff==2?1:2);return[n,i]}function Wx(e,t,r){var n=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,r.biff==12&&(e.l+=2),[n]}function zx(e,t,r){var n=(e[e.l++]&96)>>5,i=e.read_shift(2),a=4;if(r)switch(r.biff){case 5:a=15;break;case 12:a=6;break}return e.l+=a,[n,i]}var Vx=En,Hx=En,$x=En;function is(e,t,r){return e.l+=2,[ix(e)]}function ac(e){return e.l+=6,[]}var Gx=is,Xx=ac,Kx=ac,Yx=is;function nh(e){return e.l+=2,[jf(e),e.read_shift(2)&1]}var qx=is,Jx=nh,Zx=ac,Qx=is,ev=is,tv=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function rv(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),i=e.read_shift(2),a=e.read_shift(2),s=tv[r>>2&31];return{ixti:t,coltype:r&3,rt:s,idx:n,c:i,C:a}}function nv(e){return e.l+=2,[e.read_shift(4)]}function iv(e,t,r){return e.l+=5,e.l+=2,e.l+=r.biff==2?1:4,["PTGSHEET"]}function av(e,t,r){return e.l+=r.biff==2?4:5,["PTGENDSHEET"]}function sv(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function ov(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function lv(e){return e.l+=4,[0,0]}var Tu={1:{n:"PtgExp",f:Sx},2:{n:"PtgTbl",f:$x},3:{n:"PtgAdd",f:Ht},4:{n:"PtgSub",f:Ht},5:{n:"PtgMul",f:Ht},6:{n:"PtgDiv",f:Ht},7:{n:"PtgPower",f:Ht},8:{n:"PtgConcat",f:Ht},9:{n:"PtgLt",f:Ht},10:{n:"PtgLe",f:Ht},11:{n:"PtgEq",f:Ht},12:{n:"PtgGe",f:Ht},13:{n:"PtgGt",f:Ht},14:{n:"PtgNe",f:Ht},15:{n:"PtgIsect",f:Ht},16:{n:"PtgUnion",f:Ht},17:{n:"PtgRange",f:Ht},18:{n:"PtgUplus",f:Ht},19:{n:"PtgUminus",f:Ht},20:{n:"PtgPercent",f:Ht},21:{n:"PtgParen",f:Ht},22:{n:"PtgMissArg",f:Ht},23:{n:"PtgStr",f:Ix},26:{n:"PtgSheet",f:iv},27:{n:"PtgEndSheet",f:av},28:{n:"PtgErr",f:Fx},29:{n:"PtgBool",f:kx},30:{n:"PtgInt",f:bx},31:{n:"PtgNum",f:Nx},32:{n:"PtgArray",f:hx},33:{n:"PtgFunc",f:Dx},34:{n:"PtgFuncVar",f:Ax},35:{n:"PtgName",f:jx},36:{n:"PtgRef",f:Ex},37:{n:"PtgArea",f:ox},38:{n:"PtgMemArea",f:Mx},39:{n:"PtgMemErr",f:Vx},40:{n:"PtgMemNoMem",f:Hx},41:{n:"PtgMemFunc",f:Ux},42:{n:"PtgRefErr",f:Wx},43:{n:"PtgAreaErr",f:cx},44:{n:"PtgRefN",f:wx},45:{n:"PtgAreaN",f:fx},46:{n:"PtgMemAreaN",f:sv},47:{n:"PtgMemNoMemN",f:ov},57:{n:"PtgNameX",f:Rx},58:{n:"PtgRef3d",f:yx},59:{n:"PtgArea3d",f:lx},60:{n:"PtgRefErr3d",f:zx},61:{n:"PtgAreaErr3d",f:ux},255:{}},cv={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},uv={1:{n:"PtgElfLel",f:nh},2:{n:"PtgElfRw",f:Qx},3:{n:"PtgElfCol",f:Gx},6:{n:"PtgElfRwV",f:ev},7:{n:"PtgElfColV",f:Yx},10:{n:"PtgElfRadical",f:qx},11:{n:"PtgElfRadicalS",f:Zx},13:{n:"PtgElfColS",f:Xx},15:{n:"PtgElfColSV",f:Kx},16:{n:"PtgElfRadicalLel",f:Jx},25:{n:"PtgList",f:rv},29:{n:"PtgSxName",f:nv},255:{}},fv={0:{n:"PtgAttrNoop",f:lv},1:{n:"PtgAttrSemi",f:xx},2:{n:"PtgAttrIf",f:mx},4:{n:"PtgAttrChoose",f:dx},8:{n:"PtgAttrGoto",f:px},16:{n:"PtgAttrSum",f:Tx},32:{n:"PtgAttrBaxcel",f:Cu},33:{n:"PtgAttrBaxcel",f:Cu},64:{n:"PtgAttrSpace",f:vx},65:{n:"PtgAttrSpaceSemi",f:_x},128:{n:"PtgAttrIfError",f:gx},255:{}};function hv(e,t,r,n){if(n.biff<8)return En(e,t);for(var i=e.l+t,a=[],s=0;s!==r.length;++s)switch(r[s][0]){case"PtgArray":r[s][1]=Px(e,0,n),a.push(r[s][1]);break;case"PtgMemArea":r[s][2]=Bx(e,r[s][1],n),a.push(r[s][2]);break;case"PtgExp":n&&n.biff==12&&(r[s][1][1]=e.read_shift(4),a.push(r[s][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[s][0]}return t=i-e.l,t!==0&&a.push(En(e,t)),a}function dv(e,t,r){for(var n=e.l+t,i,a,s=[];n!=e.l;)t=n-e.l,a=e[e.l],i=Tu[a]||Tu[cv[a]],(a===24||a===25)&&(i=(a===24?uv:fv)[e[e.l+1]]),!i||!i.f?En(e,t):s.push([i.n,i.f(e,t,r)]);return s}function pv(e){for(var t=[],r=0;r<e.length;++r){for(var n=e[r],i=[],a=0;a<n.length;++a){var s=n[a];if(s)switch(s[0]){case 2:i.push('"'+s[1].replace(/"/g,'""')+'"');break;default:i.push(s[1])}else i.push("")}t.push(i.join(","))}return t.join(";")}var mv={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function gv(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function ih(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!n)return"SH33TJSERR1";var i="";if(r.biff>8)switch(e[n[0]][0]){case 357:return i=n[1]==-1?"#REF":e.SheetNames[n[1]],n[1]==n[2]?i:i+":"+e.SheetNames[n[2]];case 358:return r.SID!=null?e.SheetNames[r.SID]:"SH33TJSSAME"+e[n[0]][0];case 355:default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return i=n[1]==-1?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?i:i+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(a){return a.Name}).join(";;");default:return e[n[0]][0][3]?(i=n[1]==-1?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?i:i+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function Su(e,t,r){var n=ih(e,t,r);return n=="#REF"?n:gv(n,r)}function la(e,t,r,n,i){var a=i&&i.biff||8,s={s:{c:0,r:0},e:{c:0,r:0}},o=[],c,l,u,m=0,d=0,g,v="";if(!e[0]||!e[0][0])return"";for(var p=-1,_="",E=0,D=e[0].length;E<D;++E){var A=e[0][E];switch(A[0]){case"PtgUminus":o.push("-"+o.pop());break;case"PtgUplus":o.push("+"+o.pop());break;case"PtgPercent":o.push(o.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(c=o.pop(),l=o.pop(),p>=0){switch(e[0][p][1][0]){case 0:_=Ut(" ",e[0][p][1][1]);break;case 1:_=Ut("\r",e[0][p][1][1]);break;default:if(_="",i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][p][1][0])}l=l+_,p=-1}o.push(l+mv[A[0]]+c);break;case"PtgIsect":c=o.pop(),l=o.pop(),o.push(l+" "+c);break;case"PtgUnion":c=o.pop(),l=o.pop(),o.push(l+","+c);break;case"PtgRange":c=o.pop(),l=o.pop(),o.push(l+":"+c);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":u=Pa(A[1][1],s,i),o.push(ja(u,a));break;case"PtgRefN":u=r?Pa(A[1][1],r,i):A[1][1],o.push(ja(u,a));break;case"PtgRef3d":m=A[1][1],u=Pa(A[1][2],s,i),v=Su(n,m,i),o.push(v+"!"+ja(u,a));break;case"PtgFunc":case"PtgFuncVar":var S=A[1][0],I=A[1][1];S||(S=0),S&=127;var U=S==0?[]:o.slice(-S);o.length-=S,I==="User"&&(I=U.shift()),o.push(I+"("+U.join(",")+")");break;case"PtgBool":o.push(A[1]?"TRUE":"FALSE");break;case"PtgInt":o.push(A[1]);break;case"PtgNum":o.push(String(A[1]));break;case"PtgStr":o.push('"'+A[1].replace(/"/g,'""')+'"');break;case"PtgErr":o.push(A[1]);break;case"PtgAreaN":g=fu(A[1][1],r?{s:r}:s,i),o.push(zo(g,i));break;case"PtgArea":g=fu(A[1][1],s,i),o.push(zo(g,i));break;case"PtgArea3d":m=A[1][1],g=A[1][2],v=Su(n,m,i),o.push(v+"!"+zo(g,i));break;case"PtgAttrSum":o.push("SUM("+o.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":d=A[1][2];var R=(n.names||[])[d-1]||(n[0]||[])[d],Y=R?R.Name:"SH33TJSNAME"+String(d);Y&&Y.slice(0,6)=="_xlfn."&&!i.xlfn&&(Y=Y.slice(6)),o.push(Y);break;case"PtgNameX":var W=A[1][1];d=A[1][2];var Z;if(i.biff<=5)W<0&&(W=-W),n[W]&&(Z=n[W][d]);else{var N="";if(((n[W]||[])[0]||[])[0]==14849||(((n[W]||[])[0]||[])[0]==1025?n[W][d]&&n[W][d].itab>0&&(N=n.SheetNames[n[W][d].itab-1]+"!"):N=n.SheetNames[d-1]+"!"),n[W]&&n[W][d])N+=n[W][d].Name;else if(n[0]&&n[0][d])N+=n[0][d].Name;else{var M=(ih(n,W,i)||"").split(";;");M[d-1]?N=M[d-1]:N+="SH33TJSERRX"}o.push(N);break}Z||(Z={Name:"SH33TJSERRY"}),o.push(Z.Name);break;case"PtgParen":var G="(",b=")";if(p>=0){switch(_="",e[0][p][1][0]){case 2:G=Ut(" ",e[0][p][1][1])+G;break;case 3:G=Ut("\r",e[0][p][1][1])+G;break;case 4:b=Ut(" ",e[0][p][1][1])+b;break;case 5:b=Ut("\r",e[0][p][1][1])+b;break;default:if(i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][p][1][0])}p=-1}o.push(G+o.pop()+b);break;case"PtgRefErr":o.push("#REF!");break;case"PtgRefErr3d":o.push("#REF!");break;case"PtgExp":u={c:A[1][1],r:A[1][0]};var V={c:r.c,r:r.r};if(n.sharedf[Tt(u)]){var q=n.sharedf[Tt(u)];o.push(la(q,s,V,n,i))}else{var re=!1;for(c=0;c!=n.arrayf.length;++c)if(l=n.arrayf[c],!(u.c<l[0].s.c||u.c>l[0].e.c)&&!(u.r<l[0].s.r||u.r>l[0].e.r)){o.push(la(l[1],s,V,n,i)),re=!0;break}re||o.push(A[1])}break;case"PtgArray":o.push("{"+pv(A[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":p=E;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":o.push("");break;case"PtgAreaErr":o.push("#REF!");break;case"PtgAreaErr3d":o.push("#REF!");break;case"PtgList":o.push("Table"+A[1].idx+"[#"+A[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":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");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(A));default:throw new Error("Unrecognized Formula Token: "+String(A))}var le=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(i.biff!=3&&p>=0&&le.indexOf(e[0][E][0])==-1){A=e[0][p];var pe=!0;switch(A[1][0]){case 4:pe=!1;case 0:_=Ut(" ",A[1][1]);break;case 5:pe=!1;case 1:_=Ut("\r",A[1][1]);break;default:if(_="",i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+A[1][0])}o.push((pe?_:"")+o.pop()+(pe?"":_)),p=-1}}if(o.length>1&&i.WTF)throw new Error("bad formula stack");return o[0]}function xv(e){if(e==null){var t=ue(8);return t.write_shift(1,3),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,65535),t}else if(typeof e=="number")return Si(e);return Si(0)}function vv(e,t,r,n,i){var a=Fi(t,r,i),s=xv(e.v),o=ue(6),c=33;o.write_shift(2,c),o.write_shift(4,0);for(var l=ue(e.bf.length),u=0;u<e.bf.length;++u)l[u]=e.bf[u];var m=cr([a,s,o,l]);return m}function Ao(e,t,r){var n=e.read_shift(4),i=dv(e,n,r),a=e.read_shift(4),s=a>0?hv(e,a,i,r):null;return[i,s]}var _v=Ao,Co=Ao,Ev=Ao,wv=Ao,yv={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"},ah={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"},Dv={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 Av(e){var t="of:="+e.replace(nc,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return t.replace(/;/g,"|").replace(/,/g,";")}function Cv(e){return e.replace(/\./,"!")}var Ra=typeof Map<"u";function sc(e,t,r){var n=0,i=e.length;if(r){if(Ra?r.has(t):Object.prototype.hasOwnProperty.call(r,t)){for(var a=Ra?r.get(t):r[t];n<a.length;++n)if(e[a[n]].t===t)return e.Count++,a[n]}}else for(;n<i;++n)if(e[n].t===t)return e.Count++,n;return e[i]={t},e.Count++,e.Unique++,r&&(Ra?(r.has(t)||r.set(t,[]),r.get(t).push(i)):(Object.prototype.hasOwnProperty.call(r,t)||(r[t]=[]),r[t].push(i))),i}function To(e,t){var r={min:e+1,max:e+1},n=-1;return t.MDW&&(Wn=t.MDW),t.width!=null?r.customWidth=1:t.wpx!=null?n=to(t.wpx):t.wch!=null&&(n=t.wch),n>-1?(r.width=gl(n),r.customWidth=1):t.width!=null&&(r.width=t.width),t.hidden&&(r.hidden=!0),t.level!=null&&(r.outlineLevel=r.level=t.level),r}function sh(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];e.left==null&&(e.left=r[0]),e.right==null&&(e.right=r[1]),e.top==null&&(e.top=r[2]),e.bottom==null&&(e.bottom=r[3]),e.header==null&&(e.header=r[4]),e.footer==null&&(e.footer=r[5])}}function ci(e,t,r){var n=r.revssf[t.z!=null?t.z:"General"],i=60,a=e.length;if(n==null&&r.ssf){for(;i<392;++i)if(r.ssf[i]==null){ef(t.z,i),r.ssf[i]=t.z,r.revssf[t.z]=n=i;break}}for(i=0;i!=a;++i)if(e[i].numFmtId===n)return i;return e[a]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},a}function Tv(e,t,r){if(e&&e["!ref"]){var n=jt(e["!ref"]);if(n.e.c<n.s.c||n.e.r<n.s.r)throw new Error("Bad range ("+r+"): "+e["!ref"])}}function Sv(e){if(e.length===0)return"";for(var t='<mergeCells count="'+e.length+'">',r=0;r!=e.length;++r)t+='<mergeCell ref="'+Gt(e[r])+'"/>';return t+"</mergeCells>"}function Fv(e,t,r,n,i){var a=!1,s={},o=null;if(n.bookType!=="xlsx"&&t.vbaraw){var c=t.SheetNames[r];try{t.Workbook&&(c=t.Workbook.Sheets[r].CodeName||c)}catch{}a=!0,s.codeName=Xa(Ct(c))}if(e&&e["!outline"]){var l={summaryBelow:1,summaryRight:1};e["!outline"].above&&(l.summaryBelow=0),e["!outline"].left&&(l.summaryRight=0),o=(o||"")+ke("outlinePr",null,l)}!a&&!o||(i[i.length]=ke("sheetPr",o,s))}var bv=["objects","scenarios","selectLockedCells","selectUnlockedCells"],kv=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function Nv(e){var t={sheet:1};return bv.forEach(function(r){e[r]!=null&&e[r]&&(t[r]="1")}),kv.forEach(function(r){e[r]!=null&&!e[r]&&(t[r]="0")}),e.password&&(t.password=Vf(e.password).toString(16).toUpperCase()),ke("sheetProtection",null,t)}function Iv(e){return sh(e),ke("pageMargins",null,e)}function Ov(e,t){for(var r=["<cols>"],n,i=0;i!=t.length;++i)(n=t[i])&&(r[r.length]=ke("col",null,To(i,n)));return r[r.length]="</cols>",r.join("")}function Bv(e,t,r,n){var i=typeof e.ref=="string"?e.ref:Gt(e.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var a=r.Workbook.Names,s=Mr(i);s.s.r==s.e.r&&(s.e.r=Mr(t["!ref"]).e.r,i=Gt(s));for(var o=0;o<a.length;++o){var c=a[o];if(c.Name=="_xlnm._FilterDatabase"&&c.Sheet==n){c.Ref="'"+r.SheetNames[n]+"'!"+i;break}}return o==a.length&&a.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+i}),ke("autoFilter",null,{ref:i})}function Pv(e,t,r,n){var i={workbookViewId:"0"};return(((n||{}).Workbook||{}).Views||[])[0]&&(i.rightToLeft=n.Workbook.Views[0].RTL?"1":"0"),ke("sheetViews",ke("sheetView",null,i),{})}function jv(e,t,r,n){if(e.c&&r["!comments"].push([t,e.c]),e.v===void 0&&typeof e.f!="string"||e.t==="z"&&!e.f)return"";var i="",a=e.t,s=e.v;if(e.t!=="z")switch(e.t){case"b":i=e.v?"1":"0";break;case"n":i=""+e.v;break;case"e":i=ns[e.v];break;case"d":n&&n.cellDates?i=wr(e.v,-1).toISOString():(e=kr(e),e.t="n",i=""+(e.v=br(wr(e.v)))),typeof e.z>"u"&&(e.z=Wt[14]);break;default:i=e.v;break}var o=ur("v",Ct(i)),c={r:t},l=ci(n.cellXfs,e,n);switch(l!==0&&(c.s=l),e.t){case"n":break;case"d":c.t="d";break;case"b":c.t="b";break;case"e":c.t="e";break;case"z":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){o=ur("v",""+sc(n.Strings,e.v,n.revStrings)),c.t="s";break}c.t="str";break}if(e.t!=a&&(e.t=a,e.v=s),typeof e.f=="string"&&e.f){var u=e.F&&e.F.slice(0,t.length)==t?{t:"array",ref:e.F}:null;o=ke("f",Ct(e.f),u)+(e.v!=null?o:"")}return e.l&&r["!links"].push([t,e.l]),e.D&&(c.cm=1),ke("c",o,c)}function Rv(e,t,r,n){var i=[],a=[],s=jt(e["!ref"]),o="",c,l="",u=[],m=0,d=0,g=e["!rows"],v=Array.isArray(e),p={r:l},_,E=-1;for(d=s.s.c;d<=s.e.c;++d)u[d]=pr(d);for(m=s.s.r;m<=s.e.r;++m){for(a=[],l=fr(m),d=s.s.c;d<=s.e.c;++d){c=u[d]+l;var D=v?(e[m]||[])[d]:e[c];D!==void 0&&(o=jv(D,c,e,t))!=null&&a.push(o)}(a.length>0||g&&g[m])&&(p={r:l},g&&g[m]&&(_=g[m],_.hidden&&(p.hidden=1),E=-1,_.hpx?E=ro(_.hpx):_.hpt&&(E=_.hpt),E>-1&&(p.ht=E,p.customHeight=1),_.level&&(p.outlineLevel=_.level)),i[i.length]=ke("row",a.join(""),p))}if(g)for(;m<g.length;++m)g&&g[m]&&(p={r:m+1},_=g[m],_.hidden&&(p.hidden=1),E=-1,_.hpx?E=ro(_.hpx):_.hpt&&(E=_.hpt),E>-1&&(p.ht=E,p.customHeight=1),_.level&&(p.outlineLevel=_.level),i[i.length]=ke("row","",p));return i.join("")}function oh(e,t,r,n){var i=[Xt,ke("worksheet",null,{xmlns:ha[0],"xmlns:r":rr.r})],a=r.SheetNames[e],s=0,o="",c=r.Sheets[a];c==null&&(c={});var l=c["!ref"]||"A1",u=jt(l);if(u.e.c>16383||u.e.r>1048575){if(t.WTF)throw new Error("Range "+l+" exceeds format limit A1:XFD1048576");u.e.c=Math.min(u.e.c,16383),u.e.r=Math.min(u.e.c,1048575),l=Gt(u)}n||(n={}),c["!comments"]=[];var m=[];Fv(c,r,e,t,i),i[i.length]=ke("dimension",null,{ref:l}),i[i.length]=Pv(c,t,e,r),t.sheetFormat&&(i[i.length]=ke("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),c["!cols"]!=null&&c["!cols"].length>0&&(i[i.length]=Ov(c,c["!cols"])),i[s=i.length]="<sheetData/>",c["!links"]=[],c["!ref"]!=null&&(o=Rv(c,t),o.length>0&&(i[i.length]=o)),i.length>s+1&&(i[i.length]="</sheetData>",i[s]=i[s].replace("/>",">")),c["!protect"]&&(i[i.length]=Nv(c["!protect"])),c["!autofilter"]!=null&&(i[i.length]=Bv(c["!autofilter"],c,r,e)),c["!merges"]!=null&&c["!merges"].length>0&&(i[i.length]=Sv(c["!merges"]));var d=-1,g,v=-1;return c["!links"].length>0&&(i[i.length]="<hyperlinks>",c["!links"].forEach(function(p){p[1].Target&&(g={ref:p[0]},p[1].Target.charAt(0)!="#"&&(v=At(n,-1,Ct(p[1].Target).replace(/#.*$/,""),vt.HLINK),g["r:id"]="rId"+v),(d=p[1].Target.indexOf("#"))>-1&&(g.location=Ct(p[1].Target.slice(d+1))),p[1].Tooltip&&(g.tooltip=Ct(p[1].Tooltip)),i[i.length]=ke("hyperlink",null,g))}),i[i.length]="</hyperlinks>"),delete c["!links"],c["!margins"]!=null&&(i[i.length]=Iv(c["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&(i[i.length]=ur("ignoredErrors",ke("ignoredError",null,{numberStoredAsText:1,sqref:l}))),m.length>0&&(v=At(n,-1,"../drawings/drawing"+(e+1)+".xml",vt.DRAW),i[i.length]=ke("drawing",null,{"r:id":"rId"+v}),c["!drawing"]=m),c["!comments"].length>0&&(v=At(n,-1,"../drawings/vmlDrawing"+(e+1)+".vml",vt.VML),i[i.length]=ke("legacyDrawing",null,{"r:id":"rId"+v}),c["!legacy"]=v),i.length>1&&(i[i.length]="</worksheet>",i[1]=i[1].replace("/>",">")),i.join("")}function Lv(e,t){var r={},n=e.l+t;r.r=e.read_shift(4),e.l+=4;var i=e.read_shift(2);e.l+=1;var a=e.read_shift(1);return e.l=n,a&7&&(r.level=a&7),a&16&&(r.hidden=!0),a&32&&(r.hpt=i/20),r}function Mv(e,t,r){var n=ue(145),i=(r["!rows"]||[])[e]||{};n.write_shift(4,e),n.write_shift(4,0);var a=320;i.hpx?a=ro(i.hpx)*20:i.hpt&&(a=i.hpt*20),n.write_shift(2,a),n.write_shift(1,0);var s=0;i.level&&(s|=i.level),i.hidden&&(s|=16),(i.hpx||i.hpt)&&(s|=32),n.write_shift(1,s),n.write_shift(1,0);var o=0,c=n.l;n.l+=4;for(var l={r:e,c:0},u=0;u<16;++u)if(!(t.s.c>u+1<<10||t.e.c<u<<10)){for(var m=-1,d=-1,g=u<<10;g<u+1<<10;++g){l.c=g;var v=Array.isArray(r)?(r[l.r]||[])[l.c]:r[Tt(l)];v&&(m<0&&(m=g),d=g)}m<0||(++o,n.write_shift(4,m),n.write_shift(4,d))}var p=n.l;return n.l=c,n.write_shift(4,o),n.l=p,n.length>n.l?n.slice(0,n.l):n}function Uv(e,t,r,n){var i=Mv(n,r,t);(i.length>17||(t["!rows"]||[])[n])&&Ee(e,0,i)}var Wv=Li,zv=pa;function Vv(){}function Hv(e,t){var r={},n=e[e.l];return++e.l,r.above=!(n&64),r.left=!(n&128),e.l+=18,r.name=em(e),r}function $v(e,t,r){r==null&&(r=ue(84+4*e.length));var n=192;t&&(t.above&&(n&=-65),t.left&&(n&=-129)),r.write_shift(1,n);for(var i=1;i<3;++i)r.write_shift(1,0);return Zs({auto:1},r),r.write_shift(-4,-1),r.write_shift(-4,-1),yf(e,r),r.slice(0,r.l)}function Gv(e){var t=Yr(e);return[t]}function Xv(e,t,r){return r==null&&(r=ue(8)),Pi(t,r)}function Kv(e){var t=ji(e);return[t]}function Yv(e,t,r){return r==null&&(r=ue(4)),Ri(t,r)}function qv(e){var t=Yr(e),r=e.read_shift(1);return[t,r,"b"]}function Jv(e,t,r){return r==null&&(r=ue(9)),Pi(t,r),r.write_shift(1,e.v?1:0),r}function Zv(e){var t=ji(e),r=e.read_shift(1);return[t,r,"b"]}function Qv(e,t,r){return r==null&&(r=ue(5)),Ri(t,r),r.write_shift(1,e.v?1:0),r}function e_(e){var t=Yr(e),r=e.read_shift(1);return[t,r,"e"]}function t_(e,t,r){return r==null&&(r=ue(9)),Pi(t,r),r.write_shift(1,e.v),r}function r_(e){var t=ji(e),r=e.read_shift(1);return[t,r,"e"]}function n_(e,t,r){return r==null&&(r=ue(8)),Ri(t,r),r.write_shift(1,e.v),r.write_shift(2,0),r.write_shift(1,0),r}function i_(e){var t=Yr(e),r=e.read_shift(4);return[t,r,"s"]}function a_(e,t,r){return r==null&&(r=ue(12)),Pi(t,r),r.write_shift(4,t.v),r}function s_(e){var t=ji(e),r=e.read_shift(4);return[t,r,"s"]}function o_(e,t,r){return r==null&&(r=ue(8)),Ri(t,r),r.write_shift(4,t.v),r}function l_(e){var t=Yr(e),r=ma(e);return[t,r,"n"]}function c_(e,t,r){return r==null&&(r=ue(16)),Pi(t,r),Si(e.v,r),r}function u_(e){var t=ji(e),r=ma(e);return[t,r,"n"]}function f_(e,t,r){return r==null&&(r=ue(12)),Ri(t,r),Si(e.v,r),r}function h_(e){var t=Yr(e),r=Df(e);return[t,r,"n"]}function d_(e,t,r){return r==null&&(r=ue(12)),Pi(t,r),Af(e.v,r),r}function p_(e){var t=ji(e),r=Df(e);return[t,r,"n"]}function m_(e,t,r){return r==null&&(r=ue(8)),Ri(t,r),Af(e.v,r),r}function g_(e){var t=Yr(e),r=Zl(e);return[t,r,"is"]}function x_(e){var t=Yr(e),r=mr(e);return[t,r,"str"]}function v_(e,t,r){return r==null&&(r=ue(12+4*e.v.length)),Pi(t,r),ir(e.v,r),r.length>r.l?r.slice(0,r.l):r}function __(e){var t=ji(e),r=mr(e);return[t,r,"str"]}function E_(e,t,r){return r==null&&(r=ue(8+4*e.v.length)),Ri(t,r),ir(e.v,r),r.length>r.l?r.slice(0,r.l):r}function w_(e,t,r){var n=e.l+t,i=Yr(e);i.r=r["!row"];var a=e.read_shift(1),s=[i,a,"b"];if(r.cellFormula){e.l+=2;var o=Co(e,n-e.l,r);s[3]=la(o,null,i,r.supbooks,r)}else e.l=n;return s}function y_(e,t,r){var n=e.l+t,i=Yr(e);i.r=r["!row"];var a=e.read_shift(1),s=[i,a,"e"];if(r.cellFormula){e.l+=2;var o=Co(e,n-e.l,r);s[3]=la(o,null,i,r.supbooks,r)}else e.l=n;return s}function D_(e,t,r){var n=e.l+t,i=Yr(e);i.r=r["!row"];var a=ma(e),s=[i,a,"n"];if(r.cellFormula){e.l+=2;var o=Co(e,n-e.l,r);s[3]=la(o,null,i,r.supbooks,r)}else e.l=n;return s}function A_(e,t,r){var n=e.l+t,i=Yr(e);i.r=r["!row"];var a=mr(e),s=[i,a,"str"];if(r.cellFormula){e.l+=2;var o=Co(e,n-e.l,r);s[3]=la(o,null,i,r.supbooks,r)}else e.l=n;return s}var C_=Li,T_=pa;function S_(e,t){return t==null&&(t=ue(4)),t.write_shift(4,e),t}function F_(e,t){var r=e.l+t,n=Li(e),i=Ql(e),a=mr(e),s=mr(e),o=mr(e);e.l=r;var c={rfx:n,relId:i,loc:a,display:o};return s&&(c.Tooltip=s),c}function b_(e,t){var r=ue(50+4*(e[1].Target.length+(e[1].Tooltip||"").length));pa({s:nr(e[0]),e:nr(e[0])},r),ec("rId"+t,r);var n=e[1].Target.indexOf("#"),i=n==-1?"":e[1].Target.slice(n+1);return ir(i||"",r),ir(e[1].Tooltip||"",r),ir("",r),r.slice(0,r.l)}function k_(){}function N_(e,t,r){var n=e.l+t,i=Cf(e),a=e.read_shift(1),s=[i];if(s[2]=a,r.cellFormula){var o=_v(e,n-e.l,r);s[1]=o}else e.l=n;return s}function I_(e,t,r){var n=e.l+t,i=Li(e),a=[i];if(r.cellFormula){var s=wv(e,n-e.l,r);a[1]=s,e.l=n}else e.l=n;return a}function O_(e,t,r){r==null&&(r=ue(18));var n=To(e,t);r.write_shift(-4,e),r.write_shift(-4,e),r.write_shift(4,(n.width||10)*256),r.write_shift(4,0);var i=0;return t.hidden&&(i|=1),typeof n.width=="number"&&(i|=2),t.level&&(i|=t.level<<8),r.write_shift(2,i),r}var lh=["left","right","top","bottom","header","footer"];function B_(e){var t={};return lh.forEach(function(r){t[r]=ma(e)}),t}function P_(e,t){return t==null&&(t=ue(6*8)),sh(e),lh.forEach(function(r){Si(e[r],t)}),t}function j_(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function R_(e,t,r){r==null&&(r=ue(30));var n=924;return(((t||{}).Views||[])[0]||{}).RTL&&(n|=32),r.write_shift(2,n),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(2,0),r.write_shift(2,100),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(4,0),r}function L_(e){var t=ue(24);return t.write_shift(4,4),t.write_shift(4,1),pa(e,t),t}function M_(e,t){return t==null&&(t=ue(16*4+2)),t.write_shift(2,e.password?Vf(e.password):0),t.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(r){r[1]?t.write_shift(4,e[r[0]]!=null&&!e[r[0]]?1:0):t.write_shift(4,e[r[0]]!=null&&e[r[0]]?0:1)}),t}function U_(){}function W_(){}function z_(e,t,r,n,i,a,s){if(t.v===void 0)return!1;var o="";switch(t.t){case"b":o=t.v?"1":"0";break;case"d":t=kr(t),t.z=t.z||Wt[14],t.v=br(wr(t.v)),t.t="n";break;case"n":case"e":o=""+t.v;break;default:o=t.v;break}var c={r,c:n};switch(c.s=ci(i.cellXfs,t,i),t.l&&a["!links"].push([Tt(c),t.l]),t.c&&a["!comments"].push([Tt(c),t.c]),t.t){case"s":case"str":return i.bookSST?(o=sc(i.Strings,t.v,i.revStrings),c.t="s",c.v=o,s?Ee(e,18,o_(t,c)):Ee(e,7,a_(t,c))):(c.t="str",s?Ee(e,17,E_(t,c)):Ee(e,6,v_(t,c))),!0;case"n":return t.v==(t.v|0)&&t.v>-1e3&&t.v<1e3?s?Ee(e,13,m_(t,c)):Ee(e,2,d_(t,c)):s?Ee(e,16,f_(t,c)):Ee(e,5,c_(t,c)),!0;case"b":return c.t="b",s?Ee(e,15,Qv(t,c)):Ee(e,4,Jv(t,c)),!0;case"e":return c.t="e",s?Ee(e,14,n_(t,c)):Ee(e,3,t_(t,c)),!0}return s?Ee(e,12,Yv(t,c)):Ee(e,1,Xv(t,c)),!0}function V_(e,t,r,n){var i=jt(t["!ref"]||"A1"),a,s="",o=[];Ee(e,145);var c=Array.isArray(t),l=i.e.r;t["!rows"]&&(l=Math.max(i.e.r,t["!rows"].length-1));for(var u=i.s.r;u<=l;++u){s=fr(u),Uv(e,t,i,u);var m=!1;if(u<=i.e.r)for(var d=i.s.c;d<=i.e.c;++d){u===i.s.r&&(o[d]=pr(d)),a=o[d]+s;var g=c?(t[u]||[])[d]:t[a];if(!g){m=!1;continue}m=z_(e,g,u,d,n,t,m)}}Ee(e,146)}function H_(e,t){!t||!t["!merges"]||(Ee(e,177,S_(t["!merges"].length)),t["!merges"].forEach(function(r){Ee(e,176,T_(r))}),Ee(e,178))}function $_(e,t){!t||!t["!cols"]||(Ee(e,390),t["!cols"].forEach(function(r,n){r&&Ee(e,60,O_(n,r))}),Ee(e,391))}function G_(e,t){!t||!t["!ref"]||(Ee(e,648),Ee(e,649,L_(jt(t["!ref"]))),Ee(e,650))}function X_(e,t,r){t["!links"].forEach(function(n){if(n[1].Target){var i=At(r,-1,n[1].Target.replace(/#.*$/,""),vt.HLINK);Ee(e,494,b_(n,i))}}),delete t["!links"]}function K_(e,t,r,n){if(t["!comments"].length>0){var i=At(n,-1,"../drawings/vmlDrawing"+(r+1)+".vml",vt.VML);Ee(e,551,ec("rId"+i)),t["!legacy"]=i}}function Y_(e,t,r,n){if(t["!autofilter"]){var i=t["!autofilter"],a=typeof i.ref=="string"?i.ref:Gt(i.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var s=r.Workbook.Names,o=Mr(a);o.s.r==o.e.r&&(o.e.r=Mr(t["!ref"]).e.r,a=Gt(o));for(var c=0;c<s.length;++c){var l=s[c];if(l.Name=="_xlnm._FilterDatabase"&&l.Sheet==n){l.Ref="'"+r.SheetNames[n]+"'!"+a;break}}c==s.length&&s.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+a}),Ee(e,161,pa(jt(a))),Ee(e,162)}}function q_(e,t,r){Ee(e,133),Ee(e,137,R_(t,r)),Ee(e,138),Ee(e,134)}function J_(e,t){t["!protect"]&&Ee(e,535,M_(t["!protect"]))}function Z_(e,t,r,n){var i=Fr(),a=r.SheetNames[e],s=r.Sheets[a]||{},o=a;try{r&&r.Workbook&&(o=r.Workbook.Sheets[e].CodeName||o)}catch{}var c=jt(s["!ref"]||"A1");if(c.e.c>16383||c.e.r>1048575){if(t.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575)}return s["!links"]=[],s["!comments"]=[],Ee(i,129),(r.vbaraw||s["!outline"])&&Ee(i,147,$v(o,s["!outline"])),Ee(i,148,zv(c)),q_(i,s,r.Workbook),$_(i,s),V_(i,s,e,t),J_(i,s),Y_(i,s,r,e),H_(i,s),X_(i,s,n),s["!margins"]&&Ee(i,476,P_(s["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&G_(i,s),K_(i,s,e,n),Ee(i,130),i.end()}function Q_(e,t){e.l+=10;var r=mr(e);return{name:r}}var e2=[["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"]];function t2(e){return!e.Workbook||!e.Workbook.WBProps?"false":Ip(e.Workbook.WBProps.date1904)?"true":"false"}var r2="][*?/\\".split("");function ch(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var r=!0;return r2.forEach(function(n){if(e.indexOf(n)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),r}function n2(e,t,r){e.forEach(function(n,i){ch(n);for(var a=0;a<i;++a)if(n==e[a])throw new Error("Duplicate Sheet Name: "+n);if(r){var s=t&&t[i]&&t[i].CodeName||n;if(s.charCodeAt(0)==95&&s.length>22)throw new Error("Bad Code Name: Worksheet"+s)}})}function i2(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var t=e.Workbook&&e.Workbook.Sheets||[];n2(e.SheetNames,t,!!e.vbaraw);for(var r=0;r<e.SheetNames.length;++r)Tv(e.Sheets[e.SheetNames[r]],e.SheetNames[r],r)}function uh(e){var t=[Xt];t[t.length]=ke("workbook",null,{xmlns:ha[0],"xmlns:r":rr.r});var r=e.Workbook&&(e.Workbook.Names||[]).length>0,n={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(e2.forEach(function(o){e.Workbook.WBProps[o[0]]!=null&&e.Workbook.WBProps[o[0]]!=o[1]&&(n[o[0]]=e.Workbook.WBProps[o[0]])}),e.Workbook.WBProps.CodeName&&(n.codeName=e.Workbook.WBProps.CodeName,delete n.CodeName)),t[t.length]=ke("workbookPr",null,n);var i=e.Workbook&&e.Workbook.Sheets||[],a=0;if(i&&i[0]&&i[0].Hidden){for(t[t.length]="<bookViews>",a=0;a!=e.SheetNames.length&&!(!i[a]||!i[a].Hidden);++a);a==e.SheetNames.length&&(a=0),t[t.length]='<workbookView firstSheet="'+a+'" activeTab="'+a+'"/>',t[t.length]="</bookViews>"}for(t[t.length]="<sheets>",a=0;a!=e.SheetNames.length;++a){var s={name:Ct(e.SheetNames[a].slice(0,31))};if(s.sheetId=""+(a+1),s["r:id"]="rId"+(a+1),i[a])switch(i[a].Hidden){case 1:s.state="hidden";break;case 2:s.state="veryHidden";break}t[t.length]=ke("sheet",null,s)}return t[t.length]="</sheets>",r&&(t[t.length]="<definedNames>",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(o){var c={name:o.Name};o.Comment&&(c.comment=o.Comment),o.Sheet!=null&&(c.localSheetId=""+o.Sheet),o.Hidden&&(c.hidden="1"),o.Ref&&(t[t.length]=ke("definedName",Ct(o.Ref),c))}),t[t.length]="</definedNames>"),t.length>2&&(t[t.length]="</workbook>",t[1]=t[1].replace("/>",">")),t.join("")}function a2(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=ml(e),r.name=mr(e),r}function s2(e,t){return t||(t=ue(127)),t.write_shift(4,e.Hidden),t.write_shift(4,e.iTabID),ec(e.strRelID,t),ir(e.name.slice(0,31),t),t.length>t.l?t.slice(0,t.l):t}function o2(e,t){var r={},n=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var i=t>8?mr(e):"";return i.length>0&&(r.CodeName=i),r.autoCompressPictures=!!(n&65536),r.backupFile=!!(n&64),r.checkCompatibility=!!(n&4096),r.date1904=!!(n&1),r.filterPrivacy=!!(n&8),r.hidePivotFieldList=!!(n&1024),r.promptedSolutions=!!(n&16),r.publishItems=!!(n&2048),r.refreshAllConnections=!!(n&262144),r.saveExternalLinkValues=!!(n&128),r.showBorderUnselectedTables=!!(n&4),r.showInkAnnotation=!!(n&32),r.showObjects=["all","placeholders","none"][n>>13&3],r.showPivotChartFilter=!!(n&32768),r.updateLinks=["userSet","never","always"][n>>8&3],r}function l2(e,t){t||(t=ue(72));var r=0;return e&&e.filterPrivacy&&(r|=8),t.write_shift(4,r),t.write_shift(4,0),yf(e&&e.CodeName||"ThisWorkbook",t),t.slice(0,t.l)}function c2(e,t,r){var n=e.l+t;e.l+=4,e.l+=1;var i=e.read_shift(4),a=tm(e),s=Ev(e,0,r),o=Ql(e);e.l=n;var c={Name:a,Ptg:s};return i<268435455&&(c.Sheet=i),o&&(c.Comment=o),c}function u2(e,t){Ee(e,143);for(var r=0;r!=t.SheetNames.length;++r){var n=t.Workbook&&t.Workbook.Sheets&&t.Workbook.Sheets[r]&&t.Workbook.Sheets[r].Hidden||0,i={Hidden:n,iTabID:r+1,strRelID:"rId"+(r+1),name:t.SheetNames[r]};Ee(e,156,s2(i))}Ee(e,144)}function f2(e,t){t||(t=ue(127));for(var r=0;r!=4;++r)t.write_shift(4,0);return ir("SheetJS",t),ir($s.version,t),ir($s.version,t),ir("7262",t),t.length>t.l?t.slice(0,t.l):t}function h2(e,t){t||(t=ue(29)),t.write_shift(-4,0),t.write_shift(-4,460),t.write_shift(4,28800),t.write_shift(4,17600),t.write_shift(4,500),t.write_shift(4,e),t.write_shift(4,e);var r=120;return t.write_shift(1,r),t.length>t.l?t.slice(0,t.l):t}function d2(e,t){if(!(!t.Workbook||!t.Workbook.Sheets)){for(var r=t.Workbook.Sheets,n=0,i=-1,a=-1;n<r.length;++n)!r[n]||!r[n].Hidden&&i==-1?i=n:r[n].Hidden==1&&a==-1&&(a=n);a>i||(Ee(e,135),Ee(e,158,h2(i)),Ee(e,136))}}function p2(e,t){var r=Fr();return Ee(r,131),Ee(r,128,f2()),Ee(r,153,l2(e.Workbook&&e.Workbook.WBProps||null)),d2(r,e),u2(r,e),Ee(r,132),r.end()}function m2(e,t,r){return(t.slice(-4)===".bin"?p2:uh)(e)}function g2(e,t,r,n,i){return(t.slice(-4)===".bin"?Z_:oh)(e,r,n,i)}function x2(e,t,r){return(t.slice(-4)===".bin"?Pg:Gf)(e,r)}function v2(e,t,r){return(t.slice(-4)===".bin"?lg:zf)(e,r)}function _2(e,t,r){return(t.slice(-4)===".bin"?Jg:Jf)(e)}function E2(e){return(e.slice(-4)===".bin"?Vg:Yf)()}function w2(e,t){var r=[];return e.Props&&r.push(xm(e.Props,t)),e.Custprops&&r.push(vm(e.Props,e.Custprops)),r.join("")}function y2(){return""}function D2(e,t){var r=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];return t.cellXfs.forEach(function(n,i){var a=[];a.push(ke("NumberFormat",null,{"ss:Format":Ct(Wt[n.numFmtId])}));var s={"ss:ID":"s"+(21+i)};r.push(ke("Style",a.join(""),s))}),ke("Styles",r.join(""))}function fh(e){return ke("NamedRange",null,{"ss:Name":e.Name,"ss:RefersTo":"="+ic(e.Ref,{r:0,c:0})})}function A2(e){if(!((e||{}).Workbook||{}).Names)return"";for(var t=e.Workbook.Names,r=[],n=0;n<t.length;++n){var i=t[n];i.Sheet==null&&(i.Name.match(/^_xlfn\./)||r.push(fh(i)))}return ke("Names",r.join(""))}function C2(e,t,r,n){if(!e||!((n||{}).Workbook||{}).Names)return"";for(var i=n.Workbook.Names,a=[],s=0;s<i.length;++s){var o=i[s];o.Sheet==r&&(o.Name.match(/^_xlfn\./)||a.push(fh(o)))}return a.join("")}function T2(e,t,r,n){if(!e)return"";var i=[];if(e["!margins"]&&(i.push("<PageSetup>"),e["!margins"].header&&i.push(ke("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&i.push(ke("Footer",null,{"x:Margin":e["!margins"].footer})),i.push(ke("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),i.push("</PageSetup>")),n&&n.Workbook&&n.Workbook.Sheets&&n.Workbook.Sheets[r])if(n.Workbook.Sheets[r].Hidden)i.push(ke("Visible",n.Workbook.Sheets[r].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var a=0;a<r&&!(n.Workbook.Sheets[a]&&!n.Workbook.Sheets[a].Hidden);++a);a==r&&i.push("<Selected/>")}return((((n||{}).Workbook||{}).Views||[])[0]||{}).RTL&&i.push("<DisplayRightToLeft/>"),e["!protect"]&&(i.push(ur("ProtectContents","True")),e["!protect"].objects&&i.push(ur("ProtectObjects","True")),e["!protect"].scenarios&&i.push(ur("ProtectScenarios","True")),e["!protect"].selectLockedCells!=null&&!e["!protect"].selectLockedCells?i.push(ur("EnableSelection","NoSelection")):e["!protect"].selectUnlockedCells!=null&&!e["!protect"].selectUnlockedCells&&i.push(ur("EnableSelection","UnlockedCells")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(s){e["!protect"][s[0]]&&i.push("<"+s[1]+"/>")})),i.length==0?"":ke("WorksheetOptions",i.join(""),{xmlns:Pr.x})}function S2(e){return e.map(function(t){var r=Np(t.t||""),n=ke("ss:Data",r,{xmlns:"http://www.w3.org/TR/REC-html40"});return ke("Comment",n,{"ss:Author":t.a})}).join("")}function F2(e,t,r,n,i,a,s){if(!e||e.v==null&&e.f==null)return"";var o={};if(e.f&&(o["ss:Formula"]="="+Ct(ic(e.f,s))),e.F&&e.F.slice(0,t.length)==t){var c=nr(e.F.slice(t.length+1));o["ss:ArrayRange"]="RC:R"+(c.r==s.r?"":"["+(c.r-s.r)+"]")+"C"+(c.c==s.c?"":"["+(c.c-s.c)+"]")}if(e.l&&e.l.Target&&(o["ss:HRef"]=Ct(e.l.Target),e.l.Tooltip&&(o["x:HRefScreenTip"]=Ct(e.l.Tooltip))),r["!merges"])for(var l=r["!merges"],u=0;u!=l.length;++u)l[u].s.c!=s.c||l[u].s.r!=s.r||(l[u].e.c>l[u].s.c&&(o["ss:MergeAcross"]=l[u].e.c-l[u].s.c),l[u].e.r>l[u].s.r&&(o["ss:MergeDown"]=l[u].e.r-l[u].s.r));var m="",d="";switch(e.t){case"z":if(!n.sheetStubs)return"";break;case"n":m="Number",d=String(e.v);break;case"b":m="Boolean",d=e.v?"1":"0";break;case"e":m="Error",d=ns[e.v];break;case"d":m="DateTime",d=new Date(e.v).toISOString(),e.z==null&&(e.z=e.z||Wt[14]);break;case"s":m="String",d=kp(e.v||"");break}var g=ci(n.cellXfs,e,n);o["ss:StyleID"]="s"+(21+g),o["ss:Index"]=s.c+1;var v=e.v!=null?d:"",p=e.t=="z"?"":'<Data ss:Type="'+m+'">'+v+"</Data>";return(e.c||[]).length>0&&(p+=S2(e.c)),ke("Cell",p,o)}function b2(e,t){var r='<Row ss:Index="'+(e+1)+'"';return t&&(t.hpt&&!t.hpx&&(t.hpx=$f(t.hpt)),t.hpx&&(r+=' ss:AutoFitHeight="0" ss:Height="'+t.hpx+'"'),t.hidden&&(r+=' ss:Hidden="1"')),r+">"}function k2(e,t,r,n){if(!e["!ref"])return"";var i=jt(e["!ref"]),a=e["!merges"]||[],s=0,o=[];e["!cols"]&&e["!cols"].forEach(function(_,E){rc(_);var D=!!_.width,A=To(E,_),S={"ss:Index":E+1};D&&(S["ss:Width"]=eo(A.width)),_.hidden&&(S["ss:Hidden"]="1"),o.push(ke("Column",null,S))});for(var c=Array.isArray(e),l=i.s.r;l<=i.e.r;++l){for(var u=[b2(l,(e["!rows"]||[])[l])],m=i.s.c;m<=i.e.c;++m){var d=!1;for(s=0;s!=a.length;++s)if(!(a[s].s.c>m)&&!(a[s].s.r>l)&&!(a[s].e.c<m)&&!(a[s].e.r<l)){(a[s].s.c!=m||a[s].s.r!=l)&&(d=!0);break}if(!d){var g={r:l,c:m},v=Tt(g),p=c?(e[l]||[])[m]:e[v];u.push(F2(p,v,e,t,r,n,g))}}u.push("</Row>"),u.length>2&&o.push(u.join(""))}return o.join("")}function N2(e,t,r){var n=[],i=r.SheetNames[e],a=r.Sheets[i],s=a?C2(a,t,e,r):"";return s.length>0&&n.push("<Names>"+s+"</Names>"),s=a?k2(a,t,e,r):"",s.length>0&&n.push("<Table>"+s+"</Table>"),n.push(T2(a,t,e,r)),n.join("")}function I2(e,t){t||(t={}),e.SSF||(e.SSF=kr(Wt)),e.SSF&&(wo(),Eo(e.SSF),t.revssf=yo(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF,t.cellXfs=[],ci(t.cellXfs,{},{revssf:{General:0}}));var r=[];r.push(w2(e,t)),r.push(y2()),r.push(""),r.push("");for(var n=0;n<e.SheetNames.length;++n)r.push(ke("Worksheet",N2(n,t,e),{"ss:Name":Ct(e.SheetNames[n])}));return r[2]=D2(e,t),r[3]=A2(e),Xt+ke("Workbook",r.join(""),{xmlns:Pr.ss,"xmlns:o":Pr.o,"xmlns:x":Pr.x,"xmlns:ss":Pr.ss,"xmlns:dt":Pr.dt,"xmlns:html":Pr.html})}var $o={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function O2(e,t){var r=[],n=[],i=[],a=0,s,o=eu(du,"n"),c=eu(pu,"n");if(e.Props)for(s=hr(e.Props),a=0;a<s.length;++a)(Object.prototype.hasOwnProperty.call(o,s[a])?r:Object.prototype.hasOwnProperty.call(c,s[a])?n:i).push([s[a],e.Props[s[a]]]);if(e.Custprops)for(s=hr(e.Custprops),a=0;a<s.length;++a)Object.prototype.hasOwnProperty.call(e.Props||{},s[a])||(Object.prototype.hasOwnProperty.call(o,s[a])?r:Object.prototype.hasOwnProperty.call(c,s[a])?n:i).push([s[a],e.Custprops[s[a]]]);var l=[];for(a=0;a<i.length;++a)Pf.indexOf(i[a][0])>-1||If.indexOf(i[a][0])>-1||i[a][1]!=null&&l.push(i[a]);n.length&&St.utils.cfb_add(t,"/SummaryInformation",_u(n,$o.SI,c,pu)),(r.length||l.length)&&St.utils.cfb_add(t,"/DocumentSummaryInformation",_u(r,$o.DSI,o,du,l.length?l:null,$o.UDI))}function B2(e,t){var r=t||{},n=St.utils.cfb_new({root:"R"}),i="/Workbook";switch(r.bookType||"xls"){case"xls":r.bookType="biff8";case"xla":r.bookType||(r.bookType="xla");case"biff8":i="/Workbook",r.biff=8;break;case"biff5":i="/Book",r.biff=5;break;default:throw new Error("invalid type "+r.bookType+" for XLS CFB")}return St.utils.cfb_add(n,i,hh(e,r)),r.biff==8&&(e.Props||e.Custprops)&&O2(e,n),r.biff==8&&e.vbaraw&&Zg(n,St.read(e.vbaraw,{type:typeof e.vbaraw=="string"?"binary":"buffer"})),n}var P2={0:{f:Lv},1:{f:Gv},2:{f:h_},3:{f:e_},4:{f:qv},5:{f:l_},6:{f:x_},7:{f:i_},8:{f:A_},9:{f:D_},10:{f:w_},11:{f:y_},12:{f:Kv},13:{f:p_},14:{f:r_},15:{f:Zv},16:{f:u_},17:{f:__},18:{f:s_},19:{f:Zl},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:c2},40:{},42:{},43:{f:xg},44:{f:mg},45:{f:Eg},46:{f:yg},47:{f:wg},48:{},49:{f:Kp},50:{},51:{f:Lg},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:Ym},62:{f:g_},63:{f:Hg},64:{f:U_},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:En,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:j_},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:Hv},148:{f:Wv,p:16},151:{f:k_},152:{},153:{f:o2},154:{},155:{},156:{f:a2},157:{},158:{},159:{T:1,f:ag},160:{T:-1},161:{T:1,f:Li},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:C_},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:jg},336:{T:-1},337:{f:Wg,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:ml},357:{},358:{},359:{},360:{T:1},361:{},362:{f:Vm},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:N_},427:{f:I_},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:B_},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:Vv},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:F_},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:ml},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:Yg},633:{T:1},634:{T:-1},635:{T:1,f:Xg},636:{T:-1},637:{f:Zp},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:Q_},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:W_},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:""}};function Ne(e,t,r,n){var i=t;if(!isNaN(i)){var a=n||(r||[]).length||0,s=e.next(4);s.write_shift(2,i),s.write_shift(2,a),a>0&&Yl(r)&&e.push(r)}}function j2(e,t,r,n){var i=(r||[]).length||0;if(i<=8224)return Ne(e,t,r,i);var a=t;if(!isNaN(a)){for(var s=r.parts||[],o=0,c=0,l=0;l+(s[o]||8224)<=8224;)l+=s[o]||8224,o++;var u=e.next(4);for(u.write_shift(2,a),u.write_shift(2,l),e.push(r.slice(c,c+l)),c+=l;c<i;){for(u=e.next(4),u.write_shift(2,60),l=0;l+(s[o]||8224)<=8224;)l+=s[o]||8224,o++;u.write_shift(2,l),e.push(r.slice(c,c+l)),c+=l}}}function as(e,t,r){return e||(e=ue(7)),e.write_shift(2,t),e.write_shift(2,r),e.write_shift(2,0),e.write_shift(1,0),e}function R2(e,t,r,n){var i=ue(9);return as(i,e,t),Rf(r,n||"b",i),i}function L2(e,t,r){var n=ue(8+2*r.length);return as(n,e,t),n.write_shift(1,r.length),n.write_shift(r.length,r,"sbcs"),n.l<n.length?n.slice(0,n.l):n}function M2(e,t,r,n){if(t.v!=null)switch(t.t){case"d":case"n":var i=t.t=="d"?br(wr(t.v)):t.v;i==(i|0)&&i>=0&&i<65536?Ne(e,2,Qm(r,n,i)):Ne(e,3,Zm(r,n,i));return;case"b":case"e":Ne(e,5,R2(r,n,t.v,t.t));return;case"s":case"str":Ne(e,4,L2(r,n,(t.v||"").slice(0,255)));return}Ne(e,1,as(null,r,n))}function U2(e,t,r,n){var i=Array.isArray(t),a=jt(t["!ref"]||"A1"),s,o="",c=[];if(a.e.c>255||a.e.r>16383){if(n.WTF)throw new Error("Range "+(t["!ref"]||"A1")+" exceeds format limit A1:IV16384");a.e.c=Math.min(a.e.c,255),a.e.r=Math.min(a.e.c,16383),s=Gt(a)}for(var l=a.s.r;l<=a.e.r;++l){o=fr(l);for(var u=a.s.c;u<=a.e.c;++u){l===a.s.r&&(c[u]=pr(u)),s=c[u]+o;var m=i?(t[l]||[])[u]:t[s];m&&M2(e,m,l,u)}}}function W2(e,t){for(var r=t||{},n=Fr(),i=0,a=0;a<e.SheetNames.length;++a)e.SheetNames[a]==r.sheet&&(i=a);if(i==0&&r.sheet&&e.SheetNames[0]!=r.sheet)throw new Error("Sheet not found: "+r.sheet);return Ne(n,r.biff==4?1033:r.biff==3?521:9,tc(e,16,r)),U2(n,e.Sheets[e.SheetNames[i]],i,r),Ne(n,10),n.end()}function z2(e,t,r){Ne(e,49,Pm({sz:12,color:{theme:1},name:"Arial",family:2,scheme:"minor"},r))}function V2(e,t,r){t&&[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var i=n[0];i<=n[1];++i)t[i]!=null&&Ne(e,1054,Lm(i,t[i],r))})}function H2(e,t){var r=ue(19);r.write_shift(4,2151),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,1),r.write_shift(4,0),Ne(e,2151,r),r=ue(39),r.write_shift(4,2152),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,0),r.write_shift(4,0),r.write_shift(2,1),r.write_shift(4,4),r.write_shift(2,0),Uf(jt(t["!ref"]||"A1"),r),r.write_shift(4,4),Ne(e,2152,r)}function $2(e,t){for(var r=0;r<16;++r)Ne(e,224,wu({numFmtId:0,style:!0},0,t));t.cellXfs.forEach(function(n){Ne(e,224,wu(n,0,t))})}function G2(e,t){for(var r=0;r<t["!links"].length;++r){var n=t["!links"][r];Ne(e,440,Gm(n)),n[1].Tooltip&&Ne(e,2048,Xm(n))}delete t["!links"]}function X2(e,t){if(t){var r=0;t.forEach(function(n,i){++r<=256&&n&&Ne(e,125,qm(To(i,n),i))})}}function K2(e,t,r,n,i){var a=16+ci(i.cellXfs,t,i);if(t.v==null&&!t.bf){Ne(e,513,Fi(r,n,a));return}if(t.bf)Ne(e,6,vv(t,r,n,i,a));else switch(t.t){case"d":case"n":var s=t.t=="d"?br(wr(t.v)):t.v;Ne(e,515,zm(r,n,s,a));break;case"b":case"e":Ne(e,517,Wm(r,n,t.v,a,i,t.t));break;case"s":case"str":if(i.bookSST){var o=sc(i.Strings,t.v,i.revStrings);Ne(e,253,jm(r,n,o,a))}else Ne(e,516,Rm(r,n,(t.v||"").slice(0,255),a,i));break;default:Ne(e,513,Fi(r,n,a))}}function Y2(e,t,r){var n=Fr(),i=r.SheetNames[e],a=r.Sheets[i]||{},s=(r||{}).Workbook||{},o=(s.Sheets||[])[e]||{},c=Array.isArray(a),l=t.biff==8,u,m="",d=[],g=jt(a["!ref"]||"A1"),v=l?65536:16384;if(g.e.c>255||g.e.r>=v){if(t.WTF)throw new Error("Range "+(a["!ref"]||"A1")+" exceeds format limit A1:IV16384");g.e.c=Math.min(g.e.c,255),g.e.r=Math.min(g.e.c,v-1)}Ne(n,2057,tc(r,16,t)),Ne(n,13,Gr(1)),Ne(n,12,Gr(100)),Ne(n,15,xr(!0)),Ne(n,17,xr(!1)),Ne(n,16,Si(.001)),Ne(n,95,xr(!0)),Ne(n,42,xr(!1)),Ne(n,43,xr(!1)),Ne(n,130,Gr(1)),Ne(n,128,Um()),Ne(n,131,xr(!1)),Ne(n,132,xr(!1)),l&&X2(n,a["!cols"]),Ne(n,512,Mm(g,t)),l&&(a["!links"]=[]);for(var p=g.s.r;p<=g.e.r;++p){m=fr(p);for(var _=g.s.c;_<=g.e.c;++_){p===g.s.r&&(d[_]=pr(_)),u=d[_]+m;var E=c?(a[p]||[])[_]:a[u];E&&(K2(n,E,p,_,t),l&&E.l&&a["!links"].push([u,E.l]))}}var D=o.CodeName||o.name||i;return l&&Ne(n,574,Bm((s.Views||[])[0])),l&&(a["!merges"]||[]).length&&Ne(n,229,$m(a["!merges"])),l&&G2(n,a),Ne(n,442,Mf(D)),l&&H2(n,a),Ne(n,10),n.end()}function q2(e,t,r){var n=Fr(),i=(e||{}).Workbook||{},a=i.Sheets||[],s=i.WBProps||{},o=r.biff==8,c=r.biff==5;if(Ne(n,2057,tc(e,5,r)),r.bookType=="xla"&&Ne(n,135),Ne(n,225,o?Gr(1200):null),Ne(n,193,wm(2)),c&&Ne(n,191),c&&Ne(n,192),Ne(n,226),Ne(n,92,km("SheetJS",r)),Ne(n,66,Gr(o?1200:1252)),o&&Ne(n,353,Gr(0)),o&&Ne(n,448),Ne(n,317,Jm(e.SheetNames.length)),o&&e.vbaraw&&Ne(n,211),o&&e.vbaraw){var l=s.CodeName||"ThisWorkbook";Ne(n,442,Mf(l))}Ne(n,156,Gr(17)),Ne(n,25,xr(!1)),Ne(n,18,xr(!1)),Ne(n,19,Gr(0)),o&&Ne(n,431,xr(!1)),o&&Ne(n,444,Gr(0)),Ne(n,61,Om()),Ne(n,64,xr(!1)),Ne(n,141,Gr(0)),Ne(n,34,xr(t2(e)=="true")),Ne(n,14,xr(!0)),o&&Ne(n,439,xr(!1)),Ne(n,218,Gr(0)),z2(n,e,r),V2(n,e.SSF,r),$2(n,r),o&&Ne(n,352,xr(!1));var u=n.end(),m=Fr();o&&Ne(m,140,Km()),o&&r.Strings&&j2(m,252,Im(r.Strings)),Ne(m,10);var d=m.end(),g=Fr(),v=0,p=0;for(p=0;p<e.SheetNames.length;++p)v+=(o?12:11)+(o?2:1)*e.SheetNames[p].length;var _=u.length+v+d.length;for(p=0;p<e.SheetNames.length;++p){var E=a[p]||{};Ne(g,133,Nm({pos:_,hs:E.Hidden||0,dt:0,name:e.SheetNames[p]},r)),_+=t[p].length}var D=g.end();if(v!=D.length)throw new Error("BS8 "+v+" != "+D.length);var A=[];return u.length&&A.push(u),D.length&&A.push(D),d.length&&A.push(d),cr(A)}function J2(e,t){var r=t||{},n=[];e&&!e.SSF&&(e.SSF=kr(Wt)),e&&e.SSF&&(wo(),Eo(e.SSF),r.revssf=yo(e.SSF),r.revssf[e.SSF[65535]]=0,r.ssf=e.SSF),r.Strings=[],r.Strings.Count=0,r.Strings.Unique=0,oc(r),r.cellXfs=[],ci(r.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var i=0;i<e.SheetNames.length;++i)n[n.length]=Y2(i,r,e);return n.unshift(q2(e,n,r)),cr(n)}function hh(e,t){for(var r=0;r<=e.SheetNames.length;++r){var n=e.Sheets[e.SheetNames[r]];if(!(!n||!n["!ref"])){var i=Mr(n["!ref"]);i.e.c>255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[r]+"' extends beyond column IV (255).  Data may be lost.")}}var a=t||{};switch(a.biff||2){case 8:case 5:return J2(e,t);case 4:case 3:case 2:return W2(e,t)}throw new Error("invalid type "+a.bookType+" for BIFF")}function Z2(e,t,r,n){for(var i=e["!merges"]||[],a=[],s=t.s.c;s<=t.e.c;++s){for(var o=0,c=0,l=0;l<i.length;++l)if(!(i[l].s.r>r||i[l].s.c>s)&&!(i[l].e.r<r||i[l].e.c<s)){if(i[l].s.r<r||i[l].s.c<s){o=-1;break}o=i[l].e.r-i[l].s.r+1,c=i[l].e.c-i[l].s.c+1;break}if(!(o<0)){var u=Tt({r,c:s}),m=n.dense?(e[r]||[])[s]:e[u],d=m&&m.v!=null&&(m.h||bp(m.w||(Hn(m),m.w)||""))||"",g={};o>1&&(g.rowspan=o),c>1&&(g.colspan=c),n.editable?d='<span contenteditable="true">'+d+"</span>":m&&(g["data-t"]=m&&m.t||"z",m.v!=null&&(g["data-v"]=m.v),m.z!=null&&(g["data-z"]=m.z),m.l&&(m.l.Target||"#").charAt(0)!="#"&&(d='<a href="'+m.l.Target+'">'+d+"</a>")),g.id=(n.id||"sjs")+"-"+u,a.push(ke("td",d,g))}}var v="<tr>";return v+a.join("")+"</tr>"}var Q2='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',eE="</body></html>";function tE(e,t,r){var n=[];return n.join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}function dh(e,t){var r=t||{},n=r.header!=null?r.header:Q2,i=r.footer!=null?r.footer:eE,a=[n],s=Mr(e["!ref"]);r.dense=Array.isArray(e),a.push(tE(e,s,r));for(var o=s.s.r;o<=s.e.r;++o)a.push(Z2(e,s,o,r));return a.push("</table>"+i),a.join("")}function ph(e,t,r){var n=r||{},i=0,a=0;if(n.origin!=null)if(typeof n.origin=="number")i=n.origin;else{var s=typeof n.origin=="string"?nr(n.origin):n.origin;i=s.r,a=s.c}var o=t.getElementsByTagName("tr"),c=Math.min(n.sheetRows||1e7,o.length),l={s:{r:0,c:0},e:{r:i,c:a}};if(e["!ref"]){var u=Mr(e["!ref"]);l.s.r=Math.min(l.s.r,u.s.r),l.s.c=Math.min(l.s.c,u.s.c),l.e.r=Math.max(l.e.r,u.e.r),l.e.c=Math.max(l.e.c,u.e.c),i==-1&&(l.e.r=i=u.e.r+1)}var m=[],d=0,g=e["!rows"]||(e["!rows"]=[]),v=0,p=0,_=0,E=0,D=0,A=0;for(e["!cols"]||(e["!cols"]=[]);v<o.length&&p<c;++v){var S=o[v];if(Fu(S)){if(n.display)continue;g[p]={hidden:!0}}var I=S.children;for(_=E=0;_<I.length;++_){var U=I[_];if(!(n.display&&Fu(U))){var R=U.hasAttribute("data-v")?U.getAttribute("data-v"):U.hasAttribute("v")?U.getAttribute("v"):Op(U.innerHTML),Y=U.getAttribute("data-z")||U.getAttribute("z");for(d=0;d<m.length;++d){var W=m[d];W.s.c==E+a&&W.s.r<p+i&&p+i<=W.e.r&&(E=W.e.c+1-a,d=-1)}A=+U.getAttribute("colspan")||1,((D=+U.getAttribute("rowspan")||1)>1||A>1)&&m.push({s:{r:p+i,c:E+a},e:{r:p+i+(D||1)-1,c:E+a+(A||1)-1}});var Z={t:"s",v:R},N=U.getAttribute("data-t")||U.getAttribute("t")||"";R!=null&&(R.length==0?Z.t=N||"z":n.raw||R.trim().length==0||N=="s"||(R==="TRUE"?Z={t:"b",v:!0}:R==="FALSE"?Z={t:"b",v:!1}:isNaN(Un(R))?isNaN(Ga(R).getDate())||(Z={t:"d",v:wr(R)},n.cellDates||(Z={t:"n",v:br(Z.v)}),Z.z=n.dateNF||Wt[14]):Z={t:"n",v:Un(R)})),Z.z===void 0&&Y!=null&&(Z.z=Y);var M="",G=U.getElementsByTagName("A");if(G&&G.length)for(var b=0;b<G.length&&!(G[b].hasAttribute("href")&&(M=G[b].getAttribute("href"),M.charAt(0)!="#"));++b);M&&M.charAt(0)!="#"&&(Z.l={Target:M}),n.dense?(e[p+i]||(e[p+i]=[]),e[p+i][E+a]=Z):e[Tt({c:E+a,r:p+i})]=Z,l.e.c<E+a&&(l.e.c=E+a),E+=A}}++p}return m.length&&(e["!merges"]=(e["!merges"]||[]).concat(m)),l.e.r=Math.max(l.e.r,p-1+i),e["!ref"]=Gt(l),p>=c&&(e["!fullref"]=Gt((l.e.r=o.length-v+p-1+i,l))),e}function mh(e,t){var r=t||{},n=r.dense?[]:{};return ph(n,e,t)}function rE(e,t){return Bi(mh(e,t),t)}function Fu(e){var t="",r=nE(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function nE(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}var iE=function(){var e=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),t="<office:document-styles "+Ka({"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:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+e+"</office:document-styles>";return function(){return Xt+t}}(),bu=function(){var e=function(a){return Ct(a).replace(/  +/g,function(s){return'<text:s text:c="'+s.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")},t=`          <table:table-cell />
`,r=`          <table:covered-table-cell/>
`,n=function(a,s,o){var c=[];c.push('      <table:table table:name="'+Ct(s.SheetNames[o])+`" table:style-name="ta1">
`);var l=0,u=0,m=Mr(a["!ref"]||"A1"),d=a["!merges"]||[],g=0,v=Array.isArray(a);if(a["!cols"])for(u=0;u<=m.e.c;++u)c.push("        <table:table-column"+(a["!cols"][u]?' table:style-name="co'+a["!cols"][u].ods+'"':"")+`></table:table-column>
`);var p="",_=a["!rows"]||[];for(l=0;l<m.s.r;++l)p=_[l]?' table:style-name="ro'+_[l].ods+'"':"",c.push("        <table:table-row"+p+`></table:table-row>
`);for(;l<=m.e.r;++l){for(p=_[l]?' table:style-name="ro'+_[l].ods+'"':"",c.push("        <table:table-row"+p+`>
`),u=0;u<m.s.c;++u)c.push(t);for(;u<=m.e.c;++u){var E=!1,D={},A="";for(g=0;g!=d.length;++g)if(!(d[g].s.c>u)&&!(d[g].s.r>l)&&!(d[g].e.c<u)&&!(d[g].e.r<l)){(d[g].s.c!=u||d[g].s.r!=l)&&(E=!0),D["table:number-columns-spanned"]=d[g].e.c-d[g].s.c+1,D["table:number-rows-spanned"]=d[g].e.r-d[g].s.r+1;break}if(E){c.push(r);continue}var S=Tt({r:l,c:u}),I=v?(a[l]||[])[u]:a[S];if(I&&I.f&&(D["table:formula"]=Ct(Av(I.f)),I.F&&I.F.slice(0,S.length)==S)){var U=Mr(I.F);D["table:number-matrix-columns-spanned"]=U.e.c-U.s.c+1,D["table:number-matrix-rows-spanned"]=U.e.r-U.s.r+1}if(!I){c.push(t);continue}switch(I.t){case"b":A=I.v?"TRUE":"FALSE",D["office:value-type"]="boolean",D["office:boolean-value"]=I.v?"true":"false";break;case"n":A=I.w||String(I.v||0),D["office:value-type"]="float",D["office:value"]=I.v||0;break;case"s":case"str":A=I.v==null?"":I.v,D["office:value-type"]="string";break;case"d":A=I.w||wr(I.v).toISOString(),D["office:value-type"]="date",D["office:date-value"]=wr(I.v).toISOString(),D["table:style-name"]="ce1";break;default:c.push(t);continue}var R=e(A);if(I.l&&I.l.Target){var Y=I.l.Target;Y=Y.charAt(0)=="#"?"#"+Cv(Y.slice(1)):Y,Y.charAt(0)!="#"&&!Y.match(/^\w+:/)&&(Y="../"+Y),R=ke("text:a",R,{"xlink:href":Y.replace(/&/g,"&amp;")})}c.push("          "+ke("table:table-cell",ke("text:p",R,{}),D)+`
`)}c.push(`        </table:table-row>
`)}return c.push(`      </table:table>
`),c.join("")},i=function(a,s){a.push(` <office:automatic-styles>
`),a.push(`  <number:date-style style:name="N37" number:automatic-order="true">
`),a.push(`   <number:month number:style="long"/>
`),a.push(`   <number:text>/</number:text>
`),a.push(`   <number:day number:style="long"/>
`),a.push(`   <number:text>/</number:text>
`),a.push(`   <number:year/>
`),a.push(`  </number:date-style>
`);var o=0;s.SheetNames.map(function(l){return s.Sheets[l]}).forEach(function(l){if(l&&l["!cols"]){for(var u=0;u<l["!cols"].length;++u)if(l["!cols"][u]){var m=l["!cols"][u];if(m.width==null&&m.wpx==null&&m.wch==null)continue;rc(m),m.ods=o;var d=l["!cols"][u].wpx+"px";a.push('  <style:style style:name="co'+o+`" style:family="table-column">
`),a.push('   <style:table-column-properties fo:break-before="auto" style:column-width="'+d+`"/>
`),a.push(`  </style:style>
`),++o}}});var c=0;s.SheetNames.map(function(l){return s.Sheets[l]}).forEach(function(l){if(l&&l["!rows"]){for(var u=0;u<l["!rows"].length;++u)if(l["!rows"][u]){l["!rows"][u].ods=c;var m=l["!rows"][u].hpx+"px";a.push('  <style:style style:name="ro'+c+`" style:family="table-row">
`),a.push('   <style:table-row-properties fo:break-before="auto" style:row-height="'+m+`"/>
`),a.push(`  </style:style>
`),++c}}}),a.push(`  <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">
`),a.push(`   <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
`),a.push(`  </style:style>
`),a.push(`  <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>
`),a.push(` </office:automatic-styles>
`)};return function(s,o){var c=[Xt],l=Ka({"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"}),u=Ka({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});o.bookType=="fods"?(c.push("<office:document"+l+u+`>
`),c.push(kf().replace(/office:document-meta/g,"office:meta"))):c.push("<office:document-content"+l+`>
`),i(c,s),c.push(`  <office:body>
`),c.push(`    <office:spreadsheet>
`);for(var m=0;m!=s.SheetNames.length;++m)c.push(n(s.Sheets[s.SheetNames[m]],s,m));return c.push(`    </office:spreadsheet>
`),c.push(`  </office:body>
`),o.bookType=="fods"?c.push("</office:document>"):c.push("</office:document-content>"),c.join("")}}();function gh(e,t){if(t.bookType=="fods")return bu(e,t);var r=$l(),n="",i=[],a=[];return n="mimetype",at(r,n,"application/vnd.oasis.opendocument.spreadsheet"),n="content.xml",at(r,n,bu(e,t)),i.push([n,"text/xml"]),a.push([n,"ContentFile"]),n="styles.xml",at(r,n,iE(e,t)),i.push([n,"text/xml"]),a.push([n,"StylesFile"]),n="meta.xml",at(r,n,Xt+kf()),i.push([n,"text/xml"]),a.push([n,"MetadataFile"]),n="manifest.rdf",at(r,n,gm(a)),i.push([n,"application/rdf+xml"]),n="META-INF/manifest.xml",at(r,n,pm(i)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function no(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function aE(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):on(Xa(e))}function sE(e,t){e:for(var r=0;r<=e.length-t.length;++r){for(var n=0;n<t.length;++n)if(e[r+n]!=t[n])continue e;return!0}return!1}function oi(e){var t=e.reduce(function(i,a){return i+a.length},0),r=new Uint8Array(t),n=0;return e.forEach(function(i){r.set(i,n),n+=i.length}),r}function oE(e,t,r){var n=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,i=r/Math.pow(10,n-6176);e[t+15]|=n>>7,e[t+14]|=(n&127)<<1;for(var a=0;i>=1;++a,i/=256)e[t+a]=i&255;e[t+15]|=r>=0?0:128}function Ya(e,t){var r=t?t[0]:0,n=e[r]&127;e:if(e[r++]>=128&&(n|=(e[r]&127)<<7,e[r++]<128||(n|=(e[r]&127)<<14,e[r++]<128)||(n|=(e[r]&127)<<21,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,28),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,35),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),n}function Dt(e){var t=new Uint8Array(7);t[0]=e&127;var r=1;e:if(e>127){if(t[r-1]|=128,t[r]=e>>7&127,++r,e<=16383||(t[r-1]|=128,t[r]=e>>14&127,++r,e<=2097151)||(t[r-1]|=128,t[r]=e>>21&127,++r,e<=268435455)||(t[r-1]|=128,t[r]=e/256>>>21&127,++r,e<=34359738367)||(t[r-1]|=128,t[r]=e/65536>>>21&127,++r,e<=4398046511103))break e;t[r-1]|=128,t[r]=e/16777216>>>21&127,++r}return t.slice(0,r)}function na(e){var t=0,r=e[t]&127;e:if(e[t++]>=128){if(r|=(e[t]&127)<<7,e[t++]<128||(r|=(e[t]&127)<<14,e[t++]<128)||(r|=(e[t]&127)<<21,e[t++]<128))break e;r|=(e[t]&127)<<28}return r}function qt(e){for(var t=[],r=[0];r[0]<e.length;){var n=r[0],i=Ya(e,r),a=i&7;i=Math.floor(i/8);var s=0,o;if(i==0)break;switch(a){case 0:{for(var c=r[0];e[r[0]++]>=128;);o=e.slice(c,r[0])}break;case 5:s=4,o=e.slice(r[0],r[0]+s),r[0]+=s;break;case 1:s=8,o=e.slice(r[0],r[0]+s),r[0]+=s;break;case 2:s=Ya(e,r),o=e.slice(r[0],r[0]+s),r[0]+=s;break;case 3:case 4:default:throw new Error("PB Type ".concat(a," for Field ").concat(i," at offset ").concat(n))}var l={data:o,type:a};t[i]==null?t[i]=[l]:t[i].push(l)}return t}function sr(e){var t=[];return e.forEach(function(r,n){r.forEach(function(i){i.data&&(t.push(Dt(n*8+i.type)),i.type==2&&t.push(Dt(i.data.length)),t.push(i.data))})}),oi(t)}function en(e){for(var t,r=[],n=[0];n[0]<e.length;){var i=Ya(e,n),a=qt(e.slice(n[0],n[0]+i));n[0]+=i;var s={id:na(a[1][0].data),messages:[]};a[2].forEach(function(o){var c=qt(o.data),l=na(c[3][0].data);s.messages.push({meta:c,data:e.slice(n[0],n[0]+l)}),n[0]+=l}),(t=a[3])!=null&&t[0]&&(s.merge=na(a[3][0].data)>>>0>0),r.push(s)}return r}function Hi(e){var t=[];return e.forEach(function(r){var n=[];n[1]=[{data:Dt(r.id),type:0}],n[2]=[],r.merge!=null&&(n[3]=[{data:Dt(+!!r.merge),type:0}]);var i=[];r.messages.forEach(function(s){i.push(s.data),s.meta[3]=[{type:0,data:Dt(s.data.length)}],n[2].push({data:sr(s.meta),type:2})});var a=sr(n);t.push(Dt(a.length)),t.push(a),i.forEach(function(s){return t.push(s)})}),oi(t)}function lE(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=Ya(t,r),i=[];r[0]<t.length;){var a=t[r[0]]&3;if(a==0){var s=t[r[0]++]>>2;if(s<60)++s;else{var o=s-59;s=t[r[0]],o>1&&(s|=t[r[0]+1]<<8),o>2&&(s|=t[r[0]+2]<<16),o>3&&(s|=t[r[0]+3]<<24),s>>>=0,s++,r[0]+=o}i.push(t.slice(r[0],r[0]+s)),r[0]+=s;continue}else{var c=0,l=0;if(a==1?(l=(t[r[0]]>>2&7)+4,c=(t[r[0]++]&224)<<3,c|=t[r[0]++]):(l=(t[r[0]++]>>2)+1,a==2?(c=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(c=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),i=[oi(i)],c==0)throw new Error("Invalid offset 0");if(c>i[0].length)throw new Error("Invalid offset beyond length");if(l>=c)for(i.push(i[0].slice(-c)),l-=c;l>=i[i.length-1].length;)i.push(i[i.length-1]),l-=i[i.length-1].length;i.push(i[0].slice(-c,-c+l))}}var u=oi(i);if(u.length!=n)throw new Error("Unexpected length: ".concat(u.length," != ").concat(n));return u}function tn(e){for(var t=[],r=0;r<e.length;){var n=e[r++],i=e[r]|e[r+1]<<8|e[r+2]<<16;r+=3,t.push(lE(n,e.slice(r,r+i))),r+=i}if(r!==e.length)throw new Error("data is not a valid framed stream!");return oi(t)}function $i(e){for(var t=[],r=0;r<e.length;){var n=Math.min(e.length-r,268435455),i=new Uint8Array(4);t.push(i);var a=Dt(n),s=a.length;t.push(a),n<=60?(s++,t.push(new Uint8Array([n-1<<2]))):n<=256?(s+=2,t.push(new Uint8Array([240,n-1&255]))):n<=65536?(s+=3,t.push(new Uint8Array([244,n-1&255,n-1>>8&255]))):n<=16777216?(s+=4,t.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(s+=5,t.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),t.push(e.slice(r,r+n)),s+=n,i[0]=0,i[1]=s&255,i[2]=s>>8&255,i[3]=s>>16&255,r+=n}return oi(t)}function Go(e,t){var r=new Uint8Array(32),n=no(r),i=12,a=0;switch(r[0]=5,e.t){case"n":r[1]=2,oE(r,i,e.v),a|=1,i+=16;break;case"b":r[1]=6,n.setFloat64(i,e.v?1:0,!0),a|=2,i+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));r[1]=3,n.setUint32(i,t.indexOf(e.v),!0),a|=8,i+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(8,a,!0),r.slice(0,i)}function Xo(e,t){var r=new Uint8Array(32),n=no(r),i=12,a=0;switch(r[0]=3,e.t){case"n":r[2]=2,n.setFloat64(i,e.v,!0),a|=32,i+=8;break;case"b":r[2]=6,n.setFloat64(i,e.v?1:0,!0),a|=32,i+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));r[2]=3,n.setUint32(i,t.indexOf(e.v),!0),a|=16,i+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(4,a,!0),r.slice(0,i)}function Zn(e){var t=qt(e);return Ya(t[1][0].data)}function cE(e,t,r){var n,i,a,s;if(!((n=e[6])!=null&&n[0])||!((i=e[7])!=null&&i[0]))throw"Mutation only works on post-BNC storages!";var o=((s=(a=e[8])==null?void 0:a[0])==null?void 0:s.data)&&na(e[8][0].data)>0||!1;if(o)throw"Math only works with normal offsets";for(var c=0,l=no(e[7][0].data),u=0,m=[],d=no(e[4][0].data),g=0,v=[],p=0;p<t.length;++p){if(t[p]==null){l.setUint16(p*2,65535,!0),d.setUint16(p*2,65535);continue}l.setUint16(p*2,u,!0),d.setUint16(p*2,g,!0);var _,E;switch(typeof t[p]){case"string":_=Go({t:"s",v:t[p]},r),E=Xo({t:"s",v:t[p]},r);break;case"number":_=Go({t:"n",v:t[p]},r),E=Xo({t:"n",v:t[p]},r);break;case"boolean":_=Go({t:"b",v:t[p]},r),E=Xo({t:"b",v:t[p]},r);break;default:throw new Error("Unsupported value "+t[p])}m.push(_),u+=_.length,v.push(E),g+=E.length,++c}for(e[2][0].data=Dt(c);p<e[7][0].data.length/2;++p)l.setUint16(p*2,65535,!0),d.setUint16(p*2,65535,!0);return e[6][0].data=oi(m),e[3][0].data=oi(v),c}function uE(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var n=Mr(r["!ref"]);n.s.r=n.s.c=0;var i=!1;n.e.c>9&&(i=!0,n.e.c=9),n.e.r>49&&(i=!0,n.e.r=49),i&&console.error("The Numbers writer is currently limited to ".concat(Gt(n)));var a=io(r,{range:n,header:1}),s=["~Sh33tJ5~"];a.forEach(function(K){return K.forEach(function(z){typeof z=="string"&&s.push(z)})});var o={},c=[],l=St.read(t.numbers,{type:"base64"});l.FileIndex.map(function(K,z){return[K,l.FullPaths[z]]}).forEach(function(K){var z=K[0],X=K[1];if(z.type==2&&z.name.match(/\.iwa/)){var ee=z.content,ye=tn(ee),xe=en(ye);xe.forEach(function(me){c.push(me.id),o[me.id]={deps:[],location:X,type:na(me.messages[0].meta[1][0].data)}})}}),c.sort(function(K,z){return K-z});var u=c.filter(function(K){return K>1}).map(function(K){return[K,Dt(K)]});l.FileIndex.map(function(K,z){return[K,l.FullPaths[z]]}).forEach(function(K){var z=K[0];if(K[1],!!z.name.match(/\.iwa/)){var X=en(tn(z.content));X.forEach(function(ee){ee.messages.forEach(function(ye){u.forEach(function(xe){ee.messages.some(function(me){return na(me.meta[1][0].data)!=11006&&sE(me.data,xe[1])})&&o[xe[0]].deps.push(ee.id)})})})}});for(var m=St.find(l,o[1].location),d=en(tn(m.content)),g,v=0;v<d.length;++v){var p=d[v];p.id==1&&(g=p)}var _=Zn(qt(g.messages[0].data)[1][0].data);for(m=St.find(l,o[_].location),d=en(tn(m.content)),v=0;v<d.length;++v)p=d[v],p.id==_&&(g=p);for(_=Zn(qt(g.messages[0].data)[2][0].data),m=St.find(l,o[_].location),d=en(tn(m.content)),v=0;v<d.length;++v)p=d[v],p.id==_&&(g=p);for(_=Zn(qt(g.messages[0].data)[2][0].data),m=St.find(l,o[_].location),d=en(tn(m.content)),v=0;v<d.length;++v)p=d[v],p.id==_&&(g=p);var E=qt(g.messages[0].data);{E[6][0].data=Dt(n.e.r+1),E[7][0].data=Dt(n.e.c+1);var D=Zn(E[46][0].data),A=St.find(l,o[D].location),S=en(tn(A.content));{for(var I=0;I<S.length&&S[I].id!=D;++I);if(S[I].id!=D)throw"Bad ColumnRowUIDMapArchive";var U=qt(S[I].messages[0].data);U[1]=[],U[2]=[],U[3]=[];for(var R=0;R<=n.e.c;++R){var Y=[];Y[1]=Y[2]=[{type:0,data:Dt(R+420690)}],U[1].push({type:2,data:sr(Y)}),U[2].push({type:0,data:Dt(R)}),U[3].push({type:0,data:Dt(R)})}U[4]=[],U[5]=[],U[6]=[];for(var W=0;W<=n.e.r;++W)Y=[],Y[1]=Y[2]=[{type:0,data:Dt(W+726270)}],U[4].push({type:2,data:sr(Y)}),U[5].push({type:0,data:Dt(W)}),U[6].push({type:0,data:Dt(W)});S[I].messages[0].data=sr(U)}A.content=$i(Hi(S)),A.size=A.content.length,delete E[46];var Z=qt(E[4][0].data);{Z[7][0].data=Dt(n.e.r+1);var N=qt(Z[1][0].data),M=Zn(N[2][0].data);A=St.find(l,o[M].location),S=en(tn(A.content));{if(S[0].id!=M)throw"Bad HeaderStorageBucket";var G=qt(S[0].messages[0].data);for(W=0;W<a.length;++W){var b=qt(G[2][0].data);b[1][0].data=Dt(W),b[4][0].data=Dt(a[W].length),G[2][W]={type:G[2][0].type,data:sr(b)}}S[0].messages[0].data=sr(G)}A.content=$i(Hi(S)),A.size=A.content.length;var V=Zn(Z[2][0].data);A=St.find(l,o[V].location),S=en(tn(A.content));{if(S[0].id!=V)throw"Bad HeaderStorageBucket";for(G=qt(S[0].messages[0].data),R=0;R<=n.e.c;++R)b=qt(G[2][0].data),b[1][0].data=Dt(R),b[4][0].data=Dt(n.e.r+1),G[2][R]={type:G[2][0].type,data:sr(b)};S[0].messages[0].data=sr(G)}A.content=$i(Hi(S)),A.size=A.content.length;var q=Zn(Z[4][0].data);(function(){for(var K=St.find(l,o[q].location),z=en(tn(K.content)),X,ee=0;ee<z.length;++ee){var ye=z[ee];ye.id==q&&(X=ye)}var xe=qt(X.messages[0].data);{xe[3]=[];var me=[];s.forEach(function(Le,Ye){me[1]=[{type:0,data:Dt(Ye)}],me[2]=[{type:0,data:Dt(1)}],me[3]=[{type:2,data:aE(Le)}],xe[3].push({type:2,data:sr(me)})})}X.messages[0].data=sr(xe);var se=Hi(z),be=$i(se);K.content=be,K.size=K.content.length})();var re=qt(Z[3][0].data);{var le=re[1][0];delete re[2];var pe=qt(le.data);{var Ce=Zn(pe[2][0].data);(function(){for(var K=St.find(l,o[Ce].location),z=en(tn(K.content)),X,ee=0;ee<z.length;++ee){var ye=z[ee];ye.id==Ce&&(X=ye)}var xe=qt(X.messages[0].data);{delete xe[6],delete re[7];var me=new Uint8Array(xe[5][0].data);xe[5]=[];for(var se=0,be=0;be<=n.e.r;++be){var Le=qt(me);se+=cE(Le,a[be],s),Le[1][0].data=Dt(be),xe[5].push({data:sr(Le),type:2})}xe[1]=[{type:0,data:Dt(n.e.c+1)}],xe[2]=[{type:0,data:Dt(n.e.r+1)}],xe[3]=[{type:0,data:Dt(se)}],xe[4]=[{type:0,data:Dt(n.e.r+1)}]}X.messages[0].data=sr(xe);var Ye=Hi(z),We=$i(Ye);K.content=We,K.size=K.content.length})()}le.data=sr(pe)}Z[3][0].data=sr(re)}E[4][0].data=sr(Z)}g.messages[0].data=sr(E);var Te=Hi(d),O=$i(Te);return m.content=O,m.size=m.content.length,l}function fE(e){return function(r){for(var n=0;n!=e.length;++n){var i=e[n];r[i[0]]===void 0&&(r[i[0]]=i[1]),i[2]==="n"&&(r[i[0]]=Number(r[i[0]]))}}}function oc(e){fE([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function hE(e,t){return t.bookType=="ods"?gh(e,t):t.bookType=="numbers"?uE(e,t):t.bookType=="xlsb"?dE(e,t):pE(e,t)}function dE(e,t){Zi=1024,e&&!e.SSF&&(e.SSF=kr(Wt)),e&&e.SSF&&(wo(),Eo(e.SSF),t.revssf=yo(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,Ra?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var r=t.bookType=="xlsb"?"bin":"xml",n=Zf.indexOf(t.bookType)>-1,i=Sf();oc(t=t||{});var a=$l(),s="",o=0;if(t.cellXfs=[],ci(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),s="docProps/core.xml",at(a,s,Nf(e.Props,t)),i.coreprops.push(s),At(t.rels,2,s,vt.CORE_PROPS),s="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],l=0;l<e.SheetNames.length;++l)(e.Workbook.Sheets[l]||{}).Hidden!=2&&c.push(e.SheetNames[l]);e.Props.SheetNames=c}for(e.Props.Worksheets=e.Props.SheetNames.length,at(a,s,Of(e.Props)),i.extprops.push(s),At(t.rels,3,s,vt.EXT_PROPS),e.Custprops!==e.Props&&hr(e.Custprops||{}).length>0&&(s="docProps/custom.xml",at(a,s,Bf(e.Custprops)),i.custprops.push(s),At(t.rels,4,s,vt.CUST_PROPS)),o=1;o<=e.SheetNames.length;++o){var u={"!id":{}},m=e.Sheets[e.SheetNames[o-1]],d=(m||{})["!type"]||"sheet";switch(d){case"chart":default:s="xl/worksheets/sheet"+o+"."+r,at(a,s,g2(o-1,s,t,e,u)),i.sheets.push(s),At(t.wbrels,-1,"worksheets/sheet"+o+"."+r,vt.WS[0])}if(m){var g=m["!comments"],v=!1,p="";g&&g.length>0&&(p="xl/comments"+o+"."+r,at(a,p,_2(g,p)),i.comments.push(p),At(u,-1,"../comments"+o+"."+r,vt.CMNT),v=!0),m["!legacy"]&&v&&at(a,"xl/drawings/vmlDrawing"+o+".vml",qf(o,m["!comments"])),delete m["!comments"],delete m["!legacy"]}u["!id"].rId1&&at(a,bf(s),ta(u))}return t.Strings!=null&&t.Strings.length>0&&(s="xl/sharedStrings."+r,at(a,s,v2(t.Strings,s,t)),i.strs.push(s),At(t.wbrels,-1,"sharedStrings."+r,vt.SST)),s="xl/workbook."+r,at(a,s,m2(e,s)),i.workbooks.push(s),At(t.rels,1,s,vt.WB),s="xl/theme/theme1.xml",at(a,s,Kf(e.Themes,t)),i.themes.push(s),At(t.wbrels,-1,"theme/theme1.xml",vt.THEME),s="xl/styles."+r,at(a,s,x2(e,s,t)),i.styles.push(s),At(t.wbrels,-1,"styles."+r,vt.STY),e.vbaraw&&n&&(s="xl/vbaProject.bin",at(a,s,e.vbaraw),i.vba.push(s),At(t.wbrels,-1,"vbaProject.bin",vt.VBA)),s="xl/metadata."+r,at(a,s,E2(s)),i.metadata.push(s),At(t.wbrels,-1,"metadata."+r,vt.XLMETA),at(a,"[Content_Types].xml",Ff(i,t)),at(a,"_rels/.rels",ta(t.rels)),at(a,"xl/_rels/workbook."+r+".rels",ta(t.wbrels)),delete t.revssf,delete t.ssf,a}function pE(e,t){Zi=1024,e&&!e.SSF&&(e.SSF=kr(Wt)),e&&e.SSF&&(wo(),Eo(e.SSF),t.revssf=yo(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,Ra?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var r="xml",n=Zf.indexOf(t.bookType)>-1,i=Sf();oc(t=t||{});var a=$l(),s="",o=0;if(t.cellXfs=[],ci(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),s="docProps/core.xml",at(a,s,Nf(e.Props,t)),i.coreprops.push(s),At(t.rels,2,s,vt.CORE_PROPS),s="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],l=0;l<e.SheetNames.length;++l)(e.Workbook.Sheets[l]||{}).Hidden!=2&&c.push(e.SheetNames[l]);e.Props.SheetNames=c}e.Props.Worksheets=e.Props.SheetNames.length,at(a,s,Of(e.Props)),i.extprops.push(s),At(t.rels,3,s,vt.EXT_PROPS),e.Custprops!==e.Props&&hr(e.Custprops||{}).length>0&&(s="docProps/custom.xml",at(a,s,Bf(e.Custprops)),i.custprops.push(s),At(t.rels,4,s,vt.CUST_PROPS));var u=["SheetJ5"];for(t.tcid=0,o=1;o<=e.SheetNames.length;++o){var m={"!id":{}},d=e.Sheets[e.SheetNames[o-1]],g=(d||{})["!type"]||"sheet";switch(g){case"chart":default:s="xl/worksheets/sheet"+o+"."+r,at(a,s,oh(o-1,t,e,m)),i.sheets.push(s),At(t.wbrels,-1,"worksheets/sheet"+o+"."+r,vt.WS[0])}if(d){var v=d["!comments"],p=!1,_="";if(v&&v.length>0){var E=!1;v.forEach(function(D){D[1].forEach(function(A){A.T==!0&&(E=!0)})}),E&&(_="xl/threadedComments/threadedComment"+o+"."+r,at(a,_,$g(v,u,t)),i.threadedcomments.push(_),At(m,-1,"../threadedComments/threadedComment"+o+"."+r,vt.TCMNT)),_="xl/comments"+o+"."+r,at(a,_,Jf(v)),i.comments.push(_),At(m,-1,"../comments"+o+"."+r,vt.CMNT),p=!0}d["!legacy"]&&p&&at(a,"xl/drawings/vmlDrawing"+o+".vml",qf(o,d["!comments"])),delete d["!comments"],delete d["!legacy"]}m["!id"].rId1&&at(a,bf(s),ta(m))}return t.Strings!=null&&t.Strings.length>0&&(s="xl/sharedStrings."+r,at(a,s,zf(t.Strings,t)),i.strs.push(s),At(t.wbrels,-1,"sharedStrings."+r,vt.SST)),s="xl/workbook."+r,at(a,s,uh(e)),i.workbooks.push(s),At(t.rels,1,s,vt.WB),s="xl/theme/theme1.xml",at(a,s,Kf(e.Themes,t)),i.themes.push(s),At(t.wbrels,-1,"theme/theme1.xml",vt.THEME),s="xl/styles."+r,at(a,s,Gf(e,t)),i.styles.push(s),At(t.wbrels,-1,"styles."+r,vt.STY),e.vbaraw&&n&&(s="xl/vbaProject.bin",at(a,s,e.vbaraw),i.vba.push(s),At(t.wbrels,-1,"vbaProject.bin",vt.VBA)),s="xl/metadata."+r,at(a,s,Yf()),i.metadata.push(s),At(t.wbrels,-1,"metadata."+r,vt.XLMETA),u.length>1&&(s="xl/persons/person.xml",at(a,s,Gg(u)),i.people.push(s),At(t.wbrels,-1,"persons/person.xml",vt.PEOPLE)),at(a,"[Content_Types].xml",Ff(i,t)),at(a,"_rels/.rels",ta(t.rels)),at(a,"xl/_rels/workbook."+r+".rels",ta(t.wbrels)),delete t.revssf,delete t.ssf,a}function mE(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=Vn(e.slice(0,12));break;case"binary":r=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function xh(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return ts(t.file,St.write(e,{type:wt?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return St.write(e,t)}function gE(e,t){var r=kr(t||{}),n=hE(e,r);return xE(n,r)}function xE(e,t){var r={},n=wt?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(r.compression="DEFLATE"),t.password)r.type=n;else switch(t.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":r.type=n;break;default:throw new Error("Unrecognized type "+t.type)}var i=e.FullPaths?St.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!t.compression}):e.generate(r);if(typeof Deno<"u"&&typeof i=="string"){if(t.type=="binary"||t.type=="base64")return i;i=new Uint8Array(_o(i))}return t.password&&typeof encrypt_agile<"u"?xh(encrypt_agile(i,t.password),t):t.type==="file"?ts(t.file,i):t.type=="string"?Oa(i):i}function vE(e,t){var r=t||{},n=B2(e,r);return xh(n,r)}function mn(e,t,r){r||(r="");var n=r+e;switch(t.type){case"base64":return $a(Xa(n));case"binary":return Xa(n);case"string":return e;case"file":return ts(t.file,n,"utf8");case"buffer":return wt?Xn(n,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(n):mn(n,{type:"binary"}).split("").map(function(i){return i.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function _E(e,t){switch(t.type){case"base64":return $a(e);case"binary":return e;case"string":return e;case"file":return ts(t.file,e,"binary");case"buffer":return wt?Xn(e,"binary"):e.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function Es(e,t){switch(t.type){case"string":case"base64":case"binary":for(var r="",n=0;n<e.length;++n)r+=String.fromCharCode(e[n]);return t.type=="base64"?$a(r):t.type=="string"?Oa(r):r;case"file":return ts(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function vh(e,t){X1(),i2(e);var r=kr(t||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var n=vh(e,r);return r.type="array",_o(n)}var i=0;if(r.sheet&&(typeof r.sheet=="number"?i=r.sheet:i=e.SheetNames.indexOf(r.sheet),!e.SheetNames[i]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return mn(I2(e,r),r);case"slk":case"sylk":return mn(tg.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"htm":case"html":return mn(dh(e.Sheets[e.SheetNames[i]],r),r);case"txt":return _E(_h(e.Sheets[e.SheetNames[i]],r),r);case"csv":return mn(lc(e.Sheets[e.SheetNames[i]],r),r,"\uFEFF");case"dif":return mn(rg.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"dbf":return Es(eg.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"prn":return mn(ng.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"rtf":return mn(ug.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"eth":return mn(Wf.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"fods":return mn(gh(e,r),r);case"wk1":return Es(yu.sheet_to_wk1(e.Sheets[e.SheetNames[i]],r),r);case"wk3":return Es(yu.book_to_wk3(e,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),Es(hh(e,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),vE(e,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return gE(e,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}function EE(e){if(!e.bookType){var t={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},r=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();r.match(/^\.[a-z]+$/)&&(e.bookType=r.slice(1)),e.bookType=t[e.bookType]||e.bookType}}function wE(e,t,r){var n=r||{};return n.type="file",n.file=t,EE(n),vh(e,n)}function yE(e,t,r,n,i,a,s,o){var c=fr(r),l=o.defval,u=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),m=!0,d=i===1?[]:{};if(i!==1)if(Object.defineProperty)try{Object.defineProperty(d,"__rowNum__",{value:r,enumerable:!1})}catch{d.__rowNum__=r}else d.__rowNum__=r;if(!s||e[r])for(var g=t.s.c;g<=t.e.c;++g){var v=s?e[r][g]:e[n[g]+c];if(v===void 0||v.t===void 0){if(l===void 0)continue;a[g]!=null&&(d[a[g]]=l);continue}var p=v.v;switch(v.t){case"z":if(p==null)break;continue;case"e":p=p==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+v.t)}if(a[g]!=null){if(p==null)if(v.t=="e"&&p===null)d[a[g]]=null;else if(l!==void 0)d[a[g]]=l;else if(u&&p===null)d[a[g]]=null;else continue;else d[a[g]]=u&&(v.t!=="n"||v.t==="n"&&o.rawNumbers!==!1)?p:Hn(v,p,o);p!=null&&(m=!1)}}return{row:d,isempty:m}}function io(e,t){if(e==null||e["!ref"]==null)return[];var r={t:"n",v:0},n=0,i=1,a=[],s=0,o="",c={s:{r:0,c:0},e:{r:0,c:0}},l=t||{},u=l.range!=null?l.range:e["!ref"];switch(l.header===1?n=1:l.header==="A"?n=2:Array.isArray(l.header)?n=3:l.header==null&&(n=0),typeof u){case"string":c=jt(u);break;case"number":c=jt(e["!ref"]),c.s.r=u;break;default:c=u}n>0&&(i=0);var m=fr(c.s.r),d=[],g=[],v=0,p=0,_=Array.isArray(e),E=c.s.r,D=0,A={};_&&!e[E]&&(e[E]=[]);var S=l.skipHidden&&e["!cols"]||[],I=l.skipHidden&&e["!rows"]||[];for(D=c.s.c;D<=c.e.c;++D)if(!(S[D]||{}).hidden)switch(d[D]=pr(D),r=_?e[E][D]:e[d[D]+m],n){case 1:a[D]=D-c.s.c;break;case 2:a[D]=d[D];break;case 3:a[D]=l.header[D-c.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),o=s=Hn(r,null,l),p=A[s]||0,!p)A[s]=1;else{do o=s+"_"+p++;while(A[o]);A[s]=p,A[o]=1}a[D]=o}for(E=c.s.r+i;E<=c.e.r;++E)if(!(I[E]||{}).hidden){var U=yE(e,c,E,d,n,a,_,l);(U.isempty===!1||(n===1?l.blankrows!==!1:l.blankrows))&&(g[v++]=U.row)}return g.length=v,g}var ku=/"/g;function DE(e,t,r,n,i,a,s,o){for(var c=!0,l=[],u="",m=fr(r),d=t.s.c;d<=t.e.c;++d)if(n[d]){var g=o.dense?(e[r]||[])[d]:e[n[d]+m];if(g==null)u="";else if(g.v!=null){c=!1,u=""+(o.rawNumbers&&g.t=="n"?g.v:Hn(g,null,o));for(var v=0,p=0;v!==u.length;++v)if((p=u.charCodeAt(v))===i||p===a||p===34||o.forceQuotes){u='"'+u.replace(ku,'""')+'"';break}u=="ID"&&(u='"ID"')}else g.f!=null&&!g.F?(c=!1,u="="+g.f,u.indexOf(",")>=0&&(u='"'+u.replace(ku,'""')+'"')):u="";l.push(u)}return o.blankrows===!1&&c?null:l.join(s)}function lc(e,t){var r=[],n=t??{};if(e==null||e["!ref"]==null)return"";var i=jt(e["!ref"]),a=n.FS!==void 0?n.FS:",",s=a.charCodeAt(0),o=n.RS!==void 0?n.RS:`
`,c=o.charCodeAt(0),l=new RegExp((a=="|"?"\\|":a)+"+$"),u="",m=[];n.dense=Array.isArray(e);for(var d=n.skipHidden&&e["!cols"]||[],g=n.skipHidden&&e["!rows"]||[],v=i.s.c;v<=i.e.c;++v)(d[v]||{}).hidden||(m[v]=pr(v));for(var p=0,_=i.s.r;_<=i.e.r;++_)(g[_]||{}).hidden||(u=DE(e,i,_,m,s,c,a,n),u!=null&&(n.strip&&(u=u.replace(l,"")),(u||n.blankrows!==!1)&&r.push((p++?o:"")+u)));return delete n.dense,r.join("")}function _h(e,t){t||(t={}),t.FS="	",t.RS=`
`;var r=lc(e,t);return r}function AE(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var i=jt(e["!ref"]),a="",s=[],o,c=[],l=Array.isArray(e);for(o=i.s.c;o<=i.e.c;++o)s[o]=pr(o);for(var u=i.s.r;u<=i.e.r;++u)for(a=fr(u),o=i.s.c;o<=i.e.c;++o)if(t=s[o]+a,r=l?(e[u]||[])[o]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}c[c.length]=t+"="+n}return c}function Eh(e,t,r){var n=r||{},i=+!n.skipHeader,a=e||{},s=0,o=0;if(a&&n.origin!=null)if(typeof n.origin=="number")s=n.origin;else{var c=typeof n.origin=="string"?nr(n.origin):n.origin;s=c.r,o=c.c}var l,u={s:{c:0,r:0},e:{c:o,r:s+t.length-1+i}};if(a["!ref"]){var m=jt(a["!ref"]);u.e.c=Math.max(u.e.c,m.e.c),u.e.r=Math.max(u.e.r,m.e.r),s==-1&&(s=m.e.r+1,u.e.r=s+t.length-1+i)}else s==-1&&(s=0,u.e.r=t.length-1+i);var d=n.header||[],g=0;t.forEach(function(p,_){hr(p).forEach(function(E){(g=d.indexOf(E))==-1&&(d[g=d.length]=E);var D=p[E],A="z",S="",I=Tt({c:o+g,r:s+_+i});l=qa(a,I),D&&typeof D=="object"&&!(D instanceof Date)?a[I]=D:(typeof D=="number"?A="n":typeof D=="boolean"?A="b":typeof D=="string"?A="s":D instanceof Date?(A="d",n.cellDates||(A="n",D=br(D)),S=n.dateNF||Wt[14]):D===null&&n.nullError&&(A="e",D=0),l?(l.t=A,l.v=D,delete l.w,delete l.R,S&&(l.z=S)):a[I]=l={t:A,v:D},S&&(l.z=S))})}),u.e.c=Math.max(u.e.c,o+d.length-1);var v=fr(s);if(i)for(g=0;g<d.length;++g)a[pr(g+o)+v]={t:"s",v:d[g]};return a["!ref"]=Gt(u),a}function CE(e,t){return Eh(null,e,t)}function qa(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=nr(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?qa(e,Tt(t)):qa(e,Tt({r:t,c:r||0}))}function TE(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function SE(){return{SheetNames:[],Sheets:{}}}function FE(e,t,r,n){var i=1;if(!r)for(;i<=65535&&e.SheetNames.indexOf(r="Sheet"+i)!=-1;++i,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var a=r.match(/(^.*?)(\d+)$/);i=a&&+a[2]||0;var s=a&&a[1]||r;for(++i;i<=65535&&e.SheetNames.indexOf(r=s+i)!=-1;++i);}if(ch(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function bE(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=TE(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function kE(e,t){return e.z=t,e}function wh(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function NE(e,t,r){return wh(e,"#"+t,r)}function IE(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function OE(e,t,r,n){for(var i=typeof t!="string"?t:jt(t),a=typeof t=="string"?t:Gt(t),s=i.s.r;s<=i.e.r;++s)for(var o=i.s.c;o<=i.e.c;++o){var c=qa(e,s,o);c.t="n",c.F=a,delete c.v,s==i.s.r&&o==i.s.c&&(c.f=r,n&&(c.D=!0))}return e}var Gi={encode_col:pr,encode_row:fr,encode_cell:Tt,encode_range:Gt,decode_col:Jl,decode_row:ql,split_cell:Xp,decode_cell:nr,decode_range:Mr,format_cell:Hn,sheet_add_aoa:wf,sheet_add_json:Eh,sheet_add_dom:ph,aoa_to_sheet:da,json_to_sheet:CE,table_to_sheet:mh,table_to_book:rE,sheet_to_csv:lc,sheet_to_txt:_h,sheet_to_json:io,sheet_to_html:dh,sheet_to_formulae:AE,sheet_to_row_object_array:io,sheet_get_cell:qa,book_new:SE,book_append_sheet:FE,book_set_sheet_visibility:bE,cell_set_number_format:kE,cell_set_hyperlink:wh,cell_set_internal_link:NE,cell_add_comment:IE,sheet_set_array_formula:OE,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const BE=(e,t={})=>{const{name:r="",header:n,columnWidths:i}=t,a=Gi.book_new(),s=Gi.json_to_sheet(e);if(i)s["!cols"]=i;else{const l=Object.values(e[0]).map(u=>({width:u.length+20}));s["!cols"]=l}Gi.book_append_sheet(a,s,r.slice(0,31)),n&&Gi.sheet_add_aoa(s,n,{origin:"A1"}),Object.keys(s).forEach(c=>{c.startsWith("!")||(s[c].s={font:{sz:14}})});const o=Gi.decode_range(s["!ref"]);for(let c=o.s.c;c<=o.e.c;++c){const l=`${Gi.encode_col(c)}1`;s[l]&&(s[l].s={font:{sz:13,bold:!0}})}wE(a,r,{compression:!0})},PE=(e="",t=w0.id.toString())=>{const r=e.length;let n=null;if(r)return r<9?n=`${Xr(ll(e,"wei"))} ${Hs(t)?"AEVMOS":"wei"}`:r<18?n=`${Xr(ll(e,"gwei"))} ${Hs(t)?"GEVMOS":"Gwei"}`:n=`${Xr(Ml(e))} ${mt.getUnitBySimpleName(t)}`,n};function jE(e){return w1.programId.toString()===e}function RE({instruction:e}){const{argsMap:t,instructionName:r}=e;switch(r){case"requestUnits":{const{units:n}=t;return{description:f.jsxs("div",{children:["Requested Heap Frame (Bytes)"," ",f.jsx("span",{className:"text-[#C74AE3]",children:Xr(n)})]})}}case"requestHeapFrame":{const{heapFrame:n}=t;return{description:f.jsxs("div",{children:["Requested Heap Frame (Bytes)"," ",f.jsx("span",{className:"text-[#C74AE3]",children:Xr(n)})]})}}case"setComputeUnitLimit":{const{computeUnitLimit:n}=t;return{description:f.jsxs("div",{className:"whitespace-nowrap",children:[f.jsx("span",{children:"Set compute unit limit to "}),f.jsx("span",{className:"text-[#C74AE3]",children:Xr(n)})]})}}case"setComputeUnitPrice":{const{computeUnitPrice:n}=t;return{description:f.jsxs("div",{className:"whitespace-nowrap",children:["Set price to"," ",f.jsx("span",{className:"text-[#C74AE3]",children:Xr(n)})," ","micro lamports"]})}}default:return{description:""}}}function LE({instruction:e,mapList:t,fundFlow:r,callback:n,removeAddressHighLight:i,onHighLightAddress:a,network:s}){const{instructionName:o,argsMap:c}=e;switch(o){case"transfer":{const l=r==null?void 0:r.find(u=>u.id===e.id);return{description:f.jsxs("div",{children:[ht({network:s,value:(l==null?void 0:l.from)||c.source,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","Transfer"," ",f.jsx("span",{className:"text-[#C74AE3]",children:l==null?void 0:l.amount})," ",ht({network:s,value:(l==null?void 0:l._token)||c.authority,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","to"," ",ht({network:s,value:(l==null?void 0:l.to)||c.destination,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})]})}}case"transferChecked":{const l=r==null?void 0:r.find(u=>u.id===e.id);return{description:f.jsxs("div",{children:[ht({network:s,value:(l==null?void 0:l.from)||c.authority,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","transfer"," ",f.jsx("span",{className:"text-[#C74AE3]",children:l==null?void 0:l.amount})," ",ht({network:s,value:(l==null?void 0:l._token)||c.mint,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","to"," ",ht({network:s,value:(l==null?void 0:l.to)||c.destination,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})]})}}case"closeAccount":return{description:f.jsxs("div",{children:[ht({network:s,value:c.owner,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","closed"," ",ht({network:s,value:c.account,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})]})};case"syncNative":return{description:f.jsxs("div",{children:["Sync native token account"," ",ht({network:s,value:c.account,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})]})};case"getAccountDataSize":return{description:f.jsxs("div",{children:["Get account data size for mint"," ",ht({network:s,value:c.mint,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})]})};case"initializeImmutableOwner":return{description:f.jsxs("div",{children:["Initialized"," ",ht({network:s,value:c.account,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","as immutable"]})};case"initializeAccount3":return{description:f.jsxs("div",{children:["Initialized"," ",ht({network:s,value:c.account,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","(",ht({network:s,value:c.mint,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a}),") | owner:"," ",ht({network:s,value:c.owner,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})]})};case"mintTo":{const l=r==null?void 0:r.find(u=>u.id===e.id);return{description:f.jsxs("div",{children:["minted"," ",f.jsx("span",{className:"text-[#C74AE3]",children:l==null?void 0:l.amount})," ",ht({network:s,value:(l==null?void 0:l._token)||c.mint,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","to"," ",ht({network:s,value:(l==null?void 0:l.to)||c.account,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})]})}}case"burn":{const l=r==null?void 0:r.find(u=>u.id===e.id);return{description:f.jsxs("div",{children:[ht({network:s,value:(l==null?void 0:l.from)||c.source,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})," ","burned"," ",f.jsx("span",{className:"text-[#C74AE3]",children:l==null?void 0:l.amount})," ",ht({network:s,value:(l==null?void 0:l._token)||c.mint,type:"account",mapList:t,callback:n,removeAddressHighLight:i,onHighLightAddress:a})]})}}default:return{description:""}}}function ME({instruction:e,fundFlow:t,mapList:r,callback:n,removeAddressHighLight:i,onHighLightAddress:a,network:s}){const{argsMap:o,instructionName:c}=e;switch(c){case"createAccount":return{title:"System Program: Create Account",description:f.jsxs("div",{className:"func-desc",children:[f.jsx("span",{className:"pr-4",children:"Created"}),ht({network:s,value:o.newAccount,callback:n,type:"account",mapList:r,removeAddressHighLight:i,onHighLightAddress:a})," ",!!o.lamports&&f.jsxs(f.Fragment,{children:["with deposit of"," ",f.jsxs("span",{className:"text-[#C74AE3]",children:[ll(o.lamports,9)," "]}),"SOL"," "]}),"for"," ",ht({network:s,value:o.source,callback:n,type:"account",mapList:r,removeAddressHighLight:i,onHighLightAddress:a})]})};case"createAccountWithSeed":case"allocate":case"allocateWithSeed":case"assign":case"advanceNonce":case"withdrawNonce":case"authorizeNonce":case"initializeNonce":case"transferWithSeed":case"upgradeNonce":case"assignWithSeed":return{description:""};case"transfer":{const l=t==null?void 0:t.find(u=>u.id===e.id);return{description:f.jsxs("div",{className:"func-desc",children:[ht({network:s,value:(l==null?void 0:l.from)||o.source,callback:n,type:"account",mapList:r,removeAddressHighLight:i,onHighLightAddress:a})," ","transfer"," ",f.jsx("span",{className:"text-[#C74AE3]",children:l==null?void 0:l.amount})," ",ht({network:s,value:(l==null?void 0:l._token)??"",callback:n,type:"account",mapList:r,removeAddressHighLight:i,onHighLightAddress:a})," ","to"," ",ht({network:s,value:(l==null?void 0:l.to)||o.destination,callback:n,type:"account",mapList:r,removeAddressHighLight:i,onHighLightAddress:a})]})}}default:return{description:""}}}function UE({instruction:e,mapList:t,callback:r,network:n}){const{argsMap:i,instructionName:a}=e;switch(a){case"createIdempotent":return{description:f.jsxs("div",{children:["Created an idempotent associated token account (",ht({network:n,value:i.mint,callback:r,type:"account",mapList:t}),") for"," ",ht({network:n,value:i.source,callback:r,type:"account",mapList:t})]})};case"create":return{description:f.jsxs("div",{children:["Created a"," ",ht({network:n,value:i.mint,callback:r,type:"account",mapList:t})," ","associated token account"," ",ht({value:i.account,callback:r,type:"account",mapList:t})," ","for"," ",ht({network:n,value:i.wallet||i.source,callback:r,type:"account",mapList:t})]})};default:return{description:""}}}const WE=de.createContext(null),yr=()=>{const e=de.useContext(WE);if(!e)throw new Error("TxDetailContext 必须在 Provider 中使用");return e},Nu="CUSTOM_MAP_LIST";let YF=class{constructor(){this.fullScreenTipVisible=!1,this.txTraceData=null,this.txProfileData=null,this.txBalanceChanges=null,this.txDebugData=null,this.mainTree=[],this.tidyInvocationTree=[],this.invocationTree=[],this.debugTree=[],this.customMapList=[],this.globalMapList=[],this.expandLevelOpts=[],this.expandedKeys=[],this.expandLevel=-1,this.defaultExpandLevels=[],this.functionCallTypes=[],this.autoExpandParent=!0,this.customizeMapForm={type:"account",value:"",label:"",color:""},this.invFlowInputValue="",this.modalSimulateVisible=!1,this.treeWidth=0,this.invocationFlowOptions={showGasUsed:!1,showStaticCall:!0},this.debugIds={mainId:-2,debugId:-2},this.addressLabels=[],this.labelInfo={},this.jsonView=null,this.expandFundFlow=!1,this.placement="right",this.focusVisible=!1,this.controlStatus=_r.TRACE_ONLY,this.undoStack=[],this.isCompleteTrace=!1,this.debugGuideVisible=!1,this.refreshFundFlow=0,this.clickAnchor="basicInfo",this.currentActiveAnchor="basicInfo",this.debugPageLoading=!0,this.solanaTrace=null,this.solanaBalanceChanges=null,this.solanaProfileData=null,this.hoverHighLightAddress=null,this.getSolanaData=async t=>{await this.setCustomMap(),Promise.allSettled([an.getSolanaProfile(t),an.getSolanaAddressLabel(t),an.getSolanaBalanceChanges(t),an.getSolanaTrace(t)]).then(([r,n,i,a])=>{if(n.status==="fulfilled"){const{value:{data:s,success:o}}=n;o&&Ui(()=>{this.packageGlobalMapList(s.labels),this.setAddressLabels(s.labels)})}if(r.status==="fulfilled"){const{value:{data:s,msg:o,success:c}}=r;c?Ui(()=>{var l;this.solanaProfileData={...s,fundFlow:(l=s==null?void 0:s.fundFlow)==null?void 0:l.map(u=>{const m=this.globalMapList.find(d=>d.value===u.token)??{label:u.token};return{...u,token:m.label,_token:u.token}})},this.refreshFundFlow+=1}):Ma.error(o)}if(i.status==="fulfilled"){const{value:{data:s,success:o}}=i;o&&Ui(()=>{this.txBalanceChanges=s.balanceChanges})}if(a.status==="fulfilled"){const{value:{data:s,success:o}}=a;o&&Ui(()=>{this.solanaTrace=Jd(s.trace,s.dataMap,this.addressLabels)})}})},this.setFullScreenTipVisible=t=>{this.fullScreenTipVisible=t},this.setAddressLabels=t=>{this.addressLabels=t},this.setActiveAnchor=t=>{this.currentActiveAnchor=t},this.setClickAnchor=t=>{this.clickAnchor=t},this.setDebugPageLoading=t=>{this.debugPageLoading=t},this.setTreeWidth=t=>{this.treeWidth=t},this.setModalSimulateVisible=t=>{this.modalSimulateVisible=t},this.initProfile=t=>{this.txProfileData=t},this.initBalanceChanges=t=>{this.txBalanceChanges=t},this.setCustomMap=async()=>{const t=await Sr.getItem(Nu);t&&(this.customMapList=JSON.parse(t))},this.setLocalforage=async()=>{const t=await Sr.getItem(Ro);t&&(this.invocationFlowOptions=t)},this.clearInitialData=()=>{this.mainTree=[],this.tidyInvocationTree=[],this.invocationTree=[],this.setTreeWidth(0)},this.setErrors=t=>{this.errors=t},this.resetCustomizeMapForm=()=>{this.customizeMapForm={type:"account",value:"",label:""}},this.onExpandLevelChange=t=>{this.expandLevel=t},this.setExpandLevelOpts=(t,r)=>{const n=Zd(t),i=[{label:"Default",value:-1},{label:"All",value:-2}];if(r&&this.onExpandLevelChange(-2),t!=null&&t.length){const s=Array.from(new Array(r?n:n-1).keys()).map(o=>({label:o.toString(),value:o}));this.expandLevelOpts=[...i,...s]}else this.expandLevelOpts=[...i]},this.parseTxData=(t,r)=>{var o;if(!t||!r)return;const{basicInfo:{receiver:n,sender:i}}=r,a=[],s=c=>{c.forEach(l=>{var u;((l==null?void 0:l.fromAddress)===n||(l==null?void 0:l.fromAddress)===i)&&a.push(l.id),(u=l.children)!=null&&u.length&&s(l.children)})};s(t.mainTrace),this.txProfileData.fundFlow=(o=r==null?void 0:r.fundFlow)==null?void 0:o.map(c=>{const l=this.globalMapList.find(u=>u.value===c.token)??{label:c.token};return{...c,token:l.label,_token:c.token}}),this.refreshFundFlow+=1,this.defaultExpandLevels=a,this.txTraceData=t,this.mainTree=this.invocationFlowOptions.showStaticCall?t.mainTrace:t.tidyTrace,this.invocationTree=t.mainTrace,this.tidyInvocationTree=t.tidyTrace},this.setExpandedKeys=t=>{this.expandedKeys=t},this.packageGlobalMapList=t=>{var i,a;const r=((i=t??this.addressLabels)==null?void 0:i.map(s=>({type:"account",value:s.address,label:s.label})).filter(s=>this.customMapList.filter(c=>c.type==="account").findIndex(c=>c.value===s.value)===-1))??[],n=(a=this.customMapList)==null?void 0:a.map(s=>({...s,color:""}));Sr.setItem(Nu,JSON.stringify(n)),this.globalMapList=[...this.customMapList,...r]},this.onHighLightAddress=t=>{const n=localStorage.getItem(bd)==="light"?"#93C5FD":"#075985";this.hoverHighLightAddress={type:"account",value:t,color:n}},this.removeAddressHighLight=t=>{document.querySelectorAll(`.address-${t}`).forEach(n=>{n.classList.remove("hoverHighLightAddress")}),this.hoverHighLightAddress=null},this.onInvFlowInputChange=Ua(t=>{Ui(()=>{this.invFlowInputValue=t})},300),this.setLabel=t=>{if(t.action===ka.COLOR){this.setCustomizeMap(t);return}this.labelInfo=t},this.setCustomizeMap=t=>{var u;let{type:r,value:n,label:i,color:a,decode:s,isUndoDecoded:o,action:c}=t,l=(u=this.customMapList)==null?void 0:u.find(m=>m.value===n);if(n=zi(n,l==null?void 0:l.value),r=zi(r,l==null?void 0:l.type),a=zi(a,l==null?void 0:l.color),c!==ka.ADDRESS){let m="";!i&&!(l!=null&&l.label)&&(m=(this.globalMapList.find(g=>g.value===n)??{label:"",value:"",type:"account",color:""}).label),i=zi(i,l==null?void 0:l.label,m)}o&&(i="",s=""),l?this.customMapList=this.customMapList.map(m=>m.value===n?{type:r,value:n,label:i,color:a,decode:s,[r==="account"?"address":"selector"]:zi(n,l==null?void 0:l.value)}:m):(l={type:r,value:n,label:i,color:a,decode:s,[r==="account"?"address":"selector"]:zi(n,l==null?void 0:l.value)},this.customMapList=[l,...this.customMapList]),this.packageGlobalMapList()},this.parseValue=(t=[],r=!1)=>{const n=(a,s=!1)=>{const o={};if(ul(a))return a.some(c=>fl(c))?a.every(c=>ul(c))?a.map(l=>n(l,s)):(a.forEach((c,l)=>{const u=(c==null?void 0:c.name)||(s?`out${l}`:`param${l}`);o[u]=n(c.value,s)}),b1(o)?[]:[o]):a;if(fl(a)){const c=a;return o[c.name]=n(c.value,s),o}else return a};return n(t,r)[0]??[]},this.saveCodeFilesToLocal=({id:t,txnHash:r})=>{var u,m,d,g,v,p;const n=(m=(u=this.txDebugData)==null?void 0:u.codeLocationMap)==null?void 0:m[t];let i=[],a=[];const s=n==null?void 0:n.callCodeLocation,o=n==null?void 0:n.defCodeLocation,c=!(o!=null&&o.sourced),l=!(s!=null&&s.sourced);if(!l){const _=(g=(d=this.txDebugData)==null?void 0:d.codeFilesMap)==null?void 0:g[(s==null?void 0:s.codeHash)??""];i=[{...(_==null?void 0:_.find(D=>(s==null?void 0:s.fileIndex)===(D==null?void 0:D.fileIndex)))??{code:"",codeHash:"",fileIndex:0,fileName:""},...s,isDefine:!1}]}if(!c){const _=(p=(v=this.txDebugData)==null?void 0:v.codeFilesMap)==null?void 0:p[(o==null?void 0:o.codeHash)??""];a=[{...(_==null?void 0:_.find(D=>(o==null?void 0:o.fileIndex)===(D==null?void 0:D.fileIndex)))??{code:"",fileIndex:0,fileName:""},...o,isDefine:!0}]}return i=l?[Mc,...i]:i,a=c?[{...Mc,isDefine:!0},...a]:a,Sr.getItem(Uc,(_,E)=>{let D=E??new Map;if(_)console.log(_);else{const A=D.get(r)||[];i=i.concat(A),i=Qd(i,"id").map(S=>Wi(S)),D==null||D.set(r,i),D=e1(D,10,t1.REVERSE),Sr.setItem(Uc,D)}}),{callCodeFiles:i,defCodeFiles:a,withoutDefSourced:c,withoutSourced:l}},this.parseDataForJsonView=async t=>{var E,D,A,S,I,U,R;const{txnHash:r,debugAction:n,position:i,nodeData:{id:a,rootContract:s,operation:o,fromAddress:c,selector:l,methodDecoded:u,decodedMethod:m,callData:d,output:g,topics:v,isInternalCall:p}=Qn}=t,_=o==="EVENT";if(this.controlStatus===_r.DEBUG||this.controlStatus===_r.CODE_IN_SEPARATE_TAB){let Y=Lo;switch(i){case Rt.DEBUG:{switch(Y=((D=(E=this.txDebugData)==null?void 0:E.jumpGuideMap)==null?void 0:D[a])??Lo,n){case $r.CLICK:this.undoStack=O0({id:Wl(),jsonView:this.jsonView,debugTree:this.debugTree},this.undoStack)}break}default:{Y=((S=(A=this.txDebugData)==null?void 0:A.jumpGuideMap)==null?void 0:S[a])??Lo;const G=((U=(I=this.txTraceData)==null?void 0:I.parentIdMap)==null?void 0:U[a])??Lt;this.setDebugTree(G);break}}const{callCodeFiles:W,defCodeFiles:Z,withoutDefSourced:N,withoutSourced:M}=this.saveCodeFilesToLocal({id:a,txnHash:r});this.jsonView=Object.assign(this.jsonView??{},{id:a,rootContract:s,json:_?{"msg.sender":c,func:u?m==null?void 0:m.name:l,args:this.parseValue(Wi(m==null?void 0:m.callParams)??[])}:{"msg.sender":c,func:u?m==null?void 0:m.name:l,args:this.parseValue(Wi((m==null?void 0:m.callParams)??[])),return:this.parseValue((m==null?void 0:m.returnParams)??[],!0)},raw:{selector:l,inputs:r1(d,o),outputs:g,topics:v,isEvent:_},withoutDefSourced:N,withoutSourced:M,codeFiles:W,defCodeFiles:Z,debugInfo:{id:a,jumpGuide:Y,isInternalCall:p}}),this.controlStatus===_r.CODE_IN_SEPARATE_TAB&&((R=aa)==null||R.postMessage({type:sa.POST_DATA_TO_SUB_VIEW,data:{jsonView:Wi(this.jsonView),debugTree:Wi(this.debugTree),undoStack:Wi(this.undoStack)}}))}else this.jsonView=Object.assign(this.jsonView??{},{id:a})},this.onCloseJsonView=()=>{this.jsonView=null},this.resetDebugData=()=>{this.txDebugData=null},this.setExpandFundFlow=t=>{this.expandFundFlow=t},this.setPlacement=t=>{this.placement=t},this.setFocusVisible=t=>{this.focusVisible=t},this.setData=t=>{Object.keys(t).forEach(r=>{this[r]=t[r]})},this.setControlStatus=t=>{this.controlStatus=t},this.getReceiverData=()=>{const t=[];let r=0;const n=(a,s)=>{var o,c,l,u,m,d,g,v;if(a){const p=a==null?void 0:a.children;for(const _ of p){r+=1;const E=(o=this.txDebugData)==null?void 0:o.codeLocationMap[_.id];if((_==null?void 0:_.address)===((c=this.txProfileData)==null?void 0:c.basicInfo.receiver)?(l=E==null?void 0:E.defCodeLocation)!=null&&l.sourced&&((u=_.children)!=null&&u.length)&&s.push(_.children[0]):(m=E==null?void 0:E.callCodeLocation)!=null&&m.sourced&&((d=_.children)!=null&&d.length)&&s.push(_),(g=E==null?void 0:E.callCodeLocation)!=null&&g.sourced&&((v=_==null?void 0:_.children)!=null&&v.length)&&r<10)n(_,s);else break}}},i=this.mainTree[0];return n(i,t),t.pop()},this.setAutoExpandParent=t=>{this.autoExpandParent=t},this.setDebugTree=(t=Lt)=>{var r,n,i,a,s;this.debugTree=n1((n=(r=this.txDebugData)==null?void 0:r.debugTraceMap)==null?void 0:n[t],{...(i=this.txDebugData)==null?void 0:i.dataMap,...(a=this.txTraceData)==null?void 0:a.dataMap},(s=this.txTraceData)==null?void 0:s.parentIdMap)??[]},this.getNodeRootId=(t=Lt)=>{var r,n;return((n=(r=this.txDebugData)==null?void 0:r.rootIdMap)==null?void 0:n[t])??Lt},this.undoAction=()=>{const t=this.undoStack.shift();this.jsonView=cl(t==null?void 0:t.jsonView)??null,this.debugTree=(t==null?void 0:t.debugTree)??[]},this.setCompleteTrace=t=>{this.isCompleteTrace=t},this.initDebugGuideVisible=async()=>{await Sr.getItem(M0)||this.setDebugGuideVisible(!0)},this.setDebugGuideVisible=t=>{this.debugGuideVisible=t},this.setInvocationFlowStatus=(t,r)=>{this.invocationFlowOptions={...this.invocationFlowOptions,[t]:r},t==="showStaticCall"&&(this.mainTree=r?this.invocationTree:this.tidyInvocationTree),Sr.getItem(Ro,(n,i)=>{n||Sr.setItem(Ro,{...this.invocationFlowOptions,...i,[t]:r})})},this.initDebugData=async t=>{var d,g;const{network:r,txnHash:n,event:i,forkId:a,blockNumber:s,debugLine:o,line:c}=t;if(!this.txDebugData){this.setDebugPageLoading(!0);const v=mt.getChainIdBySimpleName(r),{type:p,params:_}=B0({chainId:v,txnHash:n,event:i,forkId:a,blockNumber:s}),{data:E,success:D,msg:A}=await an.getDebugTraceData(p,_);if(D)this.txDebugData=E;else{Ma.error(A),this.setDebugPageLoading(!1);return}}const l=o??c,u=((g=(d=this.txDebugData)==null?void 0:d.rootIdMap)==null?void 0:g[c??Lt])??Lt;this.setDebugTree(u);const m=Ji(this.debugTree,Number(l??Lt))??Qn;this.parseDataForJsonView({nodeData:m,txnHash:n,position:Rt.DEBUG,debugAction:$r.AUTO}),this.setDebugPageLoading(!1)},this.save2Cache=async(t,r,n="")=>{const i=await Sr.getItem(kc),a=(i==null?void 0:i.filter(s=>s.txnHash!==t||s.chainID!==r))??[];a.unshift({txnHash:t,chainID:r,label:n}),Ui(()=>{const s=a.length>5?a.slice(0,5):a;Sr.setItem(kc,cl(s))})},Ul(this,{tidyInvocationTree:Po.struct,invocationTree:Po.struct,mainTree:Po.struct})}};const zE="_container_tbtwa_1",VE="_loadingWrap_tbtwa_12",HE="_actionHeaderLeft_tbtwa_25",$E="_undoAction_tbtwa_28",GE="_undoDisabled_tbtwa_37",XE="_handleWrapperClass_tbtwa_44",KE="_debugContainer_tbtwa_48",YE="_traceWrap_tbtwa_53",qE="_headerLeft_tbtwa_58",JE="_title_tbtwa_63",ZE="_debugIcon_tbtwa_68",QE="_debugAction_tbtwa_71",ew="_actionIcon_tbtwa_76",tw="_ml_tbtwa_79",rw="_invocationFlowWrap_tbtwa_82",Ot={container:zE,loadingWrap:VE,actionHeaderLeft:HE,undoAction:$E,undoDisabled:GE,handleWrapperClass:XE,debugContainer:KE,traceWrap:YE,headerLeft:qE,title:JE,debugIcon:ZE,debugAction:QE,actionIcon:ew,ml:tw,invocationFlowWrap:rw},nw="_panel_1rds3_1",iw="_options_1rds3_6",aw="_focusPanel_1rds3_9",sw="_input_1rds3_15",ow="_itemWrap_1rds3_19",lw="_label_1rds3_23",cw="_option_1rds3_6",uw="_switchWrap_1rds3_34",fw="_text_1rds3_41",$t={panel:nw,options:iw,focusPanel:aw,input:sw,itemWrap:ow,label:lw,option:cw,switchWrap:uw,text:fw},{Option:Iu}=Qi,hw=({store:e,position:t=Rt.NO})=>{const{network:r=""}=Nr(),[n,i]=Kr(),a=Gn(n),{line:s,event:o}=a,{expandLevelOpts:c,onInvFlowInputChange:l,onExpandLevelChange:u,setControlStatus:m,controlStatus:d,expandLevel:g,isCompleteTrace:v,setCompleteTrace:p,debugGuideVisible:_,invocationFlowOptions:E,setInvocationFlowStatus:D,getReceiverData:A,txProfileData:S,jsonView:I}=e,U=mt.isSolana(r),R=o===xn.SIMULATE||o===xn.PRERUN;return(()=>{var N;const W=Hs(r),Z=mt.isSolana(r);switch(t){case Rt.NO:return f.jsxs("div",{className:Ve($t.panel,"top-[55px] sm:top-[55px] xl:top-[25px]",{"!top-[55px] sm:!top-[75px] xl:!top-[33px]":R||(S==null?void 0:S.securityEvent)}),id:"invocationFlowPanel",children:[f.jsx(nn,{className:Ve($t.input),prefix:f.jsx(lt,{type:"icon-filter"}),placeholder:U?"Filter by program/account label, instruction name/identifier":"Filter by contract label/address, function name/selector",onChange:M=>l(M.target.value),onFocus:()=>ni.customEvent(ii.ON_INVOCATION_FLOW_SEARCH)}),f.jsxs("div",{className:$t.options,children:[Z?null:f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:$t.switchWrap,onClick:()=>{D("showStaticCall",!E.showStaticCall)},children:[f.jsx(xi,{size:"small",checked:E.showStaticCall}),f.jsx("span",{className:$t.text,children:"Static Call"})]}),f.jsxs("div",{className:$t.switchWrap,onClick:()=>D("showGasUsed",!E.showGasUsed),children:[f.jsx(xi,{size:"small",checked:E.showGasUsed}),f.jsx("span",{className:$t.text,children:"Gas Used"})]})]}),f.jsxs("div",{className:$t.itemWrap,children:[f.jsx(lt,{type:"icon-level-expand",size:20}),f.jsx("span",{className:Ve($t.label,"pr-2"),children:"Expand:"}),f.jsx(Qi,{value:g,style:{width:101},onChange:u,children:c.map(M=>f.jsx(Iu,{value:M.value,children:M.label},M.value))})]}),W?null:f.jsx("div",{className:$t.itemWrap,id:"debug-btn",children:f.jsx(ni,{mode:["hit"],data:{customEvent:ii.DEBUG_PRIMARY_BUTTON},children:f.jsx(Er,{disabled:!((N=S==null?void 0:S.basicInfo)!=null&&N.debugEnable),type:"primary",onClick:M=>{var b;let G={};if(kd(s))if(I!=null&&I.id)G={line:I.id,debugLine:I.id};else{const V=A()??Qn;G={line:V.id,debugLine:V.id}}else G={line:s,debugLine:s};i({...a,...G}),M.stopPropagation(),m(_r.DEBUG),(b=aa)==null||b.postMessage({type:sa.CLOSE_REMOTE_TAB,data:za})},children:f.jsx("span",{children:"Debug"})})})})]})]});default:return W?null:f.jsxs("div",{className:$t.focusPanel,id:"panel",children:[f.jsxs("div",{className:$t.itemWrap,children:[f.jsx(lt,{type:"icon-node-expand-outlined",size:22}),f.jsx("span",{className:$t.label,children:"Expand:"}),f.jsx(Qi,{value:g,style:{width:101},onChange:u,children:c.map(M=>f.jsx(Iu,{value:M.value,children:M.label},M.value))})]}),f.jsxs("div",{className:$t.switchWrap,onClick:()=>D("showStaticCall",!E.showStaticCall),children:[f.jsx(xi,{size:"small",checked:E.showStaticCall}),f.jsx("span",{className:$t.text,children:"Static Call"})]}),f.jsxs("div",{className:$t.switchWrap,onClick:()=>D("showGasUsed",!E.showGasUsed),children:[f.jsx(xi,{size:"small",checked:E.showGasUsed}),f.jsx("span",{className:$t.text,children:"Gas Used"})]}),f.jsx(lr,{open:_,placement:"bottomRight",overlayStyle:{maxWidth:"400px"},title:"Show the full parameters",children:f.jsxs("div",{className:$t.switchWrap,id:"fill-btn",onClick:()=>p(!v),children:[f.jsx(xi,{size:"small",checked:v}),f.jsx("span",{className:$t.text,children:"Parameters"})]})}),d===_r.CODE_IN_SEPARATE_TAB&&f.jsx("div",{className:$t.itemWrap,children:f.jsx(Er,{type:"primary",onClick:M=>{var G;M.stopPropagation(),m(_r.DEBUG),p(!1),(G=aa)==null||G.postMessage({type:sa.CLOSE_REMOTE_TAB,data:za})},children:f.jsx("span",{children:"Close Separate View"})})})]})}})()},ao=dr(hw),dw=e=>{const{gasUsed:t}=e;return f.jsx(Os,{style:{color:"rgb(156, 148, 145)"},children:Xr(t??0)})},pw="_treeContainer_fcrt3_1",mw="_debugIcon_fcrt3_9",gw="_virtual_fcrt3_17",xw="_scrollDarkBar_fcrt3_36",vw="_focusContainer_fcrt3_39",_w="_tree_fcrt3_1",Ew="_darkTree_fcrt3_133",ww="_eventTreeTitle_fcrt3_136",yw="_treeSelected_fcrt3_139",Dw="_darkTreeSelected_fcrt3_143",Aw="_jumpNode_fcrt3_146",Cw="_debugTree_fcrt3_151",Tw="_noDataSource_fcrt3_154",Ar={treeContainer:pw,debugIcon:mw,virtual:gw,scrollDarkBar:xw,focusContainer:vw,tree:_w,darkTree:Ew,eventTreeTitle:ww,treeSelected:yw,darkTreeSelected:Dw,jumpNode:Aw,debugTree:Cw,noDataSource:Tw},Sw=({height:e,width:t=0,dataSource:r=[],position:n=Rt.NO,style:i})=>{const a=yr(),s=n===Rt.NO?i1:Yi,{mode:o="light"}=de.useContext($n),c=de.useRef(null),l=Nr(),[u,m]=Kr(),d=Gn(u),{network:g="",txnHash:v=""}=l,{line:p="",event:_="",forkId:E="",debugLine:D=""}=d,{txProfileData:A,txTraceData:S,globalMapList:I,expandedKeys:U,defaultExpandLevels:R,invFlowInputValue:Y,expandLevel:W,setExpandLevelOpts:Z,setExpandedKeys:N,jsonView:M,controlStatus:G,autoExpandParent:b,setAutoExpandParent:V,onCloseJsonView:q,setControlStatus:re,setPlacement:le,setFocusVisible:pe,isCompleteTrace:Ce,invocationFlowOptions:Te,txDebugData:O,addressLabels:K,hoverHighLightAddress:z,onHighLightAddress:X,removeAddressHighLight:ee}=a,xe=(Te!=null&&Te.showStaticCall?(S==null?void 0:S.mainTraceNodeCount)??0:(S==null?void 0:S.tidyTraceNodeCount)??0)>=500,me=`tree-container-${n}`,se=!Ce&&n!==Rt.NO,be=p?(O==null?void 0:O.highlightIdMap[p])??Number(p):Lt,Le=(Fe=Qn)=>{var Ft,pt,zt;const{id:Pe,invocationType:ge,depth:Oe}=Fe,Qe=`${Pe}-${n}`,dt=ge===a1.EVENT,st=Oe===-1,je=Pe===(M==null?void 0:M.id),Nt=(O==null?void 0:O.highlightIdMap[((Ft=M==null?void 0:M.debugInfo)==null?void 0:Ft.id)??Lt])===Pe;let Be=0;const Ze=_===xn.MOPSUS;if(Nt){const{depth:It}=((pt=a.debugTree)==null?void 0:pt[0])??Qn;Be=(It-Oe)*24+5}return st?f.jsxs("div",{id:Qe,children:[f.jsx(Os,{color:"cyan",style:{marginRight:"20px"},children:f.jsx("span",{style:{color:"#ff9900"},children:"[Sender]"})}),f.jsx(Os,{children:ht({type:"account",value:(A==null?void 0:A.basicInfo.sender)??"",mapList:I,network:g,delay:s,callback:a.setLabel,forkId:E,onHighLightAddress:X,removeAddressHighLight:ee})})]}):f.jsxs("div",{id:Qe,className:Ve({[Ar.eventTreeTitle]:dt,[Ar.treeSelected]:je,[Ar.darkTreeSelected]:je&&o==="dark"},Pe===(M==null?void 0:M.id)&&"selected"),onClick:()=>{const It=n===Rt.NO?Ns({...d,line:Pe.toString()},["debugLine"]):{...d,line:Pe.toString(),debugLine:Pe.toString()};m(It),a.parseDataForJsonView({txnHash:v,nodeData:Fe,position:n,debugAction:$r.CLICK})},children:[s1(Fe,n,a.globalMapList),Te.showGasUsed&&!dt&&dw(Fe),f.jsxs(Os,{children:[!se&&o1(Fe),!se&&l1(Fe,d.network,n),c1({store:a,nodeData:Fe,txProfileData:A,globalMapList:I,query:d,params:l,setSearchParams:m,position:n,isSimplify:se,addressLabels:K})]}),!dt&&!se&&f.jsxs(f.Fragment,{children:[f.jsx(u1,{style:{color:"#0076FF",marginRight:"10px"}}),f1({nodeData:Fe,txProfileData:A,globalMapList:I,network:d.network,position:n,addressLabels:K,filterInputValue:a.invFlowInputValue,onHighLightAddress:X,removeAddressHighLight:ee})]}),![-1,0].includes(Pe)&&((zt=A==null?void 0:A.basicInfo)==null?void 0:zt.debugEnable)&&f.jsx(lr,{showArrow:!1,title:"Open debug mode",children:f.jsx(ni,{mode:["hit"],data:{customEvent:ii.DEBUG_ICON_BUTTON},children:f.jsx(lt,{type:"icon-code",size:18,className:Ve(Ar.debugIcon,{showDebug:n===Rt.NO&&!Ze}),onClick:It=>{var $e;It.stopPropagation(),m({...d,line:Pe.toString(),debugLine:Pe.toString()}),re(_r.DEBUG),($e=aa)==null||$e.postMessage({type:sa.CLOSE_REMOTE_TAB,data:za})}})})}),n!==Rt.NO&&Nt&&f.jsx("img",{src:"https://assets.blocksec.com/image/1678439811312-2.png",className:Ar.jumpNode,style:{left:Be}})]})},Ye=de.useMemo(()=>{const Fe=(Pe,ge)=>Pe.map(Oe=>({...Oe,title:""})).filter(Oe=>{var Qe;return Oe.children=Oe.children&&Fe(Oe.children,ge),ge(Oe)||((Qe=Oe.children)==null?void 0:Qe.length)});return Fe(r,(Pe=Qn)=>{var Ft,pt,zt;const{depth:ge,selector:Oe,address:Qe,methodDecoded:dt,decodedMethod:st}=Pe;if(ge===-1)return!0;const je=Y.trim(),Nt=I.find(It=>It.type==="selector"&&It.value===Oe),Be=I.find(It=>It.type==="account"&&It.value===Qe),Ze=Vs(je,Qe)||Vs(je,Oe)||Qe&&(Qe==null?void 0:Qe.toLocaleLowerCase().indexOf(je.toLocaleLowerCase()))!==-1||Be&&((Ft=Be==null?void 0:Be.label)==null?void 0:Ft.toLocaleLowerCase().indexOf(je.toLocaleLowerCase()))!==-1||Nt&&((pt=Nt==null?void 0:Nt.label)==null?void 0:pt.toLocaleLowerCase().indexOf(je.toLocaleLowerCase()))!==-1||dt&&((zt=st==null?void 0:st.name)==null?void 0:zt.toLocaleLowerCase().indexOf(je.toLocaleLowerCase()))!==-1;return Y?Ze:!0})},[Y,r]);de.useEffect(()=>{if(n!==Rt.DEBUG)if(V(!0),W===-1)N(R);else{const Fe=[],Pe=ge=>{ge.forEach(Oe=>{(Oe.depth<=W||W===-2)&&Fe.push(Oe.id),Oe.children&&Pe(Oe.children)})};Pe(Ye),N(Fe)}},[Ye,W]),de.useEffect(()=>{Z(Ye)},[Ye]);const We=Fe=>{var ge;if(Fe.stopPropagation(),G!==_r.TRACE_ONLY||n!==Rt.NO||["svg","path","polygon","text"].includes((ge=Fe.target)==null?void 0:ge.nodeName))return;["ant-tree-list-holder-inner","ant-tree-indent-unit","ant-tree-treenode","ant-tree-switcher-leaf-line",Ar.treeContainer].findIndex(Oe=>{var Qe,dt;return(dt=(Qe=Fe==null?void 0:Fe.target)==null?void 0:Qe.className)==null?void 0:dt.includes(Oe)})>-1&&(m(Ns(d,["line","debugLine"])),q==null||q())};de.useEffect(()=>{var Fe,Pe;if(!(typeof window>"u")&&p&&!M&&(Fe=a.mainTree)!=null&&Fe.length&&(D&&(pe(!0),re(_r.DEBUG),le("right"),(Pe=aa)==null||Pe.postMessage({type:sa.CLOSE_REMOTE_TAB,data:za})),p&&!D)){const ge=Ji(a.mainTree,Number(p??Lt))??Qn;console.log(4),a.parseDataForJsonView({txnHash:v,nodeData:ge,position:n,debugAction:$r.CLICK})}},[a.mainTree,be,p]),de.useEffect(()=>{var Fe;c.current&&((Fe=c==null?void 0:c.current)==null||Fe.scrollTo({key:be.toString(),align:"top",offset:e/2}))},[c.current]),de.useEffect(()=>{const Fe=I.find(ge=>ge.value===(z==null?void 0:z.value));if(!z||Fe!=null&&Fe.color&&(Fe==null?void 0:Fe.color)!=="transparent")return;document.querySelectorAll(`.address-${z.value}`).forEach(ge=>{ge.classList.add("hoverHighLightAddress")})},[z]),de.useEffect(()=>(n===Rt.NO&&document.addEventListener("click",We),()=>{document.removeEventListener("click",We)}),[G,JSON.stringify(Ns(d,["line","debugLine"]))]);const ft={autoExpandParent:b,expandedKeys:Number(be)!==-2?U.concat(be):U,onExpand:Fe=>{V(!1),N(Fe)}},He=()=>{let Fe=M,Pe=Te,ge=[r,JSON.stringify(Fe),Y,JSON.stringify(Te),JSON.stringify(I),Ce];return G!==_r.TRACE_ONLY&&(Fe=null,Pe=null,n===Rt.NO&&(ge=[r,JSON.stringify(Fe),Y,JSON.stringify(Pe),JSON.stringify(I),Ce])),ge},_e=de.useMemo(()=>{function Fe(Pe){return Pe.map(ge=>ge.children?f.jsx(Is.TreeNode,{title:Le(ge),"data-order":ge.order,"data-position":`position-${n}-${ge.id}`,children:Fe(ge.children)},ge.id):f.jsx(Is.TreeNode,{title:Le(ge),"data-order":ge.order,"data-position":`position-${n}-${ge.id}`},ge.id))}return Fe(Ye)},He());return de.useEffect(()=>{xe&&F1(()=>{new MutationObserver(Ua(()=>{const Oe=document.querySelector(`#${me} .ant-tree-list-holder`),Qe=document.querySelector(`#${me} .ant-tree-list-holder-inner`);if(Qe&&Oe){const dt=Qe.offsetWidth;Oe.style.width=`${Math.max(dt+16,parseFloat(Oe.style.width))}px`}},300)).observe(document.querySelector(`#${me} .ant-tree-list-holder-inner`),{childList:!0,subtree:!0});const Pe=document.querySelector(`#${me} .ant-tree-list-holder`),ge=document.querySelector(`#${me} .ant-tree-list-holder-inner`);if(ge&&Pe){ge.style.right="unset";const Oe=ge.offsetWidth;ge.style.width="max-content",ge.parentElement.style.overflow="unset",Pe.style.paddingLeft="16px",Pe.style.overflowX="hidden",Pe.style.width=`${Math.max(Oe,t)+6}px`,Pe.parentElement.style.width="max-content"}Pe==null||Pe.addEventListener("wheel",Oe=>{(Pe.scrollTop<=5||Math.abs(Oe.deltaX)>Math.abs(Oe.deltaY))&&(Oe.preventDefault=()=>{})},!0)})},[xe,t,e]),f.jsxs("div",{style:{width:"100%",height:"100%",...i},id:`main-trace-${n}`,children:[n===Rt.NO&&f.jsx(ao,{store:a,position:n}),f.jsx("div",{className:Ve(Ar.treeContainer,{[Ar.virtual]:xe,[Ar.scrollDarkBar]:o==="dark",[Ar.focusContainer]:n!==Rt.NO}),id:me,children:r.length>0?f.jsx(Di,{theme:{token:{fontFamily:"RegioMono-Light"}},children:de.createElement(Is,{ref:c,...ft,height:xe?e:void 0,key:n,motion:!1,selectable:!1,showLine:{showLeafIcon:!1},className:Ve(Ar.tree,{[Ar.debugTree]:n!==Rt.NO,[Ar.darkTree]:o==="dark"}),virtual:!0},_e)}):f.jsx("div",{className:Ar.noDataSource,children:f.jsx(Oi,{})})})]})},Ou=dr(Sw),Fw=()=>{var G,b,V,q,re,le,pe,Ce,Te,O,K,z,X,ee,ye,xe,me;const{txnHash:e="",network:t}=Nr(),r=yr(),[n,i]=Kr(),{mode:a="light"}=de.useContext($n),[s,o]=de.useState({sourceCode:{height:"61.8%",width:"100%"},jsonView:{height:"61.8%",width:"100%"}}),c=Gn(n),{debugGuideVisible:l,placement:u,controlStatus:m,jsonView:d,getNodeRootId:g,setData:v,txDebugData:p}=r,_=((b=(G=r.debugTree)==null?void 0:G[0])==null?void 0:b.id)??Lt,E=se=>{var Ye,We,ft,He,_e,Fe,Pe,ge,Oe,Qe,dt,st,je,Nt,Be,Ze;let be=Lt,Le=null;switch(v({undoStack:O0({id:Wl(),jsonView:d,debugTree:r.debugTree},r.undoStack)}),se){case $r.NEXT:{be=((We=(Ye=d==null?void 0:d.debugInfo)==null?void 0:Ye.jumpGuide)==null?void 0:We.nextId)??Lt;const pt=(ft=r.txDebugData)==null?void 0:ft.rootIdMap[be];pt!==_&&r.setDebugTree(pt),Le=Ji(r.debugTree,be);break}case $r.PREVIOUS:be=((_e=(He=d==null?void 0:d.debugInfo)==null?void 0:He.jumpGuide)==null?void 0:_e.previousId)??Lt;const Ft=(Fe=r.txDebugData)==null?void 0:Fe.rootIdMap[be];Ft!==_&&r.setDebugTree(Ft),Le=Ji(r.debugTree,be);break;case $r.STEP_OUT:{be=((ge=(Pe=d==null?void 0:d.debugInfo)==null?void 0:Pe.jumpGuide)==null?void 0:ge.stepOutId)??Lt;const pt=(Oe=r.txDebugData)==null?void 0:Oe.rootIdMap[be];pt!==_&&r.setDebugTree(pt),Le=Ji(r.debugTree,be);break}case $r.STEP_IN:{const pt=((Qe=d==null?void 0:d.debugInfo)==null?void 0:Qe.id)??Lt;(dt=p==null?void 0:p.debugTraceMap)!=null&&dt[pt]&&pt!==_?(be=((je=(st=d==null?void 0:d.debugInfo)==null?void 0:st.jumpGuide)==null?void 0:je.stepInId)??Lt,r.setDebugTree(pt)):be=((Be=(Nt=d==null?void 0:d.debugInfo)==null?void 0:Nt.jumpGuide)==null?void 0:Be.stepInId)??Lt,Le=Ji(r.debugTree,be);break}}i({...c,line:(Le==null?void 0:Le.id.toString())??"",debugLine:((Ze=Le==null?void 0:Le.id)==null?void 0:Ze.toString())??""}),r.parseDataForJsonView({nodeData:Le??Qn,txnHash:e,position:Rt.DEBUG,debugAction:se})},D=(se,be)=>{if(![_r.DEBUG,_r.CODE_IN_SEPARATE_TAB].includes(m))return;const{height:Le,width:Ye}=se,We=100-parseFloat(Le);o({...s,[be]:{height:`${We}%`,width:Ye}})},A=((q=(V=d==null?void 0:d.debugInfo)==null?void 0:V.jumpGuide)==null?void 0:q.stepInId)===Lt,S=((le=(re=d==null?void 0:d.debugInfo)==null?void 0:re.jumpGuide)==null?void 0:le.stepOutId)===Lt,I=((Ce=(pe=d==null?void 0:d.debugInfo)==null?void 0:pe.jumpGuide)==null?void 0:Ce.nextId)===Lt,U=((O=(Te=d==null?void 0:d.debugInfo)==null?void 0:Te.jumpGuide)==null?void 0:O.previousId)===Lt,R=_!==g((z=(K=d==null?void 0:d.debugInfo)==null?void 0:K.jumpGuide)==null?void 0:z.nextId),Y=_!==g((ee=(X=d==null?void 0:d.debugInfo)==null?void 0:X.jumpGuide)==null?void 0:ee.previousId),W=!((ye=d==null?void 0:d.debugInfo)!=null&&ye.isInternalCall),Z=_!==g((me=(xe=d==null?void 0:d.debugInfo)==null?void 0:xe.jumpGuide)==null?void 0:me.stepOutId),N=de.useMemo(()=>({height:window.innerHeight*parseFloat(s.jsonView.height)*.01-52,width:window.innerWidth*.382}),[s.jsonView.height]),M=()=>m===_r.CODE_IN_SEPARATE_TAB?f.jsx("div",{className:Ot.debugContainer,children:f.jsxs("div",{className:Ot.traceWrap,children:[f.jsx(ao,{position:Rt.TX,store:r}),f.jsxs("div",{className:Ot.invocationFlowWrap,children:[f.jsx(Ou,{style:{...s.jsonView,position:"relative"},dataSource:r.mainTree,position:Rt.TX}),f.jsx(Mo,{style:{zIndex:2},defaultSize:{width:"100%",height:"38.2%"},minHeight:46,onChange:se=>D(se,"jsonView"),children:f.jsx(Wc,{jsonView:d,className:Ve({[Ot.lightJsonView]:u==="right"&&a==="light"})})})]})]})}):f.jsxs("div",{className:Ot.debugContainer,children:[f.jsxs("div",{className:Ot.traceWrap,children:[f.jsx(ao,{position:Rt.TX,store:r}),f.jsxs("div",{className:Ot.invocationFlowWrap,children:[f.jsx(Ou,{width:N.width,height:N.height,style:{...s.jsonView,position:"relative"},dataSource:r.mainTree,position:Rt.TX}),f.jsx(Mo,{style:{position:"relative"},defaultSize:{width:"100%",height:"38.2%"},minHeight:46,onChange:se=>D(se,"jsonView"),children:f.jsx(Wc,{jsonView:d,className:Ve({[Ot.lightJsonView]:u==="right"&&a==="light"})})})]})]}),f.jsxs(h1,{defaultSize:{width:"61.8%",height:"100%"},enable:{left:!0},handleWrapperClass:Ot.handleWrapperClass,children:[f.jsx(d1,{store:r,style:s.sourceCode,showClose:!0,showSeparate:!0,txnHash:e}),f.jsx(Mo,{minHeight:46,headerLeftClassName:Ot.actionHeaderLeft,defaultSize:{width:"100%",height:"38.2%"},header:f.jsxs(f.Fragment,{children:[f.jsx(lr,{color:"#fff",overlayInnerStyle:{color:"#000"},visible:l,overlayStyle:{maxWidth:"500px"},title:f.jsxs("span",{children:["Debug Console: ",f.jsx("strong",{children:"Call-level"})," single-step debug console."]}),children:f.jsxs("div",{className:Ot.headerLeft,children:[f.jsxs("div",{className:Ot.title,children:[f.jsx(lt,{type:"icon-code",size:18}),"Debug"]}),f.jsx(lr,{mouseEnterDelay:Yi,placement:"topLeft",overlayStyle:{maxWidth:"max-content"},title:"Return to the call site of the current function",children:f.jsxs(Er,{size:"small",type:"primary",danger:Z,className:Ot.debugAction,disabled:S,onClick:()=>E($r.STEP_OUT),children:[f.jsx(lt,{type:"icon-step-out-outlined",className:Ot.actionIcon}),"Step Out"]})}),f.jsx(lr,{overlayStyle:{maxWidth:"max-content"},mouseEnterDelay:Yi,title:!U&&Y?"Go to the previous call site in the whole call trace":"Go to the previous call site of the current function",children:f.jsxs(Er,{size:"small",type:"primary",danger:Y,className:Ot.debugAction,disabled:U,onClick:()=>E($r.PREVIOUS),children:[f.jsx(lt,{type:"icon-arrow-up-outlined",className:Ot.actionIcon})," ","Previous"]})}),f.jsx(lr,{overlayStyle:{maxWidth:"max-content"},mouseEnterDelay:Yi,title:!I&&R?"Go to the next call site in the whole call trace":"Go to the next call site of the current function",children:f.jsxs(Er,{size:"small",type:"primary",danger:R,className:Ot.debugAction,disabled:I,onClick:()=>E($r.NEXT),children:[f.jsx(lt,{type:"icon-arrow-down-outlined",className:Ot.actionIcon})," ","Next"]})}),f.jsx(lr,{overlayStyle:{maxWidth:"max-content"},mouseEnterDelay:Yi,title:"Go to the callee function",children:f.jsxs(Er,{size:"small",type:"primary",danger:W,className:Ot.debugAction,disabled:A,onClick:()=>E($r.STEP_IN),children:[f.jsx(lt,{type:"icon-step-in-outlined",className:Ot.actionIcon})," ","Step In"]})})]})}),f.jsx(lr,{mouseEnterDelay:Yi,title:"Undo",children:f.jsx("div",{onClick:()=>{r.undoStack.length&&r.undoAction()},className:Ve(Ot.undoAction,{[Ot.undoDisabled]:!r.undoStack.length}),children:f.jsx(lt,{size:14,type:"icon-return",className:Ot.actionIcon})})})]}),onChange:se=>D(se,"sourceCode"),children:f.jsx(p1,{store:r,txnHash:e})})]})]});return de.useEffect(()=>{c!=null&&c.line&&r.txTraceData&&r.initDebugData({...c,txnHash:e,network:t})},[n,r.txTraceData]),f.jsxs("div",{className:Ot.container,children:[r.debugPageLoading&&f.jsx("div",{className:Ot.loadingWrap,children:f.jsx(Oi,{})}),M(),l&&f.jsx(Yy,{onClose:()=>r.setDebugGuideVisible(!1)})]})},bw=dr(Fw),kw=({visible:e})=>{const t=yr(),{setFocusVisible:r,setControlStatus:n,setPlacement:i,setDebugPageLoading:a}=t,[s]=Kr(),o=s.get("debugLine");return de.useEffect(()=>{var c;o?(r(!0),i("right")):(r(!1),n(_r.TRACE_ONLY),a(!1),(c=aa)==null||c.postMessage({type:sa.CLOSE_REMOTE_TAB,data:za}))},[o]),e?A0.createPortal(f.jsx(bw,{}),document.body):null},JF=dr(kw);var yh="complete",Bu="canceled";function Nw(e){if("requestAnimationFrame"in window)return window.requestAnimationFrame(e);setTimeout(e,16)}function Pu(e,t,r){e.self===e?e.scrollTo(t,r):(e.scrollLeft=t,e.scrollTop=r)}function Iw(e,t){var r=e.align,n=e.target,i=n.getBoundingClientRect(),a,s,o,c,l,u,m,d=r&&r.left!=null?r.left:.5,g=r&&r.top!=null?r.top:.5,v=r&&r.leftOffset!=null?r.leftOffset:0,p=r&&r.topOffset!=null?r.topOffset:0,_=d,E=g;if(e.isWindow(t))u=Math.min(i.width,t.innerWidth),m=Math.min(i.height,t.innerHeight),s=i.left+t.pageXOffset-t.innerWidth*_+u*_,o=i.top+t.pageYOffset-t.innerHeight*E+m*E,s-=v,o-=p,s=e.align.lockX?t.pageXOffset:s,o=e.align.lockY?t.pageYOffset:o,c=s-t.pageXOffset,l=o-t.pageYOffset;else{u=i.width,m=i.height,a=t.getBoundingClientRect();var D=i.left-(a.left-t.scrollLeft),A=i.top-(a.top-t.scrollTop);s=D+u*_-t.clientWidth*_,o=A+m*E-t.clientHeight*E,s-=v,o-=p,s=Math.max(Math.min(s,t.scrollWidth-t.clientWidth),0),o=Math.max(Math.min(o,t.scrollHeight-t.clientHeight),0),s=e.align.lockX?t.scrollLeft:s,o=e.align.lockY?t.scrollTop:o,c=s-t.scrollLeft,l=o-t.scrollTop}return{x:s,y:o,differenceX:c,differenceY:l}}function Bs(e){var t=e._scrollSettings;if(t){var r=t.maxSynchronousAlignments,n=Iw(t,e),i=Date.now()-t.startTime,a=Math.min(1/t.time*i,1);if(t.endIterations>=r)return Pu(e,n.x,n.y),e._scrollSettings=null,t.end(yh);var s=1-t.ease(a);if(Pu(e,n.x-n.differenceX*s,n.y-n.differenceY*s),i>=t.time){t.endIterations++,t.scrollAncestor&&Bs(t.scrollAncestor),Bs(e);return}Nw(Bs.bind(null,e))}}function Ow(e){return e.self===e}function Bw(e,t,r,n,i){var a=!t._scrollSettings,s=t._scrollSettings,o=Date.now(),c,l={passive:!0};s&&s.end(Bu);function u(d){t._scrollSettings=null,t.parentElement&&t.parentElement._scrollSettings&&t.parentElement._scrollSettings.end(d),r.debug&&console.log("Scrolling ended with type",d,"for",t),i(d),c&&(t.removeEventListener("touchstart",c,l),t.removeEventListener("wheel",c,l))}var m=r.maxSynchronousAlignments;return m==null&&(m=3),t._scrollSettings={startTime:o,endIterations:0,target:e,time:r.time,ease:r.ease,align:r.align,isWindow:r.isWindow||Ow,maxSynchronousAlignments:m,end:u,scrollAncestor:n},(!("cancellable"in r)||r.cancellable)&&(c=u.bind(null,Bu),t.addEventListener("touchstart",c,l),t.addEventListener("wheel",c,l)),a&&Bs(t),c}function ju(e){return"pageXOffset"in e||(e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth)&&getComputedStyle(e).overflow!=="hidden"}function Pw(){return!0}function xl(e){if(e.assignedSlot)return xl(e.assignedSlot);if(e.parentElement)return e.parentElement.tagName.toLowerCase()==="body"?e.parentElement.ownerDocument.defaultView||e.parentElement.ownerDocument.ownerWindow:e.parentElement;if(e.getRootNode){var t=e.getRootNode();if(t.nodeType===11)return t.host}}var jw=function(e,t,r){if(!e)return;typeof t=="function"&&(r=t,t=null),t||(t={}),t.time=isNaN(t.time)?1e3:t.time,t.ease=t.ease||function(l){return 1-Math.pow(1-l,l/2)},t.align=t.align||{};var n=xl(e),i=1;function a(l){i--,i||r&&r(l)}var s=t.validTarget||Pw,o=t.isScrollable;t.debug&&(console.log("About to scroll to",e),n||console.error("Target did not have a parent, is it mounted in the DOM?"));for(var c=[];n;)if(t.debug&&console.log("Scrolling parent node",n),s(n,i)&&(o?o(n,ju):ju(n))&&(i++,c.push(n)),n=xl(n),!n){a(yh);break}return c.reduce((l,u,m)=>Bw(e,u,t,c[m+1],a),null)};const Rw=Nd(jw),Lw="_container_1l7qw_1",Ko={container:Lw},Mw=()=>{var b,V,q,re,le,pe,Ce,Te,O,K,z,X,ee,ye,xe,me;const e=C0(),{network:t=""}=Nr(),[r]=Kr(),{isMobile:n}=Id(),{mode:i="light"}=de.useContext($n),[a,s]=de.useState(!1),{event:o,type:c,forkId:l,line:u,debugLine:m}=Gn(r),{currentActiveAnchor:d,setActiveAnchor:g,txProfileData:v,setClickAnchor:p,solanaProfileData:_,setModalSimulateVisible:E}=yr();let D=[{title:"BasicInfo",anchorName:"basicInfo",icon:"icon-basic-info",shortTitle:"BI"},{title:"FundFlow",anchorName:"fund-flow-graph",icon:"icon-fund-flow",shortTitle:"FF"},{title:"BalanceChanges",anchorName:"balanceChanges",icon:"icon-balance-change",shortTitle:"BC"},{title:"GasProfiler",anchorName:"gasProfiler",icon:"icon-gas-profiler",shortTitle:"GP"},{title:"StateChanges",anchorName:"stateChanges",icon:"icon-state-change",shortTitle:"SC"},{title:"InvocationFlow",anchorName:"invocationFlowPanel",icon:"icon-invocation-flow",shortTitle:"IF"}];const A=se=>{const be=document.getElementById("__tx_info__"),Le=document.getElementById(se);Le&&Rw(Le,{time:500,align:{top:0,topOffset:(be==null?void 0:be.clientHeight)||60}})},S=()=>{var se;e(`/explorer/tx/${t}/${(se=v==null?void 0:v.basicInfo)==null?void 0:se.sourceTxnHash}`)},I=o===xn.SIMULATE||o===xn.PRERUN,U=c===_1.CUSTOM.toString(),R=mt.getChainIdBySimpleName(t),Y=v&&j0.map(se=>se.value).includes(R),W=mt.getChainIconBySimpleName(t,mt.isSolana(t)?((b=_==null?void 0:_.basicInfo)==null?void 0:b.txnHash)??"":((V=v==null?void 0:v.basicInfo)==null?void 0:V.txnHash)??"","tx"),Z=se=>{switch(se){case xn.FORK:return i==="light"?Bd:Pd;default:return W==null?void 0:W.icon}},N=()=>{["basicInfo","fund-flow-graph","balanceChanges","gasProfiler","stateChanges","invocationFlowPanel"].map(be=>document.getElementById(be)).filter(be=>be).forEach(be=>{const{top:Le}=be.getBoundingClientRect();Le<180&&g(be.id)})},M=se=>{se.key==="F"&&se.shiftKey&&Ir.setFullScreen(!Ir.fullScreen),se.code==="Escape"&&Ir.setFullScreen(!1)};de.useEffect(()=>{const se=document.getElementById("dashboard_scrollableDiv");return se==null||se.addEventListener("scroll",N),document==null||document.addEventListener("keydown",M),()=>{Ir.setFullScreen(!1),se==null||se.removeEventListener("scroll",N),document==null||document.removeEventListener("keydown",M)}},[]),de.useEffect(()=>{if(!localStorage.getItem(Nc)){s(!0),localStorage.setItem(Nc,"true");const be=setTimeout(()=>{be&&clearTimeout(be),s(!1)},8e3)}},[]),de.useEffect(()=>{m||u&&setTimeout(()=>{A("invocationFlowPanel")},2e3)},[]),(q=v==null?void 0:v.basicInfo)!=null&&q.debugEnable||(D=D.filter(se=>se.anchorName!=="stateChanges")),mt.isSolana(t)&&(D=D.filter(se=>se.anchorName!=="gasProfiler"));const G=()=>{var se,be,Le,Ye,We,ft,He,_e,Fe,Pe,ge,Oe;return f.jsxs("div",{className:Ve(Ko.txInfo,"flex h-fit flex-col items-start gap-2",{"justify-around":Ir.fullScreen}),children:[f.jsx("div",{className:"flex flex-col gap-2 xl:flex-row",children:f.jsx("div",{className:"flex items-center gap-x-6",children:f.jsxs("div",{className:"flex items-center gap-x-2",children:[f.jsx("span",{className:"truncate text-sm font-semibold",children:mt.getFullNameBySimpleName(t)}),f.jsxs("div",{className:"flex items-center gap-x-1",children:[f.jsx(Jt,{text:mt.isSolana(t)?(se=_==null?void 0:_.basicInfo)==null?void 0:se.txnHash:(be=v==null?void 0:v.basicInfo)==null?void 0:be.txnHash,ml:4,children:f.jsx("span",{className:"font-code-light",children:zs(mt.isSolana(t)?(Le=_==null?void 0:_.basicInfo)==null?void 0:Le.txnHash:(Ye=v==null?void 0:v.basicInfo)==null?void 0:Ye.txnHash)})}),!I&&f.jsx("img",{src:Z(o),className:"h-[14px] cursor-pointer object-cover align-top",onClick:()=>{o===xn.FORK?window.open(`${Ic}/${l}/tx/${v==null?void 0:v.basicInfo.txnHash}`):window.open(W==null?void 0:W.link)}})]})]})})}),f.jsxs("div",{className:Ve("flex  cursor-pointer items-center justify-end gap-x-6",{"justify-start":Ir.fullScreen}),children:[!!(v!=null&&v.securityEvent)&&f.jsx(lr,{overlayInnerStyle:{width:386},title:f.jsxs(f.Fragment,{children:["This txn involves the",f.jsx("span",{className:"px-2 font-code",children:(We=v==null?void 0:v.securityEvent)==null?void 0:We.project}),"incident, anticipating",f.jsx("span",{className:"px-2",children:hs((ft=v==null?void 0:v.securityEvent)==null?void 0:ft.loss)}),"in losses"," ",!!((He=v==null?void 0:v.securityEvent)!=null&&He.rescued)&&f.jsxs(f.Fragment,{children:["but BlockSec managed to rescue"," ",hs((_e=v==null?void 0:v.securityEvent)==null?void 0:_e.rescued)]}),".",f.jsx(Oc,{className:"pl-2 font-code underline",target:"_blank",to:`${Bc}/explorer/security-incidents?hash=${(Fe=v==null?void 0:v.basicInfo)==null?void 0:Fe.txnHash}&key=${(Pe=v==null?void 0:v.securityEvent)==null?void 0:Pe.id}`,children:"Learn More"})]}),children:f.jsxs("div",{className:"tag-danger flex cursor-pointer items-center gap-x-1 truncate",children:[f.jsx(lt,{type:"icon-warning"}),(ge=v==null?void 0:v.securityEvent)==null?void 0:ge.project," Incident"]})}),I&&f.jsxs("div",{className:"tag-primary flex items-center gap-x-0.5",onClick:()=>{U||S()},children:["Simulation Result",!U&&f.jsx(lt,{type:"icon-wrong-fill",className:"cursor-pointer"})]}),Y&&f.jsx(ni,{mode:["hit"],data:{customEvent:ii.SIMULATE_THIS_TX},children:f.jsx(Di,{theme:{components:{Button:{defaultGhostBorderColor:"#0066ff",defaultGhostColor:"#0066ff",paddingInline:10}}},children:f.jsxs(Er,{disabled:!((Oe=v==null?void 0:v.basicInfo)!=null&&Oe.simulationEnable),type:"primary",ghost:!0,className:"flex items-center gap-1",onClick:()=>E(!0),children:[f.jsx(lt,{type:"icon-simulator"}),"Simulator"]})})})]})]})};return f.jsx("div",{className:Ve(Ko.container,"sticky -top-8 z-10 -mx-8 -mt-8 border-b border-b-gray-200 px-8 py-2.5 shadow-sm dark:border-b-white/10"),id:"__tx_info__",children:n?G():f.jsxs("div",{className:Ve(Ko.txInfo,"flex h-fit flex-col items-start gap-2 xl:flex-row xl:items-center xl:justify-between",{"justify-around":Ir.fullScreen}),children:[f.jsxs("div",{className:"flex gap-x-6",children:[f.jsx("div",{className:"flex flex-col gap-2 xl:flex-row",children:f.jsxs("div",{className:"flex flex-col-reverse justify-center gap-0.5",children:[f.jsxs("div",{className:"flex items-center gap-x-2",children:[f.jsx("div",{className:"truncate text-sm font-semibold",children:mt.getFullNameBySimpleName(t)}),f.jsxs("div",{className:"flex items-center gap-x-1",children:[f.jsx(Jt,{text:mt.isSolana(t)?(re=_==null?void 0:_.basicInfo)==null?void 0:re.txnHash:(le=v==null?void 0:v.basicInfo)==null?void 0:le.txnHash,ml:4,children:f.jsx("span",{className:"font-code-light",children:zs(mt.isSolana(t)?(pe=_==null?void 0:_.basicInfo)==null?void 0:pe.txnHash:(Ce=v==null?void 0:v.basicInfo)==null?void 0:Ce.txnHash)})}),!I&&f.jsx("img",{src:Z(o),className:"h-[14px] cursor-pointer object-cover align-top",onClick:()=>{o===xn.FORK?window.open(`${Ic}/${l}/tx/${v==null?void 0:v.basicInfo.txnHash}`):window.open(W==null?void 0:W.link)}})]})]}),!!(v!=null&&v.securityEvent)&&f.jsx(lr,{overlayInnerStyle:{width:386},title:f.jsxs(f.Fragment,{children:["This txn involves the",f.jsx("span",{className:"px-2 font-code",children:(Te=v==null?void 0:v.securityEvent)==null?void 0:Te.project}),"incident, anticipating",f.jsx("span",{className:"px-2",children:hs((O=v==null?void 0:v.securityEvent)==null?void 0:O.loss)}),"in losses"," ",!!((K=v==null?void 0:v.securityEvent)!=null&&K.rescued)&&f.jsxs(f.Fragment,{children:["but BlockSec managed to rescue"," ",hs((z=v==null?void 0:v.securityEvent)==null?void 0:z.rescued)]}),".",f.jsx(Oc,{className:"pl-2 font-code underline",target:"_blank",to:`${Bc}/explorer/security-incidents?hash=${(X=v==null?void 0:v.basicInfo)==null?void 0:X.txnHash}&key=${(ee=v==null?void 0:v.securityEvent)==null?void 0:ee.id}`,children:"Learn More"})]}),children:f.jsxs("span",{className:"tag-danger flex w-fit cursor-pointer items-center gap-x-1 px-1.5 py-0.5",children:[f.jsx(lt,{type:"icon-hacker"}),(ye=v==null?void 0:v.securityEvent)==null?void 0:ye.project," Incident"]})}),I&&f.jsxs("div",{className:"tag-primary flex w-fit cursor-pointer items-center gap-x-0.5 px-1.5 py-0.5",onClick:()=>{U||S()},children:["Simulation Result",!U&&f.jsx(lt,{type:"icon-wrong-fill",className:"cursor-pointer"})]}),((xe=_==null?void 0:_.basicInfo)==null?void 0:xe.txnTag)&&f.jsx("div",{className:"tag-primary flex w-fit cursor-pointer items-center gap-x-0.5 px-1.5 py-0.5",children:_.basicInfo.txnTag})]})}),Ir.fullScreen&&f.jsx(Od,{className:"!flex !w-60 !max-w-60"})]}),f.jsxs("div",{className:Ve("flex  items-center justify-end gap-x-4 2xl:gap-x-6",{"justify-start":Ir.fullScreen}),children:[f.jsx("div",{className:Ve("hidden items-center gap-x-2 xl:flex 2xl:gap-x-4"),children:D.map(se=>f.jsxs("div",{className:Ve("flex cursor-pointer items-center gap-x-1 text-xs font-semibold transition-all duration-300",{"text-primary":d===se.anchorName}),onClick:()=>{A(se.anchorName),g(se.anchorName),p(se.anchorName)},children:[f.jsx(lt,{type:se.icon})," ",Ir.fullScreen?se.shortTitle:se.title]},se.title))}),Y&&f.jsx(ni,{mode:["hit"],data:{customEvent:ii.SIMULATE_THIS_TX},children:f.jsx(Di,{theme:{components:{Button:{paddingInline:10}}},children:f.jsxs(Er,{disabled:!((me=v==null?void 0:v.basicInfo)!=null&&me.simulationEnable),type:"primary",ghost:!0,className:"flex items-center gap-1",onClick:()=>E(!0),children:[f.jsx(lt,{type:"icon-simulator"}),"Simulator"]})})}),f.jsx(Di,{theme:{components:{Button:{paddingInline:6},Tooltip:{colorBgContainer:"#000"}}},children:f.jsx(lr,{getPopupContainer:se=>se.parentNode,open:a,title:f.jsxs("div",{className:"relative flex h-7 items-center",children:[f.jsx("img",{src:"https://assets.blocksec.com/image/1712908158434-2.svg",className:"absolute -left-2 -top-1.5 size-10"}),f.jsx("p",{className:"ml-8",children:"Click here to enter full screen mode"})]}),placement:"left",overlayStyle:{width:"fit-content",maxWidth:"400px",height:"40px"},children:f.jsx(Er,{className:"flex items-center",onClick:()=>Ir.setFullScreen(!Ir.fullScreen),children:f.jsx(lt,{type:Ir.fullScreen?"icon-narrow":"icon-enlarge",className:"leading-none",ml:0,size:24})})})})]})]})})},ZF=dr(Mw),Uw=({instruction:e,mapList:t,fundFlow:r,callback:n,removeAddressHighLight:i,onHighLightAddress:a,type:s,network:o})=>{let c=null;switch(e.program){case"spl-token":{const{description:l}=LE({type:s,instruction:e,mapList:t,fundFlow:r,callback:n,removeAddressHighLight:i,onHighLightAddress:a,network:o});c=l;break}case"system":{const{description:l}=ME({type:s,instruction:e,mapList:t,fundFlow:r,callback:n,removeAddressHighLight:i,onHighLightAddress:a,network:o});c=l;break}case"spl-associated-token-account":{const{description:l}=UE({type:s,instruction:e,mapList:t,fundFlow:r,callback:n,removeAddressHighLight:i,onHighLightAddress:a,network:o});c=l;break}}if(jE(e.programId)){const{description:l}=RE({type:s,instruction:e,mapList:t,fundFlow:r,callback:n,network:o});c=l}return c},wi=(e,t,r,n,i)=>{if(!n)throw new Error(i??`Invalid property path: ${t}
Couldn't access "${r}" in ${JSON.stringify(e)}`)},Ru=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ps=e=>Array.isArray(e),Dh=(e,t)=>e.filter((r,n)=>n!==t),Ww=(e,t,r,n={})=>{const{remove:i=!1,createNew:a=!0,noError:s=!1}=n,o=e,c=typeof(l=t)=="string"?l:typeof l=="number"?String(l):l.reduce((d,g)=>typeof g=="number"?`${d}[${g}]`:d===""?g:`${d}.${g}`,"");var l;const u=Object.assign(Object.assign({},n),{remove:i,createNew:a,noError:s,fullData:o,fullPath:c}),m=Array.isArray(t)?t:(d=>Array.isArray(d)?d:d.split(/(\.|\[\d+\])/).filter(g=>g!=="."&&g!=="").map(g=>{const v=/\[(\d+)\]/.exec(g);return v?Number(v[1]):g}).flat())(t).filter(d=>d!=="");return Ps(e)&&i&&m.length===1?Dh(e,m[0]):Ca(e,m,r,u)},Ca=(e,t,r,n)=>{const i=Ru(e)?Object.assign({},e):null,a=Ps(e)?[...e]:null;if(t.length===0)return e;if(!i&&!a)throw new Error("Can't assign property -- invalid input object");const{createNew:s,remove:o,noError:c,fullData:l,fullPath:u}=n,m=t[0];if(a&&typeof m=="string")return a.map(p=>Ca(p,t,r,n));if(t.length===1){if(i&&typeof m=="string"){const p=zw(i,m,r,n);return p??i}return a&&typeof m=="number"?(Vw(a,m,r,n),a):(wi(l,u,m,c),e)}const d=i||a||[];if(o&&t.length===2&&typeof t[1]=="number"){const p=d[m],_=t[1];return Ps(p)?d[m]=Dh(p,_):wi(l,u,m,c,"Trying to remove an indexed item from an object that is not an array"),d}const g=t.slice(1);if(m in e){if(v=d[m],!Ps(v)&&!Ru(v)){if(!s)return wi(l,u,m,c),d;d[m]={}}return d[m]=Ca(d[m],g,r,n),d}var v;if(s){const p=typeof g[0]=="number"?[]:{};if(i)return d[m]=p,d[m]=Ca(d[m],g,r,n),d;if(a&&Array.isArray(d)){d.push(p);const _=d.length-1;return d[_]=Ca(d[_],g,r,n),d}}return wi(l,u,m,c),d},zw=(e,t,r,n)=>{const{remove:i,createNew:a,noError:s,insertAfter:o,insertBefore:c,fullData:l,fullPath:u}=n;if(c||o){const d=Object.entries(e);let g=d.findIndex(([v,p])=>v===(c??o));return o&&g++,d.splice(g,0,[t,r]),Object.fromEntries(d)}const m=t in e;i?m?delete e[t]:wi(l,u,t,s):a||m?e[t]=r:wi(l,u,t,s)},Vw=(e,t,r,n)=>{const{noError:i,fullData:a,fullPath:s,createNew:o,insert:c}=n;c&&e.splice(t,0,r),t in e?e[t]=r:o?e.push(r):wi(a,s,t,i)},so=(e,t,r)=>{const n=Array.isArray(t)?t:Hw(t);if(n.length===0)return e;const i=n[0];if(Array.isArray(e)&&typeof i!="number")return e.map(s=>so(s,n));if(typeof e!="object"||e===null||!(i in e))return $w(e,i);const a=e[i];return n.length===1?a:so(a,n.slice(1))},Hw=e=>e.split(/(\.|\[\d+\])/).filter(t=>t!=="."&&t!=="").map(t=>{const r=/\[(\d+)\]/.exec(t);return r?Number(r[1]):t}).flat(),$w=(e,t,r)=>{throw new Error(`Unable to extract object property
Looking for property: ${t}
In object: ${JSON.stringify(e)}`)};var Gw=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Xw=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Kw=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Yo={Space_Separator:Gw,ID_Start:Xw,ID_Continue:Kw},Vt={isSpaceSeparator(e){return typeof e=="string"&&Yo.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Yo.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||Yo.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let vl,vr,Rn,oo,li,un,tr,cc,La;var Yw=function(t,r){vl=String(t),vr="start",Rn=[],oo=0,li=1,un=0,tr=void 0,cc=void 0,La=void 0;do tr=qw(),Qw[vr]();while(tr.type!=="eof");return typeof r=="function"?_l({"":La},"",r):La};function _l(e,t,r){const n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let i=0;i<n.length;i++){const a=String(i),s=_l(n,a,r);s===void 0?delete n[a]:Object.defineProperty(n,a,{value:s,writable:!0,enumerable:!0,configurable:!0})}else for(const i in n){const a=_l(n,i,r);a===void 0?delete n[i]:Object.defineProperty(n,i,{value:a,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}let it,tt,Ta,Pn,ct;function qw(){for(it="default",tt="",Ta=!1,Pn=1;;){ct=zn();const e=Ah[it]();if(e)return e}}function zn(){if(vl[oo])return String.fromCodePoint(vl.codePointAt(oo))}function ve(){const e=zn();return e===`
`?(li++,un=0):e?un+=e.length:un++,e&&(oo+=e.length),e}const Ah={default(){switch(ct){case"	":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
`:case"\r":case"\u2028":case"\u2029":ve();return;case"/":ve(),it="comment";return;case void 0:return ve(),Bt("eof")}if(Vt.isSpaceSeparator(ct)){ve();return}return Ah[vr]()},comment(){switch(ct){case"*":ve(),it="multiLineComment";return;case"/":ve(),it="singleLineComment";return}throw Pt(ve())},multiLineComment(){switch(ct){case"*":ve(),it="multiLineCommentAsterisk";return;case void 0:throw Pt(ve())}ve()},multiLineCommentAsterisk(){switch(ct){case"*":ve();return;case"/":ve(),it="default";return;case void 0:throw Pt(ve())}ve(),it="multiLineComment"},singleLineComment(){switch(ct){case`
`:case"\r":case"\u2028":case"\u2029":ve(),it="default";return;case void 0:return ve(),Bt("eof")}ve()},value(){switch(ct){case"{":case"[":return Bt("punctuator",ve());case"n":return ve(),hi("ull"),Bt("null",null);case"t":return ve(),hi("rue"),Bt("boolean",!0);case"f":return ve(),hi("alse"),Bt("boolean",!1);case"-":case"+":ve()==="-"&&(Pn=-1),it="sign";return;case".":tt=ve(),it="decimalPointLeading";return;case"0":tt=ve(),it="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":tt=ve(),it="decimalInteger";return;case"I":return ve(),hi("nfinity"),Bt("numeric",1/0);case"N":return ve(),hi("aN"),Bt("numeric",NaN);case'"':case"'":Ta=ve()==='"',tt="",it="string";return}throw Pt(ve())},identifierNameStartEscape(){if(ct!=="u")throw Pt(ve());ve();const e=El();switch(e){case"$":case"_":break;default:if(!Vt.isIdStartChar(e))throw Lu();break}tt+=e,it="identifierName"},identifierName(){switch(ct){case"$":case"_":case"‌":case"‍":tt+=ve();return;case"\\":ve(),it="identifierNameEscape";return}if(Vt.isIdContinueChar(ct)){tt+=ve();return}return Bt("identifier",tt)},identifierNameEscape(){if(ct!=="u")throw Pt(ve());ve();const e=El();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!Vt.isIdContinueChar(e))throw Lu();break}tt+=e,it="identifierName"},sign(){switch(ct){case".":tt=ve(),it="decimalPointLeading";return;case"0":tt=ve(),it="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":tt=ve(),it="decimalInteger";return;case"I":return ve(),hi("nfinity"),Bt("numeric",Pn*(1/0));case"N":return ve(),hi("aN"),Bt("numeric",NaN)}throw Pt(ve())},zero(){switch(ct){case".":tt+=ve(),it="decimalPoint";return;case"e":case"E":tt+=ve(),it="decimalExponent";return;case"x":case"X":tt+=ve(),it="hexadecimal";return}return Bt("numeric",Pn*0)},decimalInteger(){switch(ct){case".":tt+=ve(),it="decimalPoint";return;case"e":case"E":tt+=ve(),it="decimalExponent";return}if(Vt.isDigit(ct)){tt+=ve();return}return Bt("numeric",Pn*Number(tt))},decimalPointLeading(){if(Vt.isDigit(ct)){tt+=ve(),it="decimalFraction";return}throw Pt(ve())},decimalPoint(){switch(ct){case"e":case"E":tt+=ve(),it="decimalExponent";return}if(Vt.isDigit(ct)){tt+=ve(),it="decimalFraction";return}return Bt("numeric",Pn*Number(tt))},decimalFraction(){switch(ct){case"e":case"E":tt+=ve(),it="decimalExponent";return}if(Vt.isDigit(ct)){tt+=ve();return}return Bt("numeric",Pn*Number(tt))},decimalExponent(){switch(ct){case"+":case"-":tt+=ve(),it="decimalExponentSign";return}if(Vt.isDigit(ct)){tt+=ve(),it="decimalExponentInteger";return}throw Pt(ve())},decimalExponentSign(){if(Vt.isDigit(ct)){tt+=ve(),it="decimalExponentInteger";return}throw Pt(ve())},decimalExponentInteger(){if(Vt.isDigit(ct)){tt+=ve();return}return Bt("numeric",Pn*Number(tt))},hexadecimal(){if(Vt.isHexDigit(ct)){tt+=ve(),it="hexadecimalInteger";return}throw Pt(ve())},hexadecimalInteger(){if(Vt.isHexDigit(ct)){tt+=ve();return}return Bt("numeric",Pn*Number(tt))},string(){switch(ct){case"\\":ve(),tt+=Jw();return;case'"':if(Ta)return ve(),Bt("string",tt);tt+=ve();return;case"'":if(!Ta)return ve(),Bt("string",tt);tt+=ve();return;case`
`:case"\r":throw Pt(ve());case"\u2028":case"\u2029":ey(ct);break;case void 0:throw Pt(ve())}tt+=ve()},start(){switch(ct){case"{":case"[":return Bt("punctuator",ve())}it="value"},beforePropertyName(){switch(ct){case"$":case"_":tt=ve(),it="identifierName";return;case"\\":ve(),it="identifierNameStartEscape";return;case"}":return Bt("punctuator",ve());case'"':case"'":Ta=ve()==='"',it="string";return}if(Vt.isIdStartChar(ct)){tt+=ve(),it="identifierName";return}throw Pt(ve())},afterPropertyName(){if(ct===":")return Bt("punctuator",ve());throw Pt(ve())},beforePropertyValue(){it="value"},afterPropertyValue(){switch(ct){case",":case"}":return Bt("punctuator",ve())}throw Pt(ve())},beforeArrayValue(){if(ct==="]")return Bt("punctuator",ve());it="value"},afterArrayValue(){switch(ct){case",":case"]":return Bt("punctuator",ve())}throw Pt(ve())},end(){throw Pt(ve())}};function Bt(e,t){return{type:e,value:t,line:li,column:un}}function hi(e){for(const t of e){if(zn()!==t)throw Pt(ve());ve()}}function Jw(){switch(zn()){case"b":return ve(),"\b";case"f":return ve(),"\f";case"n":return ve(),`
`;case"r":return ve(),"\r";case"t":return ve(),"	";case"v":return ve(),"\v";case"0":if(ve(),Vt.isDigit(zn()))throw Pt(ve());return"\0";case"x":return ve(),Zw();case"u":return ve(),El();case`
`:case"\u2028":case"\u2029":return ve(),"";case"\r":return ve(),zn()===`
`&&ve(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Pt(ve());case void 0:throw Pt(ve())}return ve()}function Zw(){let e="",t=zn();if(!Vt.isHexDigit(t)||(e+=ve(),t=zn(),!Vt.isHexDigit(t)))throw Pt(ve());return e+=ve(),String.fromCodePoint(parseInt(e,16))}function El(){let e="",t=4;for(;t-- >0;){const r=zn();if(!Vt.isHexDigit(r))throw Pt(ve());e+=ve()}return String.fromCodePoint(parseInt(e,16))}const Qw={start(){if(tr.type==="eof")throw di();qo()},beforePropertyName(){switch(tr.type){case"identifier":case"string":cc=tr.value,vr="afterPropertyName";return;case"punctuator":ws();return;case"eof":throw di()}},afterPropertyName(){if(tr.type==="eof")throw di();vr="beforePropertyValue"},beforePropertyValue(){if(tr.type==="eof")throw di();qo()},beforeArrayValue(){if(tr.type==="eof")throw di();if(tr.type==="punctuator"&&tr.value==="]"){ws();return}qo()},afterPropertyValue(){if(tr.type==="eof")throw di();switch(tr.value){case",":vr="beforePropertyName";return;case"}":ws()}},afterArrayValue(){if(tr.type==="eof")throw di();switch(tr.value){case",":vr="beforeArrayValue";return;case"]":ws()}},end(){}};function qo(){let e;switch(tr.type){case"punctuator":switch(tr.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=tr.value;break}if(La===void 0)La=e;else{const t=Rn[Rn.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,cc,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Rn.push(e),Array.isArray(e)?vr="beforeArrayValue":vr="beforePropertyName";else{const t=Rn[Rn.length-1];t==null?vr="end":Array.isArray(t)?vr="afterArrayValue":vr="afterPropertyValue"}}function ws(){Rn.pop();const e=Rn[Rn.length-1];e==null?vr="end":Array.isArray(e)?vr="afterArrayValue":vr="afterPropertyValue"}function Pt(e){return lo(e===void 0?`JSON5: invalid end of input at ${li}:${un}`:`JSON5: invalid character '${Ch(e)}' at ${li}:${un}`)}function di(){return lo(`JSON5: invalid end of input at ${li}:${un}`)}function Lu(){return un-=5,lo(`JSON5: invalid identifier character at ${li}:${un}`)}function ey(e){console.warn(`JSON5: '${Ch(e)}' in strings is not valid ECMAScript; consider escaping`)}function Ch(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function lo(e){const t=new SyntaxError(e);return t.lineNumber=li,t.columnNumber=un,t}var ty=function(t,r,n){const i=[];let a="",s,o,c="",l;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,l=r.quote,r=r.replacer),typeof r=="function")o=r;else if(Array.isArray(r)){s=[];for(const p of r){let _;typeof p=="string"?_=p:(typeof p=="number"||p instanceof String||p instanceof Number)&&(_=String(p)),_!==void 0&&s.indexOf(_)<0&&s.push(_)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),c="          ".substr(0,n)):typeof n=="string"&&(c=n.substr(0,10)),u("",{"":t});function u(p,_){let E=_[p];switch(E!=null&&(typeof E.toJSON5=="function"?E=E.toJSON5(p):typeof E.toJSON=="function"&&(E=E.toJSON(p))),o&&(E=o.call(_,p,E)),E instanceof Number?E=Number(E):E instanceof String?E=String(E):E instanceof Boolean&&(E=E.valueOf()),E){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof E=="string")return m(E);if(typeof E=="number")return String(E);if(typeof E=="object")return Array.isArray(E)?v(E):d(E)}function m(p){const _={"'":.1,'"':.2},E={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let D="";for(let S=0;S<p.length;S++){const I=p[S];switch(I){case"'":case'"':_[I]++,D+=I;continue;case"\0":if(Vt.isDigit(p[S+1])){D+="\\x00";continue}}if(E[I]){D+=E[I];continue}if(I<" "){let U=I.charCodeAt(0).toString(16);D+="\\x"+("00"+U).substring(U.length);continue}D+=I}const A=l||Object.keys(_).reduce((S,I)=>_[S]<_[I]?S:I);return D=D.replace(new RegExp(A,"g"),E[A]),A+D+A}function d(p){if(i.indexOf(p)>=0)throw TypeError("Converting circular structure to JSON5");i.push(p);let _=a;a=a+c;let E=s||Object.keys(p),D=[];for(const S of E){const I=u(S,p);if(I!==void 0){let U=g(S)+":";c!==""&&(U+=" "),U+=I,D.push(U)}}let A;if(D.length===0)A="{}";else{let S;if(c==="")S=D.join(","),A="{"+S+"}";else{let I=`,
`+a;S=D.join(I),A=`{
`+a+S+`,
`+_+"}"}}return i.pop(),a=_,A}function g(p){if(p.length===0)return m(p);const _=String.fromCodePoint(p.codePointAt(0));if(!Vt.isIdStartChar(_))return m(p);for(let E=_.length;E<p.length;E++)if(!Vt.isIdContinueChar(String.fromCodePoint(p.codePointAt(E))))return m(p);return p}function v(p){if(i.indexOf(p)>=0)throw TypeError("Converting circular structure to JSON5");i.push(p);let _=a;a=a+c;let E=[];for(let A=0;A<p.length;A++){const S=u(String(A),p);E.push(S!==void 0?S:"null")}let D;if(E.length===0)D="[]";else if(c==="")D="["+E.join(",")+"]";else{let A=`,
`+a,S=E.join(A);D=`[
`+a+S+`,
`+_+"]"}return i.pop(),a=_,D}};const ry={parse:Yw,stringify:ty};var ny=ry;function Sa(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(u){a(u)}}function o(l){try{c(n.throw(l))}catch(u){a(u)}}function c(l){var u;l.done?i(l.value):(u=l.value,u instanceof r?u:new r(function(m){m(u)})).then(s,o)}c((n=n.apply(e,[])).next())})}var Mu=[],_a=[];(function(e,t){if(e&&typeof document<"u"){var r,n=t.prepend===!0?"prepend":"append",i=t.singleTag===!0,a=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(i){var s=Mu.indexOf(a);s===-1&&(s=Mu.push(a)-1,_a[s]={}),r=_a[s]&&_a[s][n]?_a[s][n]:_a[s][n]=o()}else r=o();e.charCodeAt(0)===65279&&(e=e.substring(1)),r.styleSheet?r.styleSheet.cssText+=e:r.appendChild(document.createTextNode(e))}function o(){var c=document.createElement("style");if(c.setAttribute("type","text/css"),t.attributes)for(var l=Object.keys(t.attributes),u=0;u<l.length;u++)c.setAttribute(l[u],t.attributes[l[u]]);var m=n==="prepend"?"afterbegin":"beforeend";return a.insertAdjacentElement(m,c),c}})(`:root {
  --jer-select-border: #b6b6b6;
  --jer-select-focus: #777;
  --jer-select-arrow: #777;
  --jer-form-border: 1px solid #ededf0;
  --jer-form-border-focus: 1px solid #e2e2e2;
  --jer-expand-transition-time: 0.5s;
  --jer-highlight-color: #b3d8ff;
}

.jer-visible {
  opacity: 1;
  transition: var(--jer-expand-transition-time);
}

.jer-hidden {
  opacity: 0;
  transition: var(--jer-expand-transition-time);
}

/* Select styled as per:
https://moderncss.dev/custom-select-styles-with-pure-css/
*/

.jer-select select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  border: none;
  padding: 0 1em 0 0;
  margin: 0;
  /* width: 100%; */
  font-family: inherit;
  font-size: 0.8em;
  color: black;
  cursor: inherit;
  line-height: inherit;
  z-index: 1;
  outline: none;
}
select::-ms-expand {
  display: none;
}

.jer-select {
  display: grid;
  grid-template-areas: 'select';
  align-items: center;
  position: relative;
  min-width: 12ch;
  max-width: 15ch;
  border: 1px solid var(--jer-select-border);
  border-radius: 0.25em;
  padding: 0.25em 0.5em;
  cursor: pointer;
  line-height: 1.1;
  background-color: #fff;
  background-image: linear-gradient(to top, #f9f9f9, #fff 33%);
}
.jer-select select,
.jer-select::after {
  grid-area: select;
}
.jer-select:not(.jer-select--multiple)::after {
  content: '';
  justify-self: end;
  width: 0.8em;
  height: 0.5em;
  background-color: var(--jer-select-arrow);
  -webkit-clip-path: polygon(100% 0%, 0 0%, 50% 100%);
  clip-path: polygon(100% 0%, 0 0%, 50% 100%);
}

select:focus + .focus {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 1px solid var(--jer-select-focus);
  border-radius: inherit;
}

.jer-editor-container {
  position: relative;
  font-size: 16px;
  line-height: 1;
  padding: 1em;
  padding-left: 2em;
  /* margin-top: 1em; */
  /* margin-bottom: 1em; */
  border-radius: 0.5em;
  text-align: left;
}

.jer-editor-container textarea {
  color: var(--jer-input-color);
  border: var(--jer-form-border);
  border-radius: 0.3em;
  outline: none;
}

.jer-editor-container textarea:focus {
  border: var(--jer-form-border-focus);
}

.jer-editor-container input {
  border: var(--jer-form-border);
  border-radius: 0.3em;
  outline: none;
  font-family: inherit;
}

.jer-editor-container input:focus {
  border: var(--jer-form-border-focus);
}

/* Input highlighted text */
.jer-editor-container ::selection {
  background-color: var(--jer-highlight-color);
}

/* .jer-editor-container select {
  color: red;
} */

/* .jer-component {
} */

.jer-collection-header-row,
.jer-value-main-row {
  display: flex;
  min-height: 1.7em;
  gap: 0.3em;
  align-items: center;
}

.jer-collection-header-row {
  display: flex;
  flex-wrap: wrap;
}

/* .jer-brackets {
} */

/* .jer-bracket-outside {
} */

/* .jer-collection-item-count {
} */

.jer-collapse-icon {
  position: absolute;
  left: -1.2em;
  top: 0.35em;
}

.jer-collection-inner {
  position: relative;
}

.jer-collection-text-edit {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  align-items: flex-start;
}

.jer-collection-text-area {
  resize: both;
  padding-top: 0.2em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  padding-bottom: 0;
  overflow: hidden;
  max-height: 40em;
  font-family: inherit;
  font-size: 0.85em;
}

.jer-collection-input-button-row {
  display: flex;
  justify-content: flex-end;
  font-size: 150%;
  margin-top: 0.4em;
}

/* .jer-collection-element {
} */

.jer-collection-error-row {
  position: absolute;
  bottom: 0.5em;
}

/* .jer-collection-error-row-edit {
} */

.jer-error-slug {
  margin-left: 1em;
}

.jer-value-component {
  position: relative;
}

.jer-value-main-row {
  display: flex;
  gap: 0;
}

.jer-value-and-buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 0.5em;
}

.jer-value-error-row {
  position: absolute;
}

.jer-value-string {
  line-height: 1.3em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.jer-hyperlink {
  text-decoration: underline;
}

.jer-input-text {
  resize: none;
  margin: 0;
  height: 1.4em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  padding-top: 0.25em;
  padding-bottom: 0.2em;
  min-width: 6em;
  overflow: hidden;
  line-height: 1.2em;
  font-family: inherit;
  font-size: 0.9em;
}

/* .jer-value-number {
} */

/* .jer-value-boolean {
} */

.jer-input-boolean {
  transform: scale(1.5);
  margin-left: 0.3em;
  margin-right: 0.3em;
}

/* .jer-value-null {
} */

.jer-value-object {
}

.jer-key-text {
  word-break: break-word;
  line-height: 1.1em;
  white-space: pre-wrap;
}

.jer-key-edit {
  padding: 0 0.3em;
  font-size: inherit;
  font-size: 0.9em;
}

/* .jer-value-array {
} */

.jer-value-invalid {
  opacity: 0.5;
  font-style: italic;
}

.jer-input-number {
  min-width: 3em;
  font-size: 90%;
}

/* .jer-input-component {
} */

.jer-edit-buttons,
.jer-confirm-buttons {
  display: flex;
  align-items: center;
  cursor: pointer;
  height: 1em;
}

.jer-input-buttons {
  gap: 0.4em;
}

.jer-edit-buttons {
  gap: 0.4em;
  margin-left: 0.5em;
  opacity: 0;
}

.jer-confirm-buttons {
  gap: 0.2em;
  margin-left: 0.4em;
}

.jer-edit-buttons:hover {
  opacity: 1;
  position: relative;
}

.jer-collection-header-row:hover > .jer-edit-buttons {
  opacity: 1;
}

.jer-value-main-row:hover > .jer-edit-buttons {
  opacity: 1;
}

.jer-value-and-buttons:hover > .jer-edit-buttons {
  opacity: 1;
}

/* .jer-input-buttons {
} */

.jer-copy-pulse {
  position: relative;
  transition: transform var(--jer-expand-transition-time);
}

.jer-copy-pulse:hover {
  opacity: 0.85;
  transition: 0.3s;
  transform: scale(1.2);
}

.jer-copy-pulse:after {
  content: '';
  display: block;
  position: absolute;
  border-radius: 50%;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: all 0.5s;
  box-shadow: 0 0 15px 5px var(--jer-icon-copy-color);
}

.jer-copy-pulse:active:after {
  box-shadow: 0 0 0 0 var(--jer-icon-copy-color);
  position: absolute;
  border-radius: 4em;
  left: 0;
  top: 0;
  opacity: 1;
  transition: 0s;
}

.jer-copy-pulse:active {
  top: 0.07em;
}

.jer-rotate-90 {
  transform: rotate(-90deg);
  transition: transform var(--jer-expand-transition-time);
}

.jer-accordion-icon {
  /* font-size: '2em'; */
  transition: transform var(--jer-expand-transition-time);
}

.jer-icon:hover {
  opacity: 0.85;
  transition: 0.3s;
  transform: scale(1.2);
}

/* For displaying keys that are purely <empty string> "" */
.jer-empty-string::after {
  content: '<empty string>';
  font-style: italic;
  font-size: 90%;
}

.jer-drag-n-drop-padding {
  height: 0.5em;
  border: 1px dashed #e0e0e0;
  border-radius: 0.3em;
}
`,{});const Th=({className:e,name:t,value:r,setValue:n,handleKeyPress:i,styles:a})=>{if(typeof r!="string")return null;const s=r.slice(-1)===`
`?r+".":r;return f.jsxs("div",{style:{display:"grid"},children:[f.jsx("textarea",{id:`${t}_textarea`,style:Object.assign({height:"auto",gridArea:"1 / 1 / 2 / 2",overflowY:"auto",whiteSpace:"pre-wrap"},a),rows:1,className:e,name:`${t}_textarea`,value:r,onChange:o=>n(o.target.value),autoFocus:!0,onFocus:o=>{r.length<40&&o.target.select()},onKeyDown:i}),f.jsx("span",{className:e,style:Object.assign({visibility:"hidden",height:"auto",gridArea:"1 / 1 / 2 / 2",color:"red",opacity:.9,whiteSpace:"pre-wrap",overflowY:"auto",border:"1px solid transparent"},a),children:s})]})},Sh={default:{displayName:"Default",fragments:{edit:"rgb(42, 161, 152)"},styles:{container:{backgroundColor:"#f6f6f6",fontFamily:"monospace"},collection:{},collectionInner:{},collectionElement:{},dropZone:{},property:"#292929",bracket:{color:"rgb(0, 43, 54)",fontWeight:"bold"},itemCount:{color:"rgba(0, 0, 0, 0.3)",fontStyle:"italic"},string:"rgb(203, 75, 22)",number:"rgb(38, 139, 210)",boolean:"green",null:{color:"rgb(220, 50, 47)",fontVariant:"small-caps",fontWeight:"bold"},input:["#292929"],inputHighlight:"#b3d8ff",error:{fontSize:"0.8em",color:"red",fontWeight:"bold"},iconCollection:"rgb(0, 43, 54)",iconEdit:"edit",iconDelete:"rgb(203, 75, 22)",iconAdd:"edit",iconCopy:"rgb(38, 139, 210)",iconOk:"green",iconCancel:"rgb(203, 75, 22)"}},githubDark:{displayName:"Github Dark",styles:{container:{backgroundColor:"#0d1117",color:"white"},dropZone:"rgba(165, 214, 255, 0.17)",property:"#E6EDF3",bracket:"#56d364",itemCount:"#8B949E",string:"#A5D6FF",number:"#D2A8FF",boolean:{color:"#FF7B72",fontSize:"90%",fontWeight:"bold"},null:"green",iconCollection:"#D2A8FF",iconEdit:"#D2A8FF",iconDelete:"rgb(203, 75, 22)",iconAdd:"rgb(203, 75, 22)",iconCopy:"#A5D6FF",iconOk:"#56d364",iconCancel:"rgb(203, 75, 22)"}},githubLight:{displayName:"Github Light",styles:{container:"white",property:"#1F2328",bracket:"#00802e",itemCount:"#8B949E",string:"#0A3069",number:"#953800",boolean:{color:"#CF222E",fontSize:"90%",fontWeight:"bold"},null:"#FF7B72",iconCollection:"#8250DF",iconEdit:"#8250DF",iconDelete:"rgb(203, 75, 22)",iconAdd:"#8250DF",iconCopy:"#57606A"}},monoDark:{displayName:"Black & White",fragments:{lightText:{color:"white"},midGrey:"#5c5c5c"},styles:{container:["lightText",{backgroundColor:"black"}],dropZone:"#e0e0e029",property:"lightText",bracket:"midGrey",itemCount:"#4a4a4a",string:"#a8a8a8",number:"#666666",boolean:{color:"#848484",fontStyle:"italic"},null:"#333333",iconCollection:"midGrey",iconEdit:"midGrey",iconDelete:"midGrey",iconAdd:"midGrey",iconCopy:"midGrey",iconOk:"midGrey",iconCancel:"midGrey"}},monoLight:{fragments:{midGrey:"#a3a3a3"},displayName:"White & Black",styles:{container:"white",property:"black",bracket:"midGrey",itemCount:"#b5b5b5",string:"#575757",number:"#999999",boolean:{color:"#7b7b7b",fontStyle:"italic"},null:"#cccccc",iconCollection:"midGrey",iconEdit:"midGrey",iconDelete:"midGrey",iconAdd:"midGrey",iconCopy:"midGrey",iconOk:"midGrey",iconCancel:"midGrey"}},candyWrapper:{displayName:"Candy Wrapper",fragments:{minty:{backgroundColor:"#F1FAEE"},pale:{color:"#A8DADC"},mid:{color:"#457B9D"},dark:{color:"#1D3557"},pop:{color:"#E63946"},darkBlue:{color:"#2B2D42"}},styles:{container:"minty",property:"pop",dropZone:"#eb121217",bracket:"dark",itemCount:"pale",string:"mid",number:["darkBlue",{fontSize:"85%"}],boolean:["mid",{fontStyle:"italic",fontWeight:"bold",fontSize:"80%"}],null:["#cccccc",{fontWeight:"bold"}],input:{border:"1px solid rgb(115, 194, 198)"},iconCollection:"#1D3557",iconEdit:"#457B9D",iconDelete:"#E63946",iconAdd:"#2B2D42",iconCopy:"#1D3557",iconCancel:"#E63946"}},psychedelic:{displayName:"Psychedelic",fragments:{minty:{backgroundColor:"#F1FAEE"},pale:{color:"#A8DADC"},mid:{color:"#457B9D"},dark:{color:"#1D3557"},pop:{color:"#E63946"},fluroYellow:"rgb(242, 228, 21)",fluroGreen:"rgb(68, 255, 62)",hotPink:"#f7379a"},styles:{container:{backgroundColor:"unset",background:"linear-gradient(90deg, hsla(333, 100%, 53%, 1) 0%, hsla(33, 94%, 57%, 1) 100%)",color:"black"},dropZone:"fluroYellow",property:"black",bracket:"fluroYellow",itemCount:["pale",{opacity:.7}],string:"white",number:["#33d9ff",{fontSize:"90%",fontWeight:"bold"}],boolean:["fluroGreen",{fontWeight:"bold",fontSize:"80%"}],null:["black",{fontWeight:"bold",opacity:.3,backgroundColor:"rgb(255, 255, 255, 0.5)",padding:"0 0.4em",borderRadius:"0.4em"}],iconCollection:"fluroYellow",iconEdit:["black"],iconDelete:["white",{opacity:.5}],iconAdd:["white",{opacity:.5}],iconCopy:"rgb(32, 84, 242)",iconOk:"fluroGreen",iconCancel:"hotPink"}}},iy={container:{},collection:{},collectionInner:{},collectionElement:{},dropZone:{},property:{},bracket:{},itemCount:{},string:{},number:{},boolean:{},null:{},input:{},inputHighlight:{},error:{},iconCollection:{},iconEdit:{},iconDelete:{},iconAdd:{},iconCopy:{},iconOk:{},iconCancel:{}},ay=Sh.default,Fh=de.createContext({getStyles:()=>({}),setTheme:e=>{},icons:{},setIcons:()=>{}}),sy=({children:e})=>{const[t,r]=de.useState(iy),[n,i]=de.useState({});return f.jsx(Fh.Provider,{value:{getStyles:(a,s)=>typeof t[a]=="function"?t[a](s):t[a],setTheme:a=>{const s=oy(a);r(s)},icons:n,setIcons:i},children:e})},yn=()=>de.useContext(Fh),oy=e=>{var t,r,n,i;const a={},s=(Array.isArray(e)?e:[e]).map(l=>e==="default"?{}:typeof l=="string"?ys(Sh[l],a):ly(l)?ys({fragments:{},styles:l},a):ys(l,a)),o=ys(ay,{});Object.keys(o).forEach(l=>{const u=l;s.forEach(m=>{m[u]&&(o[u]=Object.assign(Object.assign({},o[u]),m[u]))})});const c=Object.assign({},o);return Object.entries(a).forEach(([l,u])=>{const m=l;c[m]=d=>{const g=u(d)||{};return Object.assign(Object.assign({},o[m]),g)}}),typeof(c==null?void 0:c.inputHighlight)!="function"&&(!((t=c==null?void 0:c.inputHighlight)===null||t===void 0)&&t.backgroundColor)&&document.documentElement.style.setProperty("--jer-highlight-color",(r=c==null?void 0:c.inputHighlight)===null||r===void 0?void 0:r.backgroundColor),typeof(c==null?void 0:c.iconCopy)!="function"&&(!((n=c==null?void 0:c.iconCopy)===null||n===void 0)&&n.color)&&document.documentElement.style.setProperty("--jer-icon-copy-color",(i=c==null?void 0:c.iconCopy)===null||i===void 0?void 0:i.color),c},ys=(e,t)=>{const{fragments:r,styles:n}=e,i={};return Object.entries(n).forEach(([a,s])=>{const o=(Array.isArray(s)?s:[s]).reduce((c,l)=>{var u;if(typeof l=="function")return t[a]=l,Object.assign({},c);if(typeof l=="string"){const m=(u=r==null?void 0:r[l])!==null&&u!==void 0?u:l;return typeof m=="string"?Object.assign(Object.assign({},c),{[cy[a]]:m}):Object.assign(Object.assign({},c),m)}return Object.assign(Object.assign({},c),l)},{});i[a]=o}),i},ly=e=>!("styles"in e),cy={container:"backgroundColor",collection:"backgroundColor",collectionInner:"backgroundColor",collectionElement:"backgroundColor",dropZone:"borderColor",property:"color",bracket:"color",itemCount:"color",string:"color",number:"color",boolean:"color",null:"color",input:"color",inputHighlight:"backgroundColor",error:"color",iconCollection:"color",iconEdit:"color",iconDelete:"color",iconAdd:"color",iconCopy:"color",iconOk:"color",iconCancel:"color"},uy=(e,t=200,r)=>typeof e=="string"?e.length<t?e:r?r(e):`${e.slice(0,t-2).trim()}...`:e,ss=e=>e.map(t=>t===""?"\0":t).join("."),fy=({value:e,setValue:t,isEditing:r,path:n,setIsEditing:i,handleEdit:a,handleCancel:s,stringTruncate:o,showStringQuotes:c,nodeData:l,stringFormat:u})=>{const{getStyles:m}=yn(),d=ss(n),g=c?'"':"";return r?f.jsx(Th,{className:"jer-input-text",name:d,value:e,setValue:t,isEditing:r,handleKeyPress:v=>{v.key!=="Enter"||v.shiftKey?v.key==="Escape"&&s():a()},styles:m("input",l)}):f.jsxs("div",{id:`${d}_display`,onDoubleClick:()=>i(!0),onClick:v=>{(v.getModifierState("Control")||v.getModifierState("Meta"))&&i(!0)},className:"jer-value-string",style:m("string",l),children:[g,uy(e,o,u),g]})},hy=({value:e,setValue:t,isEditing:r,path:n,setIsEditing:i,handleEdit:a,handleCancel:s,nodeData:o})=>{const{getStyles:c}=yn();return r?f.jsx("input",{className:"jer-input-number",type:"text",name:ss(n),value:e,onChange:l=>t(l.target.value.replace(/[^0-9.-]/g,"")),autoFocus:!0,onFocus:l=>l.target.select(),onKeyDown:l=>{switch(l.key){case"Enter":a();break;case"Escape":s();break;case"ArrowUp":l.preventDefault(),t(Number(e)+1);break;case"ArrowDown":l.preventDefault(),t(Number(e)-1)}},style:Object.assign({width:String(e).length/1.5+2+"em"},c("input",o))}):f.jsx("span",{onDoubleClick:()=>i(!0),className:"jer-value-number",style:c("number",o),children:e})},dy=({value:e,setValue:t,isEditing:r,path:n,setIsEditing:i,handleEdit:a,handleCancel:s,nodeData:o})=>{const{getStyles:c}=yn();de.useEffect(()=>(r&&document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)),[r,a]);const l=u=>{u.key==="Enter"?a():u.key==="Escape"&&s()};return r?f.jsx("input",{className:"jer-input-boolean",type:"checkbox",name:ss(n),checked:e,onChange:()=>t(!e)}):f.jsx("span",{onDoubleClick:()=>i(!0),className:"jer-value-boolean",style:c("boolean",o),children:String(e)})},py=({value:e,isEditing:t,setIsEditing:r,handleEdit:n,handleCancel:i,nodeData:a})=>{const{getStyles:s}=yn();de.useEffect(()=>(t&&document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)),[t]);const o=c=>{c.key==="Enter"?n():c.key==="Escape"&&i()};return f.jsx("div",{onDoubleClick:()=>r(!0),className:"jer-value-null",style:s("null",a),children:String(e)})},my=({value:e,translate:t,isEditing:r,handleEdit:n,handleCancel:i,nodeData:a})=>{de.useEffect(()=>(r&&document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)),[]);const s=o=>{o.key==="Enter"?n():o.key==="Escape"&&i()};return f.jsx("span",{className:"jer-value-object",children:`{${t("DEFAULT_NEW_KEY",a)}: "${String(e)}" }`})},gy=({value:e,isEditing:t,handleEdit:r,handleCancel:n})=>{de.useEffect(()=>(t&&document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)),[]);const i=a=>{a.key==="Enter"?r():a.key==="Escape"&&n()};return f.jsx("span",{className:"jer-value-array",children:`[${e===null?"":String(e)}]`})},xy=({value:e})=>{let t="Error!";switch(typeof e){case"string":e==="**INVALID_FUNCTION**"&&(t="Function");break;case"undefined":t="Undefined";break;case"symbol":t="Symbol"}return f.jsx("span",{className:"jer-value-invalid",children:t})},vy=({size:e,style:t,className:r})=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:e,height:e,className:r,style:t,children:[f.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4z"}),f.jsx("path",{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z"})]}),_y=({size:e,style:t,className:r})=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:e,height:e,className:r,style:t,transform:"translate(0, 0.5)",children:[f.jsx("path",{d:"M7 17.013l4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z"}),f.jsx("path",{d:"M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z"})]}),Ey=({size:e,style:t,className:r})=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:e,height:e,className:r,style:t,children:f.jsx("path",{d:"M6 19a2 2 0 002 2h8a2 2 0 002-2V7H6v12m2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12M15.5 4l-1-1h-5l-1 1H5v2h14V4h-3.5z"})}),wy=({size:e,style:t,className:r})=>f.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:e,height:e,className:r,style:t,children:[f.jsx("path",{d:"M9 2 H15 A1 1 0 0 1 16 3 V5 A1 1 0 0 1 15 6 H9 A1 1 0 0 1 8 5 V3 A1 1 0 0 1 9 2 z"}),f.jsx("path",{d:"M8 4H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2v-2M16 4h2a2 2 0 012 2v4M21 14H11"}),f.jsx("path",{d:"M15 10l-4 4 4 4"})]}),yy=({size:e,style:t,className:r})=>f.jsxs("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:e,height:e,className:r,style:t,children:[f.jsx("path",{d:"M22 11.08V12a10 10 0 11-5.93-9.14"}),f.jsx("path",{d:"M22 4L12 14.01l-3-3"})]}),Dy=({size:e,style:t,className:r})=>f.jsx("svg",{baseProfile:"tiny",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:e,className:r,style:t,children:f.jsx("path",{d:"M12 4c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8zm-5 8c0-.832.224-1.604.584-2.295l6.711 6.711A4.943 4.943 0 0112 17c-2.757 0-5-2.243-5-5zm9.416 2.295L9.705 7.584A4.943 4.943 0 0112 7c2.757 0 5 2.243 5 5 0 .832-.224 1.604-.584 2.295z"})}),Ay=({size:e,style:t,className:r})=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",width:e,height:e,className:r,style:t,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}),yi=({name:e,nodeData:t,rotate:r})=>{var n,i,a,s,o,c;const{getStyles:l,icons:u}=yn(),m={size:"1.4em",className:"jer-icon"};switch(e){case"add":return(n=u==null?void 0:u.add)!==null&&n!==void 0?n:f.jsx(vy,Object.assign({},m,{style:l("iconAdd",t)}));case"edit":return(i=u==null?void 0:u.edit)!==null&&i!==void 0?i:f.jsx(_y,Object.assign({},m,{style:l("iconEdit",t)}));case"delete":return(a=u==null?void 0:u.delete)!==null&&a!==void 0?a:f.jsx(Ey,Object.assign({},m,{style:l("iconDelete",t),size:"1.45em"}));case"copy":return f.jsx(wy,Object.assign({},m,{style:l("iconCopy",t),size:"1.2em"}));case"ok":return(s=u==null?void 0:u.ok)!==null&&s!==void 0?s:f.jsx(yy,Object.assign({},m,{style:Object.assign({fontSize:"90%"},l("iconOk",t))}));case"cancel":return(o=u==null?void 0:u.cancel)!==null&&o!==void 0?o:f.jsx(Dy,Object.assign({},m,{style:Object.assign({fontSize:"130%"},l("iconCancel",t))}));case"chevron":return(c=u==null?void 0:u.chevron)!==null&&c!==void 0?c:f.jsx(Ay,{className:"jer-accordion-icon"+(r?" jer-rotate-90":""),size:"1em",style:l("iconCollection",t)});default:return f.jsx(f.Fragment,{})}},bh=({startEdit:e,handleDelete:t,handleAdd:r,enableClipboard:n,type:i,nodeData:a,translate:s})=>{var o,c;const{getStyles:l,icons:u}=yn(),m=s("KEY_NEW",a),[d,g]=de.useState(!1),[v,p]=de.useState(m),{key:_,path:E,value:D}=a;return de.useEffect(()=>{d||p(m)},[d]),f.jsxs("div",{className:"jer-edit-buttons",style:{opacity:d?1:void 0},children:[n&&((c=(o=u==null?void 0:u.copy)===null||o===void 0?void 0:o.call(u,a,i))!==null&&c!==void 0?c:f.jsx("div",{onClick:A=>{let S,I="value",U="";n&&((A.ctrlKey||A.metaKey)===!0?(S=Cy(E),U=S,I="path"):(S=D,U=i?JSON.stringify(D,null,2):String(S)),navigator.clipboard.writeText(U)),typeof n=="function"&&n({value:S,stringValue:U,path:E,key:_,type:I})},className:"jer-copy-pulse",children:f.jsx(yi,{name:"copy",nodeData:a})})),e&&f.jsx("div",{onClick:e,children:f.jsx(yi,{name:"edit",nodeData:a})}),t&&f.jsx("div",{onClick:t,children:f.jsx(yi,{name:"delete",nodeData:a})}),r&&f.jsx("div",{onClick:()=>{i==="object"?g(!0):r("")},children:f.jsx(yi,{name:"add",nodeData:a})}),d&&r&&i==="object"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{className:"jer-input-new-key",type:"text",name:"new-object-key",value:v,onChange:A=>p(A.target.value),autoFocus:!0,onFocus:A=>A.target.select(),onKeyDown:A=>{A.key==="Enter"&&r?(g(!1),r(v)):A.key==="Escape"&&g(!1)},style:l("input",a)}),f.jsx(uc,{onOk:()=>{v&&(g(!1),r(v))},onCancel:()=>{g(!1)},nodeData:a})]})]})},uc=({onOk:e,onCancel:t,nodeData:r})=>f.jsxs("div",{className:"jer-confirm-buttons",children:[f.jsx("div",{onClick:e,children:f.jsx(yi,{name:"ok",nodeData:r})}),f.jsx("div",{onClick:t,children:f.jsx(yi,{name:"cancel",nodeData:r})})]}),Cy=e=>e.reduce((t,r)=>typeof r=="number"?`${t}[${r}]`:t===""?r:`${t}.${r}`,""),Ty=["string","number","boolean","null","object","array"],kh=(e=[],t)=>{const r=e.filter(({condition:v})=>v(t));if(r.length===0)return{};const n=r[0],{element:i,wrapperElement:a,customNodeProps:s,wrapperProps:o,hideKey:c=!1,showEditTools:l=!0,showOnEdit:u=!1,showOnView:m=!0,showCollectionWrapper:d=!0}=n,g=function(v,p){var _={};for(var E in v)Object.prototype.hasOwnProperty.call(v,E)&&p.indexOf(E)<0&&(_[E]=v[E]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var D=0;for(E=Object.getOwnPropertySymbols(v);D<E.length;D++)p.indexOf(E[D])<0&&Object.prototype.propertyIsEnumerable.call(v,E[D])&&(_[E[D]]=v[E[D]])}return _}(n,["element","wrapperElement","customNodeProps","wrapperProps","hideKey","showEditTools","showOnEdit","showOnView","showCollectionWrapper"]);return Object.assign({CustomNode:i,CustomWrapper:a,customNodeProps:s,wrapperProps:o,hideKey:c,showEditTools:l,showOnEdit:u,showOnView:m,showCollectionWrapper:d},g)},co=e=>e!==null&&typeof e=="object",Nh=(e,t,r,n="")=>{if(!r&&!n)return!0;switch(e){case"collection":if(r){if(r(t,n))return!0;if(!wl(n,t,r))return!1}if(!r&&n&&!wl(n,t))return!1;break;case"value":if(r&&!r(t,n)||!r&&n&&!ca(t,n))return!1}return!0},wl=(e="",t,r=ca)=>{const n=t.value;return Object.entries(n).some(([i,a])=>{const s=[...t.path,i],o=Object.assign(Object.assign({},t),{key:i,path:s,level:t.level+1,value:a,size:s.length,parentData:n});return co(a)?wl(e,o,r):r(o,e)})},ca=(e,t="")=>{const{value:r}=e;if(r===null&&"null".includes(t.toLowerCase()))return!0;switch(typeof r){case"string":return r.toLowerCase().includes(t.toLowerCase());case"number":return!!String(r).includes(t);case"boolean":return r?"true".includes(t.toLowerCase())||t==="1":"false".includes(t.toLowerCase())||t==="0";default:return!1}},Uu=({key:e,path:t},r="")=>!!ca({value:e},r)||!!t.some(n=>ca({value:n},r)),Ih=de.createContext({collapseState:null,setCollapseState:()=>{},doesPathMatch:()=>!1,currentlyEditingElement:null,setCurrentlyEditingElement:()=>{},areChildrenBeingEdited:()=>!1,dragSource:{path:null,pathString:null},setDragSource:()=>{}}),Sy=({children:e})=>{const[t,r]=de.useState(null),[n,i]=de.useState(null),[a,s]=de.useState({path:null,pathString:null});return f.jsx(Ih.Provider,{value:{collapseState:t,setCollapseState:r,doesPathMatch:o=>{if(t===null)return!1;for(const[c,l]of t.path.entries())if(l!==o[c])return!1;return!0},currentlyEditingElement:n,setCurrentlyEditingElement:i,areChildrenBeingEdited:o=>n!==null&&n.includes(o),dragSource:a,setDragSource:s},children:e})},os=()=>de.useContext(Ih),Oh=({canDrag:e,canDragOnto:t,path:r,nodeData:n,onMove:i,onError:a,translate:s})=>{const{getStyles:o}=yn(),{dragSource:c,setDragSource:l}=os(),[u,m]=de.useState(!1),d=ss(r),g=de.useMemo(()=>e?{onDragStart:E=>{E.stopPropagation(),l({path:r,pathString:d})},onDragEnd:E=>{E.stopPropagation(),l({path:null,pathString:null})}}:{},[e]),v=de.useMemo(()=>E=>t?{onDragOver:D=>{D.stopPropagation(),D.preventDefault()},onDrop:D=>{D.stopPropagation(),_(E),l({path:null,pathString:null}),m(!1)},onDragEnter:D=>{var A;D.stopPropagation(),d.startsWith((A=c.pathString)!==null&&A!==void 0?A:"")||m(E)},onDragExit:D=>{D.stopPropagation(),m(!1)}}:{},[c,t]),p=de.useMemo(()=>t&&c.pathString!==null?f.jsx("div",Object.assign({className:"jer-drop-target-bottom",style:{height:"50%",position:"absolute",width:"100%",top:"50%",zIndex:r.length}},v("below"))):null,[c,t]),_=E=>{var D,A;const S=(D=c.path)===null||D===void 0?void 0:D.slice(-1)[0],I=(A=c.path)===null||A===void 0?void 0:A.slice(0,-1).join("."),U=r.slice(0,-1).join(""),{parentData:R}=n;typeof S=="string"&&R&&!Array.isArray(R)&&Object.keys(R).includes(S)&&S in R&&I!==U?a({code:"KEY_EXISTS",message:s("ERROR_KEY_EXISTS",n)},S):i(c.path,r,E).then(Y=>{Y&&a({code:"UPDATE_ERROR",message:Y},n.value)})};return{dragSourceProps:g,getDropTargetProps:v,BottomDropTarget:p,DropTargetPadding:({position:E,nodeData:D})=>u===E?f.jsx("div",{className:"jer-drag-n-drop-padding",style:o("dropZone",D)}):null,handleDrop:_}},Bh=({props:e,collapsed:t})=>{const{data:r,nodeData:n,parentData:i,onEdit:a,onError:s,showErrorMessages:o,restrictEditFilter:c,restrictDeleteFilter:l,restrictAddFilter:u,restrictDragFilter:m,translate:d}=e,{currentlyEditingElement:g,setCurrentlyEditingElement:v}=os(),[p,_]=de.useState(null),E=Object.assign(Object.assign({},n),{collapsed:t}),{path:D,key:A,size:S}=E,I=ss(D),U=de.useMemo(()=>!c(E),[E]),R=de.useMemo(()=>!l(E),[E]),Y=de.useMemo(()=>!u(E),[E]),W=de.useMemo(()=>!m(E)&&R&&g===null,[E]),Z=V=>{o&&(_(V),setTimeout(()=>_(null),2500)),console.warn("Error",V)},N=de.useMemo(()=>(V,q)=>{Z(V.message),s&&s({currentData:E.fullData,errorValue:q,currentValue:r,name:A,path:D,error:V})},[s,o]),M=g===I,G=g===`key_${I}`,b=typeof D.slice(-1)[0]=="number";return{pathString:I,nodeData:E,path:D,name:A,size:S,canEdit:U,canDelete:R,canAdd:Y,canDrag:W,error:p,showError:Z,onError:N,setError:_,handleEditKey:V=>{if(v(null),A===V||!i)return;const q=D.slice(0,-1);if(Object.keys(i).includes(V))return void N({code:"KEY_EXISTS",message:d("ERROR_KEY_EXISTS",E)},V);const re=Object.fromEntries(Object.entries(i).map(([le,pe])=>le===A?[V,pe]:[le,pe]));a(re,q).then(le=>{le&&N({code:"UPDATE_ERROR",message:le},V)})},derivedValues:{isEditing:M,isEditingKey:G,isArray:b,canEditKey:i!==null&&U&&Y&&R&&!b}}},Ph=e=>{const{data:t,parentData:r,onEdit:n,onDelete:i,onChange:a,onMove:s,enableClipboard:o,canDragOnto:c,restrictTypeSelection:l,searchFilter:u,searchText:m,showLabel:d,stringTruncate:g,showStringQuotes:v,indent:p,stringFormat:_,translate:E,customNodeDefinitions:D}=e,{getStyles:A}=yn(),{setCurrentlyEditingElement:S,setCollapseState:I}=os(),[U,R]=de.useState(typeof t=="function"?"**INVALID_FUNCTION**":t),{pathString:Y,nodeData:W,path:Z,name:N,canEdit:M,canDelete:G,canDrag:b,error:V,onError:q,handleEditKey:re,derivedValues:le}=Bh({props:e}),{dragSourceProps:pe,getDropTargetProps:Ce,BottomDropTarget:Te,DropTargetPadding:O}=Oh({canDrag:b,canDragOnto:c,path:Z,nodeData:W,onMove:s,onError:q,translate:E}),K=kh(D,W),[z,X]=de.useState(Ds(t,K)),ee=de.useCallback(Be=>{if(!a)return void R(Be);const Ze=a({currentData:W.fullData,newValue:Be,currentValue:U,name:N,path:Z});R(Ze)},[a]);de.useEffect(()=>{R(typeof t=="function"?"**INVALID_FUNCTION**":t),X(Ds(t,K))},[t,V]);const{CustomNode:ye,customNodeProps:xe,hideKey:me,showEditTools:se=!0,showOnEdit:be,showOnView:Le}=K,Ye=[...Ty,...D.filter(({showInTypesSelector:Be=!1,name:Ze})=>Be&&!!Ze).map(({name:Be})=>Be)],We=de.useMemo(()=>{if(typeof l=="boolean")return l?[]:Ye;if(Array.isArray(l))return l;const Be=l(W);return typeof Be=="boolean"?Be?[]:Ye:Be},[W,l]);if(!Nh("value",W,u,m))return null;const ft=()=>{let Be;switch(S(null),z){case"object":Be={[E("DEFAULT_NEW_KEY",W)]:U};break;case"array":Be=U??[];break;case"number":{const Ze=Number(U);Be=isNaN(Ze)?0:Ze;break}default:Be=U}n(Be,Z).then(Ze=>{Ze&&q({code:"UPDATE_ERROR",message:Ze},Be)})},He=()=>{S(null),R(t),X(Ds(t,K))},{isEditing:_e,isEditingKey:Fe,canEditKey:Pe}=le,ge=!_e&&V,Oe=_e&&We.length>0,Qe=z!=="invalid"&&!V&&se,dt=d&&Fe,st=d&&!Fe&&!me,je={value:U,parentData:r,setValue:ee,isEditing:_e,stringFormat:_,setIsEditing:M?()=>S(Y):()=>{},handleEdit:ft,handleCancel:He,path:Z,stringTruncate:g,showStringQuotes:v,nodeData:W,translate:E},Nt=ye&&(_e&&be||!_e&&Le)?f.jsx(ye,Object.assign({},e,{value:U,customNodeProps:xe,setValue:ee,handleEdit:ft,handleCancel:He,handleKeyPress:Be=>{Be.key==="Enter"?ft():Be.key==="Escape"&&He()},isEditing:_e,setIsEditing:()=>S(Y),getStyles:A})):Fy(Ds(t),je);return f.jsxs("div",Object.assign({className:"jer-component jer-value-component",style:{marginLeft:p/2+"em",position:"relative"},draggable:b},pe,Ce("above"),{children:[Te,f.jsx(O,{position:"above",nodeData:W}),f.jsxs("div",{className:"jer-value-main-row",style:{flexWrap:N.length>10?"wrap":"nowrap"},children:[st&&f.jsxs("span",{className:"jer-key-text",style:Object.assign(Object.assign({},A("property",W)),{minWidth:`${Math.min(String(N).length+1,5)}ch`,flexShrink:N.length>10?1:0}),onDoubleClick:()=>Pe&&S(`key_${Y}`),children:[N===""?f.jsx("span",{className:"jer-empty-string"}):N,":"]}),dt&&f.jsx("input",{className:"jer-input-text jer-key-edit",type:"text",name:Y,defaultValue:N,autoFocus:!0,onFocus:Be=>Be.target.select(),onKeyDown:Be=>{Be.key==="Enter"?re(Be.target.value):Be.key==="Escape"&&He()},style:{width:String(N).length/1.5+.5+"em"}}),f.jsxs("div",{className:"jer-value-and-buttons",children:[f.jsx("div",{className:"jer-input-component",children:Nt}),_e?f.jsx(uc,{onOk:ft,onCancel:He,nodeData:W}):Qe&&f.jsx(bh,{startEdit:M?()=>S(Y):void 0,handleDelete:G?()=>{i(U,Z).then(Be=>{Be&&q({code:"DELETE_ERROR",message:Be},U)})}:void 0,enableClipboard:o,translate:E,nodeData:W}),Oe&&f.jsxs("div",{className:"jer-select",children:[f.jsx("select",{name:`${N}-type-select`,className:"jer-type-select",onChange:Be=>(Ze=>{const Ft=D.find(pt=>pt.name===Ze);if(Ft)n(Ft.defaultValue,Z),X(Ze);else{const pt=by(U,Ze,E("DEFAULT_NEW_KEY",W),K!=null&&K.CustomNode?E("DEFAULT_STRING",W):void 0);ee(pt),n(pt,Z).then(zt=>{zt&&(q({code:"UPDATE_ERROR",message:zt},pt),S(null))}),I({path:Z,collapsed:!1}),X(Ze)}})(Be.target.value),value:z,children:We.map(Be=>f.jsx("option",{value:Be,children:Be},Be))}),f.jsx("span",{className:"focus"})]}),ge&&f.jsx("span",{className:"jer-error-slug",style:A("error",W),children:V})]})]}),f.jsx(O,{position:"below",nodeData:W})]}))},Ds=(e,t)=>t!=null&&t.CustomNode&&(t!=null&&t.name)&&t.showInTypesSelector?t.name:typeof e=="string"?"string":typeof e=="number"?"number":typeof e=="boolean"?"boolean":e===null?"null":"invalid",Fy=(e,t)=>{const r=t.value;switch(e){case"string":return f.jsx(fy,Object.assign({},t,{value:r}));case"number":return f.jsx(hy,Object.assign({},t,{value:r}));case"boolean":return f.jsx(dy,Object.assign({},t,{value:r}));case"null":return f.jsx(py,Object.assign({},t));case"object":return f.jsx(my,Object.assign({},t,{value:r}));case"array":return f.jsx(gy,Object.assign({},t));default:return f.jsx(xy,Object.assign({},t))}},by=(e,t,r,n)=>{switch(t){case"string":return n??String(e);case"number":{const i=Number(e);return isNaN(i)?0:i}case"boolean":return!!e;case"null":return null;case"object":return{[r]:e};case"array":return[e];default:return String(e)}},jh=e=>{const{getStyles:t}=yn(),{collapseState:r,setCollapseState:n,doesPathMatch:i,currentlyEditingElement:a,setCurrentlyEditingElement:s,areChildrenBeingEdited:o}=os(),{data:c,nodeData:l,parentData:u,showCollectionCount:m,onEdit:d,onAdd:g,onDelete:v,canDragOnto:p,collapseFilter:_,onMove:E,enableClipboard:D,searchFilter:A,searchText:S,indent:I,keySort:U,showArrayIndices:R,defaultValue:Y,translate:W,customNodeDefinitions:Z}=e,[N,M]=de.useState(JSON.stringify(c,null,2)),G=_(l),[b,V]=de.useState(G),{pathString:q,nodeData:re,path:le,name:pe,size:Ce,canEdit:Te,canDelete:O,canAdd:K,canDrag:z,error:X,setError:ee,onError:ye,handleEditKey:xe,derivedValues:me}=Bh({props:e,collapsed:b}),{dragSourceProps:se,getDropTargetProps:be,BottomDropTarget:Le,DropTargetPadding:Ye}=Oh({canDrag:z,canDragOnto:p,path:le,nodeData:re,onMove:E,onError:ye,translate:W}),We=de.useRef(!G),[ft,He]=de.useState(!1);de.useEffect(()=>{M(JSON.stringify(c,null,2))},[c]),de.useEffect(()=>{const Ge=_(re);We.current=!Ge,V(Ge)},[_]),de.useEffect(()=>{r!==null&&i(le)&&(We.current=!0,V(r.collapsed))},[r]);const _e=de.useMemo(()=>Ge=>typeof Y!="function"?Y:Y(Ge),[Y]),{CustomNode:Fe,customNodeProps:Pe,CustomWrapper:ge,wrapperProps:Oe={},hideKey:Qe,showEditTools:dt=!0,showOnEdit:st,showOnView:je,showCollectionWrapper:Nt=!0}=de.useMemo(()=>kh(Z,re),[]);if(!Nh("collection",re,A,S)&&re.level>0)return null;const Be=Array.isArray(c)?"array":"object",Ze=Be==="array"?{open:"[",close:"]"}:{open:"{",close:"}"},Ft=getComputedStyle(document.documentElement).getPropertyValue("--jer-expand-transition-time"),pt=Ge=>{Ge.key==="Enter"&&(Ge.metaKey||Ge.shiftKey||Ge.ctrlKey)?zt():Ge.key==="Escape"&&$e()},zt=()=>{try{const Ge=ny.parse(N);if(s(null),ee(null),JSON.stringify(Ge)===JSON.stringify(c))return;d(Ge,le).then(bt=>{bt&&ye({code:"UPDATE_ERROR",message:bt},Ge)})}catch{ye({code:"INVALID_JSON",message:W("ERROR_INVALID_JSON",re)},N)}},It=le.length>0?()=>{v(c,le).then(Ge=>{Ge&&ye({code:"DELETE_ERROR",message:Ge},so(c,le))})}:void 0,$e=()=>{s(null),ee(null),M(JSON.stringify(c,null,2))},{isEditing:Zt,isEditingKey:y,isArray:nt,canEditKey:ui}=me,An=m==="when-closed"?b:m,Cn=!Zt&&dt,Tn=(R||!nt)&&!Qe&&pe!==void 0,Kn=Fe&&(Zt&&st||!Zt&&je),Yn=U&&Be==="object",Ur=Object.entries(c).map(([Ge,bt])=>[Be==="array"?Number(Ge):Ge,bt]);Yn&&Ur.sort(typeof U=="function"?(Ge,bt)=>U(Ge[0],bt[0]):void 0);const qn=JSON.stringify(c,null,2).replace(/\\n/g,`
`).split(`
`).length,Sn=We.current?Zt?f.jsx("div",{className:"jer-collection-text-edit",children:f.jsxs("div",{children:[f.jsx(Th,{className:"jer-collection-text-area",name:q,value:N,setValue:M,isEditing:Zt,handleKeyPress:pt,styles:t("input",re)}),f.jsx("div",{className:"jer-collection-input-button-row",children:f.jsx(uc,{onOk:zt,onCancel:$e,nodeData:re})})]})}):Ur.map(([Ge,bt],Dr)=>{const hn={key:Ge,value:bt,path:[...le,Ge],level:le.length+1,index:Dr,size:co(bt)?Object.keys(bt).length:1,parentData:c,fullData:re.fullData};return f.jsx("div",{className:"jer-collection-element",style:t("collectionElement",hn),children:co(bt)?f.jsx(jh,Object.assign({},e,{data:bt,parentData:c,nodeData:hn,showCollectionCount:m,canDragOnto:Te}),Ge):f.jsx(Ph,Object.assign({},e,{data:bt,parentData:c,nodeData:hn,canDragOnto:Te,showLabel:Be==="object"||R}),Ge)},Ge)}):null,qr=!!Nt&&b;qr||(We.current=!0);const Fn=Object.assign(Object.assign({},e),{data:c,value:c,parentData:u,nodeData:re,setValue:Ge=>Sa(void 0,void 0,void 0,function*(){return yield d(Ge,le)}),handleEdit:zt,handleCancel:$e,handleKeyPress:pt,isEditing:Zt,setIsEditing:()=>s(q),getStyles:t,canDragOnto:Te}),Jn=Kn?f.jsx(Fe,Object.assign({customNodeProps:Pe},Fn,{children:Sn})):Sn,bn=y?f.jsx("input",{className:"jer-input-text jer-key-edit",type:"text",name:q,defaultValue:pe,autoFocus:!0,onFocus:Ge=>Ge.target.select(),onKeyDown:Ge=>{Ge.key==="Enter"?xe(Ge.target.value):Ge.key==="Escape"&&$e()},style:{width:String(pe).length/1.5+.5+"em"}}):Tn&&f.jsx("span",{className:"jer-key-text",style:t("property",re),onDoubleClick:()=>ui&&s(`key_${q}`),children:pe===""?f.jsx("span",{className:le.length>0?"jer-empty-string":void 0}):`${pe}:`}),kn=Cn&&f.jsx(bh,{startEdit:Te?()=>{We.current=!0,s(q),V(!1)}:void 0,handleAdd:K?Ge=>{V(!1);const bt=_e(re);Be==="array"?g(bt,[...le,c.length]).then(Dr=>{Dr&&ye({code:"ADD_ERROR",message:Dr},bt)}):Ge in c?ye({code:"KEY_EXISTS",message:W("ERROR_KEY_EXISTS",re)},Ge):g(bt,[...le,Ge]).then(Dr=>{Dr&&ye({code:"ADD_ERROR",message:Dr},bt)})}:void 0,handleDelete:O?It:void 0,enableClipboard:D,type:Be,nodeData:re,translate:W}),Nn=f.jsxs("div",Object.assign({className:"jer-component jer-collection-component",style:Object.assign(Object.assign({marginLeft:(le.length===0?0:I/2)+"em"},t("collection",re)),{position:"relative"}),draggable:z},se,be("above"),{children:[!Zt&&Le,f.jsx(Ye,{position:"above",nodeData:re}),Nt?f.jsxs("div",{className:"jer-collection-header-row",style:{position:"relative"},children:[f.jsxs("div",{className:"jer-collection-name",children:[f.jsx("div",{className:"jer-collapse-icon",onClick:Ge=>(bt=>{if(bt.getModifierState("Alt"))return We.current=!0,void n({collapsed:!b,path:le});a&&a.includes(q)||(He(!0),We.current=!0,V(!b),setTimeout(()=>He(!1),500))})(Ge),children:f.jsx(yi,{name:"chevron",rotate:b,nodeData:re})}),bn,!Zt&&f.jsx("span",{className:"jer-brackets jer-bracket-open",style:t("bracket",re),children:Ze.open})]}),!Zt&&An&&f.jsx("div",{className:"jer-collection-item-count"+(An?" jer-visible":" jer-hidden"),style:t("itemCount",re),children:Ce===1?W("ITEM_SINGLE",Object.assign(Object.assign({},re),{size:1}),1):W("ITEMS_MULTIPLE",re,Ce)}),f.jsx("div",{className:"jer-brackets"+(qr?" jer-visible":" jer-hidden"),style:t("bracket",re),children:Ze.close}),kn]}):Qe?f.jsx(f.Fragment,{}):f.jsxs("div",{className:"jer-collection-header-row",style:{position:"relative"},children:[bn,kn]}),f.jsxs("div",{className:"jer-collection-inner",style:Object.assign({maxHeight:qr?0:o(q)?void 0:3*qn+"em",overflowY:qr||ft?"hidden":"visible",transition:`max-height ${Ft}`},t("collectionInner",re)),children:[Jn,f.jsx("div",{className:Zt?"jer-collection-error-row":"jer-collection-error-row-edit",children:X&&f.jsx("span",{className:"jer-error-slug",style:t("error",re),children:X})}),!Zt&&Nt&&f.jsx("div",{className:"jer-brackets jer-bracket-outside",style:t("bracket",re),children:Ze.close})]}),f.jsx(Ye,{position:"below",nodeData:re})]}));return ge?f.jsx(ge,Object.assign({customNodeProps:Oe},Fn,{children:Nn})):Nn},ky={ITEM_SINGLE:"{{count}} item",ITEMS_MULTIPLE:"{{count}} items",KEY_NEW:"Enter new key",ERROR_KEY_EXISTS:"Key already exists",ERROR_INVALID_JSON:"Invalid JSON",ERROR_UPDATE:"Update unsuccessful",ERROR_DELETE:"Delete unsuccessful",ERROR_ADD:"Adding node unsuccessful",DEFAULT_STRING:"New data!",DEFAULT_NEW_KEY:"key"},Ny=(e,t)=>(r,n,i)=>((a,s,o,c,l)=>{if(s[c]){const m=s[c](o);if(m!==null)return m}const u=c in a?a[c]:ky[c];return l===void 0?u:u==null?void 0:u.replace("{{count}}",String(l))})(e,t,n,r,i),Iy=({data:e,rootName:t="root",onUpdate:r=()=>{},onEdit:n=r,onDelete:i=r,onAdd:a=r,onChange:s,onError:o,showErrorMessages:c=!0,enableClipboard:l=!0,theme:u="default",icons:m,indent:d=3,collapse:g=!1,showCollectionCount:v=!0,restrictEdit:p=!1,restrictDelete:_=!1,restrictAdd:E=!1,restrictTypeSelection:D=!1,restrictDrag:A=!0,searchFilter:S,searchText:I,searchDebounceTime:U=350,keySort:R=!1,showArrayIndices:Y=!0,showStringQuotes:W=!0,defaultValue:Z=null,minWidth:N=250,maxWidth:M="min(600px, 90vw)",rootFontSize:G,stringTruncate:b=250,translations:V={},className:q,id:re,stringFormat:le,customText:pe={},customNodeDefinitions:Ce=[]})=>{const{getStyles:Te,setTheme:O,setIcons:K}=yn(),{setCollapseState:z}=os(),X=de.useCallback(wa(g),[g]),ee=de.useCallback(Ny(V,pe),[V,pe]),[ye,xe]=de.useState(I),[me,se]=de.useState(e);de.useEffect(()=>{u&&O(u),m&&K(m)},[u,m]),de.useEffect(()=>{z(null),se(e)},[e]),de.useEffect(()=>{const Pe=setTimeout(()=>xe(I),U);return()=>clearTimeout(Pe)},[I,U]);const be={key:t,path:[],level:0,index:0,value:me,size:Object.keys(me).length,parentData:null,fullData:me},Le=de.useMemo(()=>wa(p),[p]),Ye=de.useMemo(()=>wa(_),[_]),We=de.useMemo(()=>wa(E),[E]),ft=de.useMemo(()=>wa(A),[A]),He=de.useMemo(()=>By(S),[S]),_e={stringFormat:le,name:t,nodeData:be,onEdit:(Pe,ge)=>Sa(void 0,void 0,void 0,function*(){const{currentData:Oe,newData:Qe,currentValue:dt,newValue:st}=Ea(me,ge,Pe,"update");if(dt===st)return;const je=yield n({currentData:Oe,newData:Qe,currentValue:dt,newValue:st,name:ge.slice(-1)[0],path:ge});if(je!==void 0)return se(Oe),je===!1?ee("ERROR_UPDATE",be):je;se(Qe)}),onDelete:(Pe,ge)=>Sa(void 0,void 0,void 0,function*(){const{currentData:Oe,newData:Qe,currentValue:dt,newValue:st}=Ea(me,ge,Pe,"delete"),je=yield i({currentData:Oe,newData:Qe,currentValue:dt,newValue:st,name:ge.slice(-1)[0],path:ge});if(je!==void 0)return se(Oe),je===!1?ee("ERROR_UPDATE",be):je;se(Qe)}),onAdd:(Pe,ge)=>Sa(void 0,void 0,void 0,function*(){const{currentData:Oe,newData:Qe,currentValue:dt,newValue:st}=Ea(me,ge,Pe,"add"),je=yield a({currentData:Oe,newData:Qe,currentValue:dt,newValue:st,name:ge.slice(-1)[0],path:ge});if(je!==void 0)return se(Oe),je===!1?ee("ERROR_UPDATE",be):je;se(Qe)}),onChange:s,onError:o,showErrorMessages:c,onMove:(Pe,ge,Oe)=>Sa(void 0,void 0,void 0,function*(){if(Pe===null)return;const{currentData:Qe,newData:dt,currentValue:st}=Ea(me,Pe,"","delete"),je=Pe.slice(-1)[0],Nt=ge.slice(0,-1),Be=ge.slice(-1)[0];let Ze=typeof Be=="number"?Oe==="above"?Be:Be+1:typeof je=="number"?`arr_${je}`:je;Pe.slice(0,-1).join(".")===ge.slice(0,-1).join(".")&&typeof je=="number"&&typeof Ze=="number"&&je<Ze&&(Ze-=1);const Ft=typeof Ze=="number"?{insert:!0}:Oe==="above"?{insertBefore:Be}:{insertAfter:Be},{newData:pt,newValue:zt}=Ea(dt,[...Nt,Ze],st,"add",Ft),It=yield n({currentData:Qe,newData:pt,currentValue:st,newValue:zt,name:ge.slice(-1)[0],path:ge});if(It!==void 0)return se(Qe),It===!1?ee("ERROR_UPDATE",be):It;se(pt)}),showCollectionCount:v,collapseFilter:X,restrictEditFilter:Le,restrictDeleteFilter:Ye,restrictAddFilter:We,restrictTypeSelection:D,restrictDragFilter:ft,canDragOnto:!1,searchFilter:He,searchText:ye,enableClipboard:l,keySort:R,showArrayIndices:Y,showStringQuotes:W,indent:d,defaultValue:Z,stringTruncate:b,translate:ee,customNodeDefinitions:Ce,parentData:null},Fe=Object.assign(Object.assign({},Te("container",be)),{minWidth:N,maxWidth:M});return Fe.fontSize=G??Fe.fontSize,f.jsx("div",{id:re,className:"jer-editor-container "+q,style:Fe,children:co(me)?f.jsx(jh,Object.assign({data:me},_e)):f.jsx(Ph,Object.assign({data:me,showLabel:!0},_e))})},Oy=e=>f.jsx(sy,{children:f.jsx(Sy,{children:f.jsx(Iy,Object.assign({},e))})}),Ea=(e,t,r,n,i={})=>{if(t.length===0)return{currentData:e,newData:r,currentValue:e,newValue:r};const a=Object.assign({remove:n==="delete"},i),s=n!=="add"?so(e,t):void 0;return{currentData:e,newData:Ww(e,t,r,a),currentValue:s,newValue:n!=="delete"?r:void 0}},wa=e=>typeof e=="boolean"?()=>e:typeof e=="number"?({level:t})=>t>=e:e,By=e=>{if(e!==void 0)return e==="value"?ca:e==="key"?Uu:e==="all"?(t,r)=>ca(t,r)||Uu(t,r):e},Py="_tree_10ssa_1",jy="_jsonViewToolTip_10ssa_7",Rh={tree:Py,jsonViewToolTip:jy},Ry=({instruction:e,globalMapList:t,network:r,setLabel:n,fundFlow:i,invFlowInputValue:a,onHighLightAddress:s,removeAddressHighLight:o})=>{const{programId:c,instructionName:l,program:u="",argsMap:m}=e;let d=c;if(["spl-token","system"].includes(u))switch(l){case"mintTo":{d=m.mint;break}case"transfer":case"transferChecked":{const g=i==null?void 0:i.find(v=>v.id===e.id);d=(g==null?void 0:g._token)||m.authority;break}}return f.jsxs(f.Fragment,{children:[ht({network:r,value:d,type:"account",mapList:t,callback:n,removeAddressHighLight:o,onHighLightAddress:s}),l?f.jsxs("div",{className:"text-[#FF7B72]",children:[".",ht({value:l,mapList:t,callback:n,type:"selector",filterInputValue:a,onHighLightAddress:s,removeAddressHighLight:o,network:r})]}):null]})},Ly=(e,t)=>{if(!e)return null;const r=Object.keys(e);return r.length?f.jsxs("div",{className:"flex items-center",children:["({",r.map((n,i)=>f.jsx(lr,{trigger:["click"],title:f.jsx(Oy,{data:e,rootName:"",stringTruncate:30,stringFormat:a=>zs(a),theme:t==="light"?"default":"githubDark",showArrayIndices:!1,restrictEdit:!0,restrictDelete:!0,restrictAdd:!0,showCollectionCount:!1,icons:{copy:(a,s)=>{const o=s?JSON.stringify(a.value,null,2):String(a.value);return f.jsx(Jt,{text:o,size:20})}}}),arrow:!1,overlayStyle:{minWidth:"424px",maxWidth:"fit-content"},rootClassName:Rh.jsonViewToolTip,children:f.jsxs("div",{children:[f.jsxs("span",{children:['"',n,'"']}),f.jsx("span",{className:"pr-1",children:":"}),f.jsx("span",{children:JSON.stringify(e[n])}),i<r.length-1?f.jsx("span",{className:"pr-1",children:","}):""]},n)})),"} )"]}):null},My=()=>{const{network:e=""}=Nr(),{mode:t="light"}=de.useContext($n),[r,n]=Kr(),i=yr(),{solanaTrace:a,globalMapList:s,setExpandLevelOpts:o,autoExpandParent:c,setAutoExpandParent:l,setExpandedKeys:u,expandedKeys:m,invFlowInputValue:d,setLabel:g,expandLevel:v,solanaProfileData:p,defaultExpandLevels:_,onHighLightAddress:E,removeAddressHighLight:D,hoverHighLightAddress:A}=i,S=de.useRef(null),U=r.get("line")??Lt,R=N=>{var G;if(N.stopPropagation(),["svg","path","polygon","text"].includes((G=N.target)==null?void 0:G.nodeName))return;["ant-tree-list-holder-inner","ant-tree-indent-unit","ant-tree-treenode","ant-tree-switcher-leaf-line"].findIndex(b=>{var V,q;return(q=(V=N==null?void 0:N.target)==null?void 0:V.className)==null?void 0:q.includes(b)})>-1&&(r.delete("line"),n(r))},Y=N=>{const{tag:M,accounts:G,argsMap:b}=N,V=Uw({type:"account",instruction:N,mapList:s,fundFlow:p==null?void 0:p.fundFlow,callback:g,onHighLightAddress:E,removeAddressHighLight:D,network:e});return f.jsxs("div",{title:"",className:Ve("flex items-center",{"rounded shadow-[0_0_10px_0_#2F8AF5] dark:shadow-[0_0_10px_0_rgb(252,251,251)]":M===r.get("line")}),onClick:()=>{r.set("line",M),n(r)},children:[f.jsx("div",{className:"mr-1 w-16 rounded border border-[#91CAFF] bg-[#E6F4FF] py-0.5 text-center text-sm text-[#0958D9] dark:border-[#60A5FA]/30 dark:bg-[#1D1D1D]/10 dark:text-[#60A5FA]",children:M}),f.jsxs("div",{className:"flex items-center whitespace-nowrap rounded border border-[#D9D9D9] bg-[#FAFAFA] px-2 py-0.5 text-sm dark:border-[#424242] dark:bg-[#1d1d1d]",children:[Ry({instruction:N,globalMapList:s,network:e,setLabel:g,fundFlow:p==null?void 0:p.fundFlow,invFlowInputValue:d,onHighLightAddress:E,removeAddressHighLight:D}),!!(G!=null&&G.length)&&f.jsx(lr,{overlayStyle:{width:"fit-content",maxWidth:"fit-content"},overlayInnerStyle:{maxHeight:"400px",height:"fit-content",overflow:"auto"},showArrow:!0,title:f.jsx("div",{className:"flex w-full flex-col justify-center space-y-3",children:G.map((q,re)=>{const le=s.find(pe=>pe.value===q.address);return f.jsxs("div",{className:"flex items-center justify-between gap-x-10",children:[f.jsxs("p",{className:Ve("text-xs leading-[22px]","rounded-full border border-[#2F8AF5]/10 bg-blue-50 px-1.5 py-0.5 dark:border-[#60a5fa]/30 dark:bg-blue-500/10"),children:["#",re+1," - ",q.name||"Account"]}),f.jsx("p",{className:"text-xs leading-[22px] text-primary",children:f.jsx(Jt,{text:q.address,children:(le==null?void 0:le.label)||zs(q.address)})})]},re)})}),children:f.jsx(lt,{type:"icon-accounts",className:"mx-1 text-primary"})}),V?null:Ly(b,t)]}),V?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"mx-2",children:f.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false",width:"1em",height:"1em",fill:"currentColor",className:"text-primary",children:f.jsx("path",{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"})})}),f.jsx("div",{className:"flex items-center whitespace-nowrap rounded border border-[#D9D9D9] bg-[#FAFAFA] px-2 py-0.5 text-sm dark:border-[#424242] dark:bg-[#1d1d1d]",children:V})]}):null]})};de.useEffect(()=>(document.addEventListener("click",R),()=>{document.removeEventListener("click",R)}),[]),de.useEffect(()=>{const N=s.find(G=>G.value===(A==null?void 0:A.value));if(!A||N!=null&&N.color&&(N==null?void 0:N.color)!=="transparent")return;document.querySelectorAll(`.address-${A.value}`).forEach(G=>{G.classList.add("hoverHighLightAddress")})},[A]),de.useEffect(()=>{var N;S.current&&((N=S==null?void 0:S.current)==null||N.scrollTo({key:U.toString(),align:"center"}))},[S.current]);const W={autoExpandParent:c,expandedKeys:Number(U)!==-2?y1(m.concat(U)):m,onExpand:N=>{l(!1),u(N)}},Z=de.useMemo(()=>{const N=(M,G)=>M.map(b=>({...b,title:""})).filter(b=>{var V;return b.children=b.children&&N(b.children,G),G(b)||((V=b.children)==null?void 0:V.length)});return N(a??[],M=>{var le;const{instructionName:G,programId:b}=M,V=d.trim(),q=s.find(pe=>pe.type==="account"&&pe.value===b),re=Vs(V,b)||Vs(V,G)||b&&(b==null?void 0:b.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))!==-1||q&&((le=q==null?void 0:q.label)==null?void 0:le.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))!==-1||G&&(G==null?void 0:G.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))!==-1;return d?!!re:!0})},[d,a]);return de.useEffect(()=>{l(!0);const N=[];if(v===-1)u(_);else{const M=G=>{G.forEach(b=>{(b.depth<=v||v===-2)&&N.push(b.tag),b.children&&M(b.children)})};M(Z),u(N)}},[Z,v]),de.useEffect(()=>{Z&&o(Z,!0)},[Z]),a?f.jsxs("div",{children:[f.jsx(ao,{store:i,position:Rt.NO}),f.jsx("div",{className:"w-full overflow-auto py-2",children:f.jsx(Di,{theme:{token:{fontFamily:"RegioMono-Light"}},children:de.createElement(Is,{ref:S,...W,className:Rh.tree,treeData:Z,titleRender:Y,motion:!1,selectable:!1,showIcon:!0,key:"id",switcherIcon:N=>f.jsx("div",{className:"!flex size-full items-center justify-center",children:N.expanded?f.jsxs("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"minus-square",width:"14px",height:"14px",fill:"currentColor","aria-hidden":"true",className:"!rotate-0",children:[f.jsx("path",{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}),f.jsx("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"})]}):f.jsxs("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"plus-square",width:"14px",height:"14px",fill:"currentColor","aria-hidden":"true",className:"!rotate-0",children:[f.jsx("path",{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}),f.jsx("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"})]})})})})})]}):null},QF=dr(My),Uy="_container_jqw67_1",Wy="_left_jqw67_11",zy="_right_jqw67_15",Vy="_up_jqw67_19",Hy="_down_jqw67_21",$y="_content_jqw67_27",Gy="_cancel_jqw67_54",Xy="_lightTheme_jqw67_69",Ky="_mask_jqw67_72",Cr={container:Uy,left:Wy,right:zy,up:Vy,down:Hy,content:$y,cancel:Gy,lightTheme:Xy,mask:Ky},Yy=({onClose:e})=>{const{mode:t="light"}=de.useContext($n),r=()=>{Sr.setItem(M0,N1),e()};return f.jsxs("div",{className:Cr.container,children:[f.jsxs("div",{className:Cr.left,children:[f.jsx("div",{className:Cr.up,children:f.jsxs("div",{className:Cr.content,children:["Call Trace Panel: Trace of ",f.jsx("strong",{children:"external calls"})," and events."]})}),f.jsx("div",{className:Cr.down,children:f.jsx("div",{className:Cr.content,children:"Parameters & Return Values Panel"})})]}),f.jsxs("div",{className:Cr.right,children:[" ",f.jsx("div",{className:Cr.up,children:f.jsxs("div",{className:Cr.content,children:["Source Code Panel: Source code and the current line referring to the"," ",f.jsx("strong",{children:"call site"})," of a function."]})}),f.jsx("div",{className:Cr.down,children:f.jsxs("div",{className:Cr.content,children:["Debug Trace Panel: ",f.jsx("strong",{children:"Call stack"})," of the current contract with a combination of ",f.jsx("strong",{children:"internal"})," and external calls."]})})]}),f.jsx("div",{className:Ve(Cr.cancel,{[Cr.lightTheme]:t==="light"}),onClick:r,children:"Start Now"}),f.jsx("div",{className:Cr.mask})]})},qy="_wrap_1narc_1",Jy="_itemInfo_1narc_6",Zy="_value_1narc_11",Qy="_status_1narc_11",eD="_dot_1narc_18",tD="_success_1narc_24",rD="_fail_1narc_30",nD="_errorMessage_1narc_36",iD="_label_1narc_39",aD="_tokenValue_1narc_46",sD="_address_1narc_52",oD="_basicInfoContainer_1narc_64",lD="_dataCollapse_1narc_67",cD="_panelHeader_1narc_75",uD="_panel_1narc_75",fD="_panelContent_1narc_83",Ue={wrap:qy,itemInfo:Jy,value:Zy,status:Qy,dot:eD,success:tD,fail:rD,errorMessage:nD,label:iD,tokenValue:aD,address:sD,basicInfoContainer:oD,dataCollapse:lD,panelHeader:cD,panel:uD,panelContent:fD},{Panel:hD}=S0;Ci.extend(jd);Ci.extend(Rd);Ci.extend(Ld);const dD=()=>{const{network:e=""}=Nr(),[t]=Kr(),{forkId:r=""}=Gn(t),[n,i]=de.useState([]),{txProfileData:a,globalMapList:s,onHighLightAddress:o,removeAddressHighLight:c}=yr(),l=d=>{i(d)},u=d=>{let g=null;const v=mt.getChainIdBySimpleName(e);switch(d){case 0:g=`${d} (Legacy)`;break;case 1:g=`${d} (EIP-2930)`;break;case 2:g=`${d} (EIP-1559)`;break;case 3:g=`${d} (EIP-4844)`;break;case 126:if(v===D0.id){g=`${d} (System)`;break}g=d;break;case 106:if(v===y0.id){g=`${d} (Internal)`;break}g=d;break;default:g=d;break}return g},m=()=>{const{latestBlock:d,basicInfo:{status:g,timestamp:v,blockNumber:p,gasLimit:_,gasUsed:E,gasPrice:D,txnIndex:A,eventCount:S,intTxnCount:I,sender:U,receiver:R,callData:Y,transactionFee:W,maxFee:Z,priorityFee:N,baseFee:M,type:G,nonce:b,errorInfo:V,value:q,revertMessage:re,overwritedBlockNumber:le=-1}}=a;return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Ve(Ue.wrap),children:[f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Status:"}),f.jsx("div",{className:Ve(Ue.value,Ue.status,g?Ue.success:Ue.fail),children:f.jsx(R0,{success:g,okText:"Success",failText:"Fail",showIcon:!0})})]}),(re||V)&&f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Error Message:"}),f.jsx("div",{className:Ve(Ue.value,Ue.errorMessage),children:m1(re)||V})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Block:"}),f.jsx("div",{className:Ue.value,children:f.jsx(Md,{title:String(p),children:f.jsx("a",{href:mt.getHrefBySimpleName(e,p,"block"),target:"_blank",rel:"noopener noreferrer",children:`${p} ${d-p>=0?`(${Xr(String(d-p))} blocks ago)`:""}`})})}),f.jsx("div",{className:"ml-1",children:Na({chain:e,type:"block",value:p})})]}),le!==-1&&f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,style:{fontWeight:"bold"},children:"Block Override:"}),f.jsx("div",{className:Ue.value,style:{fontWeight:"bold"},children:le})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Timestamp:"}),f.jsxs("div",{className:Ue.value,children:[Ci(v).tz("UTC").format("YYYY-MM-DD HH:mm:ss"),` (UTC) (${Ci(v).fromNow()})`]})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Position In Block:"}),f.jsx("div",{className:Ue.value,children:A})]})]}),f.jsxs("div",{className:Ue.wrap,children:[f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Gas limit:"}),f.jsx("div",{className:Ue.value,children:_})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Gas used:"}),f.jsx("div",{className:Ue.value,children:E})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Gas price:"}),f.jsx("div",{className:Ue.value,children:D&&`${new sn(D).toFixed()} ${Hs(e)?"GEVMOS":"Gwei"}`})]}),G===g1&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Base:"}),f.jsx("div",{className:Ue.value,children:M&&`${new sn(M).toFixed()} Gwei`})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Max:"}),f.jsx("div",{className:Ue.value,children:Z&&`${new sn(Z).toFixed()} Gwei`})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Max Priority:"}),f.jsx("div",{className:Ue.value,children:N&&`${new sn(N).toFixed()} Gwei`})]})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Transaction fee:"}),f.jsx("div",{className:Ue.value,children:W&&`${new sn(W).toFixed()} ${mt.getUnitBySimpleName(e)}`})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Txn Type:"}),f.jsx("div",{className:Ue.value,children:u(G)})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Event count:"}),f.jsx("div",{className:Ue.value,children:S})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Internal transaction count:"}),f.jsx("div",{className:Ue.value,children:I})]})]}),f.jsxs("div",{className:Ue.address,children:[f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Sender:"}),f.jsx("div",{className:Ue.value,children:ht({type:"account",value:U,mapList:s,network:e,forkId:r,onHighLightAddress:o,removeAddressHighLight:c})}),f.jsx("div",{className:"ml-1",children:Na({chain:e,type:"address",value:U})})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Nonce:"}),f.jsx("div",{className:Ue.value,children:b})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Value:"}),f.jsxs("div",{className:Ve(Ue.value,Ue.tokenValue,"flex items-center"),children:[f.jsx("img",{src:mt.getSymbolBySimpleName(e)}),PE(q,e)]})]}),f.jsxs("div",{className:Ue.itemInfo,children:[f.jsx("div",{className:Ue.label,children:"Receiver:"}),f.jsx("div",{className:Ue.value,children:ht({type:"account",value:R,mapList:s,network:e,forkId:r,onHighLightAddress:o,removeAddressHighLight:c})}),f.jsx("div",{className:"ml-1",children:Na({chain:e,type:"address",value:R})})]})]}),f.jsx(S0,{ghost:!0,className:Ue.dataCollapse,onChange:l,children:f.jsx(hD,{className:Ue.panel,showArrow:!1,header:f.jsxs("div",{className:Ve(Ue.panelHeader,"flex items-center"),children:[f.jsx(lt,{type:n.length?"icon-chevron-up":"icon-chevron-down",color:"#BFBFBF",className:"mr-2.5"}),"Input Data",f.jsx(Jt,{text:Y,ml:4})]}),children:Y&&f.jsx("div",{className:Ue.panelContent,children:Y})},"1")})]})};return f.jsx("div",{id:"basicInfo",children:f.jsx(fa,{paddingSize:"sm",open:!0,expandIcon:()=>f.jsx("div",{}),header:f.jsx("div",{children:f.jsxs("div",{className:Ve("flex items-center gap-1.5 text-base font-semibold leading-none text-default"),children:[f.jsx(lt,{type:"icon-basic-info",size:20})," Basic Info"]})}),className:"font-code",children:a?m():f.jsx(T0,{})})})},e3=dr(dD);var Wu=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function pD(e,t){return!!(e===t||Wu(e)&&Wu(t))}function mD(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!pD(e[r],t[r]))return!1;return!0}function Lh(e,t){t===void 0&&(t=mD);var r=null;function n(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(r&&r.lastThis===this&&t(i,r.lastArgs))return r.lastResult;var s=e.apply(this,i);return r={lastResult:s,lastArgs:i,lastThis:this},s}return n.clear=function(){r=null},n}function gD(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ud(e,t)}var zu=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function xD(e,t){return!!(e===t||zu(e)&&zu(t))}function vD(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!xD(e[r],t[r]))return!1;return!0}function Jo(e,t){t===void 0&&(t=vD);var r,n=[],i,a=!1;function s(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return a&&r===this&&t(o,n)||(i=e.apply(this,o),a=!0,r=this,n=o),i}return s}var _D=typeof performance=="object"&&typeof performance.now=="function",Vu=_D?function(){return performance.now()}:function(){return Date.now()};function Hu(e){cancelAnimationFrame(e.id)}function ED(e,t){var r=Vu();function n(){Vu()-r>=t?e.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var Zo=-1;function $u(e){if(e===void 0&&(e=!1),Zo===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Zo=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Zo}var Xi=null;function Gu(e){if(e===void 0&&(e=!1),Xi===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?Xi="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Xi="negative":Xi="positive-ascending"),document.body.removeChild(t),Xi}return Xi}var wD=150,yD=function(t,r){return t};function DD(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,o=e.getStopIndexForStartIndex,c=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(m){gD(d,m);function d(v){var p;return p=m.call(this,v)||this,p._instanceProps=c(p.props,Pc(p)),p._outerRef=void 0,p._resetIsScrollingTimeoutId=null,p.state={instance:Pc(p),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof p.props.initialScrollOffset=="number"?p.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},p._callOnItemsRendered=void 0,p._callOnItemsRendered=Jo(function(_,E,D,A){return p.props.onItemsRendered({overscanStartIndex:_,overscanStopIndex:E,visibleStartIndex:D,visibleStopIndex:A})}),p._callOnScroll=void 0,p._callOnScroll=Jo(function(_,E,D){return p.props.onScroll({scrollDirection:_,scrollOffset:E,scrollUpdateWasRequested:D})}),p._getItemStyle=void 0,p._getItemStyle=function(_){var E=p.props,D=E.direction,A=E.itemSize,S=E.layout,I=p._getItemStyleCache(l&&A,l&&S,l&&D),U;if(I.hasOwnProperty(_))U=I[_];else{var R=r(p.props,_,p._instanceProps),Y=i(p.props,_,p._instanceProps),W=D==="horizontal"||S==="horizontal",Z=D==="rtl",N=W?R:0;I[_]=U={position:"absolute",left:Z?void 0:N,right:Z?N:void 0,top:W?0:R,height:W?"100%":Y,width:W?Y:"100%"}}return U},p._getItemStyleCache=void 0,p._getItemStyleCache=Jo(function(_,E,D){return{}}),p._onScrollHorizontal=function(_){var E=_.currentTarget,D=E.clientWidth,A=E.scrollLeft,S=E.scrollWidth;p.setState(function(I){if(I.scrollOffset===A)return null;var U=p.props.direction,R=A;if(U==="rtl")switch(Gu()){case"negative":R=-A;break;case"positive-descending":R=S-D-A;break}return R=Math.max(0,Math.min(R,S-D)),{isScrolling:!0,scrollDirection:I.scrollOffset<R?"forward":"backward",scrollOffset:R,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._onScrollVertical=function(_){var E=_.currentTarget,D=E.clientHeight,A=E.scrollHeight,S=E.scrollTop;p.setState(function(I){if(I.scrollOffset===S)return null;var U=Math.max(0,Math.min(S,A-D));return{isScrolling:!0,scrollDirection:I.scrollOffset<U?"forward":"backward",scrollOffset:U,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._outerRefSetter=function(_){var E=p.props.outerRef;p._outerRef=_,typeof E=="function"?E(_):E!=null&&typeof E=="object"&&E.hasOwnProperty("current")&&(E.current=_)},p._resetIsScrollingDebounced=function(){p._resetIsScrollingTimeoutId!==null&&Hu(p._resetIsScrollingTimeoutId),p._resetIsScrollingTimeoutId=ED(p._resetIsScrolling,wD)},p._resetIsScrolling=function(){p._resetIsScrollingTimeoutId=null,p.setState({isScrolling:!1},function(){p._getItemStyleCache(-1,null)})},p}d.getDerivedStateFromProps=function(p,_){return AD(p,_),u(p),null};var g=d.prototype;return g.scrollTo=function(p){p=Math.max(0,p),this.setState(function(_){return _.scrollOffset===p?null:{scrollDirection:_.scrollOffset<p?"forward":"backward",scrollOffset:p,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},g.scrollToItem=function(p,_){_===void 0&&(_="auto");var E=this.props,D=E.itemCount,A=E.layout,S=this.state.scrollOffset;p=Math.max(0,Math.min(p,D-1));var I=0;if(this._outerRef){var U=this._outerRef;A==="vertical"?I=U.scrollWidth>U.clientWidth?$u():0:I=U.scrollHeight>U.clientHeight?$u():0}this.scrollTo(a(this.props,p,_,S,this._instanceProps,I))},g.componentDidMount=function(){var p=this.props,_=p.direction,E=p.initialScrollOffset,D=p.layout;if(typeof E=="number"&&this._outerRef!=null){var A=this._outerRef;_==="horizontal"||D==="horizontal"?A.scrollLeft=E:A.scrollTop=E}this._callPropsCallbacks()},g.componentDidUpdate=function(){var p=this.props,_=p.direction,E=p.layout,D=this.state,A=D.scrollOffset,S=D.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var I=this._outerRef;if(_==="horizontal"||E==="horizontal")if(_==="rtl")switch(Gu()){case"negative":I.scrollLeft=-A;break;case"positive-ascending":I.scrollLeft=A;break;default:var U=I.clientWidth,R=I.scrollWidth;I.scrollLeft=R-U-A;break}else I.scrollLeft=A;else I.scrollTop=A}this._callPropsCallbacks()},g.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Hu(this._resetIsScrollingTimeoutId)},g.render=function(){var p=this.props,_=p.children,E=p.className,D=p.direction,A=p.height,S=p.innerRef,I=p.innerElementType,U=p.innerTagName,R=p.itemCount,Y=p.itemData,W=p.itemKey,Z=W===void 0?yD:W,N=p.layout,M=p.outerElementType,G=p.outerTagName,b=p.style,V=p.useIsScrolling,q=p.width,re=this.state.isScrolling,le=D==="horizontal"||N==="horizontal",pe=le?this._onScrollHorizontal:this._onScrollVertical,Ce=this._getRangeToRender(),Te=Ce[0],O=Ce[1],K=[];if(R>0)for(var z=Te;z<=O;z++)K.push(de.createElement(_,{data:Y,key:Z(z,Y),index:z,isScrolling:V?re:void 0,style:this._getItemStyle(z)}));var X=n(this.props,this._instanceProps);return de.createElement(M||G||"div",{className:E,onScroll:pe,ref:this._outerRefSetter,style:Wd({position:"relative",height:A,width:q,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:D},b)},de.createElement(I||U||"div",{children:K,ref:S,style:{height:le?"100%":X,pointerEvents:re?"none":void 0,width:le?X:"100%"}}))},g._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var p=this.props.itemCount;if(p>0){var _=this._getRangeToRender(),E=_[0],D=_[1],A=_[2],S=_[3];this._callOnItemsRendered(E,D,A,S)}}if(typeof this.props.onScroll=="function"){var I=this.state,U=I.scrollDirection,R=I.scrollOffset,Y=I.scrollUpdateWasRequested;this._callOnScroll(U,R,Y)}},g._getRangeToRender=function(){var p=this.props,_=p.itemCount,E=p.overscanCount,D=this.state,A=D.isScrolling,S=D.scrollDirection,I=D.scrollOffset;if(_===0)return[0,0,0,0];var U=s(this.props,I,this._instanceProps),R=o(this.props,U,I,this._instanceProps),Y=!A||S==="backward"?Math.max(1,E):1,W=!A||S==="forward"?Math.max(1,E):1;return[Math.max(0,U-Y),Math.max(0,Math.min(_-1,R+W)),U,R]},d}(de.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var AD=function(t,r){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,r.instance},CD=DD({getItemOffset:function(t,r){var n=t.itemSize;return r*n},getItemSize:function(t,r){var n=t.itemSize;return n},getEstimatedTotalSize:function(t){var r=t.itemCount,n=t.itemSize;return n*r},getOffsetForIndexAndAlignment:function(t,r,n,i,a,s){var o=t.direction,c=t.height,l=t.itemCount,u=t.itemSize,m=t.layout,d=t.width,g=o==="horizontal"||m==="horizontal",v=g?d:c,p=Math.max(0,l*u-v),_=Math.min(p,r*u),E=Math.max(0,r*u-v+u+s);switch(n==="smart"&&(i>=E-v&&i<=_+v?n="auto":n="center"),n){case"start":return _;case"end":return E;case"center":{var D=Math.round(E+(_-E)/2);return D<Math.ceil(v/2)?0:D>p+Math.floor(v/2)?p:D}case"auto":default:return i>=E&&i<=_?i:i<E?E:_}},getStartIndexForOffset:function(t,r){var n=t.itemCount,i=t.itemSize;return Math.max(0,Math.min(n-1,Math.floor(r/i)))},getStopIndexForStartIndex:function(t,r,n){var i=t.direction,a=t.height,s=t.itemCount,o=t.itemSize,c=t.layout,l=t.width,u=i==="horizontal"||c==="horizontal",m=r*o,d=u?l:a,g=Math.ceil((d+n-m)/o);return Math.max(0,Math.min(s-1,r+g-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});const TD=1,SD=12,Mh=20,Xu=18,FD=14,Uh=["#4EB1FA","#209DF1","#188FF8","#0076FF"],Wh=["#fff"],bD="_g_3vasl_1",kD="_rect_3vasl_4",ND="_foreignObject_3vasl_8",ID="_label_3vasl_13",OD="_text_3vasl_24",Ki={g:bD,rect:kD,foreignObject:ND,label:ID,text:OD},BD=({backgroundColor:e,color:t,disableDefaultTooltips:r,height:n,isDimmed:i=!1,label:a,onClick:s,onMouseEnter:o,onMouseLeave:c,onMouseMove:l,tooltip:u,width:m,x:d,y:g,size:v,isOdd:p})=>{const _=p?1:.9;return f.jsxs("g",{className:Ki.g,transform:`translate(${d},${g})`,onMouseEnter:o,onMouseLeave:c,onMouseMove:l,children:[r?null:f.jsx("title",{children:u??a}),f.jsx("rect",{width:m,height:n,fill:"white",className:Ki.rect}),f.jsx("rect",{width:m,height:n,fill:e,onClick:s,className:Ki.rect,style:{opacity:i?.85*_:_}}),m>=SD&&f.jsx("foreignObject",{width:m,height:n,className:Ki.foreignObject,style:{opacity:i?.95*_:_,paddingLeft:d<0?-d:0},y:n<Xu?-Xu:0,children:f.jsx("div",{className:Ki.label,style:{color:t,fontSize:v},children:f.jsx("span",{className:Ki.text,children:a})})})]})},PD=e=>{const{data:t,index:r,style:n}=e,{data:i,disableDefaultTooltips:a,focusedNode:s,handleMouseEnter:o,handleMouseLeave:c,handleMouseMove:l,scale:u}=t,{height:m,top:d}=n,g=i.levels[r],v=u(s.left),p=u(s.width),_=parseInt(d,10);return g.map(E=>{const D=i.nodes[E],A=u(D.left),S=u(D.width);return S<TD||A+S<v||A>v+p?null:f.jsx(BD,{backgroundColor:D.backgroundColor,color:D.color,size:D.size,disableDefaultTooltips:a,height:m||Mh,isDimmed:r<s.depth,isOdd:D.isOdd,label:D.name,onClick:I=>{I.stopPropagation(),t.focusNode(E)},onMouseEnter:I=>o(I,D.source),onMouseLeave:I=>c(I,D.source),onMouseMove:I=>l(I,D.source),tooltip:D.tooltip,width:S,x:A-v,y:_},E)})},jD=({data:e,onChange:t,onMouseMove:r,onMouseOut:n,onMouseOver:i,disableDefaultTooltips:a,height:s,width:o,rowHeight:c})=>{const[l,u]=de.useState(e.nodes[e.root]),_=Lh((E,D,A,S,I,U,R,Y)=>({data:E,disableDefaultTooltips:D,focusedNode:A,focusNode:S,handleMouseEnter:I,handleMouseLeave:U,handleMouseMove:R,scale:W=>W/A.width*Y}))(e,!!a,l,E=>{const{nodes:D}=e,A=D[E];u(A),t==null||t(A,E)},(E,D)=>{i==null||i(E,D)},(E,D)=>{n==null||n(E,D)},(E,D)=>{r==null||r(E,D)},o);return f.jsx(CD,{height:s,itemCount:e.height,itemData:_,itemSize:c||Mh,width:o,innerTagName:"svg",children:PD})},RD=Uh.length,LD=Wh.length;function MD(e,t){return Uh[Math.round(e/t*(RD-1))]}function UD(e,t){return Wh[Math.round(e/t*(LD-1))]}function WD(e,t){let r=0;const n=e.value,i={},a=[],s=(c,l,u)=>{var S;const{backgroundColor:m,children:d,color:g,id:v,name:p,tooltip:_,value:E}=c,D=v||`_${r}`,A=i[D]={backgroundColor:m||MD(E,n),color:g||(t==null?void 0:t.color)||UD(E,n),depth:l,left:u,name:((S=t==null?void 0:t.formatName)==null?void 0:S.call(t,c))??p,size:(t==null?void 0:t.size)||FD,source:c,tooltip:_,width:E/n,isOdd:l%2===0};return a.length<=l&&a.push([]),a[l].push(D),r++,ul(d)&&d.forEach(I=>{const U=s(I,l+1,u);u+=U.width}),A};s(e,0,0);const o=e.id||"_0";return{height:a.length,levels:a,nodes:i,root:o}}const zD=({data:e,color:t,size:r,className:n,formatName:i,...a})=>{const o=Lh(c=>WD(c,{color:t,size:r,formatName:i}))(e);return f.jsx("div",{className:n,children:f.jsx(jD,{data:o,...a})})},VD="_container_7daxw_1",HD="_header_7daxw_1",$D="_collapseWrap_7daxw_6",GD="_collapseIcon_7daxw_15",Ku={container:VD,header:HD,collapseWrap:$D,collapseIcon:GD},XD=({data:e,color:t})=>{const[r,n]=de.useState(!1),[i,a]=de.useState(500),s=de.useRef(null),[o,c]=de.useState(!0),{clickAnchor:l}=yr();return de.useEffect(()=>{l==="gasProfiler"&&n(!0)},[l]),de.useEffect(()=>{if(e&&(s!=null&&s.current)){const{width:u}=s.current,m=u-64;a(m),c(!1)}},[e]),f.jsx("div",{className:Ve(Ku.container),id:"gasProfiler",children:f.jsx(fa,{open:r,ref:s,paddingSize:"sm",onChange:()=>n(!r),className:"font-code",header:f.jsx("div",{children:f.jsxs("div",{className:Ve("flex items-center gap-1.5 text-base font-semibold leading-none text-default"),children:[f.jsx(lt,{type:"icon-gas-profiler",size:20})," Gas Profiler"]})}),children:o?f.jsx("div",{className:"flex items-center justify-center",children:f.jsx(Oi,{})}):f.jsx(zD,{className:Ku.content,data:e,height:400,width:i,color:t,rowHeight:24,formatName:u=>`${u.name} - ${Xr(u.value??0)}`})})})},t3=dr(XD),KD="_tag_nylcu_1",YD="_contractStateDiff_nylcu_9",qD="_header_nylcu_13",JD="_name_nylcu_16",ZD="_address_nylcu_25",QD="_scanBtn_nylcu_29",eA="_main_nylcu_37",tA="_storages_nylcu_40",rA="_attrItem_nylcu_40",nA="_type_nylcu_43",iA="_diff_nylcu_58",aA="_subName_nylcu_63",sA="_collapseBtn_nylcu_69",oA="_collapsible_nylcu_74",lA="_previousValue_nylcu_77",cA="_latestValue_nylcu_80",uA="_iterable_nylcu_83",fA="_toggleBtn_nylcu_90",hA="_rowState_nylcu_99",dA="_label_nylcu_103",pA="_key_nylcu_106",mA="_value_nylcu_109",gA="_valueContainer_nylcu_112",ut={tag:KD,contractStateDiff:YD,header:qD,name:JD,address:ZD,scanBtn:QD,main:eA,storages:tA,attrItem:rA,type:nA,diff:iA,subName:aA,collapseBtn:sA,collapsible:oA,previousValue:lA,latestValue:cA,iterable:uA,toggleBtn:fA,rowState:hA,label:dA,key:pA,value:mA,valueContainer:gA},js=({data:e,type:t})=>{const r=["string","bytes"].includes(t??"");return f.jsx(f.Fragment,{children:(e==null?void 0:e.prev)!==(e==null?void 0:e.current)?f.jsxs(f.Fragment,{children:[f.jsx(Jt,{hover:!0,text:e.prev,placement:"left",mr:4,children:f.jsx("span",{className:ut.previousValue,children:r?`"${e.prev}"`:e.prev})}),f.jsx(lt,{type:"icon-arrow-right",size:14,ml:10,mr:10}),f.jsx(Jt,{hover:!0,text:e.current,placement:"right",ml:4,children:f.jsx("span",{className:ut.latestValue,children:r?`"${e.current}"`:e.current})})]}):f.jsx(Jt,{hover:!0,text:e.current,placement:"right",ml:4,children:f.jsx("span",{className:ut.latestValue,children:e.current})})})},Yu=e=>e.every(t=>t.value.typeTag===vi.NORMAL),Qo=({data:{key:e,value:t,type:r}})=>{const[n,i]=de.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Ve(ut.subName,"pointer"),onClick:()=>i(a=>!a),children:[f.jsx("div",{className:Ve(ut.collapseBtn,ut.collapsible),children:f.jsx(lt,{type:n?"icon-fold":"icon-expand"})}),f.jsxs("div",{className:"flex items-center",children:[r?f.jsx("div",{className:Ve(ut.type,"text-default"),children:f.jsx("span",{children:r})}):null,f.jsx(Jt,{hover:!0,text:e,placement:"right",ml:4,children:f.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:e})})]})]}),n&&zh(t)]})},zh=e=>{var t,r,n;switch(e.typeTag){case vi.MAPPING:{const i=!Yu(e.pairs);return(t=e==null?void 0:e.pairs)==null?void 0:t.map(a=>f.jsx("div",{className:Ve(ut.diff,{[ut.iterable]:i}),children:i?f.jsx(Qo,{data:a}):f.jsxs(f.Fragment,{children:[f.jsx("div",{className:ut.subName,children:f.jsx(Jt,{hover:!0,text:a.key,placement:"right",ml:4,children:a.key})}),f.jsx(js,{data:a.value})]})},a.key))}case vi.ARRAY:{const i=!Yu(e.elems);return(r=e==null?void 0:e.elems)==null?void 0:r.map(a=>f.jsx("div",{className:Ve(ut.diff,{[ut.iterable]:i}),children:i?f.jsx(Qo,{data:{key:a.index.toString(),value:a.value}}):f.jsxs(f.Fragment,{children:[f.jsx("div",{className:ut.subName,children:f.jsx(Jt,{hover:!0,text:a.index.toString(),placement:"right",ml:4,children:a.index})}),f.jsx(js,{data:a.value,type:e.elemType})]})},a.index))}case vi.STRUCT:return(n=e==null?void 0:e.fields)==null?void 0:n.map(i=>f.jsx("div",{className:Ve(ut.diff,{[ut.iterable]:i.value.typeTag!==vi.NORMAL}),children:i.value.typeTag!==vi.NORMAL?f.jsx(Qo,{data:{key:i.name,value:i.value,type:i.type}}):f.jsxs(f.Fragment,{children:[f.jsx("div",{className:ut.type,children:f.jsx("span",{children:i.type})}),f.jsx("div",{className:ut.subName,children:f.jsx(Jt,{hover:!0,text:i.name,placement:"right",ml:4,children:i.name})}),f.jsx(js,{data:i.value,type:i.type})]})},i.name))}},xA=({data:e,network:t="eth"})=>{const{erc:r,address:n,storageVariables:i,slots:a}=e,{globalMapList:s}=yr(),o=s.find(d=>d.type==="account"&&d.value===n),[c,l]=de.useState(!1),u=d=>d!==vi.NORMAL,m=mt.getChainIconBySimpleName(t,n);return f.jsxs("div",{className:ut.contractStateDiff,children:[f.jsxs("div",{className:ut.header,children:[o&&f.jsx("div",{className:ut.name,children:o.label}),r&&f.jsx("div",{className:ut.tag,children:r}),f.jsx("span",{className:ut.address,children:n}),f.jsx(Jt,{text:n,ml:4}),f.jsx("a",{href:m.link,target:"_blank",rel:"noreferrer",className:ut.scanBtn,children:f.jsx("img",{src:m.icon,alt:""})})]}),f.jsxs("div",{className:ut.main,children:[f.jsx("div",{className:ut.storages,children:i.map(d=>f.jsxs("div",{className:Ve(ut.attrItem,{[ut.iterable]:u(d.value.typeTag)}),children:[f.jsxs("div",{className:ut.name,children:[f.jsx("div",{className:ut.type,children:f.jsx("span",{children:d.type})}),f.jsx("div",{children:f.jsx(Jt,{hover:!0,text:d.name,placement:"right",ml:4,children:d.name})})]}),u(d.value.typeTag)?zh(d.value):f.jsx("div",{className:ut.diff,children:f.jsx(js,{data:d.value,type:d.type})})]},d.name))}),f.jsxs("span",{className:ut.toggleBtn,onClick:()=>l(d=>!d),children:[f.jsx(lt,{type:"icon-chevron-down",size:9,mr:8,rotate:c?180:0}),f.jsxs("span",{children:[c?"Hide":"Show"," raw state changes"]})]}),c&&a.map(d=>f.jsx("div",{children:f.jsxs("div",{className:ut.rowState,children:[f.jsxs("div",{className:ut.key,children:[f.jsx("div",{className:ut.label,children:"Key:"}),f.jsx("div",{className:ut.value,children:f.jsx(Jt,{hover:!0,text:d.key,placement:"right",ml:4,children:d.key})})]}),f.jsxs("div",{className:ut.valueContainer,children:[f.jsx(Jt,{hover:!0,text:d.prev,placement:"left",mr:4,children:d.prev}),f.jsx(lt,{type:"icon-arrow-right",size:14,ml:10,mr:10}),f.jsx(Jt,{hover:!0,text:d.current,placement:"right",children:d.current})]})]})},d.key))]})]})},vA="_stateChangesPanel_1mi2l_1",_A="_loadingContainer_1mi2l_1",EA="_transactionStateDiff_1mi2l_7",wA="_divider_1mi2l_10",As={stateChangesPanel:vA,loadingContainer:_A,transactionStateDiff:EA,divider:wA},yA=()=>{const{network:e,txnHash:t}=Nr(),[r]=Kr(),{event:n="",forkId:i,blockNumber:a}=Gn(r),{clickAnchor:s,txProfileData:o}=yr(),[c,l]=de.useState(!0),[u,m]=de.useState(!1),[d,g]=de.useState([]);return de.useEffect(()=>{(async()=>{var v;if(t&&e&&o){const p=mt.getChainIdBySimpleName(e);if(!((v=o==null?void 0:o.basicInfo)!=null&&v.debugEnable)){l(!1);return}const{type:_,params:E}=B0({chainId:p,event:n,forkId:i,blockNumber:a,txnHash:t}),{data:D,success:A}=await an.getStateChanges(_,E);A&&g(D.stateChanges),l(!1)}})()},[e,t,n,o]),de.useEffect(()=>{s==="stateChanges"&&m(!0)},[s]),f.jsx("div",{className:Ve(As.stateChangesPanel),id:"stateChanges",children:f.jsx(fa,{open:u,paddingSize:"sm",onChange:()=>m(!u),className:"font-code",header:f.jsx("div",{children:f.jsxs("div",{className:Ve("flex items-center gap-1.5 text-base font-semibold leading-none text-default"),children:[f.jsx(lt,{type:"icon-state-change",size:20})," State Changes"]})}),children:c?f.jsx("div",{className:As.loadingContainer,children:f.jsx(Oi,{})}):d.length>0?f.jsx("div",{className:As.transactionStateDiff,children:d.map((v,p)=>f.jsxs("div",{children:[f.jsx(xA,{data:v,network:e}),p!==d.length-1&&f.jsx("div",{className:As.divider})]},v.address))}):f.jsx(oa,{image:oa.PRESENTED_IMAGE_SIMPLE})})})},r3=dr(yA);function DA(e){let t;for(;t=e.sourceEvent;)e=t;return e}function pi(e,t){if(e=DA(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}function Rr(e){return typeof e=="string"?new Vc([document.querySelectorAll(e)],[document.documentElement]):new Vc([e==null?[]:A1(e)],D1)}var AA={value:()=>{}};function So(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Rs(r)}function Rs(e){this._=e}function CA(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Rs.prototype=So.prototype={constructor:Rs,on:function(e,t){var r=this._,n=CA(e+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(e=n[a]).type)&&(i=TA(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(e=n[a]).type)r[i]=qu(r[i],e.name,t);else if(t==null)for(i in r)r[i]=qu(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Rs(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],n=0,i=a.length;n<i;++n)a[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,a=n.length;i<a;++i)n[i].value.apply(t,r)}};function TA(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function qu(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=AA,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var ua=0,Fa=0,ya=0,Vh=1e3,uo,ba,fo=0,bi=0,Fo=0,Ja=typeof performance=="object"&&performance.now?performance:Date,Hh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function fc(){return bi||(Hh(SA),bi=Ja.now()+Fo)}function SA(){bi=0}function ho(){this._call=this._time=this._next=null}ho.prototype=$h.prototype={constructor:ho,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?fc():+r)+(t==null?0:+t),!this._next&&ba!==this&&(ba?ba._next=this:uo=this,ba=this),this._call=e,this._time=r,yl()},stop:function(){this._call&&(this._call=null,this._time=1/0,yl())}};function $h(e,t,r){var n=new ho;return n.restart(e,t,r),n}function FA(){fc(),++ua;for(var e=uo,t;e;)(t=bi-e._time)>=0&&e._call.call(null,t),e=e._next;--ua}function Ju(){bi=(fo=Ja.now())+Fo,ua=Fa=0;try{FA()}finally{ua=0,kA(),bi=0}}function bA(){var e=Ja.now(),t=e-fo;t>Vh&&(Fo-=t,fo=e)}function kA(){for(var e,t=uo,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:uo=r);ba=e,yl(n)}function yl(e){if(!ua){Fa&&(Fa=clearTimeout(Fa));var t=e-bi;t>24?(e<1/0&&(Fa=setTimeout(Ju,e-Ja.now()-Fo)),ya&&(ya=clearInterval(ya))):(ya||(fo=Ja.now(),ya=setInterval(bA,Vh)),ua=1,Hh(Ju))}}function po(e,t,r){var n=new ho;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var NA=So("start","end","cancel","interrupt"),IA=[],Gh=0,Dl=1,Al=2,Ls=3,Zu=4,Cl=5,Ms=6;function bo(e,t,r,n,i,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;OA(e,r,{name:t,index:n,group:i,on:NA,tween:IA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Gh})}function hc(e,t){var r=fn(e,t);if(r.state>Gh)throw new Error("too late; already scheduled");return r}function Dn(e,t){var r=fn(e,t);if(r.state>Ls)throw new Error("too late; already running");return r}function fn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function OA(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=$h(a,0,r.time);function a(l){r.state=Dl,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var u,m,d,g;if(r.state!==Dl)return c();for(u in n)if(g=n[u],g.name===r.name){if(g.state===Ls)return po(s);g.state===Zu?(g.state=Ms,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete n[u]):+u<t&&(g.state=Ms,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete n[u])}if(po(function(){r.state===Ls&&(r.state=Zu,r.timer.restart(o,r.delay,r.time),o(l))}),r.state=Al,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Al){for(r.state=Ls,i=new Array(d=r.tween.length),u=0,m=-1;u<d;++u)(g=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++m]=g);i.length=m+1}}function o(l){for(var u=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(c),r.state=Cl,1),m=-1,d=i.length;++m<d;)i[m].call(e,u);r.state===Cl&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Ms,r.timer.stop(),delete n[t];for(var l in n)return;delete e.__transition}}function Us(e,t){var r=e.__transition,n,i,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((n=r[s]).name!==t){a=!1;continue}i=n.state>Al&&n.state<Cl,n.state=Ms,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[s]}a&&delete e.__transition}}function BA(e){return this.each(function(){Us(this,e)})}function dc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Xh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ls(){}var Za=.7,mo=1/Za,ia="\\s*([+-]?\\d+)\\s*",Qa="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",PA=/^#([0-9a-f]{3,8})$/,jA=new RegExp("^rgb\\("+[ia,ia,ia]+"\\)$"),RA=new RegExp("^rgb\\("+[_n,_n,_n]+"\\)$"),LA=new RegExp("^rgba\\("+[ia,ia,ia,Qa]+"\\)$"),MA=new RegExp("^rgba\\("+[_n,_n,_n,Qa]+"\\)$"),UA=new RegExp("^hsl\\("+[Qa,_n,_n]+"\\)$"),WA=new RegExp("^hsla\\("+[Qa,_n,_n,Qa]+"\\)$"),Qu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};dc(ls,ki,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:e0,formatHex:e0,formatHsl:zA,formatRgb:t0,toString:t0});function e0(){return this.rgb().formatHex()}function zA(){return Kh(this).formatHsl()}function t0(){return this.rgb().formatRgb()}function ki(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=PA.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?r0(t):r===3?new Lr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Cs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Cs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=jA.exec(e))?new Lr(t[1],t[2],t[3],1):(t=RA.exec(e))?new Lr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=LA.exec(e))?Cs(t[1],t[2],t[3],t[4]):(t=MA.exec(e))?Cs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UA.exec(e))?a0(t[1],t[2]/100,t[3]/100,1):(t=WA.exec(e))?a0(t[1],t[2]/100,t[3]/100,t[4]):Qu.hasOwnProperty(e)?r0(Qu[e]):e==="transparent"?new Lr(NaN,NaN,NaN,0):null}function r0(e){return new Lr(e>>16&255,e>>8&255,e&255,1)}function Cs(e,t,r,n){return n<=0&&(e=t=r=NaN),new Lr(e,t,r,n)}function VA(e){return e instanceof ls||(e=ki(e)),e?(e=e.rgb(),new Lr(e.r,e.g,e.b,e.opacity)):new Lr}function Tl(e,t,r,n){return arguments.length===1?VA(e):new Lr(e,t,r,n??1)}function Lr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}dc(Lr,Tl,Xh(ls,{brighter:function(e){return e=e==null?mo:Math.pow(mo,e),new Lr(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Za:Math.pow(Za,e),new Lr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:n0,formatHex:n0,formatRgb:i0,toString:i0}));function n0(){return"#"+el(this.r)+el(this.g)+el(this.b)}function i0(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function el(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function a0(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new vn(e,t,r,n)}function Kh(e){if(e instanceof vn)return new vn(e.h,e.s,e.l,e.opacity);if(e instanceof ls||(e=ki(e)),!e)return new vn;if(e instanceof vn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,o=a-i,c=(a+i)/2;return o?(t===a?s=(r-n)/o+(r<n)*6:r===a?s=(n-t)/o+2:s=(t-r)/o+4,o/=c<.5?a+i:2-a-i,s*=60):o=c>0&&c<1?0:s,new vn(s,o,c,e.opacity)}function HA(e,t,r,n){return arguments.length===1?Kh(e):new vn(e,t,r,n??1)}function vn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}dc(vn,HA,Xh(ls,{brighter:function(e){return e=e==null?mo:Math.pow(mo,e),new vn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Za:Math.pow(Za,e),new vn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Lr(tl(e>=240?e-240:e+120,i,n),tl(e,i,n),tl(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function tl(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const pc=e=>()=>e;function $A(e,t){return function(r){return e+r*t}}function GA(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function XA(e){return(e=+e)==1?Yh:function(t,r){return r-t?GA(t,r,e):pc(isNaN(t)?r:t)}}function Yh(e,t){var r=t-e;return r?$A(e,r):pc(isNaN(e)?t:e)}const go=function e(t){var r=XA(t);function n(i,a){var s=r((i=Tl(i)).r,(a=Tl(a)).r),o=r(i.g,a.g),c=r(i.b,a.b),l=Yh(i.opacity,a.opacity);return function(u){return i.r=s(u),i.g=o(u),i.b=c(u),i.opacity=l(u),i+""}}return n.gamma=e,n}(1);function KA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function YA(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qA(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=ko(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(o){for(s=0;s<n;++s)a[s]=i[s](o);return a}}function JA(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function gn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ZA(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=ko(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Sl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rl=new RegExp(Sl.source,"g");function QA(e){return function(){return e}}function e4(e){return function(t){return e(t)+""}}function qh(e,t){var r=Sl.lastIndex=rl.lastIndex=0,n,i,a,s=-1,o=[],c=[];for(e=e+"",t=t+"";(n=Sl.exec(e))&&(i=rl.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,c.push({i:s,x:gn(n,i)})),r=rl.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?c[0]?e4(c[0].x):QA(t):(t=c.length,function(l){for(var u=0,m;u<t;++u)o[(m=c[u]).i]=m.x(l);return o.join("")})}function ko(e,t){var r=typeof t,n;return t==null||r==="boolean"?pc(t):(r==="number"?gn:r==="string"?(n=ki(t))?(t=n,go):qh:t instanceof ki?go:t instanceof Date?JA:YA(t)?KA:Array.isArray(t)?qA:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ZA:gn)(e,t)}var s0=180/Math.PI,Fl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jh(e,t,r,n,i,a){var s,o,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*r+t*n)&&(r-=e*c,n-=t*c),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,c/=o),e*n<t*r&&(e=-e,t=-t,c=-c,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*s0,skewX:Math.atan(c)*s0,scaleX:s,scaleY:o}}var Ts;function t4(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Fl:Jh(t.a,t.b,t.c,t.d,t.e,t.f)}function r4(e){return e==null||(Ts||(Ts=document.createElementNS("http://www.w3.org/2000/svg","g")),Ts.setAttribute("transform",e),!(e=Ts.transform.baseVal.consolidate()))?Fl:(e=e.matrix,Jh(e.a,e.b,e.c,e.d,e.e,e.f))}function Zh(e,t,r,n){function i(l){return l.length?l.pop()+" ":""}function a(l,u,m,d,g,v){if(l!==m||u!==d){var p=g.push("translate(",null,t,null,r);v.push({i:p-4,x:gn(l,m)},{i:p-2,x:gn(u,d)})}else(m||d)&&g.push("translate("+m+t+d+r)}function s(l,u,m,d){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),d.push({i:m.push(i(m)+"rotate(",null,n)-2,x:gn(l,u)})):u&&m.push(i(m)+"rotate("+u+n)}function o(l,u,m,d){l!==u?d.push({i:m.push(i(m)+"skewX(",null,n)-2,x:gn(l,u)}):u&&m.push(i(m)+"skewX("+u+n)}function c(l,u,m,d,g,v){if(l!==m||u!==d){var p=g.push(i(g)+"scale(",null,",",null,")");v.push({i:p-4,x:gn(l,m)},{i:p-2,x:gn(u,d)})}else(m!==1||d!==1)&&g.push(i(g)+"scale("+m+","+d+")")}return function(l,u){var m=[],d=[];return l=e(l),u=e(u),a(l.translateX,l.translateY,u.translateX,u.translateY,m,d),s(l.rotate,u.rotate,m,d),o(l.skewX,u.skewX,m,d),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,m,d),l=u=null,function(g){for(var v=-1,p=d.length,_;++v<p;)m[(_=d[v]).i]=_.x(g);return m.join("")}}}var n4=Zh(t4,"px, ","px)","deg)"),Qh=Zh(r4,", ",")",")"),i4=1e-12;function o0(e){return((e=Math.exp(e))+1/e)/2}function a4(e){return((e=Math.exp(e))-1/e)/2}function s4(e){return((e=Math.exp(2*e))-1)/(e+1)}const o4=function e(t,r,n){function i(a,s){var o=a[0],c=a[1],l=a[2],u=s[0],m=s[1],d=s[2],g=u-o,v=m-c,p=g*g+v*v,_,E;if(p<i4)E=Math.log(d/l)/t,_=function(R){return[o+R*g,c+R*v,l*Math.exp(t*R*E)]};else{var D=Math.sqrt(p),A=(d*d-l*l+n*p)/(2*l*r*D),S=(d*d-l*l-n*p)/(2*d*r*D),I=Math.log(Math.sqrt(A*A+1)-A),U=Math.log(Math.sqrt(S*S+1)-S);E=(U-I)/t,_=function(R){var Y=R*E,W=o0(I),Z=l/(r*D)*(W*s4(t*Y+I)-a4(I));return[o+Z*g,c+Z*v,l*W/o0(t*Y+I)]}}return _.duration=E*1e3*t/Math.SQRT2,_}return i.rho=function(a){var s=Math.max(.001,+a),o=s*s,c=o*o;return e(s,o,c)},i}(Math.SQRT2,2,4);function l4(e,t){var r,n;return function(){var i=Dn(this,e),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s<o;++s)if(n[s].name===t){n=n.slice(),n.splice(s,1);break}}i.tween=n}}function c4(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var a=Dn(this,e),s=a.tween;if(s!==n){i=(n=s).slice();for(var o={name:t,value:r},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=o;break}c===l&&i.push(o)}a.tween=i}}function u4(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=fn(this.node(),r).tween,i=0,a=n.length,s;i<a;++i)if((s=n[i]).name===e)return s.value;return null}return this.each((t==null?l4:c4)(r,e,t))}function mc(e,t,r){var n=e._id;return e.each(function(){var i=Dn(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return fn(i,n).value[t]}}function ed(e,t){var r;return(typeof t=="number"?gn:t instanceof ki?go:(r=ki(t))?(t=r,go):qh)(e,t)}function f4(e){return function(){this.removeAttribute(e)}}function h4(e){return function(){this.removeAttributeNS(e.space,e.local)}}function d4(e,t,r){var n,i=r+"",a;return function(){var s=this.getAttribute(e);return s===i?null:s===n?a:a=t(n=s,r)}}function p4(e,t,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===n?a:a=t(n=s,r)}}function m4(e,t,r){var n,i,a;return function(){var s,o=r(this),c;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=o+"",s===c?null:s===n&&c===i?a:(i=c,a=t(n=s,o)))}}function g4(e,t,r){var n,i,a;return function(){var s,o=r(this),c;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=o+"",s===c?null:s===n&&c===i?a:(i=c,a=t(n=s,o)))}}function x4(e,t){var r=L0(e),n=r==="transform"?Qh:ed;return this.attrTween(e,typeof t=="function"?(r.local?g4:m4)(r,n,mc(this,"attr."+e,t)):t==null?(r.local?h4:f4)(r):(r.local?p4:d4)(r,n,t))}function v4(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function _4(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function E4(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&_4(e,a)),r}return i._value=t,i}function w4(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&v4(e,a)),r}return i._value=t,i}function y4(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=L0(e);return this.tween(r,(n.local?E4:w4)(n,t))}function D4(e,t){return function(){hc(this,e).delay=+t.apply(this,arguments)}}function A4(e,t){return t=+t,function(){hc(this,e).delay=t}}function C4(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?D4:A4)(t,e)):fn(this.node(),t).delay}function T4(e,t){return function(){Dn(this,e).duration=+t.apply(this,arguments)}}function S4(e,t){return t=+t,function(){Dn(this,e).duration=t}}function F4(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?T4:S4)(t,e)):fn(this.node(),t).duration}function b4(e,t){if(typeof t!="function")throw new Error;return function(){Dn(this,e).ease=t}}function k4(e){var t=this._id;return arguments.length?this.each(b4(t,e)):fn(this.node(),t).ease}function N4(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Dn(this,e).ease=r}}function I4(e){if(typeof e!="function")throw new Error;return this.each(N4(this._id,e))}function O4(e){typeof e!="function"&&(e=C1(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var a=t[i],s=a.length,o=n[i]=[],c,l=0;l<s;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&o.push(c);return new wn(n,this._parents,this._name,this._id)}function B4(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o<a;++o)for(var c=t[o],l=r[o],u=c.length,m=s[o]=new Array(u),d,g=0;g<u;++g)(d=c[g]||l[g])&&(m[g]=d);for(;o<n;++o)s[o]=t[o];return new wn(s,this._parents,this._name,this._id)}function P4(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function j4(e,t,r){var n,i,a=P4(t)?hc:Dn;return function(){var s=a(this,e),o=s.on;o!==n&&(i=(n=o).copy()).on(t,r),s.on=i}}function R4(e,t){var r=this._id;return arguments.length<2?fn(this.node(),r).on.on(e):this.each(j4(r,e,t))}function L4(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function M4(){return this.on("end.remove",L4(this._id))}function U4(e){var t=this._name,r=this._id;typeof e!="function"&&(e=T1(e));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o=n[s],c=o.length,l=a[s]=new Array(c),u,m,d=0;d<c;++d)(u=o[d])&&(m=e.call(u,u.__data__,d,o))&&("__data__"in u&&(m.__data__=u.__data__),l[d]=m,bo(l[d],t,r,d,l,fn(u,r)));return new wn(a,this._parents,t,r)}function W4(e){var t=this._name,r=this._id;typeof e!="function"&&(e=S1(e));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var c=n[o],l=c.length,u,m=0;m<l;++m)if(u=c[m]){for(var d=e.call(u,u.__data__,m,c),g,v=fn(u,r),p=0,_=d.length;p<_;++p)(g=d[p])&&bo(g,t,r,p,d,v);a.push(d),s.push(u)}return new wn(a,s,t,r)}var z4=Ii.prototype.constructor;function V4(){return new z4(this._groups,this._parents)}function H4(e,t){var r,n,i;return function(){var a=Va(this,e),s=(this.style.removeProperty(e),Va(this,e));return a===s?null:a===r&&s===n?i:i=t(r=a,n=s)}}function td(e){return function(){this.style.removeProperty(e)}}function $4(e,t,r){var n,i=r+"",a;return function(){var s=Va(this,e);return s===i?null:s===n?a:a=t(n=s,r)}}function G4(e,t,r){var n,i,a;return function(){var s=Va(this,e),o=r(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(e),Va(this,e))),s===c?null:s===n&&c===i?a:(i=c,a=t(n=s,o))}}function X4(e,t){var r,n,i,a="style."+t,s="end."+a,o;return function(){var c=Dn(this,e),l=c.on,u=c.value[a]==null?o||(o=td(t)):void 0;(l!==r||i!==u)&&(n=(r=l).copy()).on(s,i=u),c.on=n}}function K4(e,t,r){var n=(e+="")=="transform"?n4:ed;return t==null?this.styleTween(e,H4(e,n)).on("end.style."+e,td(e)):typeof t=="function"?this.styleTween(e,G4(e,n,mc(this,"style."+e,t))).each(X4(this._id,e)):this.styleTween(e,$4(e,n,t),r).on("end.style."+e,null)}function Y4(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function q4(e,t,r){var n,i;function a(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&Y4(e,s,r)),n}return a._value=t,a}function J4(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,q4(e,t,r??""))}function Z4(e){return function(){this.textContent=e}}function Q4(e){return function(){var t=e(this);this.textContent=t??""}}function eC(e){return this.tween("text",typeof e=="function"?Q4(mc(this,"text",e)):Z4(e==null?"":e+""))}function tC(e){return function(t){this.textContent=e.call(this,t)}}function rC(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&tC(i)),t}return n._value=e,n}function nC(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,rC(e))}function iC(){for(var e=this._name,t=this._id,r=rd(),n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,c,l=0;l<o;++l)if(c=s[l]){var u=fn(c,t);bo(c,e,r,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new wn(n,this._parents,e,r)}function aC(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},c={value:function(){--i===0&&a()}};r.each(function(){var l=Dn(this,n),u=l.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(c)),l.on=t}),i===0&&a()})}var sC=0;function wn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function gc(e){return Ii().transition(e)}function rd(){return++sC}var mi=Ii.prototype;wn.prototype=gc.prototype={constructor:wn,select:U4,selectAll:W4,filter:O4,merge:B4,selection:V4,transition:iC,call:mi.call,nodes:mi.nodes,node:mi.node,size:mi.size,empty:mi.empty,each:mi.each,on:R4,attr:x4,attrTween:y4,style:K4,styleTween:J4,text:eC,textTween:nC,remove:M4,tween:u4,delay:C4,duration:F4,ease:k4,easeVarying:I4,end:aC,[Symbol.iterator]:mi[Symbol.iterator]};function oC(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var lC={time:null,delay:0,duration:250,ease:oC};function cC(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function uC(e){var t,r;e instanceof wn?(t=e._id,e=e._name):(t=rd(),(r=lC).time=fc(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,c,l=0;l<o;++l)(c=s[l])&&bo(c,e,t,l,s,r||cC(c,t));return new wn(n,this._parents,e,t)}Ii.prototype.interrupt=BA;Ii.prototype.transition=uC;var fC=[null];function hC(e,t){var r=e.__transition,n,i;if(r){t=t==null?null:t+"";for(i in r)if((n=r[i]).state>Dl&&n.name===t)return new wn([[e]],fC,t,+i)}return null}function bl(e){e.preventDefault(),e.stopImmediatePropagation()}function dC(e){var t=e.document.documentElement,r=ze(e).on("dragstart.drag",bl,!0);"onselectstart"in t?r.on("selectstart.drag",bl,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function pC(e,t){var r=e.document.documentElement,n=ze(e).on("dragstart.drag",null);t&&(n.on("click.drag",bl,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Ss=e=>()=>e;function mC(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function Ln(e,t,r){this.k=e,this.x=t,this.y=r}Ln.prototype={constructor:Ln,scale:function(e){return e===1?this:new Ln(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ln(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var No=new Ln(1,0,0);Io.prototype=Ln.prototype;function Io(e){for(;!e.__zoom;)if(!(e=e.parentNode))return No;return e.__zoom}function nl(e){e.stopImmediatePropagation()}function Da(e){e.preventDefault(),e.stopImmediatePropagation()}function gC(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function xC(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function l0(){return this.__zoom||No}function vC(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function _C(){return navigator.maxTouchPoints||"ontouchstart"in this}function EC(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],a=e.invertY(t[0][1])-r[0][1],s=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function wC(){var e=gC,t=xC,r=EC,n=vC,i=_C,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],o=250,c=o4,l=So("start","zoom","end"),u,m,d,g=500,v=150,p=0,_=10;function E(b){b.property("__zoom",l0).on("wheel.zoom",Y).on("mousedown.zoom",W).on("dblclick.zoom",Z).filter(i).on("touchstart.zoom",N).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(b,V,q,re){var le=b.selection?b.selection():b;le.property("__zoom",l0),b!==le?I(b,V,q,re):le.interrupt().each(function(){U(this,arguments).event(re).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},E.scaleBy=function(b,V,q,re){E.scaleTo(b,function(){var le=this.__zoom.k,pe=typeof V=="function"?V.apply(this,arguments):V;return le*pe},q,re)},E.scaleTo=function(b,V,q,re){E.transform(b,function(){var le=t.apply(this,arguments),pe=this.__zoom,Ce=q==null?S(le):typeof q=="function"?q.apply(this,arguments):q,Te=pe.invert(Ce),O=typeof V=="function"?V.apply(this,arguments):V;return r(A(D(pe,O),Ce,Te),le,s)},q,re)},E.translateBy=function(b,V,q,re){E.transform(b,function(){return r(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),s)},null,re)},E.translateTo=function(b,V,q,re,le){E.transform(b,function(){var pe=t.apply(this,arguments),Ce=this.__zoom,Te=re==null?S(pe):typeof re=="function"?re.apply(this,arguments):re;return r(No.translate(Te[0],Te[1]).scale(Ce.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof q=="function"?-q.apply(this,arguments):-q),pe,s)},re,le)};function D(b,V){return V=Math.max(a[0],Math.min(a[1],V)),V===b.k?b:new Ln(V,b.x,b.y)}function A(b,V,q){var re=V[0]-q[0]*b.k,le=V[1]-q[1]*b.k;return re===b.x&&le===b.y?b:new Ln(b.k,re,le)}function S(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function I(b,V,q,re){b.on("start.zoom",function(){U(this,arguments).event(re).start()}).on("interrupt.zoom end.zoom",function(){U(this,arguments).event(re).end()}).tween("zoom",function(){var le=this,pe=arguments,Ce=U(le,pe).event(re),Te=t.apply(le,pe),O=q==null?S(Te):typeof q=="function"?q.apply(le,pe):q,K=Math.max(Te[1][0]-Te[0][0],Te[1][1]-Te[0][1]),z=le.__zoom,X=typeof V=="function"?V.apply(le,pe):V,ee=c(z.invert(O).concat(K/z.k),X.invert(O).concat(K/X.k));return function(ye){if(ye===1)ye=X;else{var xe=ee(ye),me=K/xe[2];ye=new Ln(me,O[0]-xe[0]*me,O[1]-xe[1]*me)}Ce.zoom(null,ye)}})}function U(b,V,q){return!q&&b.__zooming||new R(b,V)}function R(b,V){this.that=b,this.args=V,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,V),this.taps=0}R.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,V){return this.mouse&&b!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var V=ze(this.that).datum();l.call(b,this.that,new mC(b,{sourceEvent:this.sourceEvent,target:E,type:b,transform:this.that.__zoom,dispatch:l}),V)}};function Y(b,...V){if(!e.apply(this,arguments))return;var q=U(this,V).event(b),re=this.__zoom,le=Math.max(a[0],Math.min(a[1],re.k*Math.pow(2,n.apply(this,arguments)))),pe=pi(b);if(q.wheel)(q.mouse[0][0]!==pe[0]||q.mouse[0][1]!==pe[1])&&(q.mouse[1]=re.invert(q.mouse[0]=pe)),clearTimeout(q.wheel);else{if(re.k===le)return;q.mouse=[pe,re.invert(pe)],Us(this),q.start()}Da(b),q.wheel=setTimeout(Ce,v),q.zoom("mouse",r(A(D(re,le),q.mouse[0],q.mouse[1]),q.extent,s));function Ce(){q.wheel=null,q.end()}}function W(b,...V){if(d||!e.apply(this,arguments))return;var q=U(this,V,!0).event(b),re=ze(b.view).on("mousemove.zoom",O,!0).on("mouseup.zoom",K,!0),le=pi(b,pe),pe=b.currentTarget,Ce=b.clientX,Te=b.clientY;dC(b.view),nl(b),q.mouse=[le,this.__zoom.invert(le)],Us(this),q.start();function O(z){if(Da(z),!q.moved){var X=z.clientX-Ce,ee=z.clientY-Te;q.moved=X*X+ee*ee>p}q.event(z).zoom("mouse",r(A(q.that.__zoom,q.mouse[0]=pi(z,pe),q.mouse[1]),q.extent,s))}function K(z){re.on("mousemove.zoom mouseup.zoom",null),pC(z.view,q.moved),Da(z),q.event(z).end()}}function Z(b,...V){if(e.apply(this,arguments)){var q=this.__zoom,re=pi(b.changedTouches?b.changedTouches[0]:b,this),le=q.invert(re),pe=q.k*(b.shiftKey?.5:2),Ce=r(A(D(q,pe),re,le),t.apply(this,V),s);Da(b),o>0?ze(this).transition().duration(o).call(I,Ce,re,b):ze(this).call(E.transform,Ce,re,b)}}function N(b,...V){if(e.apply(this,arguments)){var q=b.touches,re=q.length,le=U(this,V,b.changedTouches.length===re).event(b),pe,Ce,Te,O;for(nl(b),Ce=0;Ce<re;++Ce)Te=q[Ce],O=pi(Te,this),O=[O,this.__zoom.invert(O),Te.identifier],le.touch0?!le.touch1&&le.touch0[2]!==O[2]&&(le.touch1=O,le.taps=0):(le.touch0=O,pe=!0,le.taps=1+!!u);u&&(u=clearTimeout(u)),pe&&(le.taps<2&&(m=O[0],u=setTimeout(function(){u=null},g)),Us(this),le.start())}}function M(b,...V){if(this.__zooming){var q=U(this,V).event(b),re=b.changedTouches,le=re.length,pe,Ce,Te,O;for(Da(b),pe=0;pe<le;++pe)Ce=re[pe],Te=pi(Ce,this),q.touch0&&q.touch0[2]===Ce.identifier?q.touch0[0]=Te:q.touch1&&q.touch1[2]===Ce.identifier&&(q.touch1[0]=Te);if(Ce=q.that.__zoom,q.touch1){var K=q.touch0[0],z=q.touch0[1],X=q.touch1[0],ee=q.touch1[1],ye=(ye=X[0]-K[0])*ye+(ye=X[1]-K[1])*ye,xe=(xe=ee[0]-z[0])*xe+(xe=ee[1]-z[1])*xe;Ce=D(Ce,Math.sqrt(ye/xe)),Te=[(K[0]+X[0])/2,(K[1]+X[1])/2],O=[(z[0]+ee[0])/2,(z[1]+ee[1])/2]}else if(q.touch0)Te=q.touch0[0],O=q.touch0[1];else return;q.zoom("touch",r(A(Ce,Te,O),q.extent,s))}}function G(b,...V){if(this.__zooming){var q=U(this,V).event(b),re=b.changedTouches,le=re.length,pe,Ce;for(nl(b),d&&clearTimeout(d),d=setTimeout(function(){d=null},g),pe=0;pe<le;++pe)Ce=re[pe],q.touch0&&q.touch0[2]===Ce.identifier?delete q.touch0:q.touch1&&q.touch1[2]===Ce.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(Ce=pi(Ce,this),Math.hypot(m[0]-Ce[0],m[1]-Ce[1])<_)){var Te=ze(this).on("dblclick.zoom");Te&&Te.apply(this,arguments)}}}return E.wheelDelta=function(b){return arguments.length?(n=typeof b=="function"?b:Ss(+b),E):n},E.filter=function(b){return arguments.length?(e=typeof b=="function"?b:Ss(!!b),E):e},E.touchable=function(b){return arguments.length?(i=typeof b=="function"?b:Ss(!!b),E):i},E.extent=function(b){return arguments.length?(t=typeof b=="function"?b:Ss([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),E):t},E.scaleExtent=function(b){return arguments.length?(a[0]=+b[0],a[1]=+b[1],E):[a[0],a[1]]},E.translateExtent=function(b){return arguments.length?(s[0][0]=+b[0][0],s[1][0]=+b[1][0],s[0][1]=+b[0][1],s[1][1]=+b[1][1],E):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},E.constrain=function(b){return arguments.length?(r=b,E):r},E.duration=function(b){return arguments.length?(o=+b,E):o},E.interpolate=function(b){return arguments.length?(c=b,E):c},E.on=function(){var b=l.on.apply(l,arguments);return b===l?E:b},E.clickDistance=function(b){return arguments.length?(p=(b=+b)*b,E):Math.sqrt(p)},E.tapDistance=function(b){return arguments.length?(_=+b,E):_},E}function nd(e){var t={},r=e.node().nodeName;t.tag=r,r=="#text"?t.text=e.text():r=="#comment"&&(t.comment=e.text()),t.attributes={};var n=e.node().attributes;if(n)for(var i=0;i<n.length;i++){var a=n[i],s=a.name,o=a.value;t.attributes[s]=o}var c=e.node().transform;if(c&&c.baseVal.numberOfItems!=0){var l=c.baseVal.consolidate().matrix;t.translation={x:l.e,y:l.f},t.scale=l.a}if(r=="ellipse"&&(t.center={x:t.attributes.cx,y:t.attributes.cy}),r=="polygon"){var u=e.attr("points").split(" "),m=u.map(function(A){return A.split(",")[0]}),d=u.map(function(A){return A.split(",")[1]}),g=Math.min.apply(null,m),v=Math.max.apply(null,m),p=Math.min.apply(null,d),_=Math.max.apply(null,d),E={x:g,y:p,width:v-g,height:_-p};t.bbox=E,t.center={x:(g+v)/2,y:(p+_)/2}}if(r=="path"){var D=e.attr("d"),u=D.split(/[A-Z ]/);u.shift();var m=u.map(function(N){return+N.split(",")[0]}),d=u.map(function(N){return+N.split(",")[1]}),g=Math.min.apply(null,m),v=Math.max.apply(null,m),p=Math.min.apply(null,d),_=Math.max.apply(null,d),E={x:g,y:p,width:v-g,height:_-p};t.bbox=E,t.center={x:(g+v)/2,y:(p+_)/2},t.totalLength=e.node().getTotalLength()}return r=="text"&&(t.center={x:e.attr("x"),y:e.attr("y")}),r=="#text"?t.text=e.text():r=="#comment"&&(t.comment=e.text()),t}function Ni(e){var t=nd(e);t.children=[];var r=Rr(e.node().childNodes);return r.each(function(){var n=Ni(ze(this));n.parent=t,t.children.push(n)}),t}function xc(e){return e.tag=="#text"?document.createTextNode(""):e.tag=="#comment"?document.createComment(e.comment):document.createElementNS("http://www.w3.org/2000/svg",e.tag)}function kl(e){var t=xc(e),r=ze(t),n=e.attributes;for(var i of Object.keys(n)){var a=n[i];r.attr(i,a)}return t}function c0(e,t){var r=ze(e.node().parentNode),n=kl(t),i=r.insert(function(){return n},function(){return e.node()});return e.remove(),i}function yC(e,t){e.datum(t),e.data([t],function(r){return r.key})}function vc(e,t){yC(e,t);var r=Rr(e.node().childNodes);r.each(function(n,i){vc(ze(this),t.children[i])})}function DC(e,t){var r=e.selectAll(function(){return e.node().childNodes});r=r.data(function(s){return s.children},function(s){return s.tag+"-"+t});var n=r.enter().append(function(s){return xc(s)}),i=r.exit();i=i.remove(),r=n.merge(r);var a={};r.each(function(s){var o=s.tag;a[o]==null&&(a[o]=0);var c=a[o]++;cs.call(this,s,c)})}function cs(e,t=0){var r=ze(this);e.tag;var n=e.attributes,i=r.node().attributes;if(i)for(var a=0;a<i.length;a++){var s=i[a],o=s.name;if(o.split(":")[0]!="xmlns"&&s.namespaceURI){var c=s.namespaceURI.split("/"),l=c[c.length-1];o=l+":"+o}o in n||(n[o]=null)}for(var u of Object.keys(n))r.attr(u,n[u]);e.text&&r.text(e.text),DC(r,t)}function Fs(e){return Object.assign({},e)}function ri(e){return Math.round(e*100)/100}function AC(e){return this._options.zoom=e,this._options.zoom&&!this._zoomBehavior?id.call(this):!this._options.zoom&&this._zoomBehavior&&(this._zoomSelection.on(".zoom",null),this._zoomBehavior=null),this}function id(){var e=this;function t(s){var o=ze(n.node().querySelector("g"));o.attr("transform",s.transform),e._dispatch.call("zoom",e)}var r=this._selection,n=ze(r.node().querySelector("svg"));if(n.size()==0)return this;this._zoomSelection=n;var i=wC().scaleExtent(this._options.zoomScaleExtent).translateExtent(this._options.zoomTranslateExtent).interpolate(ko).on("zoom",t);this._zoomBehavior=i;var a=ze(n.node().querySelector("g"));return n.call(i),this._active||Il.call(this,a),this._originalTransform=Io(n.node()),this}function Nl(e){var t=this._translation,r=this._scale,n=e.datum().translation,i=e.datum().scale,a=Io(this._zoomSelection.node());return t&&(a=a.scale(1/r),a=a.translate(-t.x,-t.y)),a=a.translate(n.x,n.y),a=a.scale(i),a}function Il(e){this._zoomBehavior.transform(this._zoomSelection,Nl.call(this,e)),this._translation=e.datum().translation,this._scale=e.datum().scale,this._originalTransform=No.translate(e.datum().translation.x,e.datum().translation.y).scale(e.datum().scale)}function CC(e){var t=this._zoomSelection;return e&&(t=t.transition(e)),t.call(this._zoomBehavior.transform,this._originalTransform),this}function TC(e){return this._options.zoomScaleExtent=e,this}function SC(e){return this._options.zoomTranslateExtent=e,this}function FC(){return this._zoomBehavior||null}function bC(){return this._zoomSelection||null}function kC(e,t){return function(){const r=e.map(function(n){return ko([n[0][0],n[0][1]],[n[1][0],n[1][1]])});return function(n){return n<1?"M"+r.map(function(i){return i(n)}).join("L"):t}}}function NC(e,t,r,n){const i=e,a=i.cloneNode(),s=i.getTotalLength(),o=(a.setAttribute("d",t),a).getTotalLength(),c=[0];let l=0;const u=n?r:r/Math.max(s,o);for(;(l+=u)<1;)c.push(l);return c.push(1),c.map(function(d){const g=i.getPointAtLength(d*s),v=a.getPointAtLength(d*o);return[[g.x,g.y],[v.x,v.y]]})}function IC(){return this._data||null}function ad(e){return e.attributes.class=="edge"||e.tag=="a"&&e.parent.tag=="g"&&e.parent.parent.attributes.class=="edge"}function sd(e){return e.parent&&ad(e.parent)}function OC(e){return e.parent.attributes.class=="edge"?e.parent:e.parent.parent.parent}function BC(e){return OC(e).children.find(function(t){return t.tag=="title"})}function PC(e){return this._busy?(this._queue.push(this.render.bind(this,e)),this):(this._dispatch.call("renderStart",this),this._transitionFactory?po((function(){this._transition=gc(this._transitionFactory()),u0.call(this,e)}).bind(this),0):u0.call(this,e),this)}function u0(e){var t=this._transition,r=this._options.fade&&t!=null,n=this._options.tweenPaths,i=this._options.tweenShapes,a=this._options.convertEqualSidedPolygons,s=this._options.growEnteringEdges&&t!=null,o=this._attributer,c=this;function l(p){var _=p.selectAll(function(){return p.node().childNodes});_=_.data(function(S){return S.children},function(S){return S.key});var E=_.enter().append(function(S){var I=xc(S);return S.tag=="#text"&&r&&(I.nodeValue=S.text),I});if(r||s&&ad(p.datum())){var D=E.filter(function(S){return S.tag[0]=="#"?null:this}).each(function(S){var I=ze(this);for(var U of Object.keys(S.attributes)){var R=S.attributes[U];I.attr(U,R)}});D.filter(function(S){return S.tag=="svg"||S.tag=="g"?null:this}).style("opacity",0)}var A=_.exit();o&&A.each(o),t&&(A=A.transition(t),r&&A.filter(function(S){return S.tag[0]=="#"?null:this}).style("opacity",0)),A=A.remove(),_=E.merge(_),_.each(u)}function u(p){var _=ze(this);if(p.tag=="svg"){var E=c._options;if(E.width!=null||E.height!=null){var D=E.width,A=E.height;D==null?D=p.attributes.width.replace("pt","")*4/3:(_.attr("width",D),p.attributes.width=D),A==null?A=p.attributes.height.replace("pt","")*4/3:(_.attr("height",A),p.attributes.height=A),E.fit||(_.attr("viewBox",`0 0 ${D*3/4/E.scale} ${A*3/4/E.scale}`),p.attributes.viewBox=`0 0 ${D*3/4/E.scale} ${A*3/4/E.scale}`)}E.scale!=1&&(E.fit||E.width==null&&E.height==null)&&(D=p.attributes.viewBox.split(" ")[2],A=p.attributes.viewBox.split(" ")[3],_.attr("viewBox",`0 0 ${D/E.scale} ${A/E.scale}`),p.attributes.viewBox=`0 0 ${D/E.scale} ${A/E.scale}`)}o&&_.each(o);var S=p.tag,I=p.attributes,U=_.node().attributes;if(U)for(var R=0;R<U.length;R++){var Y=U[R],W=Y.name;if(W.split(":")[0]!="xmlns"&&Y.namespaceURI){var Z=Y.namespaceURI.split("/"),N=Z[Z.length-1];W=N+":"+W}W in I||(I[W]=null)}var M=!1,G=!1;if(i&&t){if((this.nodeName=="polygon"||this.nodeName=="ellipse")&&p.alternativeOld&&(G=!0),(S=="polygon"||S=="ellipse")&&p.alternativeNew&&(M=!0),this.nodeName=="polygon"&&S=="polygon"&&p.alternativeOld){var b=nd(_),V=b.attributes.points;if(!a){var q=V.split(" ").length,re=p.attributes.points,le=re.split(" ").length;le==q&&(M=!1,G=!1)}}if(G){var pe=p.alternativeOld,Ce=c0(_,pe);Ce.data([p],function(){return p.key}),_=Ce}if(M){var Te=p.alternativeNew;S="path",I=Te.attributes}}var O=_;t&&(O=O.transition(t),r&&O.filter(function(_e){return _e.tag[0]=="#"?null:this}).style("opacity",1),O.filter(function(_e){return _e.tag[0]=="#"?null:this}).on("end",function(_e){ze(this).attr("style",_e&&_e.attributes&&_e.attributes.style||null)}));var K=s&&S=="path"&&p.offset;if(K){var z=p.totalLength;_.attr("stroke-dasharray",z+" "+z).attr("stroke-dashoffset",z).attr("transform","translate("+p.offset.x+","+p.offset.y+")"),I["stroke-dashoffset"]=0,I.transform="translate(0,0)",O.attr("stroke-dashoffset",I["stroke-dashoffset"]).attr("transform",I.transform).on("start",function(){ze(this).style("opacity",null)}).on("end",function(){ze(this).attr("stroke-dashoffset",null).attr("stroke-dasharray",null).attr("transform",null)})}var X=s&&S=="polygon"&&sd(p)&&p.offset&&p.parent.children[3].tag=="path";if(X){var ee=ze(_.node().parentNode.querySelector("path")),ye=ee.node().getPointAtLength(0),xe=ee.node().getPointAtLength(p.totalLength),me=ee.node().getPointAtLength(p.totalLength-1),se=Math.atan2(xe.y-me.y,xe.x-me.x)*180/Math.PI,be=ye.x-xe.x+p.offset.x,Le=ye.y-xe.y+p.offset.y;_.attr("transform","translate("+be+","+Le+")"),O.attrTween("transform",function(){return function(_e){var Fe=ee.node().getPointAtLength(p.totalLength*_e),Pe=ee.node().getPointAtLength(p.totalLength*_e+1),ge=Math.atan2(Pe.y-Fe.y,Pe.x-Fe.x)*180/Math.PI-se;return be=Fe.x-xe.x+p.offset.x*(1-_e),Le=Fe.y-xe.y+p.offset.y*(1-_e),"translate("+be+","+Le+") rotate("+ge+" "+xe.x+" "+xe.y+")"}}).on("start",function(){ze(this).style("opacity",null)}).on("end",function(){ze(this).attr("transform",null)})}var Ye=n&&t&&S=="path"&&_.attr("d")!=null;for(var We of Object.keys(I)){var ft=I[We];if(Ye&&We=="d"){var re=(p.alternativeOld||p).points;re&&O.attrTween("d",kC(re,ft))}else{if(We=="transform"&&p.translation)if(t){var He=O.on("end");O.on("start",function(){c._zoomBehavior&&O.tween("attr.transform",function(){var _e=this;return function(Fe){_e.setAttribute("transform",Qh(Io(c._zoomSelection.node()).toString(),Nl.call(c,_).toString())(Fe))}})}).on("end",function(){He.call(this),c._zoomBehavior&&Il.call(c,_)})}else c._zoomBehavior&&(Il.call(c,_),ft=Nl.call(c,_).toString());O.attr(We,ft)}}M&&O.on("end",function(_e,Fe,Pe){Ce=ze(this);var ge=c0(Ce,_e);ge.data([_e],function(){return _e.key})}),p.text&&O.text(p.text),l(_)}var m=this._selection;if(t!=null){var d=this._jobs;if(c._active)return d.push(null),this;m.transition(t).transition().duration(0).on("end",function(){c._active=!1,d.length!=0&&(d.shift(),c.render())}),this._active=!0}t!=null&&m.transition(t).on("start",function(){c._dispatch.call("transitionStart",c)}).on("end",function(){c._dispatch.call("transitionEnd",c)}).transition().duration(0).on("start",function(){c._dispatch.call("restoreEnd",c),c._dispatch.call("end",c),e&&e.call(c)});var g=this._data,v=m.selectAll("svg").data([g],function(p){return p.key});return v=v.enter().append("svg").merge(v),u.call(v.node(),g),this._options.zoom&&!this._zoomBehavior&&id.call(this),c._dispatch.call("renderEnd",c),t==null&&(this._dispatch.call("end",this),e&&e.call(this)),this}function jC(){return this._graphvizVersion}(()=>{var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(t){t=t||{};var r=typeof t<"u"?t:{},n,i;r.ready=new Promise(function(H,ce){n=H,i=ce});var a=Object.assign({},r),s="./this.program",o=!0,c="";function l(H){return r.locateFile?r.locateFile(H,c):c+H}var u;typeof document<"u"&&document.currentScript&&(c=document.currentScript.src),e&&(c=e),c.indexOf("blob:")!==0?c=c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):c="";var m=r.print||console.log.bind(console),d=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.arguments&&r.arguments,r.thisProgram&&(s=r.thisProgram),r.quit&&r.quit;var g;r.wasmBinary&&(g=r.wasmBinary),r.noExitRuntime,typeof WebAssembly!="object"&&ee("no native wasm support detected");var v,p=!1;function _(H,ce){H||ee(ce)}var E=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function D(H,ce,we){for(var Me=ce+we,qe=ce;H[qe]&&!(qe>=Me);)++qe;if(qe-ce>16&&H.buffer&&E)return E.decode(H.subarray(ce,qe));for(var gt="";ce<qe;){var ot=H[ce++];if(!(ot&128)){gt+=String.fromCharCode(ot);continue}var Je=H[ce++]&63;if((ot&224)==192){gt+=String.fromCharCode((ot&31)<<6|Je);continue}var Mt=H[ce++]&63;if((ot&240)==224?ot=(ot&15)<<12|Je<<6|Mt:ot=(ot&7)<<18|Je<<12|Mt<<6|H[ce++]&63,ot<65536)gt+=String.fromCharCode(ot);else{var Kt=ot-65536;gt+=String.fromCharCode(55296|Kt>>10,56320|Kt&1023)}}return gt}function A(H,ce){return H?D(Y,H,ce):""}function S(H,ce,we,Me){if(!(Me>0))return 0;for(var qe=we,gt=we+Me-1,ot=0;ot<H.length;++ot){var Je=H.charCodeAt(ot);if(Je>=55296&&Je<=57343){var Mt=H.charCodeAt(++ot);Je=65536+((Je&1023)<<10)|Mt&1023}if(Je<=127){if(we>=gt)break;ce[we++]=Je}else if(Je<=2047){if(we+1>=gt)break;ce[we++]=192|Je>>6,ce[we++]=128|Je&63}else if(Je<=65535){if(we+2>=gt)break;ce[we++]=224|Je>>12,ce[we++]=128|Je>>6&63,ce[we++]=128|Je&63}else{if(we+3>=gt)break;ce[we++]=240|Je>>18,ce[we++]=128|Je>>12&63,ce[we++]=128|Je>>6&63,ce[we++]=128|Je&63}}return ce[we]=0,we-qe}function I(H){for(var ce=0,we=0;we<H.length;++we){var Me=H.charCodeAt(we);Me<=127?ce++:Me<=2047?ce+=2:Me>=55296&&Me<=57343?(ce+=4,++we):ce+=3}return ce}var U,R,Y,W,Z,N;function M(H){U=H,r.HEAP8=R=new Int8Array(H),r.HEAP16=new Int16Array(H),r.HEAP32=W=new Int32Array(H),r.HEAPU8=Y=new Uint8Array(H),r.HEAPU16=new Uint16Array(H),r.HEAPU32=Z=new Uint32Array(H),r.HEAPF32=new Float32Array(H),r.HEAPF64=N=new Float64Array(H)}r.INITIAL_MEMORY;var G=[],b=[],V=[];function q(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)pe(r.preRun.shift());We(G)}function re(){We(b)}function le(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Te(r.postRun.shift());We(V)}function pe(H){G.unshift(H)}function Ce(H){b.unshift(H)}function Te(H){V.unshift(H)}var O=0,K=null;function z(H){O++,r.monitorRunDependencies&&r.monitorRunDependencies(O)}function X(H){if(O--,r.monitorRunDependencies&&r.monitorRunDependencies(O),O==0&&K){var ce=K;K=null,ce()}}function ee(H){r.onAbort&&r.onAbort(H),H="Aborted("+H+")",d(H),p=!0,H+=". Build with -sASSERTIONS for more info.";var ce=new WebAssembly.RuntimeError(H);throw i(ce),ce}var ye="data:application/octet-stream;base64,";function xe(H){return H.startsWith(ye)}var me;me="expatlib.wasm",xe(me)||(me=l(me));function se(H){try{if(H==me&&g)return new Uint8Array(g);throw"both async and sync fetching of the wasm failed"}catch(ce){ee(ce)}}function be(){return!g&&o&&typeof fetch=="function"?fetch(me,{credentials:"same-origin"}).then(function(H){if(!H.ok)throw"failed to load wasm binary file at '"+me+"'";return H.arrayBuffer()}).catch(function(){return se(me)}):Promise.resolve().then(function(){return se(me)})}function Le(){var H={a:An};function ce(ot,Je){var Mt=ot.exports;r.asm=Mt,v=r.asm.m,M(v.buffer),r.asm.G,Ce(r.asm.n),X()}z();function we(ot){ce(ot.instance)}function Me(ot){return be().then(function(Je){return WebAssembly.instantiate(Je,H)}).then(function(Je){return Je}).then(ot,function(Je){d("failed to asynchronously prepare wasm: "+Je),ee(Je)})}function qe(){return!g&&typeof WebAssembly.instantiateStreaming=="function"&&!xe(me)&&typeof fetch=="function"?fetch(me,{credentials:"same-origin"}).then(function(ot){var Je=WebAssembly.instantiateStreaming(ot,H);return Je.then(we,function(Mt){return d("wasm streaming compile failed: "+Mt),d("falling back to ArrayBuffer instantiation"),Me(we)})}):Me(we)}if(r.instantiateWasm)try{var gt=r.instantiateWasm(H,ce);return gt}catch(ot){return d("Module.instantiateWasm callback failed with error: "+ot),!1}return qe().catch(i),{}}var Ye={11534:H=>{var ce=r.getCache(r.CExpatJS)[H];if(!ce.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";ce.startElement()},11752:H=>{var ce=r.getCache(r.CExpatJS)[H];if(!ce.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";ce.endElement()},11964:H=>{var ce=r.getCache(r.CExpatJS)[H];if(!ce.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";ce.characterData()}};function We(H){for(;H.length>0;)H.shift()(r)}function ft(H,ce,we,Me){}function He(){return Date.now()}function _e(){ee("")}var Fe=[];function Pe(H,ce){Fe.length=0;var we;for(ce>>=2;we=Y[H++];)ce+=we!=105&ce,Fe.push(we==105?W[ce]:N[ce++>>1]),++ce;return Fe}function ge(H,ce,we){var Me=Pe(ce,we);return Ye[H].apply(null,Me)}function Oe(H,ce,we){Y.copyWithin(H,ce,ce+we)}function Qe(){return 2147483648}function dt(H){try{return v.grow(H-U.byteLength+65535>>>16),M(v.buffer),1}catch{}}function st(H){var ce=Y.length;H=H>>>0;var we=Qe();if(H>we)return!1;let Me=(Mt,Kt)=>Mt+(Kt-Mt%Kt)%Kt;for(var qe=1;qe<=4;qe*=2){var gt=ce*(1+.2/qe);gt=Math.min(gt,H+100663296);var ot=Math.min(we,Me(Math.max(H,gt),65536)),Je=dt(ot);if(Je)return!0}return!1}var je={};function Nt(){return s||"./this.program"}function Be(){if(!Be.strings){var H=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",ce={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:H,_:Nt()};for(var we in je)je[we]===void 0?delete ce[we]:ce[we]=je[we];var Me=[];for(var we in ce)Me.push(we+"="+ce[we]);Be.strings=Me}return Be.strings}function Ze(H,ce,we){for(var Me=0;Me<H.length;++Me)R[ce++>>0]=H.charCodeAt(Me);R[ce>>0]=0}function Ft(H,ce){var we=0;return Be().forEach(function(Me,qe){var gt=ce+we;Z[H+qe*4>>2]=gt,Ze(Me,gt),we+=Me.length+1}),0}function pt(H,ce){var we=Be();Z[H>>2]=we.length;var Me=0;return we.forEach(function(qe){Me+=qe.length+1}),Z[ce>>2]=Me,0}function zt(H){return 52}function It(H,ce,we,Me){return 52}function $e(H,ce,we,Me,qe){return 70}var Zt=[null,[],[]];function y(H,ce){var we=Zt[H];ce===0||ce===10?((H===1?m:d)(D(we,0)),we.length=0):we.push(ce)}function nt(H,ce,we,Me){for(var qe=0,gt=0;gt<we;gt++){var ot=Z[ce>>2],Je=Z[ce+4>>2];ce+=8;for(var Mt=0;Mt<Je;Mt++)y(H,Y[ot+Mt]);qe+=Je}return Z[Me>>2]=qe,0}function ui(H,ce,we){var Me=I(H)+1,qe=new Array(Me);return S(H,qe,0,qe.length),qe}var An={g:ft,j:He,c:_e,a:ge,k:Oe,e:st,h:Ft,i:pt,d:zt,f:It,l:$e,b:nt};Le(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.n).apply(null,arguments)};var Cn=r._emscripten_bind_CExpat_CExpat_0=function(){return(Cn=r._emscripten_bind_CExpat_CExpat_0=r.asm.o).apply(null,arguments)},Tn=r._emscripten_bind_CExpat_version_0=function(){return(Tn=r._emscripten_bind_CExpat_version_0=r.asm.p).apply(null,arguments)},Kn=r._emscripten_bind_CExpat_create_0=function(){return(Kn=r._emscripten_bind_CExpat_create_0=r.asm.q).apply(null,arguments)},Yn=r._emscripten_bind_CExpat_destroy_0=function(){return(Yn=r._emscripten_bind_CExpat_destroy_0=r.asm.r).apply(null,arguments)},Ur=r._emscripten_bind_CExpat_parse_1=function(){return(Ur=r._emscripten_bind_CExpat_parse_1=r.asm.s).apply(null,arguments)},qn=r._emscripten_bind_CExpat_tag_0=function(){return(qn=r._emscripten_bind_CExpat_tag_0=r.asm.t).apply(null,arguments)},Sn=r._emscripten_bind_CExpat_attrs_0=function(){return(Sn=r._emscripten_bind_CExpat_attrs_0=r.asm.u).apply(null,arguments)},qr=r._emscripten_bind_CExpat_content_0=function(){return(qr=r._emscripten_bind_CExpat_content_0=r.asm.v).apply(null,arguments)},Fn=r._emscripten_bind_CExpat_startElement_0=function(){return(Fn=r._emscripten_bind_CExpat_startElement_0=r.asm.w).apply(null,arguments)},Jn=r._emscripten_bind_CExpat_endElement_0=function(){return(Jn=r._emscripten_bind_CExpat_endElement_0=r.asm.x).apply(null,arguments)},bn=r._emscripten_bind_CExpat_characterData_0=function(){return(bn=r._emscripten_bind_CExpat_characterData_0=r.asm.y).apply(null,arguments)},kn=r._emscripten_bind_CExpat___destroy___0=function(){return(kn=r._emscripten_bind_CExpat___destroy___0=r.asm.z).apply(null,arguments)},Nn=r._emscripten_bind_VoidPtr___destroy___0=function(){return(Nn=r._emscripten_bind_VoidPtr___destroy___0=r.asm.A).apply(null,arguments)},Ge=r._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Ge=r._emscripten_bind_CExpatJS_CExpatJS_0=r.asm.B).apply(null,arguments)},bt=r._emscripten_bind_CExpatJS_startElement_0=function(){return(bt=r._emscripten_bind_CExpatJS_startElement_0=r.asm.C).apply(null,arguments)},Dr=r._emscripten_bind_CExpatJS_endElement_0=function(){return(Dr=r._emscripten_bind_CExpatJS_endElement_0=r.asm.D).apply(null,arguments)},hn=r._emscripten_bind_CExpatJS_characterData_0=function(){return(hn=r._emscripten_bind_CExpatJS_characterData_0=r.asm.E).apply(null,arguments)},C=r._emscripten_bind_CExpatJS___destroy___0=function(){return(C=r._emscripten_bind_CExpatJS___destroy___0=r.asm.F).apply(null,arguments)};r._malloc=function(){return(r._malloc=r.asm.H).apply(null,arguments)},r.___start_em_js=11436,r.___stop_em_js=11534;var B;K=function H(){B||F(),B||(K=H)};function F(H){if(O>0||(q(),O>0))return;function ce(){B||(B=!0,r.calledRun=!0,!p&&(re(),n(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),le()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),ce()},1)):ce()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();F();function k(){}k.prototype=Object.create(k.prototype),k.prototype.constructor=k,k.prototype.__class__=k,k.__cache__={},r.WrapperObject=k;function P(H){return(H||k).__cache__}r.getCache=P;function j(H,ce){var we=P(ce),Me=we[H];return Me||(Me=Object.create((ce||k).prototype),Me.ptr=H,we[H]=Me)}r.wrapPointer=j;function ne(H,ce){return j(H.ptr,ce)}r.castObject=ne,r.NULL=j(0);function fe(H){if(!H.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";H.__destroy__(),delete P(H.__class__)[H.ptr]}r.destroy=fe;function te(H,ce){return H.ptr===ce.ptr}r.compare=te;function ie(H){return H.ptr}r.getPointer=ie;function oe(H){return H.__class__}r.getClass=oe;var he={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(he.needed){for(var H=0;H<he.temps.length;H++)r._free(he.temps[H]);he.temps.length=0,r._free(he.buffer),he.buffer=0,he.size+=he.needed,he.needed=0}he.buffer||(he.size+=128,he.buffer=r._malloc(he.size),_(he.buffer)),he.pos=0},alloc:function(H,ce){_(he.buffer);var we=ce.BYTES_PER_ELEMENT,Me=H.length*we;Me=Me+7&-8;var qe;return he.pos+Me>=he.size?(_(Me>0),he.needed+=Me,qe=r._malloc(Me),he.temps.push(qe)):(qe=he.buffer+he.pos,he.pos+=Me),qe},copy:function(H,ce,we){we>>>=0;var Me=ce.BYTES_PER_ELEMENT;switch(Me){case 2:we>>>=1;break;case 4:we>>>=2;break;case 8:we>>>=3;break}for(var qe=0;qe<H.length;qe++)ce[we+qe]=H[qe]}};function Ie(H){if(typeof H=="string"){var ce=ui(H),we=he.alloc(ce,R);return he.copy(ce,R,we),we}return H}function De(){this.ptr=Cn(),P(De)[this.ptr]=this}De.prototype=Object.create(k.prototype),De.prototype.constructor=De,De.prototype.__class__=De,De.__cache__={},r.CExpat=De,De.prototype.version=De.prototype.version=function(){var H=this.ptr;return A(Tn(H))},De.prototype.create=De.prototype.create=function(){var H=this.ptr;return!!Kn(H)},De.prototype.destroy=De.prototype.destroy=function(){var H=this.ptr;Yn(H)},De.prototype.parse=De.prototype.parse=function(H){var ce=this.ptr;return he.prepare(),H&&typeof H=="object"?H=H.ptr:H=Ie(H),!!Ur(ce,H)},De.prototype.tag=De.prototype.tag=function(){var H=this.ptr;return A(qn(H))},De.prototype.attrs=De.prototype.attrs=function(){var H=this.ptr;return A(Sn(H))},De.prototype.content=De.prototype.content=function(){var H=this.ptr;return A(qr(H))},De.prototype.startElement=De.prototype.startElement=function(){var H=this.ptr;Fn(H)},De.prototype.endElement=De.prototype.endElement=function(){var H=this.ptr;Jn(H)},De.prototype.characterData=De.prototype.characterData=function(){var H=this.ptr;bn(H)},De.prototype.__destroy__=De.prototype.__destroy__=function(){var H=this.ptr;kn(H)};function Ae(){throw"cannot construct a VoidPtr, no constructor in IDL"}Ae.prototype=Object.create(k.prototype),Ae.prototype.constructor=Ae,Ae.prototype.__class__=Ae,Ae.__cache__={},r.VoidPtr=Ae,Ae.prototype.__destroy__=Ae.prototype.__destroy__=function(){var H=this.ptr;Nn(H)};function Se(){this.ptr=Ge(),P(Se)[this.ptr]=this}return Se.prototype=Object.create(De.prototype),Se.prototype.constructor=Se,Se.prototype.__class__=Se,Se.__cache__={},r.CExpatJS=Se,Se.prototype.startElement=Se.prototype.startElement=function(){var H=this.ptr;bt(H)},Se.prototype.endElement=Se.prototype.endElement=function(){var H=this.ptr;Dr(H)},Se.prototype.characterData=Se.prototype.characterData=function(){var H=this.ptr;hn(H)},Se.prototype.__destroy__=Se.prototype.__destroy__=function(){var H=this.ptr;C(H)},t.ready}})();function RC(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof jc<"u")return jc;throw new Error("unable to locate global object")}const LC=RC();let il=LC.__hpcc_wasmFolder||void 0;function _c(e){if(!arguments.length)return il;const t=il;return il=e,t}function MC(e,t){for(;e.charAt(e.length-1)===t;)e=e.substring(0,e.length-1);return e}function UC(e,t){for(;e.charAt(0)===t;)e=e.substring(1);return e}let Ws=typeof document<"u"&&document.currentScript?document.currentScript.src:typeof __filename<"u"?__filename:typeof document<"u"&&document.currentScript?document.currentScript.src:"";Ws=Ws.substr(0,Ws.replace(/[?#].*/,"").lastIndexOf("/")+1);async function WC(e){return fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(t=>{throw t})}const al={};async function zC(e,t,r){const n=e.default||e;return r||(r=await WC(t)),await n({wasmBinary:r})}async function Ec(e,t,r,n){const i=`${MC(r||_c()||Ws||".","/")}/${UC(`${t}.wasm`,"/")}`;return al[i]||(al[i]=zC(e,i,n)),al[i]}var VC=(()=>{var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(t){t=t||{};var r=typeof t<"u"?t:{},n,i;r.ready=new Promise(function(h,x){n=h,i=x});var a=Object.assign({},r),s="./this.program",o=(h,x)=>{throw x},c=!0,l="";function u(h){return r.locateFile?r.locateFile(h,l):l+h}var m,d,g;typeof document<"u"&&document.currentScript&&(l=document.currentScript.src),e&&(l=e),l.indexOf("blob:")!==0?l=l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):l="",m=h=>{var x=new XMLHttpRequest;return x.open("GET",h,!1),x.send(null),x.responseText},d=(h,x,w)=>{var T=new XMLHttpRequest;T.open("GET",h,!0),T.responseType="arraybuffer",T.onload=()=>{if(T.status==200||T.status==0&&T.response){x(T.response);return}w()},T.onerror=w,T.send(null)};var v=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.arguments&&r.arguments,r.thisProgram&&(s=r.thisProgram),r.quit&&(o=r.quit);var _;r.wasmBinary&&(_=r.wasmBinary);var E=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Ye("no native wasm support detected");var D,A=!1;function S(h,x){h||Ye(x)}var I=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function U(h,x,w){for(var T=x+w,L=x;h[L]&&!(L>=T);)++L;if(L-x>16&&h.buffer&&I)return I.decode(h.subarray(x,L));for(var J="";x<L;){var Q=h[x++];if(!(Q&128)){J+=String.fromCharCode(Q);continue}var ae=h[x++]&63;if((Q&224)==192){J+=String.fromCharCode((Q&31)<<6|ae);continue}var Re=h[x++]&63;if((Q&240)==224?Q=(Q&15)<<12|ae<<6|Re:Q=(Q&7)<<18|ae<<12|Re<<6|h[x++]&63,Q<65536)J+=String.fromCharCode(Q);else{var Xe=Q-65536;J+=String.fromCharCode(55296|Xe>>10,56320|Xe&1023)}}return J}function R(h,x){return h?U(M,h,x):""}function Y(h,x,w,T){if(!(T>0))return 0;for(var L=w,J=w+T-1,Q=0;Q<h.length;++Q){var ae=h.charCodeAt(Q);if(ae>=55296&&ae<=57343){var Re=h.charCodeAt(++Q);ae=65536+((ae&1023)<<10)|Re&1023}if(ae<=127){if(w>=J)break;x[w++]=ae}else if(ae<=2047){if(w+1>=J)break;x[w++]=192|ae>>6,x[w++]=128|ae&63}else if(ae<=65535){if(w+2>=J)break;x[w++]=224|ae>>12,x[w++]=128|ae>>6&63,x[w++]=128|ae&63}else{if(w+3>=J)break;x[w++]=240|ae>>18,x[w++]=128|ae>>12&63,x[w++]=128|ae>>6&63,x[w++]=128|ae&63}}return x[w]=0,w-L}function W(h){for(var x=0,w=0;w<h.length;++w){var T=h.charCodeAt(w);T<=127?x++:T<=2047?x+=2:T>=55296&&T<=57343?(x+=4,++w):x+=3}return x}var Z,N,M,G,b,V,q;function re(h){Z=h,r.HEAP8=N=new Int8Array(h),r.HEAP16=G=new Int16Array(h),r.HEAP32=b=new Int32Array(h),r.HEAPU8=M=new Uint8Array(h),r.HEAPU16=new Uint16Array(h),r.HEAPU32=V=new Uint32Array(h),r.HEAPF32=new Float32Array(h),r.HEAPF64=q=new Float64Array(h)}r.INITIAL_MEMORY;var le=[],pe=[],Ce=[];function Te(){return E}function O(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)X(r.preRun.shift());st(le)}function K(){!r.noFSInit&&!y.init.initialized&&y.init(),y.ignorePermissions=!1,st(pe)}function z(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)ye(r.postRun.shift());st(Ce)}function X(h){le.unshift(h)}function ee(h){pe.unshift(h)}function ye(h){Ce.unshift(h)}var xe=0,me=null;function se(h){return h}function be(h){xe++,r.monitorRunDependencies&&r.monitorRunDependencies(xe)}function Le(h){if(xe--,r.monitorRunDependencies&&r.monitorRunDependencies(xe),xe==0&&me){var x=me;me=null,x()}}function Ye(h){r.onAbort&&r.onAbort(h),h="Aborted("+h+")",p(h),A=!0,h+=". Build with -sASSERTIONS for more info.";var x=new WebAssembly.RuntimeError(h);throw i(x),x}var We="data:application/octet-stream;base64,";function ft(h){return h.startsWith(We)}var He;He="graphvizlib.wasm",ft(He)||(He=u(He));function _e(h){try{if(h==He&&_)return new Uint8Array(_);throw"both async and sync fetching of the wasm failed"}catch(x){Ye(x)}}function Fe(){return!_&&c&&typeof fetch=="function"?fetch(He,{credentials:"same-origin"}).then(function(h){if(!h.ok)throw"failed to load wasm binary file at '"+He+"'";return h.arrayBuffer()}).catch(function(){return _e(He)}):Promise.resolve().then(function(){return _e(He)})}function Pe(){var h={a:ot};function x(Q,ae){var Re=Q.exports;r.asm=Re,D=r.asm.x,re(D.buffer),r.asm.G,ee(r.asm.y),Le()}be();function w(Q){x(Q.instance)}function T(Q){return Fe().then(function(ae){return WebAssembly.instantiate(ae,h)}).then(function(ae){return ae}).then(Q,function(ae){p("failed to asynchronously prepare wasm: "+ae),Ye(ae)})}function L(){return!_&&typeof WebAssembly.instantiateStreaming=="function"&&!ft(He)&&typeof fetch=="function"?fetch(He,{credentials:"same-origin"}).then(function(Q){var ae=WebAssembly.instantiateStreaming(Q,h);return ae.then(w,function(Re){return p("wasm streaming compile failed: "+Re),p("falling back to ArrayBuffer instantiation"),T(w)})}):T(w)}if(r.instantiateWasm)try{var J=r.instantiateWasm(h,x);return J}catch(Q){return p("Module.instantiateWasm callback failed with error: "+Q),!1}return L().catch(i),{}}var ge,Oe,Qe={163264:(h,x)=>{var w=R(h),T=R(x);y.createPath("/",je.dirname(w)),y.writeFile(je.join("/",w),T)}};function dt(h){this.name="ExitStatus",this.message="Program terminated with exit("+h+")",this.status=h}function st(h){for(;h.length>0;)h.shift()(r)}var je={isAbs:h=>h.charAt(0)==="/",splitPath:h=>{var x=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return x.exec(h).slice(1)},normalizeArray:(h,x)=>{for(var w=0,T=h.length-1;T>=0;T--){var L=h[T];L==="."?h.splice(T,1):L===".."?(h.splice(T,1),w++):w&&(h.splice(T,1),w--)}if(x)for(;w;w--)h.unshift("..");return h},normalize:h=>{var x=je.isAbs(h),w=h.substr(-1)==="/";return h=je.normalizeArray(h.split("/").filter(T=>!!T),!x).join("/"),!h&&!x&&(h="."),h&&w&&(h+="/"),(x?"/":"")+h},dirname:h=>{var x=je.splitPath(h),w=x[0],T=x[1];return!w&&!T?".":(T&&(T=T.substr(0,T.length-1)),w+T)},basename:h=>{if(h==="/")return"/";h=je.normalize(h),h=h.replace(/\/$/,"");var x=h.lastIndexOf("/");return x===-1?h:h.substr(x+1)},join:function(){var h=Array.prototype.slice.call(arguments);return je.normalize(h.join("/"))},join2:(h,x)=>je.normalize(h+"/"+x)};function Nt(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var h=new Uint8Array(1);return()=>(crypto.getRandomValues(h),h[0])}else return()=>Ye("randomDevice")}var Be={resolve:function(){for(var h="",x=!1,w=arguments.length-1;w>=-1&&!x;w--){var T=w>=0?arguments[w]:y.cwd();if(typeof T!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!T)return"";h=T+"/"+h,x=je.isAbs(T)}return h=je.normalizeArray(h.split("/").filter(L=>!!L),!x).join("/"),(x?"/":"")+h||"."},relative:(h,x)=>{h=Be.resolve(h).substr(1),x=Be.resolve(x).substr(1);function w(Xe){for(var xt=0;xt<Xe.length&&Xe[xt]==="";xt++);for(var yt=Xe.length-1;yt>=0&&Xe[yt]==="";yt--);return xt>yt?[]:Xe.slice(xt,yt-xt+1)}for(var T=w(h.split("/")),L=w(x.split("/")),J=Math.min(T.length,L.length),Q=J,ae=0;ae<J;ae++)if(T[ae]!==L[ae]){Q=ae;break}for(var Re=[],ae=Q;ae<T.length;ae++)Re.push("..");return Re=Re.concat(L.slice(Q)),Re.join("/")}};function Ze(h,x,w){var T=W(h)+1,L=new Array(T),J=Y(h,L,0,L.length);return x&&(L.length=J),L}var Ft={ttys:[],init:function(){},shutdown:function(){},register:function(h,x){Ft.ttys[h]={input:[],output:[],ops:x},y.registerDevice(h,Ft.stream_ops)},stream_ops:{open:function(h){var x=Ft.ttys[h.node.rdev];if(!x)throw new y.ErrnoError(43);h.tty=x,h.seekable=!1},close:function(h){h.tty.ops.fsync(h.tty)},fsync:function(h){h.tty.ops.fsync(h.tty)},read:function(h,x,w,T,L){if(!h.tty||!h.tty.ops.get_char)throw new y.ErrnoError(60);for(var J=0,Q=0;Q<T;Q++){var ae;try{ae=h.tty.ops.get_char(h.tty)}catch{throw new y.ErrnoError(29)}if(ae===void 0&&J===0)throw new y.ErrnoError(6);if(ae==null)break;J++,x[w+Q]=ae}return J&&(h.node.timestamp=Date.now()),J},write:function(h,x,w,T,L){if(!h.tty||!h.tty.ops.put_char)throw new y.ErrnoError(60);try{for(var J=0;J<T;J++)h.tty.ops.put_char(h.tty,x[w+J])}catch{throw new y.ErrnoError(29)}return T&&(h.node.timestamp=Date.now()),J}},default_tty_ops:{get_char:function(h){if(!h.input.length){var x=null;if(typeof window<"u"&&typeof window.prompt=="function"?(x=window.prompt("Input: "),x!==null&&(x+=`
`)):typeof readline=="function"&&(x=readline(),x!==null&&(x+=`
`)),!x)return null;h.input=Ze(x,!0)}return h.input.shift()},put_char:function(h,x){x===null||x===10?(v(U(h.output,0)),h.output=[]):x!=0&&h.output.push(x)},fsync:function(h){h.output&&h.output.length>0&&(v(U(h.output,0)),h.output=[])}},default_tty1_ops:{put_char:function(h,x){x===null||x===10?(p(U(h.output,0)),h.output=[]):x!=0&&h.output.push(x)},fsync:function(h){h.output&&h.output.length>0&&(p(U(h.output,0)),h.output=[])}}};function pt(h,x){return M.fill(0,h,h+x),h}function zt(h,x){return Math.ceil(h/x)*x}function It(h){h=zt(h,65536);var x=Fc(65536,h);return x?pt(x,h):0}var $e={ops_table:null,mount:function(h){return $e.createNode(null,"/",16895,0)},createNode:function(h,x,w,T){if(y.isBlkdev(w)||y.isFIFO(w))throw new y.ErrnoError(63);$e.ops_table||($e.ops_table={dir:{node:{getattr:$e.node_ops.getattr,setattr:$e.node_ops.setattr,lookup:$e.node_ops.lookup,mknod:$e.node_ops.mknod,rename:$e.node_ops.rename,unlink:$e.node_ops.unlink,rmdir:$e.node_ops.rmdir,readdir:$e.node_ops.readdir,symlink:$e.node_ops.symlink},stream:{llseek:$e.stream_ops.llseek}},file:{node:{getattr:$e.node_ops.getattr,setattr:$e.node_ops.setattr},stream:{llseek:$e.stream_ops.llseek,read:$e.stream_ops.read,write:$e.stream_ops.write,allocate:$e.stream_ops.allocate,mmap:$e.stream_ops.mmap,msync:$e.stream_ops.msync}},link:{node:{getattr:$e.node_ops.getattr,setattr:$e.node_ops.setattr,readlink:$e.node_ops.readlink},stream:{}},chrdev:{node:{getattr:$e.node_ops.getattr,setattr:$e.node_ops.setattr},stream:y.chrdev_stream_ops}});var L=y.createNode(h,x,w,T);return y.isDir(L.mode)?(L.node_ops=$e.ops_table.dir.node,L.stream_ops=$e.ops_table.dir.stream,L.contents={}):y.isFile(L.mode)?(L.node_ops=$e.ops_table.file.node,L.stream_ops=$e.ops_table.file.stream,L.usedBytes=0,L.contents=null):y.isLink(L.mode)?(L.node_ops=$e.ops_table.link.node,L.stream_ops=$e.ops_table.link.stream):y.isChrdev(L.mode)&&(L.node_ops=$e.ops_table.chrdev.node,L.stream_ops=$e.ops_table.chrdev.stream),L.timestamp=Date.now(),h&&(h.contents[x]=L,h.timestamp=L.timestamp),L},getFileDataAsTypedArray:function(h){return h.contents?h.contents.subarray?h.contents.subarray(0,h.usedBytes):new Uint8Array(h.contents):new Uint8Array(0)},expandFileStorage:function(h,x){var w=h.contents?h.contents.length:0;if(!(w>=x)){var T=1024*1024;x=Math.max(x,w*(w<T?2:1.125)>>>0),w!=0&&(x=Math.max(x,256));var L=h.contents;h.contents=new Uint8Array(x),h.usedBytes>0&&h.contents.set(L.subarray(0,h.usedBytes),0)}},resizeFileStorage:function(h,x){if(h.usedBytes!=x)if(x==0)h.contents=null,h.usedBytes=0;else{var w=h.contents;h.contents=new Uint8Array(x),w&&h.contents.set(w.subarray(0,Math.min(x,h.usedBytes))),h.usedBytes=x}},node_ops:{getattr:function(h){var x={};return x.dev=y.isChrdev(h.mode)?h.id:1,x.ino=h.id,x.mode=h.mode,x.nlink=1,x.uid=0,x.gid=0,x.rdev=h.rdev,y.isDir(h.mode)?x.size=4096:y.isFile(h.mode)?x.size=h.usedBytes:y.isLink(h.mode)?x.size=h.link.length:x.size=0,x.atime=new Date(h.timestamp),x.mtime=new Date(h.timestamp),x.ctime=new Date(h.timestamp),x.blksize=4096,x.blocks=Math.ceil(x.size/x.blksize),x},setattr:function(h,x){x.mode!==void 0&&(h.mode=x.mode),x.timestamp!==void 0&&(h.timestamp=x.timestamp),x.size!==void 0&&$e.resizeFileStorage(h,x.size)},lookup:function(h,x){throw y.genericErrors[44]},mknod:function(h,x,w,T){return $e.createNode(h,x,w,T)},rename:function(h,x,w){if(y.isDir(h.mode)){var T;try{T=y.lookupNode(x,w)}catch{}if(T)for(var L in T.contents)throw new y.ErrnoError(55)}delete h.parent.contents[h.name],h.parent.timestamp=Date.now(),h.name=w,x.contents[w]=h,x.timestamp=h.parent.timestamp,h.parent=x},unlink:function(h,x){delete h.contents[x],h.timestamp=Date.now()},rmdir:function(h,x){var w=y.lookupNode(h,x);for(var T in w.contents)throw new y.ErrnoError(55);delete h.contents[x],h.timestamp=Date.now()},readdir:function(h){var x=[".",".."];for(var w in h.contents)h.contents.hasOwnProperty(w)&&x.push(w);return x},symlink:function(h,x,w){var T=$e.createNode(h,x,41471,0);return T.link=w,T},readlink:function(h){if(!y.isLink(h.mode))throw new y.ErrnoError(28);return h.link}},stream_ops:{read:function(h,x,w,T,L){var J=h.node.contents;if(L>=h.node.usedBytes)return 0;var Q=Math.min(h.node.usedBytes-L,T);if(Q>8&&J.subarray)x.set(J.subarray(L,L+Q),w);else for(var ae=0;ae<Q;ae++)x[w+ae]=J[L+ae];return Q},write:function(h,x,w,T,L,J){if(x.buffer===N.buffer&&(J=!1),!T)return 0;var Q=h.node;if(Q.timestamp=Date.now(),x.subarray&&(!Q.contents||Q.contents.subarray)){if(J)return Q.contents=x.subarray(w,w+T),Q.usedBytes=T,T;if(Q.usedBytes===0&&L===0)return Q.contents=x.slice(w,w+T),Q.usedBytes=T,T;if(L+T<=Q.usedBytes)return Q.contents.set(x.subarray(w,w+T),L),T}if($e.expandFileStorage(Q,L+T),Q.contents.subarray&&x.subarray)Q.contents.set(x.subarray(w,w+T),L);else for(var ae=0;ae<T;ae++)Q.contents[L+ae]=x[w+ae];return Q.usedBytes=Math.max(Q.usedBytes,L+T),T},llseek:function(h,x,w){var T=x;if(w===1?T+=h.position:w===2&&y.isFile(h.node.mode)&&(T+=h.node.usedBytes),T<0)throw new y.ErrnoError(28);return T},allocate:function(h,x,w){$e.expandFileStorage(h.node,x+w),h.node.usedBytes=Math.max(h.node.usedBytes,x+w)},mmap:function(h,x,w,T,L){if(!y.isFile(h.node.mode))throw new y.ErrnoError(43);var J,Q,ae=h.node.contents;if(!(L&2)&&ae.buffer===Z)Q=!1,J=ae.byteOffset;else{if((w>0||w+x<ae.length)&&(ae.subarray?ae=ae.subarray(w,w+x):ae=Array.prototype.slice.call(ae,w,w+x)),Q=!0,J=It(x),!J)throw new y.ErrnoError(48);N.set(ae,J)}return{ptr:J,allocated:Q}},msync:function(h,x,w,T,L){if(!y.isFile(h.node.mode))throw new y.ErrnoError(43);return L&2||$e.stream_ops.write(h,x,0,T,w,!1),0}}};function Zt(h,x,w,T){var L="al "+h;d(h,J=>{S(J,'Loading data file "'+h+'" failed (no arrayBuffer).'),x(new Uint8Array(J)),L&&Le()},J=>{if(w)w();else throw'Loading data file "'+h+'" failed.'}),L&&be()}var y={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(h,x={})=>{if(h=Be.resolve(y.cwd(),h),!h)return{path:"",node:null};var w={follow_mount:!0,recurse_count:0};if(x=Object.assign(w,x),x.recurse_count>8)throw new y.ErrnoError(32);for(var T=je.normalizeArray(h.split("/").filter(yt=>!!yt),!1),L=y.root,J="/",Q=0;Q<T.length;Q++){var ae=Q===T.length-1;if(ae&&x.parent)break;if(L=y.lookupNode(L,T[Q]),J=je.join2(J,T[Q]),y.isMountpoint(L)&&(!ae||ae&&x.follow_mount)&&(L=L.mounted.root),!ae||x.follow)for(var Re=0;y.isLink(L.mode);){var Xe=y.readlink(J);J=Be.resolve(je.dirname(J),Xe);var xt=y.lookupPath(J,{recurse_count:x.recurse_count+1});if(L=xt.node,Re++>40)throw new y.ErrnoError(32)}}return{path:J,node:L}},getPath:h=>{for(var x;;){if(y.isRoot(h)){var w=h.mount.mountpoint;return x?w[w.length-1]!=="/"?w+"/"+x:w+x:w}x=x?h.name+"/"+x:h.name,h=h.parent}},hashName:(h,x)=>{for(var w=0,T=0;T<x.length;T++)w=(w<<5)-w+x.charCodeAt(T)|0;return(h+w>>>0)%y.nameTable.length},hashAddNode:h=>{var x=y.hashName(h.parent.id,h.name);h.name_next=y.nameTable[x],y.nameTable[x]=h},hashRemoveNode:h=>{var x=y.hashName(h.parent.id,h.name);if(y.nameTable[x]===h)y.nameTable[x]=h.name_next;else for(var w=y.nameTable[x];w;){if(w.name_next===h){w.name_next=h.name_next;break}w=w.name_next}},lookupNode:(h,x)=>{var w=y.mayLookup(h);if(w)throw new y.ErrnoError(w,h);for(var T=y.hashName(h.id,x),L=y.nameTable[T];L;L=L.name_next){var J=L.name;if(L.parent.id===h.id&&J===x)return L}return y.lookup(h,x)},createNode:(h,x,w,T)=>{var L=new y.FSNode(h,x,w,T);return y.hashAddNode(L),L},destroyNode:h=>{y.hashRemoveNode(h)},isRoot:h=>h===h.parent,isMountpoint:h=>!!h.mounted,isFile:h=>(h&61440)===32768,isDir:h=>(h&61440)===16384,isLink:h=>(h&61440)===40960,isChrdev:h=>(h&61440)===8192,isBlkdev:h=>(h&61440)===24576,isFIFO:h=>(h&61440)===4096,isSocket:h=>(h&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:h=>{var x=y.flagModes[h];if(typeof x>"u")throw new Error("Unknown file open mode: "+h);return x},flagsToPermissionString:h=>{var x=["r","w","rw"][h&3];return h&512&&(x+="w"),x},nodePermissions:(h,x)=>y.ignorePermissions?0:x.includes("r")&&!(h.mode&292)||x.includes("w")&&!(h.mode&146)||x.includes("x")&&!(h.mode&73)?2:0,mayLookup:h=>{var x=y.nodePermissions(h,"x");return x||(h.node_ops.lookup?0:2)},mayCreate:(h,x)=>{try{var w=y.lookupNode(h,x);return 20}catch{}return y.nodePermissions(h,"wx")},mayDelete:(h,x,w)=>{var T;try{T=y.lookupNode(h,x)}catch(J){return J.errno}var L=y.nodePermissions(h,"wx");if(L)return L;if(w){if(!y.isDir(T.mode))return 54;if(y.isRoot(T)||y.getPath(T)===y.cwd())return 10}else if(y.isDir(T.mode))return 31;return 0},mayOpen:(h,x)=>h?y.isLink(h.mode)?32:y.isDir(h.mode)&&(y.flagsToPermissionString(x)!=="r"||x&512)?31:y.nodePermissions(h,y.flagsToPermissionString(x)):44,MAX_OPEN_FDS:4096,nextfd:(h=0,x=y.MAX_OPEN_FDS)=>{for(var w=h;w<=x;w++)if(!y.streams[w])return w;throw new y.ErrnoError(33)},getStream:h=>y.streams[h],createStream:(h,x,w)=>{y.FSStream||(y.FSStream=function(){this.shared={}},y.FSStream.prototype={},Object.defineProperties(y.FSStream.prototype,{object:{get:function(){return this.node},set:function(L){this.node=L}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(L){this.shared.flags=L}},position:{get:function(){return this.shared.position},set:function(L){this.shared.position=L}}})),h=Object.assign(new y.FSStream,h);var T=y.nextfd(x,w);return h.fd=T,y.streams[T]=h,h},closeStream:h=>{y.streams[h]=null},chrdev_stream_ops:{open:h=>{var x=y.getDevice(h.node.rdev);h.stream_ops=x.stream_ops,h.stream_ops.open&&h.stream_ops.open(h)},llseek:()=>{throw new y.ErrnoError(70)}},major:h=>h>>8,minor:h=>h&255,makedev:(h,x)=>h<<8|x,registerDevice:(h,x)=>{y.devices[h]={stream_ops:x}},getDevice:h=>y.devices[h],getMounts:h=>{for(var x=[],w=[h];w.length;){var T=w.pop();x.push(T),w.push.apply(w,T.mounts)}return x},syncfs:(h,x)=>{typeof h=="function"&&(x=h,h=!1),y.syncFSRequests++,y.syncFSRequests>1&&p("warning: "+y.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var w=y.getMounts(y.root.mount),T=0;function L(Q){return y.syncFSRequests--,x(Q)}function J(Q){if(Q)return J.errored?void 0:(J.errored=!0,L(Q));++T>=w.length&&L(null)}w.forEach(Q=>{if(!Q.type.syncfs)return J(null);Q.type.syncfs(Q,h,J)})},mount:(h,x,w)=>{var T=w==="/",L=!w,J;if(T&&y.root)throw new y.ErrnoError(10);if(!T&&!L){var Q=y.lookupPath(w,{follow_mount:!1});if(w=Q.path,J=Q.node,y.isMountpoint(J))throw new y.ErrnoError(10);if(!y.isDir(J.mode))throw new y.ErrnoError(54)}var ae={type:h,opts:x,mountpoint:w,mounts:[]},Re=h.mount(ae);return Re.mount=ae,ae.root=Re,T?y.root=Re:J&&(J.mounted=ae,J.mount&&J.mount.mounts.push(ae)),Re},unmount:h=>{var x=y.lookupPath(h,{follow_mount:!1});if(!y.isMountpoint(x.node))throw new y.ErrnoError(28);var w=x.node,T=w.mounted,L=y.getMounts(T);Object.keys(y.nameTable).forEach(Q=>{for(var ae=y.nameTable[Q];ae;){var Re=ae.name_next;L.includes(ae.mount)&&y.destroyNode(ae),ae=Re}}),w.mounted=null;var J=w.mount.mounts.indexOf(T);w.mount.mounts.splice(J,1)},lookup:(h,x)=>h.node_ops.lookup(h,x),mknod:(h,x,w)=>{var T=y.lookupPath(h,{parent:!0}),L=T.node,J=je.basename(h);if(!J||J==="."||J==="..")throw new y.ErrnoError(28);var Q=y.mayCreate(L,J);if(Q)throw new y.ErrnoError(Q);if(!L.node_ops.mknod)throw new y.ErrnoError(63);return L.node_ops.mknod(L,J,x,w)},create:(h,x)=>(x=x!==void 0?x:438,x&=4095,x|=32768,y.mknod(h,x,0)),mkdir:(h,x)=>(x=x!==void 0?x:511,x&=1023,x|=16384,y.mknod(h,x,0)),mkdirTree:(h,x)=>{for(var w=h.split("/"),T="",L=0;L<w.length;++L)if(w[L]){T+="/"+w[L];try{y.mkdir(T,x)}catch(J){if(J.errno!=20)throw J}}},mkdev:(h,x,w)=>(typeof w>"u"&&(w=x,x=438),x|=8192,y.mknod(h,x,w)),symlink:(h,x)=>{if(!Be.resolve(h))throw new y.ErrnoError(44);var w=y.lookupPath(x,{parent:!0}),T=w.node;if(!T)throw new y.ErrnoError(44);var L=je.basename(x),J=y.mayCreate(T,L);if(J)throw new y.ErrnoError(J);if(!T.node_ops.symlink)throw new y.ErrnoError(63);return T.node_ops.symlink(T,L,h)},rename:(h,x)=>{var w=je.dirname(h),T=je.dirname(x),L=je.basename(h),J=je.basename(x),Q,ae,Re;if(Q=y.lookupPath(h,{parent:!0}),ae=Q.node,Q=y.lookupPath(x,{parent:!0}),Re=Q.node,!ae||!Re)throw new y.ErrnoError(44);if(ae.mount!==Re.mount)throw new y.ErrnoError(75);var Xe=y.lookupNode(ae,L),xt=Be.relative(h,T);if(xt.charAt(0)!==".")throw new y.ErrnoError(28);if(xt=Be.relative(x,w),xt.charAt(0)!==".")throw new y.ErrnoError(55);var yt;try{yt=y.lookupNode(Re,J)}catch{}if(Xe!==yt){var et=y.isDir(Xe.mode),Ke=y.mayDelete(ae,L,et);if(Ke)throw new y.ErrnoError(Ke);if(Ke=yt?y.mayDelete(Re,J,et):y.mayCreate(Re,J),Ke)throw new y.ErrnoError(Ke);if(!ae.node_ops.rename)throw new y.ErrnoError(63);if(y.isMountpoint(Xe)||yt&&y.isMountpoint(yt))throw new y.ErrnoError(10);if(Re!==ae&&(Ke=y.nodePermissions(ae,"w"),Ke))throw new y.ErrnoError(Ke);y.hashRemoveNode(Xe);try{ae.node_ops.rename(Xe,Re,J)}catch(_t){throw _t}finally{y.hashAddNode(Xe)}}},rmdir:h=>{var x=y.lookupPath(h,{parent:!0}),w=x.node,T=je.basename(h),L=y.lookupNode(w,T),J=y.mayDelete(w,T,!0);if(J)throw new y.ErrnoError(J);if(!w.node_ops.rmdir)throw new y.ErrnoError(63);if(y.isMountpoint(L))throw new y.ErrnoError(10);w.node_ops.rmdir(w,T),y.destroyNode(L)},readdir:h=>{var x=y.lookupPath(h,{follow:!0}),w=x.node;if(!w.node_ops.readdir)throw new y.ErrnoError(54);return w.node_ops.readdir(w)},unlink:h=>{var x=y.lookupPath(h,{parent:!0}),w=x.node;if(!w)throw new y.ErrnoError(44);var T=je.basename(h),L=y.lookupNode(w,T),J=y.mayDelete(w,T,!1);if(J)throw new y.ErrnoError(J);if(!w.node_ops.unlink)throw new y.ErrnoError(63);if(y.isMountpoint(L))throw new y.ErrnoError(10);w.node_ops.unlink(w,T),y.destroyNode(L)},readlink:h=>{var x=y.lookupPath(h),w=x.node;if(!w)throw new y.ErrnoError(44);if(!w.node_ops.readlink)throw new y.ErrnoError(28);return Be.resolve(y.getPath(w.parent),w.node_ops.readlink(w))},stat:(h,x)=>{var w=y.lookupPath(h,{follow:!x}),T=w.node;if(!T)throw new y.ErrnoError(44);if(!T.node_ops.getattr)throw new y.ErrnoError(63);return T.node_ops.getattr(T)},lstat:h=>y.stat(h,!0),chmod:(h,x,w)=>{var T;if(typeof h=="string"){var L=y.lookupPath(h,{follow:!w});T=L.node}else T=h;if(!T.node_ops.setattr)throw new y.ErrnoError(63);T.node_ops.setattr(T,{mode:x&4095|T.mode&-4096,timestamp:Date.now()})},lchmod:(h,x)=>{y.chmod(h,x,!0)},fchmod:(h,x)=>{var w=y.getStream(h);if(!w)throw new y.ErrnoError(8);y.chmod(w.node,x)},chown:(h,x,w,T)=>{var L;if(typeof h=="string"){var J=y.lookupPath(h,{follow:!T});L=J.node}else L=h;if(!L.node_ops.setattr)throw new y.ErrnoError(63);L.node_ops.setattr(L,{timestamp:Date.now()})},lchown:(h,x,w)=>{y.chown(h,x,w,!0)},fchown:(h,x,w)=>{var T=y.getStream(h);if(!T)throw new y.ErrnoError(8);y.chown(T.node,x,w)},truncate:(h,x)=>{if(x<0)throw new y.ErrnoError(28);var w;if(typeof h=="string"){var T=y.lookupPath(h,{follow:!0});w=T.node}else w=h;if(!w.node_ops.setattr)throw new y.ErrnoError(63);if(y.isDir(w.mode))throw new y.ErrnoError(31);if(!y.isFile(w.mode))throw new y.ErrnoError(28);var L=y.nodePermissions(w,"w");if(L)throw new y.ErrnoError(L);w.node_ops.setattr(w,{size:x,timestamp:Date.now()})},ftruncate:(h,x)=>{var w=y.getStream(h);if(!w)throw new y.ErrnoError(8);if(!(w.flags&2097155))throw new y.ErrnoError(28);y.truncate(w.node,x)},utime:(h,x,w)=>{var T=y.lookupPath(h,{follow:!0}),L=T.node;L.node_ops.setattr(L,{timestamp:Math.max(x,w)})},open:(h,x,w)=>{if(h==="")throw new y.ErrnoError(44);x=typeof x=="string"?y.modeStringToFlags(x):x,w=typeof w>"u"?438:w,x&64?w=w&4095|32768:w=0;var T;if(typeof h=="object")T=h;else{h=je.normalize(h);try{var L=y.lookupPath(h,{follow:!(x&131072)});T=L.node}catch{}}var J=!1;if(x&64)if(T){if(x&128)throw new y.ErrnoError(20)}else T=y.mknod(h,w,0),J=!0;if(!T)throw new y.ErrnoError(44);if(y.isChrdev(T.mode)&&(x&=-513),x&65536&&!y.isDir(T.mode))throw new y.ErrnoError(54);if(!J){var Q=y.mayOpen(T,x);if(Q)throw new y.ErrnoError(Q)}x&512&&!J&&y.truncate(T,0),x&=-131713;var ae=y.createStream({node:T,path:y.getPath(T),flags:x,seekable:!0,position:0,stream_ops:T.stream_ops,ungotten:[],error:!1});return ae.stream_ops.open&&ae.stream_ops.open(ae),r.logReadFiles&&!(x&1)&&(y.readFiles||(y.readFiles={}),h in y.readFiles||(y.readFiles[h]=1)),ae},close:h=>{if(y.isClosed(h))throw new y.ErrnoError(8);h.getdents&&(h.getdents=null);try{h.stream_ops.close&&h.stream_ops.close(h)}catch(x){throw x}finally{y.closeStream(h.fd)}h.fd=null},isClosed:h=>h.fd===null,llseek:(h,x,w)=>{if(y.isClosed(h))throw new y.ErrnoError(8);if(!h.seekable||!h.stream_ops.llseek)throw new y.ErrnoError(70);if(w!=0&&w!=1&&w!=2)throw new y.ErrnoError(28);return h.position=h.stream_ops.llseek(h,x,w),h.ungotten=[],h.position},read:(h,x,w,T,L)=>{if(T<0||L<0)throw new y.ErrnoError(28);if(y.isClosed(h))throw new y.ErrnoError(8);if((h.flags&2097155)===1)throw new y.ErrnoError(8);if(y.isDir(h.node.mode))throw new y.ErrnoError(31);if(!h.stream_ops.read)throw new y.ErrnoError(28);var J=typeof L<"u";if(!J)L=h.position;else if(!h.seekable)throw new y.ErrnoError(70);var Q=h.stream_ops.read(h,x,w,T,L);return J||(h.position+=Q),Q},write:(h,x,w,T,L,J)=>{if(T<0||L<0)throw new y.ErrnoError(28);if(y.isClosed(h))throw new y.ErrnoError(8);if(!(h.flags&2097155))throw new y.ErrnoError(8);if(y.isDir(h.node.mode))throw new y.ErrnoError(31);if(!h.stream_ops.write)throw new y.ErrnoError(28);h.seekable&&h.flags&1024&&y.llseek(h,0,2);var Q=typeof L<"u";if(!Q)L=h.position;else if(!h.seekable)throw new y.ErrnoError(70);var ae=h.stream_ops.write(h,x,w,T,L,J);return Q||(h.position+=ae),ae},allocate:(h,x,w)=>{if(y.isClosed(h))throw new y.ErrnoError(8);if(x<0||w<=0)throw new y.ErrnoError(28);if(!(h.flags&2097155))throw new y.ErrnoError(8);if(!y.isFile(h.node.mode)&&!y.isDir(h.node.mode))throw new y.ErrnoError(43);if(!h.stream_ops.allocate)throw new y.ErrnoError(138);h.stream_ops.allocate(h,x,w)},mmap:(h,x,w,T,L)=>{if(T&2&&!(L&2)&&(h.flags&2097155)!==2)throw new y.ErrnoError(2);if((h.flags&2097155)===1)throw new y.ErrnoError(2);if(!h.stream_ops.mmap)throw new y.ErrnoError(43);return h.stream_ops.mmap(h,x,w,T,L)},msync:(h,x,w,T,L)=>!h||!h.stream_ops.msync?0:h.stream_ops.msync(h,x,w,T,L),munmap:h=>0,ioctl:(h,x,w)=>{if(!h.stream_ops.ioctl)throw new y.ErrnoError(59);return h.stream_ops.ioctl(h,x,w)},readFile:(h,x={})=>{if(x.flags=x.flags||0,x.encoding=x.encoding||"binary",x.encoding!=="utf8"&&x.encoding!=="binary")throw new Error('Invalid encoding type "'+x.encoding+'"');var w,T=y.open(h,x.flags),L=y.stat(h),J=L.size,Q=new Uint8Array(J);return y.read(T,Q,0,J,0),x.encoding==="utf8"?w=U(Q,0):x.encoding==="binary"&&(w=Q),y.close(T),w},writeFile:(h,x,w={})=>{w.flags=w.flags||577;var T=y.open(h,w.flags,w.mode);if(typeof x=="string"){var L=new Uint8Array(W(x)+1),J=Y(x,L,0,L.length);y.write(T,L,0,J,void 0,w.canOwn)}else if(ArrayBuffer.isView(x))y.write(T,x,0,x.byteLength,void 0,w.canOwn);else throw new Error("Unsupported data type");y.close(T)},cwd:()=>y.currentPath,chdir:h=>{var x=y.lookupPath(h,{follow:!0});if(x.node===null)throw new y.ErrnoError(44);if(!y.isDir(x.node.mode))throw new y.ErrnoError(54);var w=y.nodePermissions(x.node,"x");if(w)throw new y.ErrnoError(w);y.currentPath=x.path},createDefaultDirectories:()=>{y.mkdir("/tmp"),y.mkdir("/home"),y.mkdir("/home/web_user")},createDefaultDevices:()=>{y.mkdir("/dev"),y.registerDevice(y.makedev(1,3),{read:()=>0,write:(x,w,T,L,J)=>L}),y.mkdev("/dev/null",y.makedev(1,3)),Ft.register(y.makedev(5,0),Ft.default_tty_ops),Ft.register(y.makedev(6,0),Ft.default_tty1_ops),y.mkdev("/dev/tty",y.makedev(5,0)),y.mkdev("/dev/tty1",y.makedev(6,0));var h=Nt();y.createDevice("/dev","random",h),y.createDevice("/dev","urandom",h),y.mkdir("/dev/shm"),y.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{y.mkdir("/proc");var h=y.mkdir("/proc/self");y.mkdir("/proc/self/fd"),y.mount({mount:()=>{var x=y.createNode(h,"fd",16895,73);return x.node_ops={lookup:(w,T)=>{var L=+T,J=y.getStream(L);if(!J)throw new y.ErrnoError(8);var Q={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>J.path}};return Q.parent=Q,Q}},x}},{},"/proc/self/fd")},createStandardStreams:()=>{r.stdin?y.createDevice("/dev","stdin",r.stdin):y.symlink("/dev/tty","/dev/stdin"),r.stdout?y.createDevice("/dev","stdout",null,r.stdout):y.symlink("/dev/tty","/dev/stdout"),r.stderr?y.createDevice("/dev","stderr",null,r.stderr):y.symlink("/dev/tty1","/dev/stderr"),y.open("/dev/stdin",0),y.open("/dev/stdout",1),y.open("/dev/stderr",1)},ensureErrnoError:()=>{y.ErrnoError||(y.ErrnoError=function(x,w){this.node=w,this.setErrno=function(T){this.errno=T},this.setErrno(x),this.message="FS error"},y.ErrnoError.prototype=new Error,y.ErrnoError.prototype.constructor=y.ErrnoError,[44].forEach(h=>{y.genericErrors[h]=new y.ErrnoError(h),y.genericErrors[h].stack="<generic error, no stack>"}))},staticInit:()=>{y.ensureErrnoError(),y.nameTable=new Array(4096),y.mount($e,{},"/"),y.createDefaultDirectories(),y.createDefaultDevices(),y.createSpecialDirectories(),y.filesystems={MEMFS:$e}},init:(h,x,w)=>{y.init.initialized=!0,y.ensureErrnoError(),r.stdin=h||r.stdin,r.stdout=x||r.stdout,r.stderr=w||r.stderr,y.createStandardStreams()},quit:()=>{y.init.initialized=!1;for(var h=0;h<y.streams.length;h++){var x=y.streams[h];x&&y.close(x)}},getMode:(h,x)=>{var w=0;return h&&(w|=365),x&&(w|=146),w},findObject:(h,x)=>{var w=y.analyzePath(h,x);return w.exists?w.object:null},analyzePath:(h,x)=>{try{var w=y.lookupPath(h,{follow:!x});h=w.path}catch{}var T={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var w=y.lookupPath(h,{parent:!0});T.parentExists=!0,T.parentPath=w.path,T.parentObject=w.node,T.name=je.basename(h),w=y.lookupPath(h,{follow:!x}),T.exists=!0,T.path=w.path,T.object=w.node,T.name=w.node.name,T.isRoot=w.path==="/"}catch(L){T.error=L.errno}return T},createPath:(h,x,w,T)=>{h=typeof h=="string"?h:y.getPath(h);for(var L=x.split("/").reverse();L.length;){var J=L.pop();if(J){var Q=je.join2(h,J);try{y.mkdir(Q)}catch{}h=Q}}return Q},createFile:(h,x,w,T,L)=>{var J=je.join2(typeof h=="string"?h:y.getPath(h),x),Q=y.getMode(T,L);return y.create(J,Q)},createDataFile:(h,x,w,T,L,J)=>{var Q=x;h&&(h=typeof h=="string"?h:y.getPath(h),Q=x?je.join2(h,x):h);var ae=y.getMode(T,L),Re=y.create(Q,ae);if(w){if(typeof w=="string"){for(var Xe=new Array(w.length),xt=0,yt=w.length;xt<yt;++xt)Xe[xt]=w.charCodeAt(xt);w=Xe}y.chmod(Re,ae|146);var et=y.open(Re,577);y.write(et,w,0,w.length,0,J),y.close(et),y.chmod(Re,ae)}return Re},createDevice:(h,x,w,T)=>{var L=je.join2(typeof h=="string"?h:y.getPath(h),x),J=y.getMode(!!w,!!T);y.createDevice.major||(y.createDevice.major=64);var Q=y.makedev(y.createDevice.major++,0);return y.registerDevice(Q,{open:ae=>{ae.seekable=!1},close:ae=>{T&&T.buffer&&T.buffer.length&&T(10)},read:(ae,Re,Xe,xt,yt)=>{for(var et=0,Ke=0;Ke<xt;Ke++){var _t;try{_t=w()}catch{throw new y.ErrnoError(29)}if(_t===void 0&&et===0)throw new y.ErrnoError(6);if(_t==null)break;et++,Re[Xe+Ke]=_t}return et&&(ae.node.timestamp=Date.now()),et},write:(ae,Re,Xe,xt,yt)=>{for(var et=0;et<xt;et++)try{T(Re[Xe+et])}catch{throw new y.ErrnoError(29)}return xt&&(ae.node.timestamp=Date.now()),et}}),y.mkdev(L,J,Q)},forceLoadFile:h=>{if(h.isDevice||h.isFolder||h.link||h.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(m)try{h.contents=Ze(m(h.url),!0),h.usedBytes=h.contents.length}catch{throw new y.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(h,x,w,T,L)=>{function J(){this.lengthKnown=!1,this.chunks=[]}if(J.prototype.get=function(Ke){if(!(Ke>this.length-1||Ke<0)){var _t=Ke%this.chunkSize,zr=Ke/this.chunkSize|0;return this.getter(zr)[_t]}},J.prototype.setDataGetter=function(Ke){this.getter=Ke},J.prototype.cacheLength=function(){var Ke=new XMLHttpRequest;if(Ke.open("HEAD",w,!1),Ke.send(null),!(Ke.status>=200&&Ke.status<300||Ke.status===304))throw new Error("Couldn't load "+w+". Status: "+Ke.status);var _t=Number(Ke.getResponseHeader("Content-length")),zr,On=(zr=Ke.getResponseHeader("Accept-Ranges"))&&zr==="bytes",Jr=(zr=Ke.getResponseHeader("Content-Encoding"))&&zr==="gzip",Zr=1024*1024;On||(Zr=_t);var Qr=(dn,Mi)=>{if(dn>Mi)throw new Error("invalid range ("+dn+", "+Mi+") or no bytes requested!");if(Mi>_t-1)throw new Error("only "+_t+" bytes available! programmer error!");var ar=new XMLHttpRequest;if(ar.open("GET",w,!1),_t!==Zr&&ar.setRequestHeader("Range","bytes="+dn+"-"+Mi),ar.responseType="arraybuffer",ar.overrideMimeType&&ar.overrideMimeType("text/plain; charset=x-user-defined"),ar.send(null),!(ar.status>=200&&ar.status<300||ar.status===304))throw new Error("Couldn't load "+w+". Status: "+ar.status);return ar.response!==void 0?new Uint8Array(ar.response||[]):Ze(ar.responseText||"",!0)},xa=this;xa.setDataGetter(dn=>{var Mi=dn*Zr,ar=(dn+1)*Zr-1;if(ar=Math.min(ar,_t-1),typeof xa.chunks[dn]>"u"&&(xa.chunks[dn]=Qr(Mi,ar)),typeof xa.chunks[dn]>"u")throw new Error("doXHR failed!");return xa.chunks[dn]}),(Jr||!_t)&&(Zr=_t=1,_t=this.getter(0).length,Zr=_t,v("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=_t,this._chunkSize=Zr,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var Q,ae}else var ae={isDevice:!1,url:w};var Re=y.createFile(h,x,ae,T,L);ae.contents?Re.contents=ae.contents:ae.url&&(Re.contents=null,Re.url=ae.url),Object.defineProperties(Re,{usedBytes:{get:function(){return this.contents.length}}});var Xe={},xt=Object.keys(Re.stream_ops);xt.forEach(et=>{var Ke=Re.stream_ops[et];Xe[et]=function(){return y.forceLoadFile(Re),Ke.apply(null,arguments)}});function yt(et,Ke,_t,zr,On){var Jr=et.node.contents;if(On>=Jr.length)return 0;var Zr=Math.min(Jr.length-On,zr);if(Jr.slice)for(var Qr=0;Qr<Zr;Qr++)Ke[_t+Qr]=Jr[On+Qr];else for(var Qr=0;Qr<Zr;Qr++)Ke[_t+Qr]=Jr.get(On+Qr);return Zr}return Xe.read=(et,Ke,_t,zr,On)=>(y.forceLoadFile(Re),yt(et,Ke,_t,zr,On)),Xe.mmap=(et,Ke,_t,zr,On)=>{y.forceLoadFile(Re);var Jr=It(Ke);if(!Jr)throw new y.ErrnoError(48);return yt(et,N,Jr,Ke,_t),{ptr:Jr,allocated:!0}},Re.stream_ops=Xe,Re},createPreloadedFile:(h,x,w,T,L,J,Q,ae,Re,Xe)=>{var xt=x?Be.resolve(je.join2(h,x)):h;function yt(et){function Ke(_t){Xe&&Xe(),ae||y.createDataFile(h,x,_t,T,L,Re),J&&J(),Le()}Browser.handledByPreloadPlugin(et,xt,Ke,()=>{Q&&Q(),Le()})||Ke(et)}be(),typeof w=="string"?Zt(w,et=>yt(et),Q):yt(w)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(h,x,w)=>{x=x||(()=>{}),w=w||(()=>{});var T=y.indexedDB();try{var L=T.open(y.DB_NAME(),y.DB_VERSION)}catch(J){return w(J)}L.onupgradeneeded=()=>{v("creating db");var J=L.result;J.createObjectStore(y.DB_STORE_NAME)},L.onsuccess=()=>{var J=L.result,Q=J.transaction([y.DB_STORE_NAME],"readwrite"),ae=Q.objectStore(y.DB_STORE_NAME),Re=0,Xe=0,xt=h.length;function yt(){Xe==0?x():w()}h.forEach(et=>{var Ke=ae.put(y.analyzePath(et).object.contents,et);Ke.onsuccess=()=>{Re++,Re+Xe==xt&&yt()},Ke.onerror=()=>{Xe++,Re+Xe==xt&&yt()}}),Q.onerror=w},L.onerror=w},loadFilesFromDB:(h,x,w)=>{x=x||(()=>{}),w=w||(()=>{});var T=y.indexedDB();try{var L=T.open(y.DB_NAME(),y.DB_VERSION)}catch(J){return w(J)}L.onupgradeneeded=w,L.onsuccess=()=>{var J=L.result;try{var Q=J.transaction([y.DB_STORE_NAME],"readonly")}catch(et){w(et);return}var ae=Q.objectStore(y.DB_STORE_NAME),Re=0,Xe=0,xt=h.length;function yt(){Xe==0?x():w()}h.forEach(et=>{var Ke=ae.get(et);Ke.onsuccess=()=>{y.analyzePath(et).exists&&y.unlink(et),y.createDataFile(je.dirname(et),je.basename(et),Ke.result,!0,!0,!0),Re++,Re+Xe==xt&&yt()},Ke.onerror=()=>{Xe++,Re+Xe==xt&&yt()}}),Q.onerror=w},L.onerror=w}},nt={DEFAULT_POLLMASK:5,calculateAt:function(h,x,w){if(je.isAbs(x))return x;var T;if(h===-100)T=y.cwd();else{var L=nt.getStreamFromFD(h);T=L.path}if(x.length==0){if(!w)throw new y.ErrnoError(44);return T}return je.join2(T,x)},doStat:function(h,x,w){try{var T=h(x)}catch(L){if(L&&L.node&&je.normalize(x)!==je.normalize(y.getPath(L.node)))return-54;throw L}return b[w>>2]=T.dev,b[w+8>>2]=T.ino,b[w+12>>2]=T.mode,V[w+16>>2]=T.nlink,b[w+20>>2]=T.uid,b[w+24>>2]=T.gid,b[w+28>>2]=T.rdev,Oe=[T.size>>>0,(ge=T.size,+Math.abs(ge)>=1?ge>0?(Math.min(+Math.floor(ge/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ge-+(~~ge>>>0))/4294967296)>>>0:0)],b[w+40>>2]=Oe[0],b[w+44>>2]=Oe[1],b[w+48>>2]=4096,b[w+52>>2]=T.blocks,Oe=[Math.floor(T.atime.getTime()/1e3)>>>0,(ge=Math.floor(T.atime.getTime()/1e3),+Math.abs(ge)>=1?ge>0?(Math.min(+Math.floor(ge/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ge-+(~~ge>>>0))/4294967296)>>>0:0)],b[w+56>>2]=Oe[0],b[w+60>>2]=Oe[1],V[w+64>>2]=0,Oe=[Math.floor(T.mtime.getTime()/1e3)>>>0,(ge=Math.floor(T.mtime.getTime()/1e3),+Math.abs(ge)>=1?ge>0?(Math.min(+Math.floor(ge/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ge-+(~~ge>>>0))/4294967296)>>>0:0)],b[w+72>>2]=Oe[0],b[w+76>>2]=Oe[1],V[w+80>>2]=0,Oe=[Math.floor(T.ctime.getTime()/1e3)>>>0,(ge=Math.floor(T.ctime.getTime()/1e3),+Math.abs(ge)>=1?ge>0?(Math.min(+Math.floor(ge/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ge-+(~~ge>>>0))/4294967296)>>>0:0)],b[w+88>>2]=Oe[0],b[w+92>>2]=Oe[1],V[w+96>>2]=0,Oe=[T.ino>>>0,(ge=T.ino,+Math.abs(ge)>=1?ge>0?(Math.min(+Math.floor(ge/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ge-+(~~ge>>>0))/4294967296)>>>0:0)],b[w+104>>2]=Oe[0],b[w+108>>2]=Oe[1],0},doMsync:function(h,x,w,T,L){var J=M.slice(h,h+w);y.msync(x,J,L,w,T)},varargs:void 0,get:function(){nt.varargs+=4;var h=b[nt.varargs-4>>2];return h},getStr:function(h){var x=R(h);return x},getStreamFromFD:function(h){var x=y.getStream(h);if(!x)throw new y.ErrnoError(8);return x}};function ui(h,x,w,T){try{if(x=nt.getStr(x),x=nt.calculateAt(h,x),w&-8)return-28;var L=y.lookupPath(x,{follow:!0}),J=L.node;if(!J)return-44;var Q="";return w&4&&(Q+="r"),w&2&&(Q+="w"),w&1&&(Q+="x"),Q&&y.nodePermissions(J,Q)?-2:0}catch(ae){if(typeof y>"u"||!(ae instanceof y.ErrnoError))throw ae;return-ae.errno}}function An(h){return b[Sc()>>2]=h,h}function Cn(h,x,w){nt.varargs=w;try{var T=nt.getStreamFromFD(h);switch(x){case 0:{var L=nt.get();if(L<0)return-28;var J;return J=y.createStream(T,L),J.fd}case 1:case 2:return 0;case 3:return T.flags;case 4:{var L=nt.get();return T.flags|=L,0}case 5:{var L=nt.get(),Q=0;return G[L+Q>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return An(28),-1;default:return-28}}catch(ae){if(typeof y>"u"||!(ae instanceof y.ErrnoError))throw ae;return-ae.errno}}function Tn(h,x){try{var w=nt.getStreamFromFD(h);return nt.doStat(y.stat,w.path,x)}catch(T){if(typeof y>"u"||!(T instanceof y.ErrnoError))throw T;return-T.errno}}function Kn(h,x,w){nt.varargs=w;try{var T=nt.getStreamFromFD(h);switch(x){case 21509:case 21505:return T.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return T.tty?0:-59;case 21519:{if(!T.tty)return-59;var L=nt.get();return b[L>>2]=0,0}case 21520:return T.tty?-28:-59;case 21531:{var L=nt.get();return y.ioctl(T,x,L)}case 21523:return T.tty?0:-59;case 21524:return T.tty?0:-59;default:return-28}}catch(J){if(typeof y>"u"||!(J instanceof y.ErrnoError))throw J;return-J.errno}}function Yn(h,x,w,T){try{x=nt.getStr(x);var L=T&256,J=T&4096;return T=T&-4353,x=nt.calculateAt(h,x,J),nt.doStat(L?y.lstat:y.stat,x,w)}catch(Q){if(typeof y>"u"||!(Q instanceof y.ErrnoError))throw Q;return-Q.errno}}function Ur(h,x,w,T){nt.varargs=T;try{x=nt.getStr(x),x=nt.calculateAt(h,x);var L=T?nt.get():0;return y.open(x,w,L).fd}catch(J){if(typeof y>"u"||!(J instanceof y.ErrnoError))throw J;return-J.errno}}function qn(h,x){try{return h=nt.getStr(h),nt.doStat(y.stat,h,x)}catch(w){if(typeof y>"u"||!(w instanceof y.ErrnoError))throw w;return-w.errno}}function Sn(h,x,w){try{return x=nt.getStr(x),x=nt.calculateAt(h,x),w===0?y.unlink(x):w===512?y.rmdir(x):Ye("Invalid flags passed to unlinkat"),0}catch(T){if(typeof y>"u"||!(T instanceof y.ErrnoError))throw T;return-T.errno}}function qr(){return Date.now()}var Fn=!0;function Jn(){return Fn}function bn(h,x,w,T,L,J){try{var Q=nt.getStreamFromFD(T),ae=y.mmap(Q,h,L,x,w),Re=ae.ptr;return b[J>>2]=ae.allocated,Re}catch(Xe){if(typeof y>"u"||!(Xe instanceof y.ErrnoError))throw Xe;return-Xe.errno}}function kn(h,x,w,T,L,J){try{var Q=nt.getStreamFromFD(L);w&2&&nt.doMsync(h,Q,x,T,J),y.munmap(Q)}catch(ae){if(typeof y>"u"||!(ae instanceof y.ErrnoError))throw ae;return-ae.errno}}function Nn(){Ye("")}var Ge=[];function bt(h,x){Ge.length=0;var w;for(x>>=2;w=M[h++];)x+=w!=105&x,Ge.push(w==105?b[x]:q[x++>>1]),++x;return Ge}function Dr(h,x,w){var T=bt(x,w);return Qe[h].apply(null,T)}function hn(h,x,w){M.copyWithin(h,x,x+w)}function C(){return 2147483648}function B(h){try{return D.grow(h-Z.byteLength+65535>>>16),re(D.buffer),1}catch{}}function F(h){var x=M.length;h=h>>>0;var w=C();if(h>w)return!1;let T=(Re,Xe)=>Re+(Xe-Re%Xe)%Xe;for(var L=1;L<=4;L*=2){var J=x*(1+.2/L);J=Math.min(J,h+100663296);var Q=Math.min(w,T(Math.max(h,J),65536)),ae=B(Q);if(ae)return!0}return!1}var k={};function P(){return s||"./this.program"}function j(){if(!j.strings){var h=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",x={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:h,_:P()};for(var w in k)k[w]===void 0?delete x[w]:x[w]=k[w];var T=[];for(var w in x)T.push(w+"="+x[w]);j.strings=T}return j.strings}function ne(h,x,w){for(var T=0;T<h.length;++T)N[x++>>0]=h.charCodeAt(T);N[x>>0]=0}function fe(h,x){var w=0;return j().forEach(function(T,L){var J=x+w;V[h+L*4>>2]=J,ne(T,J),w+=T.length+1}),0}function te(h,x){var w=j();V[h>>2]=w.length;var T=0;return w.forEach(function(L){T+=L.length+1}),V[x>>2]=T,0}function ie(h){Te()||(r.onExit&&r.onExit(h),A=!0),o(h,new dt(h))}function oe(h,x){ie(h)}var he=oe;function Ie(h){try{var x=nt.getStreamFromFD(h);return y.close(x),0}catch(w){if(typeof y>"u"||!(w instanceof y.ErrnoError))throw w;return w.errno}}function De(h,x,w,T){for(var L=0,J=0;J<w;J++){var Q=V[x>>2],ae=V[x+4>>2];x+=8;var Re=y.read(h,N,Q,ae,T);if(Re<0)return-1;if(L+=Re,Re<ae)break}return L}function Ae(h,x,w,T){try{var L=nt.getStreamFromFD(h),J=De(L,x,w);return V[T>>2]=J,0}catch(Q){if(typeof y>"u"||!(Q instanceof y.ErrnoError))throw Q;return Q.errno}}function Se(h,x){return x+2097152>>>0<4194305-!!h?(h>>>0)+x*4294967296:NaN}function H(h,x,w,T,L){try{var J=Se(x,w);if(isNaN(J))return 61;var Q=nt.getStreamFromFD(h);return y.llseek(Q,J,T),Oe=[Q.position>>>0,(ge=Q.position,+Math.abs(ge)>=1?ge>0?(Math.min(+Math.floor(ge/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ge-+(~~ge>>>0))/4294967296)>>>0:0)],b[L>>2]=Oe[0],b[L+4>>2]=Oe[1],Q.getdents&&J===0&&T===0&&(Q.getdents=null),0}catch(ae){if(typeof y>"u"||!(ae instanceof y.ErrnoError))throw ae;return ae.errno}}function ce(h,x,w,T){for(var L=0,J=0;J<w;J++){var Q=V[x>>2],ae=V[x+4>>2];x+=8;var Re=y.write(h,N,Q,ae,T);if(Re<0)return-1;L+=Re}return L}function we(h,x,w,T){try{var L=nt.getStreamFromFD(h),J=ce(L,x,w);return V[T>>2]=J,0}catch(Q){if(typeof y>"u"||!(Q instanceof y.ErrnoError))throw Q;return Q.errno}}var Me=function(h,x,w,T){h||(h=this),this.parent=h,this.mount=h.mount,this.mounted=null,this.id=y.nextInode++,this.name=x,this.mode=w,this.node_ops={},this.stream_ops={},this.rdev=T},qe=365,gt=146;Object.defineProperties(Me.prototype,{read:{get:function(){return(this.mode&qe)===qe},set:function(h){h?this.mode|=qe:this.mode&=~qe}},write:{get:function(){return(this.mode&gt)===gt},set:function(h){h?this.mode|=gt:this.mode&=~gt}},isFolder:{get:function(){return y.isDir(this.mode)}},isDevice:{get:function(){return y.isChrdev(this.mode)}}}),y.FSNode=Me,y.staticInit();var ot={k:ui,f:Cn,u:Tn,v:Kn,s:Yn,c:Ur,t:qn,n:Sn,d:qr,i:Jn,o:bn,p:kn,a:Nn,w:Dr,j:hn,m:F,q:fe,r:te,e:he,b:Ie,g:Ae,l:H,h:we};Pe(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.y).apply(null,arguments)};var Je=r._emscripten_bind_VoidPtr___destroy___0=function(){return(Je=r._emscripten_bind_VoidPtr___destroy___0=r.asm.z).apply(null,arguments)},Mt=r._emscripten_bind_Graphviz_Graphviz_2=function(){return(Mt=r._emscripten_bind_Graphviz_Graphviz_2=r.asm.A).apply(null,arguments)},Kt=r._emscripten_bind_Graphviz_version_0=function(){return(Kt=r._emscripten_bind_Graphviz_version_0=r.asm.B).apply(null,arguments)},Dc=r._emscripten_bind_Graphviz_lastError_0=function(){return(Dc=r._emscripten_bind_Graphviz_lastError_0=r.asm.C).apply(null,arguments)},Ac=r._emscripten_bind_Graphviz_layout_3=function(){return(Ac=r._emscripten_bind_Graphviz_layout_3=r.asm.D).apply(null,arguments)},Cc=r._emscripten_bind_Graphviz_createFile_2=function(){return(Cc=r._emscripten_bind_Graphviz_createFile_2=r.asm.E).apply(null,arguments)},Tc=r._emscripten_bind_Graphviz___destroy___0=function(){return(Tc=r._emscripten_bind_Graphviz___destroy___0=r.asm.F).apply(null,arguments)};r._free=function(){return(r._free=r.asm.H).apply(null,arguments)},r._malloc=function(){return(r._malloc=r.asm.I).apply(null,arguments)};var Sc=r.___errno_location=function(){return(Sc=r.___errno_location=r.asm.J).apply(null,arguments)},Fc=r._emscripten_builtin_memalign=function(){return(Fc=r._emscripten_builtin_memalign=r.asm.K).apply(null,arguments)};r.___start_em_js=163408,r.___stop_em_js=163506;var us;me=function h(){us||bc(),us||(me=h)};function bc(h){if(xe>0||(O(),xe>0))return;function x(){us||(us=!0,r.calledRun=!0,!A&&(K(),n(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),z()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),x()},1)):x()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();bc();function Wr(){}Wr.prototype=Object.create(Wr.prototype),Wr.prototype.constructor=Wr,Wr.prototype.__class__=Wr,Wr.__cache__={},r.WrapperObject=Wr;function fs(h){return(h||Wr).__cache__}r.getCache=fs;function Oo(h,x){var w=fs(x),T=w[h];return T||(T=Object.create((x||Wr).prototype),T.ptr=h,w[h]=T)}r.wrapPointer=Oo;function gd(h,x){return Oo(h.ptr,x)}r.castObject=gd,r.NULL=Oo(0);function xd(h){if(!h.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";h.__destroy__(),delete fs(h.__class__)[h.ptr]}r.destroy=xd;function vd(h,x){return h.ptr===x.ptr}r.compare=vd;function _d(h){return h.ptr}r.getPointer=_d;function Ed(h){return h.__class__}r.getClass=Ed;var kt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(kt.needed){for(var h=0;h<kt.temps.length;h++)r._free(kt.temps[h]);kt.temps.length=0,r._free(kt.buffer),kt.buffer=0,kt.size+=kt.needed,kt.needed=0}kt.buffer||(kt.size+=128,kt.buffer=r._malloc(kt.size),S(kt.buffer)),kt.pos=0},alloc:function(h,x){S(kt.buffer);var w=x.BYTES_PER_ELEMENT,T=h.length*w;T=T+7&-8;var L;return kt.pos+T>=kt.size?(S(T>0),kt.needed+=T,L=r._malloc(T),kt.temps.push(L)):(L=kt.buffer+kt.pos,kt.pos+=T),L},copy:function(h,x,w){w>>>=0;var T=x.BYTES_PER_ELEMENT;switch(T){case 2:w>>>=1;break;case 4:w>>>=2;break;case 8:w>>>=3;break}for(var L=0;L<h.length;L++)x[w+L]=h[L]}};function ga(h){if(typeof h=="string"){var x=Ze(h),w=kt.alloc(x,N);return kt.copy(x,N,w),w}return h}function In(){throw"cannot construct a VoidPtr, no constructor in IDL"}In.prototype=Object.create(Wr.prototype),In.prototype.constructor=In,In.prototype.__class__=In,In.__cache__={},r.VoidPtr=In,In.prototype.__destroy__=In.prototype.__destroy__=function(){var h=this.ptr;Je(h)};function Qt(h,x){h&&typeof h=="object"&&(h=h.ptr),x&&typeof x=="object"&&(x=x.ptr),this.ptr=Mt(h,x),fs(Qt)[this.ptr]=this}return Qt.prototype=Object.create(Wr.prototype),Qt.prototype.constructor=Qt,Qt.prototype.__class__=Qt,Qt.__cache__={},r.Graphviz=Qt,Qt.prototype.version=Qt.prototype.version=function(){var h=this.ptr;return R(Kt(h))},Qt.prototype.lastError=Qt.prototype.lastError=function(){var h=this.ptr;return R(Dc(h))},Qt.prototype.layout=Qt.prototype.layout=function(h,x,w){var T=this.ptr;return kt.prepare(),h&&typeof h=="object"?h=h.ptr:h=ga(h),x&&typeof x=="object"?x=x.ptr:x=ga(x),w&&typeof w=="object"?w=w.ptr:w=ga(w),R(Ac(T,h,x,w))},Qt.prototype.createFile=Qt.prototype.createFile=function(h,x){var w=this.ptr;kt.prepare(),h&&typeof h=="object"?h=h.ptr:h=ga(h),x&&typeof x=="object"?x=x.ptr:x=ga(x),Cc(w,h,x)},Qt.prototype.__destroy__=Qt.prototype.__destroy__=function(){var h=this.ptr;Tc(h)},t.ready}})(),wc=Object.freeze({__proto__:null,default:VC});function HC(e){return{path:e.path,data:`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="${e.width}" height="${e.height}"></svg>`}}function $C(e){return e.map(HC)}function od(e,t){const r={images:[],files:[],...t};[...r.files,...$C(r.images)].forEach(n=>e.createFile(n.path,n.data))}function GC(e,t){return Ec(wc,"graphvizlib",e,t).then(r=>r.Graphviz.prototype.version())}const XC={layout(e,t="svg",r="dot",n){return e?Ec(wc,"graphvizlib",n==null?void 0:n.wasmFolder,n==null?void 0:n.wasmBinary).then(i=>{const a=new i.Graphviz(n!=null&&n.yInvert?1:0,n!=null&&n.nop?n==null?void 0:n.nop:0);od(a,n);const s=a.layout(e,t,r);if(i.destroy(a),!s)throw new Error(i.Graphviz.prototype.lastError());return s}):Promise.resolve("")},circo(e,t="svg",r){return this.layout(e,t,"circo",r)},dot(e,t="svg",r){return this.layout(e,t,"dot",r)},fdp(e,t="svg",r){return this.layout(e,t,"fdp",r)},sfdp(e,t="svg",r){return this.layout(e,t,"sfdp",r)},neato(e,t="svg",r){return this.layout(e,t,"neato",r)},osage(e,t="svg",r){return this.layout(e,t,"osage",r)},patchwork(e,t="svg",r){return this.layout(e,t,"patchwork",r)},twopi(e,t="svg",r){return this.layout(e,t,"twopi",r)}};class KC{constructor(t){this._wasm=t}layout(t,r="svg",n="dot",i){if(!t)return"";const a=new this._wasm.Graphviz(i!=null&&i.yInvert?1:0,i!=null&&i.nop?i==null?void 0:i.nop:0);od(a,i);const s=a.layout(t,r,n);if(this._wasm.destroy(a),!s)throw new Error(this._wasm.Graphviz.prototype.lastError());return s}circo(t,r="svg",n){return this.layout(t,r,"circo",n)}dot(t,r="svg",n){return this.layout(t,r,"dot",n)}fdp(t,r="svg",n){return this.layout(t,r,"fdp",n)}sfdp(t,r="svg",n){return this.layout(t,r,"sfdp",n)}neato(t,r="svg",n){return this.layout(t,r,"neato",n)}osage(t,r="svg",n){return this.layout(t,r,"osage",n)}patchwork(t,r="svg",n){return this.layout(t,r,"patchwork",n)}twopi(t,r="svg",n){return this.layout(t,r,"twopi",n)}}function YC(e,t){return Ec(wc,"graphvizlib",e,t).then(r=>new KC(r))}function f0(e,t){if(e.tag=="polygon"){var r=Fs(e);r.tag="path";var n=e.attributes,i=Fs(n),a=n.points;if(t.tag=="polygon"){var s=e.bbox;s.cx=s.x+s.width/2,s.cy=s.y+s.height/2;for(var o=n.points,c=o.split(" "),l=c.map(function(b){var V=b.split(",");return[V[0]-s.cx,V[1]-s.cy]}),u=l[l.length-1][0],m=l[l.length-1][1],d=0;d<l.length;d++,u=g,m=v){var g=l[d][0],v=l[d][1],p=g-u,_=v-m;if(_!=0){var E=u-m*p/_;if(0<=E&&E<1/0&&(u<=E&&E<=g||g<=E&&E<=u))break}}var D=[[s.cx+E,s.cy+0].join(",")];D=D.concat(c.slice(d)),D=D.concat(c.slice(0,d)),a=D.join(" ")}i.d="M"+a+"z",delete i.points,r.attributes=i}else{var r=Fs(e);r.tag="path";var n=e.attributes,i=Fs(n),A=n.cx,S=n.cy,I=n.rx,U=n.ry;if(t.tag=="polygon"){var s=t.bbox;s.cx=s.x+s.width/2,s.cy=s.y+s.height/2;var R=t.attributes.points.split(" ")[0].split(","),Y=R[0],W=R[1],p=Y-s.cx,_=W-s.cy,Z=Math.sqrt(Math.pow(p,2)+Math.pow(_,2)),N=p/Z,M=-_/Z}else var N=1,M=0;var g=I*N,v=-U*M,E=I*-N,G=-U*-M,p=E-g,_=G-v;i.d="M "+A+" "+S+" m "+g+","+v+" a "+I+","+U+" 0 1,0 "+p+","+_+" a "+I+","+U+" 0 1,0 "+-p+","+-_+"z",delete i.cx,delete i.cy,delete i.rx,delete i.ry,r.attributes=i}return r}function qC(a,t,r){var i=a.split(" "),n=i.map(function(s){return s.split(",")}),n=i.map(function(s){return[ri(+t+ +s.split(",")[0]),ri(+r+ +s.split(",")[1])]}),i=n.map(function(s){return s.join(",")}),a=i.join(" ");return a}function JC(e,t,r){var a=e.split(/[A-Z ]/);a.shift();var n=e.split(/[^[A-Z ]+/),i=a.map(function(s){return s.split(",")}),i=a.map(function(s){return[ri(+t+ +s.split(",")[0]),ri(+r+ +s.split(",")[1])]}),a=i.map(function(s){return s.join(",")});return e=n.reduce(function(s,o,c){return s.concat(o,a[c])},[]).join(""),e}function ZC(){try{XC.layout("","svg","dot").then(()=>{YC().then(r=>{this.layoutSync=r.layout.bind(r),this._worker==null&&this._dispatch.call("initEnd",this),this._afterInit&&this._afterInit()})})}catch{}if(this._worker!=null){var e=this._vizURL,t=this;this._workerPort.onmessage=function(r){var n=t._workerCallbacks.shift();n.call(t,r)},e.match(/^https?:\/\/|^\/\//i)||(e=new window.URL(e,document.location.href).href),Ol.call(this,{type:"layout",dot:"",engine:"dot",vizURL:e},function(r){switch(r.data.type){}}),Ol.call(this,{type:"version"},function(r){switch(r.data.type){case"version":t._graphvizVersion=r.data.version,t._dispatch.call("initEnd",this);break}})}}function Ol(e,t){this._workerCallbacks.push(t),this._workerPort.postMessage(e)}function QC(e,t,r,n){if(this._worker)Ol.call(this,{type:"layout",dot:e,engine:t,options:r},function(a){n.call(this,a.data)});else try{var i=this.layoutSync(e,"svg",t,r);n.call(this,{type:"done",svg:i})}catch(a){n.call(this,{type:"error",error:a.message})}}function eT(e,t){var r=this;this._worker;var n=this._options.engine,i=this._images;this._dispatch.call("start",this),this._busy=!0,this._dispatch.call("layoutStart",this);var a={images:i};return!this._worker&&this.layoutSync==null?(this._afterInit=this.dot.bind(this,e,t),this):(this.layout(e,n,a,function(s){switch(s.type){case"error":if(r._onerror)r._onerror(s.error);else throw s.error.message;break;case"done":var o=s.svg;tT.call(this,o,t);break}}),this)}function tT(e,t){var r=this._options.keyMode,n=this._options.tweenPaths,i=this._options.tweenShapes;if(typeof this._options.tweenPrecision=="string"&&this._options.tweenPrecision.includes("%"))var a=+this._options.tweenPrecision.split("%")[0]/100,s=this._options.tweenPrecision.includes("%");else var a=this._options.tweenPrecision,s=!1;var o=this._options.growEnteringEdges,c={},l=this._dictionary||{},u={},m=this._nodeDictionary||{};function d(N,M){var G=N.tag;if(r=="index")N.key=M;else if(G[0]!="#"){if(r=="id")N.key=N.attributes.id;else if(r=="title"){var b=N.children.find(function(V){return V.tag=="title"});b&&(b.children.length>0?N.key=b.children[0].text:N.key="")}}N.key==null&&(i&&(G=="ellipse"||G=="polygon")&&(G="path"),N.key=G+"-"+M)}function g(N,M){var G=(M?M.id+".":"")+N.key;N.id=G}function v(N){c[N.id]=N}function p(N,M){i&&N.id in l&&(M.tag=="polygon"||M.tag=="ellipse"||M.tag=="path")&&(M.tag!=N.tag||N.tag=="polygon")&&(M.tag!="path"&&(N.alternativeOld=f0(M,N)),N.tag!="path"&&(N.alternativeNew=f0(N,M)))}function _(N,M){if(n&&M&&(M.tag=="path"||N.alternativeOld&&N.alternativeOld.tag=="path")){var G=(N.alternativeNew||N).attributes.d;if(N.alternativeOld)var b=kl(N.alternativeOld);else var b=kl(M);(N.alternativeOld||(N.alternativeOld={})).points=NC(b,G,a,s)}}function E(N,M=0,G){d(N,M),g(N,G);var b=N.id,V=l[b];v(N),p(N,V),_(N,V);var q={};N.children.forEach(function(re){var le=re.tag;(le=="ellipse"||le=="polygon")&&(le="path"),q[le]==null&&(q[le]=0);var pe=q[le]++;E(re,pe,N)})}function D(N){var M=N.tag;if(o&&N.parent&&N.parent.attributes.class=="node"&&M=="title"){if(N.children.length>0)var G=N.children[0],b=G.text;else var b="";u[b]=N.parent}}function A(N){var M=N.id,G=N.tag,b=l[M];if(o&&!b&&N.parent&&sd(N)&&(G=="path"||G=="polygon")){if(G=="polygon"){var V=N.parent.children.find(function(xe){return xe.tag=="path"});V&&(N.totalLength=V.totalLength)}var q=BC(N),re=q.children[0],le=re.text.split("->");le.length!=2&&(le=re.text.split("--"));var pe=le[0],Ce=u[pe],Te=m[pe];if(Te){var K=Ce.children.findIndex(function(xe,me){return xe.tag=="g"});if(K>=0){var O=Ce.children[K].children.findIndex(function(xe,me){return xe.tag=="a"});Ce=Ce.children[K].children[O]}var K=Te.children.findIndex(function(xe,me){return xe.tag=="g"});if(K>=0){var O=Te.children[K].children.findIndex(function(me,se){return me.tag=="a"});Te=Te.children[K].children[O]}for(var z=Ce.children,K=0;K<z.length;K++)if(z[K].tag=="polygon"||z[K].tag=="ellipse"||z[K].tag=="path"||z[K].tag=="text"){var X=z[K];break}for(var ee=Te.children,K=0;K<ee.length;K++)if(ee[K].tag=="polygon"||ee[K].tag=="ellipse"||ee[K].tag=="path"||ee[K].tag=="text"){var ye=ee[K];break}ye&&X?N.offset={x:ye.center.x-X.center.x,y:ye.center.y-X.center.y}:N.offset={x:0,y:0}}}}function S(N){D(N),A(N),N.children.forEach(function(M){S(M)})}this._dispatch.call("layoutEnd",this);var I=ze(document.createDocumentFragment()).append("div"),U=new window.DOMParser,R=U.parseFromString(e,"image/svg+xml");I.append(function(){return R.documentElement});var Y=I.select("svg"),W=Ni(Y);if(this._dispatch.call("dataExtractEnd",this),E(W),this._dispatch.call("dataProcessPass1End",this),S(W),this._dispatch.call("dataProcessPass2End",this),this._data=W,this._dictionary=c,this._nodeDictionary=u,this._extractData=function(N,M,G){var b=Ni(N);return E(b,M,G),S(b),b},this._busy=!1,this._dispatch.call("dataProcessEnd",this),t&&t.call(this),this._queue.length>0){var Z=this._queue.shift();Z.call(this)}}function rT(e,t){var r=this;this.dot(e,n);function n(){r.render(t)}return this}function nT(e){return e instanceof Function?this._transitionFactory=e:this._transition=gc(e),this}function iT(e){var t=this._selection,r=t.selectWithoutDataPropagation("svg");return r.size()!=0?hC(r.node(),e):null}function aT(e){if(typeof e>"u")return Object.assign({},this._options);for(var t of Object.keys(e))this._options[t]=e[t];return this}function sT(e){return this._options.width=e,this}function oT(e){return this._options.height=e,this}function lT(e){return this._options.scale=e,this}function cT(e){return this._options.fit=e,this}function uT(e){return this._attributer=e,this}function fT(e){return this._options.engine=e,this}function hT(e,t,r){return this._images.push({path:e,width:t,height:r}),this}function dT(e){if(!this._keyModes.has(e))throw Error("Illegal keyMode: "+e);if(e!=this._options.keyMode&&this._data!=null)throw Error("Too late to change keyMode");return this._options.keyMode=e,this}function pT(e){return this._options.fade=e,this}function mT(e){return this._options.tweenPaths=e,this}function gT(e){return this._options.tweenShapes=e,e&&(this._options.tweenPaths=!0),this}function xT(e){return this._options.convertEqualSidedPolygons=e,this}function vT(e){return this._options.tweenPrecision=e,this}function _T(e){return this._options.growEnteringEdges=e,this}function ET(e,t){return this._dispatch.on(e,t),this}function wT(e){return this._onerror=e,this}function yT(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xo(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function DT(e){return e=xo(Math.abs(e)),e?e[1]:NaN}function AT(e,t){return function(r,n){for(var i=r.length,a=[],s=0,o=e[0],c=0;i>0&&o>0&&(c+o+1>n&&(o=Math.max(1,n-c)),a.push(r.substring(i-=o,i+o)),!((c+=o+1)>n));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function CT(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var TT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bl(e){if(!(t=TT.exec(e)))throw new Error("invalid format: "+e);var t;return new yc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Bl.prototype=yc.prototype;function yc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}yc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ST(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var ld;function FT(e,t){var r=xo(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(ld=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+xo(e,Math.max(0,t+a-1))[0]}function h0(e,t){var r=xo(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const d0={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:yT,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>h0(e*100,t),r:h0,s:FT,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function p0(e){return e}var m0=Array.prototype.map,g0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bT(e){var t=e.grouping===void 0||e.thousands===void 0?p0:AT(m0.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?p0:CT(m0.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(m){m=Bl(m);var d=m.fill,g=m.align,v=m.sign,p=m.symbol,_=m.zero,E=m.width,D=m.comma,A=m.precision,S=m.trim,I=m.type;I==="n"?(D=!0,I="g"):d0[I]||(A===void 0&&(A=12),S=!0,I="g"),(_||d==="0"&&g==="=")&&(_=!0,d="0",g="=");var U=p==="$"?r:p==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",R=p==="$"?n:/[%p]/.test(I)?s:"",Y=d0[I],W=/[defgprs%]/.test(I);A=A===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function Z(N){var M=U,G=R,b,V,q;if(I==="c")G=Y(N)+G,N="";else{N=+N;var re=N<0||1/N<0;if(N=isNaN(N)?c:Y(Math.abs(N),A),S&&(N=ST(N)),re&&+N==0&&v!=="+"&&(re=!1),M=(re?v==="("?v:o:v==="-"||v==="("?"":v)+M,G=(I==="s"?g0[8+ld/3]:"")+G+(re&&v==="("?")":""),W){for(b=-1,V=N.length;++b<V;)if(q=N.charCodeAt(b),48>q||q>57){G=(q===46?i+N.slice(b+1):N.slice(b))+G,N=N.slice(0,b);break}}}D&&!_&&(N=t(N,1/0));var le=M.length+N.length+G.length,pe=le<E?new Array(E-le+1).join(d):"";switch(D&&_&&(N=t(pe+N,pe.length?E-G.length:1/0),pe=""),g){case"<":N=M+N+G+pe;break;case"=":N=M+pe+N+G;break;case"^":N=pe.slice(0,le=pe.length>>1)+M+N+G+pe.slice(le);break;default:N=pe+M+N+G;break}return a(N)}return Z.toString=function(){return m+""},Z}function u(m,d){var g=l((m=Bl(m),m.type="f",m)),v=Math.max(-8,Math.min(8,Math.floor(DT(d)/3)))*3,p=Math.pow(10,-v),_=g0[8+v/3];return function(E){return g(p*E)+_}}return{format:l,formatPrefix:u}}var bs,Hr;kT({thousands:",",grouping:[3],currency:["$",""]});function kT(e){return bs=bT(e),Hr=bs.format,bs.formatPrefix,bs}function NT(e){var t=Date.now(),r={},n=this._eventTypes,i=Math.max(...n.map(c=>c.length));for(let c=0;c<n.length;c++){let l=n[c];r[l]=[];var a=this,s,o;this.on(l+".log",e?function(){var u=Date.now(),m=r[l].length;r[l].push(u);var d="";if(d+="Event ",d+=Hr(" >2")(c)+" ",d+=l+" ".repeat(i-l.length),d+=Hr(" >5")(u-t)+" ",l!="initEnd"&&(d+=Hr(" >5")(u-r.start[m])),l=="dataProcessEnd"&&(d+=" prepare                 "+Hr(" >5")(u-r.layoutEnd[m])),l=="renderEnd"&&a._transition&&(d+=" transition start margin "+Hr(" >5")(a._transition.delay()-(u-r.renderStart[m])),s=a._transition.delay(),o=a._transition.duration()),l=="transitionStart"){var g=u-r.renderStart[m];d+=" transition delay        "+Hr(" >5")(u-r.renderStart[m]),d+=" expected "+Hr(" >5")(s),d+=" diff "+Hr(" >5")(g-s)}if(l=="transitionEnd"){var v=u-r.transitionStart[m];d+=" transition duration     "+Hr(" >5")(v),d+=" expected "+Hr(" >5")(o),d+=" diff "+Hr(" >5")(v-o)}console.log(d),t=u}:null)}return this}function IT(){return delete this._selection.node().__graphviz__,this._worker&&this._workerPortClose(),this}const Pl=Math.PI,jl=2*Pl,gi=1e-6,OT=jl-gi;function Rl(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function cd(){return new Rl}Rl.prototype=cd.prototype={constructor:Rl,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-e,c=n-t,l=a-e,u=s-t,m=l*l+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(m>gi)if(!(Math.abs(u*o-c*l)>gi)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var d=r-a,g=n-s,v=o*o+c*c,p=d*d+g*g,_=Math.sqrt(v),E=Math.sqrt(m),D=i*Math.tan((Pl-Math.acos((v+m-p)/(2*_*E)))/2),A=D/E,S=D/_;Math.abs(A-1)>gi&&(this._+="L"+(e+A*l)+","+(t+A*u)),this._+="A"+i+","+i+",0,0,"+ +(u*d>l*g)+","+(this._x1=e+S*o)+","+(this._y1=t+S*c)}},arc:function(e,t,r,n,i,a){e=+e,t=+t,r=+r,a=!!a;var s=r*Math.cos(n),o=r*Math.sin(n),c=e+s,l=t+o,u=1^a,m=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+c+","+l:(Math.abs(this._x1-c)>gi||Math.abs(this._y1-l)>gi)&&(this._+="L"+c+","+l),r&&(m<0&&(m=m%jl+jl),m>OT?this._+="A"+r+","+r+",0,1,"+u+","+(e-s)+","+(t-o)+"A"+r+","+r+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):m>gi&&(this._+="A"+r+","+r+",0,"+ +(m>=Pl)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function BT(e,t,r,n){return t=-t,n=-n,[e,t]=[e*r-t*n,e*n+t*r],t=-t,[e,t]}function PT(e,t,r,n,i,a={}){if(i=Object.assign({},i),i.style&&i.style.includes("invis"))var s=ze(null);else{var o=this._selection,c=o.selectWithoutDataPropagation("svg"),l=c.selectWithoutDataPropagation("g"),u=hd.call(this,i),m=Ni(u),s=l.append("g").data([m]);cs.call(s.node(),m),ud.call(this,s,e,t,r,n,i,a)}return this._drawnEdge={g:s,x1:e,y1:t,x2:r,y2:n,attributes:i},this}function jT(e,t,r,n,i={},a={}){if(!this._drawnEdge)throw Error("No edge has been drawn");var s=this._drawnEdge.g;if(i=Object.assign(this._drawnEdge.attributes,i),this._drawnEdge.x1=e,this._drawnEdge.y1=t,this._drawnEdge.x2=r,this._drawnEdge.y2=n,s.empty()&&!(i.style&&i.style.includes("invis"))){var o=this._selection,c=o.selectWithoutDataPropagation("svg"),l=c.selectWithoutDataPropagation("g"),s=l.append("g");this._drawnEdge.g=s}return s.empty()||ud.call(this,s,e,t,r,n,i,a),this}function ud(e,t,r,n,i,a,s){var o=hd.call(this,a),c=Ni(o);e.data([c]),cs.call(e.node(),c),fd(e,t,r,n,i,a,s)}function fd(e,t,r,n,i,a,s){var o=s.shortening||0,c=10,l=7,u=.1,m=[[0,-l/2],[c,0],[0,l/2],[0,-l/2]],d=n-t,g=i-r,v=Math.sqrt(d*d+g*g);if(v==0)var p=1,_=0;else var p=d/v,_=g/v;if(n=t+(v-o-c-u)*p,i=r+(v-o-c-u)*_,a.URL||a.tooltip)var E=e.selectWithoutDataPropagation("g").selectWithoutDataPropagation("a"),D=E.selectWithoutDataPropagation("path"),A=E.selectWithoutDataPropagation("polygon");else var D=e.selectWithoutDataPropagation("path"),A=e.selectWithoutDataPropagation("polygon");var S=cd();S.moveTo(t,r),S.lineTo(n,i),D.attr("d",S),n=t+(v-o-c)*p,i=r+(v-o-c)*_;for(var I=0;I<m.length;I++){var U=m[I];m[I]=BT(U[0],U[1],p,_)}for(var I=0;I<m.length;I++){var U=m[I];m[I]=[n+U[0],i+U[1]]}for(var R=[],I=0;I<m.length;I++){var U=m[I];R.push(U.join(","))}var Y=R.join(" ");return A.attr("points",Y),this}function RT(e,t,r={}){if(!this._drawnEdge)throw Error("No edge has been drawn");var n=this._drawnEdge.g,i=this._drawnEdge.x1,a=this._drawnEdge.y1,s=this._drawnEdge.attributes;return this._drawnEdge.x2=e,this._drawnEdge.y2=t,fd(n,i,a,e,t,s,r),this}function x0(){if(!this._drawnEdge)return this;var e=this._drawnEdge.g;return e.remove(),this._drawnEdge=null,this}function LT(e){if(!this._drawnEdge)throw Error("No edge has been drawn");var t=this._drawnEdge.g;if(t.empty())return this;this._drawnEdge.attributes;var r=t.selectWithoutDataPropagation("title");r.text(e);var n=this._selection,i=n.selectWithoutDataPropagation("svg"),a=i.selectWithoutDataPropagation("g"),s=a.datum(),o=this._extractData(t,s.children.length,a.datum());return s.children.push(o),vc(t,o),this._drawnEdge=null,this}function v0(){return this._drawnEdge?this._drawnEdge.g:ze(null)}function hd(e){var t="";for(var r of Object.keys(e))e[r]!=null&&(t+=' "'+r+'"="'+e[r]+'"');var n="digraph {a -> b ["+t+"]}",i=this.layoutSync(n,"svg","dot"),a=new window.DOMParser,s=a.parseFromString(i,"image/svg+xml"),o=ze(document.createDocumentFragment()).append(function(){return s.documentElement}),c=o.select(".edge");return c}function MT(e,t,r,n={},i={}){if(n=Object.assign({},n),n.style&&n.style.includes("invis"))var a=ze(null);else{var s=this._selection,o=s.selectWithoutDataPropagation("svg"),c=o.selectWithoutDataPropagation("g"),l=md.call(this,r,n),u=Ni(l),a=c.append("g").data([u]);cs.call(a.node(),u),dd.call(this,a,e,t,r,n,i)}return this._drawnNode={g:a,nodeId:r,x:e,y:t,attributes:n},this}function UT(e,t,r,n={},i={}){if(!this._drawnNode)throw Error("No node has been drawn");var a=this._drawnNode.g;if(r==null&&(r=this._drawnNode.nodeId),n=Object.assign(this._drawnNode.attributes,n),this._drawnNode.nodeId=r,this._drawnNode.x=e,this._drawnNode.y=t,a.empty()&&!(n.style&&n.style.includes("invis"))){var s=this._selection,o=s.selectWithoutDataPropagation("svg"),c=o.selectWithoutDataPropagation("g"),a=c.append("g");this._drawnNode.g=a}return a.empty()||dd.call(this,a,e,t,r,n,i),this}function dd(e,t,r,n,i,a){var s=md.call(this,n,i),o=Ni(s);return e.data([o]),cs.call(e.node(),o),pd(e,t,r,i),this}function pd(e,t,r,n,i){if(n.URL||n.tooltip)var a=e.selectWithoutDataPropagation("g").selectWithoutDataPropagation("a");else var a=e;var s=a.selectAll("ellipse,polygon,path,polyline"),o=e.selectWithoutDataPropagation("text");if(s.size()!=0){var c=s.node().getBBox();c.cx=c.x+c.width/2,c.cy=c.y+c.height/2}else o.size()!=0&&(c={x:+o.attr("x"),y:+o.attr("y"),width:0,height:0,cx:+o.attr("x"),cy:+o.attr("y")});return s.each(function(l,u){var m=ze(this);if(m.attr("cx"))m.attr("cx",ri(t)).attr("cy",ri(r));else if(m.attr("points")){var d=m.attr("points").trim();m.attr("points",qC(d,t-c.cx,r-c.cy))}else{var g=m.attr("d");m.attr("d",JC(g,t-c.cx,r-c.cy))}}),o.size()!=0&&o.attr("x",ri(+o.attr("x")+t-c.cx)).attr("y",ri(+o.attr("y")+r-c.cy)),this}function WT(e,t,r={}){if(!this._drawnNode)throw Error("No node has been drawn");var n=this._drawnNode.g,i=this._drawnNode.attributes;return this._drawnNode.x=e,this._drawnNode.y=t,n.empty()||pd(n,e,t,i),this}function _0(){if(!this._drawnNode)return this;var e=this._drawnNode.g;return e.empty()||e.remove(),this._drawnNode=null,this}function zT(e){if(!this._drawnNode)throw Error("No node has been drawn");e==null&&(e=this._drawnNode.nodeId);var t=this._drawnNode.g;if(t.empty())return this;var r=this._drawnNode.attributes,n=t.selectWithoutDataPropagation("title");if(n.text(e),r.URL||r.tooltip){var i=t.selectWithoutDataPropagation("g"),a=i.selectWithoutDataPropagation("a");a.selectWithoutDataPropagation("ellipse,polygon,path,polyline");var s=a.selectWithoutDataPropagation("text")}else{t.selectWithoutDataPropagation("ellipse,polygon,path,polyline");var s=t.selectWithoutDataPropagation("text")}s.text(r.label||e);var o=this._selection,c=o.selectWithoutDataPropagation("svg"),l=c.selectWithoutDataPropagation("g"),u=l.datum(),m=this._extractData(t,u.children.length,l.datum());return u.children.push(m),vc(t,m),this._drawnNode=null,this}function E0(){return this._drawnNode?this._drawnNode.g:ze(null)}function md(e,t){var r="";for(var n of Object.keys(t))t[n]!=null&&(r+=' "'+n+'"="'+t[n]+'"');var i='graph {"'+e+'" ['+r+"]}",a=this.layoutSync(i,"svg","dot"),s=new window.DOMParser,o=s.parseFromString(a,"image/svg+xml"),c=ze(document.createDocumentFragment()).append(function(){return o.documentElement}),l=c.select(".node");return l}function vo(e){self.document={},e.addEventListener("message",function(t){let r=self["@hpcc-js/wasm"];if(r==null&&t.data.vizURL&&(importScripts(t.data.vizURL),r=self["@hpcc-js/wasm"],r.wasmFolder(t.data.vizURL.match(/.*\//)[0])),t.data.type=="version"){r.graphvizVersion().then(n=>{e.postMessage({type:"version",version:n})});return}r.graphviz.layout(t.data.dot,"svg",t.data.engine,t.data.options).then(n=>{n?e.postMessage({type:"done",svg:n}):t.data.vizURL?e.postMessage({type:"init"}):e.postMessage({type:"skip"})}).catch(n=>{e.postMessage({type:"error",error:n.message})})})}function VT(){vo(self)}function HT(){self.onconnect=function(e){const t=e.ports[0];vo(t),t.start()}}function Ll(e,t){if(this._options={useWorker:!0,useSharedWorker:!1,engine:"dot",keyMode:"title",fade:!0,tweenPaths:!0,tweenShapes:!0,convertEqualSidedPolygons:!0,tweenPrecision:1,growEnteringEdges:!0,zoom:!0,zoomScaleExtent:[.1,10],zoomTranslateExtent:[[-1/0,-1/0],[1/0,1/0]],width:null,height:null,scale:1,fit:!1},t instanceof Object)for(var r of Object.keys(t))this._options[r]=t[r];else typeof t=="boolean"&&(this._options.useWorker=t);var n=this._options.useWorker,i=this._options.useSharedWorker;if(typeof Worker>"u"&&(n=!1),typeof SharedWorker>"u"&&(i=!1),n||i){var a=Rr("script"),s=a.filter(function(){return ze(this).attr("type")=="javascript/worker"||ze(this).attr("src")&&ze(this).attr("src").match(/.*\/@hpcc-js\/wasm/)});s.size()==0?(console.warn('No script tag of type "javascript/worker" was found and "useWorker" is true. Not using web worker.'),n=!1,i=!1):(this._vizURL=s.attr("src"),this._vizURL||(console.warn('No "src" attribute of was found on the "javascript/worker" script tag and "useWorker" is true. Not using web worker.'),n=!1,i=!1))}if(i){const l="data:application/javascript;base64,"+btoa(vo.toString()+"("+HT.toString()+")()");this._worker=this._worker=new SharedWorker(l),this._workerPort=this._worker.port,this._workerPortClose=this._worker.port.close.bind(this._workerPort),this._worker.port.start(),this._workerCallbacks=[]}else if(n){var o=new Blob([vo.toString()+"("+VT.toString()+")()"]),c=window.URL.createObjectURL(o);this._worker=new Worker(c),this._workerPort=this._worker,this._workerPortClose=this._worker.terminate.bind(this._worker),this._workerCallbacks=[]}else GC().then((l=>{this._graphvizVersion=l}).bind(this));this._selection=e,this._active=!1,this._busy=!1,this._jobs=[],this._queue=[],this._keyModes=new Set(["title","id","tag-index","index"]),this._images=[],this._translation=void 0,this._scale=void 0,this._eventTypes=["initEnd","start","layoutStart","layoutEnd","dataExtractEnd","dataProcessPass1End","dataProcessPass2End","dataProcessEnd","renderStart","renderEnd","transitionStart","transitionEnd","restoreEnd","end","zoom"],this._dispatch=So(...this._eventTypes),ZC.call(this),e.node().__graphviz__=this}Ll.prototype={constructor:Ll,engine:fT,addImage:hT,keyMode:dT,fade:pT,tweenPaths:mT,tweenShapes:gT,convertEqualSidedPolygons:xT,tweenPrecision:vT,growEnteringEdges:_T,zoom:AC,resetZoom:CC,zoomBehavior:FC,zoomSelection:bC,zoomScaleExtent:TC,zoomTranslateExtent:SC,render:PC,layout:QC,dot:eT,data:IC,renderDot:rT,transition:nT,active:iT,options:aT,width:sT,height:oT,scale:lT,fit:cT,attributer:uT,on:ET,onerror:wT,logEvents:NT,destroy:IT,drawEdge:PT,updateDrawnEdge:jT,moveDrawnEdgeEndPoint:RT,insertDrawnEdge:LT,removeDrawnEdge:x0,removeDrawnEdge:x0,drawnEdgeSelection:v0,drawnEdgeSelection:v0,drawNode:MT,updateDrawnNode:UT,moveDrawnNode:WT,insertDrawnNode:zT,removeDrawnNode:_0,removeDrawnNode:_0,drawnNodeSelection:E0,drawnNodeSelection:E0,graphvizVersion:jC};function $T(e){var t=this.node().__graphviz__;return t?(t.options(e),po((function(){t._dispatch.call("initEnd",this)}).bind(this),0)):t=new Ll(this,e),t}function GT(e){return ze(this.size()>0?this.node().querySelector(e):null)}Ii.prototype.graphviz=$T;Ii.prototype.selectWithoutDataPropagation=GT;const XT=({store:e,setLoading:t,isLoading:r,position:n=Wa.NO})=>{var A;const i=Nr(),[a]=Kr(),s=Gn(a),{txProfileData:o,refreshFundFlow:c,addressLabels:l,solanaProfileData:u}=e,m=mt.isSolana((i==null?void 0:i.network)??"")?u:o,{mode:d}=de.useContext($n),[g,v]=de.useState(3),p=de.useRef(null),_=`graph-${n}`,E=(A=m==null?void 0:m.fundFlow)==null?void 0:A.filter(S=>!S.isReverted),D=E==null?void 0:E.length;return de.useEffect(()=>{if(!d||!c||!D)return;_c("https://assets.blocksec.com/@hpcc-js/wasm@1.16.1/dist");const{node:S,edge:I}=P0(m,l,d,{...i,...s});v(S.length);const U=S==null?void 0:S.reduce((W,Z)=>`${W}  ${Z} `,""),R=I==null?void 0:I.reduce((W,Z)=>`${W}  ${Z} `,""),Y=`digraph {
            rankdir="LR"
            fontname="PingFangSC-Regular, PingFang SC"
            bgcolor="${hl[d]}"
            ${U}
            ${R}
        }`;ze(`#${_}`).graphviz().width("100%").height("100%").options({zoom:!1,fit:!0,useWorker:!0}).renderDot(Y).on("end",()=>{t(!1),Rr(".edge").on("mouseover",function(){const W=ze(this).attr("id");Rr(".edge").each(function(){ze(this).attr("id")!==W&&(ze(this).select("polygon").attr("class","opacity-30"),ze(this).select("path").attr("class","opacity-30"),ze(this).selectAll("g > a > text").each(function(){ze(this).attr("class","opacity-30")}))})}),Rr(".edge").on("mouseout",function(){Rr(".edge").each(function(){ze(this).select("polygon").attr("class",""),ze(this).select("path").attr("class",""),ze(this).selectAll("g > a > text").each(function(){ze(this).attr("class","")})})})})},[c]),de.useEffect(()=>{!d||r||(ze("polygon").each(function(){ze(this).attr("fill",hl[d])}),Rr(".node").each(function(){ze(this).select("polygon").attr("fill",zc[d]).attr("stroke",zc[d]),ze(this).select("text").attr("fill",x1[d])}),Rr(".edge").each(function(){ze(this).selectAll("text").each(function(S,I){(I===1||I===2)&&ze(this).attr("fill",v1[d])})}))},[d]),f.jsx("div",{className:Ve("box-border h-[500px] w-full overflow-hidden px-[30px] py-[10px]",{"w-1/2":g<5&&n===Wa.NO}),id:_,ref:p})},KT="_fundFlow_1v4ro_1",YT="_actionWrap_1v4ro_9",qT="_expendIcon_1v4ro_15",JT="_downloadIcon_1v4ro_16",ZT="_loadingContainer_1v4ro_28",QT="_fundFlowFocus_1v4ro_38",eS="_downloadTooltips_1v4ro_46",tS="_content_1v4ro_46",rS="_png_1v4ro_46",nS="_svg_1v4ro_47",iS="_header_1v4ro_54",aS="_collapseWrap_1v4ro_54",rn={fundFlow:KT,actionWrap:YT,expendIcon:qT,downloadIcon:JT,loadingContainer:ZT,fundFlowFocus:QT,downloadTooltips:eS,content:tS,png:rS,svg:nS,header:iS,collapseWrap:aS},sS={dark:"https://assets.blocksec.com/image/1671093957494-2.png",light:"https://assets.blocksec.com/image/1671093957494-3.png"},oS=({position:e=Wa.NO})=>{var _;const{txnHash:t,network:r=""}=Nr(),n=yr(),{txProfileData:i,setExpandFundFlow:a,solanaProfileData:s}=n,o=mt.isSolana(r)?s:i,[c,l]=de.useState(!0),{mode:u="light"}=de.useContext($n),m=`graph-${e}`,d=E=>{var A,S,I;const D=(A=document.querySelector(`#${m} > svg`))==null?void 0:A.cloneNode(!0);if(D){const Y=D.getElementsByTagName("polygon")[0];if(Y&&E==="svg"){const Z=((I=(S=D.getAttribute("viewBox"))==null?void 0:S.split(" "))==null?void 0:I[2])??600;let N=Z;try{N=new sn(Z).sub(262).toFixed()}catch(M){console.log(M)}Y.insertAdjacentHTML("afterend",`<a id="watermark" xlink:href="https://phalcon.blocksec.com/" target="_blank">
            <image x="${N}" y="-60" style="opacity: 0.2" xlink:href=${sS[u]} width="262" height="57"/>
        </a>`)}const W=`${t}`;if(E==="png"){F0(D,W);return}b0(D,W),ni.customEvent(ii[`FUND_FLOW_DOWNLOAD_${E.toUpperCase()}`])}},g=(_=o==null?void 0:o.fundFlow)==null?void 0:_.filter(E=>!E.isReverted),v=g==null?void 0:g.length,p=(g==null?void 0:g.length)===0;return f.jsxs("div",{className:Ve(rn.fundFlow,{[rn.fundFlowFocus]:e!==Wa.NO}),children:[p?f.jsx(oa,{image:oa.PRESENTED_IMAGE_SIMPLE}):f.jsxs(f.Fragment,{children:[f.jsx("div",{className:rn.actionWrap,children:v&&!c&&f.jsxs(f.Fragment,{children:[f.jsx(ni,{mode:["hit"],data:{customEvent:ii.FUND_FLOW_EXPAND},children:f.jsx("div",{className:Ve(rn.expendIcon),onClick:()=>a(!0),children:f.jsx(lt,{type:"icon-arrows-pointing",size:24})})}),f.jsx(lr,{overlayClassName:rn.downloadTooltips,title:f.jsxs("div",{className:rn.content,children:[f.jsx("div",{className:rn.png,onClick:()=>d("png"),children:"PNG"}),f.jsx("div",{className:rn.svg,onClick:()=>d("svg"),children:"SVG"})]}),placement:"bottomRight",children:f.jsx("div",{className:Ve(rn.downloadIcon,rn.download),children:f.jsx(lt,{type:"icon-download",size:24})})})]})}),f.jsx(XT,{setLoading:l,isLoading:c,store:n,position:e})]}),!p&&c&&f.jsx("div",{className:rn.loadingContainer,children:f.jsx(Oi,{})})]})},lS=dr(oS),cS=()=>{const[e,t]=de.useState(!1),[r]=Kr(),{network:n="",txnHash:i=""}=Nr(),{event:a}=Gn(r),s=yr(),{txProfileData:o,refreshFundFlow:c}=s;de.useEffect(()=>{var d;t(((d=o==null?void 0:o.fundFlow)==null?void 0:d.length)!==0)},[c]);const l=mt.getChainIdBySimpleName(n),u=k1.findIndex(d=>d.id===l)>-1,m=a!==xn.SIMULATE&&a!==xn.FORK;return f.jsx("div",{id:"fund-flow-graph",children:f.jsx(fa,{open:e,paddingSize:"sm",className:"font-code",header:f.jsx("div",{children:f.jsxs("div",{className:Ve("flex items-center gap-1.5 text-base font-semibold leading-none text-default"),children:[f.jsx(lt,{type:"icon-fund-flow",size:20}),"Fund Flow"]})}),expandIcon:({isActive:d})=>f.jsxs("div",{className:"space-x-3",children:[f.jsx(Di,{theme:{components:{Button:{colorPrimary:"#BD7C40",colorPrimaryActive:"#825831",colorPrimaryHover:"#B78C5D"}}},children:f.jsxs(Er,{type:"primary",className:"hidden items-center gap-x-1 sm:flex",disabled:!u||!m,onClick:g=>{g.stopPropagation(),window.open(`${zd}/result/${n.toLowerCase()}/${i}`)},children:[f.jsx(lt,{type:"icon-metasleuth",size:16}),"Deep Dive with MetaSleuth"]})}),f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",style:{transform:d?"rotate(180deg)":"rotate(0deg)"},children:f.jsx("path",{d:"M6 8L10 12L14 8",stroke:"#9CA3AF",strokeWidth:"1.575",strokeLinecap:"round",strokeLinejoin:"round"})})]}),onChange:()=>t(!e),children:f.jsx(lS,{})})})},n3=dr(cS),uS="_container_4627x_1",fS="_fundFlow_4627x_19",hS="_cardContainer_4627x_28",dS="_header_4627x_34",pS="_graphContainer_4627x_40",mS="_opacity_4627x_47",gS="_closeIcon_4627x_50",xS="_action_4627x_53",vS="_icon_4627x_58",_S="_contentWrap_4627x_66",ES="_hide_4627x_70",wS="_downloadTooltips_4627x_73",yS="_content_4627x_66",DS="_png_4627x_73",AS="_svg_4627x_74",Yt={container:uS,fundFlow:fS,cardContainer:hS,header:dS,graphContainer:pS,opacity:mS,closeIcon:gS,action:xS,icon:vS,contentWrap:_S,hide:ES,downloadTooltips:wS,content:yS,png:DS,svg:AS},CS={dark:"https://assets.blocksec.com/image/1671093957494-2.png",light:"https://assets.blocksec.com/image/1671093957494-3.png"},TS=({visible:e,position:t=Wa.NO})=>{const r=Nr(),[n]=Kr(),i=Gn(n),{txProfileData:a,setExpandFundFlow:s,addressLabels:o,solanaProfileData:c}=yr(),l=mt.isSolana((r==null?void 0:r.network)??"")?c:a,{mode:u}=de.useContext($n),m=de.useRef(null),d=`graphExpand-${t}`;de.useEffect(()=>{var A;if(!e||!u||!(l!=null&&l.fundFlow)||!((A=l==null?void 0:l.fundFlow)!=null&&A.length))return;_c("https://assets.blocksec.com/@hpcc-js/wasm@1.16.1/dist");const{node:v,edge:p}=P0(l,o,u,{...i,...r}),_=v==null?void 0:v.reduce((S,I)=>`${S}  ${I} `,""),E=p==null?void 0:p.reduce((S,I)=>`${S}  ${I} `,""),D=`digraph { 
        rankdir="LR"
        fontname="PingFangSC-Regular, PingFang SC"
        bgcolor="${hl[u]}"
        ${_}     
        ${E}
    }`;ze(`#${d}`).graphviz().width("100%").height("100%").options({zoom:!0,fit:!0,useWorker:!0}).renderDot(D).on("end",()=>{Rr(".edge").on("mouseover",function(){const S=ze(this).attr("id");Rr(".edge").each(function(){ze(this).attr("id")!==S&&(ze(this).select("polygon").attr("class",Yt.opacity),ze(this).select("path").attr("class",Yt.opacity),ze(this).selectAll("g > a > text").each(function(){ze(this).attr("class",Yt.opacity)}))})}),Rr(".edge").on("mouseout",function(){Rr(".edge").each(function(){ze(this).select("polygon").attr("class",""),ze(this).select("path").attr("class",""),ze(this).selectAll("g > a > text").each(function(){ze(this).attr("class","")})})})})},[l,u,e,t]);const g=v=>{var _,E,D;if(!u)return;const p=(_=document.querySelector(`#${d} > svg`))==null?void 0:_.cloneNode(!0);if(p){const I=p.getElementsByTagName("polygon")[0];if(I&&v==="svg"){const R=((D=(E=p.getAttribute("viewBox"))==null?void 0:E.split(" "))==null?void 0:D[2])??600;let Y=R;try{Y=new sn(R).sub(262).toFixed()}catch(W){console.log(W)}I.insertAdjacentHTML("afterend",`<a id="watermark" xlink:href="https://phalcon.blocksec.com" target="_blank">
            <image x="${Y}" y="-60" style="opacity: 0.2" xlink:href=${CS[u]} width="262" height="57"/>
        </a>`)}const U=`${r.txnHash}`;if(v==="png"){F0(p,U);return}b0(p,U)}};return u?A0.createPortal(f.jsx("div",{className:Ve(Yt.container,{[Yt.hide]:!e}),children:f.jsx("div",{className:Yt.fundFlow,children:f.jsxs(Vd,{title:f.jsxs("div",{className:Yt.header,children:[f.jsx("div",{className:Yt.title,children:"Fund Flow"}),f.jsx(lt,{onClick:()=>s(!1),type:"icon-close",className:Yt.closeIcon,size:20})]}),contentClass:Yt.contentWrap,className:Yt.cardContainer,children:[f.jsx("div",{className:Ve(Yt.graphContainer),id:d,ref:m}),f.jsx("div",{className:Yt.action,children:f.jsx(lr,{overlayClassName:Yt.downloadTooltips,title:f.jsxs("div",{className:Yt.content,children:[f.jsx("div",{className:Yt.png,onClick:()=>g("png"),children:"PNG"}),f.jsx("div",{className:Yt.svg,onClick:()=>g("svg"),children:"SVG"})]}),placement:"bottomRight",children:f.jsx("div",{className:Ve(Yt.icon,Yt.download),children:f.jsx(lt,{type:"icon-download",size:24})})})})]})})}),document.body,Wl()):f.jsx("div",{})},i3=dr(TS);let SS=class{constructor(){this.loading=!1,this.setLoading=t=>{this.loading=t},Ul(this)}};const FS="_container_1l4q6_1",bS="_hash_1l4q6_9",kS="_example_1l4q6_13",NS="_form_1l4q6_18",IS="_btnContainer_1l4q6_27",OS="_cancelBtn_1l4q6_31",BS="_decodeWrap_1l4q6_34",PS="_decodeBtn_1l4q6_37",jS="_undoDecode_1l4q6_38",Bn={container:FS,hash:bS,example:kS,form:NS,btnContainer:IS,cancelBtn:OS,decodeWrap:BS,decodeBtn:PS,undoDecode:jS},RS=({visible:e,data:t,onClose:r,onSuccess:n,isDecoded:i})=>{const a=k0(()=>new SS),{loading:s,setLoading:o}=a,[c]=Et.useForm(),l=()=>{c.validateFields().then(d=>{var g;if(o(!0),t.action===ka.RAW){try{const v=(t==null?void 0:t.operation)==="EVENT"?`event ${d.label}`:`function ${d.label}`,p=new N0([v]),_=(g=d==null?void 0:d.label)==null?void 0:g.replace(")",""),[E]=(_==null?void 0:_.split("("))||[];let D=[];(t==null?void 0:t.operation)==="EVENT"?D=p.decodeEventLog(E,t==null?void 0:t.value,t==null?void 0:t.topics):D=p.decodeFunctionData(E,t==null?void 0:t.value);const A=[];for(const S in D)if(isNaN(Number(S))){let I=D[S];I!=null&&I._isBigNumber&&(I=Xr(I.toString())),A.push({name:S,value:I})}n==null||n({...t,label:E,decode:A}),m()}catch{o(!1),c.setFields([{name:"label",errors:["Decode error! Please check the input."]}])}return}n==null||n({...t,...d,label:(d==null?void 0:d.label)||(t==null?void 0:t.originLabel)}),m()})},u=()=>{n==null||n({...t,isUndoDecoded:!0}),m()},m=()=>{r==null||r(),o(!1)};return f.jsx(Hd,{width:530,title:t.title,footer:null,maskClosable:!1,onCancel:m,open:e,destroyOnClose:!0,zIndex:1e4,children:f.jsxs("div",{className:Bn.container,children:[f.jsxs(Et,{className:Bn.form,form:c,layout:"vertical",labelAlign:"left",disabled:s,preserve:!1,children:[f.jsx("div",{className:Bn.hash,children:t.value}),t.action===ka.RAW?f.jsxs(f.Fragment,{children:[" ",f.jsx(Et.Item,{name:"label",rules:[{required:!0,message:"Signature is required"}],children:f.jsx(nn.TextArea,{rows:5})}),f.jsx("div",{className:Bn.example,children:"e.g., transfer(address to, uint value)"})]}):f.jsx(Et.Item,{name:"label",initialValue:t.label,children:f.jsx(nn,{})})]}),t.action===ka.RAW?f.jsxs("div",{className:Ve({[Bn.decodeWrap]:i}),children:[i&&f.jsx(Er,{ghost:!0,className:Bn.undoDecode,onClick:u,children:"Undo Decode"}),f.jsx(Er,{type:"primary",className:Bn.decodeBtn,onClick:l,loading:s,children:"Decode"})]}):f.jsxs("div",{className:Bn.btnContainer,children:[f.jsx(Er,{className:Bn.cancelBtn,onClick:m,children:"Cancel"}),f.jsx(Er,{type:"primary",loading:s,onClick:l,children:"Confirm"})]})]})})},s3=dr(RS),jn="__blocksec__";class LS{constructor(){this.loading=!1,this.ABILoading=!0,this.balance="",this.currentBlockNum=null,this.initialValues={chainID:ol.ETHEREUM.chainId},this.cacheSimulateQueue=[],this.unit=ol.ETHEREUM.unit,this.contractData={methodsOptions:[],methods:[],abi:{proxyABI:"",implementationABI:""}},this.setLoading=t=>{this.loading=t},this.onNetworkChange=t=>{this.unit=mt.getUnitByChainId(t)},this.setInitialValues=t=>{this.initialValues={...this.initialValues,...t}},this.onSimulate=async(t=!1,r,n)=>{this.setLoading(!0);const i=await an.handleSimulate(t,r);this.cacheSimulateQueue.push(i),this.cacheSimulateQueue.forEach((a,s)=>{s!==this.cacheSimulateQueue.length-1?a.cancel():a.promise.then(({data:o,success:c,msg:l})=>{ni.customEvent(ii.SIMULATE_SUCCESS),c?n(o):Ma.error(l)}).finally(()=>{this.setLoading(!1)})})},this.contractDataFormat=t=>{var s,o,c,l;const r=[{label:"WRITE",options:[]},{label:"READ",options:[]}];let n={proxyABI:"",implementationABI:((s=t==null?void 0:t.implementation)==null?void 0:s.abi)??""},i=(o=t==null?void 0:t.implementation)==null?void 0:o.methods;const a=[];return t.isProxy&&(i=i.concat((((c=t==null?void 0:t.proxy)==null?void 0:c.methods)??[]).map(u=>({...u,isProxy:!0}))),n={...n,proxyABI:((l=t==null?void 0:t.proxy)==null?void 0:l.abi)??""}),i!=null&&i.length?(i==null||i.forEach(u=>{const{constant:m,signature:d,name:g,argumentsIn:v,argumentsOut:p,isProxy:_}=u,E=m?1:0;a.push({argumentsIn:v,argumentsOut:p,name:g,signature:d,label:d,value:_?`proxy${jn}${d}`:`implementation${jn}${d}`}),r[E].options.push({argumentsIn:v,argumentsOut:p,name:g,signature:d,label:d,value:_?`proxy${jn}${d}`:`implementation${jn}${d}`})}),{methods:a,methodsOptions:r,abi:n}):{methods:a,methodsOptions:[],abi:n}},this.setFileForABI=(t,r,n)=>{var l,u;const{methods:i,methodsOptions:a,abi:s}=this.contractDataFormat(t);if(this.contractData={methods:i,methodsOptions:a,abi:s},n&&this.setABILoading(!1),!t.unpacked)return;n&&r.setFieldValue("abi",!0);const o=i.find(m=>{var d,g;return m.value===`${t!=null&&t.proxyMatch?`proxy${jn}${(d=t==null?void 0:t.unpackedCallData)==null?void 0:d.signature}`:`implementation${jn}${(g=t==null?void 0:t.unpackedCallData)==null?void 0:g.signature}`}`}),c={};o==null||o.argumentsIn.forEach((m,d)=>{var v,p;const g=E1((p=(v=t==null?void 0:t.unpackedCallData)==null?void 0:v.params)==null?void 0:p[d]);c[`${o.value}_${m.name}`]=fl(g)?I0({storeAsString:!0}).stringify(g):g}),r==null||r.setFieldValue("function",`${t!=null&&t.proxyMatch?`proxy${jn}${(l=t==null?void 0:t.unpackedCallData)==null?void 0:l.signature}`:`implementation${jn}${(u=t==null?void 0:t.unpackedCallData)==null?void 0:u.signature}`}`),r==null||r.setFieldValue("parameters",c)},this.verifyContract=async(t,r,n,i,a)=>{if(r&&t){const{data:s,success:o,msg:c}=await an.getSimulationContractData(t,r,n);a&&(i==null||i.setFieldValue("abi",!1)),o?this.setFileForABI(s,i,a):Ma.error(c)}},this.onContractVerify=Ua((t,r)=>{const n=t.getFieldValue("chainID"),i=t.getFieldValue("receiver"),a=t.getFieldValue("inputData"),s=t.getFieldError("receiver");s!=null&&s.length||this.verifyContract(Number(n),i,a,t,r)},500),this.getContractByABI=Ua(async t=>{const r=t.getFieldValue("localABI"),n=t.getFieldValue("inputData");if(!r)return;const{data:i,success:a}=await an.getSimulationContractByABI(r,n);a&&this.setFileForABI(i,t)},500),this.resetContract=()=>{this.contractData={methodsOptions:[],methods:[],abi:{proxyABI:"",implementationABI:""}}},this.calcBalance=async t=>{const{account:r,blockNumber:n,useLatestBlock:i}=t;if(!r)return;const a=n||this.currentBlockNum,s=i?"prerun":"simulation",{data:o}=await an.getBalance(s,{...t,blockNumber:a});console.log(o.balance,"===balance===",a);try{this.balance=Ml(o.balance)}catch(c){this.balance=null,console.log(c)}},this.setABILoading=t=>{this.ABILoading=t},this.getCurrentBlockNum=async t=>{const{data:r}=await an.getLatestBlock(t);return this.currentBlockNum=r.latestBlockNumber,r==null?void 0:r.latestBlockNumber},Ul(this)}}const MS="_drawerContainer_17djw_1",US="_mask_17djw_4",WS="_hidden_17djw_11",zS="_hide_17djw_14",VS="_formWrap_17djw_18",HS="_form_17djw_18",$S="_helpDesc_17djw_23",GS="_copyCalldata_17djw_27",XS="_parameterWrap_17djw_31",KS="_labelIcon_17djw_37",YS="_notFoundContent_17djw_46",qS="_abiWrap_17djw_49",JS="_simulateBtn_17djw_54",ZS="_useLatestBlock_17djw_60",QS="_currentBlock_17djw_64",eF="_fundsAlert_17djw_68",er={drawerContainer:MS,mask:US,hidden:WS,hide:zS,formWrap:VS,form:HS,helpDesc:$S,copyCalldata:GS,parameterWrap:XS,labelIcon:KS,notFoundContent:YS,abiWrap:qS,simulateBtn:JS,useLatestBlock:ZS,currentBlock:QS,fundsAlert:eF},{TextArea:sl}=nn,tF=({visible:e,type:t,extraData:r,onClose:n})=>{const i=C0(),a=k0(()=>new LS),{unit:s,loading:o,initialValues:c,setLoading:l,onSimulate:u,onNetworkChange:m,onContractVerify:d,contractData:g,getContractByABI:v,resetContract:p,calcBalance:_,balance:E,ABILoading:D,setABILoading:A,getCurrentBlockNum:S,currentBlockNum:I}=a,[U]=Et.useForm(),R=()=>{U.validateFields().then(M=>{let G=cl(M);if(G.abi){const V=Y(G.function,G.parameters);if(!V)return;G={...G,inputData:V}}let b={chainID:G.chainID,simulationType:"custom",blockNumber:G.block?Number(G.block):I??0,position:G.position?Number(G.position):0,txnCustom:{value:G.value??"0",sender:G.sender,receiver:G.receiver??"",inputData:G.inputData??"0x",gasPrice:G.gasPrice??"100",gasLimit:G.gasLimit?Number(G.gasLimit):1e6},sourceTxnHash:r==null?void 0:r.sourceTxnHash};G.useLatestBlock&&(b=Ns({...b,prerunType:"custom"},["simulationType","blockNumber","position"])),u(G.useLatestBlock,b,V=>{i(`/explorer/tx/${mt.getSimpleNameByChainId(b.chainID,!0)}/${V==null?void 0:V.hash}?event=${G.useLatestBlock?"prerun":"simulation"}&type=${t}&timestamp=${Date.now()}`),n()})})},Y=(M,G)=>{const b=M??U.getFieldValue("function"),[V,q]=b.split(jn),re=G??U.getFieldValue("parameters"),le={};Object.keys(re??{}).forEach(pe=>{try{const Ce=I0({storeAsString:!0}).parse(re[pe]);le[pe]=Ce}catch{le[pe]=re[pe]}});try{let pe=g.abi.implementationABI;V==="proxy"&&(pe=g.abi.proxyABI);const Ce=new N0(pe),Te=g.methods.find(z=>z.value===b),O=Te==null?void 0:Te.argumentsIn.map(z=>le[`${b}_${z.name}`]);return console.log(O,"===encodeParameters==="),Ce.encodeFunctionData(q,O)}catch(pe){return console.log(pe),Ma.error("encode function data error"),""}},W=()=>{n(),l(!1)},Z=Ua(async(M,G)=>{if(Object.keys(M).includes("receiver")&&!G.useLocalABI&&d(U),Object.keys(M).includes("localABI")){const{receiver:b,localABI:V=""}=G;if(b){const q=await Sr.getItem(jo)??new Map;Sr.setItem(jo,q.set(b.toLocaleLowerCase(),V))}v(U)}if(Object.keys(M).includes("useLocalABI"))if(M.useLocalABI){p();const{receiver:b}=G,V=await Sr.getItem(jo)??new Map;if(U.setFieldValue("function",""),b){const q=V.get(b.toLocaleLowerCase());U.setFieldValue("localABI",q),v(U)}}else d(U)},300),N=()=>f.jsxs(f.Fragment,{children:[f.jsx(Et.Item,{name:"value",label:"Value",getValueFromEvent:M=>{const{value:G}=M.target;return G.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,"")},children:f.jsx(nn,{suffix:s,placeholder:"Default is 0"})}),f.jsx(Et.Item,{name:"gasLimit",label:"Gas Limit",getValueFromEvent:M=>{const{value:G}=M.target;return G.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,"")},children:f.jsx(nn,{placeholder:"Default is 1,000,000"})}),f.jsx(Et.Item,{name:"gasPrice",label:"Gas Price",getValueFromEvent:M=>{const{value:G}=M.target;return G.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,"")},children:f.jsx(nn,{suffix:"Gwei",placeholder:"Default is 100"})}),f.jsx(Et.Item,{children:f.jsxs("div",{className:er.useLatestBlock,children:[f.jsx(Et.Item,{name:"useLatestBlock",valuePropName:"checked",noStyle:!0,children:f.jsx(xi,{size:"small",onChange:M=>{const G=U.getFieldValue("chainID"),b=U.getFieldValue("sender"),V=U.getFieldValue("block"),q=U.getFieldValue("position")??0;_({useLatestBlock:M,chainID:G,account:b,blockNumber:V,position:q})}})}),f.jsx("span",{style:{paddingLeft:10},className:er.helpDesc,children:"Use Pending Block"})]})}),f.jsx(Et.Item,{noStyle:!0,dependencies:["useLatestBlock"],children:({getFieldValue:M})=>M("useLatestBlock")?null:f.jsxs(f.Fragment,{children:[f.jsx(Et.Item,{label:"Block Number",children:f.jsx(Et.Item,{name:"block",noStyle:!0,getValueFromEvent:b=>{const{value:V}=b.target;return V.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,"")},rules:[{validator:async(b,V)=>{if(V&&Number(V)===0)throw new Error("Invalid Block Number")}}],children:f.jsx(nn,{placeholder:I?`Default on current block ${I}`:"Please input block number",onChange:b=>{const V=U.getFieldValue("useLatestBlock"),q=U.getFieldValue("chainID"),re=U.getFieldValue("sender"),le=U.getFieldValue("position")??0;_({useLatestBlock:V,chainID:q,account:re,blockNumber:Number(b.target.value??"0"),position:le})}})})}),f.jsx(Et.Item,{name:"position",label:"Position in Block",getValueFromEvent:b=>{const{value:V}=b.target;return V.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,"")},children:f.jsx(nn,{placeholder:"Default on position 0",onBlur:b=>{const V=U.getFieldValue("chainID"),q=U.getFieldValue("block"),re=U.getFieldValue("sender");_({useLatestBlock:!1,chainID:V,blockNumber:q,account:re,position:Number(b.target.value??"0")})}})})]})})]});return de.useEffect(()=>{r&&(U.resetFields(),m(r.chainID),_({useLatestBlock:!1,chainID:r.chainID,blockNumber:r.block,position:r.position,account:r.sender}),U.setFieldsValue({...r}))},[r]),de.useEffect(()=>{if(!e)setTimeout(()=>A(!0),500),U.setFieldValue("abi",!1);else{if(r){if(!r.receiver){U.setFieldValue("abi",!1),A(!1);return}d(U,!0)}else A(!1);S(r==null?void 0:r.chainID)}},[e]),f.jsxs($d,{open:e,onClose:W,destroyOnClose:!0,title:"Simulator",closable:!1,height:window.innerHeight,extra:f.jsx("div",{style:{cursor:"pointer"},onClick:W,children:f.jsx(lt,{type:"icon-close",className:"font-bold"})}),rootClassName:er.drawerContainer,children:[f.jsx("div",{className:er.formWrap,children:f.jsxs(Et,{className:er.form,form:U,layout:"vertical",labelAlign:"left",disabled:o,initialValues:c,onValuesChange:Z,children:[f.jsx(Et.Item,{name:"chainID",label:"Network",rules:[{required:!0}],children:f.jsx(Qi,{onChange:async M=>{const G=U.getFieldValue("sender"),b=U.getFieldValue("useLatestBlock"),V=U.getFieldValue("useLocalABI"),q=U.getFieldValue("position")??0,re=await S(M);U.setFieldValue("block",re),_({useLatestBlock:b,chainID:M,account:G,position:q,blockNumber:re}),m(M),V||d(U)},children:j0.map(M=>f.jsx(Qi.Option,{value:M.value,children:f.jsxs("div",{className:"flex items-center",children:[f.jsx(Gd,{network:mt.getSimpleNameByChainId(M.value),mr:4,size:16}),mt.getFullNameByChainId(M.value)]})},M.value))})}),f.jsx(Et.Item,{name:"sender",label:"Sender",rules:[{required:!0,message:"Please enter Sender"},{pattern:Rc,message:"Please enter a valid Sender"}],children:f.jsx(nn,{onBlur:M=>{const G=U.getFieldValue("chainID"),b=U.getFieldValue("block"),V=U.getFieldValue("position"),q=U.getFieldValue("useLatestBlock");_({useLatestBlock:q,chainID:G,blockNumber:b,position:V,account:M.target.value})}})}),f.jsx(Et.Item,{name:"receiver",label:"Receiver",rules:[{pattern:Rc,message:"Please enter a valid Receiver"}],children:f.jsx(nn,{})}),f.jsx(Et.Item,{noStyle:!0,shouldUpdate:!0,children:({getFieldValue:M,getFieldError:G})=>{var re;const b=G("receiver"),V=M("receiver");return M("abi")??!1?f.jsxs(f.Fragment,{children:[f.jsxs(Et.Item,{label:f.jsx("span",{className:er.labelIcon,children:"Function"}),children:[f.jsxs("div",{className:er.abiWrap,children:[f.jsx(Et.Item,{name:"abi",noStyle:!0,children:f.jsx(Lc.Group,{options:[{label:"rawdata",value:!1},{label:"ABI",value:!0,disabled:!V||!!b.length}]})}),f.jsxs("div",{children:[f.jsx(Et.Item,{name:"useLocalABI",noStyle:!0,valuePropName:"checked",preserve:!1,children:f.jsx(xi,{size:"small"})}),f.jsx("span",{style:{paddingLeft:5},children:"Use Local ABI"})]})]}),f.jsx(Et.Item,{noStyle:!0,dependencies:["useLocalABI"],children:({getFieldValue:le})=>le("useLocalABI")?f.jsx(Et.Item,{name:"localABI",preserve:!1,rules:[{validator:async(Ce,Te)=>{try{const O=Te.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2":');JSON.parse(O)}catch{throw new Error("Parse error: invalid json")}}}],children:f.jsx(sl,{})}):null}),f.jsx(Et.Item,{preserve:!1,name:"function",noStyle:!0,rules:[{required:!0,message:"Please select a function"}],children:f.jsx(Qi,{getPopupContainer:le=>le,notFoundContent:f.jsx(f.Fragment,{children:'Contract unverified. Open "Use Local ABI" option if you have the ABI'}),placeholder:(re=g==null?void 0:g.methodsOptions)!=null&&re.length?"Please select a function":'Contract unverified. Open "Use Local ABI" option if you have the ABI',optionLabelProp:"name",options:g.methodsOptions,defaultActiveFirstOption:!0})})]}),f.jsx(Et.Item,{dependencies:["function"],noStyle:!0,children:({getFieldValue:le})=>{const pe=le("function"),Ce=g.methods.find(Te=>Te.value===pe);return Ce?f.jsxs("div",{children:[Ce==null?void 0:Ce.argumentsIn.map((Te,O)=>f.jsxs("div",{className:er.parameterWrap,children:[f.jsxs("span",{className:er.helpDesc,style:{paddingBottom:10,paddingLeft:0,width:140,whiteSpace:"pre-wrap",display:"inline-flex",alignItems:"center"},children:[Te.name," ",f.jsx(lr,{title:Te.type,children:f.jsx(lt,{type:"icon-question-circle",style:{cursor:"pointer"}})})]}),f.jsx(Et.Item,{tooltip:Te.type,style:{flex:1},preserve:!1,name:["parameters",`${pe}_${Te.name}`],children:f.jsx(sl,{placeholder:Te.type,autoSize:{minRows:1,maxRows:4}})}),f.jsx("div",{style:{display:"inline-flex",alignItems:"center",paddingLeft:2,paddingBottom:8},children:f.jsx(Jt,{text:()=>U.getFieldValue(["parameters",`${pe}_${Te.name}`])})})]},O)),f.jsx("div",{className:Ve(er.helpDesc,er.copyCalldata),children:f.jsx(Jt,{text:()=>Y(),children:"Copy Calldata"})})]}):null}})]}):f.jsxs(Et.Item,{label:"Calldata",children:[f.jsx("div",{className:Ve(er.mask,{[er.hidden]:!D}),children:f.jsx(Oi,{})}),f.jsx("div",{className:Ve(er.abiWrap,{[er.hide]:D}),children:f.jsx(Et.Item,{name:"abi",noStyle:!0,children:f.jsx(Lc.Group,{onChange:le=>{le.target.checked&&d(U)},options:[{label:"rawdata",value:!1},{label:"ABI",value:!0,disabled:!V||!!b.length}]})})}),f.jsx(Et.Item,{noStyle:!0,name:"inputData",rules:[{pattern:Xd,message:"Please enter a valid Input Data"}],children:f.jsx(sl,{placeholder:"Default is 0x",style:{height:120},className:Ve({[er.hide]:D})})})]})}}),N(),f.jsx(Et.Item,{noStyle:!0,dependencies:["sender","gasLimit","gasPrice","value"],children:({getFieldValue:M})=>{let G=null;const b=M("gasLimit")||1e6,V=M("gasPrice")||"100",q=M("value")||0;try{G=sn(Ml(sn(Kd(V.valueOf(),9).toString()).times(b).valueOf())).add(q)}catch(re){console.log(re,"====format ether error===="),G=null}return!G||!E?null:sn(E).lt(G)?f.jsxs("div",{children:[f.jsxs("div",{className:"text-ellipsis",children:["value + Tx Fee(Max Amount): ",G.valueOf()," ",s]}),f.jsxs("div",{className:er.fundsAlert,children:[f.jsx(lt,{type:"icon-warning",mr:5})," Insufficient funds"]})]}):f.jsxs("div",{className:"text-ellipsis",children:["value + Tx Fee(Max Amount): ",G.valueOf()," ",s]})}})]})}),f.jsx(Er,{type:"primary",className:er.simulateBtn,loading:o,onClick:R,children:"Simulate"})]})},o3=dr(tF),rF="_balanceChanges_lhhje_1",nF="_table_lhhje_5",iF="_addressWrap_lhhje_14",aF="_receiver_lhhje_14",sF="_sender_lhhje_15",oF="_tokenItemWrap_lhhje_21",lF="_logo_lhhje_25",cF="_tokenName_lhhje_30",uF="_balance_lhhje_1",fF="_sign_lhhje_36",Tr={balanceChanges:rF,table:nF,addressWrap:iF,receiver:aF,sender:sF,tokenItemWrap:oF,logo:lF,tokenName:cF,balance:uF,sign:fF},hF=({height:e="auto"})=>{const t=yr(),r=Nr(),[n]=Kr(),i=n.get("forkId")??"",{txBalanceChanges:a,globalMapList:s,txProfileData:o,solanaProfileData:c,onHighLightAddress:l,removeAddressHighLight:u}=t,m=mt.isSolana(r.network??"");return f.jsx("div",{className:Tr.balanceChanges,children:f.jsx("div",{className:Tr.listContainer,style:{height:typeof e=="string"?e:`${e}px`},children:a!=null&&a.length?f.jsx(Di,{theme:{components:{Table:{cellPaddingBlock:8,cellPaddingInline:8,fontFamily:"RegioMono-Light",fontSize:12}}},children:f.jsx(Yd,{rootClassName:Tr.table,dataSource:a,rowKey:(d,g)=>g??0,columns:[{title:m?"Accounts":"Addresses",render:(d,g)=>{var v;return f.jsxs("div",{className:Tr.addressWrap,children:[ht({type:"account",value:g.account,mapList:s,network:r.network,forkId:i,onHighLightAddress:l,removeAddressHighLight:u}),((v=c==null?void 0:c.basicInfo)==null?void 0:v.signer.includes(g.account))&&f.jsx("span",{className:Tr.sender,children:"[ Signer ]"}),g.account===(o==null?void 0:o.basicInfo.sender)&&f.jsx("span",{className:Tr.sender,children:"[ Sender ]"}),g.account===(o==null?void 0:o.basicInfo.receiver)&&f.jsx("span",{className:Tr.receiver,children:"[ Receiver ]"})]})}},{title:"Token",render:(d,g)=>g.assets.map((v,p)=>f.jsxs("div",{className:Ve(Tr.tokenItemWrap,"py-0.5"),children:[f.jsx("img",{className:Tr.logo,src:v.iconUrl||H1(v.address),alt:""}),f.jsx("div",{className:Ve(Tr.tokenName),children:ht({type:"account",value:v.address,mapList:s,network:r.network,forkId:i,onHighLightAddress:l,removeAddressHighLight:u})})]},p))},{title:"TokenID",render:(d,g)=>g.assets.map((v,p)=>f.jsx("div",{className:Ve(Tr.tokenItemWrap,"h-6"),children:v.tokenID||"-"},p))},{title:"Balance",render:(d,g)=>g.assets.map((v,p)=>f.jsx("div",{className:Ve(Tr.balance,"flex h-6 items-center",{[Tr.sign]:v.sign}),children:`${v.sign?"+":"-"}${v.amount}`},p))},{title:"Value in USD",align:"end",render:(d,g)=>g.assets.map((v,p)=>f.jsx("div",{className:Ve(Tr.value,"flex h-6 items-center justify-end"),children:v.value?`$${Xr(Number(v.value).toFixed(2))}`:"-"},p))}],scroll:{x:1024},pagination:!1})}):f.jsx(oa,{image:oa.PRESENTED_IMAGE_SIMPLE})})})},dF=dr(hF),pF="_download_1dbm1_1",mF="_downloadDisable_1dbm1_9",gF="_balanceChangesDownload_1dbm1_14",xF="_downloadItem_1dbm1_14",vF="_listContainer_1dbm1_20",_F="_head_1dbm1_34",EF="_row_1dbm1_34",wF="_column_1dbm1_34",yF="_body_1dbm1_38",DF="_sign_1dbm1_44",AF="_address_1dbm1_64",CF="_addressWrap_1dbm1_64",TF="_receiver_1dbm1_67",SF="_sender_1dbm1_68",FF="_token_1dbm1_73",bF="_tokenItemWrap_1dbm1_73",kF="_logo_1dbm1_76",NF="_balanceContainer_1dbm1_101",IF="_header_1dbm1_101",OF="_right_1dbm1_101",BF="_huishou_1dbm1_102",ks={download:pF,downloadDisable:mF,balanceChangesDownload:gF,downloadItem:xF,listContainer:vF,head:_F,row:EF,column:wF,body:yF,sign:DF,address:AF,addressWrap:CF,receiver:TF,sender:SF,token:FF,tokenItemWrap:bF,logo:kF,balanceContainer:NF,header:IF,right:OF,huishou:BF},PF=()=>{const e=Nr(),t=yr(),[r,n]=de.useState(!1),{txBalanceChanges:i,globalMapList:a}=t,s=mt.isSolana(e.network??""),o=!i||!(i!=null&&i.length),c=l=>{if(o)return;const u=i==null?void 0:i.map(d=>d.assets.map(g=>{var v;return{...g,balance:`${g.sign?"+":"-"}${g.amount}`,account:d.account,token:(v=a.filter(p=>p.type==="account").find(p=>p.value.toUpperCase()===g.address.toUpperCase()))==null?void 0:v.label,tokenID:g.tokenID?g.tokenID:"-",value:g.value?g.value:"-"}})),m=qd(u).map(d=>s?{accounts:d.account,balance:d.balance,token:d.token,tokenID:d.tokenID,value:d.value}:{addresses:d.account,balance:d.balance,token:d.token,tokenID:d.tokenID,value:d.value});BE(m,{name:`${e.txnHash}.${l.toLocaleLowerCase()}`,header:[[s?"Accounts":"Addresses","Balance","Token","TokenID","Value"]]})};return de.useEffect(()=>{n((i==null?void 0:i.length)!==0)},[i]),f.jsx("div",{id:"balanceChanges",children:f.jsx(fa,{open:r,paddingSize:"sm",expandIcon:({isActive:l})=>f.jsxs("div",{className:"space-x-3",children:[f.jsx(lr,{overlayClassName:ks.balanceChangesDownload,title:["CSV","XLSX"].map(u=>f.jsx("div",{onClick:m=>{m.stopPropagation(),c(u)},className:ks.downloadItem,children:u},u)),children:f.jsx("div",{className:Ve(ks.download,{[ks.downloadDisable]:o}),onClick:u=>u.stopPropagation(),children:f.jsx(lt,{type:"icon-download",size:24})})}),f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",style:{transform:l?"rotate(180deg)":"rotate(0deg)"},children:f.jsx("path",{d:"M6 8L10 12L14 8",stroke:"#9CA3AF",strokeWidth:"1.575",strokeLinecap:"round",strokeLinejoin:"round"})})]}),className:"font-code",onChange:()=>n(!r),header:f.jsx("div",{children:f.jsxs("div",{className:Ve("flex items-center gap-1.5 text-base font-semibold leading-none text-default"),children:[f.jsx(lt,{type:"icon-balance-change",size:20})," Balance Changes"]})}),children:i?f.jsx(dF,{}):f.jsx("div",{className:"flex items-center justify-center p-10",children:f.jsx(Oi,{})})})})},l3=dr(PF),jF=()=>{var n,i,a,s,o,c,l,u,m,d;const{network:e=""}=Nr(),{solanaProfileData:t,globalMapList:r}=yr();return f.jsx("div",{id:"basicInfo",children:f.jsx(fa,{paddingSize:"sm",open:!0,expandIcon:()=>f.jsx("div",{}),header:f.jsx("div",{children:f.jsxs("div",{className:Ve("flex items-center gap-1.5 text-base font-semibold leading-none text-default"),children:[f.jsx(lt,{type:"icon-basic-info",size:20})," Basic Info"]})}),className:"font-code",children:t?f.jsxs("div",{className:"space-y-2 text-xs",children:[f.jsxs("div",{className:"flex flex-wrap gap-x-8 gap-y-2",children:[f.jsxs("div",{className:"flex items-center space-x-1",children:[f.jsx("span",{children:"Status:"}),f.jsx(R0,{success:(n=t==null?void 0:t.basicInfo)==null?void 0:n.status,okText:"Success",failText:"Fail",showIcon:!0})]}),f.jsxs("div",{className:"flex items-center space-x-1 whitespace-nowrap",children:[f.jsx("span",{children:"Block:"}),f.jsx("a",{href:mt.getHrefBySimpleName(e,(i=t==null?void 0:t.basicInfo)==null?void 0:i.block,"block"),target:"_blank",rel:"noopener noreferrer",children:(a=t==null?void 0:t.basicInfo)==null?void 0:a.block}),f.jsx("div",{className:"ml-1",children:Na({chain:e,type:"block",value:(s=t==null?void 0:t.basicInfo)==null?void 0:s.block})})]}),f.jsxs("div",{className:"flex items-center space-x-1 whitespace-nowrap",children:[f.jsx("span",{children:"Timestamp:"}),f.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[Ci((o=t==null?void 0:t.basicInfo)==null?void 0:o.timestamp).tz("UTC").format("YYYY-MM-DD HH:mm:ss"),` (UTC) (${Ci((c=t==null?void 0:t.basicInfo)==null?void 0:c.timestamp).fromNow()})`]})]}),f.jsxs("div",{className:"flex items-center space-x-1 whitespace-nowrap",children:[f.jsx("span",{children:"Transaction Fee:"}),f.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:((l=t==null?void 0:t.basicInfo)==null?void 0:l.transactionFee)&&`${new sn((u=t==null?void 0:t.basicInfo)==null?void 0:u.transactionFee).toFixed()} ${mt.getUnitBySimpleName(e)}`})]})]}),f.jsxs("div",{className:"flex items-center space-x-1 whitespace-nowrap",children:[f.jsx("span",{children:"Signer:"}),(d=(m=t==null?void 0:t.basicInfo)==null?void 0:m.signer)==null?void 0:d.map((g,v)=>{const p=r.find(_=>_.value===g);return f.jsxs("div",{className:"inline-flex items-center",children:[f.jsx("a",{href:mt.getHrefBySimpleName(e,g),rel:"noreferrer",target:"_blank",children:(p==null?void 0:p.label)||(p==null?void 0:p.value)||g}),v<t.basicInfo.signer.length-1?", ":"",f.jsx("div",{className:"ml-1",children:Na({chain:e,type:"address",value:g})})]},g)})]})]}):f.jsx(T0,{})})})},c3=dr(jF);export{l3 as B,n3 as F,t3 as G,Ou as I,s3 as M,c3 as S,WE as T,ZF as a,QF as b,e3 as c,r3 as d,JF as e,i3 as f,o3 as g,YF as h};