@ninebone/grid 0.0.149 → 0.0.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nine-grid.js +66 -66
- package/dist/nine-grid.js.map +1 -1
- package/dist/nine-grid.umd.js +17 -17
- package/dist/nine-grid.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-grid.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(de,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("jquery"),require("@ninebone/util")):typeof define=="function"&&define.amd?define(["exports","jquery","@ninebone/util"],Se):(de=typeof globalThis<"u"?globalThis:de||self,Se(de.NineGrid={},de.$,de.util))})(this,(function(de,Se,Ue){"use strict";var qf=Object.defineProperty;var Mu=de=>{throw TypeError(de)};var Hf=(de,Se,Ue)=>Se in de?qf(de,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):de[Se]=Ue;var it=(de,Se,Ue)=>Hf(de,typeof Se!="symbol"?Se+"":Se,Ue),
|
|
1
|
+
(function(de,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("jquery"),require("@ninebone/util")):typeof define=="function"&&define.amd?define(["exports","jquery","@ninebone/util"],Se):(de=typeof globalThis<"u"?globalThis:de||self,Se(de.NineGrid={},de.$,de.util))})(this,(function(de,Se,Ue){"use strict";var qf=Object.defineProperty;var Mu=de=>{throw TypeError(de)};var Hf=(de,Se,Ue)=>Se in de?qf(de,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):de[Se]=Ue;var it=(de,Se,Ue)=>Hf(de,typeof Se!="symbol"?Se+"":Se,Ue),vu=(de,Se,Ue)=>Se.has(de)||Mu("Cannot "+Ue);var f=(de,Se,Ue)=>(vu(de,Se,"read from private field"),Ue?Ue.call(de):Se.get(de)),Y=(de,Se,Ue)=>Se.has(de)?Mu("Cannot add the same private member more than once"):Se instanceof WeakSet?Se.add(de):Se.set(de,Ue),tt=(de,Se,Ue,ks)=>(vu(de,Se,"write to private field"),ks?ks.call(de,Ue):Se.set(de,Ue),Ue),Ke=(de,Se,Ue)=>(vu(de,Se,"access private method"),Ue);var Iu=(de,Se,Ue,ks)=>({set _(Ai){tt(de,Se,Ai,Ue)},get _(){return f(de,Se,ks)}});var Kn,Zn,Jn,ls,Bl,Cs,Ye,Fl,ql,Hl,zl,Wt,Ul,Ti,Es,As,Ri,Ts,Mi,Qn,Ii,Ni,lr,Nu,Ou,zf,ju,$u,Lu,Uf,Pu,ti,Oi,to,eo,ro,so,kt,Sr,ji,Vl,io,Ot,hs,no,oo,ao,jr,lo,ho,dr,co,Wl,Xl,Yl,Gl,Kl,Zl,uo,fo,po,mo,Jl,Ql,$i,go,Li,Pi,Di,bo,Bi,Fi,ei,Br,yo,qi,vo,th,ve,$r,Fr,wo,kr,Hi,qr,xo,lu,_o,hu,So,ko,zi,Ui,Co,Ie,Cr,Er,Rs,Ms,Hr,Ar,Is,Ns,Eo,Ao,To,cu,Ro,eh,Mo,Vi,Wi,Xi,ri,Yi,rh,ce,si,Lr,Gi,Io,sh,ih,Ki,De,nr,No,Os,ii,Zi,nh,oh,ah,lh,uu,Oo,Be,js,ni,Ji,hh,jo,ch,$o,Qi,du,uh,dh,tn,Lo,en,oi,rn,Gr,fh,Po,ph,Do,mh,zr,Bo,gh,bh,yh,Kr,Fo,cs,Ve,Ft,Pe,Tr,ai,$s,sn,qo,nn,Ho,zo,vh,Uo,Vo,on,an,Wo,Xo,Yo,Ne,Go,ln,us,li,hn,Ko,fu,pu,wh,Zo,hr,Jo,xh,_h,cn,ds,Ur,fs,Sh,Qo,un,kh,Ls,dn,Ch,Eh,Ah,Th,Rh,Mh,ta,fn,Ih,ea,Zr,Nh,Jr,hi,Oh,Ze,ps,Vr,Ps,pn,Qr,jh,Oe,ci,mn,gn,bn,ui,ts,es,Lt,ra,$h,Fe,sa,ia,Rr,na,We,rr,Ds,Lh,yn,Ph,di,oa,Bs,Pr,Fs,fi,Dh,Bh,vn,Fh,sr,cr,pi,qh,He,aa,la,ha,ms,ca,ua,da,fa,or,gr,mi,Hh,zh,pa,ma,Uh,fr,rs,ga,br,qs,gi,mu,ss,Vh,Wh,Xh,ba,ya,va,Yh,Gh,Le,pr,Dt,is,me,yr,vr,xn,wa,Kh,Zh,Jh,xa,Qh,_a,Sa,_n,tc,Du,Sn,Je,gs,ae,Wr,Xr,Hs,ec,ka,rc,Ca,sc,Ea,Aa,kn,Xe,ns,Ta,Ra,Ma,ic,nc,Gt,oc,Ia,Na,bs,Oa,ja,$a,La,Pa,Da,Ba,bi,$l,ac,lc,hc,cc,gu,Fa,qa,uc,dc,fc,yt,Ge,wr,yi,vi,Ha,za,Ua,Va,Wa,pc,mc,gc,Cn,zs,Us,Qe,Vs,bc,Xa,En,Ya,Mr,Ga,Ka,yc,vc,wc,xc,Za,wi,Ja,An,os,Qa,tl,_c,ys,Sc,el,kc,as,Cc,rl,Ec,sl,Ws,Xs,vs,Ac,il,Tn,nl,ol,Rn,al,ll,Ys,hl,Mn,ws,xi,In,Tc,Nn,On,Rc,cl,ul,jn,$n,dl,fl,pl,Mc,_i,Ic,Nc,Bu,Ln,Oc,jc,Fu,$c,Lc,ml,Pn,gl,Pc,bl,Dn,yl,Bn,xs,Si,Dc,ur,vl,Bc,Fn,qu,Hu,Fc,Dr,qc,Hc,zc,wl,bu,Uc,Ir,xl,_l,Sl,kl,Vc,Cl,ki,El,Nr,Ll,wu,xu,Al,Wc,Tl,Xc,qn,Rl,_u,Hn,Gs,Su,ku,Yc,Gc,Kc,_s,Zc,Ml,zn,Il,Nl,Un,Ol;class ks extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
2
2
|
<nx-dialog css-file="nxConfirm.css">
|
|
3
3
|
<div class="msg"></div>
|
|
4
4
|
<buttons class="buttons-confirm">
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</style>
|
|
158
158
|
|
|
159
159
|
<div></div>
|
|
160
|
-
`}}customElements.get("ng-col-mover-grip")||customElements.define("ng-col-mover-grip",Qu),customElements.get("ng-col-mover-indi")||customElements.define("ng-col-mover-indi",td);class ed{constructor(E){Y(this,ve);Y(this,$r);Y(this,Fr);Y(this,wo);Y(this,kr);Y(this,Hi);Y(this,qr);it(this,"resetEvent",()=>{$(document).off("mouseup",f(this,zi)),$(".ng-table thead",f(this,ve).body).off("mousedown",f(this,So)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(E=>{E.removeEventListener("click",f(this,xo))}),$(document).on("mouseup",f(this,zi)),$(".ng-table thead",f(this,ve).body).on("mousedown",f(this,So)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(E=>{E.addEventListener("click",f(this,xo))})});Y(this,xo,E=>{if(E.target.closest("ng-filter-button"))return;const t=E.currentTarget||E.target,l=getComputedStyle(t,":before"),c=getComputedStyle(t,":after");if(!(!l&&!c)){if(l){const i=Number(l.getPropertyValue("top").slice(0,-2)),u=6,a=Number(l.getPropertyValue("left").slice(0,-2));if(E.layerX>=a&&E.layerX<=a+6&&E.layerY>=i&&E.layerY<=i+u){var o=E.target.closest(".ng-container-left")||E.target.closest(".ng-container-body");if(o){var r=o.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)"),n=E.target.closest(".ng-container-left")?f(this,ve).body.querySelector(".ng-container-body"):f(this,ve).body.querySelector(".ng-container-right"),s=n.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child");const p=parseInt(r[r.length-1].dataset.col),m=r[r.length-1].colSpan;for(var e=0;e<m;e++)f(this,ve).body.querySelectorAll(`[data-col="${p+e}"] ng-col-expand:not(.expand)`).forEach(d=>{d.expand()});E.target.closest(".ng-container-body")?f(this,ve).body.querySelectorAll(".ng-container-right colgroup col:not(.dummy)").length==0?f(this,ve).columns.moveColumn(r[r.length-1],s):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s)):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s))}}}if(c){const i=Number(c.getPropertyValue("top").slice(0,-2)),u=6,a=Number(c.getPropertyValue("left").slice(0,-2));if(E.layerX>=a&&E.layerX<=a+6&&E.layerY>=i&&E.layerY<=i+u){var o=E.target.closest(".ng-container-body")||E.target.closest(".ng-container-right");if(o){var r=o.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child"),n=E.target.closest(".ng-container-body")?f(this,ve).body.querySelector(".ng-container-left"):f(this,ve).body.querySelector(".ng-container-body"),s=n.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)");const g=parseInt(r.dataset.col),S=r.colSpan;for(var e=0;e<S;e++)f(this,ve).body.querySelectorAll(`[data-col="${g+e}"] ng-col-expand:not(.expand)`).forEach(I=>{I.expand()});E.target.closest(".ng-container-right")?(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(s[s.length-1],r)):(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(r,s[s.length-1]))}}}}});Y(this,au,E=>{if(!["INPUT"].includes(E.target.tagName)){var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.pageY=E.changedTouches[0].pageY,E.buttons=1,f(this,ko).call(this,E),$(document).on("touchmove",l=>f(this,_o).call(this,l))}});Y(this,_o,E=>{var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.pageY=E.changedTouches[0].pageY,E.clientX=E.changedTouches[0].clientX,f(this,Ui).call(this,E)});Y(this,lu,E=>{E.clientX=E.changedTouches[0].clientX,f(this,zi).call(this,E)});Y(this,So,E=>{H.j.querySelectorAll(f(this,ve)).attr("col-movable")=="true"&&E.target.tagName!="NG-FILTER-BUTTON"&&(tt(this,Hi,!0),setTimeout(()=>{f(this,Hi)&&f(this,ko).call(this,E)},500))});Y(this,ko,E=>{if(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftkey||["INPUT"].includes(E.target.tagName))return;var t=E.pageX-$(E.target).offset().left;if(t<=3||$(E.target).width()-t<=3)return;E.target.closest(".ng-container-right")&&f(this,ve).body.querySelector("ng-hscrollbar").scrollToEnd();var l=E.target.closest("th,td");tt(this,kr,{col:parseInt(l.dataset.col),row:E.target.closest("tr").sectionRowIndex,target:l}),tt(this,wo,t+f(this,$r)[0].getBoundingClientRect().x);const c=f(this,$r)[0].shadowRoot.querySelector("span");c.innerHTML=$(E.target).html(),$(c).css({font:$(l).css("font")}),f(this,$r).show(),f(this,$r).width($(l).width()),f(this,$r).height($(l).height()),f(this,$r).offset({top:$(l).offset().top-1}),$(document).on("mousemove",f(this,Ui)),f(this,Co).call(this,E.pageX);const o=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);f(this,Fr).height($(o).height())});Y(this,zi,E=>{if(tt(this,Hi,!1),$(document).off("mousemove",f(this,Ui)),$(document).off("touchmove",f(this,_o)),f(this,qr)&&$(f(this,qr).target).css({cursor:f(this,qr).cursor}),f(this,kr)){var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);f(this,ve).columns.moveColumn(f(this,kr).target,t)}tt(this,qr,null),tt(this,kr,null),f(this,$r).hide(),f(this,Fr).hide()});Y(this,Ui,E=>{if(f(this,kr)!=null){f(this,qr)&&$(f(this,qr).target).css({cursor:f(this,qr).cursor}),tt(this,qr,{target:E.target,cursor:$(E.target).css("cursor")}),$(E.target).css({cursor:E.target.closest("thead")||E.target.tagName=="ng-col-mover-grip"?"move":"not-allowed"});var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);if(t)if(f(this,kr).col>parseInt(t.dataset.col)){var l=$(t).offset();f(this,Fr).show(),f(this,Fr).offset({left:parseInt(l.left-1),top:l.top})}else if(f(this,kr).col<parseInt(t.dataset.col)){var l=$(t).offset();f(this,Fr).show(),f(this,Fr).offset({left:parseInt(l.left+$(t).width()-1),top:l.top})}else f(this,Fr).hide();f(this,Co).call(this,E.pageX)}});Y(this,Co,E=>{f(this,$r).offset({left:E-f(this,wo)})});tt(this,ve,E),$(".ng-container",f(this,ve).body).append($("<ng-col-mover-grip></ng-col-mover-grip>").hide()).append($("<ng-col-mover-indi></ng-col-mover-indi>").hide()),tt(this,$r,$("ng-col-mover-grip",f(this,ve).body)),tt(this,Fr,$("ng-col-mover-indi",f(this,ve).body)),this.resetEvent()}}ve=new WeakMap,$r=new WeakMap,Fr=new WeakMap,wo=new WeakMap,kr=new WeakMap,Hi=new WeakMap,qr=new WeakMap,xo=new WeakMap,au=new WeakMap,_o=new WeakMap,lu=new WeakMap,So=new WeakMap,ko=new WeakMap,zi=new WeakMap,Ui=new WeakMap,Co=new WeakMap;class rd{constructor(E){Y(this,Ie);Y(this,Cr);Y(this,Er);Y(this,Rs);Y(this,Ms);Y(this,Hr);Y(this,Ar);Y(this,Is);Y(this,Ns,[]);it(this,"resetEvent",()=>{$(".ng-table > thead",f(this,Ie).body).off("mousemove",f(this,To)).off("mousedown",f(this,Ro)).off("dblclick",f(this,Eo)),$(document).off("mouseup",f(this,Ao)),$(".ng-table > thead",f(this,Ie).body).on("mousemove",f(this,To)).on("mousedown",f(this,Ro)).on("dblclick",f(this,Eo)),$(document).on("mouseup",f(this,Ao))});it(this,"autoFit",E=>{if(f(this,Ie).body)if(E){f(this,Ie).body.querySelector("ng-hscrollbar").scrollToHome(),tt(this,Ns,[]);var t=0;$(".ng-container-body col",f(this,Ie).body).each((c,o)=>{f(this,Ns).push({col:o,width:parseInt(o.getAttribute("width"))})}),f(this,Ns).forEach(c=>{t+=c.width}),$(".ng-container-body > table",f(this,Ie).body).css({width:"100%","min-width":"100%"});var l=$(".ng-container-body",f(this,Ie).body).width();l!=0&&f(this,Ns).forEach(c=>{var o=c.width*l/t;c.col.setAttribute("width",o)})}else $(".ng-container-body > table",f(this,Ie).body).css({width:"0","min-width":"0"}),f(this,Ns).forEach(c=>{c.col.setAttribute("width",c.width)})});Y(this,Eo,E=>{E.target.style.cursor=="col-resize"&&f(this,rh).call(this,E)});Y(this,Ao,E=>{tt(this,Ms,!1)});Y(this,To,E=>{if(!E.target.closest("ng-info")&&(E.target=E.target.closest("th,td"),!!E.target&&f(this,Ie).getAttribute("col-resizable")=="true"&&!(E.altKey||E.ctrlKey||E.shiftkey)))if(E.preventDefault(),E.offsetX<=2||E.offsetX>=E.target.offsetWidth-2){if(E.offsetX<=2&&f(this,Ie).tableUtils.isFirst(E.target)||E.offsetX>=E.target.offsetWidth-2&&f(this,Ie).tableUtils.isLast(E.target))return;E.target.style.cursor="col-resize"}else E.target.style.cursor="auto"});Y(this,hu,E=>{tt(this,Ms,!0),setTimeout(()=>{f(this,Ms)&&f(this,eh).call(this,E)},500)});Y(this,Ro,E=>{const t=E.target.closest("th,td");!t||t.style.cursor!="col-resize"||(tt(this,Ms,!0),setTimeout(()=>{f(this,Ms)&&f(this,Mo).call(this,E)},500))});Y(this,eh,E=>{E.target=E.target.closest("th,td");var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.buttons=1,f(this,Mo).call(this,E),f(this,Cr).is(":visible")?($(E.target).on("touchmove",l=>f(this,Vi).call(this,l)),$(E.target).on("touchend",l=>f(this,Xi).call(this,l))):($(E.target).off("touchmove",l=>f(this,Vi).call(this,l)),$(E.target).off("touchend",l=>f(this,Xi).call(this,l)))});Y(this,Mo,E=>{if(E.target=E.target.closest("th,td"),!(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftkey)){if(tt(this,Is,!!E.target.closest(".ng-container-right")),E.pageX-$(E.target).offset().left<=3){var t=$(`.col-indicator[data-col=${E.target.dataset.col}]`,f(this,Ie).body).not(".dummy")[0];tt(this,Hr,f(this,Ie).tableUtils.prev(t)),tt(this,Ar,$(t))}else{if($(E.target).width()-E.offsetX>2)return;var l=parseInt(E.target.dataset.col)+E.target.colSpan-1,t=$(`.col-indicator[data-col=${l}]`,f(this,Ie).body).not(".dummy")[0];tt(this,Hr,$(t)),tt(this,Ar,f(this,Ie).tableUtils.next(t))}f(this,Cr).show(),f(this,Er).offset({top:$(".ng-container-body",f(this,Ie).body).offset().top,left:f(this,Ar).offset().left-1}),f(this,Er).height(f(this,Ie).body.querySelector(".ng-container-body").offsetHeight),f(this,Rs).offset({top:$(".ng-container-body",f(this,Ie).body).offset().top}),f(this,Yi).call(this,E.pageX),$(f(this,Cr)).off("mousemove",f(this,Wi)).off("mouseup",f(this,ri)).on("mousemove",f(this,Wi)).on("mouseup",f(this,ri))}});Y(this,Vi,E=>{f(this,Yi).call(this,E.changedTouches[0].pageX)});Y(this,Wi,E=>{f(this,Yi).call(this,E.pageX)});Y(this,Xi,E=>{$(E.target).off("touchmove",t=>f(this,Vi).call(this,t)),$(E.target).off("touchend",t=>f(this,Xi).call(this,t)),f(this,ri).call(this,E)});Y(this,ri,E=>{if(!f(this,Er).is(":visible"))return;var t;f(this,Is)?t=f(this,Ar).offset().left-f(this,Er).offset().left+f(this,Ar).width():t=f(this,Er).offset().left-f(this,Hr).offset().left+1,t<=1&&(t=0);const l=f(this,Is)?f(this,Ar)[0].dataset.col:f(this,Hr)[0].dataset.col;f(this,Ie).columns.width(l,t),$(f(this,Cr)).off("mousemove",f(this,Wi)),$(f(this,Cr)).off("mouseup",f(this,ri)),f(this,Cr).hide()});Y(this,Yi,E=>{!f(this,Is)&&E<f(this,Hr).offset().left&&(E=f(this,Hr).offset().left),f(this,Er).offset({left:E});var t=parseInt(f(this,Er).offset().left),l,c,o;f(this,Is)?(c=f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left,o=c<10?10:c-1,l=parseInt(f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left)):(c=parseInt(t-f(this,Hr).offset().left),o=c,l=parseInt(t-f(this,Hr).offset().left+1),t=t-o),l<=1&&(l=0),f(this,Rs).offset({left:t}),f(this,Rs).width(o),f(this,Rs).find("span").text(l)});Y(this,rh,E=>{var t=E.target.closest("th,td"),l=f(this,Ie).tableUtils.prev(t),c=f(this,Ie).tableUtils.next(t),o=f(this,Ie).getBand(t.dataset.col)==H.BAND.RIGHT?E.offsetX<=2?$(t):c:E.offsetX<=2?l:$(t);f(this,Ie).setColumnWidthFit(o[0].dataset.col)});tt(this,Ie,E),tt(this,Cr,$('<div class="resizer-col-panel"><div class="grip"></div><div class="tooltip"><div></div><span></span><div></div></div></div>').hide()),$(f(this,Ie).body).append(f(this,Cr)),tt(this,Er,f(this,Cr).find(".grip")),tt(this,Rs,f(this,Cr).find(".tooltip")),this.resetEvent()}}Ie=new WeakMap,Cr=new WeakMap,Er=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,Hr=new WeakMap,Ar=new WeakMap,Is=new WeakMap,Ns=new WeakMap,Eo=new WeakMap,Ao=new WeakMap,To=new WeakMap,hu=new WeakMap,Ro=new WeakMap,eh=new WeakMap,Mo=new WeakMap,Vi=new WeakMap,Wi=new WeakMap,Xi=new WeakMap,ri=new WeakMap,Yi=new WeakMap,rh=new WeakMap;class sd{constructor(E){Y(this,ce);it(this,"count",()=>f(this,ce).activeTmpl.querySelectorAll("[data-bind]").length);it(this,"info",E=>{const t=l=>{if(!l)return null;const c=f(this,ce).body.querySelectorAll(`thead [data-col="${l.dataset.col}"]`);return{name:l.dataset.bind,type:(l.dataset.type||"string").toLocaleLowerCase(),desc:c.length>0?c[c.length-1].getAttribute("title"):null}};return E?t(f(this,ce).activeTmpl.querySelector(`[data-bind="${E}"]`)):Array.from(f(this,ce).activeTmpl.querySelectorAll("[data-bind]")).filter(l=>l.dataset.bind!=="rowState").map(l=>t(l))});Y(this,si,(E,t)=>{var l=Array.from(E.querySelectorAll("col"));return l[t]});Y(this,Lr,(E,t,l)=>{var c=[];if(!E)return c;for(var o=t;o<=l;o++)c=c.concat(Array.from(E.querySelectorAll(`[data-col="${o}"]:not(.dummy)`)));return c});Y(this,Gi,(E,t,l)=>{const c=(r,n)=>{const s=parseInt(n.dataset.col);return r.closest("thead,tbody,tfoot"),r.querySelector(`[data-col="${s}"]`)},o=(r,n)=>{const s=parseInt(n.dataset.col),e=n.colSpan||1,i=!r.closest("thead,tbody,tfoot");var u=r.querySelectorAll("th:not(.tmp),td:not(.tmp)");for(var a of u)if(parseInt(a.dataset.col)>s+e-1)return a};return parseInt(t.dataset.col)>parseInt(l.dataset.col)?c(E,l):o(E,l)});Y(this,Io,E=>{const t={org:{thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},cols:[]},thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},template:{cells:[]},cols:[]},l=E.colSpan||1,c=E.closest("table"),o=parseInt(E.dataset.col),r=E.closest("tr").sectionRowIndex;$("thead tr",c).each((e,i)=>{if(i.sectionRowIndex<r&&i.sectionRowIndex!=0)return!0;t.thead.cells=t.thead.cells.concat(f(this,Lr).call(this,i,o,o+l-1))}),t.tfoot.cells=f(this,Lr).call(this,c.querySelector("tfoot"),o,o+l-1),t.tbody.cells=f(this,Lr).call(this,c.querySelector("tbody.bindable"),o,o+l-1),t.fixed.cells=f(this,Lr).call(this,c.querySelector("tbody.fixed"),o,o+l-1);const n=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");t.org.thead.cells=f(this,Lr).call(this,n.currentTable.querySelector("thead"),o,o+l-1),t.org.tfoot.cells=f(this,Lr).call(this,n.currentTable.querySelector("tfoot"),o,o+l-1),t.org.tbody.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.bindable"),o,o+l-1),t.org.fixed.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.fixed"),o,o+l-1),f(this,ce).template.each((e,i)=>{t.template.cells=t.template.cells.concat(f(this,Lr).call(this,i,o,o+l-1))});for(var s=o;s<=o+l-1;s++)t.cols.push(f(this,si).call(this,f(this,ce).body,s));for(var s=o;s<=o+l-1;s++)t.org.cols.push(f(this,si).call(this,n.currentTable,s));return t});Y(this,sh,(E,t,l,c)=>{if(E.closest("tr").rowIndex!=t.closest("tr").rowIndex)return!1;const o=parseInt(E.dataset.col),r=E.colSpan;parseInt(t.dataset.col),t.colSpan;for(var n of[l.thead.cells,l.tfoot.cells,l.tbody.cells,l.fixed.cells,l.template.cells])for(var s of n){const e=parseInt(s.dataset.col),i=s.colSpan;if(e<o||e+i-1>o+r-1)return!1}return!0});it(this,"moveColumn",(E,t)=>{if(!E||!t)return!1;const l=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout"),c=f(this,Io).call(this,E),o=f(this,Io).call(this,t),r=t.closest("table"),n=!!(E.closest(".ng-container-left")||t.closest(".ng-container-left")),s=!!(E.closest(".ng-container-right")||t.closest(".ng-container-right"));if(!f(this,sh).call(this,E,t,c,o))return!1;for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const b=i.closest("tr").rowIndex,g=r.querySelectorAll("tr")[b];var u=f(this,Gi).call(this,g,E,t);u?g.insertBefore(i,u):g.appendChild(i)}for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const S=i.closest("table"),C=i.closest("tr").rowIndex,I=S.querySelectorAll("tr")[C];var u=f(this,Gi).call(this,I,E,t);u?I.insertBefore(i,u):I.appendChild(i)}for(var i of c.template.cells){H.j.querySelectorAll(i).addClass("tmp");const g=i.closest("tr");var u=f(this,Gi).call(this,g,E,t);u?g.insertBefore(i,u):g.appendChild(i)}var a;parseInt(E.dataset.col)>parseInt(t.dataset.col)?a=parseInt(t.dataset.col):a=parseInt(t.dataset.col)+(t.colSpan||1)-1+(parseInt(E.dataset.col)>parseInt(t.dataset.col)?0:1);let h=f(this,si).call(this,f(this,ce).body,a);const p=t.closest("table")==h.closest("table");for(var m of c.cols)m&&(p?t.closest("table").querySelector("colgroup").insertBefore(m,h):t.closest("table").querySelector("colgroup").appendChild(m));for(var m of c.org.cols)h=f(this,si).call(this,l.currentTable,a),m&&m.closest("colgroup").insertBefore(m,h);for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var i of c.template.cells)H.j.querySelectorAll(i).removeClass("tmp");if(f(this,ce).body.querySelectorAll(".ng-container-left col").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-right col").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-body col").forEach(b=>{b.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.removeAttribute("fixed")}),l.currentTable.querySelectorAll("colgroup col").forEach(b=>{b.removeAttribute("fixed")}),$("th,td",f(this,ce).template).each((b,g)=>{g.removeAttribute("fixed")}),$("th,td",l.currentTable).each((b,g)=>{g.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","left")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","left")}),$("colgroup col",l.currentTable).each((g,S)=>{g<=parseInt(b.dataset.col)&&S.setAttribute("fixed","left")})}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","right")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","right")})}),f(this,ce).resetTemplate(),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$("colgroup col",l.currentTable).each((g,S)=>{g>=parseInt(b.dataset.col)&&S.setAttribute("fixed","right")})}),n){var d=t.closest(".ng-container-body")?-E.offsetWidth:0;$(".ng-container-left .col-indicator",f(this,ce).body).each((b,g)=>{d+=g.offsetWidth}),$(".ng-container-left",f(this,ce).body).css({width:d,"min-width":d})}if(s){var d=t.closest(".ng-container-body")?-E.offsetWidth:0;$(".ng-container-right .col-indicator",f(this,ce).body).each((g,S)=>{d+=S.offsetWidth}),$(".ng-container-right",f(this,ce).body).css({width:d,"min-width":d})}f(this,ce).refreshData()});it(this,"width",(E,t)=>{t=parseFloat(t);const l=f(this,ce).body.querySelector(`colgroup col[data-col="${E}"]`),c=!!l.closest(".ng-container-left"),o=!!l.closest(".ng-container-right"),r=!!l.closest(".ng-container-body"),n=c?"left":o?"right":"body";if(r)if(f(this,ce).getAttribute("auto-fit-col")=="true"){var s=0;$(".ng-container-body .col-indicator",f(this,ce).body).not(`[data-col=${E}]`).each((u,a)=>{s+=a.offsetWidth});const i=$(".ng-container-body",f(this,ce).body).width();$(".ng-container-body col",f(this,ce).body).each((u,a)=>{var h=parseInt(E==a.dataset.col?t:a.getAttribute("width"))*i/s;a.setAttribute("width",h)})}else l.setAttribute("width",t);else{var e=0;$(`.ng-container-${n} .col-indicator`,f(this,ce).body).not(`[data-col=${E}]`).each((i,u)=>{e+=parseInt(u.offsetWidth)}),$(`.ng-container-${n}`,f(this,ce).body).css({width:parseInt(e+t),"min-width":parseInt(e+t)}),l.setAttribute("width",t)}});tt(this,ce,E)}}ce=new WeakMap,si=new WeakMap,Lr=new WeakMap,Gi=new WeakMap,Io=new WeakMap,sh=new WeakMap;class id extends Ue.trace.constructor{constructor(){super(),this.init("nine-grid","green")}}const ku=new id;class nd extends Qs{constructor(){super();Y(this,ih,10);Y(this,Ki);Y(this,De);Y(this,nr);Y(this,No);Y(this,Os);Y(this,ii);Y(this,Zi);it(this,"dataRefresh",t=>{f(this,nr)&&(f(this,nh).call(this)?H.j.querySelectorAll(this).removeClass("invalid"):H.j.querySelectorAll(this).addClass("invalid")),f(this,Ki).innerHTML=this.getDisplayText()||"Select",t||this.reset()});Y(this,nh,()=>{if(H.isNull(this.value))return!0;var t=this.multi?this.value.split(this.multiSeparator):[this.value];for(var l of t){var c=f(this,nr).findIndex(o=>l==o[f(this,Os)]);if(c<0)return!1}return!0});Y(this,oh,()=>{if(this.owner){if(tt(this,De,this.owner.shadowRoot.querySelector("ng-combo-panel")),this.owner.shadowRoot.querySelectorAll("ng-combo-panel").length>1)throw"too many ng-combo-panel";var t=this.getAttribute("data-source");t&&this.owner&&this.owner.exprFunction}});Y(this,ah,t=>{if(console.log(f(this,nr)),!!f(this,nr)){console.log(f(this,nr)),f(this,De).col=this.cell.dataset.col,f(this,De).row=this.cell.closest("tr").sectionRowIndex,f(this,nr).length>f(this,ih)?H.j.querySelectorAll(f(this,De)).addClass("expand"):H.j.querySelectorAll(f(this,De)).removeClass("expand"),this.multi?H.j.querySelectorAll(f(this,De)).addClass("multi"):H.j.querySelectorAll(f(this,De)).removeClass("multi"),f(this,De).refresh(this,f(this,nr),f(this,Os),f(this,Zi));var l=$(".btn1",this.shadowRoot).offset().left-$(this.owner).offset().left;l+$(f(this,De)).width()>$(this.owner).width()&&(l=$(".btn2",this.shadowRoot).offset().left-$(this.owner).offset().left-$(f(this,De)).width()+8),l<0&&(l=0);var c=Math.min(f(this,nr).length,f(this,No))*26;this.multi?(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=2,c+=3,c+=25):(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=3);var o=$(".btn1",this.shadowRoot).offset().top+$(".btn1",this.shadowRoot).height()-$(this.owner).offset().top+3;o+c>$(this.owner).height()&&(o-=c+$(".btn1",this.shadowRoot).height()+6);var r=this.getAttribute("template");r&&console.error("logic error !!!!"),$(f(this,De)).css({left:l,top:o,height:c,"min-height":c}).show(),H.j.querySelectorAll(f(this,De)).hasClass("expand")&&$("div",f(this,De)).eq(0).find("input").focus().val("")}});Y(this,lh,t=>{t.target.closest("ng-combo-panel")||(f(this,De).row=f(this,De).col=-1,$(f(this,De)).hide())});Y(this,cu,()=>"a")}connectedCallback(){this.multi=this.getAttribute("multi")=="true",this.multiSeparator=this.getAttribute("multi-separator")||",",tt(this,No,this.getAttribute("rows")||5),tt(this,Os,this.getAttribute("code")||"code"),tt(this,ii,this.getAttribute("codename")||"codename"),tt(this,Zi,(this.getAttribute("items")||f(this,ii)||"").split(",")),f(this,Zi).unshift("CHK");var t=this.querySelector("datalist");t&&(tt(this,nr,[]),t.querySelectorAll("option").forEach(n=>{const s=n.getAttribute(f(this,Os)),e=n.getAttribute(f(this,ii));s&&e&&f(this,nr).push({[f(this,Os)]:s,[f(this,ii)]:e})})),this.shadowRoot.innerHTML=`
|
|
160
|
+
`}}customElements.get("ng-col-mover-grip")||customElements.define("ng-col-mover-grip",Qu),customElements.get("ng-col-mover-indi")||customElements.define("ng-col-mover-indi",td);class ed{constructor(E){Y(this,ve);Y(this,$r);Y(this,Fr);Y(this,wo);Y(this,kr);Y(this,Hi);Y(this,qr);it(this,"resetEvent",()=>{$(document).off("mouseup",f(this,zi)),$(".ng-table thead",f(this,ve).body).off("mousedown",f(this,So)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(E=>{E.removeEventListener("click",f(this,xo))}),$(document).on("mouseup",f(this,zi)),$(".ng-table thead",f(this,ve).body).on("mousedown",f(this,So)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(E=>{E.addEventListener("click",f(this,xo))})});Y(this,xo,E=>{if(E.target.closest("ng-filter-button"))return;const t=E.currentTarget||E.target,l=getComputedStyle(t,":before"),c=getComputedStyle(t,":after");if(!(!l&&!c)){if(l){const i=Number(l.getPropertyValue("top").slice(0,-2)),u=6,a=Number(l.getPropertyValue("left").slice(0,-2));if(E.layerX>=a&&E.layerX<=a+6&&E.layerY>=i&&E.layerY<=i+u){var o=E.target.closest(".ng-container-left")||E.target.closest(".ng-container-body");if(o){var r=o.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)"),n=E.target.closest(".ng-container-left")?f(this,ve).body.querySelector(".ng-container-body"):f(this,ve).body.querySelector(".ng-container-right"),s=n.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child");const p=parseInt(r[r.length-1].dataset.col),m=r[r.length-1].colSpan;for(var e=0;e<m;e++)f(this,ve).body.querySelectorAll(`[data-col="${p+e}"] ng-col-expand:not(.expand)`).forEach(d=>{d.expand()});E.target.closest(".ng-container-body")?f(this,ve).body.querySelectorAll(".ng-container-right colgroup col:not(.dummy)").length==0?f(this,ve).columns.moveColumn(r[r.length-1],s):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s)):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s))}}}if(c){const i=Number(c.getPropertyValue("top").slice(0,-2)),u=6,a=Number(c.getPropertyValue("left").slice(0,-2));if(E.layerX>=a&&E.layerX<=a+6&&E.layerY>=i&&E.layerY<=i+u){var o=E.target.closest(".ng-container-body")||E.target.closest(".ng-container-right");if(o){var r=o.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child"),n=E.target.closest(".ng-container-body")?f(this,ve).body.querySelector(".ng-container-left"):f(this,ve).body.querySelector(".ng-container-body"),s=n.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)");const g=parseInt(r.dataset.col),S=r.colSpan;for(var e=0;e<S;e++)f(this,ve).body.querySelectorAll(`[data-col="${g+e}"] ng-col-expand:not(.expand)`).forEach(I=>{I.expand()});E.target.closest(".ng-container-right")?(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(s[s.length-1],r)):(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(r,s[s.length-1]))}}}}});Y(this,lu,E=>{if(!["INPUT"].includes(E.target.tagName)){var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.pageY=E.changedTouches[0].pageY,E.buttons=1,f(this,ko).call(this,E),$(document).on("touchmove",l=>f(this,_o).call(this,l))}});Y(this,_o,E=>{var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.pageY=E.changedTouches[0].pageY,E.clientX=E.changedTouches[0].clientX,f(this,Ui).call(this,E)});Y(this,hu,E=>{E.clientX=E.changedTouches[0].clientX,f(this,zi).call(this,E)});Y(this,So,E=>{H.j.querySelectorAll(f(this,ve)).attr("col-movable")=="true"&&E.target.tagName!="NG-FILTER-BUTTON"&&(tt(this,Hi,!0),setTimeout(()=>{f(this,Hi)&&f(this,ko).call(this,E)},500))});Y(this,ko,E=>{if(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftkey||["INPUT"].includes(E.target.tagName))return;var t=E.pageX-$(E.target).offset().left;if(t<=3||$(E.target).width()-t<=3)return;E.target.closest(".ng-container-right")&&f(this,ve).body.querySelector("ng-hscrollbar").scrollToEnd();var l=E.target.closest("th,td");tt(this,kr,{col:parseInt(l.dataset.col),row:E.target.closest("tr").sectionRowIndex,target:l}),tt(this,wo,t+f(this,$r)[0].getBoundingClientRect().x);const c=f(this,$r)[0].shadowRoot.querySelector("span");c.innerHTML=$(E.target).html(),$(c).css({font:$(l).css("font")}),f(this,$r).show(),f(this,$r).width($(l).width()),f(this,$r).height($(l).height()),f(this,$r).offset({top:$(l).offset().top-1}),$(document).on("mousemove",f(this,Ui)),f(this,Co).call(this,E.pageX);const o=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);f(this,Fr).height($(o).height())});Y(this,zi,E=>{if(tt(this,Hi,!1),$(document).off("mousemove",f(this,Ui)),$(document).off("touchmove",f(this,_o)),f(this,qr)&&$(f(this,qr).target).css({cursor:f(this,qr).cursor}),f(this,kr)){var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);f(this,ve).columns.moveColumn(f(this,kr).target,t)}tt(this,qr,null),tt(this,kr,null),f(this,$r).hide(),f(this,Fr).hide()});Y(this,Ui,E=>{if(f(this,kr)!=null){f(this,qr)&&$(f(this,qr).target).css({cursor:f(this,qr).cursor}),tt(this,qr,{target:E.target,cursor:$(E.target).css("cursor")}),$(E.target).css({cursor:E.target.closest("thead")||E.target.tagName=="ng-col-mover-grip"?"move":"not-allowed"});var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);if(t)if(f(this,kr).col>parseInt(t.dataset.col)){var l=$(t).offset();f(this,Fr).show(),f(this,Fr).offset({left:parseInt(l.left-1),top:l.top})}else if(f(this,kr).col<parseInt(t.dataset.col)){var l=$(t).offset();f(this,Fr).show(),f(this,Fr).offset({left:parseInt(l.left+$(t).width()-1),top:l.top})}else f(this,Fr).hide();f(this,Co).call(this,E.pageX)}});Y(this,Co,E=>{f(this,$r).offset({left:E-f(this,wo)})});tt(this,ve,E),$(".ng-container",f(this,ve).body).append($("<ng-col-mover-grip></ng-col-mover-grip>").hide()).append($("<ng-col-mover-indi></ng-col-mover-indi>").hide()),tt(this,$r,$("ng-col-mover-grip",f(this,ve).body)),tt(this,Fr,$("ng-col-mover-indi",f(this,ve).body)),this.resetEvent()}}ve=new WeakMap,$r=new WeakMap,Fr=new WeakMap,wo=new WeakMap,kr=new WeakMap,Hi=new WeakMap,qr=new WeakMap,xo=new WeakMap,lu=new WeakMap,_o=new WeakMap,hu=new WeakMap,So=new WeakMap,ko=new WeakMap,zi=new WeakMap,Ui=new WeakMap,Co=new WeakMap;class rd{constructor(E){Y(this,Ie);Y(this,Cr);Y(this,Er);Y(this,Rs);Y(this,Ms);Y(this,Hr);Y(this,Ar);Y(this,Is);Y(this,Ns,[]);it(this,"resetEvent",()=>{$(".ng-table > thead",f(this,Ie).body).off("mousemove",f(this,To)).off("mousedown",f(this,Ro)).off("dblclick",f(this,Eo)),$(document).off("mouseup",f(this,Ao)),$(".ng-table > thead",f(this,Ie).body).on("mousemove",f(this,To)).on("mousedown",f(this,Ro)).on("dblclick",f(this,Eo)),$(document).on("mouseup",f(this,Ao))});it(this,"autoFit",E=>{if(f(this,Ie).body)if(E){f(this,Ie).body.querySelector("ng-hscrollbar").scrollToHome(),tt(this,Ns,[]);var t=0;$(".ng-container-body col",f(this,Ie).body).each((c,o)=>{f(this,Ns).push({col:o,width:parseInt(o.getAttribute("width"))})}),f(this,Ns).forEach(c=>{t+=c.width}),$(".ng-container-body > table",f(this,Ie).body).css({width:"100%","min-width":"100%"});var l=$(".ng-container-body",f(this,Ie).body).width();l!=0&&f(this,Ns).forEach(c=>{var o=c.width*l/t;c.col.setAttribute("width",o)})}else $(".ng-container-body > table",f(this,Ie).body).css({width:"0","min-width":"0"}),f(this,Ns).forEach(c=>{c.col.setAttribute("width",c.width)})});Y(this,Eo,E=>{E.target.style.cursor=="col-resize"&&f(this,rh).call(this,E)});Y(this,Ao,E=>{tt(this,Ms,!1)});Y(this,To,E=>{if(!E.target.closest("ng-info")&&(E.target=E.target.closest("th,td"),!!E.target&&f(this,Ie).getAttribute("col-resizable")=="true"&&!(E.altKey||E.ctrlKey||E.shiftkey)))if(E.preventDefault(),E.offsetX<=2||E.offsetX>=E.target.offsetWidth-2){if(E.offsetX<=2&&f(this,Ie).tableUtils.isFirst(E.target)||E.offsetX>=E.target.offsetWidth-2&&f(this,Ie).tableUtils.isLast(E.target))return;E.target.style.cursor="col-resize"}else E.target.style.cursor="auto"});Y(this,cu,E=>{tt(this,Ms,!0),setTimeout(()=>{f(this,Ms)&&f(this,eh).call(this,E)},500)});Y(this,Ro,E=>{const t=E.target.closest("th,td");!t||t.style.cursor!="col-resize"||(tt(this,Ms,!0),setTimeout(()=>{f(this,Ms)&&f(this,Mo).call(this,E)},500))});Y(this,eh,E=>{E.target=E.target.closest("th,td");var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.buttons=1,f(this,Mo).call(this,E),f(this,Cr).is(":visible")?($(E.target).on("touchmove",l=>f(this,Vi).call(this,l)),$(E.target).on("touchend",l=>f(this,Xi).call(this,l))):($(E.target).off("touchmove",l=>f(this,Vi).call(this,l)),$(E.target).off("touchend",l=>f(this,Xi).call(this,l)))});Y(this,Mo,E=>{if(E.target=E.target.closest("th,td"),!(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftkey)){if(tt(this,Is,!!E.target.closest(".ng-container-right")),E.pageX-$(E.target).offset().left<=3){var t=$(`.col-indicator[data-col=${E.target.dataset.col}]`,f(this,Ie).body).not(".dummy")[0];tt(this,Hr,f(this,Ie).tableUtils.prev(t)),tt(this,Ar,$(t))}else{if($(E.target).width()-E.offsetX>2)return;var l=parseInt(E.target.dataset.col)+E.target.colSpan-1,t=$(`.col-indicator[data-col=${l}]`,f(this,Ie).body).not(".dummy")[0];tt(this,Hr,$(t)),tt(this,Ar,f(this,Ie).tableUtils.next(t))}f(this,Cr).show(),f(this,Er).offset({top:$(".ng-container-body",f(this,Ie).body).offset().top,left:f(this,Ar).offset().left-1}),f(this,Er).height(f(this,Ie).body.querySelector(".ng-container-body").offsetHeight),f(this,Rs).offset({top:$(".ng-container-body",f(this,Ie).body).offset().top}),f(this,Yi).call(this,E.pageX),$(f(this,Cr)).off("mousemove",f(this,Wi)).off("mouseup",f(this,ri)).on("mousemove",f(this,Wi)).on("mouseup",f(this,ri))}});Y(this,Vi,E=>{f(this,Yi).call(this,E.changedTouches[0].pageX)});Y(this,Wi,E=>{f(this,Yi).call(this,E.pageX)});Y(this,Xi,E=>{$(E.target).off("touchmove",t=>f(this,Vi).call(this,t)),$(E.target).off("touchend",t=>f(this,Xi).call(this,t)),f(this,ri).call(this,E)});Y(this,ri,E=>{if(!f(this,Er).is(":visible"))return;var t;f(this,Is)?t=f(this,Ar).offset().left-f(this,Er).offset().left+f(this,Ar).width():t=f(this,Er).offset().left-f(this,Hr).offset().left+1,t<=1&&(t=0);const l=f(this,Is)?f(this,Ar)[0].dataset.col:f(this,Hr)[0].dataset.col;f(this,Ie).columns.width(l,t),$(f(this,Cr)).off("mousemove",f(this,Wi)),$(f(this,Cr)).off("mouseup",f(this,ri)),f(this,Cr).hide()});Y(this,Yi,E=>{!f(this,Is)&&E<f(this,Hr).offset().left&&(E=f(this,Hr).offset().left),f(this,Er).offset({left:E});var t=parseInt(f(this,Er).offset().left),l,c,o;f(this,Is)?(c=f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left,o=c<10?10:c-1,l=parseInt(f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left)):(c=parseInt(t-f(this,Hr).offset().left),o=c,l=parseInt(t-f(this,Hr).offset().left+1),t=t-o),l<=1&&(l=0),f(this,Rs).offset({left:t}),f(this,Rs).width(o),f(this,Rs).find("span").text(l)});Y(this,rh,E=>{var t=E.target.closest("th,td"),l=f(this,Ie).tableUtils.prev(t),c=f(this,Ie).tableUtils.next(t),o=f(this,Ie).getBand(t.dataset.col)==H.BAND.RIGHT?E.offsetX<=2?$(t):c:E.offsetX<=2?l:$(t);f(this,Ie).setColumnWidthFit(o[0].dataset.col)});tt(this,Ie,E),tt(this,Cr,$('<div class="resizer-col-panel"><div class="grip"></div><div class="tooltip"><div></div><span></span><div></div></div></div>').hide()),$(f(this,Ie).body).append(f(this,Cr)),tt(this,Er,f(this,Cr).find(".grip")),tt(this,Rs,f(this,Cr).find(".tooltip")),this.resetEvent()}}Ie=new WeakMap,Cr=new WeakMap,Er=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,Hr=new WeakMap,Ar=new WeakMap,Is=new WeakMap,Ns=new WeakMap,Eo=new WeakMap,Ao=new WeakMap,To=new WeakMap,cu=new WeakMap,Ro=new WeakMap,eh=new WeakMap,Mo=new WeakMap,Vi=new WeakMap,Wi=new WeakMap,Xi=new WeakMap,ri=new WeakMap,Yi=new WeakMap,rh=new WeakMap;class sd{constructor(E){Y(this,ce);it(this,"count",()=>f(this,ce).activeTmpl.querySelectorAll("[data-bind]").length);it(this,"info",E=>{const t=l=>{if(!l)return null;const c=f(this,ce).body.querySelectorAll(`thead [data-col="${l.dataset.col}"]`);return{name:l.dataset.bind,type:(l.dataset.type||"string").toLocaleLowerCase(),desc:c.length>0?c[c.length-1].getAttribute("title"):null}};return E?t(f(this,ce).activeTmpl.querySelector(`[data-bind="${E}"]`)):Array.from(f(this,ce).activeTmpl.querySelectorAll("[data-bind]")).filter(l=>l.dataset.bind!=="rowState").map(l=>t(l))});Y(this,si,(E,t)=>{var l=Array.from(E.querySelectorAll("col"));return l[t]});Y(this,Lr,(E,t,l)=>{var c=[];if(!E)return c;for(var o=t;o<=l;o++)c=c.concat(Array.from(E.querySelectorAll(`[data-col="${o}"]:not(.dummy)`)));return c});Y(this,Gi,(E,t,l)=>{const c=(r,n)=>{const s=parseInt(n.dataset.col);return r.closest("thead,tbody,tfoot"),r.querySelector(`[data-col="${s}"]`)},o=(r,n)=>{const s=parseInt(n.dataset.col),e=n.colSpan||1,i=!r.closest("thead,tbody,tfoot");var u=r.querySelectorAll("th:not(.tmp),td:not(.tmp)");for(var a of u)if(parseInt(a.dataset.col)>s+e-1)return a};return parseInt(t.dataset.col)>parseInt(l.dataset.col)?c(E,l):o(E,l)});Y(this,Io,E=>{const t={org:{thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},cols:[]},thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},template:{cells:[]},cols:[]},l=E.colSpan||1,c=E.closest("table"),o=parseInt(E.dataset.col),r=E.closest("tr").sectionRowIndex;$("thead tr",c).each((e,i)=>{if(i.sectionRowIndex<r&&i.sectionRowIndex!=0)return!0;t.thead.cells=t.thead.cells.concat(f(this,Lr).call(this,i,o,o+l-1))}),t.tfoot.cells=f(this,Lr).call(this,c.querySelector("tfoot"),o,o+l-1),t.tbody.cells=f(this,Lr).call(this,c.querySelector("tbody.bindable"),o,o+l-1),t.fixed.cells=f(this,Lr).call(this,c.querySelector("tbody.fixed"),o,o+l-1);const n=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");t.org.thead.cells=f(this,Lr).call(this,n.currentTable.querySelector("thead"),o,o+l-1),t.org.tfoot.cells=f(this,Lr).call(this,n.currentTable.querySelector("tfoot"),o,o+l-1),t.org.tbody.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.bindable"),o,o+l-1),t.org.fixed.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.fixed"),o,o+l-1),f(this,ce).template.each((e,i)=>{t.template.cells=t.template.cells.concat(f(this,Lr).call(this,i,o,o+l-1))});for(var s=o;s<=o+l-1;s++)t.cols.push(f(this,si).call(this,f(this,ce).body,s));for(var s=o;s<=o+l-1;s++)t.org.cols.push(f(this,si).call(this,n.currentTable,s));return t});Y(this,sh,(E,t,l,c)=>{if(E.closest("tr").rowIndex!=t.closest("tr").rowIndex)return!1;const o=parseInt(E.dataset.col),r=E.colSpan;parseInt(t.dataset.col),t.colSpan;for(var n of[l.thead.cells,l.tfoot.cells,l.tbody.cells,l.fixed.cells,l.template.cells])for(var s of n){const e=parseInt(s.dataset.col),i=s.colSpan;if(e<o||e+i-1>o+r-1)return!1}return!0});it(this,"moveColumn",(E,t)=>{if(!E||!t)return!1;const l=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout"),c=f(this,Io).call(this,E),o=f(this,Io).call(this,t),r=t.closest("table"),n=!!(E.closest(".ng-container-left")||t.closest(".ng-container-left")),s=!!(E.closest(".ng-container-right")||t.closest(".ng-container-right"));if(!f(this,sh).call(this,E,t,c,o))return!1;for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const b=i.closest("tr").rowIndex,g=r.querySelectorAll("tr")[b];var u=f(this,Gi).call(this,g,E,t);u?g.insertBefore(i,u):g.appendChild(i)}for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const S=i.closest("table"),C=i.closest("tr").rowIndex,I=S.querySelectorAll("tr")[C];var u=f(this,Gi).call(this,I,E,t);u?I.insertBefore(i,u):I.appendChild(i)}for(var i of c.template.cells){H.j.querySelectorAll(i).addClass("tmp");const g=i.closest("tr");var u=f(this,Gi).call(this,g,E,t);u?g.insertBefore(i,u):g.appendChild(i)}var a;parseInt(E.dataset.col)>parseInt(t.dataset.col)?a=parseInt(t.dataset.col):a=parseInt(t.dataset.col)+(t.colSpan||1)-1+(parseInt(E.dataset.col)>parseInt(t.dataset.col)?0:1);let h=f(this,si).call(this,f(this,ce).body,a);const p=t.closest("table")==h.closest("table");for(var m of c.cols)m&&(p?t.closest("table").querySelector("colgroup").insertBefore(m,h):t.closest("table").querySelector("colgroup").appendChild(m));for(var m of c.org.cols)h=f(this,si).call(this,l.currentTable,a),m&&m.closest("colgroup").insertBefore(m,h);for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var i of c.template.cells)H.j.querySelectorAll(i).removeClass("tmp");if(f(this,ce).body.querySelectorAll(".ng-container-left col").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-right col").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-body col").forEach(b=>{b.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.removeAttribute("fixed")}),l.currentTable.querySelectorAll("colgroup col").forEach(b=>{b.removeAttribute("fixed")}),$("th,td",f(this,ce).template).each((b,g)=>{g.removeAttribute("fixed")}),$("th,td",l.currentTable).each((b,g)=>{g.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","left")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","left")}),$("colgroup col",l.currentTable).each((g,S)=>{g<=parseInt(b.dataset.col)&&S.setAttribute("fixed","left")})}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","right")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","right")})}),f(this,ce).resetTemplate(),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$("colgroup col",l.currentTable).each((g,S)=>{g>=parseInt(b.dataset.col)&&S.setAttribute("fixed","right")})}),n){var d=t.closest(".ng-container-body")?-E.offsetWidth:0;$(".ng-container-left .col-indicator",f(this,ce).body).each((b,g)=>{d+=g.offsetWidth}),$(".ng-container-left",f(this,ce).body).css({width:d,"min-width":d})}if(s){var d=t.closest(".ng-container-body")?-E.offsetWidth:0;$(".ng-container-right .col-indicator",f(this,ce).body).each((g,S)=>{d+=S.offsetWidth}),$(".ng-container-right",f(this,ce).body).css({width:d,"min-width":d})}f(this,ce).refreshData()});it(this,"width",(E,t)=>{t=parseFloat(t);const l=f(this,ce).body.querySelector(`colgroup col[data-col="${E}"]`),c=!!l.closest(".ng-container-left"),o=!!l.closest(".ng-container-right"),r=!!l.closest(".ng-container-body"),n=c?"left":o?"right":"body";if(r)if(f(this,ce).getAttribute("auto-fit-col")=="true"){var s=0;$(".ng-container-body .col-indicator",f(this,ce).body).not(`[data-col=${E}]`).each((u,a)=>{s+=a.offsetWidth});const i=$(".ng-container-body",f(this,ce).body).width();$(".ng-container-body col",f(this,ce).body).each((u,a)=>{var h=parseInt(E==a.dataset.col?t:a.getAttribute("width"))*i/s;a.setAttribute("width",h)})}else l.setAttribute("width",t);else{var e=0;$(`.ng-container-${n} .col-indicator`,f(this,ce).body).not(`[data-col=${E}]`).each((i,u)=>{e+=parseInt(u.offsetWidth)}),$(`.ng-container-${n}`,f(this,ce).body).css({width:parseInt(e+t),"min-width":parseInt(e+t)}),l.setAttribute("width",t)}});tt(this,ce,E)}}ce=new WeakMap,si=new WeakMap,Lr=new WeakMap,Gi=new WeakMap,Io=new WeakMap,sh=new WeakMap;class id extends Ue.trace.constructor{constructor(){super(),this.init("nine-grid","green")}}const nu=new id;class nd extends Qs{constructor(){super();Y(this,ih,10);Y(this,Ki);Y(this,De);Y(this,nr);Y(this,No);Y(this,Os);Y(this,ii);Y(this,Zi);it(this,"dataRefresh",t=>{f(this,nr)&&(f(this,nh).call(this)?H.j.querySelectorAll(this).removeClass("invalid"):H.j.querySelectorAll(this).addClass("invalid")),f(this,Ki).innerHTML=this.getDisplayText()||"Select",t||this.reset()});Y(this,nh,()=>{if(H.isNull(this.value))return!0;var t=this.multi?this.value.split(this.multiSeparator):[this.value];for(var l of t){var c=f(this,nr).findIndex(o=>l==o[f(this,Os)]);if(c<0)return!1}return!0});Y(this,oh,()=>{if(this.owner){if(tt(this,De,this.owner.shadowRoot.querySelector("ng-combo-panel")),this.owner.shadowRoot.querySelectorAll("ng-combo-panel").length>1)throw"too many ng-combo-panel";var t=this.getAttribute("data-source");t&&this.owner&&this.owner.exprFunction}});Y(this,ah,t=>{if(console.log(f(this,nr)),!!f(this,nr)){console.log(f(this,nr)),f(this,De).col=this.cell.dataset.col,f(this,De).row=this.cell.closest("tr").sectionRowIndex,f(this,nr).length>f(this,ih)?H.j.querySelectorAll(f(this,De)).addClass("expand"):H.j.querySelectorAll(f(this,De)).removeClass("expand"),this.multi?H.j.querySelectorAll(f(this,De)).addClass("multi"):H.j.querySelectorAll(f(this,De)).removeClass("multi"),f(this,De).refresh(this,f(this,nr),f(this,Os),f(this,Zi));var l=$(".btn1",this.shadowRoot).offset().left-$(this.owner).offset().left;l+$(f(this,De)).width()>$(this.owner).width()&&(l=$(".btn2",this.shadowRoot).offset().left-$(this.owner).offset().left-$(f(this,De)).width()+8),l<0&&(l=0);var c=Math.min(f(this,nr).length,f(this,No))*26;this.multi?(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=2,c+=3,c+=25):(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=3);var o=$(".btn1",this.shadowRoot).offset().top+$(".btn1",this.shadowRoot).height()-$(this.owner).offset().top+3;o+c>$(this.owner).height()&&(o-=c+$(".btn1",this.shadowRoot).height()+6);var r=this.getAttribute("template");r&&console.error("logic error !!!!"),$(f(this,De)).css({left:l,top:o,height:c,"min-height":c}).show(),H.j.querySelectorAll(f(this,De)).hasClass("expand")&&$("div",f(this,De)).eq(0).find("input").focus().val("")}});Y(this,lh,t=>{t.target.closest("ng-combo-panel")||(f(this,De).row=f(this,De).col=-1,$(f(this,De)).hide())});Y(this,uu,()=>"a")}connectedCallback(){this.multi=this.getAttribute("multi")=="true",this.multiSeparator=this.getAttribute("multi-separator")||",",tt(this,No,this.getAttribute("rows")||5),tt(this,Os,this.getAttribute("code")||"code"),tt(this,ii,this.getAttribute("codename")||"codename"),tt(this,Zi,(this.getAttribute("items")||f(this,ii)||"").split(",")),f(this,Zi).unshift("CHK");var t=this.querySelector("datalist");t&&(tt(this,nr,[]),t.querySelectorAll("option").forEach(n=>{const s=n.getAttribute(f(this,Os)),e=n.getAttribute(f(this,ii));s&&e&&f(this,nr).push({[f(this,Os)]:s,[f(this,ii)]:e})})),this.shadowRoot.innerHTML=`
|
|
161
161
|
<style>
|
|
162
162
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngCombo.css";
|
|
163
163
|
${H.getCustomPath(this,"ngCombo.css")}
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
<button class="btn1" type="button" data-bs-toggle="dropdown" aria-expanded="false" tabindex="-1"></button>
|
|
167
167
|
<button class="btn2" tabindex="-1"></button>
|
|
168
|
-
`,super.connectedCallback();const l=this.closest("th,td"),c=this.getAttribute("data-source");c&&this.owner&&this.owner.exprFunction&&(this.owner[c]?tt(this,nr,this.owner[c]):tt(this,nr,this.owner.exprFunction(c).call(this,this.owner.data.get(this.cell.dataset.row),this.cell.dataset.row))),l&&l.dataset&&f(this,nr)&&!l.dataset.expr&&(l.dataset.expr="comboExpr()"),f(this,oh).call(this),f(this,De),tt(this,Ki,this.shadowRoot.querySelector(".btn1"));var o=this.closest("th,td").dataset.col,r=this.closest("tr").sectionRowIndex;$(this.cell).on("keydown",n=>{n.code=="Enter"&&$(f(this,Ki)).trigger("click")}),$("button",this.shadowRoot).on("click",n=>{f(this,De).row==r&&f(this,De).col==o?f(this,lh).call(this,n):f(this,ah).call(this,n)})}get dataSource(){return f(this,nr)}}ih=new WeakMap,Ki=new WeakMap,De=new WeakMap,nr=new WeakMap,No=new WeakMap,Os=new WeakMap,ii=new WeakMap,Zi=new WeakMap,nh=new WeakMap,oh=new WeakMap,ah=new WeakMap,lh=new WeakMap,
|
|
168
|
+
`,super.connectedCallback();const l=this.closest("th,td"),c=this.getAttribute("data-source");c&&this.owner&&this.owner.exprFunction&&(this.owner[c]?tt(this,nr,this.owner[c]):tt(this,nr,this.owner.exprFunction(c).call(this,this.owner.data.get(this.cell.dataset.row),this.cell.dataset.row))),l&&l.dataset&&f(this,nr)&&!l.dataset.expr&&(l.dataset.expr="comboExpr()"),f(this,oh).call(this),f(this,De),tt(this,Ki,this.shadowRoot.querySelector(".btn1"));var o=this.closest("th,td").dataset.col,r=this.closest("tr").sectionRowIndex;$(this.cell).on("keydown",n=>{n.code=="Enter"&&$(f(this,Ki)).trigger("click")}),$("button",this.shadowRoot).on("click",n=>{f(this,De).row==r&&f(this,De).col==o?f(this,lh).call(this,n):f(this,ah).call(this,n)})}get dataSource(){return f(this,nr)}}ih=new WeakMap,Ki=new WeakMap,De=new WeakMap,nr=new WeakMap,No=new WeakMap,Os=new WeakMap,ii=new WeakMap,Zi=new WeakMap,nh=new WeakMap,oh=new WeakMap,ah=new WeakMap,lh=new WeakMap,uu=new WeakMap;class od extends HTMLElement{constructor(){super();Y(this,Oo);Y(this,Be);Y(this,js);Y(this,ni);Y(this,Ji);Y(this,hh,()=>{$("input[type=checkbox]",this.shadowRoot).on("change",f(this,ch)),$("input[type=text]",this.shadowRoot).on("input",f(this,uh)),$("button#btnOk",this.shadowRoot).on("click",f(this,$o))});Y(this,jo,t=>{["TH","TD"].includes(t.target.tagName)&&["Enter"].includes(t.code)&&(f(this,Be).multi?f(this,$o).call(this,t):f(this,Qi).call(this,t))});Y(this,ch,t=>{var l=this.shadowRoot.querySelector("nine-grid"),c=l.fields.indexOf("CHK");l.data.getValidData().map(o=>{o.v[c]=$(t.target).prop("checked")?"Y":"N"}),l.refreshData()});Y(this,$o,t=>{var l=this.shadowRoot.querySelector("nine-grid"),c=l.data.getValidData();const o=l.fields.indexOf("CHK"),r=l.fields.indexOf(f(this,js));var n=[];c.forEach(e=>{e.v[o]=="Y"&&n.push(e.v[r])});var s=t.target.closest("th,td");$(s).blur(),f(this,Be).value=n.join(f(this,Be).multiSeparator),$(this).hide(),f(this,Be).getRootNode().host.cell.currentCell=f(this,Be).closest("th,td")});Y(this,Qi,t=>{if(t.target.tagName!="NG-CHECKBOX"&&(t.preventDefault(),t.stopPropagation()),!f(this,Be).multi){var l=this.shadowRoot.querySelector("nine-grid"),c=t.target.closest("th,td");$(c).blur(),f(this,Be).value=l.data.get(c.dataset.row)[f(this,js)],this.row=this.col=-1,$(this).hide(),f(this,Be).getRootNode().host.cell.currentCell=f(this,Be).closest("th,td")}});Y(this,du,t=>{t.preventDefault(),t.stopPropagation(),$(this).hide()});Y(this,uh,t=>{var l=this.shadowRoot.querySelector("nine-grid");H.j.querySelectorAll(l).addClass("loading");var c=l.data.getValidDataNF();c.map(r=>{r.__ng.filtered=!1});var o=$(t.target).val().toLowerCase();c.filter(r=>{for(var n of f(this,Ji)){if(n=="CHK")continue;const s=l.fields.indexOf(n);if((String(r.v[s])||"").toLowerCase().indexOf(o)>=0)return!1}return!0}).map(r=>{r.__ng.filtered=!0}),l.data.resetRecords(),l.data.count()==0&&H.j.querySelectorAll(l).removeClass("loading"),f(this,ni)&&(clearTimeout(f(this,ni)),tt(this,ni,null)),tt(this,ni,setTimeout(()=>{l.dataManager.viewRecords.reset()},200))});it(this,"refresh",(t,l,c,o)=>{var r=this.shadowRoot.querySelector("nine-grid");$(this.shadowRoot).find("input[type=text]").val(""),$("input[type=checkbox]",this).prop("checked",!0),tt(this,Ji,o),$(".ng-table tbody",r.body).off("click","th,td",f(this,Qi)),$(".ng-table tbody",r.body).on("click","th,td",f(this,Qi)),tt(this,Be,t),tt(this,js,c),$("th,td",r.template).each((i,u)=>{$(u).hide()}),$("thead th",r).each((i,u)=>{$(u).hide()}),o.forEach((i,u)=>{$(`[data-col=${u}]`,r.template).each((a,h)=>{h.dataset.bind=i,$(h).show()}),$(`[data-col=${u}]`,r.body).each((a,h)=>{h.dataset.bind=i,$(h).show()})});const n=["CHK"];if(l.length>0)for(const i in l[0])n.push(i);if(r.fields.add(n),r.data.set(l),f(this,dh).call(this,o),$(".ng-container-left",r.body).css({width:f(this,Be).multi?30:0,"min-width":f(this,Be).multi?30:0}),f(this,Be).multi){var s=f(this,Be).value.split(f(this,Be).multiSeparator);const i=r.fields.indexOf("CHK"),u=r.fields.indexOf(f(this,js));r.data.getValidData().forEach(a=>{a.v[i]=s.includes(a.v[u])?"Y":"N"}),r.row.at=0}else{var e=r.fields.indexOf(f(this,js));r.row.at=r.data.getValidData().findIndex(i=>f(this,Be).value==i.v[e])}setTimeout(()=>{$(`tbody.bindable tr[data-row="${r.row.at}"]`,r.shadowRoot).find("td").eq(0).focus()}),$(".ng-table tbody",r.body).off("keydown","th,td",f(this,jo)),$(".ng-table tbody",r.body).on("keydown","th,td",f(this,jo))});Y(this,dh,()=>{var t=this.shadowRoot.querySelector("nine-grid");$("col",t.body).each((o,r)=>{r.setAttribute("width","0")}),$("th",t.body).each((o,r)=>{$(r).html("")}),f(this,Ji).forEach((o,r)=>{t.setColumnWidthFit(r,30,!1)});var l=f(this,Be).getAttribute("template");l&&console.error("logic error !!!!");var c=16+(H.j.querySelectorAll(this).hasClass("expand"),0)+20;H.j.querySelectorAll(this).hasClass("multi")?$("col",t.body).each((o,r)=>{c+=parseInt(r.getAttribute("width"))}):$(".ng-container-body col",t.body).each((o,r)=>{c+=parseInt(r.getAttribute("width"))}),c<$(f(this,Be)).width()&&(c=$(f(this,Be)).width()-8),c>$(f(this,Be).closest("nine-grid")).width()&&(c=$(f(this,Be).closest("nine-grid")).width()),$(this).css({width:c,"min-width":c}),$(".ng-container-body .ng-table",t.body).css({left:0})});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Oo,this.getRootNode().host.closest("nine-grid"));const t=f(this,Oo).getAttribute("css-path")||"";this.shadowRoot.innerHTML=`
|
|
169
169
|
<style>
|
|
170
170
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngComboPanel.css";
|
|
171
171
|
${H.getCustomPath(this,"ngComboPanel.css")}
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
<input id="chkAll" type="checkbox" checked><label for="chkAll">Select All</label>
|
|
213
213
|
<button id="btnOk">OK</button>
|
|
214
214
|
</div>
|
|
215
|
-
`,f(this,hh).call(this)}}Oo=new WeakMap,Be=new WeakMap,js=new WeakMap,ni=new WeakMap,Ji=new WeakMap,hh=new WeakMap,jo=new WeakMap,ch=new WeakMap,$o=new WeakMap,Qi=new WeakMap,
|
|
215
|
+
`,f(this,hh).call(this)}}Oo=new WeakMap,Be=new WeakMap,js=new WeakMap,ni=new WeakMap,Ji=new WeakMap,hh=new WeakMap,jo=new WeakMap,ch=new WeakMap,$o=new WeakMap,Qi=new WeakMap,du=new WeakMap,uh=new WeakMap,dh=new WeakMap,customElements.get("ng-combo")||customElements.define("ng-combo",nd),customElements.get("ng-combo-panel")||customElements.define("ng-combo-panel",od);class ad{constructor(E){Y(this,tn);Y(this,Lo);Y(this,en);Y(this,oi);Y(this,rn);Y(this,Gr);it(this,"openMenu",(E,t)=>{var l=$(f(this,Gr)).css("font"),c=150;for(const o of f(this,en))c=Math.max(c,H.measureTextSize(o.name,l).width+60);$(f(this,Gr)).css({width:c,top:t,left:E}),f(this,Gr).open(),f(this,oi)&&f(this,oi).show&&f(this,oi).show.call(this,{source:f(this,Lo)})});Y(this,fh,E=>{tt(this,en,f(this,Po).call(this,E.items,0)),tt(this,oi,E.events),tt(this,Gr,$(`<ng-context-menu-panel id="${E.id}"></ng-context-menu-panel>`)[0]),$(f(this,tn).shadowRoot).append($(f(this,Gr)).hide()),f(this,Gr).init(f(this,en)),$("li",f(this,Gr)).on("mousedown",t=>{E.callback&&(t.menuId=t.currentTarget.getAttribute("menu-id"),t.source=f(this,Lo),E.callback(t)),$("ng-context-menu-panel",f(this,tn).shadowRoot).hide()})});Y(this,Po,(E,t)=>{tt(this,rn,Math.max(t,f(this,rn))+1),E=f(this,ph).call(this,E);for(const l of E)l.level=t,l.hasOwnProperty("items")&&(l.items=f(this,Po).call(this,l.items,t+1));return E});Y(this,ph,E=>{if(Array.isArray(E))return E;var t=[];for(const c in E){var l=E[c];l.menuId=c,t.push(l)}return t});tt(this,rn,0),tt(this,tn,E.owner),f(this,fh).call(this,E)}}tn=new WeakMap,Lo=new WeakMap,en=new WeakMap,oi=new WeakMap,rn=new WeakMap,Gr=new WeakMap,fh=new WeakMap,Po=new WeakMap,ph=new WeakMap;class ld extends HTMLElement{constructor(){super();it(this,"init",t=>{var l=$("ul",this);$("li",l).remove(),f(this,Do).call(this,l,t),$("li",this).on("mouseover",f(this,mh)),$("li",this).on("mouseout",c=>{H.j.querySelectorAll(c.currentTarget).removeClass("visible")})});it(this,"open",()=>{$(this).show()});Y(this,Do,(t,l)=>{for(const n of l){var c=(n.hasOwnProperty("className")?n.className:"")+(n.hasOwnProperty("items")?" submenu":""),o=$(`<li menu-id='${n.menuId}' id="${n.name}" class="${c.trim()}"><span>${n.name}</span></li>`);if(t.append(o),n.hasOwnProperty("items")){var r=$("<ul></ul>");o.append(r),f(this,Do).call(this,r,n.items)}}});Y(this,mh,t=>{H.j.querySelectorAll(t.currentTarget).addClass("visible");var l=$(this).css("font"),c=150;$("ul > li:visible > span",t.currentTarget).each((o,r)=>{c=Math.max(c,H.measureTextSize($(r).text(),l).width+60)}),$("ul",t.currentTarget).eq(0).css({width:c,top:-9,left:$(t.currentTarget.closest("ul")).width()-8,"z-index":Number($(this).css("z-index"))+1})})}connectedCallback(){this.innerHTML="<ul></ul>"}}Do=new WeakMap,mh=new WeakMap,customElements.get("ng-context-menu-panel")||customElements.define("ng-context-menu-panel",ld);class hd{constructor(E){Y(this,zr);Y(this,Bo,()=>{$(".ng-table tbody",f(this,zr).shadowRoot).on("click","th,td",f(this,gh)),$(".ng-table thead",f(this,zr).shadowRoot).on("click","th,td",f(this,bh)),$(".ng-table tfoot",f(this,zr).shadowRoot).on("click","th,td",f(this,yh))});Y(this,gh,E=>{if(![1,2].includes(E.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=E.target.closest("th,td"),c=E.detail==1?H.EVENT.CELL_CLICK:H.EVENT.CELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,o.row=l.dataset.row,o.subrow=parseInt(l.dataset.matrixRow)%parseInt(l.dataset.row),o.bind=l.dataset.bind,H.copyProperty(o,E,t),f(this,zr).dispatchEvent(o)});Y(this,bh,E=>{if(![1,2].includes(E.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=E.target.closest("th,td"),c=E.detail==1?H.EVENT.HEADCELL_CLICK:H.EVENT.HEADCELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,H.copyProperty(o,E,t),f(this,zr).dispatchEvent(o)});Y(this,yh,E=>{if(![1,2].includes(E.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=E.target.closest("th,td"),c=E.detail==1?H.EVENT.FOOTCELL_CLICK:H.EVENT.FOOTCELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,H.copyProperty(o,E,t),f(this,zr).dispatchEvent(o)});tt(this,zr,E),f(this,Bo).call(this),f(this,zr).addEventListener(H.EVENT.LAYOUT_CHANGED,t=>{f(this,Bo).call(this)})}}zr=new WeakMap,Bo=new WeakMap,gh=new WeakMap,bh=new WeakMap,yh=new WeakMap;class cd{constructor(E){Y(this,Kr);Y(this,Fo);Y(this,cs);it(this,"count",()=>f(this,Kr).rawRecords.length);it(this,"has",E=>f(this,Kr).data.filter(E).length>0);it(this,"first",E=>(f(this,Kr).data.first(E).__ng||{rowidx:-1}).rowidx);it(this,"last",E=>(f(this,Kr).data.last(E).__ng||{rowidx:-1}).rowidx);tt(this,Kr,E),tt(this,Fo,-1),tt(this,cs,-1)}get at(){return f(this,cs)}set at(E){tt(this,Fo,f(this,cs)),tt(this,cs,parseInt(E)),f(this,Kr).owner.body.querySelector(`tbody.bindable tr[data-row="${f(this,cs)}"]`)||setTimeout(()=>{f(this,Kr).owner.scrollTo_V1(f(this,cs))})}}Kr=new WeakMap,Fo=new WeakMap,cs=new WeakMap;class ud{constructor(E,t){Y(this,Ve);Y(this,Ft);Y(this,Pe);Y(this,Tr);Y(this,ai);Y(this,$s);it(this,"initialize",()=>{tt(this,$s,[]),$(f(this,Ve).template).each((E,t)=>{f(this,$s).push($(t).height())}),(f(this,Ft).rawRecords||[]).forEach(E=>{E.__ng.height=f(this,$s).slice()})});it(this,"set",E=>{this.clear(),this.add(E,!1)});it(this,"assign",E=>{this.source=E;for(var t=0;t<E.length;t++)f(this,Pe)[t].__ng._[H.ROW.ID]=E[t].__ng._[H.ROW.ID],tt(this,ai,Math.max(f(this,ai),E[t].__ng.rowid))});it(this,"getId",E=>E.__ng._[H.ROW.ID]);it(this,"reset",()=>{tt(this,Pe,[]),tt(this,Tr,[])});it(this,"refresh",()=>{f(this,Ft).viewRecords.reset()});it(this,"clearFilter",()=>(f(this,Ft).rawRecords.map(E=>{E.__ng.filtered=!1}),tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng.filtered)),f(this,Pe)));it(this,"refreshFilter",()=>(tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng.filtered)),f(this,nn).call(this),f(this,Pe)));it(this,"setFilter",E=>{f(this,Ve).filtering.on();let t={};if(Array.isArray(E))for(let c in E[0])console.log(`::::::${c}::::::`),t[c]=Array.from(new Set(E.map(o=>o[c])));else t=E;this.clearFilter();for(let c in t){const o=t[c],r=f(this,Ft).owner.fields.indexOf(c);let n=!1;for(let s of this.getValidData())if(s.v[r]!=null){n=typeof s.v[r]=="number";break}if(n)for(var l=0;l<o.length;l++)o[l]=Number(o[l]);this.getValidData().filter(s=>o.nineBinarySearch(s.v[r]||"")<0).map(s=>{s.__ng.filtered=!0})}this.refreshFilter(),f(this,Ve).shadowRoot.querySelectorAll("ng-filter-button").forEach(c=>{c.filterOptions.forEach(o=>{o.data=[]})}),Object.entries(t).forEach(([c,o])=>{f(this,Ve).shadowRoot.querySelectorAll("ng-filter-button").forEach(r=>{let n=r.filterOptions;n.forEach(s=>{s.colnm===c&&(s.data=o)}),r.filterOptions=n})}),f(this,Ft).owner.scrollTo_V1(0),f(this,Ft).owner.paging.reset()});it(this,"indexOf",E=>f(this,sn).call(this,this.recordsNF(),E,this.records()));Y(this,sn,(E,t,l)=>{const c=E[t];return l.findIndex(o=>o.__ng._[H.ROW.ID]==c.__ng._[H.ROW.ID])});it(this,"moveRow",(E,t)=>{E!=t&&(H.move(f(this,Ft).rawRecords,this.total.indexOf(E),this.total.indexOf(t)),this.resetRecords(),f(this,Ft).owner.dataManager.viewRecords.reset())});it(this,"filter",E=>f(this,Pe).filter(E));it(this,"max",(E,t)=>{var l=(t?this.filter(t):f(this,Ft).rawRecords).map(c=>c[E]);return l&&l.length>0?l.reduce((c,o)=>c>o?c:o):null});it(this,"min",(E,t)=>{var l=(t?this.filter(t):f(this,Ft).rawRecords).map(c=>c[E]);return l&&l.length>0?l.reduce((c,o)=>c>o?o:c):null});it(this,"first",E=>this.filter(E).first());it(this,"last",E=>this.filter(E).last());it(this,"count",()=>this.getValidData().length);it(this,"countNF",()=>this.getValidDataNF().length);it(this,"onRowStateChanged",()=>{const E=this.getChangedData(),t=$("tbody td[data-bind=rowState]",f(this,Ft).owner.body);if(t.length<=0)return;const l=t.eq(0)[0].dataset.col,c=H.j.querySelectorAll(`thead th[data-col="${l}"]:not(.col-indicator)`,f(this,Ft).owner.body);c.removeClass("deleted").removeClass("added").removeClass("updated"),E.delete.length>0?c.addClass("deleted"):E.insert.length>0?c.addClass("added"):E.update.length>0&&c.addClass("updated"),f(this,Ft).owner.paging.refreshTotal()});Y(this,qo,E=>(Array.isArray(E)||(E=[E]),E.forEach((t,l)=>{t.__ng=this.default,t.__ng.rowid=this.nextId,t.__ng.rowState=H.ROW_STATE.INSERT,t.__ng._[H.ROW.ID]=t.__ng.rowid}),this.onRowStateChanged(),E));it(this,"sort",E=>{f(this,Ft).rawRecords.sort(E),f(this,Tr).sort(E),f(this,Pe).sort(E),f(this,nn).call(this),f(this,Ft).owner.refresh()});Y(this,nn,()=>{f(this,Ft).rawRecords.forEach((t,l)=>{t.__ng._[H.ROW.INDEX]=l}),f(this,Ft).rawRecords.filter(t=>!t.__ng.deleted&&!t.__ng.filtered&&t.__ng.visible).forEach((t,l)=>{t.__ng._[H.ROW.ORDER]=l+1});const E=f(this,Ft).rawRecords.filter(t=>!t.__ng.deleted&&t.__ng._[H.ROW.PIN]);E.forEach((t,l)=>{t.__ng._[H.ROW.VISIBLE_ROW]=(E.length-l)*-1}),f(this,Pe).forEach((t,l)=>{t.__ng._[H.ROW.VISIBLE_ROW]=l});//!m.__ng.deleted && !m.__ng.pin && !m.__ng._[ninegrid.ROW.PIN] && !m.__ng.filtered && m.__ng.visible && m.__ng.paging;
|
|
216
216
|
});it(this,"resetIndex",()=>{f(this,Ft).rawRecords.forEach((E,t)=>{E.__ng.ii=t,E.__ng.rowidx=t,E.__ng.rowidx1=t}),this.getValidData().forEach((E,t)=>{E.__ng.i=t,E.__ng.rowidx=t}),f(this,nn).call(this)});it(this,"resetRecords",()=>{tt(this,Tr,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted)),tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng._[H.ROW.PIN]&&!E.__ng._[H.ROW.COLLAPSE]&&!E.__ng.filtered&&E.__ng.visible&&E.__ng.paging)),this.resetIndex()});Y(this,Ho,E=>{Array.isArray(E)||(E=[E]);var t=[];return E.forEach(l=>{var c={v:[]};for(const o of f(this,Ve).fields.get())c.v.push(H.nvl(l[o],""));t.push(c)}),t});it(this,"exprFunction",E=>{let t="...args",l="let [data, currow] = args; currow = Number(currow); return "+E+";";return new Function(t,l)});it(this,"__ng",E=>{var t=this.getValidData();if(t.length==0)return null;try{return t[E].__ng}catch(l){console.error(l,t,E)}});it(this,"getValidData",()=>(f(this,Pe).length==0&&tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng._[H.ROW.PIN]&&!E.__ng._[H.ROW.COLLAPSE]&&E.__ng._[H.ROW.VISIBLE]&&!E.__ng.filtered&&E.__ng.visible&&E.__ng.paging)),f(this,Pe)));it(this,"getValidDataNF",()=>(f(this,Tr).length==0&&tt(this,Tr,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted)),f(this,Tr)));it(this,"conv",E=>{if(H.isNull(E))return E;if(Array.isArray(E)){var t=[];for(const r of E){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=E,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"conv2",E=>{if(H.isNull(E))return E;if(Array.isArray(E)){var t=[];for(const r of E){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=E,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"changeRowState",(E,t,l)=>{const c=o=>{[H.ROW_STATE.EMPTY,H.ROW_STATE.NORMAL].includes(E)&&(o.__ng.o={}),o.__ng.rowState=E};E||(E=H.ROW_STATE.EMPTY),!t&&!l&&(t=0,l=this.count()-1),t||(t=0),l||(l=t),l>=this.count()&&(l=this.count()-1),f(this,Pe).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),f(this,Tr).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.getValidDataNF().forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.onRowStateChanged(),f(this,Ft).viewRecords.reset()});it(this,"getCheckedData",E=>this.get().filter(t=>t.__ng.c[E]==!0));it(this,"search",(E,t)=>this.get().filter(l=>l[E]==t));Y(this,zo,(E,t,l,c)=>{if(l==c)return;const o=new CustomEvent(H.EVENT.DATA_CHANGED,{bubbles:!0,detail:{}});o.row=E,o.bind=t,o.oldvalue=l,o.value=c,o.data=this.get(E),f(this,Ft).owner.dispatchEvent(o)});it(this,"add",(E,t)=>{E==null&&(E={}),t==null&&(t=!0);const l=f(this,Ho).call(this,E);f(this,Ft).rawRecords=f(this,Ft).rawRecords.concat(f(this,qo).call(this,l));const c=f(this,Ft).rawRecords.map(r=>r.__ng._[H.ROW.ORIGIN_ORDER]);if(c.length>0){const r=c.reduce(function(n,s){return n>s?n:s});f(this,Ft).rawRecords.forEach((n,s)=>{n.__ng._[H.ROW.ORIGIN_ORDER]<0&&(n.__ng._[H.ROW.ORIGIN_ORDER]=r+1+s)})}this.resetRecords();const o=this.count()-1;return t||this.changeRowState(H.ROW_STATE.EMPTY,o-l.length+1,o),f(this,Ft).viewRecords.reset(),o});it(this,"insert",(E,t,l)=>{E==null&&(E={}),t==null&&(t=0),l==null&&(l=!0);var c=f(this,Ho).call(this,E);const o=f(this,Ft).rawRecords[t].__ng._[H.ROW.ORIGIN_ORDER];return f(this,Ft).rawRecords.filter(r=>r.__ng._[H.ROW.ORIGIN_ORDER]>=o).forEach(r=>{r.__ng._[H.ROW.ORIGIN_ORDER]+=c.length}),c=f(this,qo).call(this,c),c.forEach((r,n)=>{r.__ng._[H.ROW.ORIGIN_ORDER]=o+n}),f(this,Ft).rawRecords.splice(t,0,...c),this.resetRecords(),l||this.changeRowState(H.ROW_STATE.EMPTY,t,t+c.length-1),f(this,Ft).viewRecords.reset(),t});Y(this,vh,E=>{var t=!1;E.sort((l,c)=>c-l).forEach(l=>{f(this,Pe)[l].__ng.rowState==H.ROW_STATE.INSERT?H.removeIf(f(this,Ft).rawRecords,c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid):(f(this,Ft).rawRecords.filter(c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid).map(c=>{c.__ng.deleted=!0,c.__ng.rowState=H.ROW_STATE.DELETE}),t=!0)}),t&&this.onRowStateChanged(),tt(this,Pe,f(this,Ft).rawRecords.filter(l=>!l.__ng.deleted&&!l.__ng.filtered)),tt(this,Tr,f(this,Ft).rawRecords.filter(l=>!l.__ng.deleted)),this.getValidDataNF().forEach((l,c)=>{l.__ng.rowidx=c}),this.getValidData().forEach((l,c)=>{l.__ng.rowidx=c}),f(this,Ft).viewRecords.reset()});it(this,"delete",E=>{var t=[];if(Array.isArray(E))t=E;else if(typeof E>"u"){if(f(this,Ft).owner.row.at<0)throw`invalid ${f(this,Ft).owner.row.at}`;t=[f(this,Ft).owner.row.at]}else if(typeof E=="number"||typeof E=="string")t=[E];else if(typeof E=="object"){const l=f(this,Pe).findIndex(c=>c.__ng._[H.ROW.ID]==E.__ng._[H.ROW.ID]);if(l<0)throw new Error(`${E.__ng._[H.ROW.ID]} not found.`);t=[l]}else throw`invalid ${E}`;f(this,vh).call(this,t)});it(this,"deleteFromId",E=>{var t=this.records();const l=t.findIndex(c=>c.__ng._[H.ROW.ID]==E);if(l<0)throw new Error(`${E} not found.`);this.delete(l)});Y(this,Uo,(E,t,l)=>{if(typeof l>"u")l=E.findIndex(e=>e.__ng._[H.ROW.ID]==t.__ng._[H.ROW.ID]);else if(typeof l=="number"||typeof l=="string")l=parseInt(l);else throw`invalid ${l}`;var c=E[l],o=!1;for(const e in t)if(!["__ng","rowState"].includes(e)){var r=f(this,Ve).fields.indexOf(e);if(!(r<0)){var n=c.v[r],s=t[e];c.v[r]=s,n!=s&&(c.__ng.rowState=H.ROW_STATE.UPDATE,o=!0,f(this,zo).call(this,l,e,n,s))}}o&&this.onRowStateChanged(),f(this,Ft).owner.refreshData()});it(this,"update",(E,t)=>{f(this,Uo).call(this,f(this,Pe),E,t)});it(this,"setValue",(E,t,l,c)=>{f(this,Vo).call(this,E,t,l,c,!1)});it(this,"setValueNF",(E,t,l,c)=>{f(this,Vo).call(this,E,t,l,c,!0)});Y(this,Vo,(E,t,l,c,o)=>{E=parseInt(E),c==null&&(c=!0);const r=f(this,Ve).fields.indexOf(t);if(!(r<0)){var n=o?this.getValidDataNF()[E]:this.getValidData()[E],s=n.v[r];n.v[r]!=l&&n.__ng.rowState!=H.ROW_STATE.INSERT&&(n.__ng.o.hasOwnProperty(t)||(n.__ng.o[t]=s),c&&(n.__ng.rowState=H.ROW_STATE.UPDATE,this.onRowStateChanged())),n.v[r]=l,f(this,Ft).owner.refreshData(E),f(this,zo).call(this,E,t,s,l)}});it(this,"setRecord",(E,t,l,c)=>{f(this,on).call(this,this.getValidData(),E,t,l,c,!1)});it(this,"setRecordNF",(E,t,l,c)=>{f(this,on).call(this,this.getValidDataNF(),E,t,l,c,!0)});Y(this,on,(E,t,l,c,o)=>{t=parseInt(t),l=parseInt(l),o==null&&(o=!0);var r=E[t];r.v[l],r.v[l]!=c&&r.__ng.rowState!=H.ROW_STATE.INSERT&&o&&(r.__ng.rowState=H.ROW_STATE.UPDATE),r.v[l]=c});it(this,"getChangedData",E=>E?this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==E)):{insert:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT)),update:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.UPDATE)),delete:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.DELETE))});it(this,"isChanged",()=>f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT||t.__ng.rowState==H.ROW_STATE.UPDATE||t.__ng.rowState==H.ROW_STATE.DELETE).length>0);Y(this,an,(E,t,l)=>{if(!(!E||E.length<=0)){if(H.isNull(t))return this.conv2(E);if(t<0||t>=E.length)throw`invalid row : ${t}`;if(l!=null){var c=f(this,Ve).fields.indexOf(l);return c>=0?E[t].v[c]:null}var o=t==null?E:E[t];return this.conv(o)}});it(this,"get",(E,t)=>f(this,an).call(this,this.getValidData(),E,t));it(this,"getNF",(E,t)=>f(this,an).call(this,this.getValidDataNF(),E,t));it(this,"records",E=>H.isNull(E)?this.getValidData():this.getValidData(E));it(this,"recordsNF",E=>H.isNull(E)?this.getValidDataNF():this.getValidDataNF(E));it(this,"getRow",E=>this.getValidData()[E]);it(this,"getRowNF",E=>this.getValidDataNF()[E]);Y(this,Wo,(E,t)=>{var l=f(this,Ve).fields.indexOf(t);return l<0?[]:E.map(c=>c.v[l])});it(this,"getMap",E=>f(this,Wo).call(this,this.getValidData(),E));it(this,"getMapNF",E=>f(this,Wo).call(this,this.getValidDataNF(),E));it(this,"findIndex",E=>f(this,Xo).call(this,this.getValidData(),E));it(this,"findIndexNF",E=>f(this,Xo).call(this,this.getValidDataNF(),E));Y(this,Xo,function(E,t){return this.conv2(E).findIndex(t)});it(this,"findIndex_1",E=>f(this,Yo).call(this,this.getValidData(),E));it(this,"findIndexNF_1",E=>f(this,Yo).call(this,this.getValidDataNF(),E));Y(this,Yo,function(E,t){let l=0,c=E.length-1,o;for(;l<=c;){if(o=parseInt((l+c)/2),t===E[o].__ng._[H.ROW.INDEX])return o;t<E[o].__ng._[H.ROW.INDEX]?c=o-1:l=o+1}return-1});tt(this,Ve,E),tt(this,Ft,t),tt(this,Pe,[]),tt(this,Tr,[]),tt(this,ai,0),this.all={get:(l,c)=>f(this,an).call(this,this.recordsNF(),l,c),records:l=>this.recordsNF(l),count:()=>this.recordsNF().length,setRecord:(l,c,o,r)=>f(this,on).call(this,this.all.records(),l,c,o,r),indexOf:l=>f(this,sn).call(this,this.records(),l,this.recordsNF()),update:(l,c)=>f(this,Uo).call(this,this.records(),l,c)},this.total={indexOf:l=>f(this,sn).call(this,this.records(),l,f(this,Ft).rawRecords)},this.initialize()}get source(){return this.conv2(f(this,Ft).rawRecords)}set source(E){this.clear(),this.add(E,!1)}get nextId(){return++Iu(this,ai)._}get default(){return{rowState:H.ROW_STATE.EMPTY,deleted:!1,filtered:!1,pin:!1,expand:!0,visible:!0,paging:!0,height:f(this,$s).slice(),o:{},c:{},_:[0,0,0,0,H.ROW_STATE.EMPTY,!1,!1,!0,!1,!0,!0,!1,f(this,$s).slice(),-1,{},{}]}}clear(){delete f(this,Ft).rawRecords,tt(this,Pe,[]),tt(this,Tr,[]),f(this,Ft).rawRecords=[],f(this,Ft).viewRecords.reset()}}Ve=new WeakMap,Ft=new WeakMap,Pe=new WeakMap,Tr=new WeakMap,ai=new WeakMap,$s=new WeakMap,sn=new WeakMap,qo=new WeakMap,nn=new WeakMap,Ho=new WeakMap,zo=new WeakMap,vh=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,on=new WeakMap,an=new WeakMap,Wo=new WeakMap,Xo=new WeakMap,Yo=new WeakMap;class dd{constructor(E){this.owner=E,this.row=new cd(this),this.data=new ud(E,this),this.setDataSource=l=>{this.data&&this.data.reset(),this.pageCnt=25,this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.viewRecords.touch=()=>{this.viewRecords.updateCnt=(this.viewRecords.updateCnt||0)+1},this.viewRecords.rawIndex=0,this.viewRecords.setPageCnt=c=>{this.pageCnt=c},this.viewRecords.reset=()=>{this.owner.view&&this.owner.view.redraw()},this.viewRecords.resetV2=()=>{this.owner.view.redrawV2()},this.data.set(l)},this.getRowState=c=>{var c=parseInt(c);if(!(c>=this.data.count()))return this.data.__ng(c).rowState},this.getRowPosition=()=>this.row.at,this.setRowPosition=l=>{this.row.at=l},this.pageUp=()=>{if(!this.owner.isFirstPage){var l=$(".ng-container-body",this.owner.body).height()-($(".ng-container-body thead",this.owner.body).height()||0)-($(".ng-container-body tfoot",this.owner.body).height()||0);l-=$(".ng-container-body tbody.fixed",this.owner.body).height();for(var c=0,o=this.viewRecords.rawIndex;c<l;){o--;for(var r=0;r<this.owner.template.length;r++){var n=parseInt(o*this.owner.template.length+r);c+=this.owner.matrix.getHeight(n)}}return this.scrollTo_V1(o+1)}},this.pageDown=()=>{if(this.owner.isLastPage||!$("ng-vscrollbar",this.owner.body).is(":visible"))return;const l=parseInt(Array.from(this.owner.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)")).pop().dataset.row);return this.scrollTo_V1(l)},this.scrollTo_V1=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.reset(),!(l<=0||l>=this.rawRecords.length-1)),this.scrollToV2=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.resetV2(),!(l<=0||l>=this.rawRecords.length-1)),this.exprFunction=l=>{l=l.replaceAll("ninegrid.ROW.ORDER",H.ROW.ORDER);let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.exprFunction2=l=>{this.owner.fields.get().forEach(r=>{const n=this.owner.fields.indexOf(r);l=l.replaceAll(`data.${r}`,`data.v[${n}]`)});let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.getColumn=(l,c)=>this.data.get(l,c),this.setColumn=(l,c,o)=>{l=parseInt(l),this.data.get(l)[c]!=o&&this.data.get(l).__ng.rowState!=H.ROW_STATE.INSERT&&(this.data.get(l).__ng.rowState=H.ROW_STATE.UPDATE,this.data.onRowStateChanged()),this.setColumnSilent(l,c,o)},this.setColumnSilent=(l,c,o)=>{this.data.set(l,c,o)},this.setDataSource([]);for(var t in this.row)["first","last","count","add","insert","move","delete"].includes(t)||(this.data[t]=this.row[t])}}class fd extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const E=this.getAttribute("type")||"sphere",t=this.getAttribute("size")||this.getAttribute("width")||this.getAttribute("height")||"8",l=this.getAttribute("width")||this.getAttribute("size")||"8",c=this.getAttribute("height")||this.getAttribute("size")||"8",o=this.getAttribute("color")||"gray";var r="";switch(E){case"sphere":r=`<div class="ng-expand-icon-sphere" style="width: ${t}px; height: ${t}px; background: radial-gradient(circle farthest-corner at 33% 33%, white 0%, ${o} 80%), radial-gradient(circle farthest-corner at 45% 45%, rgba(0, 0, 0, 0) 50%, #000000 80%);" />`;break;case"circle":var n=Number(t)/2,s=this.getAttribute("stroke")||"#666",e=Number(this.getAttribute("stroke-width")||0),i=n+e,u=n+e;r=`
|
|
217
217
|
<svg class="ng-expand-icon-circle" viewBox="0 0 ${t} ${t}" width="${t}" height="${t}" xmlns="http://www.w3.org/2000/svg">
|
|
218
218
|
<circle fill="${o}" stroke="${s}" stroke-width="${e}" cx="${i}" cy="${u}" r="${n}"/>
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
</style>
|
|
254
254
|
|
|
255
255
|
<button>...</button>
|
|
256
|
-
`}}customElements.get("ng-expand-icon")||customElements.define("ng-expand-icon",fd),customElements.get("ng-expand-check")||customElements.define("ng-expand-check",pd),customElements.get("ng-expand-button")||customElements.define("ng-expand-button",md);var pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gd(vt){return vt&&vt.__esModule&&Object.prototype.hasOwnProperty.call(vt,"default")?vt.default:vt}function Pl(vt){throw new Error('Could not dynamically require "'+vt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var nu={exports:{}};/*! ExcelJS 19-10-2023 */var Cu;function bd(){return Cu||(Cu=1,(function(vt,E){(function(t){vt.exports=t()})((function(){return(function t(l,c,o){function r(e,i){if(!c[e]){if(!l[e]){var u=typeof Pl=="function"&&Pl;if(!i&&u)return u(e,!0);if(n)return n(e,!0);var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}var h=c[e]={exports:{}};l[e][0].call(h.exports,(function(p){return r(l[e][1][p]||p)}),h,h.exports,t,l,c,o)}return c[e].exports}for(var n=typeof Pl=="function"&&Pl,s=0;s<o.length;s++)r(o[s]);return r})({1:[function(t,l,c){const o=t("fs"),r=t("fast-csv"),n=t("dayjs/plugin/customParseFormat"),s=t("dayjs/plugin/utc"),e=t("dayjs").extend(n).extend(s),i=t("../utils/stream-buf"),{fs:{exists:u}}=t("../utils/utils"),a={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};l.exports=class{constructor(h){this.workbook=h,this.worksheet=null}async readFile(h,p){if(p=p||{},!await u(h))throw new Error("File not found: "+h);const m=o.createReadStream(h),d=await this.read(m,p);return m.close(),d}read(h,p){return p=p||{},new Promise((m,d)=>{const b=this.workbook.addWorksheet(p.sheetName),g=p.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],S=p.map||function(I){if(I==="")return null;const D=Number(I);if(!Number.isNaN(D)&&D!==1/0)return D;const z=g.reduce((B,F)=>{if(B)return B;const W=e(I,F,!0);return W.isValid()?W:null},null);if(z)return new Date(z.valueOf());const P=a[I];return P!==void 0?P:I},C=r.parse(p.parserOptions).on("data",I=>{b.addRow(I.map(S))}).on("end",()=>{C.emit("worksheet",b)});C.on("worksheet",m).on("error",d),h.pipe(C)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(h,p){return new Promise((m,d)=>{p=p||{};const b=this.workbook.getWorksheet(p.sheetName||p.sheetId),g=r.format(p.formatterOptions);h.on("finish",()=>{m()}),g.on("error",d),g.pipe(h);const{dateFormat:S,dateUTC:C}=p,I=p.map||(P=>{if(P){if(P.text||P.hyperlink)return P.hyperlink||P.text||"";if(P.formula||P.result)return P.result||"";if(P instanceof Date)return S?C?e.utc(P).format(S):e(P).format(S):C?e.utc(P).format():e(P).format();if(P.error)return P.error;if(typeof P=="object")return JSON.stringify(P)}return P}),D=p.includeEmptyRows===void 0||p.includeEmptyRows;let z=1;b&&b.eachRow((P,B)=>{if(D)for(;z++<B-1;)g.write([]);const{values:F}=P;F.shift(),g.write(F.map(I)),z=B}),g.end()})}writeFile(h,p){const m={encoding:(p=p||{}).encoding||"utf8"},d=o.createWriteStream(h,m);return this.write(d,p)}async writeBuffer(h){const p=new i;return await this.write(p,h),p.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(t,l,c){const o=t("../utils/col-cache");class r{constructor(s,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=s,e)if(typeof e=="string"){const u=o.decodeAddress(e);this.nativeCol=u.col+i,this.nativeColOff=0,this.nativeRow=u.row+i,this.nativeRowOff=0}else e.nativeCol!==void 0?(this.nativeCol=e.nativeCol||0,this.nativeColOff=e.nativeColOff||0,this.nativeRow=e.nativeRow||0,this.nativeRowOff=e.nativeRowOff||0):e.col!==void 0?(this.col=e.col+i,this.row=e.row+i):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(s){return s instanceof r||s==null?s:new r(s)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(s){this.nativeCol=Math.floor(s),this.nativeColOff=Math.floor((s-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(s){this.nativeRow=Math.floor(s),this.nativeRowOff=Math.floor((s-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(s){this.nativeCol=s.nativeCol,this.nativeColOff=s.nativeColOff,this.nativeRow=s.nativeRow,this.nativeRowOff=s.nativeRowOff}}l.exports=r},{"../utils/col-cache":19}],3:[function(t,l,c){const o=t("../utils/col-cache"),r=t("../utils/under-dash"),n=t("./enums"),{slideFormula:s}=t("../utils/shared-formula"),e=t("./note");class i{constructor(h,p,m){if(!h||!p)throw new Error("A Cell needs a Row");this._row=h,this._column=p,o.validateAddress(m),this._address=m,this._value=u.create(i.Types.Null,this),this.style=this._mergeStyle(h.style,p.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(h){this.style.numFmt=h}get font(){return this.style.font}set font(h){this.style.font=h}get alignment(){return this.style.alignment}set alignment(h){this.style.alignment=h}get border(){return this.style.border}set border(h){this.style.border=h}get fill(){return this.style.fill}set fill(h){this.style.fill=h}get protection(){return this.style.protection}set protection(h){this.style.protection=h}_mergeStyle(h,p,m){const d=h&&h.numFmt||p&&p.numFmt;d&&(m.numFmt=d);const b=h&&h.font||p&&p.font;b&&(m.font=b);const g=h&&h.alignment||p&&p.alignment;g&&(m.alignment=g);const S=h&&h.border||p&&p.border;S&&(m.border=S);const C=h&&h.fill||p&&p.fill;C&&(m.fill=C);const I=h&&h.protection||p&&p.protection;return I&&(m.protection=I),m}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===i.Types.Merge}merge(h,p){this._value.release(),this._value=u.create(i.Types.Merge,this,h),p||(this.style=h.style)}unmerge(){this.type===i.Types.Merge&&(this._value.release(),this._value=u.create(i.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(h){return this._value.type===i.Types.Merge&&this._value.isMergedTo(h)}get master(){return this.type===i.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===i.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(h){this.type!==i.Types.Merge?(this._value.release(),this._value=u.create(u.getType(h),this,h)):this._value.master.value=h}get note(){return this._comment&&this._comment.note}set note(h){this._comment=new e(h)}get text(){return this._value.toString()}get html(){return r.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(h){this.type===i.Types.String&&(this._value=u.create(i.Types.Hyperlink,this,{text:this._value.value,hyperlink:h}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:h}=this._row;return{sheetName:h.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(h){this.names=[h]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(h){const{definedNames:p}=this.workbook;p.removeAllNames(this.fullAddress),h.forEach(m=>{p.addEx(this.fullAddress,m)})}addName(h){this.workbook.definedNames.addEx(this.fullAddress,h)}removeName(h){this.workbook.definedNames.removeEx(this.fullAddress,h)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(h){this._dataValidations.add(this.address,h)}get model(){const{model:h}=this._value;return h.style=this.style,this._comment&&(h.comment=this._comment.model),h}set model(h){if(this._value.release(),this._value=u.create(h.type,this),this._value.model=h,h.comment)switch(h.comment.type){case"note":this._comment=e.fromModel(h.comment)}h.style?this.style=h.style:this.style={}}}i.Types=n.ValueType;const u={getType:a=>a==null?i.Types.Null:a instanceof String||typeof a=="string"?i.Types.String:typeof a=="number"?i.Types.Number:typeof a=="boolean"?i.Types.Boolean:a instanceof Date?i.Types.Date:a.text&&a.hyperlink?i.Types.Hyperlink:a.formula||a.sharedFormula?i.Types.Formula:a.richText?i.Types.RichText:a.sharedString?i.Types.SharedString:a.error?i.Types.Error:i.Types.JSON,types:[{t:i.Types.Null,f:class{constructor(a){this.model={address:a.address,type:i.Types.Null}}get value(){return null}set value(a){}get type(){return i.Types.Null}get effectiveType(){return i.Types.Null}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return""}release(){}toString(){return""}}},{t:i.Types.Number,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Number,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.Number}get effectiveType(){return i.Types.Number}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:i.Types.String,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.String,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.String}get effectiveType(){return i.Types.String}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:i.Types.Date,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Date,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.Date}get effectiveType(){return i.Types.Date}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:i.Types.Hyperlink,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Hyperlink,text:h?h.text:void 0,hyperlink:h?h.hyperlink:void 0},h&&h.tooltip&&(this.model.tooltip=h.tooltip)}get value(){const a={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(a.tooltip=this.model.tooltip),a}set value(a){this.model={text:a.text,hyperlink:a.hyperlink},a.tooltip&&(this.model.tooltip=a.tooltip)}get text(){return this.model.text}set text(a){this.model.text=a}get hyperlink(){return this.model.hyperlink}set hyperlink(a){this.model.hyperlink=a}get type(){return i.Types.Hyperlink}get effectiveType(){return i.Types.Hyperlink}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:i.Types.Formula,f:class{constructor(a,h){this.cell=a,this.model={address:a.address,type:i.Types.Formula,shareType:h?h.shareType:void 0,ref:h?h.ref:void 0,formula:h?h.formula:void 0,sharedFormula:h?h.sharedFormula:void 0,result:h?h.result:void 0}}_copyModel(a){const h={},p=m=>{const d=a[m];d&&(h[m]=d)};return p("formula"),p("result"),p("ref"),p("shareType"),p("sharedFormula"),h}get value(){return this._copyModel(this.model)}set value(a){this.model=this._copyModel(a)}validate(a){switch(u.getType(a)){case i.Types.Null:case i.Types.String:case i.Types.Number:case i.Types.Date:break;case i.Types.Hyperlink:case i.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(a){this.model.formula=a}get formulaType(){return this.model.formula?n.FormulaType.Master:this.model.sharedFormula?n.FormulaType.Shared:n.FormulaType.None}get result(){return this.model.result}set result(a){this.model.result=a}get type(){return i.Types.Formula}get effectiveType(){const a=this.model.result;return a==null?n.ValueType.Null:a instanceof String||typeof a=="string"?n.ValueType.String:typeof a=="number"?n.ValueType.Number:a instanceof Date?n.ValueType.Date:a.text&&a.hyperlink?n.ValueType.Hyperlink:a.formula?n.ValueType.Formula:n.ValueType.Null}get address(){return this.model.address}set address(a){this.model.address=a}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:a}=this.cell,h=a.findCell(this.model.sharedFormula);this._translatedFormula=h&&s(h.formula,h.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:i.Types.Merge,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Merge,master:h?h.address:void 0},this._master=h,h&&h.addMergeRef()}get value(){return this._master.value}set value(a){a instanceof i?(this._master&&this._master.releaseMergeRef(),a.addMergeRef(),this._master=a):this._master.value=a}isMergedTo(a){return a===this._master}get master(){return this._master}get type(){return i.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:i.Types.JSON,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.String,value:JSON.stringify(h),rawValue:h}}get value(){return this.model.rawValue}set value(a){this.model.rawValue=a,this.model.value=JSON.stringify(a)}get type(){return i.Types.String}get effectiveType(){return i.Types.String}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:i.Types.SharedString,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.SharedString,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.SharedString}get effectiveType(){return i.Types.SharedString}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:i.Types.RichText,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.String,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}toString(){return this.model.value.richText.map(a=>a.text).join("")}get type(){return i.Types.RichText}get effectiveType(){return i.Types.RichText}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:i.Types.Boolean,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Boolean,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.Boolean}get effectiveType(){return i.Types.Boolean}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:i.Types.Error,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Error,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.Error}get effectiveType(){return i.Types.Error}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((a,h)=>(a[h.t]=h.f,a),[]),create(a,h,p){const m=this.types[a];if(!m)throw new Error("Could not create Value of type "+a);return new m(h,p)}};l.exports=i},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(t,l,c){const o=t("../utils/under-dash"),r=t("./enums"),n=t("../utils/col-cache");class s{constructor(i,u,a){this._worksheet=i,this._number=u,a!==!1&&(this.defn=a)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return n.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(i){i?(this.key=i.key,this.width=i.width!==void 0?i.width:9,this.outlineLevel=i.outlineLevel,i.style?this.style=i.style:this.style={},this.header=i.header,this._hidden=!!i.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(i){i!==void 0?(this._header=i,this.headers.forEach((u,a)=>{this._worksheet.getCell(a+1,this.number).value=u})):this._header=void 0}get key(){return this._key}set key(i){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=i,i&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(i){this._hidden=i}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(i){this._outlineLevel=i}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(i){return this.width===i.width&&this.hidden===i.hidden&&this.outlineLevel===i.outlineLevel&&o.isEqual(this.style,i.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const i=this.style;return!i||!(i.font||i.numFmt||i.alignment||i.border||i.fill||i.protection)}get headerCount(){return this.headers.length}eachCell(i,u){const a=this.number;u||(u=i,i=null),this._worksheet.eachRow(i,(h,p)=>{u(h.getCell(a),p)})}get values(){const i=[];return this.eachCell((u,a)=>{u&&u.type!==r.ValueType.Null&&(i[a]=u.value)}),i}set values(i){if(!i)return;const u=this.number;let a=0;i.hasOwnProperty("0")&&(a=1),i.forEach((h,p)=>{this._worksheet.getCell(p+a,u).value=h})}_applyStyle(i,u){return this.style[i]=u,this.eachCell(a=>{a[i]=u}),u}get numFmt(){return this.style.numFmt}set numFmt(i){this._applyStyle("numFmt",i)}get font(){return this.style.font}set font(i){this._applyStyle("font",i)}get alignment(){return this.style.alignment}set alignment(i){this._applyStyle("alignment",i)}get protection(){return this.style.protection}set protection(i){this._applyStyle("protection",i)}get border(){return this.style.border}set border(i){this._applyStyle("border",i)}get fill(){return this.style.fill}set fill(i){this._applyStyle("fill",i)}static toModel(i){const u=[];let a=null;return i&&i.forEach((h,p)=>{h.isDefault?a&&(a=null):a&&h.equivalentTo(a)?a.max=p+1:(a={min:p+1,max:p+1,width:h.width!==void 0?h.width:9,style:h.style,isCustomWidth:h.isCustomWidth,hidden:h.hidden,outlineLevel:h.outlineLevel,collapsed:h.collapsed},u.push(a))}),u.length?u:void 0}static fromModel(i,u){const a=[];let h=1,p=0;for(u=(u=u||[]).sort((function(m,d){return m.min-d.min}));p<u.length;){const m=u[p++];for(;h<m.min;)a.push(new s(i,h++));for(;h<=m.max;)a.push(new s(i,h++,m))}return a.length?a:null}}l.exports=s},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(t,l,c){l.exports=class{constructor(o){this.model=o||{}}add(o,r){return this.model[o]=r}find(o){return this.model[o]}remove(o){this.model[o]=void 0}}},{}],6:[function(t,l,c){const o=t("../utils/under-dash"),r=t("../utils/col-cache"),n=t("../utils/cell-matrix"),s=t("./range"),e=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;l.exports=class{constructor(){this.matrixMap={}}getMatrix(i){return this.matrixMap[i]||(this.matrixMap[i]=new n)}add(i,u){const a=r.decodeEx(i);this.addEx(a,u)}addEx(i,u){const a=this.getMatrix(u);if(i.top)for(let h=i.left;h<=i.right;h++)for(let p=i.top;p<=i.bottom;p++){const m={sheetName:i.sheetName,address:r.n2l(h)+p,row:p,col:h};a.addCellEx(m)}else a.addCellEx(i)}remove(i,u){const a=r.decodeEx(i);this.removeEx(a,u)}removeEx(i,u){this.getMatrix(u).removeCellEx(i)}removeAllNames(i){o.each(this.matrixMap,u=>{u.removeCellEx(i)})}forEach(i){o.each(this.matrixMap,(u,a)=>{u.forEach(h=>{i(a,h)})})}getNames(i){return this.getNamesEx(r.decodeEx(i))}getNamesEx(i){return o.map(this.matrixMap,(u,a)=>u.findCellEx(i)&&a).filter(Boolean)}_explore(i,u){u.mark=!1;const{sheetName:a}=u,h=new s(u.row,u.col,u.row,u.col,a);let p,m;function d(g,S){const C=i.findCellAt(a,g,u.col);return!(!C||!C.mark)&&(h[S]=g,C.mark=!1,!0)}for(m=u.row-1;d(m,"top");m--);for(m=u.row+1;d(m,"bottom");m++);function b(g,S){const C=[];for(m=h.top;m<=h.bottom;m++){const I=i.findCellAt(a,m,g);if(!I||!I.mark)return!1;C.push(I)}h[S]=g;for(let I=0;I<C.length;I++)C[I].mark=!1;return!0}for(p=u.col-1;b(p,"left");p--);for(p=u.col+1;b(p,"right");p++);return h}getRanges(i,u){return(u=u||this.matrixMap[i])?(u.forEach(a=>{a.mark=!0}),{name:i,ranges:u.map(a=>a.mark&&this._explore(u,a)).filter(Boolean).map(a=>a.$shortRange)}):{name:i,ranges:[]}}normaliseMatrix(i,u){i.forEachInSheet(u,(a,h,p)=>{a&&(a.row===h&&a.col===p||(a.row=h,a.col=p,a.address=r.n2l(p)+h))})}spliceRows(i,u,a,h){o.each(this.matrixMap,p=>{p.spliceRows(i,u,a,h),this.normaliseMatrix(p,i)})}spliceColumns(i,u,a,h){o.each(this.matrixMap,p=>{p.spliceColumns(i,u,a,h),this.normaliseMatrix(p,i)})}get model(){return o.map(this.matrixMap,(i,u)=>this.getRanges(u,i)).filter(i=>i.ranges.length)}set model(i){const u=this.matrixMap={};i.forEach(a=>{const h=u[a.name]=new n;a.ranges.forEach(p=>{e.test(p.split("!").pop()||"")&&h.addCell(p)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(t,l,c){l.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(t,l,c){const o=t("../utils/col-cache"),r=t("./anchor");l.exports=class{constructor(n,s){this.worksheet=n,this.model=s}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(n){let{type:s,imageId:e,range:i,hyperlinks:u}=n;if(this.type=s,this.imageId=e,s==="image")if(typeof i=="string"){const a=o.decode(i);this.range={tl:new r(this.worksheet,{col:a.left,row:a.top},-1),br:new r(this.worksheet,{col:a.right,row:a.bottom},0),editAs:"oneCell"}}else this.range={tl:new r(this.worksheet,i.tl,0),br:i.br&&new r(this.worksheet,i.br,0),ext:i.ext,editAs:i.editAs,hyperlinks:u||i.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(t,l,c){const o=t("../utils/under-dash");class r{constructor(s){this.note=s}get model(){let s=null;switch(typeof this.note){case"string":s={type:"note",note:{texts:[{text:this.note}]}};break;default:s={type:"note",note:this.note}}return o.deepMerge({},r.DEFAULT_CONFIGS,s)}set model(s){const{note:e}=s,{texts:i}=e;i.length===1&&Object.keys(i[0]).length===1?this.note=i[0].text:this.note=e}static fromModel(s){const e=new r;return e.model=s,e}}r.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},l.exports=r},{"../utils/under-dash":26}],10:[function(t,l,c){const o=t("../utils/col-cache");class r{constructor(){this.decode(arguments)}setTLBR(s,e,i,u,a){if(arguments.length<4){const h=o.decodeAddress(s),p=o.decodeAddress(e);this.model={top:Math.min(h.row,p.row),left:Math.min(h.col,p.col),bottom:Math.max(h.row,p.row),right:Math.max(h.col,p.col),sheetName:i},this.setTLBR(h.row,h.col,p.row,p.col,a)}else this.model={top:Math.min(s,i),left:Math.min(e,u),bottom:Math.max(s,i),right:Math.max(e,u),sheetName:a}}decode(s){switch(s.length){case 5:this.setTLBR(s[0],s[1],s[2],s[3],s[4]);break;case 4:this.setTLBR(s[0],s[1],s[2],s[3]);break;case 3:this.setTLBR(s[0],s[1],s[2]);break;case 2:this.setTLBR(s[0],s[1]);break;case 1:{const e=s[0];if(e instanceof r)this.model={top:e.model.top,left:e.model.left,bottom:e.model.bottom,right:e.model.right,sheetName:e.sheetName};else if(e instanceof Array)this.decode(e);else if(e.top&&e.left&&e.bottom&&e.right)this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName};else{const i=o.decodeEx(e);i.top?this.model={top:i.top,left:i.left,bottom:i.bottom,right:i.right,sheetName:i.sheetName}:this.model={top:i.row,left:i.col,bottom:i.row,right:i.col,sheetName:i.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+s.length)}}get top(){return this.model.top||1}set top(s){this.model.top=s}get left(){return this.model.left||1}set left(s){this.model.left=s}get bottom(){return this.model.bottom||1}set bottom(s){this.model.bottom=s}get right(){return this.model.right||1}set right(s){this.model.right=s}get sheetName(){return this.model.sheetName}set sheetName(s){this.model.sheetName=s}get _serialisedSheetName(){const{sheetName:s}=this.model;return s?/^[a-zA-Z0-9]*$/.test(s)?s+"!":`'${s}'!`:""}expand(s,e,i,u){(!this.model.top||s<this.top)&&(this.top=s),(!this.model.left||e<this.left)&&(this.left=e),(!this.model.bottom||i>this.bottom)&&(this.bottom=i),(!this.model.right||u>this.right)&&(this.right=u)}expandRow(s){if(s){const{dimensions:e,number:i}=s;e&&this.expand(i,e.min,i,e.max)}}expandToAddress(s){const e=o.decodeEx(s);this.expand(e.row,e.col,e.row,e.col)}get tl(){return o.n2l(this.left)+this.top}get $t$l(){return`$${o.n2l(this.left)}$${this.top}`}get br(){return o.n2l(this.right)+this.bottom}get $b$r(){return`$${o.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(s){return(!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&!(s.bottom<this.top)&&!(s.top>this.bottom)&&!(s.right<this.left)&&!(s.left>this.right)}contains(s){const e=o.decodeEx(s);return this.containsEx(e)}containsEx(s){return(!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&s.row>=this.top&&s.row<=this.bottom&&s.col>=this.left&&s.col<=this.right}forEachAddress(s){for(let e=this.left;e<=this.right;e++)for(let i=this.top;i<=this.bottom;i++)s(o.encodeAddress(i,e),i,e)}}l.exports=r},{"../utils/col-cache":19}],11:[function(t,l,c){const o=t("../utils/under-dash"),r=t("./enums"),n=t("../utils/col-cache"),s=t("./cell");l.exports=class{constructor(e,i){this._worksheet=e,this._number=i,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(e){return this._cells[e-1]}getCellEx(e){let i=this._cells[e.col-1];if(!i){const u=this._worksheet.getColumn(e.col);i=new s(this,u,e.address),this._cells[e.col-1]=i}return i}getCell(e){if(typeof e=="string"){const i=this._worksheet.getColumnKey(e);e=i?i.number:n.l2n(e)}return this._cells[e-1]||this.getCellEx({address:n.encodeAddress(this._number,e),row:this._number,col:e})}splice(e,i){const u=e+i;for(var a=arguments.length,h=new Array(a>2?a-2:0),p=2;p<a;p++)h[p-2]=arguments[p];const m=h.length-i,d=this._cells.length;let b,g,S;if(m<0)for(b=e+h.length;b<=d;b++)S=this._cells[b-1],g=this._cells[b-m-1],g?(S=this.getCell(b),S.value=g.value,S.style=g.style,S._comment=g._comment):S&&(S.value=null,S.style={},S._comment=void 0);else if(m>0)for(b=d;b>=u;b--)g=this._cells[b-1],g?(S=this.getCell(b+m),S.value=g.value,S.style=g.style,S._comment=g._comment):this._cells[b+m-1]=void 0;for(b=0;b<h.length;b++)S=this.getCell(e+b),S.value=h[b],S.style={},S._comment=void 0}eachCell(e,i){if(i||(i=e,e=null),e&&e.includeEmpty){const u=this._cells.length;for(let a=1;a<=u;a++)i(this.getCell(a),a)}else this._cells.forEach((u,a)=>{u&&u.type!==r.ValueType.Null&&i(u,a+1)})}addPageBreak(e,i){const u=this._worksheet,a=Math.max(0,e-1)||0,h=Math.max(0,i-1)||16838,p={id:this._number,max:h,man:1};a&&(p.min=a),u.rowBreaks.push(p)}get values(){const e=[];return this._cells.forEach(i=>{i&&i.type!==r.ValueType.Null&&(e[i.col]=i.value)}),e}set values(e){if(this._cells=[],e)if(e instanceof Array){let i=0;e.hasOwnProperty("0")&&(i=1),e.forEach((u,a)=>{u!==void 0&&(this.getCellEx({address:n.encodeAddress(this._number,a+i),row:this._number,col:a+i}).value=u)})}else this._worksheet.eachColumnKey((i,u)=>{e[u]!==void 0&&(this.getCellEx({address:n.encodeAddress(this._number,i.number),row:this._number,col:i.number}).value=e[u])})}get hasValues(){return o.some(this._cells,e=>e&&e.type!==r.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let e=0;return this.eachCell(()=>{e++}),e}get dimensions(){let e=0,i=0;return this._cells.forEach(u=>{u&&u.type!==r.ValueType.Null&&((!e||e>u.col)&&(e=u.col),i<u.col&&(i=u.col))}),e>0?{min:e,max:i}:null}_applyStyle(e,i){return this.style[e]=i,this._cells.forEach(u=>{u&&(u[e]=i)}),i}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle("numFmt",e)}get font(){return this.style.font}set font(e){this._applyStyle("font",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle("alignment",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle("protection",e)}get border(){return this.style.border}set border(e){this._applyStyle("border",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle("fill",e)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const e=[];let i=0,u=0;return this._cells.forEach(a=>{if(a){const h=a.model;h&&((!i||i>a.col)&&(i=a.col),u<a.col&&(u=a.col),e.push(h))}}),this.height||e.length?{cells:e,number:this.number,min:i,max:u,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(e){if(e.number!==this._number)throw new Error("Invalid row number in model");let i;this._cells=[],e.cells.forEach(u=>{switch(u.type){case s.Types.Merge:break;default:{let a;if(u.address)a=n.decodeAddress(u.address);else if(i){const{row:h}=i,p=i.col+1;a={row:h,col:p,address:n.encodeAddress(h,p),$col$row:`$${n.n2l(p)}$${h}`}}i=a,this.getCellEx(a).model=u;break}}}),e.height?this.height=e.height:delete this.height,this.hidden=e.hidden,this.outlineLevel=e.outlineLevel||0,this.style=e.style&&JSON.parse(JSON.stringify(e.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(t,l,c){const o=t("../utils/col-cache");class r{constructor(s,e,i){this.table=s,this.column=e,this.index=i}_set(s,e){this.table.cacheState(),this.column[s]=e}get name(){return this.column.name}set name(s){this._set("name",s)}get filterButton(){return this.column.filterButton}set filterButton(s){this.column.filterButton=s}get style(){return this.column.style}set style(s){this.column.style=s}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(s){this._set("totalsRowLabel",s)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(s){this._set("totalsRowFunction",s)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(s){this._set("totalsRowResult",s)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(s){this._set("totalsRowFormula",s)}}l.exports=class{constructor(n,s){this.worksheet=n,s&&(this.table=s,this.validate(),this.store())}getFormula(n){switch(n.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${n.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${n.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${n.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${n.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${n.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${n.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${n.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${n.name}])`;case"custom":return n.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+n.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:n}=this,s=(m,d,b)=>{m[d]===void 0&&(m[d]=b)};s(n,"headerRow",!0),s(n,"totalsRow",!1),s(n,"style",{}),s(n.style,"theme","TableStyleMedium2"),s(n.style,"showFirstColumn",!1),s(n.style,"showLastColumn",!1),s(n.style,"showRowStripes",!1),s(n.style,"showColumnStripes",!1);const e=(m,d)=>{if(!m)throw new Error(d)};e(n.ref,"Table must have ref"),e(n.columns,"Table must have column definitions"),e(n.rows,"Table must have row definitions"),n.tl=o.decodeAddress(n.ref);const{row:i,col:u}=n.tl;e(i>0,"Table must be on valid row"),e(u>0,"Table must be on valid col");const{width:a,filterHeight:h,tableHeight:p}=this;n.autoFilterRef=o.encode(i,u,i+h-1,u+a-1),n.tableRef=o.encode(i,u,i+p-1,u+a-1),n.columns.forEach((m,d)=>{e(m.name,`Column ${d} must have a name`),d===0?s(m,"totalsRowLabel","Total"):(s(m,"totalsRowFunction","none"),m.totalsRowFormula=this.getFormula(m))})}store(){const n=(h,p)=>{p&&Object.keys(p).forEach(m=>{h[m]=p[m]})},{worksheet:s,table:e}=this,{row:i,col:u}=e.tl;let a=0;if(e.headerRow){const h=s.getRow(i+a++);e.columns.forEach((p,m)=>{const{style:d,name:b}=p,g=h.getCell(u+m);g.value=b,n(g,d)})}if(e.rows.forEach(h=>{const p=s.getRow(i+a++);h.forEach((m,d)=>{const b=p.getCell(u+d);b.value=m,n(b,e.columns[d].style)})}),e.totalsRow){const h=s.getRow(i+a++);e.columns.forEach((p,m)=>{const d=h.getCell(u+m);if(m===0)d.value=p.totalsRowLabel;else{const b=this.getFormula(p);d.value=b?{formula:p.totalsRowFormula,result:p.totalsRowResult}:null}n(d,p.style)})}}load(n){const{table:s}=this,{row:e,col:i}=s.tl;let u=0;if(s.headerRow){const a=n.getRow(e+u++);s.columns.forEach((h,p)=>{a.getCell(i+p).value=h.name})}if(s.rows.forEach(a=>{const h=n.getRow(e+u++);a.forEach((p,m)=>{h.getCell(i+m).value=p})}),s.totalsRow){const a=n.getRow(e+u++);s.columns.forEach((h,p)=>{const m=a.getCell(i+p);p===0?m.value=h.totalsRowLabel:this.getFormula(h)&&(m.value={formula:h.totalsRowFormula,result:h.totalsRowResult})})}}get model(){return this.table}set model(n){this.table=n}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const n=o.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let s=0;s<this._cache.tableHeight;s++){const e=this.worksheet.getRow(n.row+s);for(let i=0;i<this._cache.width;i++)e.getCell(n.col+i).value=null}else{for(let s=this.tableHeight;s<this._cache.tableHeight;s++){const e=this.worksheet.getRow(n.row+s);for(let i=0;i<this._cache.width;i++)e.getCell(n.col+i).value=null}for(let s=0;s<this.tableHeight;s++){const e=this.worksheet.getRow(n.row+s);for(let i=this.width;i<this._cache.width;i++)e.getCell(n.col+i).value=null}}this.store()}addRow(n,s){this.cacheState(),s===void 0?this.table.rows.push(n):this.table.rows.splice(s,0,n)}removeRows(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(n,s)}getColumn(n){const s=this.table.columns[n];return new r(this,s,n)}addColumn(n,s,e){this.cacheState(),e===void 0?(this.table.columns.push(n),this.table.rows.forEach((i,u)=>{i.push(s[u])})):(this.table.columns.splice(e,0,n),this.table.rows.forEach((i,u)=>{i.splice(e,0,s[u])}))}removeColumns(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(n,s),this.table.rows.forEach(e=>{e.splice(n,s)})}_assign(n,s,e){this.cacheState(),n[s]=e}get ref(){return this.table.ref}set ref(n){this._assign(this.table,"ref",n)}get name(){return this.table.name}set name(n){this.table.name=n}get displayName(){return this.table.displyName||this.table.name}set displayNamename(n){this.table.displayName=n}get headerRow(){return this.table.headerRow}set headerRow(n){this._assign(this.table,"headerRow",n)}get totalsRow(){return this.table.totalsRow}set totalsRow(n){this._assign(this.table,"totalsRow",n)}get theme(){return this.table.style.name}set theme(n){this.table.style.name=n}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(n){this.table.style.showFirstColumn=n}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(n){this.table.style.showLastColumn=n}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(n){this.table.style.showRowStripes=n}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(n){this.table.style.showColumnStripes=n}}},{"../utils/col-cache":19}],13:[function(t,l,c){const o=t("./worksheet"),r=t("./defined-names"),n=t("../xlsx/xlsx"),s=t("../csv/csv");l.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new r}get xlsx(){return this._xlsx||(this._xlsx=new n(this)),this._xlsx}get csv(){return this._csv||(this._csv=new s(this)),this._csv}get nextId(){for(let e=1;e<this._worksheets.length;e++)if(!this._worksheets[e])return e;return this._worksheets.length||1}addWorksheet(e,i){const u=this.nextId;i&&(typeof i=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),i={properties:{tabColor:{argb:i}}}):(i.argb||i.theme||i.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),i={properties:{tabColor:i}}));const a=this._worksheets.reduce((m,d)=>(d&&d.orderNo)>m?d.orderNo:m,0),h=Object.assign({},i,{id:u,name:e,orderNo:a+1,workbook:this}),p=new o(h);return this._worksheets[u]=p,p}removeWorksheetEx(e){delete this._worksheets[e.id]}removeWorksheet(e){const i=this.getWorksheet(e);i&&i.destroy()}getWorksheet(e){return e===void 0?this._worksheets.find(Boolean):typeof e=="number"?this._worksheets[e]:typeof e=="string"?this._worksheets.find(i=>i&&i.name===e):void 0}get worksheets(){return this._worksheets.slice(1).sort((e,i)=>e.orderNo-i.orderNo).filter(Boolean)}eachSheet(e){this.worksheets.forEach(i=>{e(i,i.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(e){const i=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),i}getImage(e){return this.media[e]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(e=>e.model),sheets:this.worksheets.map(e=>e.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(e){this.creator=e.creator,this.lastModifiedBy=e.lastModifiedBy,this.lastPrinted=e.lastPrinted,this.created=e.created,this.modified=e.modified,this.company=e.company,this.manager=e.manager,this.title=e.title,this.subject=e.subject,this.keywords=e.keywords,this.category=e.category,this.description=e.description,this.language=e.language,this.revision=e.revision,this.contentStatus=e.contentStatus,this.properties=e.properties,this.calcProperties=e.calcProperties,this._worksheets=[],e.worksheets.forEach(i=>{const{id:u,name:a,state:h}=i,p=e.sheets&&e.sheets.findIndex(m=>m.id===u);(this._worksheets[u]=new o({id:u,name:a,orderNo:p,state:h,workbook:this})).model=i}),this._definedNames.model=e.definedNames,this.views=e.views,this._themes=e.themes,this.media=e.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(t,l,c){const o=t("../utils/under-dash"),r=t("../utils/col-cache"),n=t("./range"),s=t("./row"),e=t("./column"),i=t("./enums"),u=t("./image"),a=t("./table"),h=t("./data-validations"),p=t("../utils/encryptor"),{copyStyle:m}=t("../utils/copy-style");l.exports=class{constructor(d){d=d||{},this._workbook=d.workbook,this.id=d.id,this.orderNo=d.orderNo,this.name=d.name,this.state=d.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},d.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!d.pageSetup||!d.pageSetup.fitToWidth&&!d.pageSetup.fitToHeight||d.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},d.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},d.headerFooter),this.dataValidations=new h,this.views=d.views||[],this.autoFilter=d.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(d){if(d===void 0&&(d="sheet"+this.id),this._name!==d){if(typeof d!="string")throw new Error("The name has to be a string.");if(d==="")throw new Error("The name can't be empty.");if(d==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(d))throw new Error(`Worksheet name ${d} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(d))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+d);if(d&&d.length>31&&(console.warn(`Worksheet name ${d} exceeds 31 chars. This will be truncated`),d=d.substring(0,31)),this._workbook._worksheets.find(b=>b&&b.name.toLowerCase()===d.toLowerCase()))throw new Error("Worksheet name already exists: "+d);this._name=d}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const d=new n;return this._rows.forEach(b=>{if(b){const g=b.dimensions;g&&d.expand(b.number,g.min,b.number,g.max)}}),d}get columns(){return this._columns}set columns(d){this._headerRowCount=d.reduce((S,C)=>{const I=(C.header?1:C.headers&&C.headers.length)||0;return Math.max(S,I)},0);let b=1;const g=this._columns=[];d.forEach(S=>{const C=new e(this,b++,!1);g.push(C),C.defn=S})}getColumnKey(d){return this._keys[d]}setColumnKey(d,b){this._keys[d]=b}deleteColumnKey(d){delete this._keys[d]}eachColumnKey(d){o.each(this._keys,d)}getColumn(d){if(typeof d=="string"){const b=this._keys[d];if(b)return b;d=r.l2n(d)}if(this._columns||(this._columns=[]),d>this._columns.length){let b=this._columns.length+1;for(;b<=d;)this._columns.push(new e(this,b++))}return this._columns[d-1]}spliceColumns(d,b){const g=this._rows.length;for(var S=arguments.length,C=new Array(S>2?S-2:0),I=2;I<S;I++)C[I-2]=arguments[I];if(C.length>0)for(let B=0;B<g;B++){const F=[d,b];C.forEach(q=>{F.push(q[B]||null)});const W=this.getRow(B+1);W.splice.apply(W,F)}else this._rows.forEach(B=>{B&&B.splice(d,b)});const D=C.length-b,z=d+b,P=this._columns.length;if(D<0)for(let B=d+C.length;B<=P;B++)this.getColumn(B).defn=this.getColumn(B-D).defn;else if(D>0)for(let B=P;B>=z;B--)this.getColumn(B+D).defn=this.getColumn(B).defn;for(let B=d;B<d+C.length;B++)this.getColumn(B).defn=null;this.workbook.definedNames.spliceColumns(this.name,d,b,C.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let d=0;return this.eachRow(b=>{d=Math.max(d,b.cellCount)}),d}get actualColumnCount(){const d=[];let b=0;return this.eachRow(g=>{g.eachCell(S=>{let{col:C}=S;d[C]||(d[C]=!0,b++)})}),b}_commitRow(){}get _lastRowNumber(){const d=this._rows;let b=d.length;for(;b>0&&d[b-1]===void 0;)b--;return b}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(d){return this._rows[d-1]}findRows(d,b){return this._rows.slice(d-1,d-1+b)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let d=0;return this.eachRow(()=>{d++}),d}getRow(d){let b=this._rows[d-1];return b||(b=this._rows[d-1]=new s(this,d)),b}getRows(d,b){if(b<1)return;const g=[];for(let S=d;S<d+b;S++)g.push(this.getRow(S));return g}addRow(d){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const g=this._nextRow,S=this.getRow(g);return S.values=d,this._setStyleOption(g,b[0]==="i"?b:"n"),S}addRows(d){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const g=[];return d.forEach(S=>{g.push(this.addRow(S,b))}),g}insertRow(d,b){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(d,0,b),this._setStyleOption(d,g),this.getRow(d)}insertRows(d,b){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(d,0,...b),g!=="n")for(let S=0;S<b.length;S++)g[0]==="o"&&this.findRow(b.length+d+S)!==void 0?this._copyStyle(b.length+d+S,d+S,g[1]==="+"):g[0]==="i"&&this.findRow(d-1)!==void 0&&this._copyStyle(d-1,d+S,g[1]==="+");return this.getRows(d,b.length)}_setStyleOption(d){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";b[0]==="o"&&this.findRow(d+1)!==void 0?this._copyStyle(d+1,d,b[1]==="+"):b[0]==="i"&&this.findRow(d-1)!==void 0&&this._copyStyle(d-1,d,b[1]==="+")}_copyStyle(d,b){let g=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const S=this.getRow(d),C=this.getRow(b);C.style=m(S.style),S.eachCell({includeEmpty:g},(I,D)=>{C.getCell(D).style=m(I.style)}),C.height=S.height}duplicateRow(d,b){let g=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const S=this._rows[d-1],C=new Array(b).fill(S.values);this.spliceRows(d+1,g?0:b,...C);for(let I=0;I<b;I++){const D=this._rows[d+I];D.style=S.style,D.height=S.height,S.eachCell({includeEmpty:!0},(z,P)=>{D.getCell(P).style=z.style})}}spliceRows(d,b){const g=d+b;for(var S=arguments.length,C=new Array(S>2?S-2:0),I=2;I<S;I++)C[I-2]=arguments[I];const D=C.length,z=D-b,P=this._rows.length;let B,F;if(z<0)for(d===P&&(this._rows[P-1]=void 0),B=g;B<=P;B++)if(F=this._rows[B-1],F){const W=this.getRow(B+z);W.values=F.values,W.style=F.style,W.height=F.height,F.eachCell({includeEmpty:!0},(q,A)=>{W.getCell(A).style=q.style}),this._rows[B-1]=void 0}else this._rows[B+z-1]=void 0;else if(z>0)for(B=P;B>=g;B--)if(F=this._rows[B-1],F){const W=this.getRow(B+z);W.values=F.values,W.style=F.style,W.height=F.height,F.eachCell({includeEmpty:!0},(q,A)=>{if(W.getCell(A).style=q.style,q._value.constructor.name==="MergeValue"){const M=this.getRow(q._row._number+D).getCell(A),k=q._value._master,y=this.getRow(k._row._number+D).getCell(k._column._number);M.merge(y)}})}else this._rows[B+z-1]=void 0;for(B=0;B<D;B++){const W=this.getRow(d+B);W.style={},W.values=C[B]}this.workbook.definedNames.spliceRows(this.name,d,b,D)}eachRow(d,b){if(b||(b=d,d=void 0),d&&d.includeEmpty){const g=this._rows.length;for(let S=1;S<=g;S++)b(this.getRow(S),S)}else this._rows.forEach(g=>{g&&g.hasValues&&b(g,g.number)})}getSheetValues(){const d=[];return this._rows.forEach(b=>{b&&(d[b.number]=b.values)}),d}findCell(d,b){const g=r.getAddress(d,b),S=this._rows[g.row-1];return S?S.findCell(g.col):void 0}getCell(d,b){const g=r.getAddress(d,b);return this.getRow(g.row).getCellEx(g)}mergeCells(){for(var d=arguments.length,b=new Array(d),g=0;g<d;g++)b[g]=arguments[g];const S=new n(b);this._mergeCellsInternal(S)}mergeCellsWithoutStyle(){for(var d=arguments.length,b=new Array(d),g=0;g<d;g++)b[g]=arguments[g];const S=new n(b);this._mergeCellsInternal(S,!0)}_mergeCellsInternal(d,b){o.each(this._merges,S=>{if(S.intersects(d))throw new Error("Cannot merge already merged cells")});const g=this.getCell(d.top,d.left);for(let S=d.top;S<=d.bottom;S++)for(let C=d.left;C<=d.right;C++)(S>d.top||C>d.left)&&this.getCell(S,C).merge(g,b);this._merges[g.address]=d}_unMergeMaster(d){const b=this._merges[d.address];if(b){for(let g=b.top;g<=b.bottom;g++)for(let S=b.left;S<=b.right;S++)this.getCell(g,S).unmerge();delete this._merges[d.address]}}get hasMerges(){return o.some(this._merges,Boolean)}unMergeCells(){for(var d=arguments.length,b=new Array(d),g=0;g<d;g++)b[g]=arguments[g];const S=new n(b);for(let C=S.top;C<=S.bottom;C++)for(let I=S.left;I<=S.right;I++){const D=this.findCell(C,I);D&&(D.type===i.ValueType.Merge?this._unMergeMaster(D.master):this._merges[D.address]&&this._unMergeMaster(D))}}fillFormula(d,b,g){let S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const C=r.decode(d),{top:I,left:D,bottom:z,right:P}=C,B=P-D+1,F=r.encodeAddress(I,D),W=S==="shared";let q;q=typeof g=="function"?g:Array.isArray(g)?Array.isArray(g[0])?(M,k)=>g[M-I][k-D]:(M,k)=>g[(M-I)*B+(k-D)]:()=>{};let A=!0;for(let M=I;M<=z;M++)for(let k=D;k<=P;k++)A?(this.getCell(M,k).value={shareType:S,formula:b,ref:d,result:q(M,k)},A=!1):this.getCell(M,k).value=W?{sharedFormula:F,result:q(M,k)}:q(M,k)}addImage(d,b){const g={type:"image",imageId:d,range:b};this._media.push(new u(this,g))}getImages(){return this._media.filter(d=>d.type==="image")}addBackgroundImage(d){const b={type:"background",imageId:d};this._media.push(new u(this,b))}getBackgroundImageId(){const d=this._media.find(b=>b.type==="background");return d&&d.imageId}protect(d,b){return new Promise(g=>{this.sheetProtection={sheet:!0},b&&"spinCount"in b&&(b.spinCount=Number.isFinite(b.spinCount)?Math.round(Math.max(0,b.spinCount)):1e5),d&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=p.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=b&&"spinCount"in b?b.spinCount:1e5,this.sheetProtection.hashValue=p.convertPasswordToHash(d,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),b&&(this.sheetProtection=Object.assign(this.sheetProtection,b),!d&&"spinCount"in b&&delete this.sheetProtection.spinCount),g()})}unprotect(){this.sheetProtection=null}addTable(d){const b=new a(this,d);return this.tables[d.name]=b,b}getTable(d){return this.tables[d]}removeTable(d){delete this.tables[d]}getTables(){return Object.values(this.tables)}addConditionalFormatting(d){this.conditionalFormattings.push(d)}removeConditionalFormatting(d){typeof d=="number"?this.conditionalFormattings.splice(d,1):this.conditionalFormattings=d instanceof Function?this.conditionalFormattings.filter(d):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(d){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=d}get model(){const d={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(S=>S.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(S=>S.model),conditionalFormattings:this.conditionalFormattings};d.cols=e.toModel(this.columns);const b=d.rows=[],g=d.dimensions=new n;return this._rows.forEach(S=>{const C=S&&S.model;C&&(g.expand(C.number,C.min,C.number,C.max),b.push(C))}),d.merges=[],o.each(this._merges,S=>{d.merges.push(S.range)}),d}_parseRows(d){this._rows=[],d.rows.forEach(b=>{const g=new s(this,b.number);this._rows[g.number-1]=g,g.model=b})}_parseMergeCells(d){o.each(d.mergeCells,b=>{this.mergeCellsWithoutStyle(b)})}set model(d){this.name=d.name,this._columns=e.fromModel(this,d.cols),this._parseRows(d),this._parseMergeCells(d),this.dataValidations=new h(d.dataValidations),this.properties=d.properties,this.pageSetup=d.pageSetup,this.headerFooter=d.headerFooter,this.views=d.views,this.autoFilter=d.autoFilter,this._media=d.media.map(b=>new u(this,b)),this.sheetProtection=d.sheetProtection,this.tables=d.tables.reduce((b,g)=>{const S=new a;return S.model=g,b[g.name]=S,b},{}),this.conditionalFormattings=d.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(t,l,c){t("core-js/modules/es.promise"),t("core-js/modules/es.promise.finally"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.values"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.async-iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.find-index"),t("core-js/modules/es.array.find"),t("core-js/modules/es.string.from-code-point"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.number.is-nan"),t("regenerator-runtime/runtime");const o={Workbook:t("./doc/workbook")},r=t("./doc/enums");Object.keys(r).forEach(n=>{o[n]=r[n]}),l.exports=o},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(t,l,c){const o=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");c.bufferToString=function(r){return typeof r=="string"?r:o?o.decode(r):r.toString()}},{}],17:[function(t,l,c){const o=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:r}=t("buffer");c.stringToBuffer=function(n){return typeof n!="string"?n:o?r.from(o.encode(n).buffer):r.from(n)}},{buffer:220}],18:[function(t,l,c){const o=t("./under-dash"),r=t("./col-cache");l.exports=class{constructor(n){this.template=n,this.sheets={}}addCell(n){this.addCellEx(r.decodeEx(n))}getCell(n){return this.findCellEx(r.decodeEx(n),!0)}findCell(n){return this.findCellEx(r.decodeEx(n),!1)}findCellAt(n,s,e){const i=this.sheets[n],u=i&&i[s];return u&&u[e]}addCellEx(n){if(n.top)for(let s=n.top;s<=n.bottom;s++)for(let e=n.left;e<=n.right;e++)this.getCellAt(n.sheetName,s,e);else this.findCellEx(n,!0)}getCellEx(n){return this.findCellEx(n,!0)}findCellEx(n,s){const e=this.findSheet(n,s),i=this.findSheetRow(e,n,s);return this.findRowCell(i,n,s)}getCellAt(n,s,e){const i=this.sheets[n]||(this.sheets[n]=[]),u=i[s]||(i[s]=[]);return u[e]||(u[e]={sheetName:n,address:r.n2l(e)+s,row:s,col:e})}removeCellEx(n){const s=this.findSheet(n);if(!s)return;const e=this.findSheetRow(s,n);e&&delete e[n.col]}forEachInSheet(n,s){const e=this.sheets[n];e&&e.forEach((i,u)=>{i&&i.forEach((a,h)=>{a&&s(a,u,h)})})}forEach(n){o.each(this.sheets,(s,e)=>{this.forEachInSheet(e,n)})}map(n){const s=[];return this.forEach(e=>{s.push(n(e))}),s}findSheet(n,s){const e=n.sheetName;return this.sheets[e]?this.sheets[e]:s?this.sheets[e]=[]:void 0}findSheetRow(n,s,e){const{row:i}=s;return n&&n[i]?n[i]:e?n[i]=[]:void 0}findRowCell(n,s,e){const{col:i}=s;return n&&n[i]?n[i]:e?n[i]=this.template?Object.assign(s,JSON.parse(JSON.stringify(this.template))):s:void 0}spliceRows(n,s,e,i){const u=this.sheets[n];if(u){const a=[];for(let h=0;h<i;h++)a.push([]);u.splice(s,e,...a)}}spliceColumns(n,s,e,i){const u=this.sheets[n];if(u){const a=[];for(let h=0;h<i;h++)a.push(null);o.each(u,h=>{h.splice(s,e,...a)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(t,l,c){const o=/^[A-Z]+\d+$/,r={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:n=>n<=26?1:n<=676?2:3,_fill(n){let s,e,i,u,a,h=1;if(n>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&n>=1){for(;h<=26;)s=this._dictionary[h-1],this._n2l[h]=s,this._l2n[s]=h,h++;this._l2nFill=1}if(this._l2nFill<2&&n>=2){for(h=27;h<=702;)e=h-27,i=e%26,u=Math.floor(e/26),s=this._dictionary[u]+this._dictionary[i],this._n2l[h]=s,this._l2n[s]=h,h++;this._l2nFill=2}if(this._l2nFill<3&&n>=3){for(h=703;h<=16384;)e=h-703,i=e%26,u=Math.floor(e/26)%26,a=Math.floor(e/676),s=this._dictionary[a]+this._dictionary[u]+this._dictionary[i],this._n2l[h]=s,this._l2n[s]=h,h++;this._l2nFill=3}},l2n(n){if(this._l2n[n]||this._fill(n.length),!this._l2n[n])throw new Error("Out of bounds. Invalid column letter: "+n);return this._l2n[n]},n2l(n){if(n<1||n>16384)throw new Error(n+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[n]||this._fill(this._level(n)),this._n2l[n]},_hash:{},validateAddress(n){if(!o.test(n))throw new Error("Invalid Address: "+n);return!0},decodeAddress(n){const s=n.length<5&&this._hash[n];if(s)return s;let e=!1,i="",u=0,a=!1,h="",p=0;for(let d,b=0;b<n.length;b++)if(d=n.charCodeAt(b),!a&&d>=65&&d<=90)e=!0,i+=n[b],u=26*u+d-64;else if(d>=48&&d<=57)a=!0,h+=n[b],p=10*p+d-48;else if(a&&e&&d!==36)break;if(e){if(u>16384)throw new Error("Out of bounds. Invalid column letter: "+i)}else u=void 0;a||(p=void 0);const m={address:n=i+h,col:u,row:p,$col$row:`$${i}$${h}`};return u<=100&&p<=100&&(this._hash[n]=m,this._hash[m.$col$row]=m),m},getAddress(n,s){if(s){const e=this.n2l(s)+n;return this.decodeAddress(e)}return this.decodeAddress(n)},decode(n){const s=n.split(":");if(s.length===2){const e=this.decodeAddress(s[0]),i=this.decodeAddress(s[1]),u={top:Math.min(e.row,i.row),left:Math.min(e.col,i.col),bottom:Math.max(e.row,i.row),right:Math.max(e.col,i.col)};return u.tl=this.n2l(u.left)+u.top,u.br=this.n2l(u.right)+u.bottom,u.dimensions=`${u.tl}:${u.br}`,u}return this.decodeAddress(n)},decodeEx(n){const s=n.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),e=s[1]||s[2],i=s[3],u=i.split(":");if(u.length>1){let h=this.decodeAddress(u[0]),p=this.decodeAddress(u[1]);const m=Math.min(h.row,p.row),d=Math.min(h.col,p.col),b=Math.max(h.row,p.row),g=Math.max(h.col,p.col);return h=this.n2l(d)+m,p=this.n2l(g)+b,{top:m,left:d,bottom:b,right:g,sheetName:e,tl:{address:h,col:d,row:m,$col$row:`$${this.n2l(d)}$${m}`,sheetName:e},br:{address:p,col:g,row:b,$col$row:`$${this.n2l(g)}$${b}`,sheetName:e},dimensions:`${h}:${p}`}}if(i.startsWith("#"))return e?{sheetName:e,error:i}:{error:i};const a=this.decodeAddress(i);return e?{sheetName:e,...a}:a},encodeAddress:(n,s)=>r.n2l(s)+n,encode(){switch(arguments.length){case 2:return r.encodeAddress(arguments[0],arguments[1]);case 4:return`${r.encodeAddress(arguments[0],arguments[1])}:${r.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(n,s){const[e,i,,u,a]=n,[h,p]=s;return h>=e&&h<=u&&p>=i&&p<=a}};l.exports=r},{}],20:[function(t,l,c){const o=(n,s)=>({...n,...s.reduce((e,i)=>(n[i]&&(e[i]={...n[i]}),e),{})}),r=function(n,s,e){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];n[e]&&(s[e]=o(n[e],i))};c.copyStyle=n=>{if(!n)return n;if(s=n,Object.keys(s).length===0)return{};var s;const e={...n};return r(n,e,"font",["color"]),r(n,e,"alignment"),r(n,e,"protection"),n.border&&(r(n,e,"border"),r(n.border,e.border,"top",["color"]),r(n.border,e.border,"left",["color"]),r(n.border,e.border,"bottom",["color"]),r(n.border,e.border,"right",["color"]),r(n.border,e.border,"diagonal",["color"])),n.fill&&(r(n,e,"fill",["fgColor","bgColor","center"]),n.fill.stops&&(e.fill.stops=n.fill.stops.map(i=>o(i,["color"])))),e}},{}],21:[function(t,l,c){(function(o){(function(){const r=t("crypto"),n={hash(s){const e=r.createHash(s);for(var i=arguments.length,u=new Array(i>1?i-1:0),a=1;a<i;a++)u[a-1]=arguments[a];return e.update(o.concat(u)),e.digest()},convertPasswordToHash(s,e,i,u){if(e=e.toLowerCase(),r.getHashes().indexOf(e)<0)throw new Error(`Hash algorithm '${e}' not supported!`);const a=o.from(s,"utf16le");let h=this.hash(e,o.from(i,"base64"),a);for(let p=0;p<u;p++){const m=o.alloc(4);m.writeUInt32LE(p,0),h=this.hash(e,h,m)}return h.toString("base64")},randomBytes:s=>r.randomBytes(s)};l.exports=n}).call(this)}).call(this,t("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(t,l,c){const{SaxesParser:o}=t("saxes"),{PassThrough:r}=t("readable-stream"),{bufferToString:n}=t("./browser-buffer-decode");l.exports=async function*(s){s.pipe&&!s[Symbol.asyncIterator]&&(s=s.pipe(new r));const e=new o;let i;e.on("error",a=>{i=a});let u=[];e.on("opentag",a=>u.push({eventType:"opentag",value:a})),e.on("text",a=>u.push({eventType:"text",value:a})),e.on("closetag",a=>u.push({eventType:"closetag",value:a}));for await(const a of s){if(e.write(n(a)),i)throw i;yield u,u=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(t,l,c){const o=t("./col-cache"),r=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,n=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;l.exports={slideFormula:function(s,e,i){const u=o.decode(e),a=o.decode(i);return s.replace(r,(h,p,m,d,b)=>{if(b)return h;const g=n.exec(d);if(g){const S=g[1],C=g[2].toUpperCase(),I=g[3],D=g[4];if(C.length>3||C.length===3&&C>"XFD")return h;let z=o.l2n(C),P=parseInt(D,10);return S||(z+=a.col-u.col),I||(P+=a.row-u.row),(p||"")+(S||"")+o.n2l(z)+(I||"")+P}return h})}}},{"./col-cache":19}],24:[function(t,l,c){(function(o,r){(function(){const n=t("readable-stream"),s=t("./utils"),e=t("./string-buf");class i{constructor(d,b){this._data=d,this._encoding=b}get length(){return this.toBuffer().length}copy(d,b,g,S){return this.toBuffer().copy(d,b,g,S)}toBuffer(){return this._buffer||(this._buffer=r.from(this._data,this._encoding)),this._buffer}}class u{constructor(d){this._data=d}get length(){return this._data.length}copy(d,b,g,S){return this._data._buf.copy(d,b,g,S)}toBuffer(){return this._data.toBuffer()}}class a{constructor(d){this._data=d}get length(){return this._data.length}copy(d,b,g,S){this._data.copy(d,b,g,S)}toBuffer(){return this._data}}class h{constructor(d){this.size=d,this.buffer=r.alloc(d),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const d=r.alloc(this.iWrite-this.iRead);return this.buffer.copy(d,0,this.iRead,this.iWrite),d}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(d){let b;return d===0?null:d===void 0||d>=this.length?(b=this.toBuffer(),this.iRead=this.iWrite,b):(b=r.alloc(d),this.buffer.copy(b,0,this.iRead,d),this.iRead+=d,b)}write(d,b,g){const S=Math.min(g,this.size-this.iWrite);return d.copy(this.buffer,this.iWrite,b,b+S),this.iWrite+=S,S}}const p=function(m){m=m||{},this.bufSize=m.bufSize||1048576,this.buffers=[],this.batch=m.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};s.inherits(p,n.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return r.concat(this.buffers.map(m=>m.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const d=this.buffers[this.buffers.length-1];if(!d.full)return d}const m=new h(this.bufSize);return this.buffers.push(m),m},async _pipe(m){await Promise.all(this.pipes.map((function(d){return new Promise(b=>{d.write(m.toBuffer(),()=>{b()})})})))},_writeToBuffers(m){let d=0;const b=m.length;for(;d<b;)d+=this._getWritableBuffer().write(m,d,b-d)},async write(m,d,b){let g;if(d instanceof Function&&(b=d,d="utf8"),b=b||s.nop,m instanceof e)g=new u(m);else if(m instanceof r)g=new a(m);else{if(!(typeof m=="string"||m instanceof String||m instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");g=new i(m,d)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(g);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(g),o.nextTick(b)):(await this._pipe(g),b());else this.paused||this.emit("data",g.toBuffer()),this._writeToBuffers(g),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(m,d,b){const g=S=>{S?b(S):(this._flush(),this.pipes.forEach(C=>{C.end()}),this.emit("finish"))};m?this.write(m,d,g):g()},read(m){let d;if(m){for(d=[];m&&this.buffers.length&&!this.buffers[0].eod;){const b=this.buffers[0],g=b.read(m);m-=g.length,d.push(g),b.eod&&b.full&&this.buffers.shift()}return r.concat(d)}return d=this.buffers.map(b=>b.toBuffer()).filter(Boolean),this.buffers=[],r.concat(d)},setEncoding(m){this.encoding=m},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(m){this.pipes.push(m),!this.paused&&this.buffers.length&&this.end()},unpipe(m){this.pipes=this.pipes.filter(d=>d!==m)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),l.exports=p}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(t,l,c){(function(o){(function(){l.exports=class{constructor(r){this._buf=o.alloc(r&&r.size||16384),this._encoding=r&&r.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=o.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(r){r=r||0,this._buffer=void 0,this._inPos=r}_grow(r){let n=2*this._buf.length;for(;n<r;)n*=2;const s=o.alloc(n);this._buf.copy(s,0),this._buf=s}addText(r){this._buffer=void 0;let n=this._inPos+this._buf.write(r,this._inPos,this._encoding);for(;n>=this._buf.length-4;)this._grow(this._inPos+r.length),n=this._inPos+this._buf.write(r,this._inPos,this._encoding);this._inPos=n}addStringBuf(r){r.length&&(this._buffer=void 0,this.length+r.length>this.capacity&&this._grow(this.length+r.length),r._buf.copy(this._buf,this._inPos,0,r.length),this._inPos+=r.length)}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:220}],26:[function(t,l,c){const{toString:o}=Object.prototype,r=/["&<>]/,n={each:function(s,e){s&&(Array.isArray(s)?s.forEach(e):Object.keys(s).forEach(i=>{e(s[i],i)}))},some:function(s,e){return!!s&&(Array.isArray(s)?s.some(e):Object.keys(s).some(i=>e(s[i],i)))},every:function(s,e){return!s||(Array.isArray(s)?s.every(e):Object.keys(s).every(i=>e(s[i],i)))},map:function(s,e){return s?Array.isArray(s)?s.map(e):Object.keys(s).map(i=>e(s[i],i)):[]},keyBy:(s,e)=>s.reduce((i,u)=>(i[u[e]]=u,i),{}),isEqual:function(s,e){const i=typeof s,u=typeof e,a=Array.isArray(s),h=Array.isArray(e);let p;if(i!==u)return!1;switch(typeof s){case"object":if(a||h)return!(!a||!h)&&s.length===e.length&&s.every((m,d)=>{const b=e[d];return n.isEqual(m,b)});if(s===null||e===null)return s===e;if(p=Object.keys(s),Object.keys(e).length!==p.length)return!1;for(const m of p)if(!e.hasOwnProperty(m))return!1;return n.every(s,(m,d)=>{const b=e[d];return n.isEqual(m,b)});default:return s===e}},escapeHtml(s){const e=r.exec(s);if(!e)return s;let i="",u="",a=0,h=e.index;for(;h<s.length;h++){switch(s.charAt(h)){case'"':u=""";break;case"&":u="&";break;case"'":u="'";break;case"<":u="<";break;case">":u=">";break;default:continue}a!==h&&(i+=s.substring(a,h)),a=h+1,i+=u}return a!==h?i+s.substring(a,h):i},strcmp:(s,e)=>s<e?-1:s>e?1:0,isUndefined:s=>o.call(s)==="[object Undefined]",isObject:s=>o.call(s)==="[object Object]",deepMerge(){const s=arguments[0]||{},{length:e}=arguments;let i,u,a;function h(p,m){i=s[m],a=Array.isArray(p),n.isObject(p)||a?(a?(a=!1,u=i&&Array.isArray(i)?i:[]):u=i&&n.isObject(i)?i:{},s[m]=n.deepMerge(u,p)):n.isUndefined(p)||(s[m]=p)}for(let p=0;p<e;p++)n.each(arguments[p],h);return s}};l.exports=n},{}],27:[function(t,l,c){(function(o,r){(function(){const n=t("fs"),s=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,e={nop(){},promiseImmediate:i=>new Promise(u=>{o.setImmediate?r(()=>{u(i)}):setTimeout(()=>{u(i)},1)}),inherits:function(i,u,a,h){i.super_=u,h||(h=a,a=null),a&&Object.keys(a).forEach(m=>{Object.defineProperty(i,m,Object.getOwnPropertyDescriptor(a,m))});const p={constructor:{value:i,enumerable:!1,writable:!1,configurable:!0}};h&&Object.keys(h).forEach(m=>{p[m]=Object.getOwnPropertyDescriptor(h,m)}),i.prototype=Object.create(u.prototype,p)},dateToExcel:(i,u)=>25569+i.getTime()/864e5-(u?1462:0),excelToDate(i,u){const a=Math.round(24*(i-25569+(u?1462:0))*3600*1e3);return new Date(a)},parsePath(i){const u=i.lastIndexOf("/");return{path:i.substring(0,u),name:i.substring(u+1)}},getRelsPath(i){const u=e.parsePath(i);return`${u.path}/_rels/${u.name}.rels`},xmlEncode(i){const u=s.exec(i);if(!u)return i;let a="",h="",p=0,m=u.index;for(;m<i.length;m++){const d=i.charCodeAt(m);switch(d){case 34:h=""";break;case 38:h="&";break;case 39:h="'";break;case 60:h="<";break;case 62:h=">";break;case 127:h="";break;default:if(d<=31&&(d<=8||d>=11&&d!==13)){h="";break}continue}p!==m&&(a+=i.substring(p,m)),p=m+1,h&&(a+=h)}return p!==m?a+i.substring(p,m):a},xmlDecode:i=>i.replace(/&([a-z]*);/g,u=>{switch(u){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return u}}),validInt(i){const u=parseInt(i,10);return Number.isNaN(u)?0:u},isDateFmt(i){return i?(i=(i=i.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:i=>new Promise(u=>{n.access(i,n.constants.F_OK,a=>{u(!a)})})},toIsoDateString:i=>i.toIsoString().subsstr(0,10),parseBoolean:i=>i===!0||i==="true"||i===1||i==="1"};l.exports=e}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{},t("timers").setImmediate)},{fs:216,timers:523}],28:[function(t,l,c){const o=t("./under-dash"),r=t("./utils");function n(i,u,a){i.push(` ${u}="${r.xmlEncode(a.toString())}"`)}function s(i,u){if(u){const a=[];o.each(u,(h,p)=>{h!==void 0&&n(a,p,h)}),i.push(a.join(""))}}class e{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(u){const a=this._xml;a.push("<?xml"),s(a,u),a.push(`?>
|
|
256
|
+
`}}customElements.get("ng-expand-icon")||customElements.define("ng-expand-icon",fd),customElements.get("ng-expand-check")||customElements.define("ng-expand-check",pd),customElements.get("ng-expand-button")||customElements.define("ng-expand-button",md);var pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gd(vt){return vt&&vt.__esModule&&Object.prototype.hasOwnProperty.call(vt,"default")?vt.default:vt}function Pl(vt){throw new Error('Could not dynamically require "'+vt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ou={exports:{}};/*! ExcelJS 19-10-2023 */var Cu;function bd(){return Cu||(Cu=1,(function(vt,E){(function(t){vt.exports=t()})((function(){return(function t(l,c,o){function r(e,i){if(!c[e]){if(!l[e]){var u=typeof Pl=="function"&&Pl;if(!i&&u)return u(e,!0);if(n)return n(e,!0);var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}var h=c[e]={exports:{}};l[e][0].call(h.exports,(function(p){return r(l[e][1][p]||p)}),h,h.exports,t,l,c,o)}return c[e].exports}for(var n=typeof Pl=="function"&&Pl,s=0;s<o.length;s++)r(o[s]);return r})({1:[function(t,l,c){const o=t("fs"),r=t("fast-csv"),n=t("dayjs/plugin/customParseFormat"),s=t("dayjs/plugin/utc"),e=t("dayjs").extend(n).extend(s),i=t("../utils/stream-buf"),{fs:{exists:u}}=t("../utils/utils"),a={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};l.exports=class{constructor(h){this.workbook=h,this.worksheet=null}async readFile(h,p){if(p=p||{},!await u(h))throw new Error("File not found: "+h);const m=o.createReadStream(h),d=await this.read(m,p);return m.close(),d}read(h,p){return p=p||{},new Promise((m,d)=>{const b=this.workbook.addWorksheet(p.sheetName),g=p.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],S=p.map||function(I){if(I==="")return null;const D=Number(I);if(!Number.isNaN(D)&&D!==1/0)return D;const z=g.reduce((B,F)=>{if(B)return B;const W=e(I,F,!0);return W.isValid()?W:null},null);if(z)return new Date(z.valueOf());const P=a[I];return P!==void 0?P:I},C=r.parse(p.parserOptions).on("data",I=>{b.addRow(I.map(S))}).on("end",()=>{C.emit("worksheet",b)});C.on("worksheet",m).on("error",d),h.pipe(C)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(h,p){return new Promise((m,d)=>{p=p||{};const b=this.workbook.getWorksheet(p.sheetName||p.sheetId),g=r.format(p.formatterOptions);h.on("finish",()=>{m()}),g.on("error",d),g.pipe(h);const{dateFormat:S,dateUTC:C}=p,I=p.map||(P=>{if(P){if(P.text||P.hyperlink)return P.hyperlink||P.text||"";if(P.formula||P.result)return P.result||"";if(P instanceof Date)return S?C?e.utc(P).format(S):e(P).format(S):C?e.utc(P).format():e(P).format();if(P.error)return P.error;if(typeof P=="object")return JSON.stringify(P)}return P}),D=p.includeEmptyRows===void 0||p.includeEmptyRows;let z=1;b&&b.eachRow((P,B)=>{if(D)for(;z++<B-1;)g.write([]);const{values:F}=P;F.shift(),g.write(F.map(I)),z=B}),g.end()})}writeFile(h,p){const m={encoding:(p=p||{}).encoding||"utf8"},d=o.createWriteStream(h,m);return this.write(d,p)}async writeBuffer(h){const p=new i;return await this.write(p,h),p.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(t,l,c){const o=t("../utils/col-cache");class r{constructor(s,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=s,e)if(typeof e=="string"){const u=o.decodeAddress(e);this.nativeCol=u.col+i,this.nativeColOff=0,this.nativeRow=u.row+i,this.nativeRowOff=0}else e.nativeCol!==void 0?(this.nativeCol=e.nativeCol||0,this.nativeColOff=e.nativeColOff||0,this.nativeRow=e.nativeRow||0,this.nativeRowOff=e.nativeRowOff||0):e.col!==void 0?(this.col=e.col+i,this.row=e.row+i):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(s){return s instanceof r||s==null?s:new r(s)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(s){this.nativeCol=Math.floor(s),this.nativeColOff=Math.floor((s-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(s){this.nativeRow=Math.floor(s),this.nativeRowOff=Math.floor((s-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(s){this.nativeCol=s.nativeCol,this.nativeColOff=s.nativeColOff,this.nativeRow=s.nativeRow,this.nativeRowOff=s.nativeRowOff}}l.exports=r},{"../utils/col-cache":19}],3:[function(t,l,c){const o=t("../utils/col-cache"),r=t("../utils/under-dash"),n=t("./enums"),{slideFormula:s}=t("../utils/shared-formula"),e=t("./note");class i{constructor(h,p,m){if(!h||!p)throw new Error("A Cell needs a Row");this._row=h,this._column=p,o.validateAddress(m),this._address=m,this._value=u.create(i.Types.Null,this),this.style=this._mergeStyle(h.style,p.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(h){this.style.numFmt=h}get font(){return this.style.font}set font(h){this.style.font=h}get alignment(){return this.style.alignment}set alignment(h){this.style.alignment=h}get border(){return this.style.border}set border(h){this.style.border=h}get fill(){return this.style.fill}set fill(h){this.style.fill=h}get protection(){return this.style.protection}set protection(h){this.style.protection=h}_mergeStyle(h,p,m){const d=h&&h.numFmt||p&&p.numFmt;d&&(m.numFmt=d);const b=h&&h.font||p&&p.font;b&&(m.font=b);const g=h&&h.alignment||p&&p.alignment;g&&(m.alignment=g);const S=h&&h.border||p&&p.border;S&&(m.border=S);const C=h&&h.fill||p&&p.fill;C&&(m.fill=C);const I=h&&h.protection||p&&p.protection;return I&&(m.protection=I),m}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===i.Types.Merge}merge(h,p){this._value.release(),this._value=u.create(i.Types.Merge,this,h),p||(this.style=h.style)}unmerge(){this.type===i.Types.Merge&&(this._value.release(),this._value=u.create(i.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(h){return this._value.type===i.Types.Merge&&this._value.isMergedTo(h)}get master(){return this.type===i.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===i.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(h){this.type!==i.Types.Merge?(this._value.release(),this._value=u.create(u.getType(h),this,h)):this._value.master.value=h}get note(){return this._comment&&this._comment.note}set note(h){this._comment=new e(h)}get text(){return this._value.toString()}get html(){return r.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(h){this.type===i.Types.String&&(this._value=u.create(i.Types.Hyperlink,this,{text:this._value.value,hyperlink:h}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:h}=this._row;return{sheetName:h.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(h){this.names=[h]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(h){const{definedNames:p}=this.workbook;p.removeAllNames(this.fullAddress),h.forEach(m=>{p.addEx(this.fullAddress,m)})}addName(h){this.workbook.definedNames.addEx(this.fullAddress,h)}removeName(h){this.workbook.definedNames.removeEx(this.fullAddress,h)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(h){this._dataValidations.add(this.address,h)}get model(){const{model:h}=this._value;return h.style=this.style,this._comment&&(h.comment=this._comment.model),h}set model(h){if(this._value.release(),this._value=u.create(h.type,this),this._value.model=h,h.comment)switch(h.comment.type){case"note":this._comment=e.fromModel(h.comment)}h.style?this.style=h.style:this.style={}}}i.Types=n.ValueType;const u={getType:a=>a==null?i.Types.Null:a instanceof String||typeof a=="string"?i.Types.String:typeof a=="number"?i.Types.Number:typeof a=="boolean"?i.Types.Boolean:a instanceof Date?i.Types.Date:a.text&&a.hyperlink?i.Types.Hyperlink:a.formula||a.sharedFormula?i.Types.Formula:a.richText?i.Types.RichText:a.sharedString?i.Types.SharedString:a.error?i.Types.Error:i.Types.JSON,types:[{t:i.Types.Null,f:class{constructor(a){this.model={address:a.address,type:i.Types.Null}}get value(){return null}set value(a){}get type(){return i.Types.Null}get effectiveType(){return i.Types.Null}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return""}release(){}toString(){return""}}},{t:i.Types.Number,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Number,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.Number}get effectiveType(){return i.Types.Number}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:i.Types.String,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.String,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.String}get effectiveType(){return i.Types.String}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:i.Types.Date,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Date,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.Date}get effectiveType(){return i.Types.Date}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:i.Types.Hyperlink,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Hyperlink,text:h?h.text:void 0,hyperlink:h?h.hyperlink:void 0},h&&h.tooltip&&(this.model.tooltip=h.tooltip)}get value(){const a={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(a.tooltip=this.model.tooltip),a}set value(a){this.model={text:a.text,hyperlink:a.hyperlink},a.tooltip&&(this.model.tooltip=a.tooltip)}get text(){return this.model.text}set text(a){this.model.text=a}get hyperlink(){return this.model.hyperlink}set hyperlink(a){this.model.hyperlink=a}get type(){return i.Types.Hyperlink}get effectiveType(){return i.Types.Hyperlink}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:i.Types.Formula,f:class{constructor(a,h){this.cell=a,this.model={address:a.address,type:i.Types.Formula,shareType:h?h.shareType:void 0,ref:h?h.ref:void 0,formula:h?h.formula:void 0,sharedFormula:h?h.sharedFormula:void 0,result:h?h.result:void 0}}_copyModel(a){const h={},p=m=>{const d=a[m];d&&(h[m]=d)};return p("formula"),p("result"),p("ref"),p("shareType"),p("sharedFormula"),h}get value(){return this._copyModel(this.model)}set value(a){this.model=this._copyModel(a)}validate(a){switch(u.getType(a)){case i.Types.Null:case i.Types.String:case i.Types.Number:case i.Types.Date:break;case i.Types.Hyperlink:case i.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(a){this.model.formula=a}get formulaType(){return this.model.formula?n.FormulaType.Master:this.model.sharedFormula?n.FormulaType.Shared:n.FormulaType.None}get result(){return this.model.result}set result(a){this.model.result=a}get type(){return i.Types.Formula}get effectiveType(){const a=this.model.result;return a==null?n.ValueType.Null:a instanceof String||typeof a=="string"?n.ValueType.String:typeof a=="number"?n.ValueType.Number:a instanceof Date?n.ValueType.Date:a.text&&a.hyperlink?n.ValueType.Hyperlink:a.formula?n.ValueType.Formula:n.ValueType.Null}get address(){return this.model.address}set address(a){this.model.address=a}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:a}=this.cell,h=a.findCell(this.model.sharedFormula);this._translatedFormula=h&&s(h.formula,h.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:i.Types.Merge,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Merge,master:h?h.address:void 0},this._master=h,h&&h.addMergeRef()}get value(){return this._master.value}set value(a){a instanceof i?(this._master&&this._master.releaseMergeRef(),a.addMergeRef(),this._master=a):this._master.value=a}isMergedTo(a){return a===this._master}get master(){return this._master}get type(){return i.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:i.Types.JSON,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.String,value:JSON.stringify(h),rawValue:h}}get value(){return this.model.rawValue}set value(a){this.model.rawValue=a,this.model.value=JSON.stringify(a)}get type(){return i.Types.String}get effectiveType(){return i.Types.String}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:i.Types.SharedString,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.SharedString,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.SharedString}get effectiveType(){return i.Types.SharedString}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:i.Types.RichText,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.String,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}toString(){return this.model.value.richText.map(a=>a.text).join("")}get type(){return i.Types.RichText}get effectiveType(){return i.Types.RichText}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:i.Types.Boolean,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Boolean,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.Boolean}get effectiveType(){return i.Types.Boolean}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:i.Types.Error,f:class{constructor(a,h){this.model={address:a.address,type:i.Types.Error,value:h}}get value(){return this.model.value}set value(a){this.model.value=a}get type(){return i.Types.Error}get effectiveType(){return i.Types.Error}get address(){return this.model.address}set address(a){this.model.address=a}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((a,h)=>(a[h.t]=h.f,a),[]),create(a,h,p){const m=this.types[a];if(!m)throw new Error("Could not create Value of type "+a);return new m(h,p)}};l.exports=i},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(t,l,c){const o=t("../utils/under-dash"),r=t("./enums"),n=t("../utils/col-cache");class s{constructor(i,u,a){this._worksheet=i,this._number=u,a!==!1&&(this.defn=a)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return n.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(i){i?(this.key=i.key,this.width=i.width!==void 0?i.width:9,this.outlineLevel=i.outlineLevel,i.style?this.style=i.style:this.style={},this.header=i.header,this._hidden=!!i.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(i){i!==void 0?(this._header=i,this.headers.forEach((u,a)=>{this._worksheet.getCell(a+1,this.number).value=u})):this._header=void 0}get key(){return this._key}set key(i){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=i,i&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(i){this._hidden=i}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(i){this._outlineLevel=i}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(i){return this.width===i.width&&this.hidden===i.hidden&&this.outlineLevel===i.outlineLevel&&o.isEqual(this.style,i.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const i=this.style;return!i||!(i.font||i.numFmt||i.alignment||i.border||i.fill||i.protection)}get headerCount(){return this.headers.length}eachCell(i,u){const a=this.number;u||(u=i,i=null),this._worksheet.eachRow(i,(h,p)=>{u(h.getCell(a),p)})}get values(){const i=[];return this.eachCell((u,a)=>{u&&u.type!==r.ValueType.Null&&(i[a]=u.value)}),i}set values(i){if(!i)return;const u=this.number;let a=0;i.hasOwnProperty("0")&&(a=1),i.forEach((h,p)=>{this._worksheet.getCell(p+a,u).value=h})}_applyStyle(i,u){return this.style[i]=u,this.eachCell(a=>{a[i]=u}),u}get numFmt(){return this.style.numFmt}set numFmt(i){this._applyStyle("numFmt",i)}get font(){return this.style.font}set font(i){this._applyStyle("font",i)}get alignment(){return this.style.alignment}set alignment(i){this._applyStyle("alignment",i)}get protection(){return this.style.protection}set protection(i){this._applyStyle("protection",i)}get border(){return this.style.border}set border(i){this._applyStyle("border",i)}get fill(){return this.style.fill}set fill(i){this._applyStyle("fill",i)}static toModel(i){const u=[];let a=null;return i&&i.forEach((h,p)=>{h.isDefault?a&&(a=null):a&&h.equivalentTo(a)?a.max=p+1:(a={min:p+1,max:p+1,width:h.width!==void 0?h.width:9,style:h.style,isCustomWidth:h.isCustomWidth,hidden:h.hidden,outlineLevel:h.outlineLevel,collapsed:h.collapsed},u.push(a))}),u.length?u:void 0}static fromModel(i,u){const a=[];let h=1,p=0;for(u=(u=u||[]).sort((function(m,d){return m.min-d.min}));p<u.length;){const m=u[p++];for(;h<m.min;)a.push(new s(i,h++));for(;h<=m.max;)a.push(new s(i,h++,m))}return a.length?a:null}}l.exports=s},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(t,l,c){l.exports=class{constructor(o){this.model=o||{}}add(o,r){return this.model[o]=r}find(o){return this.model[o]}remove(o){this.model[o]=void 0}}},{}],6:[function(t,l,c){const o=t("../utils/under-dash"),r=t("../utils/col-cache"),n=t("../utils/cell-matrix"),s=t("./range"),e=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;l.exports=class{constructor(){this.matrixMap={}}getMatrix(i){return this.matrixMap[i]||(this.matrixMap[i]=new n)}add(i,u){const a=r.decodeEx(i);this.addEx(a,u)}addEx(i,u){const a=this.getMatrix(u);if(i.top)for(let h=i.left;h<=i.right;h++)for(let p=i.top;p<=i.bottom;p++){const m={sheetName:i.sheetName,address:r.n2l(h)+p,row:p,col:h};a.addCellEx(m)}else a.addCellEx(i)}remove(i,u){const a=r.decodeEx(i);this.removeEx(a,u)}removeEx(i,u){this.getMatrix(u).removeCellEx(i)}removeAllNames(i){o.each(this.matrixMap,u=>{u.removeCellEx(i)})}forEach(i){o.each(this.matrixMap,(u,a)=>{u.forEach(h=>{i(a,h)})})}getNames(i){return this.getNamesEx(r.decodeEx(i))}getNamesEx(i){return o.map(this.matrixMap,(u,a)=>u.findCellEx(i)&&a).filter(Boolean)}_explore(i,u){u.mark=!1;const{sheetName:a}=u,h=new s(u.row,u.col,u.row,u.col,a);let p,m;function d(g,S){const C=i.findCellAt(a,g,u.col);return!(!C||!C.mark)&&(h[S]=g,C.mark=!1,!0)}for(m=u.row-1;d(m,"top");m--);for(m=u.row+1;d(m,"bottom");m++);function b(g,S){const C=[];for(m=h.top;m<=h.bottom;m++){const I=i.findCellAt(a,m,g);if(!I||!I.mark)return!1;C.push(I)}h[S]=g;for(let I=0;I<C.length;I++)C[I].mark=!1;return!0}for(p=u.col-1;b(p,"left");p--);for(p=u.col+1;b(p,"right");p++);return h}getRanges(i,u){return(u=u||this.matrixMap[i])?(u.forEach(a=>{a.mark=!0}),{name:i,ranges:u.map(a=>a.mark&&this._explore(u,a)).filter(Boolean).map(a=>a.$shortRange)}):{name:i,ranges:[]}}normaliseMatrix(i,u){i.forEachInSheet(u,(a,h,p)=>{a&&(a.row===h&&a.col===p||(a.row=h,a.col=p,a.address=r.n2l(p)+h))})}spliceRows(i,u,a,h){o.each(this.matrixMap,p=>{p.spliceRows(i,u,a,h),this.normaliseMatrix(p,i)})}spliceColumns(i,u,a,h){o.each(this.matrixMap,p=>{p.spliceColumns(i,u,a,h),this.normaliseMatrix(p,i)})}get model(){return o.map(this.matrixMap,(i,u)=>this.getRanges(u,i)).filter(i=>i.ranges.length)}set model(i){const u=this.matrixMap={};i.forEach(a=>{const h=u[a.name]=new n;a.ranges.forEach(p=>{e.test(p.split("!").pop()||"")&&h.addCell(p)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(t,l,c){l.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(t,l,c){const o=t("../utils/col-cache"),r=t("./anchor");l.exports=class{constructor(n,s){this.worksheet=n,this.model=s}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(n){let{type:s,imageId:e,range:i,hyperlinks:u}=n;if(this.type=s,this.imageId=e,s==="image")if(typeof i=="string"){const a=o.decode(i);this.range={tl:new r(this.worksheet,{col:a.left,row:a.top},-1),br:new r(this.worksheet,{col:a.right,row:a.bottom},0),editAs:"oneCell"}}else this.range={tl:new r(this.worksheet,i.tl,0),br:i.br&&new r(this.worksheet,i.br,0),ext:i.ext,editAs:i.editAs,hyperlinks:u||i.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(t,l,c){const o=t("../utils/under-dash");class r{constructor(s){this.note=s}get model(){let s=null;switch(typeof this.note){case"string":s={type:"note",note:{texts:[{text:this.note}]}};break;default:s={type:"note",note:this.note}}return o.deepMerge({},r.DEFAULT_CONFIGS,s)}set model(s){const{note:e}=s,{texts:i}=e;i.length===1&&Object.keys(i[0]).length===1?this.note=i[0].text:this.note=e}static fromModel(s){const e=new r;return e.model=s,e}}r.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},l.exports=r},{"../utils/under-dash":26}],10:[function(t,l,c){const o=t("../utils/col-cache");class r{constructor(){this.decode(arguments)}setTLBR(s,e,i,u,a){if(arguments.length<4){const h=o.decodeAddress(s),p=o.decodeAddress(e);this.model={top:Math.min(h.row,p.row),left:Math.min(h.col,p.col),bottom:Math.max(h.row,p.row),right:Math.max(h.col,p.col),sheetName:i},this.setTLBR(h.row,h.col,p.row,p.col,a)}else this.model={top:Math.min(s,i),left:Math.min(e,u),bottom:Math.max(s,i),right:Math.max(e,u),sheetName:a}}decode(s){switch(s.length){case 5:this.setTLBR(s[0],s[1],s[2],s[3],s[4]);break;case 4:this.setTLBR(s[0],s[1],s[2],s[3]);break;case 3:this.setTLBR(s[0],s[1],s[2]);break;case 2:this.setTLBR(s[0],s[1]);break;case 1:{const e=s[0];if(e instanceof r)this.model={top:e.model.top,left:e.model.left,bottom:e.model.bottom,right:e.model.right,sheetName:e.sheetName};else if(e instanceof Array)this.decode(e);else if(e.top&&e.left&&e.bottom&&e.right)this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName};else{const i=o.decodeEx(e);i.top?this.model={top:i.top,left:i.left,bottom:i.bottom,right:i.right,sheetName:i.sheetName}:this.model={top:i.row,left:i.col,bottom:i.row,right:i.col,sheetName:i.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+s.length)}}get top(){return this.model.top||1}set top(s){this.model.top=s}get left(){return this.model.left||1}set left(s){this.model.left=s}get bottom(){return this.model.bottom||1}set bottom(s){this.model.bottom=s}get right(){return this.model.right||1}set right(s){this.model.right=s}get sheetName(){return this.model.sheetName}set sheetName(s){this.model.sheetName=s}get _serialisedSheetName(){const{sheetName:s}=this.model;return s?/^[a-zA-Z0-9]*$/.test(s)?s+"!":`'${s}'!`:""}expand(s,e,i,u){(!this.model.top||s<this.top)&&(this.top=s),(!this.model.left||e<this.left)&&(this.left=e),(!this.model.bottom||i>this.bottom)&&(this.bottom=i),(!this.model.right||u>this.right)&&(this.right=u)}expandRow(s){if(s){const{dimensions:e,number:i}=s;e&&this.expand(i,e.min,i,e.max)}}expandToAddress(s){const e=o.decodeEx(s);this.expand(e.row,e.col,e.row,e.col)}get tl(){return o.n2l(this.left)+this.top}get $t$l(){return`$${o.n2l(this.left)}$${this.top}`}get br(){return o.n2l(this.right)+this.bottom}get $b$r(){return`$${o.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(s){return(!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&!(s.bottom<this.top)&&!(s.top>this.bottom)&&!(s.right<this.left)&&!(s.left>this.right)}contains(s){const e=o.decodeEx(s);return this.containsEx(e)}containsEx(s){return(!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&s.row>=this.top&&s.row<=this.bottom&&s.col>=this.left&&s.col<=this.right}forEachAddress(s){for(let e=this.left;e<=this.right;e++)for(let i=this.top;i<=this.bottom;i++)s(o.encodeAddress(i,e),i,e)}}l.exports=r},{"../utils/col-cache":19}],11:[function(t,l,c){const o=t("../utils/under-dash"),r=t("./enums"),n=t("../utils/col-cache"),s=t("./cell");l.exports=class{constructor(e,i){this._worksheet=e,this._number=i,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(e){return this._cells[e-1]}getCellEx(e){let i=this._cells[e.col-1];if(!i){const u=this._worksheet.getColumn(e.col);i=new s(this,u,e.address),this._cells[e.col-1]=i}return i}getCell(e){if(typeof e=="string"){const i=this._worksheet.getColumnKey(e);e=i?i.number:n.l2n(e)}return this._cells[e-1]||this.getCellEx({address:n.encodeAddress(this._number,e),row:this._number,col:e})}splice(e,i){const u=e+i;for(var a=arguments.length,h=new Array(a>2?a-2:0),p=2;p<a;p++)h[p-2]=arguments[p];const m=h.length-i,d=this._cells.length;let b,g,S;if(m<0)for(b=e+h.length;b<=d;b++)S=this._cells[b-1],g=this._cells[b-m-1],g?(S=this.getCell(b),S.value=g.value,S.style=g.style,S._comment=g._comment):S&&(S.value=null,S.style={},S._comment=void 0);else if(m>0)for(b=d;b>=u;b--)g=this._cells[b-1],g?(S=this.getCell(b+m),S.value=g.value,S.style=g.style,S._comment=g._comment):this._cells[b+m-1]=void 0;for(b=0;b<h.length;b++)S=this.getCell(e+b),S.value=h[b],S.style={},S._comment=void 0}eachCell(e,i){if(i||(i=e,e=null),e&&e.includeEmpty){const u=this._cells.length;for(let a=1;a<=u;a++)i(this.getCell(a),a)}else this._cells.forEach((u,a)=>{u&&u.type!==r.ValueType.Null&&i(u,a+1)})}addPageBreak(e,i){const u=this._worksheet,a=Math.max(0,e-1)||0,h=Math.max(0,i-1)||16838,p={id:this._number,max:h,man:1};a&&(p.min=a),u.rowBreaks.push(p)}get values(){const e=[];return this._cells.forEach(i=>{i&&i.type!==r.ValueType.Null&&(e[i.col]=i.value)}),e}set values(e){if(this._cells=[],e)if(e instanceof Array){let i=0;e.hasOwnProperty("0")&&(i=1),e.forEach((u,a)=>{u!==void 0&&(this.getCellEx({address:n.encodeAddress(this._number,a+i),row:this._number,col:a+i}).value=u)})}else this._worksheet.eachColumnKey((i,u)=>{e[u]!==void 0&&(this.getCellEx({address:n.encodeAddress(this._number,i.number),row:this._number,col:i.number}).value=e[u])})}get hasValues(){return o.some(this._cells,e=>e&&e.type!==r.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let e=0;return this.eachCell(()=>{e++}),e}get dimensions(){let e=0,i=0;return this._cells.forEach(u=>{u&&u.type!==r.ValueType.Null&&((!e||e>u.col)&&(e=u.col),i<u.col&&(i=u.col))}),e>0?{min:e,max:i}:null}_applyStyle(e,i){return this.style[e]=i,this._cells.forEach(u=>{u&&(u[e]=i)}),i}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle("numFmt",e)}get font(){return this.style.font}set font(e){this._applyStyle("font",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle("alignment",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle("protection",e)}get border(){return this.style.border}set border(e){this._applyStyle("border",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle("fill",e)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const e=[];let i=0,u=0;return this._cells.forEach(a=>{if(a){const h=a.model;h&&((!i||i>a.col)&&(i=a.col),u<a.col&&(u=a.col),e.push(h))}}),this.height||e.length?{cells:e,number:this.number,min:i,max:u,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(e){if(e.number!==this._number)throw new Error("Invalid row number in model");let i;this._cells=[],e.cells.forEach(u=>{switch(u.type){case s.Types.Merge:break;default:{let a;if(u.address)a=n.decodeAddress(u.address);else if(i){const{row:h}=i,p=i.col+1;a={row:h,col:p,address:n.encodeAddress(h,p),$col$row:`$${n.n2l(p)}$${h}`}}i=a,this.getCellEx(a).model=u;break}}}),e.height?this.height=e.height:delete this.height,this.hidden=e.hidden,this.outlineLevel=e.outlineLevel||0,this.style=e.style&&JSON.parse(JSON.stringify(e.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(t,l,c){const o=t("../utils/col-cache");class r{constructor(s,e,i){this.table=s,this.column=e,this.index=i}_set(s,e){this.table.cacheState(),this.column[s]=e}get name(){return this.column.name}set name(s){this._set("name",s)}get filterButton(){return this.column.filterButton}set filterButton(s){this.column.filterButton=s}get style(){return this.column.style}set style(s){this.column.style=s}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(s){this._set("totalsRowLabel",s)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(s){this._set("totalsRowFunction",s)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(s){this._set("totalsRowResult",s)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(s){this._set("totalsRowFormula",s)}}l.exports=class{constructor(n,s){this.worksheet=n,s&&(this.table=s,this.validate(),this.store())}getFormula(n){switch(n.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${n.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${n.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${n.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${n.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${n.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${n.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${n.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${n.name}])`;case"custom":return n.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+n.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:n}=this,s=(m,d,b)=>{m[d]===void 0&&(m[d]=b)};s(n,"headerRow",!0),s(n,"totalsRow",!1),s(n,"style",{}),s(n.style,"theme","TableStyleMedium2"),s(n.style,"showFirstColumn",!1),s(n.style,"showLastColumn",!1),s(n.style,"showRowStripes",!1),s(n.style,"showColumnStripes",!1);const e=(m,d)=>{if(!m)throw new Error(d)};e(n.ref,"Table must have ref"),e(n.columns,"Table must have column definitions"),e(n.rows,"Table must have row definitions"),n.tl=o.decodeAddress(n.ref);const{row:i,col:u}=n.tl;e(i>0,"Table must be on valid row"),e(u>0,"Table must be on valid col");const{width:a,filterHeight:h,tableHeight:p}=this;n.autoFilterRef=o.encode(i,u,i+h-1,u+a-1),n.tableRef=o.encode(i,u,i+p-1,u+a-1),n.columns.forEach((m,d)=>{e(m.name,`Column ${d} must have a name`),d===0?s(m,"totalsRowLabel","Total"):(s(m,"totalsRowFunction","none"),m.totalsRowFormula=this.getFormula(m))})}store(){const n=(h,p)=>{p&&Object.keys(p).forEach(m=>{h[m]=p[m]})},{worksheet:s,table:e}=this,{row:i,col:u}=e.tl;let a=0;if(e.headerRow){const h=s.getRow(i+a++);e.columns.forEach((p,m)=>{const{style:d,name:b}=p,g=h.getCell(u+m);g.value=b,n(g,d)})}if(e.rows.forEach(h=>{const p=s.getRow(i+a++);h.forEach((m,d)=>{const b=p.getCell(u+d);b.value=m,n(b,e.columns[d].style)})}),e.totalsRow){const h=s.getRow(i+a++);e.columns.forEach((p,m)=>{const d=h.getCell(u+m);if(m===0)d.value=p.totalsRowLabel;else{const b=this.getFormula(p);d.value=b?{formula:p.totalsRowFormula,result:p.totalsRowResult}:null}n(d,p.style)})}}load(n){const{table:s}=this,{row:e,col:i}=s.tl;let u=0;if(s.headerRow){const a=n.getRow(e+u++);s.columns.forEach((h,p)=>{a.getCell(i+p).value=h.name})}if(s.rows.forEach(a=>{const h=n.getRow(e+u++);a.forEach((p,m)=>{h.getCell(i+m).value=p})}),s.totalsRow){const a=n.getRow(e+u++);s.columns.forEach((h,p)=>{const m=a.getCell(i+p);p===0?m.value=h.totalsRowLabel:this.getFormula(h)&&(m.value={formula:h.totalsRowFormula,result:h.totalsRowResult})})}}get model(){return this.table}set model(n){this.table=n}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const n=o.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let s=0;s<this._cache.tableHeight;s++){const e=this.worksheet.getRow(n.row+s);for(let i=0;i<this._cache.width;i++)e.getCell(n.col+i).value=null}else{for(let s=this.tableHeight;s<this._cache.tableHeight;s++){const e=this.worksheet.getRow(n.row+s);for(let i=0;i<this._cache.width;i++)e.getCell(n.col+i).value=null}for(let s=0;s<this.tableHeight;s++){const e=this.worksheet.getRow(n.row+s);for(let i=this.width;i<this._cache.width;i++)e.getCell(n.col+i).value=null}}this.store()}addRow(n,s){this.cacheState(),s===void 0?this.table.rows.push(n):this.table.rows.splice(s,0,n)}removeRows(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(n,s)}getColumn(n){const s=this.table.columns[n];return new r(this,s,n)}addColumn(n,s,e){this.cacheState(),e===void 0?(this.table.columns.push(n),this.table.rows.forEach((i,u)=>{i.push(s[u])})):(this.table.columns.splice(e,0,n),this.table.rows.forEach((i,u)=>{i.splice(e,0,s[u])}))}removeColumns(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(n,s),this.table.rows.forEach(e=>{e.splice(n,s)})}_assign(n,s,e){this.cacheState(),n[s]=e}get ref(){return this.table.ref}set ref(n){this._assign(this.table,"ref",n)}get name(){return this.table.name}set name(n){this.table.name=n}get displayName(){return this.table.displyName||this.table.name}set displayNamename(n){this.table.displayName=n}get headerRow(){return this.table.headerRow}set headerRow(n){this._assign(this.table,"headerRow",n)}get totalsRow(){return this.table.totalsRow}set totalsRow(n){this._assign(this.table,"totalsRow",n)}get theme(){return this.table.style.name}set theme(n){this.table.style.name=n}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(n){this.table.style.showFirstColumn=n}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(n){this.table.style.showLastColumn=n}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(n){this.table.style.showRowStripes=n}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(n){this.table.style.showColumnStripes=n}}},{"../utils/col-cache":19}],13:[function(t,l,c){const o=t("./worksheet"),r=t("./defined-names"),n=t("../xlsx/xlsx"),s=t("../csv/csv");l.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new r}get xlsx(){return this._xlsx||(this._xlsx=new n(this)),this._xlsx}get csv(){return this._csv||(this._csv=new s(this)),this._csv}get nextId(){for(let e=1;e<this._worksheets.length;e++)if(!this._worksheets[e])return e;return this._worksheets.length||1}addWorksheet(e,i){const u=this.nextId;i&&(typeof i=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),i={properties:{tabColor:{argb:i}}}):(i.argb||i.theme||i.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),i={properties:{tabColor:i}}));const a=this._worksheets.reduce((m,d)=>(d&&d.orderNo)>m?d.orderNo:m,0),h=Object.assign({},i,{id:u,name:e,orderNo:a+1,workbook:this}),p=new o(h);return this._worksheets[u]=p,p}removeWorksheetEx(e){delete this._worksheets[e.id]}removeWorksheet(e){const i=this.getWorksheet(e);i&&i.destroy()}getWorksheet(e){return e===void 0?this._worksheets.find(Boolean):typeof e=="number"?this._worksheets[e]:typeof e=="string"?this._worksheets.find(i=>i&&i.name===e):void 0}get worksheets(){return this._worksheets.slice(1).sort((e,i)=>e.orderNo-i.orderNo).filter(Boolean)}eachSheet(e){this.worksheets.forEach(i=>{e(i,i.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(e){const i=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),i}getImage(e){return this.media[e]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(e=>e.model),sheets:this.worksheets.map(e=>e.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(e){this.creator=e.creator,this.lastModifiedBy=e.lastModifiedBy,this.lastPrinted=e.lastPrinted,this.created=e.created,this.modified=e.modified,this.company=e.company,this.manager=e.manager,this.title=e.title,this.subject=e.subject,this.keywords=e.keywords,this.category=e.category,this.description=e.description,this.language=e.language,this.revision=e.revision,this.contentStatus=e.contentStatus,this.properties=e.properties,this.calcProperties=e.calcProperties,this._worksheets=[],e.worksheets.forEach(i=>{const{id:u,name:a,state:h}=i,p=e.sheets&&e.sheets.findIndex(m=>m.id===u);(this._worksheets[u]=new o({id:u,name:a,orderNo:p,state:h,workbook:this})).model=i}),this._definedNames.model=e.definedNames,this.views=e.views,this._themes=e.themes,this.media=e.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(t,l,c){const o=t("../utils/under-dash"),r=t("../utils/col-cache"),n=t("./range"),s=t("./row"),e=t("./column"),i=t("./enums"),u=t("./image"),a=t("./table"),h=t("./data-validations"),p=t("../utils/encryptor"),{copyStyle:m}=t("../utils/copy-style");l.exports=class{constructor(d){d=d||{},this._workbook=d.workbook,this.id=d.id,this.orderNo=d.orderNo,this.name=d.name,this.state=d.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},d.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!d.pageSetup||!d.pageSetup.fitToWidth&&!d.pageSetup.fitToHeight||d.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},d.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},d.headerFooter),this.dataValidations=new h,this.views=d.views||[],this.autoFilter=d.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(d){if(d===void 0&&(d="sheet"+this.id),this._name!==d){if(typeof d!="string")throw new Error("The name has to be a string.");if(d==="")throw new Error("The name can't be empty.");if(d==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(d))throw new Error(`Worksheet name ${d} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(d))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+d);if(d&&d.length>31&&(console.warn(`Worksheet name ${d} exceeds 31 chars. This will be truncated`),d=d.substring(0,31)),this._workbook._worksheets.find(b=>b&&b.name.toLowerCase()===d.toLowerCase()))throw new Error("Worksheet name already exists: "+d);this._name=d}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const d=new n;return this._rows.forEach(b=>{if(b){const g=b.dimensions;g&&d.expand(b.number,g.min,b.number,g.max)}}),d}get columns(){return this._columns}set columns(d){this._headerRowCount=d.reduce((S,C)=>{const I=(C.header?1:C.headers&&C.headers.length)||0;return Math.max(S,I)},0);let b=1;const g=this._columns=[];d.forEach(S=>{const C=new e(this,b++,!1);g.push(C),C.defn=S})}getColumnKey(d){return this._keys[d]}setColumnKey(d,b){this._keys[d]=b}deleteColumnKey(d){delete this._keys[d]}eachColumnKey(d){o.each(this._keys,d)}getColumn(d){if(typeof d=="string"){const b=this._keys[d];if(b)return b;d=r.l2n(d)}if(this._columns||(this._columns=[]),d>this._columns.length){let b=this._columns.length+1;for(;b<=d;)this._columns.push(new e(this,b++))}return this._columns[d-1]}spliceColumns(d,b){const g=this._rows.length;for(var S=arguments.length,C=new Array(S>2?S-2:0),I=2;I<S;I++)C[I-2]=arguments[I];if(C.length>0)for(let B=0;B<g;B++){const F=[d,b];C.forEach(q=>{F.push(q[B]||null)});const W=this.getRow(B+1);W.splice.apply(W,F)}else this._rows.forEach(B=>{B&&B.splice(d,b)});const D=C.length-b,z=d+b,P=this._columns.length;if(D<0)for(let B=d+C.length;B<=P;B++)this.getColumn(B).defn=this.getColumn(B-D).defn;else if(D>0)for(let B=P;B>=z;B--)this.getColumn(B+D).defn=this.getColumn(B).defn;for(let B=d;B<d+C.length;B++)this.getColumn(B).defn=null;this.workbook.definedNames.spliceColumns(this.name,d,b,C.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let d=0;return this.eachRow(b=>{d=Math.max(d,b.cellCount)}),d}get actualColumnCount(){const d=[];let b=0;return this.eachRow(g=>{g.eachCell(S=>{let{col:C}=S;d[C]||(d[C]=!0,b++)})}),b}_commitRow(){}get _lastRowNumber(){const d=this._rows;let b=d.length;for(;b>0&&d[b-1]===void 0;)b--;return b}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(d){return this._rows[d-1]}findRows(d,b){return this._rows.slice(d-1,d-1+b)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let d=0;return this.eachRow(()=>{d++}),d}getRow(d){let b=this._rows[d-1];return b||(b=this._rows[d-1]=new s(this,d)),b}getRows(d,b){if(b<1)return;const g=[];for(let S=d;S<d+b;S++)g.push(this.getRow(S));return g}addRow(d){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const g=this._nextRow,S=this.getRow(g);return S.values=d,this._setStyleOption(g,b[0]==="i"?b:"n"),S}addRows(d){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const g=[];return d.forEach(S=>{g.push(this.addRow(S,b))}),g}insertRow(d,b){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(d,0,b),this._setStyleOption(d,g),this.getRow(d)}insertRows(d,b){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(d,0,...b),g!=="n")for(let S=0;S<b.length;S++)g[0]==="o"&&this.findRow(b.length+d+S)!==void 0?this._copyStyle(b.length+d+S,d+S,g[1]==="+"):g[0]==="i"&&this.findRow(d-1)!==void 0&&this._copyStyle(d-1,d+S,g[1]==="+");return this.getRows(d,b.length)}_setStyleOption(d){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";b[0]==="o"&&this.findRow(d+1)!==void 0?this._copyStyle(d+1,d,b[1]==="+"):b[0]==="i"&&this.findRow(d-1)!==void 0&&this._copyStyle(d-1,d,b[1]==="+")}_copyStyle(d,b){let g=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const S=this.getRow(d),C=this.getRow(b);C.style=m(S.style),S.eachCell({includeEmpty:g},(I,D)=>{C.getCell(D).style=m(I.style)}),C.height=S.height}duplicateRow(d,b){let g=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const S=this._rows[d-1],C=new Array(b).fill(S.values);this.spliceRows(d+1,g?0:b,...C);for(let I=0;I<b;I++){const D=this._rows[d+I];D.style=S.style,D.height=S.height,S.eachCell({includeEmpty:!0},(z,P)=>{D.getCell(P).style=z.style})}}spliceRows(d,b){const g=d+b;for(var S=arguments.length,C=new Array(S>2?S-2:0),I=2;I<S;I++)C[I-2]=arguments[I];const D=C.length,z=D-b,P=this._rows.length;let B,F;if(z<0)for(d===P&&(this._rows[P-1]=void 0),B=g;B<=P;B++)if(F=this._rows[B-1],F){const W=this.getRow(B+z);W.values=F.values,W.style=F.style,W.height=F.height,F.eachCell({includeEmpty:!0},(q,A)=>{W.getCell(A).style=q.style}),this._rows[B-1]=void 0}else this._rows[B+z-1]=void 0;else if(z>0)for(B=P;B>=g;B--)if(F=this._rows[B-1],F){const W=this.getRow(B+z);W.values=F.values,W.style=F.style,W.height=F.height,F.eachCell({includeEmpty:!0},(q,A)=>{if(W.getCell(A).style=q.style,q._value.constructor.name==="MergeValue"){const M=this.getRow(q._row._number+D).getCell(A),k=q._value._master,y=this.getRow(k._row._number+D).getCell(k._column._number);M.merge(y)}})}else this._rows[B+z-1]=void 0;for(B=0;B<D;B++){const W=this.getRow(d+B);W.style={},W.values=C[B]}this.workbook.definedNames.spliceRows(this.name,d,b,D)}eachRow(d,b){if(b||(b=d,d=void 0),d&&d.includeEmpty){const g=this._rows.length;for(let S=1;S<=g;S++)b(this.getRow(S),S)}else this._rows.forEach(g=>{g&&g.hasValues&&b(g,g.number)})}getSheetValues(){const d=[];return this._rows.forEach(b=>{b&&(d[b.number]=b.values)}),d}findCell(d,b){const g=r.getAddress(d,b),S=this._rows[g.row-1];return S?S.findCell(g.col):void 0}getCell(d,b){const g=r.getAddress(d,b);return this.getRow(g.row).getCellEx(g)}mergeCells(){for(var d=arguments.length,b=new Array(d),g=0;g<d;g++)b[g]=arguments[g];const S=new n(b);this._mergeCellsInternal(S)}mergeCellsWithoutStyle(){for(var d=arguments.length,b=new Array(d),g=0;g<d;g++)b[g]=arguments[g];const S=new n(b);this._mergeCellsInternal(S,!0)}_mergeCellsInternal(d,b){o.each(this._merges,S=>{if(S.intersects(d))throw new Error("Cannot merge already merged cells")});const g=this.getCell(d.top,d.left);for(let S=d.top;S<=d.bottom;S++)for(let C=d.left;C<=d.right;C++)(S>d.top||C>d.left)&&this.getCell(S,C).merge(g,b);this._merges[g.address]=d}_unMergeMaster(d){const b=this._merges[d.address];if(b){for(let g=b.top;g<=b.bottom;g++)for(let S=b.left;S<=b.right;S++)this.getCell(g,S).unmerge();delete this._merges[d.address]}}get hasMerges(){return o.some(this._merges,Boolean)}unMergeCells(){for(var d=arguments.length,b=new Array(d),g=0;g<d;g++)b[g]=arguments[g];const S=new n(b);for(let C=S.top;C<=S.bottom;C++)for(let I=S.left;I<=S.right;I++){const D=this.findCell(C,I);D&&(D.type===i.ValueType.Merge?this._unMergeMaster(D.master):this._merges[D.address]&&this._unMergeMaster(D))}}fillFormula(d,b,g){let S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const C=r.decode(d),{top:I,left:D,bottom:z,right:P}=C,B=P-D+1,F=r.encodeAddress(I,D),W=S==="shared";let q;q=typeof g=="function"?g:Array.isArray(g)?Array.isArray(g[0])?(M,k)=>g[M-I][k-D]:(M,k)=>g[(M-I)*B+(k-D)]:()=>{};let A=!0;for(let M=I;M<=z;M++)for(let k=D;k<=P;k++)A?(this.getCell(M,k).value={shareType:S,formula:b,ref:d,result:q(M,k)},A=!1):this.getCell(M,k).value=W?{sharedFormula:F,result:q(M,k)}:q(M,k)}addImage(d,b){const g={type:"image",imageId:d,range:b};this._media.push(new u(this,g))}getImages(){return this._media.filter(d=>d.type==="image")}addBackgroundImage(d){const b={type:"background",imageId:d};this._media.push(new u(this,b))}getBackgroundImageId(){const d=this._media.find(b=>b.type==="background");return d&&d.imageId}protect(d,b){return new Promise(g=>{this.sheetProtection={sheet:!0},b&&"spinCount"in b&&(b.spinCount=Number.isFinite(b.spinCount)?Math.round(Math.max(0,b.spinCount)):1e5),d&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=p.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=b&&"spinCount"in b?b.spinCount:1e5,this.sheetProtection.hashValue=p.convertPasswordToHash(d,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),b&&(this.sheetProtection=Object.assign(this.sheetProtection,b),!d&&"spinCount"in b&&delete this.sheetProtection.spinCount),g()})}unprotect(){this.sheetProtection=null}addTable(d){const b=new a(this,d);return this.tables[d.name]=b,b}getTable(d){return this.tables[d]}removeTable(d){delete this.tables[d]}getTables(){return Object.values(this.tables)}addConditionalFormatting(d){this.conditionalFormattings.push(d)}removeConditionalFormatting(d){typeof d=="number"?this.conditionalFormattings.splice(d,1):this.conditionalFormattings=d instanceof Function?this.conditionalFormattings.filter(d):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(d){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=d}get model(){const d={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(S=>S.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(S=>S.model),conditionalFormattings:this.conditionalFormattings};d.cols=e.toModel(this.columns);const b=d.rows=[],g=d.dimensions=new n;return this._rows.forEach(S=>{const C=S&&S.model;C&&(g.expand(C.number,C.min,C.number,C.max),b.push(C))}),d.merges=[],o.each(this._merges,S=>{d.merges.push(S.range)}),d}_parseRows(d){this._rows=[],d.rows.forEach(b=>{const g=new s(this,b.number);this._rows[g.number-1]=g,g.model=b})}_parseMergeCells(d){o.each(d.mergeCells,b=>{this.mergeCellsWithoutStyle(b)})}set model(d){this.name=d.name,this._columns=e.fromModel(this,d.cols),this._parseRows(d),this._parseMergeCells(d),this.dataValidations=new h(d.dataValidations),this.properties=d.properties,this.pageSetup=d.pageSetup,this.headerFooter=d.headerFooter,this.views=d.views,this.autoFilter=d.autoFilter,this._media=d.media.map(b=>new u(this,b)),this.sheetProtection=d.sheetProtection,this.tables=d.tables.reduce((b,g)=>{const S=new a;return S.model=g,b[g.name]=S,b},{}),this.conditionalFormattings=d.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(t,l,c){t("core-js/modules/es.promise"),t("core-js/modules/es.promise.finally"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.values"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.async-iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.find-index"),t("core-js/modules/es.array.find"),t("core-js/modules/es.string.from-code-point"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.number.is-nan"),t("regenerator-runtime/runtime");const o={Workbook:t("./doc/workbook")},r=t("./doc/enums");Object.keys(r).forEach(n=>{o[n]=r[n]}),l.exports=o},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(t,l,c){const o=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");c.bufferToString=function(r){return typeof r=="string"?r:o?o.decode(r):r.toString()}},{}],17:[function(t,l,c){const o=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:r}=t("buffer");c.stringToBuffer=function(n){return typeof n!="string"?n:o?r.from(o.encode(n).buffer):r.from(n)}},{buffer:220}],18:[function(t,l,c){const o=t("./under-dash"),r=t("./col-cache");l.exports=class{constructor(n){this.template=n,this.sheets={}}addCell(n){this.addCellEx(r.decodeEx(n))}getCell(n){return this.findCellEx(r.decodeEx(n),!0)}findCell(n){return this.findCellEx(r.decodeEx(n),!1)}findCellAt(n,s,e){const i=this.sheets[n],u=i&&i[s];return u&&u[e]}addCellEx(n){if(n.top)for(let s=n.top;s<=n.bottom;s++)for(let e=n.left;e<=n.right;e++)this.getCellAt(n.sheetName,s,e);else this.findCellEx(n,!0)}getCellEx(n){return this.findCellEx(n,!0)}findCellEx(n,s){const e=this.findSheet(n,s),i=this.findSheetRow(e,n,s);return this.findRowCell(i,n,s)}getCellAt(n,s,e){const i=this.sheets[n]||(this.sheets[n]=[]),u=i[s]||(i[s]=[]);return u[e]||(u[e]={sheetName:n,address:r.n2l(e)+s,row:s,col:e})}removeCellEx(n){const s=this.findSheet(n);if(!s)return;const e=this.findSheetRow(s,n);e&&delete e[n.col]}forEachInSheet(n,s){const e=this.sheets[n];e&&e.forEach((i,u)=>{i&&i.forEach((a,h)=>{a&&s(a,u,h)})})}forEach(n){o.each(this.sheets,(s,e)=>{this.forEachInSheet(e,n)})}map(n){const s=[];return this.forEach(e=>{s.push(n(e))}),s}findSheet(n,s){const e=n.sheetName;return this.sheets[e]?this.sheets[e]:s?this.sheets[e]=[]:void 0}findSheetRow(n,s,e){const{row:i}=s;return n&&n[i]?n[i]:e?n[i]=[]:void 0}findRowCell(n,s,e){const{col:i}=s;return n&&n[i]?n[i]:e?n[i]=this.template?Object.assign(s,JSON.parse(JSON.stringify(this.template))):s:void 0}spliceRows(n,s,e,i){const u=this.sheets[n];if(u){const a=[];for(let h=0;h<i;h++)a.push([]);u.splice(s,e,...a)}}spliceColumns(n,s,e,i){const u=this.sheets[n];if(u){const a=[];for(let h=0;h<i;h++)a.push(null);o.each(u,h=>{h.splice(s,e,...a)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(t,l,c){const o=/^[A-Z]+\d+$/,r={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:n=>n<=26?1:n<=676?2:3,_fill(n){let s,e,i,u,a,h=1;if(n>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&n>=1){for(;h<=26;)s=this._dictionary[h-1],this._n2l[h]=s,this._l2n[s]=h,h++;this._l2nFill=1}if(this._l2nFill<2&&n>=2){for(h=27;h<=702;)e=h-27,i=e%26,u=Math.floor(e/26),s=this._dictionary[u]+this._dictionary[i],this._n2l[h]=s,this._l2n[s]=h,h++;this._l2nFill=2}if(this._l2nFill<3&&n>=3){for(h=703;h<=16384;)e=h-703,i=e%26,u=Math.floor(e/26)%26,a=Math.floor(e/676),s=this._dictionary[a]+this._dictionary[u]+this._dictionary[i],this._n2l[h]=s,this._l2n[s]=h,h++;this._l2nFill=3}},l2n(n){if(this._l2n[n]||this._fill(n.length),!this._l2n[n])throw new Error("Out of bounds. Invalid column letter: "+n);return this._l2n[n]},n2l(n){if(n<1||n>16384)throw new Error(n+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[n]||this._fill(this._level(n)),this._n2l[n]},_hash:{},validateAddress(n){if(!o.test(n))throw new Error("Invalid Address: "+n);return!0},decodeAddress(n){const s=n.length<5&&this._hash[n];if(s)return s;let e=!1,i="",u=0,a=!1,h="",p=0;for(let d,b=0;b<n.length;b++)if(d=n.charCodeAt(b),!a&&d>=65&&d<=90)e=!0,i+=n[b],u=26*u+d-64;else if(d>=48&&d<=57)a=!0,h+=n[b],p=10*p+d-48;else if(a&&e&&d!==36)break;if(e){if(u>16384)throw new Error("Out of bounds. Invalid column letter: "+i)}else u=void 0;a||(p=void 0);const m={address:n=i+h,col:u,row:p,$col$row:`$${i}$${h}`};return u<=100&&p<=100&&(this._hash[n]=m,this._hash[m.$col$row]=m),m},getAddress(n,s){if(s){const e=this.n2l(s)+n;return this.decodeAddress(e)}return this.decodeAddress(n)},decode(n){const s=n.split(":");if(s.length===2){const e=this.decodeAddress(s[0]),i=this.decodeAddress(s[1]),u={top:Math.min(e.row,i.row),left:Math.min(e.col,i.col),bottom:Math.max(e.row,i.row),right:Math.max(e.col,i.col)};return u.tl=this.n2l(u.left)+u.top,u.br=this.n2l(u.right)+u.bottom,u.dimensions=`${u.tl}:${u.br}`,u}return this.decodeAddress(n)},decodeEx(n){const s=n.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),e=s[1]||s[2],i=s[3],u=i.split(":");if(u.length>1){let h=this.decodeAddress(u[0]),p=this.decodeAddress(u[1]);const m=Math.min(h.row,p.row),d=Math.min(h.col,p.col),b=Math.max(h.row,p.row),g=Math.max(h.col,p.col);return h=this.n2l(d)+m,p=this.n2l(g)+b,{top:m,left:d,bottom:b,right:g,sheetName:e,tl:{address:h,col:d,row:m,$col$row:`$${this.n2l(d)}$${m}`,sheetName:e},br:{address:p,col:g,row:b,$col$row:`$${this.n2l(g)}$${b}`,sheetName:e},dimensions:`${h}:${p}`}}if(i.startsWith("#"))return e?{sheetName:e,error:i}:{error:i};const a=this.decodeAddress(i);return e?{sheetName:e,...a}:a},encodeAddress:(n,s)=>r.n2l(s)+n,encode(){switch(arguments.length){case 2:return r.encodeAddress(arguments[0],arguments[1]);case 4:return`${r.encodeAddress(arguments[0],arguments[1])}:${r.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(n,s){const[e,i,,u,a]=n,[h,p]=s;return h>=e&&h<=u&&p>=i&&p<=a}};l.exports=r},{}],20:[function(t,l,c){const o=(n,s)=>({...n,...s.reduce((e,i)=>(n[i]&&(e[i]={...n[i]}),e),{})}),r=function(n,s,e){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];n[e]&&(s[e]=o(n[e],i))};c.copyStyle=n=>{if(!n)return n;if(s=n,Object.keys(s).length===0)return{};var s;const e={...n};return r(n,e,"font",["color"]),r(n,e,"alignment"),r(n,e,"protection"),n.border&&(r(n,e,"border"),r(n.border,e.border,"top",["color"]),r(n.border,e.border,"left",["color"]),r(n.border,e.border,"bottom",["color"]),r(n.border,e.border,"right",["color"]),r(n.border,e.border,"diagonal",["color"])),n.fill&&(r(n,e,"fill",["fgColor","bgColor","center"]),n.fill.stops&&(e.fill.stops=n.fill.stops.map(i=>o(i,["color"])))),e}},{}],21:[function(t,l,c){(function(o){(function(){const r=t("crypto"),n={hash(s){const e=r.createHash(s);for(var i=arguments.length,u=new Array(i>1?i-1:0),a=1;a<i;a++)u[a-1]=arguments[a];return e.update(o.concat(u)),e.digest()},convertPasswordToHash(s,e,i,u){if(e=e.toLowerCase(),r.getHashes().indexOf(e)<0)throw new Error(`Hash algorithm '${e}' not supported!`);const a=o.from(s,"utf16le");let h=this.hash(e,o.from(i,"base64"),a);for(let p=0;p<u;p++){const m=o.alloc(4);m.writeUInt32LE(p,0),h=this.hash(e,h,m)}return h.toString("base64")},randomBytes:s=>r.randomBytes(s)};l.exports=n}).call(this)}).call(this,t("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(t,l,c){const{SaxesParser:o}=t("saxes"),{PassThrough:r}=t("readable-stream"),{bufferToString:n}=t("./browser-buffer-decode");l.exports=async function*(s){s.pipe&&!s[Symbol.asyncIterator]&&(s=s.pipe(new r));const e=new o;let i;e.on("error",a=>{i=a});let u=[];e.on("opentag",a=>u.push({eventType:"opentag",value:a})),e.on("text",a=>u.push({eventType:"text",value:a})),e.on("closetag",a=>u.push({eventType:"closetag",value:a}));for await(const a of s){if(e.write(n(a)),i)throw i;yield u,u=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(t,l,c){const o=t("./col-cache"),r=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,n=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;l.exports={slideFormula:function(s,e,i){const u=o.decode(e),a=o.decode(i);return s.replace(r,(h,p,m,d,b)=>{if(b)return h;const g=n.exec(d);if(g){const S=g[1],C=g[2].toUpperCase(),I=g[3],D=g[4];if(C.length>3||C.length===3&&C>"XFD")return h;let z=o.l2n(C),P=parseInt(D,10);return S||(z+=a.col-u.col),I||(P+=a.row-u.row),(p||"")+(S||"")+o.n2l(z)+(I||"")+P}return h})}}},{"./col-cache":19}],24:[function(t,l,c){(function(o,r){(function(){const n=t("readable-stream"),s=t("./utils"),e=t("./string-buf");class i{constructor(d,b){this._data=d,this._encoding=b}get length(){return this.toBuffer().length}copy(d,b,g,S){return this.toBuffer().copy(d,b,g,S)}toBuffer(){return this._buffer||(this._buffer=r.from(this._data,this._encoding)),this._buffer}}class u{constructor(d){this._data=d}get length(){return this._data.length}copy(d,b,g,S){return this._data._buf.copy(d,b,g,S)}toBuffer(){return this._data.toBuffer()}}class a{constructor(d){this._data=d}get length(){return this._data.length}copy(d,b,g,S){this._data.copy(d,b,g,S)}toBuffer(){return this._data}}class h{constructor(d){this.size=d,this.buffer=r.alloc(d),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const d=r.alloc(this.iWrite-this.iRead);return this.buffer.copy(d,0,this.iRead,this.iWrite),d}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(d){let b;return d===0?null:d===void 0||d>=this.length?(b=this.toBuffer(),this.iRead=this.iWrite,b):(b=r.alloc(d),this.buffer.copy(b,0,this.iRead,d),this.iRead+=d,b)}write(d,b,g){const S=Math.min(g,this.size-this.iWrite);return d.copy(this.buffer,this.iWrite,b,b+S),this.iWrite+=S,S}}const p=function(m){m=m||{},this.bufSize=m.bufSize||1048576,this.buffers=[],this.batch=m.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};s.inherits(p,n.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return r.concat(this.buffers.map(m=>m.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const d=this.buffers[this.buffers.length-1];if(!d.full)return d}const m=new h(this.bufSize);return this.buffers.push(m),m},async _pipe(m){await Promise.all(this.pipes.map((function(d){return new Promise(b=>{d.write(m.toBuffer(),()=>{b()})})})))},_writeToBuffers(m){let d=0;const b=m.length;for(;d<b;)d+=this._getWritableBuffer().write(m,d,b-d)},async write(m,d,b){let g;if(d instanceof Function&&(b=d,d="utf8"),b=b||s.nop,m instanceof e)g=new u(m);else if(m instanceof r)g=new a(m);else{if(!(typeof m=="string"||m instanceof String||m instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");g=new i(m,d)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(g);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(g),o.nextTick(b)):(await this._pipe(g),b());else this.paused||this.emit("data",g.toBuffer()),this._writeToBuffers(g),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(m,d,b){const g=S=>{S?b(S):(this._flush(),this.pipes.forEach(C=>{C.end()}),this.emit("finish"))};m?this.write(m,d,g):g()},read(m){let d;if(m){for(d=[];m&&this.buffers.length&&!this.buffers[0].eod;){const b=this.buffers[0],g=b.read(m);m-=g.length,d.push(g),b.eod&&b.full&&this.buffers.shift()}return r.concat(d)}return d=this.buffers.map(b=>b.toBuffer()).filter(Boolean),this.buffers=[],r.concat(d)},setEncoding(m){this.encoding=m},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(m){this.pipes.push(m),!this.paused&&this.buffers.length&&this.end()},unpipe(m){this.pipes=this.pipes.filter(d=>d!==m)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),l.exports=p}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(t,l,c){(function(o){(function(){l.exports=class{constructor(r){this._buf=o.alloc(r&&r.size||16384),this._encoding=r&&r.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=o.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(r){r=r||0,this._buffer=void 0,this._inPos=r}_grow(r){let n=2*this._buf.length;for(;n<r;)n*=2;const s=o.alloc(n);this._buf.copy(s,0),this._buf=s}addText(r){this._buffer=void 0;let n=this._inPos+this._buf.write(r,this._inPos,this._encoding);for(;n>=this._buf.length-4;)this._grow(this._inPos+r.length),n=this._inPos+this._buf.write(r,this._inPos,this._encoding);this._inPos=n}addStringBuf(r){r.length&&(this._buffer=void 0,this.length+r.length>this.capacity&&this._grow(this.length+r.length),r._buf.copy(this._buf,this._inPos,0,r.length),this._inPos+=r.length)}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:220}],26:[function(t,l,c){const{toString:o}=Object.prototype,r=/["&<>]/,n={each:function(s,e){s&&(Array.isArray(s)?s.forEach(e):Object.keys(s).forEach(i=>{e(s[i],i)}))},some:function(s,e){return!!s&&(Array.isArray(s)?s.some(e):Object.keys(s).some(i=>e(s[i],i)))},every:function(s,e){return!s||(Array.isArray(s)?s.every(e):Object.keys(s).every(i=>e(s[i],i)))},map:function(s,e){return s?Array.isArray(s)?s.map(e):Object.keys(s).map(i=>e(s[i],i)):[]},keyBy:(s,e)=>s.reduce((i,u)=>(i[u[e]]=u,i),{}),isEqual:function(s,e){const i=typeof s,u=typeof e,a=Array.isArray(s),h=Array.isArray(e);let p;if(i!==u)return!1;switch(typeof s){case"object":if(a||h)return!(!a||!h)&&s.length===e.length&&s.every((m,d)=>{const b=e[d];return n.isEqual(m,b)});if(s===null||e===null)return s===e;if(p=Object.keys(s),Object.keys(e).length!==p.length)return!1;for(const m of p)if(!e.hasOwnProperty(m))return!1;return n.every(s,(m,d)=>{const b=e[d];return n.isEqual(m,b)});default:return s===e}},escapeHtml(s){const e=r.exec(s);if(!e)return s;let i="",u="",a=0,h=e.index;for(;h<s.length;h++){switch(s.charAt(h)){case'"':u=""";break;case"&":u="&";break;case"'":u="'";break;case"<":u="<";break;case">":u=">";break;default:continue}a!==h&&(i+=s.substring(a,h)),a=h+1,i+=u}return a!==h?i+s.substring(a,h):i},strcmp:(s,e)=>s<e?-1:s>e?1:0,isUndefined:s=>o.call(s)==="[object Undefined]",isObject:s=>o.call(s)==="[object Object]",deepMerge(){const s=arguments[0]||{},{length:e}=arguments;let i,u,a;function h(p,m){i=s[m],a=Array.isArray(p),n.isObject(p)||a?(a?(a=!1,u=i&&Array.isArray(i)?i:[]):u=i&&n.isObject(i)?i:{},s[m]=n.deepMerge(u,p)):n.isUndefined(p)||(s[m]=p)}for(let p=0;p<e;p++)n.each(arguments[p],h);return s}};l.exports=n},{}],27:[function(t,l,c){(function(o,r){(function(){const n=t("fs"),s=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,e={nop(){},promiseImmediate:i=>new Promise(u=>{o.setImmediate?r(()=>{u(i)}):setTimeout(()=>{u(i)},1)}),inherits:function(i,u,a,h){i.super_=u,h||(h=a,a=null),a&&Object.keys(a).forEach(m=>{Object.defineProperty(i,m,Object.getOwnPropertyDescriptor(a,m))});const p={constructor:{value:i,enumerable:!1,writable:!1,configurable:!0}};h&&Object.keys(h).forEach(m=>{p[m]=Object.getOwnPropertyDescriptor(h,m)}),i.prototype=Object.create(u.prototype,p)},dateToExcel:(i,u)=>25569+i.getTime()/864e5-(u?1462:0),excelToDate(i,u){const a=Math.round(24*(i-25569+(u?1462:0))*3600*1e3);return new Date(a)},parsePath(i){const u=i.lastIndexOf("/");return{path:i.substring(0,u),name:i.substring(u+1)}},getRelsPath(i){const u=e.parsePath(i);return`${u.path}/_rels/${u.name}.rels`},xmlEncode(i){const u=s.exec(i);if(!u)return i;let a="",h="",p=0,m=u.index;for(;m<i.length;m++){const d=i.charCodeAt(m);switch(d){case 34:h=""";break;case 38:h="&";break;case 39:h="'";break;case 60:h="<";break;case 62:h=">";break;case 127:h="";break;default:if(d<=31&&(d<=8||d>=11&&d!==13)){h="";break}continue}p!==m&&(a+=i.substring(p,m)),p=m+1,h&&(a+=h)}return p!==m?a+i.substring(p,m):a},xmlDecode:i=>i.replace(/&([a-z]*);/g,u=>{switch(u){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return u}}),validInt(i){const u=parseInt(i,10);return Number.isNaN(u)?0:u},isDateFmt(i){return i?(i=(i=i.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:i=>new Promise(u=>{n.access(i,n.constants.F_OK,a=>{u(!a)})})},toIsoDateString:i=>i.toIsoString().subsstr(0,10),parseBoolean:i=>i===!0||i==="true"||i===1||i==="1"};l.exports=e}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{},t("timers").setImmediate)},{fs:216,timers:523}],28:[function(t,l,c){const o=t("./under-dash"),r=t("./utils");function n(i,u,a){i.push(` ${u}="${r.xmlEncode(a.toString())}"`)}function s(i,u){if(u){const a=[];o.each(u,(h,p)=>{h!==void 0&&n(a,p,h)}),i.push(a.join(""))}}class e{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(u){const a=this._xml;a.push("<?xml"),s(a,u),a.push(`?>
|
|
257
257
|
`)}openNode(u,a){const h=this.tos,p=this._xml;h&&this.open&&p.push(">"),this._stack.push(u),p.push("<"),p.push(u),s(p,a),this.leaf=!0,this.open=!0}addAttribute(u,a){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");a!==void 0&&n(this._xml,u,a)}addAttributes(u){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");s(this._xml,u)}writeText(u){const a=this._xml;this.open&&(a.push(">"),this.open=!1),this.leaf=!1,a.push(r.xmlEncode(u.toString()))}writeXml(u){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(u)}closeNode(){const u=this._stack.pop(),a=this._xml;this.leaf?a.push("/>"):(a.push("</"),a.push(u),a.push(">")),this.open=!1,this.leaf=!1}leafNode(u,a,h){this.openNode(u,a),h!==void 0&&this.writeText(h),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const u=this._rollbacks.pop();this._xml.length>u.xml&&this._xml.splice(u.xml,this._xml.length-u.xml),this._stack.length>u.stack&&this._stack.splice(u.stack,this._stack.length-u.stack),this.leaf=u.leaf,this.open=u.open}get xml(){return this.closeAll(),this._xml.join("")}}e.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},l.exports=e},{"./under-dash":26,"./utils":27}],29:[function(t,l,c){(function(o){(function(){const r=t("events"),n=t("jszip"),s=t("./stream-buf"),{stringToBuffer:e}=t("./browser-buffer-encode");class i extends r.EventEmitter{constructor(a){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},a),this.zip=new n,this.stream=new s}append(a,h){h.hasOwnProperty("base64")&&h.base64?this.zip.file(h.name,a,{base64:!0}):(o.browser&&typeof a=="string"&&(a=e(a)),this.zip.file(h.name,a))}async finalize(){const a=await this.zip.generateAsync(this.options);this.stream.end(a),this.emit("finish")}read(a){return this.stream.read(a)}setEncoding(a){return this.stream.setEncoding(a)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(a,h){return this.stream.pipe(a,h)}unpipe(a){return this.stream.unpipe(a)}unshift(a){return this.stream.unshift(a)}wrap(a){return this.stream.wrap(a)}}l.exports={ZipWriter:i}}).call(this)}).call(this,t("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(t,l,c){l.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(t,l,c){l.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(t,l,c){const o=t("../../utils/parse-sax"),r=t("../../utils/xml-stream");class n{prepare(){}render(){}parseOpen(e){}parseText(e){}parseClose(e){}reconcile(e,i){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(e=>{e instanceof n?e.reset():e.xform&&e.xform.reset()})}mergeModel(e){this.model=Object.assign(this.model||{},e)}async parse(e){for await(const i of e)for(const{eventType:u,value:a}of i)if(u==="opentag")this.parseOpen(a);else if(u==="text")this.parseText(a);else if(u==="closetag"&&!this.parseClose(a.name))return this.model;return this.model}async parseStream(e){return this.parse(o(e))}get xml(){return this.toXml(this.model)}toXml(e){const i=new r;return this.render(i,e),i.xml}static toAttribute(e,i){let u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(e===void 0){if(u)return i}else if(u||e!==i)return e.toString()}static toStringAttribute(e,i){let u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return n.toAttribute(e,i,u)}static toStringValue(e,i){return e===void 0?i:e}static toBoolAttribute(e,i){let u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(e===void 0){if(u)return i}else if(u||e!==i)return e?"1":"0"}static toBoolValue(e,i){return e===void 0?i:e==="1"}static toIntAttribute(e,i){let u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return n.toAttribute(e,i,u)}static toIntValue(e,i){return e===void 0?i:parseInt(e,10)}static toFloatAttribute(e,i){let u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return n.toAttribute(e,i,u)}static toFloatValue(e,i){return e===void 0?i:parseFloat(e)}}l.exports=n},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(t,l,c){const o=t("../base-xform"),r=t("../../../utils/col-cache");function n(e){try{return r.decodeEx(e),!0}catch{return!1}}function s(e){const i=[];let u=!1,a="";return e.split(",").forEach(h=>{if(!h)return;const p=(h.match(/'/g)||[]).length;if(!p)return void(u?a+=h+",":n(h)&&i.push(h));const m=p%2==0;!u&&m&&n(h)?i.push(h):u&&!m?(u=!1,n(a+h)&&i.push(a+h),a=""):(u=!0,a+=h+",")}),i}l.exports=class extends o{render(e,i){e.openNode("definedName",{name:i.name,localSheetId:i.localSheetId}),e.writeText(i.ranges.join(",")),e.closeNode()}parseOpen(e){switch(e.name){case"definedName":return this._parsedName=e.attributes.name,this._parsedLocalSheetId=e.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(e){this._parsedText.push(e)}parseClose(){return this.model={name:this._parsedName,ranges:s(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(t,l,c){const o=t("../../../utils/utils"),r=t("../base-xform");l.exports=class extends r{render(n,s){n.leafNode("sheet",{sheetId:s.id,name:s.name,state:s.state,"r:id":s.rId})}parseOpen(n){return n.name==="sheet"&&(this.model={name:o.xmlDecode(n.attributes.name),id:parseInt(n.attributes.sheetId,10),state:n.attributes.state,rId:n.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{render(r,n){r.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:n.fullCalcOnLoad?1:void 0})}parseOpen(r){return r.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{render(r,n){r.leafNode("workbookPr",{date1904:n.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(r){return r.name==="workbookPr"&&(this.model={date1904:r.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{render(r,n){const s={xWindow:n.x||0,yWindow:n.y||0,windowWidth:n.width||12e3,windowHeight:n.height||24e3,firstSheet:n.firstSheet,activeTab:n.activeTab};n.visibility&&n.visibility!=="visible"&&(s.visibility=n.visibility),r.leafNode("workbookView",s)}parseOpen(r){if(r.name==="workbookView"){const n=this.model={},s=function(i,u,a){const h=u!==void 0?n[i]=u:a;h!==void 0&&(n[i]=h)},e=function(i,u,a){const h=u!==void 0?n[i]=parseInt(u,10):a;h!==void 0&&(n[i]=h)};return e("x",r.attributes.xWindow,0),e("y",r.attributes.yWindow,0),e("width",r.attributes.windowWidth,25e3),e("height",r.attributes.windowHeight,1e4),s("visibility",r.attributes.visibility,"visible"),e("activeTab",r.attributes.activeTab,void 0),e("firstSheet",r.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../../../utils/col-cache"),n=t("../../../utils/xml-stream"),s=t("../base-xform"),e=t("../static-xform"),i=t("../list-xform"),u=t("./defined-name-xform"),a=t("./sheet-xform"),h=t("./workbook-view-xform"),p=t("./workbook-properties-xform"),m=t("./workbook-calc-properties-xform");class d extends s{constructor(){super(),this.map={fileVersion:d.STATIC_XFORMS.fileVersion,workbookPr:new p,bookViews:new i({tag:"bookViews",count:!1,childXform:new h}),sheets:new i({tag:"sheets",count:!1,childXform:new a}),definedNames:new i({tag:"definedNames",count:!1,childXform:new u}),calcPr:new m}}prepare(g){g.sheets=g.worksheets;const S=[];let C=0;g.sheets.forEach(I=>{if(I.pageSetup&&I.pageSetup.printArea&&I.pageSetup.printArea.split("&&").forEach(D=>{const z=D.split(":"),P={name:"_xlnm.Print_Area",ranges:[`'${I.name}'!$${z[0]}:$${z[1]}`],localSheetId:C};S.push(P)}),I.pageSetup&&(I.pageSetup.printTitlesRow||I.pageSetup.printTitlesColumn)){const D=[];if(I.pageSetup.printTitlesColumn){const P=I.pageSetup.printTitlesColumn.split(":");D.push(`'${I.name}'!$${P[0]}:$${P[1]}`)}if(I.pageSetup.printTitlesRow){const P=I.pageSetup.printTitlesRow.split(":");D.push(`'${I.name}'!$${P[0]}:$${P[1]}`)}const z={name:"_xlnm.Print_Titles",ranges:D,localSheetId:C};S.push(z)}C++}),S.length&&(g.definedNames=g.definedNames.concat(S)),(g.media||[]).forEach((I,D)=>{I.name=I.type+(D+1)})}render(g,S){g.openXml(n.StdDocAttributes),g.openNode("workbook",d.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(g),this.map.workbookPr.render(g,S.properties),this.map.bookViews.render(g,S.views),this.map.sheets.render(g,S.sheets),this.map.definedNames.render(g,S.definedNames),this.map.calcPr.render(g,S.calcProperties),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case"workbook":return!0;default:return this.parser=this.map[g.name],this.parser&&this.parser.parseOpen(g),!0}}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.parser=void 0),!0;switch(g){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(g){const S=(g.workbookRels||[]).reduce((P,B)=>(P[B.Id]=B,P),{}),C=[];let I,D=0;(g.sheets||[]).forEach(P=>{const B=S[P.rId];B&&(I=g.worksheetHash["xl/"+B.Target.replace(/^(\s|\/xl\/)+/,"")],I&&(I.name=P.name,I.id=P.id,I.state=P.state,C[D++]=I))});const z=[];o.each(g.definedNames,P=>{if(P.name==="_xlnm.Print_Area"){if(I=C[P.localSheetId],I){I.pageSetup||(I.pageSetup={});const B=r.decodeEx(P.ranges[0]);I.pageSetup.printArea=I.pageSetup.printArea?`${I.pageSetup.printArea}&&${B.dimensions}`:B.dimensions}}else if(P.name==="_xlnm.Print_Titles"){if(I=C[P.localSheetId],I){I.pageSetup||(I.pageSetup={});const B=P.ranges.join(","),F=/\$/g,W=/\$\d+:\$\d+/,q=B.match(W);if(q&&q.length){const k=q[0];I.pageSetup.printTitlesRow=k.replace(F,"")}const A=/\$[A-Z]+:\$[A-Z]+/,M=B.match(A);if(M&&M.length){const k=M[0];I.pageSetup.printTitlesColumn=k.replace(F,"")}}}else z.push(P)}),g.definedNames=z,g.media.forEach((P,B)=>{P.index=B})}}d.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},d.STATIC_XFORMS={fileVersion:new e({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},l.exports=d},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(t,l,c){const o=t("../strings/rich-text-xform"),r=t("../../../utils/utils"),n=t("../base-xform"),s=l.exports=function(e){this.model=e};r.inherits(s,n,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new o),this._richTextXform},render(e,i){i=i||this.model,e.openNode("comment",{ref:i.ref,authorId:0}),e.openNode("text"),i&&i.note&&i.note.texts&&i.note.texts.forEach(u=>{this.richTextXform.render(e,u)}),e.closeNode(),e.closeNode()},parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"comment":return this.model={type:"note",note:{texts:[]},...e.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(e),!0;default:return!1}},parseText(e){this.parser&&this.parser.parseText(e)},parseClose(e){switch(e){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(t,l,c){const o=t("../../../utils/xml-stream"),r=t("../../../utils/utils"),n=t("../base-xform"),s=t("./comment-xform"),e=l.exports=function(){this.map={comment:new s}};r.inherits(e,n,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(i,u){u=u||this.model,i.openXml(o.StdDocAttributes),i.openNode("comments",e.COMMENTS_ATTRIBUTES),i.openNode("authors"),i.leafNode("author",null,"Author"),i.closeNode(),i.openNode("commentList"),u.comments.forEach(a=>{this.map.comment.render(i,a)}),i.closeNode(),i.closeNode()},parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(i),!0;default:return!1}},parseText(i){this.parser&&this.parser.parseText(i)},parseClose(i){switch(i){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(i),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(t,l,c){const o=t("../../base-xform");l.exports=class extends o{constructor(r){super(),this._model=r}get tag(){return this._model&&this._model.tag}render(r,n,s){(n===s[2]||this.tag==="x:SizeWithCells"&&n===s[1])&&r.leafNode(this.tag)}parseOpen(r){switch(r.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(t,l,c){const o=t("../../base-xform");l.exports=class extends o{constructor(r){super(),this._model=r}get tag(){return this._model&&this._model.tag}render(r,n){r.leafNode(this.tag,null,n)}parseOpen(r){switch(r.name){case this.tag:return this.text="",!0;default:return!1}}parseText(r){this.text=r}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"x:Anchor"}getAnchorRect(r){const n=Math.floor(r.left),s=Math.floor(68*(r.left-n)),e=Math.floor(r.top),i=Math.floor(18*(r.top-e)),u=Math.floor(r.right),a=Math.floor(68*(r.right-u)),h=Math.floor(r.bottom);return[n,s,e,i,u,a,h,Math.floor(18*(r.bottom-h))]}getDefaultRect(r){const n=r.col,s=Math.max(r.row-2,0);return[n,6,s,14,n+2,2,s+4,16]}render(r,n){const s=n.anchor?this.getAnchorRect(n.anchor):this.getDefaultRect(n.refAddress);r.leafNode("x:Anchor",null,s.join(", "))}parseOpen(r){switch(r.name){case this.tag:return this.text="",!0;default:return!1}}parseText(r){this.text=r}parseClose(){return!1}}},{"../base-xform":32}],44:[function(t,l,c){const o=t("../base-xform"),r=t("./vml-anchor-xform"),n=t("./style/vml-protection-xform"),s=t("./style/vml-position-xform"),e=["twoCells","oneCells","absolute"];l.exports=class extends o{constructor(){super(),this.map={"x:Anchor":new r,"x:Locked":new n({tag:"x:Locked"}),"x:LockText":new n({tag:"x:LockText"}),"x:SizeWithCells":new s({tag:"x:SizeWithCells"}),"x:MoveWithCells":new s({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(i,u){const{protection:a,editAs:h}=u.note;i.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(i,h,e),this.map["x:SizeWithCells"].render(i,h,e),this.map["x:Anchor"].render(i,u),this.map["x:Locked"].render(i,a.locked),i.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(i,a.lockText),i.leafNode("x:Row",null,u.refAddress.row-1),i.leafNode("x:Column",null,u.refAddress.col-1),i.closeNode()}parseOpen(i){switch(i.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)}return!0}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const i=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),u=Object.keys(i).length;this.model.editAs=e[u],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(t,l,c){const o=t("../../../utils/xml-stream"),r=t("../base-xform"),n=t("./vml-shape-xform");class s extends r{constructor(){super(),this.map={"v:shape":new n}}get tag(){return"xml"}render(i,u){i.openXml(o.StdDocAttributes),i.openNode(this.tag,s.DRAWING_ATTRIBUTES),i.openNode("o:shapelayout",{"v:ext":"edit"}),i.leafNode("o:idmap",{"v:ext":"edit",data:1}),i.closeNode(),i.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),i.leafNode("v:stroke",{joinstyle:"miter"}),i.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),i.closeNode(),u.comments.forEach((a,h)=>{this.map["v:shape"].render(i,a,h)}),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)}return!0}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(i){case this.tag:return!1;default:return!0}}reconcile(i,u){i.anchors.forEach(a=>{a.br?this.map["xdr:twoCellAnchor"].reconcile(a,u):this.map["xdr:oneCellAnchor"].reconcile(a,u)})}}s.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},l.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(t,l,c){const o=t("../base-xform"),r=t("./vml-textbox-xform"),n=t("./vml-client-data-xform");class s extends o{constructor(){super(),this.map={"v:textbox":new r,"x:ClientData":new n}}get tag(){return"v:shape"}render(i,u,a){i.openNode("v:shape",s.V_SHAPE_ATTRIBUTES(u,a)),i.leafNode("v:fill",{color2:"infoBackground [80]"}),i.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),i.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(i,u),this.map["x:ClientData"].render(i,u),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.tag:this.reset(),this.model={margins:{insetmode:i.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)}return!0}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}s.V_SHAPE_ATTRIBUTES=(e,i)=>({id:"_x0000_s"+(1025+i),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":e.note.margins&&e.note.margins.insetmode}),l.exports=s},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"v:textbox"}conversionUnit(r,n,s){return`${parseFloat(r)*n.toFixed(2)}${s}`}reverseConversionUnit(r){return(r||"").split(",").map(n=>Number(parseFloat(this.conversionUnit(parseFloat(n),.1,"")).toFixed(2)))}render(r,n){const s={style:"mso-direction-alt:auto"};if(n&&n.note){let{inset:e}=n.note&&n.note.margins;Array.isArray(e)&&(e=e.map(i=>this.conversionUnit(i,10,"mm")).join(",")),e&&(s.inset=e)}r.openNode("v:textbox",s),r.leafNode("div",{style:"text-align:left"}),r.closeNode()}parseOpen(r){switch(r.name){case this.tag:return this.model={inset:this.reverseConversionUnit(r.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(r){switch(r){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(t,l,c){const o=t("./base-xform");l.exports=class extends o{createNewModel(r){return{}}parseOpen(r){return this.parser=this.parser||this.map[r.name],this.parser?(this.parser.parseOpen(r),!0):r.name===this.tag&&(this.model=this.createNewModel(r),!0)}parseText(r){this.parser&&this.parser.parseText(r)}onParserClose(r,n){this.model[r]=n.model}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.onParserClose(r,this.parser),this.parser=void 0),!0):r!==this.tag}}},{"./base-xform":32}],49:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{render(r,n){r.openNode("HeadingPairs"),r.openNode("vt:vector",{size:2,baseType:"variant"}),r.openNode("vt:variant"),r.leafNode("vt:lpstr",void 0,"Worksheets"),r.closeNode(),r.openNode("vt:variant"),r.leafNode("vt:i4",void 0,n.length),r.closeNode(),r.closeNode(),r.closeNode()}parseOpen(r){return r.name==="HeadingPairs"}parseText(){}parseClose(r){return r!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{render(r,n){r.openNode("TitlesOfParts"),r.openNode("vt:vector",{size:n.length,baseType:"lpstr"}),n.forEach(s=>{r.leafNode("vt:lpstr",void 0,s.name)}),r.closeNode(),r.closeNode()}parseOpen(r){return r.name==="TitlesOfParts"}parseText(){}parseClose(r){return r!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(t,l,c){const o=t("../../../utils/xml-stream"),r=t("../base-xform"),n=t("../simple/string-xform"),s=t("./app-heading-pairs-xform"),e=t("./app-titles-of-parts-xform");class i extends r{constructor(){super(),this.map={Company:new n({tag:"Company"}),Manager:new n({tag:"Manager"}),HeadingPairs:new s,TitleOfParts:new e}}render(a,h){a.openXml(o.StdDocAttributes),a.openNode("Properties",i.PROPERTY_ATTRIBUTES),a.leafNode("Application",void 0,"Microsoft Excel"),a.leafNode("DocSecurity",void 0,"0"),a.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(a,h.worksheets),this.map.TitleOfParts.render(a,h.worksheets),this.map.Company.render(a,h.company||""),this.map.Manager.render(a,h.manager),a.leafNode("LinksUpToDate",void 0,"false"),a.leafNode("SharedDoc",void 0,"false"),a.leafNode("HyperlinksChanged",void 0,"false"),a.leafNode("AppVersion",void 0,"16.0300"),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"Properties":return!0;default:return this.parser=this.map[a.name],!!this.parser&&(this.parser.parseOpen(a),!0)}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}i.DateFormat=function(u){return u.toISOString().replace(/[.]\d{3,6}/,"")},i.DateAttrs={"xsi:type":"dcterms:W3CDTF"},i.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},l.exports=i},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(t,l,c){const o=t("../../../utils/xml-stream"),r=t("../base-xform");class n extends r{render(e,i){e.openXml(o.StdDocAttributes),e.openNode("Types",n.PROPERTY_ATTRIBUTES);const u={};(i.media||[]).forEach(a=>{if(a.type==="image"){const h=a.extension;u[h]||(u[h]=!0,e.leafNode("Default",{Extension:h,ContentType:"image/"+h}))}}),e.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),e.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),e.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),i.worksheets.forEach(a=>{const h=`/xl/worksheets/sheet${a.id}.xml`;e.leafNode("Override",{PartName:h,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),e.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),e.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),i.sharedStrings&&i.sharedStrings.count&&e.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),i.tables&&i.tables.forEach(a=>{e.leafNode("Override",{PartName:"/xl/tables/"+a.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),i.drawings&&i.drawings.forEach(a=>{e.leafNode("Override",{PartName:`/xl/drawings/${a.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),i.commentRefs&&(e.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),i.commentRefs.forEach(a=>{let{commentName:h}=a;e.leafNode("Override",{PartName:`/xl/${h}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),e.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),e.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),e.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}n.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},l.exports=n},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(t,l,c){const o=t("../../../utils/xml-stream"),r=t("../base-xform"),n=t("../simple/date-xform"),s=t("../simple/string-xform"),e=t("../simple/integer-xform");class i extends r{constructor(){super(),this.map={"dc:creator":new s({tag:"dc:creator"}),"dc:title":new s({tag:"dc:title"}),"dc:subject":new s({tag:"dc:subject"}),"dc:description":new s({tag:"dc:description"}),"dc:identifier":new s({tag:"dc:identifier"}),"dc:language":new s({tag:"dc:language"}),"cp:keywords":new s({tag:"cp:keywords"}),"cp:category":new s({tag:"cp:category"}),"cp:lastModifiedBy":new s({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new n({tag:"cp:lastPrinted",format:i.DateFormat}),"cp:revision":new e({tag:"cp:revision"}),"cp:version":new s({tag:"cp:version"}),"cp:contentStatus":new s({tag:"cp:contentStatus"}),"cp:contentType":new s({tag:"cp:contentType"}),"dcterms:created":new n({tag:"dcterms:created",attrs:i.DateAttrs,format:i.DateFormat}),"dcterms:modified":new n({tag:"dcterms:modified",attrs:i.DateAttrs,format:i.DateFormat})}}render(a,h){a.openXml(o.StdDocAttributes),a.openNode("cp:coreProperties",i.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(a,h.creator),this.map["dc:title"].render(a,h.title),this.map["dc:subject"].render(a,h.subject),this.map["dc:description"].render(a,h.description),this.map["dc:identifier"].render(a,h.identifier),this.map["dc:language"].render(a,h.language),this.map["cp:keywords"].render(a,h.keywords),this.map["cp:category"].render(a,h.category),this.map["cp:lastModifiedBy"].render(a,h.lastModifiedBy),this.map["cp:lastPrinted"].render(a,h.lastPrinted),this.map["cp:revision"].render(a,h.revision),this.map["cp:version"].render(a,h.version),this.map["cp:contentStatus"].render(a,h.contentStatus),this.map["cp:contentType"].render(a,h.contentType),this.map["dcterms:created"].render(a,h.created),this.map["dcterms:modified"].render(a,h.modified),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[a.name],this.parser)return this.parser.parseOpen(a),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(a))}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+a)}}}i.DateFormat=function(u){return u.toISOString().replace(/[.]\d{3}/,"")},i.DateAttrs={"xsi:type":"dcterms:W3CDTF"},i.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},l.exports=i},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{render(r,n){r.leafNode("Relationship",n)}parseOpen(r){switch(r.name){case"Relationship":return this.model=r.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(t,l,c){const o=t("../../../utils/xml-stream"),r=t("../base-xform"),n=t("./relationship-xform");class s extends r{constructor(){super(),this.map={Relationship:new n}}render(i,u){u=u||this._values,i.openXml(o.StdDocAttributes),i.openNode("Relationships",s.RELATIONSHIPS_ATTRIBUTES),u.forEach(a=>{this.map.Relationship.render(i,a)}),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[i.name],this.parser)return this.parser.parseOpen(i),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(i))}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(i){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+i)}}}s.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},l.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case this.tag:this.reset(),this.model={range:{editAs:r.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)}return!0}parseText(r){this.parser&&this.parser.parseText(r)}reconcilePicture(r,n){if(r&&r.rId){const s=n.rels[r.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(s){const e=s[1],i=n.mediaIndex[e];return n.media[i]}}}}},{"../base-xform":32}],57:[function(t,l,c){const o=t("../base-xform"),r=t("./blip-xform");l.exports=class extends o{constructor(){super(),this.map={"a:blip":new r}}get tag(){return"xdr:blipFill"}render(n,s){n.openNode(this.tag),this.map["a:blip"].render(n,s),n.openNode("a:stretch"),n.leafNode("a:fillRect"),n.closeNode(),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset();break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}parseText(){}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"a:blip"}render(r,n){r.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":n.rId,cstate:"print"})}parseOpen(r){switch(r.name){case this.tag:return this.model={rId:r.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(r){switch(r){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"xdr:cNvPicPr"}render(r){r.openNode(this.tag),r.leafNode("a:picLocks",{noChangeAspect:"1"}),r.closeNode()}parseOpen(r){switch(r.name){case this.tag:default:return!0}}parseText(){}parseClose(r){switch(r){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(t,l,c){const o=t("../base-xform"),r=t("./hlink-click-xform"),n=t("./ext-lst-xform");l.exports=class extends o{constructor(){super(),this.map={"a:hlinkClick":new r,"a:extLst":new n}}get tag(){return"xdr:cNvPr"}render(s,e){s.openNode(this.tag,{id:e.index,name:"Picture "+e.index}),this.map["a:hlinkClick"].render(s,e),this.map["a:extLst"].render(s,e),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset();break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(){}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.parser=void 0),!0;switch(s){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(t,l,c){const o=t("../base-xform"),r=t("../simple/integer-xform");l.exports=class extends o{constructor(n){super(),this.tag=n.tag,this.map={"xdr:col":new r({tag:"xdr:col",zero:!0}),"xdr:colOff":new r({tag:"xdr:colOff",zero:!0}),"xdr:row":new r({tag:"xdr:row",zero:!0}),"xdr:rowOff":new r({tag:"xdr:rowOff",zero:!0})}}render(n,s){n.openNode(this.tag),this.map["xdr:col"].render(n,s.nativeCol),this.map["xdr:colOff"].render(n,s.nativeColOff),this.map["xdr:row"].render(n,s.nativeRow),this.map["xdr:rowOff"].render(n,s.nativeRowOff),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset();break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(t,l,c){const o=t("../../../utils/col-cache"),r=t("../../../utils/xml-stream"),n=t("../base-xform"),s=t("./two-cell-anchor-xform"),e=t("./one-cell-anchor-xform");class i extends n{constructor(){super(),this.map={"xdr:twoCellAnchor":new s,"xdr:oneCellAnchor":new e}}prepare(a){a.anchors.forEach((h,p)=>{h.anchorType=(function(m){return(typeof m.range=="string"?o.decode(m.range):m.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"})(h),this.map[h.anchorType].prepare(h,{index:p})})}get tag(){return"xdr:wsDr"}render(a,h){a.openXml(r.StdDocAttributes),a.openNode(this.tag,i.DRAWING_ATTRIBUTES),h.anchors.forEach(p=>{this.map[p.anchorType].render(a,p)}),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(a){case this.tag:return!1;default:return!0}}reconcile(a,h){a.anchors.forEach(p=>{p.br?this.map["xdr:twoCellAnchor"].reconcile(p,h):this.map["xdr:oneCellAnchor"].reconcile(p,h)})}}i.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},l.exports=i},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"a:extLst"}render(r){r.openNode(this.tag),r.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),r.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),r.closeNode(),r.closeNode()}parseOpen(r){switch(r.name){case this.tag:default:return!0}}parseText(){}parseClose(r){switch(r){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{constructor(r){super(),this.tag=r.tag,this.map={}}render(r,n){r.openNode(this.tag);const s=Math.floor(9525*n.width),e=Math.floor(9525*n.height);r.addAttribute("cx",s),r.addAttribute("cy",e),r.closeNode()}parseOpen(r){return r.name===this.tag&&(this.model={width:parseInt(r.attributes.cx||"0",10)/9525,height:parseInt(r.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"a:hlinkClick"}render(r,n){n.hyperlinks&&n.hyperlinks.rId&&r.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":n.hyperlinks.rId,tooltip:n.hyperlinks.tooltip})}parseOpen(r){switch(r.name){case this.tag:return this.model={hyperlinks:{rId:r.attributes["r:id"],tooltip:r.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(t,l,c){const o=t("../base-xform"),r=t("./c-nv-pr-xform"),n=t("./c-nv-pic-pr-xform");l.exports=class extends o{constructor(){super(),this.map={"xdr:cNvPr":new r,"xdr:cNvPicPr":new n}}get tag(){return"xdr:nvPicPr"}render(s,e){s.openNode(this.tag),this.map["xdr:cNvPr"].render(s,e),this.map["xdr:cNvPicPr"].render(s,e),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset();break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(){}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.parser=void 0),!0;switch(s){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(t,l,c){const o=t("./base-cell-anchor-xform"),r=t("../static-xform"),n=t("./cell-position-xform"),s=t("./ext-xform"),e=t("./pic-xform");l.exports=class extends o{constructor(){super(),this.map={"xdr:from":new n({tag:"xdr:from"}),"xdr:ext":new s({tag:"xdr:ext"}),"xdr:pic":new e,"xdr:clientData":new r({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(i,u){this.map["xdr:pic"].prepare(i.picture,u)}render(i,u){i.openNode(this.tag,{editAs:u.range.editAs||"oneCell"}),this.map["xdr:from"].render(i,u.range.tl),this.map["xdr:ext"].render(i,u.range.ext),this.map["xdr:pic"].render(i,u.picture),this.map["xdr:clientData"].render(i,{}),i.closeNode()}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(i,u){i.medium=this.reconcilePicture(i.picture,u)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(t,l,c){const o=t("../base-xform"),r=t("../static-xform"),n=t("./blip-fill-xform"),s=t("./nv-pic-pr-xform"),e=t("./sp-pr");l.exports=class extends o{constructor(){super(),this.map={"xdr:nvPicPr":new s,"xdr:blipFill":new n,"xdr:spPr":new r(e)}}get tag(){return"xdr:pic"}prepare(i,u){i.index=u.index+1}render(i,u){i.openNode(this.tag),this.map["xdr:nvPicPr"].render(i,u),this.map["xdr:blipFill"].render(i,u),this.map["xdr:spPr"].render(i,u),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.tag:this.reset();break;default:this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)}return!0}parseText(){}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(i){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(t,l,c){l.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(t,l,c){const o=t("./base-cell-anchor-xform"),r=t("../static-xform"),n=t("./cell-position-xform"),s=t("./pic-xform");l.exports=class extends o{constructor(){super(),this.map={"xdr:from":new n({tag:"xdr:from"}),"xdr:to":new n({tag:"xdr:to"}),"xdr:pic":new s,"xdr:clientData":new r({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(e,i){this.map["xdr:pic"].prepare(e.picture,i)}render(e,i){e.openNode(this.tag,{editAs:i.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,i.range.tl),this.map["xdr:to"].render(e,i.range.br),this.map["xdr:pic"].render(e,i.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(e,i){e.medium=this.reconcilePicture(e.picture,i)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(t,l,c){const o=t("./base-xform");l.exports=class extends o{constructor(r){super(),this.tag=r.tag,this.always=!!r.always,this.count=r.count,this.empty=r.empty,this.$count=r.$count||"count",this.$=r.$,this.childXform=r.childXform,this.maxItems=r.maxItems}prepare(r,n){const{childXform:s}=this;r&&r.forEach((e,i)=>{n.index=i,s.prepare(e,n)})}render(r,n){if(this.always||n&&n.length){r.openNode(this.tag,this.$),this.count&&r.addAttribute(this.$count,n&&n.length||0);const{childXform:s}=this;(n||[]).forEach((e,i)=>{s.render(r,e,i)}),r.closeNode()}else this.empty&&r.leafNode(this.tag)}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(r)&&(this.parser=this.childXform,!0)}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(r,n){if(r){const{childXform:s}=this;r.forEach(e=>{s.reconcile(e,n)})}}}},{"./base-xform":32}],72:[function(t,l,c){const o=t("../../../utils/col-cache"),r=t("../base-xform");l.exports=class extends r{get tag(){return"autoFilter"}render(n,s){if(s)if(typeof s=="string")n.leafNode("autoFilter",{ref:s});else{const e=function(a){return typeof a=="string"?a:o.getAddress(a.row,a.column).address},i=e(s.from),u=e(s.to);i&&u&&n.leafNode("autoFilter",{ref:`${i}:${u}`})}}parseOpen(n){n.name==="autoFilter"&&(this.model=n.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(t,l,c){const o=t("../../../utils/utils"),r=t("../base-xform"),n=t("../../../doc/range"),s=t("../../../doc/enums"),e=t("../strings/rich-text-xform");function i(u){if(u==null)return s.ValueType.Null;if(u instanceof String||typeof u=="string")return s.ValueType.String;if(typeof u=="number")return s.ValueType.Number;if(typeof u=="boolean")return s.ValueType.Boolean;if(u instanceof Date)return s.ValueType.Date;if(u.text&&u.hyperlink)return s.ValueType.Hyperlink;if(u.formula)return s.ValueType.Formula;if(u.error)return s.ValueType.Error;throw new Error("I could not understand type of value")}l.exports=class extends r{constructor(){super(),this.richTextXForm=new e}get tag(){return"c"}prepare(u,a){const h=a.styles.addStyleModel(u.style||{},(function(p){switch(p.type){case s.ValueType.Formula:return i(p.result);default:return p.type}})(u));switch(h&&(u.styleId=h),u.comment&&a.comments.push({...u.comment,ref:u.address}),u.type){case s.ValueType.String:case s.ValueType.RichText:a.sharedStrings&&(u.ssId=a.sharedStrings.add(u.value));break;case s.ValueType.Date:a.date1904&&(u.date1904=!0);break;case s.ValueType.Hyperlink:a.sharedStrings&&u.text!==void 0&&u.text!==null&&(u.ssId=a.sharedStrings.add(u.text)),a.hyperlinks.push({address:u.address,target:u.hyperlink,tooltip:u.tooltip});break;case s.ValueType.Merge:a.merges.add(u);break;case s.ValueType.Formula:if(a.date1904&&(u.date1904=!0),u.shareType==="shared"&&(u.si=a.siFormulae++),u.formula)a.formulae[u.address]=u;else if(u.sharedFormula){const p=a.formulae[u.sharedFormula];if(!p)throw new Error("Shared Formula master must exist above and or left of clone for cell "+u.address);p.si===void 0?(p.shareType="shared",p.si=a.siFormulae++,p.range=new n(p.address,u.address)):p.range&&p.range.expandToAddress(u.address),u.si=p.si}}}renderFormula(u,a){let h=null;switch(a.shareType){case"shared":h={t:"shared",ref:a.ref||a.range.range,si:a.si};break;case"array":h={t:"array",ref:a.ref};break;default:a.si!==void 0&&(h={t:"shared",si:a.si})}switch(i(a.result)){case s.ValueType.Null:u.leafNode("f",h,a.formula);break;case s.ValueType.String:u.addAttribute("t","str"),u.leafNode("f",h,a.formula),u.leafNode("v",null,a.result);break;case s.ValueType.Number:u.leafNode("f",h,a.formula),u.leafNode("v",null,a.result);break;case s.ValueType.Boolean:u.addAttribute("t","b"),u.leafNode("f",h,a.formula),u.leafNode("v",null,a.result?1:0);break;case s.ValueType.Error:u.addAttribute("t","e"),u.leafNode("f",h,a.formula),u.leafNode("v",null,a.result.error);break;case s.ValueType.Date:u.leafNode("f",h,a.formula),u.leafNode("v",null,o.dateToExcel(a.result,a.date1904));break;default:throw new Error("I could not understand type of value")}}render(u,a){if(a.type!==s.ValueType.Null||a.styleId){switch(u.openNode("c"),u.addAttribute("r",a.address),a.styleId&&u.addAttribute("s",a.styleId),a.type){case s.ValueType.Null:break;case s.ValueType.Number:u.leafNode("v",null,a.value);break;case s.ValueType.Boolean:u.addAttribute("t","b"),u.leafNode("v",null,a.value?"1":"0");break;case s.ValueType.Error:u.addAttribute("t","e"),u.leafNode("v",null,a.value.error);break;case s.ValueType.String:case s.ValueType.RichText:a.ssId!==void 0?(u.addAttribute("t","s"),u.leafNode("v",null,a.ssId)):a.value&&a.value.richText?(u.addAttribute("t","inlineStr"),u.openNode("is"),a.value.richText.forEach(h=>{this.richTextXForm.render(u,h)}),u.closeNode("is")):(u.addAttribute("t","str"),u.leafNode("v",null,a.value));break;case s.ValueType.Date:u.leafNode("v",null,o.dateToExcel(a.value,a.date1904));break;case s.ValueType.Hyperlink:a.ssId!==void 0?(u.addAttribute("t","s"),u.leafNode("v",null,a.ssId)):(u.addAttribute("t","str"),u.leafNode("v",null,a.text));break;case s.ValueType.Formula:this.renderFormula(u,a);break;case s.ValueType.Merge:}u.closeNode()}}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"c":return this.model={address:u.attributes.r},this.t=u.attributes.t,u.attributes.s&&(this.model.styleId=parseInt(u.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=u.attributes.si,this.model.shareType=u.attributes.t,this.model.ref=u.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(u),!0;default:return!1}}parseText(u){if(this.parser)this.parser.parseText(u);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+u:u;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+u:u:this.model.value=this.model.value?this.model.value+u:u}}parseClose(u){switch(u){case"c":{const{model:a}=this;if(a.formula||a.shareType)a.type=s.ValueType.Formula,a.value&&(this.t==="str"?a.result=o.xmlDecode(a.value):this.t==="b"?a.result=parseInt(a.value,10)!==0:this.t==="e"?a.result={error:a.value}:a.result=parseFloat(a.value),a.value=void 0);else if(a.value!==void 0)switch(this.t){case"s":a.type=s.ValueType.String,a.value=parseInt(a.value,10);break;case"str":a.type=s.ValueType.String,a.value=o.xmlDecode(a.value);break;case"inlineStr":a.type=s.ValueType.String;break;case"b":a.type=s.ValueType.Boolean,a.value=parseInt(a.value,10)!==0;break;case"e":a.type=s.ValueType.Error,a.value={error:a.value};break;default:a.type=s.ValueType.Number,a.value=parseFloat(a.value)}else a.styleId?a.type=s.ValueType.Null:a.type=s.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(u),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(u),!0)}}reconcile(u,a){const h=u.styleId&&a.styles&&a.styles.getStyleModel(u.styleId);switch(h&&(u.style=h),u.styleId!==void 0&&(u.styleId=void 0),u.type){case s.ValueType.String:typeof u.value=="number"&&a.sharedStrings&&(u.value=a.sharedStrings.getString(u.value)),u.value.richText&&(u.type=s.ValueType.RichText);break;case s.ValueType.Number:h&&o.isDateFmt(h.numFmt)&&(u.type=s.ValueType.Date,u.value=o.excelToDate(u.value,a.date1904));break;case s.ValueType.Formula:u.result!==void 0&&h&&o.isDateFmt(h.numFmt)&&(u.result=o.excelToDate(u.result,a.date1904)),u.shareType==="shared"&&(u.ref?a.formulae[u.si]=u.address:(u.sharedFormula=a.formulae[u.si],delete u.shareType),delete u.si)}const p=a.hyperlinkMap[u.address];p&&(u.type===s.ValueType.Formula?(u.text=u.result,u.result=void 0):(u.text=u.value,u.value=void 0),u.type=s.ValueType.Hyperlink,u.hyperlink=p);const m=a.commentsMap&&a.commentsMap[u.address];m&&(u.comment=m)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(t,l,c){const o=t("../../base-xform");l.exports=class extends o{get tag(){return"x14:cfIcon"}render(r,n){r.leafNode(this.tag,{iconSet:n.iconSet,iconId:n.iconId})}parseOpen(r){let{attributes:n}=r;this.model={iconSet:n.iconSet,iconId:o.toIntValue(n.iconId)}}parseClose(r){return r!==this.tag}}},{"../../base-xform":32}],75:[function(t,l,c){const{v4:o}=t("uuid"),r=t("../../base-xform"),n=t("../../composite-xform"),s=t("./databar-ext-xform"),e=t("./icon-set-ext-xform"),i={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class u extends n{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new s,"x14:iconSet":this.iconSetXform=new e}}get tag(){return"x14:cfRule"}static isExt(h){return h.type==="dataBar"?s.isExt(h):!(h.type!=="iconSet"||!h.custom&&!i[h.iconSet])}prepare(h){u.isExt(h)&&(h.x14Id=`{${o()}}`.toUpperCase())}render(h,p){if(u.isExt(p))switch(p.type){case"dataBar":this.renderDataBar(h,p);break;case"iconSet":this.renderIconSet(h,p)}}renderDataBar(h,p){h.openNode(this.tag,{type:"dataBar",id:p.x14Id}),this.databarXform.render(h,p),h.closeNode()}renderIconSet(h,p){h.openNode(this.tag,{type:"iconSet",priority:p.priority,id:p.x14Id||`{${o()}}`}),this.iconSetXform.render(h,p),h.closeNode()}createNewModel(h){let{attributes:p}=h;return{type:p.type,x14Id:p.id,priority:r.toIntValue(p.priority)}}onParserClose(h,p){Object.assign(this.model,p.model)}}l.exports=u},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(t,l,c){const o=t("../../composite-xform"),r=t("./f-ext-xform");l.exports=class extends o{constructor(){super(),this.map={"xm:f":this.fExtXform=new r}}get tag(){return"x14:cfvo"}render(n,s){n.openNode(this.tag,{type:s.type}),s.value!==void 0&&this.fExtXform.render(n,s.value),n.closeNode()}createNewModel(n){return{type:n.attributes.type}}onParserClose(n,s){switch(n){case"xm:f":this.model.value=s.model?parseFloat(s.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(t,l,c){const o=t("../../composite-xform"),r=t("./sqref-ext-xform"),n=t("./cf-rule-ext-xform");l.exports=class extends o{constructor(){super(),this.map={"xm:sqref":this.sqRef=new r,"x14:cfRule":this.cfRule=new n}}get tag(){return"x14:conditionalFormatting"}prepare(s,e){s.rules.forEach(i=>{this.cfRule.prepare(i,e)})}render(s,e){e.rules.some(n.isExt)&&(s.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),e.rules.filter(n.isExt).forEach(i=>this.cfRule.render(s,i)),this.sqRef.render(s,e.ref),s.closeNode())}createNewModel(){return{rules:[]}}onParserClose(s,e){switch(s){case"xm:sqref":this.model.ref=e.model;break;case"x14:cfRule":this.model.rules.push(e.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(t,l,c){const o=t("../../composite-xform"),r=t("./cf-rule-ext-xform"),n=t("./conditional-formatting-ext-xform");l.exports=class extends o{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new n}}get tag(){return"x14:conditionalFormattings"}hasContent(s){return s.hasExtContent===void 0&&(s.hasExtContent=s.some(e=>e.rules.some(r.isExt))),s.hasExtContent}prepare(s,e){s.forEach(i=>{this.cfXform.prepare(i,e)})}render(s,e){this.hasContent(e)&&(s.openNode(this.tag),e.forEach(i=>this.cfXform.render(s,i)),s.closeNode())}createNewModel(){return[]}onParserClose(s,e){this.model.push(e.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(t,l,c){const o=t("../../base-xform"),r=t("../../composite-xform"),n=t("../../style/color-xform"),s=t("./cfvo-ext-xform");l.exports=class extends r{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new s,"x14:borderColor":this.borderColorXform=new n("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new n("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new n("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new n("x14:axisColor")}}static isExt(e){return!e.gradient}get tag(){return"x14:dataBar"}render(e,i){e.openNode(this.tag,{minLength:o.toIntAttribute(i.minLength,0,!0),maxLength:o.toIntAttribute(i.maxLength,100,!0),border:o.toBoolAttribute(i.border,!1),gradient:o.toBoolAttribute(i.gradient,!0),negativeBarColorSameAsPositive:o.toBoolAttribute(i.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:o.toBoolAttribute(i.negativeBarBorderColorSameAsPositive,!0),axisPosition:o.toAttribute(i.axisPosition,"auto"),direction:o.toAttribute(i.direction,"leftToRight")}),i.cfvo.forEach(u=>{this.cfvoXform.render(e,u)}),this.borderColorXform.render(e,i.borderColor),this.negativeBorderColorXform.render(e,i.negativeBorderColor),this.negativeFillColorXform.render(e,i.negativeFillColor),this.axisColorXform.render(e,i.axisColor),e.closeNode()}createNewModel(e){let{attributes:i}=e;return{cfvo:[],minLength:o.toIntValue(i.minLength,0),maxLength:o.toIntValue(i.maxLength,100),border:o.toBoolValue(i.border,!1),gradient:o.toBoolValue(i.gradient,!0),negativeBarColorSameAsPositive:o.toBoolValue(i.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:o.toBoolValue(i.negativeBarBorderColorSameAsPositive,!0),axisPosition:o.toStringValue(i.axisPosition,"auto"),direction:o.toStringValue(i.direction,"leftToRight")}}onParserClose(e,i){const[,u]=e.split(":");switch(u){case"cfvo":this.model.cfvo.push(i.model);break;default:this.model[u]=i.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(t,l,c){const o=t("../../base-xform");l.exports=class extends o{get tag(){return"xm:f"}render(r,n){r.leafNode(this.tag,null,n)}parseOpen(){this.model=""}parseText(r){this.model+=r}parseClose(r){return r!==this.tag}}},{"../../base-xform":32}],81:[function(t,l,c){const o=t("../../base-xform"),r=t("../../composite-xform"),n=t("./cfvo-ext-xform"),s=t("./cf-icon-ext-xform");l.exports=class extends r{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new n,"x14:cfIcon":this.cfIconXform=new s}}get tag(){return"x14:iconSet"}render(e,i){e.openNode(this.tag,{iconSet:o.toStringAttribute(i.iconSet),reverse:o.toBoolAttribute(i.reverse,!1),showValue:o.toBoolAttribute(i.showValue,!0),custom:o.toBoolAttribute(i.icons,!1)}),i.cfvo.forEach(u=>{this.cfvoXform.render(e,u)}),i.icons&&i.icons.forEach((u,a)=>{u.iconId=a,this.cfIconXform.render(e,u)}),e.closeNode()}createNewModel(e){let{attributes:i}=e;return{cfvo:[],iconSet:o.toStringValue(i.iconSet,"3TrafficLights"),reverse:o.toBoolValue(i.reverse,!1),showValue:o.toBoolValue(i.showValue,!0)}}onParserClose(e,i){const[,u]=e.split(":");switch(u){case"cfvo":this.model.cfvo.push(i.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(i.model);break;default:this.model[u]=i.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(t,l,c){const o=t("../../base-xform");l.exports=class extends o{get tag(){return"xm:sqref"}render(r,n){r.leafNode(this.tag,null,n)}parseOpen(){this.model=""}parseText(r){this.model+=r}parseClose(r){return r!==this.tag}}},{"../../base-xform":32}],83:[function(t,l,c){const o=t("../../base-xform"),r=t("../../composite-xform"),n=t("../../../../doc/range"),s=t("./databar-xform"),e=t("./ext-lst-ref-xform"),i=t("./formula-xform"),u=t("./color-scale-xform"),a=t("./icon-set-xform"),h={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},p=d=>{const{type:b,operator:g}=d;switch(b){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:b};default:return{type:b,operator:g}}};class m extends r{constructor(){super(),this.map={dataBar:this.databarXform=new s,extLst:this.extLstRefXform=new e,formula:this.formulaXform=new i,colorScale:this.colorScaleXform=new u,iconSet:this.iconSetXform=new a}}get tag(){return"cfRule"}static isPrimitive(b){return b.type!=="iconSet"||!b.custom&&!h[b.iconSet]}render(b,g){switch(g.type){case"expression":this.renderExpression(b,g);break;case"cellIs":this.renderCellIs(b,g);break;case"top10":this.renderTop10(b,g);break;case"aboveAverage":this.renderAboveAverage(b,g);break;case"dataBar":this.renderDataBar(b,g);break;case"colorScale":this.renderColorScale(b,g);break;case"iconSet":this.renderIconSet(b,g);break;case"containsText":this.renderText(b,g);break;case"timePeriod":this.renderTimePeriod(b,g)}}renderExpression(b,g){b.openNode(this.tag,{type:"expression",dxfId:g.dxfId,priority:g.priority}),this.formulaXform.render(b,g.formulae[0]),b.closeNode()}renderCellIs(b,g){b.openNode(this.tag,{type:"cellIs",dxfId:g.dxfId,priority:g.priority,operator:g.operator}),g.formulae.forEach(S=>{this.formulaXform.render(b,S)}),b.closeNode()}renderTop10(b,g){b.leafNode(this.tag,{type:"top10",dxfId:g.dxfId,priority:g.priority,percent:o.toBoolAttribute(g.percent,!1),bottom:o.toBoolAttribute(g.bottom,!1),rank:o.toIntValue(g.rank,10,!0)})}renderAboveAverage(b,g){b.leafNode(this.tag,{type:"aboveAverage",dxfId:g.dxfId,priority:g.priority,aboveAverage:o.toBoolAttribute(g.aboveAverage,!0)})}renderDataBar(b,g){b.openNode(this.tag,{type:"dataBar",priority:g.priority}),this.databarXform.render(b,g),this.extLstRefXform.render(b,g),b.closeNode()}renderColorScale(b,g){b.openNode(this.tag,{type:"colorScale",priority:g.priority}),this.colorScaleXform.render(b,g),b.closeNode()}renderIconSet(b,g){m.isPrimitive(g)&&(b.openNode(this.tag,{type:"iconSet",priority:g.priority}),this.iconSetXform.render(b,g),b.closeNode())}renderText(b,g){b.openNode(this.tag,{type:g.operator,dxfId:g.dxfId,priority:g.priority,operator:o.toStringAttribute(g.operator,"containsText")});const S=(C=>{if(C.formulae&&C.formulae[0])return C.formulae[0];const I=new n(C.ref),{tl:D}=I;switch(C.operator){case"containsText":return`NOT(ISERROR(SEARCH("${C.text}",${D})))`;case"containsBlanks":return`LEN(TRIM(${D}))=0`;case"notContainsBlanks":return`LEN(TRIM(${D}))>0`;case"containsErrors":return`ISERROR(${D})`;case"notContainsErrors":return`NOT(ISERROR(${D}))`;default:return}})(g);S&&this.formulaXform.render(b,S),b.closeNode()}renderTimePeriod(b,g){b.openNode(this.tag,{type:"timePeriod",dxfId:g.dxfId,priority:g.priority,timePeriod:g.timePeriod});const S=(C=>{if(C.formulae&&C.formulae[0])return C.formulae[0];const I=new n(C.ref),{tl:D}=I;switch(C.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${D},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${D},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${D},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${D},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${D},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${D},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${D},1)=TODAY()-1`;case"today":return`FLOOR(${D},1)=TODAY()`;case"tomorrow":return`FLOOR(${D},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${D},1)<=6,FLOOR(${D},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${D})=MONTH(EDATE(TODAY(),0-1)),YEAR(${D})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${D})=MONTH(TODAY()),YEAR(${D})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${D})=MONTH(EDATE(TODAY(),0+1)),YEAR(${D})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(g);S&&this.formulaXform.render(b,S),b.closeNode()}createNewModel(b){let{attributes:g}=b;return{...p(g),dxfId:o.toIntValue(g.dxfId),priority:o.toIntValue(g.priority),timePeriod:g.timePeriod,percent:o.toBoolValue(g.percent),bottom:o.toBoolValue(g.bottom),rank:o.toIntValue(g.rank),aboveAverage:o.toBoolValue(g.aboveAverage)}}onParserClose(b,g){switch(b){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,g.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(g.model)}}}l.exports=m},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(t,l,c){const o=t("../../base-xform");l.exports=class extends o{get tag(){return"cfvo"}render(r,n){r.leafNode(this.tag,{type:n.type,val:n.value})}parseOpen(r){this.model={type:r.attributes.type,value:o.toFloatValue(r.attributes.val)}}parseClose(r){return r!==this.tag}}},{"../../base-xform":32}],85:[function(t,l,c){const o=t("../../composite-xform"),r=t("../../style/color-xform"),n=t("./cfvo-xform");l.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new n,color:this.colorXform=new r}}get tag(){return"colorScale"}render(s,e){s.openNode(this.tag),e.cfvo.forEach(i=>{this.cfvoXform.render(s,i)}),e.color.forEach(i=>{this.colorXform.render(s,i)}),s.closeNode()}createNewModel(s){return{cfvo:[],color:[]}}onParserClose(s,e){this.model[s].push(e.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(t,l,c){const o=t("../../composite-xform"),r=t("./cf-rule-xform");l.exports=class extends o{constructor(){super(),this.map={cfRule:new r}}get tag(){return"conditionalFormatting"}render(n,s){s.rules.some(r.isPrimitive)&&(n.openNode(this.tag,{sqref:s.ref}),s.rules.forEach(e=>{r.isPrimitive(e)&&(e.ref=s.ref,this.map.cfRule.render(n,e))}),n.closeNode())}createNewModel(n){let{attributes:s}=n;return{ref:s.sqref,rules:[]}}onParserClose(n,s){this.model.rules.push(s.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(t,l,c){const o=t("../../base-xform"),r=t("./conditional-formatting-xform");l.exports=class extends o{constructor(){super(),this.cfXform=new r}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(n,s){let e=n.reduce((i,u)=>Math.max(i,...u.rules.map(a=>a.priority||0)),1);n.forEach(i=>{i.rules.forEach(u=>{u.priority||(u.priority=e++),u.style&&(u.dxfId=s.styles.addDxfStyle(u.style))})})}render(n,s){s.forEach(e=>{this.cfXform.render(n,e)})}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(n),!0;default:return!1}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return!!this.parser&&(!!this.parser.parseClose(n)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(n,s){n.forEach(e=>{e.rules.forEach(i=>{i.dxfId!==void 0&&(i.style=s.styles.getDxfStyle(i.dxfId),delete i.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(t,l,c){const o=t("../../composite-xform"),r=t("../../style/color-xform"),n=t("./cfvo-xform");l.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new n,color:this.colorXform=new r}}get tag(){return"dataBar"}render(s,e){s.openNode(this.tag),e.cfvo.forEach(i=>{this.cfvoXform.render(s,i)}),this.colorXform.render(s,e.color),s.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(s,e){switch(s){case"cfvo":this.model.cfvo.push(e.model);break;case"color":this.model.color=e.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(t,l,c){const o=t("../../base-xform"),r=t("../../composite-xform");class n extends o{get tag(){return"x14:id"}render(i,u){i.leafNode(this.tag,null,u)}parseOpen(){this.model=""}parseText(i){this.model+=i}parseClose(i){return i!==this.tag}}class s extends r{constructor(){super(),this.map={"x14:id":this.idXform=new n}}get tag(){return"ext"}render(i,u){i.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(i,u.x14Id),i.closeNode()}createNewModel(){return{}}onParserClose(i,u){this.model.x14Id=u.model}}l.exports=class extends r{constructor(){super(),this.map={ext:new s}}get tag(){return"extLst"}render(e,i){e.openNode(this.tag),this.map.ext.render(e,i),e.closeNode()}createNewModel(){return{}}onParserClose(e,i){Object.assign(this.model,i.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(t,l,c){const o=t("../../base-xform");l.exports=class extends o{get tag(){return"formula"}render(r,n){r.leafNode(this.tag,null,n)}parseOpen(){this.model=""}parseText(r){this.model+=r}parseClose(r){return r!==this.tag}}},{"../../base-xform":32}],91:[function(t,l,c){const o=t("../../base-xform"),r=t("../../composite-xform"),n=t("./cfvo-xform");l.exports=class extends r{constructor(){super(),this.map={cfvo:this.cfvoXform=new n}}get tag(){return"iconSet"}render(s,e){s.openNode(this.tag,{iconSet:o.toStringAttribute(e.iconSet,"3TrafficLights"),reverse:o.toBoolAttribute(e.reverse,!1),showValue:o.toBoolAttribute(e.showValue,!0)}),e.cfvo.forEach(i=>{this.cfvoXform.render(s,i)}),s.closeNode()}createNewModel(s){let{attributes:e}=s;return{iconSet:o.toStringValue(e.iconSet,"3TrafficLights"),reverse:o.toBoolValue(e.reverse),showValue:o.toBoolValue(e.showValue),cfvo:[]}}onParserClose(s,e){this.model[s].push(e.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(t,l,c){const o=t("../../../utils/utils"),r=t("../base-xform");l.exports=class extends r{get tag(){return"col"}prepare(n,s){const e=s.styles.addStyleModel(n.style||{});e&&(n.styleId=e)}render(n,s){n.openNode("col"),n.addAttribute("min",s.min),n.addAttribute("max",s.max),s.width&&n.addAttribute("width",s.width),s.styleId&&n.addAttribute("style",s.styleId),s.hidden&&n.addAttribute("hidden","1"),s.bestFit&&n.addAttribute("bestFit","1"),s.outlineLevel&&n.addAttribute("outlineLevel",s.outlineLevel),s.collapsed&&n.addAttribute("collapsed","1"),n.addAttribute("customWidth","1"),n.closeNode()}parseOpen(n){if(n.name==="col"){const s=this.model={min:parseInt(n.attributes.min||"0",10),max:parseInt(n.attributes.max||"0",10),width:n.attributes.width===void 0?void 0:parseFloat(n.attributes.width||"0")};return n.attributes.style&&(s.styleId=parseInt(n.attributes.style,10)),o.parseBoolean(n.attributes.hidden)&&(s.hidden=!0),o.parseBoolean(n.attributes.bestFit)&&(s.bestFit=!0),n.attributes.outlineLevel&&(s.outlineLevel=parseInt(n.attributes.outlineLevel,10)),o.parseBoolean(n.attributes.collapsed)&&(s.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(n,s){n.styleId&&(n.style=s.styles.getStyleModel(n.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../../../utils/utils"),n=t("../../../utils/col-cache"),s=t("../base-xform"),e=t("../../../doc/range");function i(a,h,p,m){const d=h[p];d!==void 0?a[p]=d:m!==void 0&&(a[p]=m)}function u(a,h,p,m){const d=h[p];d!==void 0&&(a[p]=r.parseBoolean(d))}l.exports=class extends s{get tag(){return"dataValidations"}render(a,h){const p=(function(m){const d=o.map(m,(S,C)=>({address:C,dataValidation:S,marked:!1})).sort((S,C)=>o.strcmp(S.address,C.address)),b=o.keyBy(d,"address"),g=(S,C,I)=>{for(let D=0;D<C;D++){const z=n.encodeAddress(S.row+D,I);if(!m[z]||!o.isEqual(m[S.address],m[z]))return!1}return!0};return d.map(S=>{if(!S.marked){const C=n.decodeEx(S.address);if(C.dimensions)return b[C.dimensions].marked=!0,{...S.dataValidation,sqref:S.address};let I=1,D=n.encodeAddress(C.row+I,C.col);for(;m[D]&&o.isEqual(S.dataValidation,m[D]);)I++,D=n.encodeAddress(C.row+I,C.col);let z=1;for(;g(C,I,C.col+z);)z++;for(let P=0;P<I;P++)for(let B=0;B<z;B++)D=n.encodeAddress(C.row+P,C.col+B),b[D].marked=!0;if(I>1||z>1){const P=C.row+(I-1),B=C.col+(z-1);return{...S.dataValidation,sqref:`${S.address}:${n.encodeAddress(P,B)}`}}return{...S.dataValidation,sqref:S.address}}return null}).filter(Boolean)})(h);p.length&&(a.openNode("dataValidations",{count:p.length}),p.forEach(m=>{a.openNode("dataValidation"),m.type!=="any"&&(a.addAttribute("type",m.type),m.operator&&m.type!=="list"&&m.operator!=="between"&&a.addAttribute("operator",m.operator),m.allowBlank&&a.addAttribute("allowBlank","1")),m.showInputMessage&&a.addAttribute("showInputMessage","1"),m.promptTitle&&a.addAttribute("promptTitle",m.promptTitle),m.prompt&&a.addAttribute("prompt",m.prompt),m.showErrorMessage&&a.addAttribute("showErrorMessage","1"),m.errorStyle&&a.addAttribute("errorStyle",m.errorStyle),m.errorTitle&&a.addAttribute("errorTitle",m.errorTitle),m.error&&a.addAttribute("error",m.error),a.addAttribute("sqref",m.sqref),(m.formulae||[]).forEach((d,b)=>{a.openNode("formula"+(b+1)),m.type==="date"?a.writeText(r.dateToExcel(new Date(d))):a.writeText(d),a.closeNode()}),a.closeNode()}),a.closeNode())}parseOpen(a){switch(a.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=a.attributes.sqref;const h={type:a.attributes.type||"any",formulae:[]};switch(a.attributes.type&&u(h,a.attributes,"allowBlank"),u(h,a.attributes,"showInputMessage"),u(h,a.attributes,"showErrorMessage"),h.type){case"any":case"list":case"custom":break;default:i(h,a.attributes,"operator","between")}return i(h,a.attributes,"promptTitle"),i(h,a.attributes,"prompt"),i(h,a.attributes,"errorStyle"),i(h,a.attributes,"errorTitle"),i(h,a.attributes,"error"),this._dataValidation=h,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(a){this._formula&&this._formula.push(a)}parseClose(a){switch(a){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(h=>{h.includes(":")?new e(h).forEachAddress(p=>{this.model[p]=this._dataValidation}):this.model[h]=this._dataValidation}),!0;case"formula1":case"formula2":{let h=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":h=parseInt(h,10);break;case"decimal":h=parseFloat(h);break;case"date":h=r.excelToDate(parseFloat(h))}return this._dataValidation.formulae.push(h),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"dimension"}render(r,n){n&&r.leafNode("dimension",{ref:n})}parseOpen(r){return r.name==="dimension"&&(this.model=r.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"drawing"}render(r,n){n&&r.leafNode(this.tag,{"r:id":n.rId})}parseOpen(r){switch(r.name){case this.tag:return this.model={rId:r.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(t,l,c){const o=t("../composite-xform"),r=t("./cf-ext/conditional-formattings-ext-xform");class n extends o{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new r}}get tag(){return"ext"}hasContent(e){return this.conditionalFormattings.hasContent(e.conditionalFormattings)}prepare(e,i){this.conditionalFormattings.prepare(e.conditionalFormattings,i)}render(e,i){e.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(e,i.conditionalFormattings),e.closeNode()}createNewModel(){return{}}onParserClose(e,i){this.model[e]=i.model}}l.exports=class extends o{constructor(){super(),this.map={ext:this.ext=new n}}get tag(){return"extLst"}prepare(s,e){this.ext.prepare(s,e)}hasContent(s){return this.ext.hasContent(s)}render(s,e){this.hasContent(e)&&(s.openNode("extLst"),this.ext.render(s,e),s.closeNode())}createNewModel(){return{}}onParserClose(s,e){Object.assign(this.model,e.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"headerFooter"}render(r,n){if(n){r.addRollback();let s=!1;r.openNode("headerFooter"),n.differentFirst&&(r.addAttribute("differentFirst","1"),s=!0),n.differentOddEven&&(r.addAttribute("differentOddEven","1"),s=!0),n.oddHeader&&typeof n.oddHeader=="string"&&(r.leafNode("oddHeader",null,n.oddHeader),s=!0),n.oddFooter&&typeof n.oddFooter=="string"&&(r.leafNode("oddFooter",null,n.oddFooter),s=!0),n.evenHeader&&typeof n.evenHeader=="string"&&(r.leafNode("evenHeader",null,n.evenHeader),s=!0),n.evenFooter&&typeof n.evenFooter=="string"&&(r.leafNode("evenFooter",null,n.evenFooter),s=!0),n.firstHeader&&typeof n.firstHeader=="string"&&(r.leafNode("firstHeader",null,n.firstHeader),s=!0),n.firstFooter&&typeof n.firstFooter=="string"&&(r.leafNode("firstFooter",null,n.firstFooter),s=!0),s?(r.closeNode(),r.commit()):r.rollback()}}parseOpen(r){switch(r.name){case"headerFooter":return this.model={},r.attributes.differentFirst&&(this.model.differentFirst=parseInt(r.attributes.differentFirst,0)===1),r.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(r.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(r){switch(this.currentNode){case"oddHeader":this.model.oddHeader=r;break;case"oddFooter":this.model.oddFooter=r;break;case"evenHeader":this.model.evenHeader=r;break;case"evenFooter":this.model.evenFooter=r;break;case"firstHeader":this.model.firstHeader=r;break;case"firstFooter":this.model.firstFooter=r}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"hyperlink"}render(r,n){this.isInternalLink(n)?r.leafNode("hyperlink",{ref:n.address,"r:id":n.rId,tooltip:n.tooltip,location:n.target}):r.leafNode("hyperlink",{ref:n.address,"r:id":n.rId,tooltip:n.tooltip})}parseOpen(r){return r.name==="hyperlink"&&(this.model={address:r.attributes.ref,rId:r.attributes["r:id"],tooltip:r.attributes.tooltip},r.attributes.location&&(this.model.target=r.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(r){return r.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(r.target)}}},{"../base-xform":32}],99:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"mergeCell"}render(r,n){r.leafNode("mergeCell",{ref:n})}parseOpen(r){return r.name==="mergeCell"&&(this.model=r.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../../../doc/range"),n=t("../../../utils/col-cache"),s=t("../../../doc/enums");l.exports=class{constructor(){this.merges={}}add(e){if(this.merges[e.master])this.merges[e.master].expandToAddress(e.address);else{const i=`${e.master}:${e.address}`;this.merges[e.master]=new r(i)}}get mergeCells(){return o.map(this.merges,e=>e.range)}reconcile(e,i){o.each(e,u=>{const a=n.decode(u);for(let h=a.top;h<=a.bottom;h++){const p=i[h-1];for(let m=a.left;m<=a.right;m++){const d=p.cells[m-1];d?d.type===s.ValueType.Merge&&(d.master=a.tl):p.cells[m]={type:s.ValueType.Null,address:n.encodeAddress(h,m)}}}})}getMasterAddress(e){const i=this.hash[e];return i&&i.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(t,l,c){const o=t("../base-xform"),r=n=>n!==void 0;l.exports=class extends o{get tag(){return"outlinePr"}render(n,s){return!(!s||!r(s.summaryBelow)&&!r(s.summaryRight))&&(n.leafNode(this.tag,{summaryBelow:r(s.summaryBelow)?Number(s.summaryBelow):void 0,summaryRight:r(s.summaryRight)?Number(s.summaryRight):void 0}),!0)}parseOpen(n){return n.name===this.tag&&(this.model={summaryBelow:r(n.attributes.summaryBelow)?!!Number(n.attributes.summaryBelow):void 0,summaryRight:r(n.attributes.summaryRight)?!!Number(n.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"brk"}render(r,n){r.leafNode("brk",n)}parseOpen(r){return r.name==="brk"&&(this.model=r.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../base-xform");l.exports=class extends r{get tag(){return"pageMargins"}render(n,s){if(s){const e={left:s.left,right:s.right,top:s.top,bottom:s.bottom,header:s.header,footer:s.footer};o.some(e,i=>i!==void 0)&&n.leafNode(this.tag,e)}}parseOpen(n){switch(n.name){case this.tag:return this.model={left:parseFloat(n.attributes.left||.7),right:parseFloat(n.attributes.right||.7),top:parseFloat(n.attributes.top||.75),bottom:parseFloat(n.attributes.bottom||.75),header:parseFloat(n.attributes.header||.3),footer:parseFloat(n.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"pageSetUpPr"}render(r,n){return!(!n||!n.fitToPage)&&(r.leafNode(this.tag,{fitToPage:n.fitToPage?"1":void 0}),!0)}parseOpen(r){return r.name===this.tag&&(this.model={fitToPage:r.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../base-xform");function n(u){return u?"1":void 0}function s(u){switch(u){case"overThenDown":return u;default:return}}function e(u){switch(u){case"atEnd":case"asDisplyed":return u;default:return}}function i(u){switch(u){case"dash":case"blank":case"NA":return u;default:return}}l.exports=class extends r{get tag(){return"pageSetup"}render(u,a){if(a){const h={paperSize:a.paperSize,orientation:a.orientation,horizontalDpi:a.horizontalDpi,verticalDpi:a.verticalDpi,pageOrder:s(a.pageOrder),blackAndWhite:n(a.blackAndWhite),draft:n(a.draft),cellComments:e(a.cellComments),errors:i(a.errors),scale:a.scale,fitToWidth:a.fitToWidth,fitToHeight:a.fitToHeight,firstPageNumber:a.firstPageNumber,useFirstPageNumber:n(a.firstPageNumber),usePrinterDefaults:n(a.usePrinterDefaults),copies:a.copies};o.some(h,p=>p!==void 0)&&u.leafNode(this.tag,h)}}parseOpen(u){switch(u.name){case this.tag:return this.model={paperSize:(a=u.attributes.paperSize,a!==void 0?parseInt(a,10):void 0),orientation:u.attributes.orientation||"portrait",horizontalDpi:parseInt(u.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(u.attributes.verticalDpi||"4294967295",10),pageOrder:u.attributes.pageOrder||"downThenOver",blackAndWhite:u.attributes.blackAndWhite==="1",draft:u.attributes.draft==="1",cellComments:u.attributes.cellComments||"None",errors:u.attributes.errors||"displayed",scale:parseInt(u.attributes.scale||"100",10),fitToWidth:parseInt(u.attributes.fitToWidth||"1",10),fitToHeight:parseInt(u.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(u.attributes.firstPageNumber||"1",10),useFirstPageNumber:u.attributes.useFirstPageNumber==="1",usePrinterDefaults:u.attributes.usePrinterDefaults==="1",copies:parseInt(u.attributes.copies||"1",10)},!0;default:return!1}var a}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"picture"}render(r,n){n&&r.leafNode(this.tag,{"r:id":n.rId})}parseOpen(r){switch(r.name){case this.tag:return this.model={rId:r.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../base-xform");function n(s){return s?"1":void 0}l.exports=class extends r{get tag(){return"printOptions"}render(s,e){if(e){const i={headings:n(e.showRowColHeaders),gridLines:n(e.showGridLines),horizontalCentered:n(e.horizontalCentered),verticalCentered:n(e.verticalCentered)};o.some(i,u=>u!==void 0)&&s.leafNode(this.tag,i)}}parseOpen(s){switch(s.name){case this.tag:return this.model={showRowColHeaders:s.attributes.headings==="1",showGridLines:s.attributes.gridLines==="1",horizontalCentered:s.attributes.horizontalCentered==="1",verticalCentered:s.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(t,l,c){const o=t("./page-breaks-xform"),r=t("../list-xform");l.exports=class extends r{constructor(){super({tag:"rowBreaks",count:!0,childXform:new o})}render(n,s){if(s&&s.length){n.openNode(this.tag,this.$),this.count&&(n.addAttribute(this.$count,s.length),n.addAttribute("manualBreakCount",s.length));const{childXform:e}=this;s.forEach(i=>{e.render(n,i)}),n.closeNode()}else this.empty&&n.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(t,l,c){const o=t("../base-xform"),r=t("../../../utils/utils"),n=t("./cell-xform");l.exports=class extends o{constructor(s){super(),this.maxItems=s&&s.maxItems,this.map={c:new n}}get tag(){return"row"}prepare(s,e){const i=e.styles.addStyleModel(s.style);i&&(s.styleId=i);const u=this.map.c;s.cells.forEach(a=>{u.prepare(a,e)})}render(s,e,i){s.openNode("row"),s.addAttribute("r",e.number),e.height&&(s.addAttribute("ht",e.height),s.addAttribute("customHeight","1")),e.hidden&&s.addAttribute("hidden","1"),e.min>0&&e.max>0&&e.min<=e.max&&s.addAttribute("spans",`${e.min}:${e.max}`),e.styleId&&(s.addAttribute("s",e.styleId),s.addAttribute("customFormat","1")),s.addAttribute("x14ac:dyDescent","0.25"),e.outlineLevel&&s.addAttribute("outlineLevel",e.outlineLevel),e.collapsed&&s.addAttribute("collapsed","1");const u=this.map.c;e.cells.forEach(a=>{u.render(s,a,i)}),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;if(s.name==="row"){this.numRowsSeen+=1;const e=s.attributes.spans?s.attributes.spans.split(":").map(u=>parseInt(u,10)):[void 0,void 0],i=this.model={number:parseInt(s.attributes.r,10),min:e[0],max:e[1],cells:[]};return s.attributes.s&&(i.styleId=parseInt(s.attributes.s,10)),r.parseBoolean(s.attributes.hidden)&&(i.hidden=!0),r.parseBoolean(s.attributes.bestFit)&&(i.bestFit=!0),s.attributes.ht&&(i.height=parseFloat(s.attributes.ht)),s.attributes.outlineLevel&&(i.outlineLevel=parseInt(s.attributes.outlineLevel,10)),r.parseBoolean(s.attributes.collapsed)&&(i.collapsed=!0),!0}return this.parser=this.map[s.name],!!this.parser&&(this.parser.parseOpen(s),!0)}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser){if(!this.parser.parseClose(s)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(s,e){s.style=s.styleId?e.styles.getStyleModel(s.styleId):{},s.styleId!==void 0&&(s.styleId=void 0);const i=this.map.c;s.cells.forEach(u=>{i.reconcile(u,e)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../base-xform");l.exports=class extends r{get tag(){return"sheetFormatPr"}render(n,s){if(s){const e={defaultRowHeight:s.defaultRowHeight,outlineLevelRow:s.outlineLevelRow,outlineLevelCol:s.outlineLevelCol,"x14ac:dyDescent":s.dyDescent};s.defaultColWidth&&(e.defaultColWidth=s.defaultColWidth),s.defaultRowHeight&&s.defaultRowHeight===15||(e.customHeight="1"),o.some(e,i=>i!==void 0)&&n.leafNode("sheetFormatPr",e)}}parseOpen(n){return n.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(n.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(n.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(n.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(n.attributes.outlineLevelCol||"0",10)},n.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(n.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(t,l,c){const o=t("../base-xform"),r=t("../style/color-xform"),n=t("./page-setup-properties-xform"),s=t("./outline-properties-xform");l.exports=class extends o{constructor(){super(),this.map={tabColor:new r("tabColor"),pageSetUpPr:new n,outlinePr:new s}}get tag(){return"sheetPr"}render(e,i){if(i){e.addRollback(),e.openNode("sheetPr");let u=!1;u=this.map.tabColor.render(e,i.tabColor)||u,u=this.map.pageSetUpPr.render(e,i.pageSetup)||u,u=this.map.outlinePr.render(e,i.outlineProperties)||u,u?(e.closeNode(),e.commit()):e.rollback()}}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.reset(),!0):!!this.map[e.name]&&(this.parser=this.map[e.name],this.parser.parseOpen(e),!0)}parseText(e){return!!this.parser&&(this.parser.parseText(e),!0)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../base-xform");function n(e,i){return e?i:void 0}function s(e,i){return e===i||void 0}l.exports=class extends r{get tag(){return"sheetProtection"}render(e,i){if(i){const u={sheet:n(i.sheet,"1"),selectLockedCells:i.selectLockedCells===!1?"1":void 0,selectUnlockedCells:i.selectUnlockedCells===!1?"1":void 0,formatCells:n(i.formatCells,"0"),formatColumns:n(i.formatColumns,"0"),formatRows:n(i.formatRows,"0"),insertColumns:n(i.insertColumns,"0"),insertRows:n(i.insertRows,"0"),insertHyperlinks:n(i.insertHyperlinks,"0"),deleteColumns:n(i.deleteColumns,"0"),deleteRows:n(i.deleteRows,"0"),sort:n(i.sort,"0"),autoFilter:n(i.autoFilter,"0"),pivotTables:n(i.pivotTables,"0")};i.sheet&&(u.algorithmName=i.algorithmName,u.hashValue=i.hashValue,u.saltValue=i.saltValue,u.spinCount=i.spinCount,u.objects=n(i.objects===!1,"1"),u.scenarios=n(i.scenarios===!1,"1")),o.some(u,a=>a!==void 0)&&e.leafNode(this.tag,u)}}parseOpen(e){switch(e.name){case this.tag:return this.model={sheet:s(e.attributes.sheet,"1"),objects:e.attributes.objects!=="1"&&void 0,scenarios:e.attributes.scenarios!=="1"&&void 0,selectLockedCells:e.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:e.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:s(e.attributes.formatCells,"0"),formatColumns:s(e.attributes.formatColumns,"0"),formatRows:s(e.attributes.formatRows,"0"),insertColumns:s(e.attributes.insertColumns,"0"),insertRows:s(e.attributes.insertRows,"0"),insertHyperlinks:s(e.attributes.insertHyperlinks,"0"),deleteColumns:s(e.attributes.deleteColumns,"0"),deleteRows:s(e.attributes.deleteRows,"0"),sort:s(e.attributes.sort,"0"),autoFilter:s(e.attributes.autoFilter,"0"),pivotTables:s(e.attributes.pivotTables,"0")},e.attributes.algorithmName&&(this.model.algorithmName=e.attributes.algorithmName,this.model.hashValue=e.attributes.hashValue,this.model.saltValue=e.attributes.saltValue,this.model.spinCount=parseInt(e.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(t,l,c){const o=t("../../../utils/col-cache"),r=t("../base-xform"),n={frozen:"frozen",frozenSplit:"frozen",split:"split"};l.exports=class extends r{get tag(){return"sheetView"}prepare(s){switch(s.state){case"frozen":case"split":break;default:s.state="normal"}}render(s,e){s.openNode("sheetView",{workbookViewId:e.workbookViewId||0});const i=function(m,d,b){b&&s.addAttribute(m,d)};let u,a,h,p;switch(i("rightToLeft","1",e.rightToLeft===!0),i("tabSelected","1",e.tabSelected),i("showRuler","0",e.showRuler===!1),i("showRowColHeaders","0",e.showRowColHeaders===!1),i("showGridLines","0",e.showGridLines===!1),i("zoomScale",e.zoomScale,e.zoomScale),i("zoomScaleNormal",e.zoomScaleNormal,e.zoomScaleNormal),i("view",e.style,e.style),e.state){case"frozen":a=e.xSplit||0,h=e.ySplit||0,u=e.topLeftCell||o.getAddress(h+1,a+1).address,p=(e.xSplit&&e.ySplit?"bottomRight":e.xSplit&&"topRight")||"bottomLeft",s.leafNode("pane",{xSplit:e.xSplit||void 0,ySplit:e.ySplit||void 0,topLeftCell:u,activePane:p,state:"frozen"}),s.leafNode("selection",{pane:p,activeCell:e.activeCell,sqref:e.activeCell});break;case"split":e.activePane==="topLeft"&&(e.activePane=void 0),s.leafNode("pane",{xSplit:e.xSplit||void 0,ySplit:e.ySplit||void 0,topLeftCell:e.topLeftCell,activePane:e.activePane}),s.leafNode("selection",{pane:e.activePane,activeCell:e.activeCell,sqref:e.activeCell});break;case"normal":e.activeCell&&s.leafNode("selection",{activeCell:e.activeCell,sqref:e.activeCell})}s.closeNode()}parseOpen(s){switch(s.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(s.attributes.workbookViewId,10),rightToLeft:s.attributes.rightToLeft==="1",tabSelected:s.attributes.tabSelected==="1",showRuler:s.attributes.showRuler!=="0",showRowColHeaders:s.attributes.showRowColHeaders!=="0",showGridLines:s.attributes.showGridLines!=="0",zoomScale:parseInt(s.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(s.attributes.zoomScaleNormal||"100",10),style:s.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(s.attributes.xSplit||"0",10),ySplit:parseInt(s.attributes.ySplit||"0",10),topLeftCell:s.attributes.topLeftCell,activePane:s.attributes.activePane||"topLeft",state:s.attributes.state},!0;case"selection":{const e=s.attributes.pane||"topLeft";return this.selections[e]={pane:e,activeCell:s.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(s){let e,i;switch(s){case"sheetView":return this.sheetView&&this.pane?(e=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:n[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(e.activePane=this.pane.activePane),i=this.selections[this.pane.activePane],i&&i.activeCell&&(e.activeCell=i.activeCell),this.sheetView.style&&(e.style=this.sheetView.style)):(e=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},i=this.selections.topLeft,i&&i.activeCell&&(e.activeCell=i.activeCell),this.sheetView.style&&(e.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"tablePart"}render(r,n){n&&r.leafNode(this.tag,{"r:id":n.rId})}parseOpen(r){switch(r.name){case this.tag:return this.model={rId:r.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../../../utils/col-cache"),n=t("../../../utils/xml-stream"),s=t("../../rel-type"),e=t("./merges"),i=t("../base-xform"),u=t("../list-xform"),a=t("./row-xform"),h=t("./col-xform"),p=t("./dimension-xform"),m=t("./hyperlink-xform"),d=t("./merge-cell-xform"),b=t("./data-validations-xform"),g=t("./sheet-properties-xform"),S=t("./sheet-format-properties-xform"),C=t("./sheet-view-xform"),I=t("./sheet-protection-xform"),D=t("./page-margins-xform"),z=t("./page-setup-xform"),P=t("./print-options-xform"),B=t("./auto-filter-xform"),F=t("./picture-xform"),W=t("./drawing-xform"),q=t("./table-part-xform"),A=t("./row-breaks-xform"),M=t("./header-footer-xform"),k=t("./cf/conditional-formattings-xform"),y=t("./ext-lst-xform"),w=(_,T)=>{if(!T||!T.length)return _;if(!_||!_.length)return T;const O={},j={};return _.forEach(V=>{O[V.ref]=V,V.rules.forEach(X=>{const{x14Id:J}=X;J&&(j[J]=X)})}),T.forEach(V=>{V.rules.forEach(X=>{const J=j[X.x14Id];J?((L,G)=>{Object.keys(G).forEach(N=>{const R=L[N],U=G[N];R===void 0&&U!==void 0&&(L[N]=U)})})(J,X):O[V.ref]?O[V.ref].rules.push(X):_.push({ref:V.ref,rules:[X]})})}),_};class x extends i{constructor(T){super();const{maxRows:O,maxCols:j,ignoreNodes:V}=T||{};this.ignoreNodes=V||[],this.map={sheetPr:new g,dimension:new p,sheetViews:new u({tag:"sheetViews",count:!1,childXform:new C}),sheetFormatPr:new S,cols:new u({tag:"cols",count:!1,childXform:new h}),sheetData:new u({tag:"sheetData",count:!1,empty:!0,childXform:new a({maxItems:j}),maxItems:O}),autoFilter:new B,mergeCells:new u({tag:"mergeCells",count:!0,childXform:new d}),rowBreaks:new A,hyperlinks:new u({tag:"hyperlinks",count:!1,childXform:new m}),pageMargins:new D,dataValidations:new b,pageSetup:new z,headerFooter:new M,printOptions:new P,picture:new F,drawing:new W,sheetProtection:new I,tableParts:new u({tag:"tableParts",count:!0,childXform:new q}),conditionalFormatting:new k,extLst:new y}}prepare(T,O){O.merges=new e,T.hyperlinks=O.hyperlinks=[],T.comments=O.comments=[],O.formulae={},O.siFormulae=0,this.map.cols.prepare(T.cols,O),this.map.sheetData.prepare(T.rows,O),this.map.conditionalFormatting.prepare(T.conditionalFormattings,O),T.mergeCells=O.merges.mergeCells;const j=T.rels=[];function V(L){return"rId"+(L.length+1)}if(T.hyperlinks.forEach(L=>{const G=V(j);L.rId=G,j.push({Id:G,Type:s.Hyperlink,Target:L.target,TargetMode:"External"})}),T.comments.length>0){const L={Id:V(j),Type:s.Comments,Target:`../comments${T.id}.xml`};j.push(L);const G={Id:V(j),Type:s.VmlDrawing,Target:`../drawings/vmlDrawing${T.id}.vml`};j.push(G),T.comments.forEach(N=>{N.refAddress=r.decodeAddress(N.ref)}),O.commentRefs.push({commentName:"comments"+T.id,vmlDrawing:"vmlDrawing"+T.id})}const X=[];let J;T.media.forEach(L=>{if(L.type==="background"){const G=V(j);J=O.media[L.imageId],j.push({Id:G,Type:s.Image,Target:`../media/${J.name}.${J.extension}`}),T.background={rId:G},T.image=O.media[L.imageId]}else if(L.type==="image"){let{drawing:G}=T;J=O.media[L.imageId],G||(G=T.drawing={rId:V(j),name:"drawing"+ ++O.drawingsCount,anchors:[],rels:[]},O.drawings.push(G),j.push({Id:G.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${G.name}.xml`}));let N=this.preImageId===L.imageId?X[L.imageId]:X[G.rels.length];N||(N=V(G.rels),X[G.rels.length]=N,G.rels.push({Id:N,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${J.name}.${J.extension}`}));const R={picture:{rId:N},range:L.range};if(L.hyperlinks&&L.hyperlinks.hyperlink){const U=V(G.rels);X[G.rels.length]=U,R.picture.hyperlinks={tooltip:L.hyperlinks.tooltip,rId:U},G.rels.push({Id:U,Type:s.Hyperlink,Target:L.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=L.imageId,G.anchors.push(R)}}),T.tables.forEach(L=>{const G=V(j);L.rId=G,j.push({Id:G,Type:s.Table,Target:"../tables/"+L.target}),L.columns.forEach(N=>{const{style:R}=N;R&&(N.dxfId=O.styles.addDxfStyle(R))})}),this.map.extLst.prepare(T,O)}render(T,O){T.openXml(n.StdDocAttributes),T.openNode("worksheet",x.WORKSHEET_ATTRIBUTES);const j=O.properties?{defaultRowHeight:O.properties.defaultRowHeight,dyDescent:O.properties.dyDescent,outlineLevelCol:O.properties.outlineLevelCol,outlineLevelRow:O.properties.outlineLevelRow}:void 0;O.properties&&O.properties.defaultColWidth&&(j.defaultColWidth=O.properties.defaultColWidth);const V={outlineProperties:O.properties&&O.properties.outlineProperties,tabColor:O.properties&&O.properties.tabColor,pageSetup:O.pageSetup&&O.pageSetup.fitToPage?{fitToPage:O.pageSetup.fitToPage}:void 0},X=O.pageSetup&&O.pageSetup.margins,J={showRowColHeaders:O.pageSetup&&O.pageSetup.showRowColHeaders,showGridLines:O.pageSetup&&O.pageSetup.showGridLines,horizontalCentered:O.pageSetup&&O.pageSetup.horizontalCentered,verticalCentered:O.pageSetup&&O.pageSetup.verticalCentered},L=O.sheetProtection;this.map.sheetPr.render(T,V),this.map.dimension.render(T,O.dimensions),this.map.sheetViews.render(T,O.views),this.map.sheetFormatPr.render(T,j),this.map.cols.render(T,O.cols),this.map.sheetData.render(T,O.rows),this.map.sheetProtection.render(T,L),this.map.autoFilter.render(T,O.autoFilter),this.map.mergeCells.render(T,O.mergeCells),this.map.conditionalFormatting.render(T,O.conditionalFormattings),this.map.dataValidations.render(T,O.dataValidations),this.map.hyperlinks.render(T,O.hyperlinks),this.map.printOptions.render(T,J),this.map.pageMargins.render(T,X),this.map.pageSetup.render(T,O.pageSetup),this.map.headerFooter.render(T,O.headerFooter),this.map.rowBreaks.render(T,O.rowBreaks),this.map.drawing.render(T,O.drawing),this.map.picture.render(T,O.background),this.map.tableParts.render(T,O.tables),this.map.extLst.render(T,O),O.rels&&O.rels.forEach(G=>{G.Type===s.VmlDrawing&&T.leafNode("legacyDrawing",{"r:id":G.Id})}),T.closeNode()}parseOpen(T){return this.parser?(this.parser.parseOpen(T),!0):T.name==="worksheet"?(o.each(this.map,O=>{O.reset()}),!0):(this.map[T.name]&&!this.ignoreNodes.includes(T.name)&&(this.parser=this.map[T.name],this.parser.parseOpen(T)),!0)}parseText(T){this.parser&&this.parser.parseText(T)}parseClose(T){if(this.parser)return this.parser.parseClose(T)||(this.parser=void 0),!0;switch(T){case"worksheet":{const O=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(O.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(O.outlineProperties=this.map.sheetPr.model.outlineProperties);const j={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},V=Object.assign(j,this.map.pageSetup.model,this.map.printOptions.model),X=w(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:O,views:this.map.sheetViews.model,pageSetup:V,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:X},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(T,O){const j=(T.relationships||[]).reduce((X,J)=>{if(X[J.Id]=J,J.Type===s.Comments&&(T.comments=O.comments[J.Target].comments),J.Type===s.VmlDrawing&&T.comments&&T.comments.length){const L=O.vmlDrawings[J.Target].comments;T.comments.forEach((G,N)=>{G.note=Object.assign({},G.note,L[N])})}return X},{});if(O.commentsMap=(T.comments||[]).reduce((X,J)=>(J.ref&&(X[J.ref]=J),X),{}),O.hyperlinkMap=(T.hyperlinks||[]).reduce((X,J)=>(J.rId&&(X[J.address]=j[J.rId].Target),X),{}),O.formulae={},T.rows=T.rows&&T.rows.filter(Boolean)||[],T.rows.forEach(X=>{X.cells=X.cells&&X.cells.filter(Boolean)||[]}),this.map.cols.reconcile(T.cols,O),this.map.sheetData.reconcile(T.rows,O),this.map.conditionalFormatting.reconcile(T.conditionalFormattings,O),T.media=[],T.drawing){const X=j[T.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(X){const J=X[1];O.drawings[J].anchors.forEach(L=>{if(L.medium){const G={type:"image",imageId:L.medium.index,range:L.range,hyperlinks:L.picture.hyperlinks};T.media.push(G)}})}}const V=T.background&&j[T.background.rId];if(V){const X=V.Target.split("/media/")[1],J=O.mediaIndex&&O.mediaIndex[X];J!==void 0&&T.media.push({type:"background",imageId:J})}T.tables=(T.tables||[]).map(X=>{const J=j[X.rId];return O.tables[J.Target]}),delete T.relationships,delete T.hyperlinks,delete T.comments}}x.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},l.exports=x},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{constructor(r){super(),this.tag=r.tag,this.attr=r.attr}render(r,n){n&&(r.openNode(this.tag),r.closeNode())}parseOpen(r){r.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{constructor(r){super(),this.tag=r.tag,this.attr=r.attr,this.attrs=r.attrs,this._format=r.format||function(n){try{return Number.isNaN(n.getTime())?"":n.toISOString()}catch{return""}},this._parse=r.parse||function(n){return new Date(n)}}render(r,n){n&&(r.openNode(this.tag),this.attrs&&r.addAttributes(this.attrs),this.attr?r.addAttribute(this.attr,this._format(n)):r.writeText(this._format(n)),r.closeNode())}parseOpen(r){r.name===this.tag&&(this.attr?this.model=this._parse(r.attributes[this.attr]):this.text=[])}parseText(r){this.attr||this.text.push(r)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{constructor(r){super(),this.tag=r.tag,this.attr=r.attr,this.attrs=r.attrs,this.zero=r.zero}render(r,n){(n||this.zero)&&(r.openNode(this.tag),this.attrs&&r.addAttributes(this.attrs),this.attr?r.addAttribute(this.attr,n):r.writeText(n),r.closeNode())}parseOpen(r){return r.name===this.tag&&(this.attr?this.model=parseInt(r.attributes[this.attr],10):this.text=[],!0)}parseText(r){this.attr||this.text.push(r)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{constructor(r){super(),this.tag=r.tag,this.attr=r.attr,this.attrs=r.attrs}render(r,n){n!==void 0&&(r.openNode(this.tag),this.attrs&&r.addAttributes(this.attrs),this.attr?r.addAttribute(this.attr,n):r.writeText(n),r.closeNode())}parseOpen(r){r.name===this.tag&&(this.attr?this.model=r.attributes[this.attr]:this.text=[])}parseText(r){this.attr||this.text.push(r)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(t,l,c){const o=t("./base-xform"),r=t("../../utils/xml-stream");l.exports=class extends o{constructor(n){super(),this._model=n}render(n){if(!this._xml){const s=new r;(function e(i,u){i.openNode(u.tag,u.$),u.c&&u.c.forEach(a=>{e(i,a)}),u.t&&i.writeText(u.t),i.closeNode()})(s,this._model),this._xml=s.xml}n.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(n){switch(n){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(t,l,c){const o=t("./text-xform"),r=t("./rich-text-xform"),n=t("../base-xform");l.exports=class extends n{constructor(){super(),this.map={r:new r,t:new o}}get tag(){return"rPh"}render(s,e){if(s.openNode(this.tag,{sb:e.sb||0,eb:e.eb||0}),e&&e.hasOwnProperty("richText")&&e.richText){const{r:i}=this.map;e.richText.forEach(u=>{i.render(s,u)})}else e&&this.map.t.render(s,e.text);s.closeNode()}parseOpen(s){const{name:e}=s;return this.parser?(this.parser.parseOpen(s),!0):e===this.tag?(this.model={sb:parseInt(s.attributes.sb,10),eb:parseInt(s.attributes.eb,10)},!0):(this.parser=this.map[e],!!this.parser&&(this.parser.parseOpen(s),!0))}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser){if(!this.parser.parseClose(s)){switch(s){case"r":{let e=this.model.richText;e||(e=this.model.richText=[]),e.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(s){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(t,l,c){const o=t("./text-xform"),r=t("../style/font-xform"),n=t("../base-xform");class s extends n{constructor(i){super(),this.model=i}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new o)}get fontXform(){return this._fontXform||(this._fontXform=new r(s.FONT_OPTIONS))}render(i,u){u=u||this.model,i.openNode("r"),u.font&&this.fontXform.render(i,u.font),this.textXform.render(i,u.text),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(i),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(i),!0;default:return!1}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){switch(i){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(i),!0}}}s.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},l.exports=s},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(t,l,c){const o=t("./text-xform"),r=t("./rich-text-xform"),n=t("./phonetic-text-xform"),s=t("../base-xform");l.exports=class extends s{constructor(e){super(),this.model=e,this.map={r:new r,t:new o,rPh:new n}}get tag(){return"si"}render(e,i){e.openNode(this.tag),i&&i.hasOwnProperty("richText")&&i.richText?i.richText.length?i.richText.forEach(u=>{this.map.r.render(e,u)}):this.map.t.render(e,""):i!=null&&this.map.t.render(e,i),e.closeNode()}parseOpen(e){const{name:i}=e;return this.parser?(this.parser.parseOpen(e),!0):i===this.tag?(this.model={},!0):(this.parser=this.map[i],!!this.parser&&(this.parser.parseOpen(e),!0))}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case"r":{let i=this.model.richText;i||(i=this.model.richText=[]),i.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(e){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(t,l,c){const o=t("../../../utils/xml-stream"),r=t("../base-xform"),n=t("./shared-string-xform");l.exports=class extends r{constructor(s){super(),this.model=s||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new n)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(s){return this.model.values[s]}add(s){return s.richText?this.addRichText(s):this.addText(s)}addText(s){let e=this.hash[s];return e===void 0&&(e=this.hash[s]=this.model.values.length,this.model.values.push(s)),this.model.count++,e}addRichText(s){const e=this.sharedStringXform.toXml(s);let i=this.rich[e];return i===void 0&&(i=this.rich[e]=this.model.values.length,this.model.values.push(s)),this.model.count++,i}render(s,e){e=e||this._values,s.openXml(o.StdDocAttributes),s.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:e.count,uniqueCount:e.values.length});const i=this.sharedStringXform;e.values.forEach(u=>{i.render(s,u)}),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(s),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(s))}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(s){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+s)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"t"}render(r,n){r.openNode("t"),/^\s|\n|\s$/.test(n)&&r.addAttribute("xml:space","preserve"),r.writeText(n),r.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(r,n)=>String.fromCharCode(parseInt(n,16)))}parseOpen(r){switch(r.name){case"t":return this._text=[],!0;default:return!1}}parseText(r){this._text.push(r)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(t,l,c){const o=t("../../../doc/enums"),r=t("../../../utils/utils"),n=t("../base-xform"),s={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((i,u)=>(i[u]=!0,i),{}),horizontal(i){return this.horizontalValues[i]?i:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((i,u)=>(i[u]=!0,i),{}),vertical(i){return i==="middle"?"center":this.verticalValues[i]?i:void 0},wrapText:i=>!!i||void 0,shrinkToFit:i=>!!i||void 0,textRotation(i){switch(i){case"vertical":return i;default:return(i=r.validInt(i))>=-90&&i<=90?i:void 0}},indent:i=>(i=r.validInt(i),Math.max(0,i)),readingOrder(i){switch(i){case"ltr":return o.ReadingOrder.LeftToRight;case"rtl":return o.ReadingOrder.RightToLeft;default:return}}},e={toXml(i){if(i=s.textRotation(i)){if(i==="vertical")return 255;const u=Math.round(i);if(u>=0&&u<=90)return u;if(u<0&&u>=-90)return 90-u}},toModel(i){const u=r.validInt(i);if(u!==void 0){if(u===255)return"vertical";if(u>=0&&u<=90)return u;if(u>90&&u<=180)return 90-u}}};l.exports=class extends n{get tag(){return"alignment"}render(i,u){i.addRollback(),i.openNode("alignment");let a=!1;function h(p,m){m&&(i.addAttribute(p,m),a=!0)}h("horizontal",s.horizontal(u.horizontal)),h("vertical",s.vertical(u.vertical)),h("wrapText",!!s.wrapText(u.wrapText)&&"1"),h("shrinkToFit",!!s.shrinkToFit(u.shrinkToFit)&&"1"),h("indent",s.indent(u.indent)),h("textRotation",e.toXml(u.textRotation)),h("readingOrder",s.readingOrder(u.readingOrder)),i.closeNode(),a?i.commit():i.rollback()}parseOpen(i){const u={};let a=!1;function h(p,m,d){p&&(u[m]=d,a=!0)}h(i.attributes.horizontal,"horizontal",i.attributes.horizontal),h(i.attributes.vertical,"vertical",i.attributes.vertical==="center"?"middle":i.attributes.vertical),h(i.attributes.wrapText,"wrapText",r.parseBoolean(i.attributes.wrapText)),h(i.attributes.shrinkToFit,"shrinkToFit",r.parseBoolean(i.attributes.shrinkToFit)),h(i.attributes.indent,"indent",parseInt(i.attributes.indent,10)),h(i.attributes.textRotation,"textRotation",e.toModel(i.attributes.textRotation)),h(i.attributes.readingOrder,"readingOrder",i.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=a?u:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(t,l,c){const o=t("../base-xform"),r=t("../../../utils/utils"),n=t("./color-xform");class s extends o{constructor(i){super(),this.name=i,this.map={color:new n}}get tag(){return this.name}render(i,u,a){const h=u&&u.color||a||this.defaultColor;i.openNode(this.name),u&&u.style&&(i.addAttribute("style",u.style),h&&this.map.color.render(i,h)),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.name:{const{style:u}=i.attributes;return this.model=u?{style:u}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(i),!0;default:return!1}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):(i===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(i){return s.validStyleValues[i]}}s.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((e,i)=>(e[i]=!0,e),{}),l.exports=class extends o{constructor(){super(),this.map={top:new s("top"),left:new s("left"),bottom:new s("bottom"),right:new s("right"),diagonal:new s("diagonal")}}render(e,i){const{color:u}=i;function a(h,p){h&&!h.color&&i.color&&(h={...h,color:i.color}),p.render(e,h,u)}e.openNode("border"),i.diagonal&&i.diagonal.style&&(i.diagonal.up&&e.addAttribute("diagonalUp","1"),i.diagonal.down&&e.addAttribute("diagonalDown","1")),a(i.left,this.map.left),a(i.right,this.map.right),a(i.top,this.map.top),a(i.bottom,this.map.bottom),a(i.diagonal,this.map.diagonal),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"border":return this.reset(),this.diagonalUp=r.parseBoolean(e.attributes.diagonalUp),this.diagonalDown=r.parseBoolean(e.attributes.diagonalDown),!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;if(e==="border"){const i=this.model={},u=function(a,h,p){h&&(p&&Object.assign(h,p),i[a]=h)};u("left",this.map.left.model),u("right",this.map.right.model),u("top",this.map.top.model),u("bottom",this.map.bottom.model),u("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{constructor(r){super(),this.name=r||"color"}get tag(){return this.name}render(r,n){return!!n&&(r.openNode(this.name),n.argb?r.addAttribute("rgb",n.argb):n.theme!==void 0?(r.addAttribute("theme",n.theme),n.tint!==void 0&&r.addAttribute("tint",n.tint)):n.indexed!==void 0?r.addAttribute("indexed",n.indexed):r.addAttribute("auto","1"),r.closeNode(),!0)}parseOpen(r){return r.name===this.name&&(r.attributes.rgb?this.model={argb:r.attributes.rgb}:r.attributes.theme?(this.model={theme:parseInt(r.attributes.theme,10)},r.attributes.tint&&(this.model.tint=parseFloat(r.attributes.tint))):r.attributes.indexed?this.model={indexed:parseInt(r.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(t,l,c){const o=t("../base-xform"),r=t("./alignment-xform"),n=t("./border-xform"),s=t("./fill-xform"),e=t("./font-xform"),i=t("./numfmt-xform"),u=t("./protection-xform");l.exports=class extends o{constructor(){super(),this.map={alignment:new r,border:new n,fill:new s,font:new e,numFmt:new i,protection:new u}}get tag(){return"dxf"}render(a,h){if(a.openNode(this.tag),h.font&&this.map.font.render(a,h.font),h.numFmt&&h.numFmtId){const p={id:h.numFmtId,formatCode:h.numFmt};this.map.numFmt.render(a,p)}h.fill&&this.map.fill.render(a,h.fill),h.alignment&&this.map.alignment.render(a,h.alignment),h.border&&this.map.border.render(a,h.border),h.protection&&this.map.protection.render(a,h.protection),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a),!0}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.parser=void 0),!0):a!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(t,l,c){const o=t("../base-xform"),r=t("./color-xform");class n extends o{constructor(){super(),this.map={color:new r}}get tag(){return"stop"}render(a,h){a.openNode("stop"),a.addAttribute("position",h.position),this.map.color.render(a,h.color),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"stop":return this.model={position:parseFloat(a.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(a),!0;default:return!1}}parseText(){}parseClose(a){return!!this.parser&&(this.parser.parseClose(a)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class s extends o{constructor(){super(),this.map={fgColor:new r("fgColor"),bgColor:new r("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(a,h){a.openNode("patternFill"),a.addAttribute("patternType",h.pattern),h.fgColor&&this.map.fgColor.render(a,h.fgColor),h.bgColor&&this.map.bgColor.render(a,h.bgColor),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"patternFill":return this.model={type:"pattern",pattern:a.attributes.patternType},!0;default:return this.parser=this.map[a.name],!!this.parser&&(this.parser.parseOpen(a),!0)}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return!!this.parser&&(this.parser.parseClose(a)||(this.parser.model&&(this.model[a]=this.parser.model),this.parser=void 0),!0)}}class e extends o{constructor(){super(),this.map={stop:new n}}get name(){return"gradient"}get tag(){return"gradientFill"}render(a,h){switch(a.openNode("gradientFill"),h.gradient){case"angle":a.addAttribute("degree",h.degree);break;case"path":a.addAttribute("type","path"),h.center.left&&(a.addAttribute("left",h.center.left),h.center.right===void 0&&a.addAttribute("right",h.center.left)),h.center.right&&a.addAttribute("right",h.center.right),h.center.top&&(a.addAttribute("top",h.center.top),h.center.bottom===void 0&&a.addAttribute("bottom",h.center.top)),h.center.bottom&&a.addAttribute("bottom",h.center.bottom)}const p=this.map.stop;h.stops.forEach(m=>{p.render(a,m)}),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"gradientFill":{const h=this.model={stops:[]};return a.attributes.degree?(h.gradient="angle",h.degree=parseInt(a.attributes.degree,10)):a.attributes.type==="path"&&(h.gradient="path",h.center={left:a.attributes.left?parseFloat(a.attributes.left):0,top:a.attributes.top?parseFloat(a.attributes.top):0},a.attributes.right!==a.attributes.left&&(h.center.right=a.attributes.right?parseFloat(a.attributes.right):0),a.attributes.bottom!==a.attributes.top&&(h.center.bottom=a.attributes.bottom?parseFloat(a.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(a),!0;default:return!1}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return!!this.parser&&(this.parser.parseClose(a)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class i extends o{constructor(){super(),this.map={patternFill:new s,gradientFill:new e}}get tag(){return"fill"}render(a,h){switch(a.addRollback(),a.openNode("fill"),h.type){case"pattern":this.map.patternFill.render(a,h);break;case"gradient":this.map.gradientFill.render(a,h);break;default:return void a.rollback()}a.closeNode(),a.commit()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"fill":return this.model={},!0;default:return this.parser=this.map[a.name],!!this.parser&&(this.parser.parseOpen(a),!0)}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return!!this.parser&&(this.parser.parseClose(a)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(a){return i.validPatternValues[a]}}i.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((u,a)=>(u[a]=!0,u),{}),i.StopXform=n,i.PatternFillXform=s,i.GradientFillXform=e,l.exports=i},{"../base-xform":32,"./color-xform":128}],131:[function(t,l,c){const o=t("./color-xform"),r=t("../simple/boolean-xform"),n=t("../simple/integer-xform"),s=t("../simple/string-xform"),e=t("./underline-xform"),i=t("../../../utils/under-dash"),u=t("../base-xform");class a extends u{constructor(p){super(),this.options=p||a.OPTIONS,this.map={b:{prop:"bold",xform:new r({tag:"b",attr:"val"})},i:{prop:"italic",xform:new r({tag:"i",attr:"val"})},u:{prop:"underline",xform:new e},charset:{prop:"charset",xform:new n({tag:"charset",attr:"val"})},color:{prop:"color",xform:new o},condense:{prop:"condense",xform:new r({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new r({tag:"extend",attr:"val"})},family:{prop:"family",xform:new n({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new r({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new s({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new s({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new r({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new r({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new n({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new s({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(p,m){const{map:d}=this;p.openNode(this.options.tagName),i.each(this.map,(b,g)=>{d[g].xform.render(p,m[b.prop])}),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;if(this.map[p.name])return this.parser=this.map[p.name].xform,this.parser.parseOpen(p);switch(p.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){if(this.parser&&!this.parser.parseClose(p)){const m=this.map[p];return this.parser.model&&(this.model[m.prop]=this.parser.model),this.parser=void 0,!0}switch(p){case this.options.tagName:return!1;default:return!0}}}a.OPTIONS={tagName:"font",fontNameTag:"name"},l.exports=a},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(t,l,c){const o=t("../../../utils/under-dash"),r=t("../../defaultnumformats"),n=t("../base-xform"),s=(function(){const i={};return o.each(r,(u,a)=>{u.f&&(i[u.f]=parseInt(a,10))}),i})();class e extends n{constructor(u,a){super(),this.id=u,this.formatCode=a}get tag(){return"numFmt"}render(u,a){u.leafNode("numFmt",{numFmtId:a.id,formatCode:a.formatCode})}parseOpen(u){switch(u.name){case"numFmt":return this.model={id:parseInt(u.attributes.numFmtId,10),formatCode:u.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}e.getDefaultFmtId=function(i){return s[i]},e.getDefaultFmtCode=function(i){return r[i]&&r[i].f},l.exports=e},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(t,l,c){const o=t("../base-xform"),r={boolean:(n,s)=>n===void 0?s:n};l.exports=class extends o{get tag(){return"protection"}render(n,s){n.addRollback(),n.openNode("protection");let e=!1;function i(u,a){a!==void 0&&(n.addAttribute(u,a),e=!0)}i("locked",r.boolean(s.locked,!0)?void 0:"0"),i("hidden",r.boolean(s.hidden,!1)?"1":void 0),n.closeNode(),e?n.commit():n.rollback()}parseOpen(n){const s={locked:n.attributes.locked!=="0",hidden:n.attributes.hidden==="1"},e=!s.locked||s.hidden;this.model=e?s:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(t,l,c){const o=t("../base-xform"),r=t("./alignment-xform"),n=t("./protection-xform");l.exports=class extends o{constructor(s){super(),this.xfId=!(!s||!s.xfId),this.map={alignment:new r,protection:new n}}get tag(){return"xf"}render(s,e){s.openNode("xf",{numFmtId:e.numFmtId||0,fontId:e.fontId||0,fillId:e.fillId||0,borderId:e.borderId||0}),this.xfId&&s.addAttribute("xfId",e.xfId||0),e.numFmtId&&s.addAttribute("applyNumberFormat","1"),e.fontId&&s.addAttribute("applyFont","1"),e.fillId&&s.addAttribute("applyFill","1"),e.borderId&&s.addAttribute("applyBorder","1"),e.alignment&&s.addAttribute("applyAlignment","1"),e.protection&&s.addAttribute("applyProtection","1"),e.alignment&&this.map.alignment.render(s,e.alignment),e.protection&&this.map.protection.render(s,e.protection),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case"xf":return this.model={numFmtId:parseInt(s.attributes.numFmtId,10),fontId:parseInt(s.attributes.fontId,10),fillId:parseInt(s.attributes.fillId,10),borderId:parseInt(s.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(s.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(s),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(s),!0;default:return!1}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):s!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(t,l,c){const o=t("../../../doc/enums"),r=t("../../../utils/xml-stream"),n=t("../base-xform"),s=t("../static-xform"),e=t("../list-xform"),i=t("./font-xform"),u=t("./fill-xform"),a=t("./border-xform"),h=t("./numfmt-xform"),p=t("./style-xform"),m=t("./dxf-xform");class d extends n{constructor(g){super(),this.map={numFmts:new e({tag:"numFmts",count:!0,childXform:new h}),fonts:new e({tag:"fonts",count:!0,childXform:new i,$:{"x14ac:knownFonts":1}}),fills:new e({tag:"fills",count:!0,childXform:new u}),borders:new e({tag:"borders",count:!0,childXform:new a}),cellStyleXfs:new e({tag:"cellStyleXfs",count:!0,childXform:new p}),cellXfs:new e({tag:"cellXfs",count:!0,childXform:new p({xfId:!0})}),dxfs:new e({tag:"dxfs",always:!0,count:!0,childXform:new m}),numFmt:new h,font:new i,fill:new u,border:new a,style:new p({xfId:!0}),cellStyles:d.STATIC_XFORMS.cellStyles,tableStyles:d.STATIC_XFORMS.tableStyles,extLst:d.STATIC_XFORMS.extLst},g&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(g,S){S=S||this.model,g.openXml(r.StdDocAttributes),g.openNode("styleSheet",d.STYLESHEET_ATTRIBUTES),this.index?(S.numFmts&&S.numFmts.length&&(g.openNode("numFmts",{count:S.numFmts.length}),S.numFmts.forEach(C=>{g.writeXml(C)}),g.closeNode()),S.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),g.openNode("fonts",{count:S.fonts.length,"x14ac:knownFonts":1}),S.fonts.forEach(C=>{g.writeXml(C)}),g.closeNode(),g.openNode("fills",{count:S.fills.length}),S.fills.forEach(C=>{g.writeXml(C)}),g.closeNode(),g.openNode("borders",{count:S.borders.length}),S.borders.forEach(C=>{g.writeXml(C)}),g.closeNode(),this.map.cellStyleXfs.render(g,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),g.openNode("cellXfs",{count:S.styles.length}),S.styles.forEach(C=>{g.writeXml(C)}),g.closeNode()):(this.map.numFmts.render(g,S.numFmts),this.map.fonts.render(g,S.fonts),this.map.fills.render(g,S.fills),this.map.borders.render(g,S.borders),this.map.cellStyleXfs.render(g,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(g,S.styles)),d.STATIC_XFORMS.cellStyles.render(g),this.map.dxfs.render(g,S.dxfs),d.STATIC_XFORMS.tableStyles.render(g),d.STATIC_XFORMS.extLst.render(g),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[g.name],this.parser&&this.parser.parseOpen(g),!0}}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.parser=void 0),!0;switch(g){case"styleSheet":{this.model={};const S=(C,I)=>{I.model&&I.model.length&&(this.model[C]=I.model)};if(S("numFmts",this.map.numFmts),S("fonts",this.map.fonts),S("fills",this.map.fills),S("borders",this.map.borders),S("styles",this.map.cellXfs),S("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const C=this.index.numFmt;this.model.numFmts.forEach(I=>{C[I.id]=I.formatCode})}return!1}default:return!0}}addStyleModel(g,S){if(!g)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(g))return this.weakMap.get(g);const C={};if(S=S||o.ValueType.Number,g.numFmt)C.numFmtId=this._addNumFmtStr(g.numFmt);else switch(S){case o.ValueType.Number:C.numFmtId=this._addNumFmtStr("General");break;case o.ValueType.Date:C.numFmtId=this._addNumFmtStr("mm-dd-yy")}g.font&&(C.fontId=this._addFont(g.font)),g.border&&(C.borderId=this._addBorder(g.border)),g.fill&&(C.fillId=this._addFill(g.fill)),g.alignment&&(C.alignment=g.alignment),g.protection&&(C.protection=g.protection);const I=this._addStyle(C);return this.weakMap&&this.weakMap.set(g,I),I}getStyleModel(g){const S=this.model.styles[g];if(!S)return null;let C=this.index.model[g];if(C)return C;if(C=this.index.model[g]={},S.numFmtId){const D=this.index.numFmt[S.numFmtId]||h.getDefaultFmtCode(S.numFmtId);D&&(C.numFmt=D)}function I(D,z,P){if(P||P===0){const B=z[P];B&&(C[D]=B)}}return I("font",this.model.fonts,S.fontId),I("border",this.model.borders,S.borderId),I("fill",this.model.fills,S.fillId),S.alignment&&(C.alignment=S.alignment),S.protection&&(C.protection=S.protection),C}addDxfStyle(g){return g.numFmt&&(g.numFmtId=this._addNumFmtStr(g.numFmt)),this.model.dxfs.push(g),this.model.dxfs.length-1}getDxfStyle(g){return this.model.dxfs[g]}_addStyle(g){const S=this.map.style.toXml(g);let C=this.index.style[S];return C===void 0&&(C=this.index.style[S]=this.model.styles.length,this.model.styles.push(S)),C}_addNumFmtStr(g){let S=h.getDefaultFmtId(g);if(S!==void 0||(S=this.index.numFmt[g],S!==void 0))return S;S=this.index.numFmt[g]=164+this.model.numFmts.length;const C=this.map.numFmt.toXml({id:S,formatCode:g});return this.model.numFmts.push(C),S}_addFont(g){const S=this.map.font.toXml(g);let C=this.index.font[S];return C===void 0&&(C=this.index.font[S]=this.model.fonts.length,this.model.fonts.push(S)),C}_addBorder(g){const S=this.map.border.toXml(g);let C=this.index.border[S];return C===void 0&&(C=this.index.border[S]=this.model.borders.length,this.model.borders.push(S)),C}_addFill(g){const S=this.map.fill.toXml(g);let C=this.index.fill[S];return C===void 0&&(C=this.index.fill[S]=this.model.fills.length,this.model.fills.push(S)),C}}d.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},d.STATIC_XFORMS={cellStyles:new s({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new s({tag:"dxfs",$:{count:0}}),tableStyles:new s({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new s({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},d.Mock=class extends d{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(b){return b.autodrain(),Promise.resolve()}addStyleModel(b,g){switch(g){case o.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const b={numFmtId:h.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(b)}return this._dateStyleId}getStyleModel(){return{}}},l.exports=d},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(t,l,c){const o=t("../base-xform");class r extends o{constructor(s){super(),this.model=s}get tag(){return"u"}render(s,e){if((e=e||this.model)===!0)s.leafNode("u");else{const i=r.Attributes[e];i&&s.leafNode("u",i)}}parseOpen(s){s.name==="u"&&(this.model=s.attributes.val||!0)}parseText(){}parseClose(){return!1}}r.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},l.exports=r},{"../base-xform":32}],137:[function(t,l,c){const o=t("../base-xform"),r=t("./filter-column-xform");l.exports=class extends o{constructor(){super(),this.map={filterColumn:new r}}get tag(){return"autoFilter"}prepare(n){n.columns.forEach((s,e)=>{this.map.filterColumn.prepare(s,{index:e})})}render(n,s){return n.openNode(this.tag,{ref:s.autoFilterRef}),s.columns.forEach(e=>{this.map.filterColumn.render(n,e)}),n.closeNode(),!0}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:return this.model={autoFilterRef:n.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[n.name],this.parser)return this.parseOpen(n),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(n))}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(n){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+n)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"customFilter"}render(r,n){r.leafNode(this.tag,{val:n.val,operator:n.operator})}parseOpen(r){return r.name===this.tag&&(this.model={val:r.attributes.val,operator:r.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(t,l,c){const o=t("../base-xform"),r=t("../list-xform"),n=t("./custom-filter-xform"),s=t("./filter-xform");l.exports=class extends o{constructor(){super(),this.map={customFilters:new r({tag:"customFilters",count:!1,empty:!0,childXform:new n}),filters:new r({tag:"filters",count:!1,empty:!0,childXform:new s})}}get tag(){return"filterColumn"}prepare(e,i){e.colId=i.index.toString()}render(e,i){return i.customFilters?(e.openNode(this.tag,{colId:i.colId,hiddenButton:i.filterButton?"0":"1"}),this.map.customFilters.render(e,i.customFilters),e.closeNode(),!0):(e.leafNode(this.tag,{colId:i.colId,hiddenButton:i.filterButton?"0":"1"}),!0)}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;const{attributes:i}=e;switch(e.name){case this.tag:return this.model={filterButton:i.hiddenButton==="0"},!0;default:if(this.parser=this.map[e.name],this.parser)return this.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(e))}}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"filter"}render(r,n){r.leafNode(this.tag,{val:n.val})}parseOpen(r){return r.name===this.tag&&(this.model={val:r.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"tableColumn"}prepare(r,n){r.id=n.index+1}render(r,n){return r.leafNode(this.tag,{id:n.id.toString(),name:n.name,totalsRowLabel:n.totalsRowLabel,totalsRowFunction:n.totalsRowFunction,dxfId:n.dxfId}),!0}parseOpen(r){if(r.name===this.tag){const{attributes:n}=r;return this.model={name:n.name,totalsRowLabel:n.totalsRowLabel,totalsRowFunction:n.totalsRowFunction,dxfId:n.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(t,l,c){const o=t("../base-xform");l.exports=class extends o{get tag(){return"tableStyleInfo"}render(r,n){return r.leafNode(this.tag,{name:n.theme?n.theme:void 0,showFirstColumn:n.showFirstColumn?"1":"0",showLastColumn:n.showLastColumn?"1":"0",showRowStripes:n.showRowStripes?"1":"0",showColumnStripes:n.showColumnStripes?"1":"0"}),!0}parseOpen(r){if(r.name===this.tag){const{attributes:n}=r;return this.model={theme:n.name?n.name:null,showFirstColumn:n.showFirstColumn==="1",showLastColumn:n.showLastColumn==="1",showRowStripes:n.showRowStripes==="1",showColumnStripes:n.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(t,l,c){const o=t("../../../utils/xml-stream"),r=t("../base-xform"),n=t("../list-xform"),s=t("./auto-filter-xform"),e=t("./table-column-xform"),i=t("./table-style-info-xform");class u extends r{constructor(){super(),this.map={autoFilter:new s,tableColumns:new n({tag:"tableColumns",count:!0,empty:!0,childXform:new e}),tableStyleInfo:new i}}prepare(h,p){this.map.autoFilter.prepare(h),this.map.tableColumns.prepare(h.columns,p)}get tag(){return"table"}render(h,p){h.openXml(o.StdDocAttributes),h.openNode(this.tag,{...u.TABLE_ATTRIBUTES,id:p.id,name:p.name,displayName:p.displayName||p.name,ref:p.tableRef,totalsRowCount:p.totalsRow?"1":void 0,totalsRowShown:p.totalsRow?void 0:"1",headerRowCount:p.headerRow?"1":"0"}),this.map.autoFilter.render(h,p),this.map.tableColumns.render(h,p.columns),this.map.tableStyleInfo.render(h,p.style),h.closeNode()}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;const{name:p,attributes:m}=h;switch(p){case this.tag:this.reset(),this.model={name:m.name,displayName:m.displayName||m.name,tableRef:m.ref,totalsRow:m.totalsRowCount==="1",headerRow:m.headerRowCount==="1"};break;default:this.parser=this.map[h.name],this.parser&&this.parser.parseOpen(h)}return!0}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){if(this.parser)return this.parser.parseClose(h)||(this.parser=void 0),!0;switch(h){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((p,m)=>{this.model.columns[m].filterButton=p.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(h,p){h.columns.forEach(m=>{m.dxfId!==void 0&&(m.style=p.styles.getDxfStyle(m.dxfId))})}}u.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},l.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(t,l,c){(function(o,r){(function(){const n=t("fs"),s=t("jszip"),{PassThrough:e}=t("readable-stream"),i=t("../utils/zip-stream"),u=t("../utils/stream-buf"),a=t("../utils/utils"),h=t("../utils/xml-stream"),{bufferToString:p}=t("../utils/browser-buffer-decode"),m=t("./xform/style/styles-xform"),d=t("./xform/core/core-xform"),b=t("./xform/strings/shared-strings-xform"),g=t("./xform/core/relationships-xform"),S=t("./xform/core/content-types-xform"),C=t("./xform/core/app-xform"),I=t("./xform/book/workbook-xform"),D=t("./xform/sheet/worksheet-xform"),z=t("./xform/drawing/drawing-xform"),P=t("./xform/table/table-xform"),B=t("./xform/comment/comments-xform"),F=t("./xform/comment/vml-notes-xform"),W=t("./xml/theme1");class q{constructor(M){this.workbook=M}async readFile(M,k){if(!await a.fs.exists(M))throw new Error("File not found: "+M);const y=n.createReadStream(M);try{const w=await this.read(y,k);return y.close(),w}catch(w){throw y.close(),w}}parseRels(M){return new g().parseStream(M)}parseWorkbook(M){return new I().parseStream(M)}parseSharedStrings(M){return new b().parseStream(M)}reconcile(M,k){const y=new I,w=new D(k),x=new z,_=new P;y.reconcile(M);const T={media:M.media,mediaIndex:M.mediaIndex};Object.keys(M.drawings).forEach(V=>{const X=M.drawings[V],J=M.drawingRels[V];J&&(T.rels=J.reduce((L,G)=>(L[G.Id]=G,L),{}),(X.anchors||[]).forEach(L=>{const G=L.picture&&L.picture.hyperlinks;G&&T.rels[G.rId]&&(G.hyperlink=T.rels[G.rId].Target,delete G.rId)}),x.reconcile(X,T))});const O={styles:M.styles};Object.values(M.tables).forEach(V=>{_.reconcile(V,O)});const j={styles:M.styles,sharedStrings:M.sharedStrings,media:M.media,mediaIndex:M.mediaIndex,date1904:M.properties&&M.properties.date1904,drawings:M.drawings,comments:M.comments,tables:M.tables,vmlDrawings:M.vmlDrawings};M.worksheets.forEach(V=>{V.relationships=M.worksheetRels[V.sheetNo],w.reconcile(V,j)}),delete M.worksheetHash,delete M.worksheetRels,delete M.globalRels,delete M.sharedStrings,delete M.workbookRels,delete M.sheetDefs,delete M.styles,delete M.mediaIndex,delete M.drawings,delete M.drawingRels,delete M.vmlDrawings}async _processWorksheetEntry(M,k,y,w,x){const _=new D(w),T=await _.parseStream(M);T.sheetNo=y,k.worksheetHash[x]=T,k.worksheets.push(T)}async _processCommentEntry(M,k,y){const w=new B,x=await w.parseStream(M);k.comments[`../${y}.xml`]=x}async _processTableEntry(M,k,y){const w=new P,x=await w.parseStream(M);k.tables[`../tables/${y}.xml`]=x}async _processWorksheetRelsEntry(M,k,y){const w=new g,x=await w.parseStream(M);k.worksheetRels[y]=x}async _processMediaEntry(M,k,y){const w=y.lastIndexOf(".");if(w>=1){const x=y.substr(w+1),_=y.substr(0,w);await new Promise((T,O)=>{const j=new u;j.on("finish",()=>{k.mediaIndex[y]=k.media.length,k.mediaIndex[_]=k.media.length;const V={type:"image",name:_,extension:x,buffer:j.toBuffer()};k.media.push(V),T()}),M.on("error",V=>{O(V)}),M.pipe(j)})}}async _processDrawingEntry(M,k,y){const w=new z,x=await w.parseStream(M);k.drawings[y]=x}async _processDrawingRelsEntry(M,k,y){const w=new g,x=await w.parseStream(M);k.drawingRels[y]=x}async _processVmlDrawingEntry(M,k,y){const w=new F,x=await w.parseStream(M);k.vmlDrawings[`../drawings/${y}.vml`]=x}async _processThemeEntry(M,k,y){await new Promise((w,x)=>{const _=new u;M.on("error",x),_.on("error",x),_.on("finish",()=>{k.themes[y]=_.read().toString(),w()}),M.pipe(_)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(M,k){!M[Symbol.asyncIterator]&&M.pipe&&(M=M.pipe(new e));const y=[];for await(const w of M)y.push(w);return this.load(r.concat(y),k)}async load(M,k){let y;y=k&&k.base64?r.from(M.toString(),"base64"):M;const w={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},x=await s.loadAsync(y);for(const _ of Object.values(x.files))if(!_.dir){let T,O=_.name;if(O[0]==="/"&&(O=O.substr(1)),O.match(/xl\/media\//)||O.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))T=new e,T.write(await _.async("nodebuffer"));else{let j;T=new e({writableObjectMode:!0,readableObjectMode:!0}),j=o.browser?p(await _.async("nodebuffer")):await _.async("string");const V=16384;for(let X=0;X<j.length;X+=V)T.write(j.substring(X,X+V))}switch(T.end(),O){case"_rels/.rels":w.globalRels=await this.parseRels(T);break;case"xl/workbook.xml":{const j=await this.parseWorkbook(T);w.sheets=j.sheets,w.definedNames=j.definedNames,w.views=j.views,w.properties=j.properties,w.calcProperties=j.calcProperties;break}case"xl/_rels/workbook.xml.rels":w.workbookRels=await this.parseRels(T);break;case"xl/sharedStrings.xml":w.sharedStrings=new b,await w.sharedStrings.parseStream(T);break;case"xl/styles.xml":w.styles=new m,await w.styles.parseStream(T);break;case"docProps/app.xml":{const j=new C,V=await j.parseStream(T);w.company=V.company,w.manager=V.manager;break}case"docProps/core.xml":{const j=new d,V=await j.parseStream(T);Object.assign(w,V);break}default:{let j=O.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(j){await this._processWorksheetEntry(T,w,j[1],k,O);break}if(j=O.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),j){await this._processWorksheetRelsEntry(T,w,j[1]);break}if(j=O.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),j){await this._processThemeEntry(T,w,j[1]);break}if(j=O.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),j){await this._processMediaEntry(T,w,j[1]);break}if(j=O.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),j){await this._processDrawingEntry(T,w,j[1]);break}if(j=O.match(/xl\/(comments\d+)[.]xml/),j){await this._processCommentEntry(T,w,j[1]);break}if(j=O.match(/xl\/tables\/(table\d+)[.]xml/),j){await this._processTableEntry(T,w,j[1]);break}if(j=O.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),j){await this._processDrawingRelsEntry(T,w,j[1]);break}if(j=O.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),j){await this._processVmlDrawingEntry(T,w,j[1]);break}}}}return this.reconcile(w,k),this.workbook.model=w,this.workbook}async addMedia(M,k){await Promise.all(k.media.map(async y=>{if(y.type==="image"){const w=`xl/media/${y.name}.${y.extension}`;if(y.filename){const x=await(function(_,T){return new Promise((O,j)=>{n.readFile(_,T,(V,X)=>{V?j(V):O(X)})})})(y.filename);return M.append(x,{name:w})}if(y.buffer)return M.append(y.buffer,{name:w});if(y.base64){const x=y.base64,_=x.substring(x.indexOf(",")+1);return M.append(_,{name:w,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(M,k){const y=new z,w=new g;k.worksheets.forEach(x=>{const{drawing:_}=x;if(_){y.prepare(_,{});let T=y.toXml(_);M.append(T,{name:`xl/drawings/${_.name}.xml`}),T=w.toXml(_.rels),M.append(T,{name:`xl/drawings/_rels/${_.name}.xml.rels`})}})}addTables(M,k){const y=new P;k.worksheets.forEach(w=>{const{tables:x}=w;x.forEach(_=>{y.prepare(_,{});const T=y.toXml(_);M.append(T,{name:"xl/tables/"+_.target})})})}async addContentTypes(M,k){const y=new S().toXml(k);M.append(y,{name:"[Content_Types].xml"})}async addApp(M,k){const y=new C().toXml(k);M.append(y,{name:"docProps/app.xml"})}async addCore(M,k){const y=new d;M.append(y.toXml(k),{name:"docProps/core.xml"})}async addThemes(M,k){const y=k.themes||{theme1:W};Object.keys(y).forEach(w=>{const x=y[w],_=`xl/theme/${w}.xml`;M.append(x,{name:_})})}async addOfficeRels(M){const k=new g().toXml([{Id:"rId1",Type:q.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:q.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:q.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);M.append(k,{name:"_rels/.rels"})}async addWorkbookRels(M,k){let y=1;const w=[{Id:"rId"+y++,Type:q.RelType.Styles,Target:"styles.xml"},{Id:"rId"+y++,Type:q.RelType.Theme,Target:"theme/theme1.xml"}];k.sharedStrings.count&&w.push({Id:"rId"+y++,Type:q.RelType.SharedStrings,Target:"sharedStrings.xml"}),k.worksheets.forEach(_=>{_.rId="rId"+y++,w.push({Id:_.rId,Type:q.RelType.Worksheet,Target:`worksheets/sheet${_.id}.xml`})});const x=new g().toXml(w);M.append(x,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(M,k){k.sharedStrings&&k.sharedStrings.count&&M.append(k.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(M,k){const{xml:y}=k.styles;y&&M.append(y,{name:"xl/styles.xml"})}async addWorkbook(M,k){const y=new I;M.append(y.toXml(k),{name:"xl/workbook.xml"})}async addWorksheets(M,k){const y=new D,w=new g,x=new B,_=new F;k.worksheets.forEach(T=>{let O=new h;y.render(O,T),M.append(O.xml,{name:`xl/worksheets/sheet${T.id}.xml`}),T.rels&&T.rels.length&&(O=new h,w.render(O,T.rels),M.append(O.xml,{name:`xl/worksheets/_rels/sheet${T.id}.xml.rels`})),T.comments.length>0&&(O=new h,x.render(O,T),M.append(O.xml,{name:`xl/comments${T.id}.xml`}),O=new h,_.render(O,T),M.append(O.xml,{name:`xl/drawings/vmlDrawing${T.id}.vml`}))})}_finalize(M){return new Promise((k,y)=>{M.on("finish",()=>{k(this)}),M.on("error",y),M.finalize()})}prepareModel(M,k){M.creator=M.creator||"ExcelJS",M.lastModifiedBy=M.lastModifiedBy||"ExcelJS",M.created=M.created||new Date,M.modified=M.modified||new Date,M.useSharedStrings=k.useSharedStrings===void 0||k.useSharedStrings,M.useStyles=k.useStyles===void 0||k.useStyles,M.sharedStrings=new b,M.styles=M.useStyles?new m(!0):new m.Mock;const y=new I,w=new D;y.prepare(M);const x={sharedStrings:M.sharedStrings,styles:M.styles,date1904:M.properties.date1904,drawingsCount:0,media:M.media};x.drawings=M.drawings=[],x.commentRefs=M.commentRefs=[];let _=0;M.tables=[],M.worksheets.forEach(T=>{T.tables.forEach(O=>{_++,O.target=`table${_}.xml`,O.id=_,M.tables.push(O)}),w.prepare(T,x)})}async write(M,k){k=k||{};const{model:y}=this.workbook,w=new i.ZipWriter(k.zip);return w.pipe(M),this.prepareModel(y,k),await this.addContentTypes(w,y),await this.addOfficeRels(w,y),await this.addWorkbookRels(w,y),await this.addWorksheets(w,y),await this.addSharedStrings(w,y),await this.addDrawings(w,y),await this.addTables(w,y),await Promise.all([this.addThemes(w,y),this.addStyles(w,y)]),await this.addMedia(w,y),await Promise.all([this.addApp(w,y),this.addCore(w,y)]),await this.addWorkbook(w,y),this._finalize(w)}writeFile(M,k){const y=n.createWriteStream(M);return new Promise((w,x)=>{y.on("finish",()=>{w()}),y.on("error",_=>{x(_)}),this.write(y,k).then(()=>{y.end()}).catch(_=>{x(_)})})}async writeBuffer(M){const k=new u;return await this.write(k,M),k.read()}}q.RelType=t("./rel-type"),l.exports=q}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(t,l,c){l.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
258
258
|
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <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> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <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> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <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> </a:spDef> <a:lnDef> <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> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(t,l,c){(function(o){(function(){Object.defineProperty(c,"__esModule",{value:!0}),c.CsvFormatterStream=void 0;const r=t("stream"),n=t("./formatter");class s extends r.Transform{constructor(i){super({writableObjectMode:i.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=i,this.rowFormatter=new n.RowFormatter(i),this.hasWrittenBOM=!i.writeBOM}transform(i){return this.rowFormatter.rowTransform=i,this}_transform(i,u,a){let h=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(i,(p,m)=>p?(h=!0,a(p)):(m&&m.forEach(d=>{this.push(o.from(d,"utf8"))}),h=!0,a()))}catch(p){if(h)throw p;a(p)}}_flush(i){this.rowFormatter.finish((u,a)=>u?i(u):(a&&a.forEach(h=>{this.push(o.from(h,"utf8"))}),i()))}}c.CsvFormatterStream=s}).call(this)}).call(this,t("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(t,l,c){Object.defineProperty(c,"__esModule",{value:!0}),c.FormatterOptions=void 0,c.FormatterOptions=class{constructor(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var r;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
|
|
259
259
|
`,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,o||{}),(o==null?void 0:o.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(o==null?void 0:o.quote)===!0?this.quote='"':(o==null?void 0:o.quote)===!1&&(this.quote=""),typeof(o==null?void 0:o.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((r=o.writeHeaders)===null||r===void 0||r),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(t,l,c){var o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c,"__esModule",{value:!0}),c.FieldFormatter=void 0;const r=o(t("lodash.isboolean")),n=o(t("lodash.isnil")),s=o(t("lodash.escaperegexp"));c.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,e.headers!==null&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const i=`[${e.delimiter}${s.default(e.rowDelimiter)}|\r|
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
JSZip uses the library pako released under the MIT license :
|
|
273
273
|
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
274
274
|
*/(function(h){typeof c=="object"&&l!==void 0?l.exports=h():(typeof window<"u"?window:r!==void 0?r:typeof self<"u"?self:this).JSZip=h()})((function(){return(function h(p,m,d){function b(C,I){if(!m[C]){if(!p[C]){var D=typeof t=="function"&&t;if(!I&&D)return D(C,!0);if(g)return g(C,!0);var z=new Error("Cannot find module '"+C+"'");throw z.code="MODULE_NOT_FOUND",z}var P=m[C]={exports:{}};p[C][0].call(P.exports,(function(B){return b(p[C][1][B]||B)}),P,P.exports,h,p,m,d)}return m[C].exports}for(var g=typeof t=="function"&&t,S=0;S<d.length;S++)b(d[S]);return b})({1:[function(h,p,m){var d=h("./utils"),b=h("./support"),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";m.encode=function(S){for(var C,I,D,z,P,B,F,W=[],q=0,A=S.length,M=A,k=d.getTypeOf(S)!=="string";q<S.length;)M=A-q,D=k?(C=S[q++],I=q<A?S[q++]:0,q<A?S[q++]:0):(C=S.charCodeAt(q++),I=q<A?S.charCodeAt(q++):0,q<A?S.charCodeAt(q++):0),z=C>>2,P=(3&C)<<4|I>>4,B=1<M?(15&I)<<2|D>>6:64,F=2<M?63&D:64,W.push(g.charAt(z)+g.charAt(P)+g.charAt(B)+g.charAt(F));return W.join("")},m.decode=function(S){var C,I,D,z,P,B,F=0,W=0,q="data:";if(S.substr(0,q.length)===q)throw new Error("Invalid base64 input, it looks like a data url.");var A,M=3*(S=S.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(S.charAt(S.length-1)===g.charAt(64)&&M--,S.charAt(S.length-2)===g.charAt(64)&&M--,M%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=b.uint8array?new Uint8Array(0|M):new Array(0|M);F<S.length;)C=g.indexOf(S.charAt(F++))<<2|(z=g.indexOf(S.charAt(F++)))>>4,I=(15&z)<<4|(P=g.indexOf(S.charAt(F++)))>>2,D=(3&P)<<6|(B=g.indexOf(S.charAt(F++))),A[W++]=C,P!==64&&(A[W++]=I),B!==64&&(A[W++]=D);return A}},{"./support":30,"./utils":32}],2:[function(h,p,m){var d=h("./external"),b=h("./stream/DataWorker"),g=h("./stream/Crc32Probe"),S=h("./stream/DataLengthProbe");function C(I,D,z,P,B){this.compressedSize=I,this.uncompressedSize=D,this.crc32=z,this.compression=P,this.compressedContent=B}C.prototype={getContentWorker:function(){var I=new b(d.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new S("data_length")),D=this;return I.on("end",(function(){if(this.streamInfo.data_length!==D.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),I},getCompressedWorker:function(){return new b(d.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},C.createWorkerFrom=function(I,D,z){return I.pipe(new g).pipe(new S("uncompressedSize")).pipe(D.compressWorker(z)).pipe(new S("compressedSize")).withStreamInfo("compression",D)},p.exports=C},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(h,p,m){var d=h("./stream/GenericWorker");m.STORE={magic:"\0\0",compressWorker:function(){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},m.DEFLATE=h("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(h,p,m){var d=h("./utils"),b=(function(){for(var g,S=[],C=0;C<256;C++){g=C;for(var I=0;I<8;I++)g=1&g?3988292384^g>>>1:g>>>1;S[C]=g}return S})();p.exports=function(g,S){return g!==void 0&&g.length?d.getTypeOf(g)!=="string"?(function(C,I,D,z){var P=b,B=0+D;C^=-1;for(var F=0;F<B;F++)C=C>>>8^P[255&(C^I[F])];return-1^C})(0|S,g,g.length):(function(C,I,D,z){var P=b,B=0+D;C^=-1;for(var F=0;F<B;F++)C=C>>>8^P[255&(C^I.charCodeAt(F))];return-1^C})(0|S,g,g.length):0}},{"./utils":32}],5:[function(h,p,m){m.base64=!1,m.binary=!1,m.dir=!1,m.createFolders=!0,m.date=null,m.compression=null,m.compressionOptions=null,m.comment=null,m.unixPermissions=null,m.dosPermissions=null},{}],6:[function(h,p,m){var d;d=typeof Promise<"u"?Promise:h("lie"),p.exports={Promise:d}},{lie:37}],7:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",b=h("pako"),g=h("./utils"),S=h("./stream/GenericWorker"),C=d?"uint8array":"array";function I(D,z){S.call(this,"FlateWorker/"+D),this._pako=null,this._pakoAction=D,this._pakoOptions=z,this.meta={}}m.magic="\b\0",g.inherits(I,S),I.prototype.processChunk=function(D){this.meta=D.meta,this._pako===null&&this._createPako(),this._pako.push(g.transformTo(C,D.data),!1)},I.prototype.flush=function(){S.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},I.prototype.cleanUp=function(){S.prototype.cleanUp.call(this),this._pako=null},I.prototype._createPako=function(){this._pako=new b[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var D=this;this._pako.onData=function(z){D.push({data:z,meta:D.meta})}},m.compressWorker=function(D){return new I("Deflate",D)},m.uncompressWorker=function(){return new I("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(h,p,m){function d(P,B){var F,W="";for(F=0;F<B;F++)W+=String.fromCharCode(255&P),P>>>=8;return W}function b(P,B,F,W,q,A){var M,k,y=P.file,w=P.compression,x=A!==C.utf8encode,_=g.transformTo("string",A(y.name)),T=g.transformTo("string",C.utf8encode(y.name)),O=y.comment,j=g.transformTo("string",A(O)),V=g.transformTo("string",C.utf8encode(O)),X=T.length!==y.name.length,J=V.length!==O.length,L="",G="",N="",R=y.dir,U=y.date,K={crc32:0,compressedSize:0,uncompressedSize:0};B&&!F||(K.crc32=P.crc32,K.compressedSize=P.compressedSize,K.uncompressedSize=P.uncompressedSize);var rt=0;B&&(rt|=8),x||!X&&!J||(rt|=2048);var Z=0,et=0;R&&(Z|=16),q==="UNIX"?(et=798,Z|=(function(lt,Q){var ot=lt;return lt||(ot=Q?16893:33204),(65535&ot)<<16})(y.unixPermissions,R)):(et=20,Z|=(function(lt){return 63&(lt||0)})(y.dosPermissions)),M=U.getUTCHours(),M<<=6,M|=U.getUTCMinutes(),M<<=5,M|=U.getUTCSeconds()/2,k=U.getUTCFullYear()-1980,k<<=4,k|=U.getUTCMonth()+1,k<<=5,k|=U.getUTCDate(),X&&(G=d(1,1)+d(I(_),4)+T,L+="up"+d(G.length,2)+G),J&&(N=d(1,1)+d(I(j),4)+V,L+="uc"+d(N.length,2)+N);var ht="";return ht+=`
|
|
275
|
-
\0`,ht+=d(rt,2),ht+=w.magic,ht+=d(M,2),ht+=d(k,2),ht+=d(K.crc32,4),ht+=d(K.compressedSize,4),ht+=d(K.uncompressedSize,4),ht+=d(_.length,2),ht+=d(L.length,2),{fileRecord:D.LOCAL_FILE_HEADER+ht+_+L,dirRecord:D.CENTRAL_FILE_HEADER+d(et,2)+ht+d(j.length,2)+"\0\0\0\0"+d(Z,4)+d(W,4)+_+L+j}}var g=h("../utils"),S=h("../stream/GenericWorker"),C=h("../utf8"),I=h("../crc32"),D=h("../signature");function z(P,B,F,W){S.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=F,this.encodeFileName=W,this.streamFiles=P,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}g.inherits(z,S),z.prototype.push=function(P){var B=P.meta.percent||0,F=this.entriesCount,W=this._sources.length;this.accumulate?this.contentBuffer.push(P):(this.bytesWritten+=P.data.length,S.prototype.push.call(this,{data:P.data,meta:{currentFile:this.currentFile,percent:F?(B+100*(F-W-1))/F:100}}))},z.prototype.openedSource=function(P){this.currentSourceOffset=this.bytesWritten,this.currentFile=P.file.name;var B=this.streamFiles&&!P.file.dir;if(B){var F=b(P,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:F.fileRecord,meta:{percent:0}})}else this.accumulate=!0},z.prototype.closedSource=function(P){this.accumulate=!1;var B=this.streamFiles&&!P.file.dir,F=b(P,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(F.dirRecord),B)this.push({data:(function(W){return D.DATA_DESCRIPTOR+d(W.crc32,4)+d(W.compressedSize,4)+d(W.uncompressedSize,4)})(P),meta:{percent:100}});else for(this.push({data:F.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},z.prototype.flush=function(){for(var P=this.bytesWritten,B=0;B<this.dirRecords.length;B++)this.push({data:this.dirRecords[B],meta:{percent:100}});var F=this.bytesWritten-P,W=(function(q,A,M,k,y){var w=g.transformTo("string",y(k));return D.CENTRAL_DIRECTORY_END+"\0\0\0\0"+d(q,2)+d(q,2)+d(A,4)+d(M,4)+d(w.length,2)+w})(this.dirRecords.length,F,P,this.zipComment,this.encodeFileName);this.push({data:W,meta:{percent:100}})},z.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},z.prototype.registerPrevious=function(P){this._sources.push(P);var B=this;return P.on("data",(function(F){B.processChunk(F)})),P.on("end",(function(){B.closedSource(B.previous.streamInfo),B._sources.length?B.prepareNextSource():B.end()})),P.on("error",(function(F){B.error(F)})),this},z.prototype.resume=function(){return!!S.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},z.prototype.error=function(P){var B=this._sources;if(!S.prototype.error.call(this,P))return!1;for(var F=0;F<B.length;F++)try{B[F].error(P)}catch{}return!0},z.prototype.lock=function(){S.prototype.lock.call(this);for(var P=this._sources,B=0;B<P.length;B++)P[B].lock()},p.exports=z},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(h,p,m){var d=h("../compressions"),b=h("./ZipFileWorker");m.generateWorker=function(g,S,C){var I=new b(S.streamFiles,C,S.platform,S.encodeFileName),D=0;try{g.forEach((function(z,P){D++;var B=(function(A,M){var k=A||M,y=d[k];if(!y)throw new Error(k+" is not a valid compression method !");return y})(P.options.compression,S.compression),F=P.options.compressionOptions||S.compressionOptions||{},W=P.dir,q=P.date;P._compressWorker(B,F).withStreamInfo("file",{name:z,dir:W,date:q,comment:P.comment||"",unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions}).pipe(I)})),I.entriesCount=D}catch(z){I.error(z)}return I}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(h,p,m){function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var b=new d;for(var g in this)typeof this[g]!="function"&&(b[g]=this[g]);return b}}(d.prototype=h("./object")).loadAsync=h("./load"),d.support=h("./support"),d.defaults=h("./defaults"),d.version="3.10.1",d.loadAsync=function(b,g){return new d().loadAsync(b,g)},d.external=h("./external"),p.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(h,p,m){var d=h("./utils"),b=h("./external"),g=h("./utf8"),S=h("./zipEntries"),C=h("./stream/Crc32Probe"),I=h("./nodejsUtils");function D(z){return new b.Promise((function(P,B){var F=z.decompressed.getContentWorker().pipe(new C);F.on("error",(function(W){B(W)})).on("end",(function(){F.streamInfo.crc32!==z.decompressed.crc32?B(new Error("Corrupted zip : CRC32 mismatch")):P()})).resume()}))}p.exports=function(z,P){var B=this;return P=d.extend(P||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),I.isNode&&I.isStream(z)?b.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",z,!0,P.optimizedBinaryString,P.base64).then((function(F){var W=new S(P);return W.load(F),W})).then((function(F){var W=[b.Promise.resolve(F)],q=F.files;if(P.checkCRC32)for(var A=0;A<q.length;A++)W.push(D(q[A]));return b.Promise.all(W)})).then((function(F){for(var W=F.shift(),q=W.files,A=0;A<q.length;A++){var M=q[A],k=M.fileNameStr,y=d.resolve(M.fileNameStr);B.file(y,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:P.createFolders}),M.dir||(B.file(y).unsafeOriginalName=k)}return W.zipComment.length&&(B.comment=W.zipComment),B}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(h,p,m){var d=h("../utils"),b=h("../stream/GenericWorker");function g(S,C){b.call(this,"Nodejs stream input adapter for "+S),this._upstreamEnded=!1,this._bindStream(C)}d.inherits(g,b),g.prototype._bindStream=function(S){var C=this;(this._stream=S).pause(),S.on("data",(function(I){C.push({data:I,meta:{percent:0}})})).on("error",(function(I){C.isPaused?this.generatedError=I:C.error(I)})).on("end",(function(){C.isPaused?C._upstreamEnded=!0:C.end()}))},g.prototype.pause=function(){return!!b.prototype.pause.call(this)&&(this._stream.pause(),!0)},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=g},{"../stream/GenericWorker":28,"../utils":32}],13:[function(h,p,m){var d=h("readable-stream").Readable;function b(g,S,C){d.call(this,S),this._helper=g;var I=this;g.on("data",(function(D,z){I.push(D)||I._helper.pause(),C&&C(z)})).on("error",(function(D){I.emit("error",D)})).on("end",(function(){I.push(null)}))}h("../utils").inherits(b,d),b.prototype._read=function(){this._helper.resume()},p.exports=b},{"../utils":32,"readable-stream":16}],14:[function(h,p,m){p.exports={isNode:n!==void 0,newBufferFrom:function(d,b){if(n.from&&n.from!==Uint8Array.from)return n.from(d,b);if(typeof d=="number")throw new Error('The "data" argument must not be a number');return new n(d,b)},allocBuffer:function(d){if(n.alloc)return n.alloc(d);var b=new n(d);return b.fill(0),b},isBuffer:function(d){return n.isBuffer(d)},isStream:function(d){return d&&typeof d.on=="function"&&typeof d.pause=="function"&&typeof d.resume=="function"}}},{}],15:[function(h,p,m){function d(y,w,x){var _,T=g.getTypeOf(w),O=g.extend(x||{},I);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(y=q(y)),O.createFolders&&(_=W(y))&&A.call(this,_,!0);var j=T==="string"&&O.binary===!1&&O.base64===!1;x&&x.binary!==void 0||(O.binary=!j),(w instanceof D&&w.uncompressedSize===0||O.dir||!w||w.length===0)&&(O.base64=!1,O.binary=!0,w="",O.compression="STORE",T="string");var V;V=w instanceof D||w instanceof S?w:B.isNode&&B.isStream(w)?new F(y,w):g.prepareContent(y,w,O.binary,O.optimizedBinaryString,O.base64);var X=new z(y,V,O);this.files[y]=X}var b=h("./utf8"),g=h("./utils"),S=h("./stream/GenericWorker"),C=h("./stream/StreamHelper"),I=h("./defaults"),D=h("./compressedObject"),z=h("./zipObject"),P=h("./generate"),B=h("./nodejsUtils"),F=h("./nodejs/NodejsStreamInputAdapter"),W=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var w=y.lastIndexOf("/");return 0<w?y.substring(0,w):""},q=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},A=function(y,w){return w=w!==void 0?w:I.createFolders,y=q(y),this.files[y]||d.call(this,y,null,{dir:!0,createFolders:w}),this.files[y]};function M(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var k={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var w,x,_;for(w in this.files)_=this.files[w],(x=w.slice(this.root.length,w.length))&&w.slice(0,this.root.length)===this.root&&y(x,_)},filter:function(y){var w=[];return this.forEach((function(x,_){y(x,_)&&w.push(_)})),w},file:function(y,w,x){if(arguments.length!==1)return y=this.root+y,d.call(this,y,w,x),this;if(M(y)){var _=y;return this.filter((function(O,j){return!j.dir&&_.test(O)}))}var T=this.files[this.root+y];return T&&!T.dir?T:null},folder:function(y){if(!y)return this;if(M(y))return this.filter((function(T,O){return O.dir&&y.test(T)}));var w=this.root+y,x=A.call(this,w),_=this.clone();return _.root=x.name,_},remove:function(y){y=this.root+y;var w=this.files[y];if(w||(y.slice(-1)!=="/"&&(y+="/"),w=this.files[y]),w&&!w.dir)delete this.files[y];else for(var x=this.filter((function(T,O){return O.name.slice(0,y.length)===y})),_=0;_<x.length;_++)delete this.files[x[_].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(y){var w,x={};try{if((x=g.extend(y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:b.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");g.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var _=x.comment||this.comment||"";w=P.generateWorker(this,x,_)}catch(T){(w=new S("error")).error(T)}return new C(w,x.type||"string",x.mimeType)},generateAsync:function(y,w){return this.generateInternalStream(y).accumulate(w)},generateNodeStream:function(y,w){return(y=y||{}).type||(y.type="nodebuffer"),this.generateInternalStream(y).toNodejsStream(w)}};p.exports=k},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(h,p,m){p.exports=h("stream")},{stream:void 0}],17:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g);for(var S=0;S<this.data.length;S++)g[S]=255&g[S]}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data[this.zero+g]},b.prototype.lastIndexOfSignature=function(g){for(var S=g.charCodeAt(0),C=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.length-4;0<=z;--z)if(this.data[z]===S&&this.data[z+1]===C&&this.data[z+2]===I&&this.data[z+3]===D)return z-this.zero;return-1},b.prototype.readAndCheckSignature=function(g){var S=g.charCodeAt(0),C=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.readData(4);return S===z[0]&&C===z[1]&&I===z[2]&&D===z[3]},b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return[];var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],18:[function(h,p,m){var d=h("../utils");function b(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}b.prototype={checkOffset:function(g){this.checkIndex(this.index+g)},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g},skip:function(g){this.setIndex(this.index+g)},byteAt:function(){},readInt:function(g){var S,C=0;for(this.checkOffset(g),S=this.index+g-1;S>=this.index;S--)C=(C<<8)+this.byteAt(S);return this.index+=g,C},readString:function(g){return d.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},p.exports=b},{"../utils":32}],19:[function(h,p,m){var d=h("./Uint8ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},b.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},b.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],21:[function(h,p,m){var d=h("./ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var S=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./ArrayReader":17}],22:[function(h,p,m){var d=h("../utils"),b=h("../support"),g=h("./ArrayReader"),S=h("./StringReader"),C=h("./NodeBufferReader"),I=h("./Uint8ArrayReader");p.exports=function(D){var z=d.getTypeOf(D);return d.checkSupport(z),z!=="string"||b.uint8array?z==="nodebuffer"?new C(D):b.uint8array?new I(d.transformTo("uint8array",D)):new g(d.transformTo("array",D)):new S(D)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(h,p,m){m.LOCAL_FILE_HEADER="PK",m.CENTRAL_FILE_HEADER="PK",m.CENTRAL_DIRECTORY_END="PK",m.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",m.ZIP64_CENTRAL_DIRECTORY_END="PK",m.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(h,p,m){var d=h("./GenericWorker"),b=h("../utils");function g(S){d.call(this,"ConvertWorker to "+S),this.destType=S}b.inherits(g,d),g.prototype.processChunk=function(S){this.push({data:b.transformTo(this.destType,S.data),meta:S.meta})},p.exports=g},{"../utils":32,"./GenericWorker":28}],25:[function(h,p,m){var d=h("./GenericWorker"),b=h("../crc32");function g(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h("../utils").inherits(g,d),g.prototype.processChunk=function(S){this.streamInfo.crc32=b(S.data,this.streamInfo.crc32||0),this.push(S)},p.exports=g},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataLengthProbe for "+S),this.propName=S,this.withStreamInfo(S,0)}d.inherits(g,b),g.prototype.processChunk=function(S){if(S){var C=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=C+S.data.length}b.prototype.processChunk.call(this,S)},p.exports=g},{"../utils":32,"./GenericWorker":28}],27:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataWorker");var C=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,S.then((function(I){C.dataIsReady=!0,C.data=I,C.max=I&&I.length||0,C.type=d.getTypeOf(I),C.isPaused||C._tickAndRepeat()}),(function(I){C.error(I)}))}d.inherits(g,b),g.prototype.cleanUp=function(){b.prototype.cleanUp.call(this),this.data=null},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},g.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var S=null,C=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":S=this.data.substring(this.index,C);break;case"uint8array":S=this.data.subarray(this.index,C);break;case"array":case"nodebuffer":S=this.data.slice(this.index,C)}return this.index=C,this.push({data:S,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=g},{"../utils":32,"./GenericWorker":28}],28:[function(h,p,m){function d(b){this.name=b||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(b){this.emit("data",b)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(b){this.emit("error",b)}return!0},error:function(b){return!this.isFinished&&(this.isPaused?this.generatedError=b:(this.isFinished=!0,this.emit("error",b),this.previous&&this.previous.error(b),this.cleanUp()),!0)},on:function(b,g){return this._listeners[b].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(b,g){if(this._listeners[b])for(var S=0;S<this._listeners[b].length;S++)this._listeners[b][S].call(this,g)},pipe:function(b){return b.registerPrevious(this)},registerPrevious:function(b){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=b.streamInfo,this.mergeStreamInfo(),this.previous=b;var g=this;return b.on("data",(function(S){g.processChunk(S)})),b.on("end",(function(){g.end()})),b.on("error",(function(S){g.error(S)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var b=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),b=!0),this.previous&&this.previous.resume(),!b},flush:function(){},processChunk:function(b){this.push(b)},withStreamInfo:function(b,g){return this.extraStreamInfo[b]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var b in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,b)&&(this.streamInfo[b]=this.extraStreamInfo[b])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var b="Worker "+this.name;return this.previous?this.previous+" -> "+b:b}},p.exports=d},{}],29:[function(h,p,m){var d=h("../utils"),b=h("./ConvertWorker"),g=h("./GenericWorker"),S=h("../base64"),C=h("../support"),I=h("../external"),D=null;if(C.nodestream)try{D=h("../nodejs/NodejsStreamOutputAdapter")}catch{}function z(P,B,F){var W=B;switch(B){case"blob":case"arraybuffer":W="uint8array";break;case"base64":W="string"}try{this._internalType=W,this._outputType=B,this._mimeType=F,d.checkSupport(W),this._worker=P.pipe(new b(W)),P.lock()}catch(q){this._worker=new g("error"),this._worker.error(q)}}z.prototype={accumulate:function(P){return(function(B,F){return new I.Promise((function(W,q){var A=[],M=B._internalType,k=B._outputType,y=B._mimeType;B.on("data",(function(w,x){A.push(w),F&&F(x)})).on("error",(function(w){A=[],q(w)})).on("end",(function(){try{var w=(function(x,_,T){switch(x){case"blob":return d.newBlob(d.transformTo("arraybuffer",_),T);case"base64":return S.encode(_);default:return d.transformTo(x,_)}})(k,(function(x,_){var T,O=0,j=null,V=0;for(T=0;T<_.length;T++)V+=_[T].length;switch(x){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(j=new Uint8Array(V),T=0;T<_.length;T++)j.set(_[T],O),O+=_[T].length;return j;case"nodebuffer":return n.concat(_);default:throw new Error("concat : unsupported type '"+x+"'")}})(M,A),y);W(w)}catch(x){q(x)}A=[]})).resume()}))})(this,P)},on:function(P,B){var F=this;return P==="data"?this._worker.on(P,(function(W){B.call(F,W.data,W.meta)})):this._worker.on(P,(function(){d.delay(B,arguments,F)})),this},resume:function(){return d.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(P){if(d.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new D(this,{objectMode:this._outputType!=="nodebuffer"},P)}},p.exports=z},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(h,p,m){if(m.base64=!0,m.array=!0,m.string=!0,m.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",m.nodebuffer=n!==void 0,m.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")m.blob=!1;else{var d=new ArrayBuffer(0);try{m.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);b.append(d),m.blob=b.getBlob("application/zip").size===0}catch{m.blob=!1}}}try{m.nodestream=!!h("readable-stream").Readable}catch{m.nodestream=!1}},{"readable-stream":16}],31:[function(h,p,m){for(var d=h("./utils"),b=h("./support"),g=h("./nodejsUtils"),S=h("./stream/GenericWorker"),C=new Array(256),I=0;I<256;I++)C[I]=252<=I?6:248<=I?5:240<=I?4:224<=I?3:192<=I?2:1;function D(){S.call(this,"utf-8 decode"),this.leftOver=null}function z(){S.call(this,"utf-8 encode")}C[254]=C[254]=1,m.utf8encode=function(P){return b.nodebuffer?g.newBufferFrom(P,"utf-8"):(function(B){var F,W,q,A,M,k=B.length,y=0;for(A=0;A<k;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),y+=W<128?1:W<2048?2:W<65536?3:4;for(F=b.uint8array?new Uint8Array(y):new Array(y),A=M=0;M<y;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),W<128?F[M++]=W:(W<2048?F[M++]=192|W>>>6:(W<65536?F[M++]=224|W>>>12:(F[M++]=240|W>>>18,F[M++]=128|W>>>12&63),F[M++]=128|W>>>6&63),F[M++]=128|63&W);return F})(P)},m.utf8decode=function(P){return b.nodebuffer?d.transformTo("nodebuffer",P).toString("utf-8"):(function(B){var F,W,q,A,M=B.length,k=new Array(2*M);for(F=W=0;F<M;)if((q=B[F++])<128)k[W++]=q;else if(4<(A=C[q]))k[W++]=65533,F+=A-1;else{for(q&=A===2?31:A===3?15:7;1<A&&F<M;)q=q<<6|63&B[F++],A--;1<A?k[W++]=65533:q<65536?k[W++]=q:(q-=65536,k[W++]=55296|q>>10&1023,k[W++]=56320|1023&q)}return k.length!==W&&(k.subarray?k=k.subarray(0,W):k.length=W),d.applyFromCharCode(k)})(P=d.transformTo(b.uint8array?"uint8array":"array",P))},d.inherits(D,S),D.prototype.processChunk=function(P){var B=d.transformTo(b.uint8array?"uint8array":"array",P.data);if(this.leftOver&&this.leftOver.length){if(b.uint8array){var F=B;(B=new Uint8Array(F.length+this.leftOver.length)).set(this.leftOver,0),B.set(F,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var W=(function(A,M){var k;for((M=M||A.length)>A.length&&(M=A.length),k=M-1;0<=k&&(192&A[k])==128;)k--;return k<0||k===0?M:k+C[A[k]]>M?k:M})(B),q=B;W!==B.length&&(b.uint8array?(q=B.subarray(0,W),this.leftOver=B.subarray(W,B.length)):(q=B.slice(0,W),this.leftOver=B.slice(W,B.length))),this.push({data:m.utf8decode(q),meta:P.meta})},D.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:m.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},m.Utf8DecodeWorker=D,d.inherits(z,S),z.prototype.processChunk=function(P){this.push({data:m.utf8encode(P.data),meta:P.meta})},m.Utf8EncodeWorker=z},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(h,p,m){var d=h("./support"),b=h("./base64"),g=h("./nodejsUtils"),S=h("./external");function C(F){return F}function I(F,W){for(var q=0;q<F.length;++q)W[q]=255&F.charCodeAt(q);return W}h("setimmediate"),m.newBlob=function(F,W){m.checkSupport("blob");try{return new Blob([F],{type:W})}catch{try{var q=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return q.append(F),q.getBlob(W)}catch{throw new Error("Bug : can't construct the Blob.")}}};var D={stringifyByChunk:function(F,W,q){var A=[],M=0,k=F.length;if(k<=q)return String.fromCharCode.apply(null,F);for(;M<k;)W==="array"||W==="nodebuffer"?A.push(String.fromCharCode.apply(null,F.slice(M,Math.min(M+q,k)))):A.push(String.fromCharCode.apply(null,F.subarray(M,Math.min(M+q,k)))),M+=q;return A.join("")},stringifyByChar:function(F){for(var W="",q=0;q<F.length;q++)W+=String.fromCharCode(F[q]);return W},applyCanBeUsed:{uint8array:(function(){try{return d.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return d.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}})()}};function z(F){var W=65536,q=m.getTypeOf(F),A=!0;if(q==="uint8array"?A=D.applyCanBeUsed.uint8array:q==="nodebuffer"&&(A=D.applyCanBeUsed.nodebuffer),A)for(;1<W;)try{return D.stringifyByChunk(F,q,W)}catch{W=Math.floor(W/2)}return D.stringifyByChar(F)}function P(F,W){for(var q=0;q<F.length;q++)W[q]=F[q];return W}m.applyFromCharCode=z;var B={};B.string={string:C,array:function(F){return I(F,new Array(F.length))},arraybuffer:function(F){return B.string.uint8array(F).buffer},uint8array:function(F){return I(F,new Uint8Array(F.length))},nodebuffer:function(F){return I(F,g.allocBuffer(F.length))}},B.array={string:z,array:C,arraybuffer:function(F){return new Uint8Array(F).buffer},uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(F)}},B.arraybuffer={string:function(F){return z(new Uint8Array(F))},array:function(F){return P(new Uint8Array(F),new Array(F.byteLength))},arraybuffer:C,uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(new Uint8Array(F))}},B.uint8array={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return F.buffer},uint8array:C,nodebuffer:function(F){return g.newBufferFrom(F)}},B.nodebuffer={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return B.nodebuffer.uint8array(F).buffer},uint8array:function(F){return P(F,new Uint8Array(F.length))},nodebuffer:C},m.transformTo=function(F,W){if(W=W||"",!F)return W;m.checkSupport(F);var q=m.getTypeOf(W);return B[q][F](W)},m.resolve=function(F){for(var W=F.split("/"),q=[],A=0;A<W.length;A++){var M=W[A];M==="."||M===""&&A!==0&&A!==W.length-1||(M===".."?q.pop():q.push(M))}return q.join("/")},m.getTypeOf=function(F){return typeof F=="string"?"string":Object.prototype.toString.call(F)==="[object Array]"?"array":d.nodebuffer&&g.isBuffer(F)?"nodebuffer":d.uint8array&&F instanceof Uint8Array?"uint8array":d.arraybuffer&&F instanceof ArrayBuffer?"arraybuffer":void 0},m.checkSupport=function(F){if(!d[F.toLowerCase()])throw new Error(F+" is not supported by this platform")},m.MAX_VALUE_16BITS=65535,m.MAX_VALUE_32BITS=-1,m.pretty=function(F){var W,q,A="";for(q=0;q<(F||"").length;q++)A+="\\x"+((W=F.charCodeAt(q))<16?"0":"")+W.toString(16).toUpperCase();return A},m.delay=function(F,W,q){a((function(){F.apply(q||null,W||[])}))},m.inherits=function(F,W){function q(){}q.prototype=W.prototype,F.prototype=new q},m.extend=function(){var F,W,q={};for(F=0;F<arguments.length;F++)for(W in arguments[F])Object.prototype.hasOwnProperty.call(arguments[F],W)&&q[W]===void 0&&(q[W]=arguments[F][W]);return q},m.prepareContent=function(F,W,q,A,M){return S.Promise.resolve(W).then((function(k){return d.blob&&(k instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(k))!==-1)&&typeof FileReader<"u"?new S.Promise((function(y,w){var x=new FileReader;x.onload=function(_){y(_.target.result)},x.onerror=function(_){w(_.target.error)},x.readAsArrayBuffer(k)})):k})).then((function(k){var y=m.getTypeOf(k);return y?(y==="arraybuffer"?k=m.transformTo("uint8array",k):y==="string"&&(M?k=b.decode(k):q&&A!==!0&&(k=(function(w){return I(w,d.uint8array?new Uint8Array(w.length):new Array(w.length))})(k))),k):S.Promise.reject(new Error("Can't read the data of '"+F+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./signature"),S=h("./zipEntry"),C=h("./support");function I(D){this.files=[],this.loadOptions=D}I.prototype={checkSignature:function(D){if(!this.reader.readAndCheckSignature(D)){this.reader.index-=4;var z=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+b.pretty(z)+", expected "+b.pretty(D)+")")}},isSignature:function(D,z){var P=this.reader.index;this.reader.setIndex(D);var B=this.reader.readString(4)===z;return this.reader.setIndex(P),B},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var D=this.reader.readData(this.zipCommentLength),z=C.uint8array?"uint8array":"array",P=b.transformTo(z,D);this.zipComment=this.loadOptions.decodeFileName(P)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var D,z,P,B=this.zip64EndOfCentralSize-44;0<B;)D=this.reader.readInt(2),z=this.reader.readInt(4),P=this.reader.readData(z),this.zip64ExtensibleData[D]={id:D,length:z,value:P}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var D,z;for(D=0;D<this.files.length;D++)z=this.files[D],this.reader.setIndex(z.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),z.readLocalPart(this.reader),z.handleUTF8(),z.processAttributes()},readCentralDir:function(){var D;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(D=new S({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(D);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var D=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(D<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(D);var z=D;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===b.MAX_VALUE_16BITS||this.diskWithCentralDirStart===b.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===b.MAX_VALUE_16BITS||this.centralDirRecords===b.MAX_VALUE_16BITS||this.centralDirSize===b.MAX_VALUE_32BITS||this.centralDirOffset===b.MAX_VALUE_32BITS){if(this.zip64=!0,(D=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(D),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var P=this.centralDirOffset+this.centralDirSize;this.zip64&&(P+=20,P+=12+this.zip64EndOfCentralSize);var B=z-P;if(0<B)this.isSignature(z,g.CENTRAL_FILE_HEADER)||(this.reader.zero=B);else if(B<0)throw new Error("Corrupted zip: missing "+Math.abs(B)+" bytes.")},prepareReader:function(D){this.reader=d(D)},load:function(D){this.prepareReader(D),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=I},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./compressedObject"),S=h("./crc32"),C=h("./utf8"),I=h("./compressions"),D=h("./support");function z(P,B){this.options=P,this.loadOptions=B}z.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(P){var B,F;if(P.skip(22),this.fileNameLength=P.readInt(2),F=P.readInt(2),this.fileName=P.readData(this.fileNameLength),P.skip(F),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((B=(function(W){for(var q in I)if(Object.prototype.hasOwnProperty.call(I,q)&&I[q].magic===W)return I[q];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+b.pretty(this.compressionMethod)+" unknown (inner file : "+b.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,B,P.readData(this.compressedSize))},readCentralPart:function(P){this.versionMadeBy=P.readInt(2),P.skip(2),this.bitFlag=P.readInt(2),this.compressionMethod=P.readString(2),this.date=P.readDate(),this.crc32=P.readInt(4),this.compressedSize=P.readInt(4),this.uncompressedSize=P.readInt(4);var B=P.readInt(2);if(this.extraFieldsLength=P.readInt(2),this.fileCommentLength=P.readInt(2),this.diskNumberStart=P.readInt(2),this.internalFileAttributes=P.readInt(2),this.externalFileAttributes=P.readInt(4),this.localHeaderOffset=P.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");P.skip(B),this.readExtraFields(P),this.parseZIP64ExtraField(P),this.fileComment=P.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var P=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),P==0&&(this.dosPermissions=63&this.externalFileAttributes),P==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var P=d(this.extraFields[1].value);this.uncompressedSize===b.MAX_VALUE_32BITS&&(this.uncompressedSize=P.readInt(8)),this.compressedSize===b.MAX_VALUE_32BITS&&(this.compressedSize=P.readInt(8)),this.localHeaderOffset===b.MAX_VALUE_32BITS&&(this.localHeaderOffset=P.readInt(8)),this.diskNumberStart===b.MAX_VALUE_32BITS&&(this.diskNumberStart=P.readInt(4))}},readExtraFields:function(P){var B,F,W,q=P.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});P.index+4<q;)B=P.readInt(2),F=P.readInt(2),W=P.readData(F),this.extraFields[B]={id:B,length:F,value:W};P.setIndex(q)},handleUTF8:function(){var P=D.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=C.utf8decode(this.fileName),this.fileCommentStr=C.utf8decode(this.fileComment);else{var B=this.findExtraFieldUnicodePath();if(B!==null)this.fileNameStr=B;else{var F=b.transformTo(P,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(F)}var W=this.findExtraFieldUnicodeComment();if(W!==null)this.fileCommentStr=W;else{var q=b.transformTo(P,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(q)}}},findExtraFieldUnicodePath:function(){var P=this.extraFields[28789];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileName)!==B.readInt(4)?null:C.utf8decode(B.readData(P.length-5))}return null},findExtraFieldUnicodeComment:function(){var P=this.extraFields[25461];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileComment)!==B.readInt(4)?null:C.utf8decode(B.readData(P.length-5))}return null}},p.exports=z},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(h,p,m){function d(B,F,W){this.name=B,this.dir=W.dir,this.date=W.date,this.comment=W.comment,this.unixPermissions=W.unixPermissions,this.dosPermissions=W.dosPermissions,this._data=F,this._dataBinary=W.binary,this.options={compression:W.compression,compressionOptions:W.compressionOptions}}var b=h("./stream/StreamHelper"),g=h("./stream/DataWorker"),S=h("./utf8"),C=h("./compressedObject"),I=h("./stream/GenericWorker");d.prototype={internalStream:function(B){var F=null,W="string";try{if(!B)throw new Error("No output type specified.");var q=(W=B.toLowerCase())==="string"||W==="text";W!=="binarystring"&&W!=="text"||(W="string"),F=this._decompressWorker();var A=!this._dataBinary;A&&!q&&(F=F.pipe(new S.Utf8EncodeWorker)),!A&&q&&(F=F.pipe(new S.Utf8DecodeWorker))}catch(M){(F=new I("error")).error(M)}return new b(F,W,"")},async:function(B,F){return this.internalStream(B).accumulate(F)},nodeStream:function(B,F){return this.internalStream(B||"nodebuffer").toNodejsStream(F)},_compressWorker:function(B,F){if(this._data instanceof C&&this._data.compression.magic===B.magic)return this._data.getCompressedWorker();var W=this._decompressWorker();return this._dataBinary||(W=W.pipe(new S.Utf8EncodeWorker)),C.createWorkerFrom(W,B,F)},_decompressWorker:function(){return this._data instanceof C?this._data.getContentWorker():this._data instanceof I?this._data:new g(this._data)}};for(var D=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],z=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},P=0;P<D.length;P++)d.prototype[D[P]]=z;p.exports=d},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(h,p,m){(function(d){var b,g,S=d.MutationObserver||d.WebKitMutationObserver;if(S){var C=0,I=new S(B),D=d.document.createTextNode("");I.observe(D,{characterData:!0}),b=function(){D.data=C=++C%2}}else if(d.setImmediate||d.MessageChannel===void 0)b="document"in d&&"onreadystatechange"in d.document.createElement("script")?function(){var F=d.document.createElement("script");F.onreadystatechange=function(){B(),F.onreadystatechange=null,F.parentNode.removeChild(F),F=null},d.document.documentElement.appendChild(F)}:function(){setTimeout(B,0)};else{var z=new d.MessageChannel;z.port1.onmessage=B,b=function(){z.port2.postMessage(0)}}var P=[];function B(){var F,W;g=!0;for(var q=P.length;q;){for(W=P,P=[],F=-1;++F<q;)W[F]();q=P.length}g=!1}p.exports=function(F){P.push(F)!==1||g||b()}}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(h,p,m){var d=h("immediate");function b(){}var g={},S=["REJECTED"],C=["FULFILLED"],I=["PENDING"];function D(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=I,this.queue=[],this.outcome=void 0,q!==b&&F(this,q)}function z(q,A,M){this.promise=q,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function P(q,A,M){d((function(){var k;try{k=A(M)}catch(y){return g.reject(q,y)}k===q?g.reject(q,new TypeError("Cannot resolve promise with itself")):g.resolve(q,k)}))}function B(q){var A=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof A=="function")return function(){A.apply(q,arguments)}}function F(q,A){var M=!1;function k(x){M||(M=!0,g.reject(q,x))}function y(x){M||(M=!0,g.resolve(q,x))}var w=W((function(){A(y,k)}));w.status==="error"&&k(w.value)}function W(q,A){var M={};try{M.value=q(A),M.status="success"}catch(k){M.status="error",M.value=k}return M}(p.exports=D).prototype.finally=function(q){if(typeof q!="function")return this;var A=this.constructor;return this.then((function(M){return A.resolve(q()).then((function(){return M}))}),(function(M){return A.resolve(q()).then((function(){throw M}))}))},D.prototype.catch=function(q){return this.then(null,q)},D.prototype.then=function(q,A){if(typeof q!="function"&&this.state===C||typeof A!="function"&&this.state===S)return this;var M=new this.constructor(b);return this.state!==I?P(M,this.state===C?q:A,this.outcome):this.queue.push(new z(M,q,A)),M},z.prototype.callFulfilled=function(q){g.resolve(this.promise,q)},z.prototype.otherCallFulfilled=function(q){P(this.promise,this.onFulfilled,q)},z.prototype.callRejected=function(q){g.reject(this.promise,q)},z.prototype.otherCallRejected=function(q){P(this.promise,this.onRejected,q)},g.resolve=function(q,A){var M=W(B,A);if(M.status==="error")return g.reject(q,M.value);var k=M.value;if(k)F(q,k);else{q.state=C,q.outcome=A;for(var y=-1,w=q.queue.length;++y<w;)q.queue[y].callFulfilled(A)}return q},g.reject=function(q,A){q.state=S,q.outcome=A;for(var M=-1,k=q.queue.length;++M<k;)q.queue[M].callRejected(A);return q},D.resolve=function(q){return q instanceof this?q:g.resolve(new this(b),q)},D.reject=function(q){var A=new this(b);return g.reject(A,q)},D.all=function(q){var A=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=q.length,k=!1;if(!M)return this.resolve([]);for(var y=new Array(M),w=0,x=-1,_=new this(b);++x<M;)T(q[x],x);return _;function T(O,j){A.resolve(O).then((function(V){y[j]=V,++w!==M||k||(k=!0,g.resolve(_,y))}),(function(V){k||(k=!0,g.reject(_,V))}))}},D.race=function(q){if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=q.length,M=!1;if(!A)return this.resolve([]);for(var k,y=-1,w=new this(b);++y<A;)k=q[y],this.resolve(k).then((function(x){M||(M=!0,g.resolve(w,x))}),(function(x){M||(M=!0,g.reject(w,x))}));return w}},{immediate:36}],38:[function(h,p,m){var d={};(0,h("./lib/utils/common").assign)(d,h("./lib/deflate"),h("./lib/inflate"),h("./lib/zlib/constants")),p.exports=d},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(h,p,m){var d=h("./zlib/deflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/messages"),C=h("./zlib/zstream"),I=Object.prototype.toString;function D(P){if(!(this instanceof D))return new D(P);this.options=b.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},P||{});var B=this.options;B.raw&&0<B.windowBits?B.windowBits=-B.windowBits:B.gzip&&0<B.windowBits&&B.windowBits<16&&(B.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new C,this.strm.avail_out=0;var F=d.deflateInit2(this.strm,B.level,B.method,B.windowBits,B.memLevel,B.strategy);if(F!==0)throw new Error(S[F]);if(B.header&&d.deflateSetHeader(this.strm,B.header),B.dictionary){var W;if(W=typeof B.dictionary=="string"?g.string2buf(B.dictionary):I.call(B.dictionary)==="[object ArrayBuffer]"?new Uint8Array(B.dictionary):B.dictionary,(F=d.deflateSetDictionary(this.strm,W))!==0)throw new Error(S[F]);this._dict_set=!0}}function z(P,B){var F=new D(B);if(F.push(P,!0),F.err)throw F.msg||S[F.err];return F.result}D.prototype.push=function(P,B){var F,W,q=this.strm,A=this.options.chunkSize;if(this.ended)return!1;W=B===~~B?B:B===!0?4:0,typeof P=="string"?q.input=g.string2buf(P):I.call(P)==="[object ArrayBuffer]"?q.input=new Uint8Array(P):q.input=P,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new b.Buf8(A),q.next_out=0,q.avail_out=A),(F=d.deflate(q,W))!==1&&F!==0)return this.onEnd(F),!(this.ended=!0);q.avail_out!==0&&(q.avail_in!==0||W!==4&&W!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(b.shrinkBuf(q.output,q.next_out))):this.onData(b.shrinkBuf(q.output,q.next_out)))}while((0<q.avail_in||q.avail_out===0)&&F!==1);return W===4?(F=d.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===0):W!==2||(this.onEnd(0),!(q.avail_out=0))},D.prototype.onData=function(P){this.chunks.push(P)},D.prototype.onEnd=function(P){P===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg},m.Deflate=D,m.deflate=z,m.deflateRaw=function(P,B){return(B=B||{}).raw=!0,z(P,B)},m.gzip=function(P,B){return(B=B||{}).gzip=!0,z(P,B)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(h,p,m){var d=h("./zlib/inflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/constants"),C=h("./zlib/messages"),I=h("./zlib/zstream"),D=h("./zlib/gzheader"),z=Object.prototype.toString;function P(F){if(!(this instanceof P))return new P(F);this.options=b.assign({chunkSize:16384,windowBits:0,to:""},F||{});var W=this.options;W.raw&&0<=W.windowBits&&W.windowBits<16&&(W.windowBits=-W.windowBits,W.windowBits===0&&(W.windowBits=-15)),!(0<=W.windowBits&&W.windowBits<16)||F&&F.windowBits||(W.windowBits+=32),15<W.windowBits&&W.windowBits<48&&(15&W.windowBits)==0&&(W.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new I,this.strm.avail_out=0;var q=d.inflateInit2(this.strm,W.windowBits);if(q!==S.Z_OK)throw new Error(C[q]);this.header=new D,d.inflateGetHeader(this.strm,this.header)}function B(F,W){var q=new P(W);if(q.push(F,!0),q.err)throw q.msg||C[q.err];return q.result}P.prototype.push=function(F,W){var q,A,M,k,y,w,x=this.strm,_=this.options.chunkSize,T=this.options.dictionary,O=!1;if(this.ended)return!1;A=W===~~W?W:W===!0?S.Z_FINISH:S.Z_NO_FLUSH,typeof F=="string"?x.input=g.binstring2buf(F):z.call(F)==="[object ArrayBuffer]"?x.input=new Uint8Array(F):x.input=F,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new b.Buf8(_),x.next_out=0,x.avail_out=_),(q=d.inflate(x,S.Z_NO_FLUSH))===S.Z_NEED_DICT&&T&&(w=typeof T=="string"?g.string2buf(T):z.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,q=d.inflateSetDictionary(this.strm,w)),q===S.Z_BUF_ERROR&&O===!0&&(q=S.Z_OK,O=!1),q!==S.Z_STREAM_END&&q!==S.Z_OK)return this.onEnd(q),!(this.ended=!0);x.next_out&&(x.avail_out!==0&&q!==S.Z_STREAM_END&&(x.avail_in!==0||A!==S.Z_FINISH&&A!==S.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=g.utf8border(x.output,x.next_out),k=x.next_out-M,y=g.buf2string(x.output,M),x.next_out=k,x.avail_out=_-k,k&&b.arraySet(x.output,x.output,M,k,0),this.onData(y)):this.onData(b.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(O=!0)}while((0<x.avail_in||x.avail_out===0)&&q!==S.Z_STREAM_END);return q===S.Z_STREAM_END&&(A=S.Z_FINISH),A===S.Z_FINISH?(q=d.inflateEnd(this.strm),this.onEnd(q),this.ended=!0,q===S.Z_OK):A!==S.Z_SYNC_FLUSH||(this.onEnd(S.Z_OK),!(x.avail_out=0))},P.prototype.onData=function(F){this.chunks.push(F)},P.prototype.onEnd=function(F){F===S.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=F,this.msg=this.strm.msg},m.Inflate=P,m.inflate=B,m.inflateRaw=function(F,W){return(W=W||{}).raw=!0,B(F,W)},m.ungzip=B},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";m.assign=function(S){for(var C=Array.prototype.slice.call(arguments,1);C.length;){var I=C.shift();if(I){if(typeof I!="object")throw new TypeError(I+"must be non-object");for(var D in I)I.hasOwnProperty(D)&&(S[D]=I[D])}}return S},m.shrinkBuf=function(S,C){return S.length===C?S:S.subarray?S.subarray(0,C):(S.length=C,S)};var b={arraySet:function(S,C,I,D,z){if(C.subarray&&S.subarray)S.set(C.subarray(I,I+D),z);else for(var P=0;P<D;P++)S[z+P]=C[I+P]},flattenChunks:function(S){var C,I,D,z,P,B;for(C=D=0,I=S.length;C<I;C++)D+=S[C].length;for(B=new Uint8Array(D),C=z=0,I=S.length;C<I;C++)P=S[C],B.set(P,z),z+=P.length;return B}},g={arraySet:function(S,C,I,D,z){for(var P=0;P<D;P++)S[z+P]=C[I+P]},flattenChunks:function(S){return[].concat.apply([],S)}};m.setTyped=function(S){S?(m.Buf8=Uint8Array,m.Buf16=Uint16Array,m.Buf32=Int32Array,m.assign(m,b)):(m.Buf8=Array,m.Buf16=Array,m.Buf32=Array,m.assign(m,g))},m.setTyped(d)},{}],42:[function(h,p,m){var d=h("./common"),b=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{b=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}for(var S=new d.Buf8(256),C=0;C<256;C++)S[C]=252<=C?6:248<=C?5:240<=C?4:224<=C?3:192<=C?2:1;function I(D,z){if(z<65537&&(D.subarray&&g||!D.subarray&&b))return String.fromCharCode.apply(null,d.shrinkBuf(D,z));for(var P="",B=0;B<z;B++)P+=String.fromCharCode(D[B]);return P}S[254]=S[254]=1,m.string2buf=function(D){var z,P,B,F,W,q=D.length,A=0;for(F=0;F<q;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),A+=P<128?1:P<2048?2:P<65536?3:4;for(z=new d.Buf8(A),F=W=0;W<A;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),P<128?z[W++]=P:(P<2048?z[W++]=192|P>>>6:(P<65536?z[W++]=224|P>>>12:(z[W++]=240|P>>>18,z[W++]=128|P>>>12&63),z[W++]=128|P>>>6&63),z[W++]=128|63&P);return z},m.buf2binstring=function(D){return I(D,D.length)},m.binstring2buf=function(D){for(var z=new d.Buf8(D.length),P=0,B=z.length;P<B;P++)z[P]=D.charCodeAt(P);return z},m.buf2string=function(D,z){var P,B,F,W,q=z||D.length,A=new Array(2*q);for(P=B=0;P<q;)if((F=D[P++])<128)A[B++]=F;else if(4<(W=S[F]))A[B++]=65533,P+=W-1;else{for(F&=W===2?31:W===3?15:7;1<W&&P<q;)F=F<<6|63&D[P++],W--;1<W?A[B++]=65533:F<65536?A[B++]=F:(F-=65536,A[B++]=55296|F>>10&1023,A[B++]=56320|1023&F)}return I(A,B)},m.utf8border=function(D,z){var P;for((z=z||D.length)>D.length&&(z=D.length),P=z-1;0<=P&&(192&D[P])==128;)P--;return P<0||P===0?z:P+S[D[P]]>z?P:z}},{"./common":41}],43:[function(h,p,m){p.exports=function(d,b,g,S){for(var C=65535&d|0,I=d>>>16&65535|0,D=0;g!==0;){for(g-=D=2e3<g?2e3:g;I=I+(C=C+b[S++]|0)|0,--D;);C%=65521,I%=65521}return C|I<<16|0}},{}],44:[function(h,p,m){p.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(h,p,m){var d=(function(){for(var b,g=[],S=0;S<256;S++){b=S;for(var C=0;C<8;C++)b=1&b?3988292384^b>>>1:b>>>1;g[S]=b}return g})();p.exports=function(b,g,S,C){var I=d,D=C+S;b^=-1;for(var z=C;z<D;z++)b=b>>>8^I[255&(b^g[z])];return-1^b}},{}],46:[function(h,p,m){var d,b=h("../utils/common"),g=h("./trees"),S=h("./adler32"),C=h("./crc32"),I=h("./messages"),D=-2,z=258,P=262,B=113;function F(L,G){return L.msg=I[G],G}function W(L){return(L<<1)-(4<L?9:0)}function q(L){for(var G=L.length;0<=--G;)L[G]=0}function A(L){var G=L.state,N=G.pending;N>L.avail_out&&(N=L.avail_out),N!==0&&(b.arraySet(L.output,G.pending_buf,G.pending_out,N,L.next_out),L.next_out+=N,G.pending_out+=N,L.total_out+=N,L.avail_out-=N,G.pending-=N,G.pending===0&&(G.pending_out=0))}function M(L,G){g._tr_flush_block(L,0<=L.block_start?L.block_start:-1,L.strstart-L.block_start,G),L.block_start=L.strstart,A(L.strm)}function k(L,G){L.pending_buf[L.pending++]=G}function y(L,G){L.pending_buf[L.pending++]=G>>>8&255,L.pending_buf[L.pending++]=255&G}function w(L,G){var N,R,U=L.max_chain_length,K=L.strstart,rt=L.prev_length,Z=L.nice_match,et=L.strstart>L.w_size-P?L.strstart-(L.w_size-P):0,ht=L.window,lt=L.w_mask,Q=L.prev,ot=L.strstart+z,nt=ht[K+rt-1],ut=ht[K+rt];L.prev_length>=L.good_match&&(U>>=2),Z>L.lookahead&&(Z=L.lookahead);do if(ht[(N=G)+rt]===ut&&ht[N+rt-1]===nt&&ht[N]===ht[K]&&ht[++N]===ht[K+1]){K+=2,N++;do;while(ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&K<ot);if(R=z-(ot-K),K=ot-z,rt<R){if(L.match_start=G,Z<=(rt=R))break;nt=ht[K+rt-1],ut=ht[K+rt]}}while((G=Q[G<])>et&&--U!=0);return rt<=L.lookahead?rt:L.lookahead}function x(L){var G,N,R,U,K,rt,Z,et,ht,lt,Q=L.w_size;do{if(U=L.window_size-L.lookahead-L.strstart,L.strstart>=Q+(Q-P)){for(b.arraySet(L.window,L.window,Q,Q,0),L.match_start-=Q,L.strstart-=Q,L.block_start-=Q,G=N=L.hash_size;R=L.head[--G],L.head[G]=Q<=R?R-Q:0,--N;);for(G=N=Q;R=L.prev[--G],L.prev[G]=Q<=R?R-Q:0,--N;);U+=Q}if(L.strm.avail_in===0)break;if(rt=L.strm,Z=L.window,et=L.strstart+L.lookahead,lt=void 0,(ht=U)<(lt=rt.avail_in)&&(lt=ht),N=lt===0?0:(rt.avail_in-=lt,b.arraySet(Z,rt.input,rt.next_in,lt,et),rt.state.wrap===1?rt.adler=S(rt.adler,Z,lt,et):rt.state.wrap===2&&(rt.adler=C(rt.adler,Z,lt,et)),rt.next_in+=lt,rt.total_in+=lt,lt),L.lookahead+=N,L.lookahead+L.insert>=3)for(K=L.strstart-L.insert,L.ins_h=L.window[K],L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+1])&L.hash_mask;L.insert&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+3-1])&L.hash_mask,L.prev[K&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=K,K++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<P&&L.strm.avail_in!==0)}function _(L,G){for(var N,R;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),N!==0&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N)),L.match_length>=3)if(R=g._tr_tally(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){for(L.match_length--;L.strstart++,L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart,--L.match_length!=0;);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+1])&L.hash_mask;else R=g._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(R&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function T(L,G){for(var N,R,U;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,N!==0&&L.prev_length<L.max_lazy_match&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N),L.match_length<=5&&(L.strategy===1||L.match_length===3&&4096<L.strstart-L.match_start)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){for(U=L.strstart+L.lookahead-3,R=g._tr_tally(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;++L.strstart<=U&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),--L.prev_length!=0;);if(L.match_available=0,L.match_length=2,L.strstart++,R&&(M(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if((R=g._tr_tally(L,0,L.window[L.strstart-1]))&&M(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(R=g._tr_tally(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function O(L,G,N,R,U){this.good_length=L,this.max_lazy=G,this.nice_length=N,this.max_chain=R,this.func=U}function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new b.Buf16(1146),this.dyn_dtree=new b.Buf16(122),this.bl_tree=new b.Buf16(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new b.Buf16(16),this.heap=new b.Buf16(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new b.Buf16(573),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function V(L){var G;return L&&L.state?(L.total_in=L.total_out=0,L.data_type=2,(G=L.state).pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?42:B,L.adler=G.wrap===2?0:1,G.last_flush=0,g._tr_init(G),0):F(L,D)}function X(L){var G=V(L);return G===0&&(function(N){N.window_size=2*N.w_size,q(N.head),N.max_lazy_match=d[N.level].max_lazy,N.good_match=d[N.level].good_length,N.nice_match=d[N.level].nice_length,N.max_chain_length=d[N.level].max_chain,N.strstart=0,N.block_start=0,N.lookahead=0,N.insert=0,N.match_length=N.prev_length=2,N.match_available=0,N.ins_h=0})(L.state),G}function J(L,G,N,R,U,K){if(!L)return D;var rt=1;if(G===-1&&(G=6),R<0?(rt=0,R=-R):15<R&&(rt=2,R-=16),U<1||9<U||N!==8||R<8||15<R||G<0||9<G||K<0||4<K)return F(L,D);R===8&&(R=9);var Z=new j;return(L.state=Z).strm=L,Z.wrap=rt,Z.gzhead=null,Z.w_bits=R,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=U+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+3-1)/3),Z.window=new b.Buf8(2*Z.w_size),Z.head=new b.Buf16(Z.hash_size),Z.prev=new b.Buf16(Z.w_size),Z.lit_bufsize=1<<U+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new b.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=G,Z.strategy=K,Z.method=N,X(L)}d=[new O(0,0,0,0,(function(L,G){var N=65535;for(N>L.pending_buf_size-5&&(N=L.pending_buf_size-5);;){if(L.lookahead<=1){if(x(L),L.lookahead===0&&G===0)return 1;if(L.lookahead===0)break}L.strstart+=L.lookahead,L.lookahead=0;var R=L.block_start+N;if((L.strstart===0||L.strstart>=R)&&(L.lookahead=L.strstart-R,L.strstart=R,M(L,!1),L.strm.avail_out===0)||L.strstart-L.block_start>=L.w_size-P&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,G===4?(M(L,!0),L.strm.avail_out===0?3:4):(L.strstart>L.block_start&&(M(L,!1),L.strm.avail_out),1)})),new O(4,4,8,4,_),new O(4,5,16,8,_),new O(4,6,32,32,_),new O(4,4,16,16,T),new O(8,16,32,32,T),new O(8,16,128,128,T),new O(8,32,128,256,T),new O(32,128,258,1024,T),new O(32,258,258,4096,T)],m.deflateInit=function(L,G){return J(L,G,8,15,8,0)},m.deflateInit2=J,m.deflateReset=X,m.deflateResetKeep=V,m.deflateSetHeader=function(L,G){return L&&L.state?L.state.wrap!==2?D:(L.state.gzhead=G,0):D},m.deflate=function(L,G){var N,R,U,K;if(!L||!L.state||5<G||G<0)return L?F(L,D):D;if(R=L.state,!L.output||!L.input&&L.avail_in!==0||R.status===666&&G!==4)return F(L,L.avail_out===0?-5:D);if(R.strm=L,N=R.last_flush,R.last_flush=G,R.status===42)if(R.wrap===2)L.adler=0,k(R,31),k(R,139),k(R,8),R.gzhead?(k(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),k(R,255&R.gzhead.time),k(R,R.gzhead.time>>8&255),k(R,R.gzhead.time>>16&255),k(R,R.gzhead.time>>24&255),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(k(R,255&R.gzhead.extra.length),k(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(L.adler=C(L.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(k(R,0),k(R,0),k(R,0),k(R,0),k(R,0),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,3),R.status=B);else{var rt=8+(R.w_bits-8<<4)<<8;rt|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(rt|=32),rt+=31-rt%31,R.status=B,y(R,rt),R.strstart!==0&&(y(R,L.adler>>>16),y(R,65535&L.adler)),L.adler=1}if(R.status===69)if(R.gzhead.extra){for(U=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending!==R.pending_buf_size));)k(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&A(L),R.pending+2<=R.pending_buf_size&&(k(R,255&L.adler),k(R,L.adler>>8&255),L.adler=0,R.status=B)):R.status=B),R.pending!==0){if(A(L),L.avail_out===0)return R.last_flush=-1,0}else if(L.avail_in===0&&W(G)<=W(N)&&G!==4)return F(L,-5);if(R.status===666&&L.avail_in!==0)return F(L,-5);if(L.avail_in!==0||R.lookahead!==0||G!==0&&R.status!==666){var Z=R.strategy===2?(function(et,ht){for(var lt;;){if(et.lookahead===0&&(x(et),et.lookahead===0)){if(ht===0)return 1;break}if(et.match_length=0,lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++,lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):R.strategy===3?(function(et,ht){for(var lt,Q,ot,nt,ut=et.window;;){if(et.lookahead<=z){if(x(et),et.lookahead<=z&&ht===0)return 1;if(et.lookahead===0)break}if(et.match_length=0,et.lookahead>=3&&0<et.strstart&&(Q=ut[ot=et.strstart-1])===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]){nt=et.strstart+z;do;while(Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&ot<nt);et.match_length=z-(nt-ot),et.match_length>et.lookahead&&(et.match_length=et.lookahead)}if(et.match_length>=3?(lt=g._tr_tally(et,1,et.match_length-3),et.lookahead-=et.match_length,et.strstart+=et.match_length,et.match_length=0):(lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++),lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):d[R.level].func(R,G);if(Z!==3&&Z!==4||(R.status=666),Z===1||Z===3)return L.avail_out===0&&(R.last_flush=-1),0;if(Z===2&&(G===1?g._tr_align(R):G!==5&&(g._tr_stored_block(R,0,0,!1),G===3&&(q(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),A(L),L.avail_out===0))return R.last_flush=-1,0}return G!==4?0:R.wrap<=0?1:(R.wrap===2?(k(R,255&L.adler),k(R,L.adler>>8&255),k(R,L.adler>>16&255),k(R,L.adler>>24&255),k(R,255&L.total_in),k(R,L.total_in>>8&255),k(R,L.total_in>>16&255),k(R,L.total_in>>24&255)):(y(R,L.adler>>>16),y(R,65535&L.adler)),A(L),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?0:1)},m.deflateEnd=function(L){var G;return L&&L.state?(G=L.state.status)!==42&&G!==69&&G!==73&&G!==91&&G!==103&&G!==B&&G!==666?F(L,D):(L.state=null,G===B?F(L,-3):0):D},m.deflateSetDictionary=function(L,G){var N,R,U,K,rt,Z,et,ht,lt=G.length;if(!L||!L.state||(K=(N=L.state).wrap)===2||K===1&&N.status!==42||N.lookahead)return D;for(K===1&&(L.adler=S(L.adler,G,lt,0)),N.wrap=0,lt>=N.w_size&&(K===0&&(q(N.head),N.strstart=0,N.block_start=0,N.insert=0),ht=new b.Buf8(N.w_size),b.arraySet(ht,G,lt-N.w_size,N.w_size,0),G=ht,lt=N.w_size),rt=L.avail_in,Z=L.next_in,et=L.input,L.avail_in=lt,L.next_in=0,L.input=G,x(N);N.lookahead>=3;){for(R=N.strstart,U=N.lookahead-2;N.ins_h=(N.ins_h<<N.hash_shift^N.window[R+3-1])&N.hash_mask,N.prev[R&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=R,R++,--U;);N.strstart=R,N.lookahead=2,x(N)}return N.strstart+=N.lookahead,N.block_start=N.strstart,N.insert=N.lookahead,N.lookahead=0,N.match_length=N.prev_length=2,N.match_available=0,L.next_in=Z,L.input=et,L.avail_in=rt,N.wrap=K,0},m.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(h,p,m){p.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(h,p,m){p.exports=function(d,b){var g,S,C,I,D,z,P,B,F,W,q,A,M,k,y,w,x,_,T,O,j,V,X,J,L;g=d.state,S=d.next_in,J=d.input,C=S+(d.avail_in-5),I=d.next_out,L=d.output,D=I-(b-d.avail_out),z=I+(d.avail_out-257),P=g.dmax,B=g.wsize,F=g.whave,W=g.wnext,q=g.window,A=g.hold,M=g.bits,k=g.lencode,y=g.distcode,w=(1<<g.lenbits)-1,x=(1<<g.distbits)-1;t:do{M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=k[A&w];e:for(;;){if(A>>>=T=_>>>24,M-=T,(T=_>>>16&255)==0)L[I++]=65535&_;else{if(!(16&T)){if((64&T)==0){_=k[(65535&_)+(A&(1<<T)-1)];continue e}if(32&T){g.mode=12;break t}d.msg="invalid literal/length code",g.mode=30;break t}O=65535&_,(T&=15)&&(M<T&&(A+=J[S++]<<M,M+=8),O+=A&(1<<T)-1,A>>>=T,M-=T),M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=y[A&x];r:for(;;){if(A>>>=T=_>>>24,M-=T,!(16&(T=_>>>16&255))){if((64&T)==0){_=y[(65535&_)+(A&(1<<T)-1)];continue r}d.msg="invalid distance code",g.mode=30;break t}if(j=65535&_,M<(T&=15)&&(A+=J[S++]<<M,(M+=8)<T&&(A+=J[S++]<<M,M+=8)),P<(j+=A&(1<<T)-1)){d.msg="invalid distance too far back",g.mode=30;break t}if(A>>>=T,M-=T,(T=I-D)<j){if(F<(T=j-T)&&g.sane){d.msg="invalid distance too far back",g.mode=30;break t}if(X=q,(V=0)===W){if(V+=B-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}}else if(W<T){if(V+=B+W-T,(T-=W)<O){for(O-=T;L[I++]=q[V++],--T;);if(V=0,W<O){for(O-=T=W;L[I++]=q[V++],--T;);V=I-j,X=L}}}else if(V+=W-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}for(;2<O;)L[I++]=X[V++],L[I++]=X[V++],L[I++]=X[V++],O-=3;O&&(L[I++]=X[V++],1<O&&(L[I++]=X[V++]))}else{for(V=I-j;L[I++]=L[V++],L[I++]=L[V++],L[I++]=L[V++],2<(O-=3););O&&(L[I++]=L[V++],1<O&&(L[I++]=L[V++]))}break}}break}}while(S<C&&I<z);S-=O=M>>3,A&=(1<<(M-=O<<3))-1,d.next_in=S,d.next_out=I,d.avail_in=S<C?C-S+5:5-(S-C),d.avail_out=I<z?z-I+257:257-(I-z),g.hold=A,g.bits=M}},{}],49:[function(h,p,m){var d=h("../utils/common"),b=h("./adler32"),g=h("./crc32"),S=h("./inffast"),C=h("./inftrees"),I=-2;function D(w){return(w>>>24&255)+(w>>>8&65280)+((65280&w)<<8)+((255&w)<<24)}function z(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function P(w){var x;return w&&w.state?(x=w.state,w.total_in=w.total_out=x.total=0,w.msg="",x.wrap&&(w.adler=1&x.wrap),x.mode=1,x.last=0,x.havedict=0,x.dmax=32768,x.head=null,x.hold=0,x.bits=0,x.lencode=x.lendyn=new d.Buf32(852),x.distcode=x.distdyn=new d.Buf32(592),x.sane=1,x.back=-1,0):I}function B(w){var x;return w&&w.state?((x=w.state).wsize=0,x.whave=0,x.wnext=0,P(w)):I}function F(w,x){var _,T;return w&&w.state?(T=w.state,x<0?(_=0,x=-x):(_=1+(x>>4),x<48&&(x&=15)),x&&(x<8||15<x)?I:(T.window!==null&&T.wbits!==x&&(T.window=null),T.wrap=_,T.wbits=x,B(w))):I}function W(w,x){var _,T;return w?(T=new z,(w.state=T).window=null,(_=F(w,x))!==0&&(w.state=null),_):I}var q,A,M=!0;function k(w){if(M){var x;for(q=new d.Buf32(512),A=new d.Buf32(32),x=0;x<144;)w.lens[x++]=8;for(;x<256;)w.lens[x++]=9;for(;x<280;)w.lens[x++]=7;for(;x<288;)w.lens[x++]=8;for(C(1,w.lens,0,288,q,0,w.work,{bits:9}),x=0;x<32;)w.lens[x++]=5;C(2,w.lens,0,32,A,0,w.work,{bits:5}),M=!1}w.lencode=q,w.lenbits=9,w.distcode=A,w.distbits=5}function y(w,x,_,T){var O,j=w.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new d.Buf8(j.wsize)),T>=j.wsize?(d.arraySet(j.window,x,_-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(T<(O=j.wsize-j.wnext)&&(O=T),d.arraySet(j.window,x,_-T,O,j.wnext),(T-=O)?(d.arraySet(j.window,x,_-T,T,0),j.wnext=T,j.whave=j.wsize):(j.wnext+=O,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=O))),0}m.inflateReset=B,m.inflateReset2=F,m.inflateResetKeep=P,m.inflateInit=function(w){return W(w,15)},m.inflateInit2=W,m.inflate=function(w,x){var _,T,O,j,V,X,J,L,G,N,R,U,K,rt,Z,et,ht,lt,Q,ot,nt,ut,ct,ft,mt=0,gt=new d.Buf8(4),xt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!w||!w.state||!w.output||!w.input&&w.avail_in!==0)return I;(_=w.state).mode===12&&(_.mode=13),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,N=X,R=J,ut=0;t:for(;;)switch(_.mode){case 1:if(_.wrap===0){_.mode=13;break}for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(2&_.wrap&&L===35615){gt[_.check=0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0),G=L=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&L)<<8)+(L>>8))%31){w.msg="incorrect header check",_.mode=30;break}if((15&L)!=8){w.msg="unknown compression method",_.mode=30;break}if(G-=4,nt=8+(15&(L>>>=4)),_.wbits===0)_.wbits=nt;else if(nt>_.wbits){w.msg="invalid window size",_.mode=30;break}_.dmax=1<<nt,w.adler=_.check=1,_.mode=512&L?10:12,G=L=0;break;case 2:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.flags=L,(255&_.flags)!=8){w.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){w.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=L>>8&1),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=3;case 3:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.time=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,gt[2]=L>>>16&255,gt[3]=L>>>24&255,_.check=g(_.check,gt,4,0)),G=L=0,_.mode=4;case 4:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.xflags=255&L,_.head.os=L>>8),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=5;case 5:if(1024&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length=L,_.head&&(_.head.extra_len=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(X<(U=_.length)&&(U=X),U&&(_.head&&(nt=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),d.arraySet(_.head.extra,T,j,U,nt)),512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,_.length-=U),_.length))break t;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.name+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.comment+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(65535&_.check)){w.msg="header crc mismatch",_.mode=30;break}G=L=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),w.adler=_.check=0,_.mode=12;break;case 10:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}w.adler=_.check=D(L),G=L=0,_.mode=11;case 11:if(_.havedict===0)return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,2;w.adler=_.check=1,_.mode=12;case 12:if(x===5||x===6)break t;case 13:if(_.last){L>>>=7&G,G-=7&G,_.mode=27;break}for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}switch(_.last=1&L,G-=1,3&(L>>>=1)){case 0:_.mode=14;break;case 1:if(k(_),_.mode=20,x!==6)break;L>>>=2,G-=2;break t;case 2:_.mode=17;break;case 3:w.msg="invalid block type",_.mode=30}L>>>=2,G-=2;break;case 14:for(L>>>=7&G,G-=7&G;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((65535&L)!=(L>>>16^65535)){w.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&L,G=L=0,_.mode=15,x===6)break t;case 15:_.mode=16;case 16:if(U=_.length){if(X<U&&(U=X),J<U&&(U=J),U===0)break t;d.arraySet(O,T,j,U,V),X-=U,j+=U,J-=U,V+=U,_.length-=U;break}_.mode=12;break;case 17:for(;G<14;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.nlen=257+(31&L),L>>>=5,G-=5,_.ndist=1+(31&L),L>>>=5,G-=5,_.ncode=4+(15&L),L>>>=4,G-=4,286<_.nlen||30<_.ndist){w.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.lens[xt[_.have++]]=7&L,L>>>=3,G-=3}for(;_.have<19;)_.lens[xt[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,ct={bits:_.lenbits},ut=C(0,_.lens,0,19,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(ht<16)L>>>=Z,G-=Z,_.lens[_.have++]=ht;else{if(ht===16){for(ft=Z+2;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L>>>=Z,G-=Z,_.have===0){w.msg="invalid bit length repeat",_.mode=30;break}nt=_.lens[_.have-1],U=3+(3&L),L>>>=2,G-=2}else if(ht===17){for(ft=Z+3;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=3+(7&(L>>>=Z)),L>>>=3,G-=3}else{for(ft=Z+7;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=11+(127&(L>>>=Z)),L>>>=7,G-=7}if(_.have+U>_.nlen+_.ndist){w.msg="invalid bit length repeat",_.mode=30;break}for(;U--;)_.lens[_.have++]=nt}}if(_.mode===30)break;if(_.lens[256]===0){w.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,ct={bits:_.lenbits},ut=C(1,_.lens,0,_.nlen,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,ct={bits:_.distbits},ut=C(2,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,ct),_.distbits=ct.bits,ut){w.msg="invalid distances set",_.mode=30;break}if(_.mode=20,x===6)break t;case 20:_.mode=21;case 21:if(6<=X&&258<=J){w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,S(w,R),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(et&&(240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.lencode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,_.length=ht,et===0){_.mode=26;break}if(32&et){_.back=-1,_.mode=12;break}if(64&et){w.msg="invalid literal/length code",_.mode=30;break}_.extra=15&et,_.mode=22;case 22:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;et=(mt=_.distcode[L&(1<<_.distbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.distcode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,64&et){w.msg="invalid distance code",_.mode=30;break}_.offset=ht,_.extra=15&et,_.mode=24;case 24:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.offset+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){w.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(J===0)break t;if(U=R-J,_.offset>U){if((U=_.offset-U)>_.whave&&_.sane){w.msg="invalid distance too far back",_.mode=30;break}K=U>_.wnext?(U-=_.wnext,_.wsize-U):_.wnext-U,U>_.length&&(U=_.length),rt=_.window}else rt=O,K=V-_.offset,U=_.length;for(J<U&&(U=J),J-=U,_.length-=U;O[V++]=rt[K++],--U;);_.length===0&&(_.mode=21);break;case 26:if(J===0)break t;O[V++]=_.length,J--,_.mode=21;break;case 27:if(_.wrap){for(;G<32;){if(X===0)break t;X--,L|=T[j++]<<G,G+=8}if(R-=J,w.total_out+=R,_.total+=R,R&&(w.adler=_.check=_.flags?g(_.check,O,R,V-R):b(_.check,O,R,V-R)),R=J,(_.flags?L:D(L))!==_.check){w.msg="incorrect data check",_.mode=30;break}G=L=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(4294967295&_.total)){w.msg="incorrect length check",_.mode=30;break}G=L=0}_.mode=29;case 29:ut=1;break t;case 30:ut=-3;break t;case 31:return-4;case 32:default:return I}return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,(_.wsize||R!==w.avail_out&&_.mode<30&&(_.mode<27||x!==4))&&y(w,w.output,w.next_out,R-w.avail_out)?(_.mode=31,-4):(N-=w.avail_in,R-=w.avail_out,w.total_in+=N,w.total_out+=R,_.total+=R,_.wrap&&R&&(w.adler=_.check=_.flags?g(_.check,O,R,w.next_out-R):b(_.check,O,R,w.next_out-R)),w.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(N==0&&R===0||x===4)&&ut===0&&(ut=-5),ut)},m.inflateEnd=function(w){if(!w||!w.state)return I;var x=w.state;return x.window&&(x.window=null),w.state=null,0},m.inflateGetHeader=function(w,x){var _;return w&&w.state?(2&(_=w.state).wrap)==0?I:((_.head=x).done=!1,0):I},m.inflateSetDictionary=function(w,x){var _,T=x.length;return w&&w.state?(_=w.state).wrap!==0&&_.mode!==11?I:_.mode===11&&b(1,x,T,0)!==_.check?-3:y(w,x,T,T)?(_.mode=31,-4):(_.havedict=1,0):I},m.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(h,p,m){var d=h("../utils/common"),b=[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,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],S=[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,0,0],C=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];p.exports=function(I,D,z,P,B,F,W,q){var A,M,k,y,w,x,_,T,O,j=q.bits,V=0,X=0,J=0,L=0,G=0,N=0,R=0,U=0,K=0,rt=0,Z=null,et=0,ht=new d.Buf16(16),lt=new d.Buf16(16),Q=null,ot=0;for(V=0;V<=15;V++)ht[V]=0;for(X=0;X<P;X++)ht[D[z+X]]++;for(G=j,L=15;1<=L&&ht[L]===0;L--);if(L<G&&(G=L),L===0)return B[F++]=20971520,B[F++]=20971520,q.bits=1,0;for(J=1;J<L&&ht[J]===0;J++);for(G<J&&(G=J),V=U=1;V<=15;V++)if(U<<=1,(U-=ht[V])<0)return-1;if(0<U&&(I===0||L!==1))return-1;for(lt[1]=0,V=1;V<15;V++)lt[V+1]=lt[V]+ht[V];for(X=0;X<P;X++)D[z+X]!==0&&(W[lt[D[z+X]]++]=X);if(x=I===0?(Z=Q=W,19):I===1?(Z=b,et-=257,Q=g,ot-=257,256):(Z=S,Q=C,-1),V=J,w=F,R=X=rt=0,k=-1,y=(K=1<<(N=G))-1,I===1&&852<K||I===2&&592<K)return 1;for(;;){for(_=V-R,O=W[X]<x?(T=0,W[X]):W[X]>x?(T=Q[ot+W[X]],Z[et+W[X]]):(T=96,0),A=1<<V-R,J=M=1<<N;B[w+(rt>>R)+(M-=A)]=_<<24|T<<16|O|0,M!==0;);for(A=1<<V-1;rt&A;)A>>=1;if(A!==0?(rt&=A-1,rt+=A):rt=0,X++,--ht[V]==0){if(V===L)break;V=D[z+W[X]]}if(G<V&&(rt&y)!==k){for(R===0&&(R=G),w+=J,U=1<<(N=V-R);N+R<L&&!((U-=ht[N+R])<=0);)N++,U<<=1;if(K+=1<<N,I===1&&852<K||I===2&&592<K)return 1;B[k=rt&y]=G<<24|N<<16|w-F|0}}return rt!==0&&(B[w+rt]=V-R<<24|64<<16|0),q.bits=G,0}},{"../utils/common":41}],51:[function(h,p,m){p.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(h,p,m){var d=h("../utils/common");function b(Q){for(var ot=Q.length;0<=--ot;)Q[ot]=0}var g=256,S=286,C=30,I=15,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=new Array(576);b(F);var W=new Array(60);b(W);var q=new Array(512);b(q);var A=new Array(256);b(A);var M=new Array(29);b(M);var k,y,w,x=new Array(C);function _(Q,ot,nt,ut,ct){this.static_tree=Q,this.extra_bits=ot,this.extra_base=nt,this.elems=ut,this.max_length=ct,this.has_stree=Q&&Q.length}function T(Q,ot){this.dyn_tree=Q,this.max_code=0,this.stat_desc=ot}function O(Q){return Q<256?q[Q]:q[256+(Q>>>7)]}function j(Q,ot){Q.pending_buf[Q.pending++]=255&ot,Q.pending_buf[Q.pending++]=ot>>>8&255}function V(Q,ot,nt){Q.bi_valid>16-nt?(Q.bi_buf|=ot<<Q.bi_valid&65535,j(Q,Q.bi_buf),Q.bi_buf=ot>>16-Q.bi_valid,Q.bi_valid+=nt-16):(Q.bi_buf|=ot<<Q.bi_valid&65535,Q.bi_valid+=nt)}function X(Q,ot,nt){V(Q,nt[2*ot],nt[2*ot+1])}function J(Q,ot){for(var nt=0;nt|=1&Q,Q>>>=1,nt<<=1,0<--ot;);return nt>>>1}function L(Q,ot,nt){var ut,ct,ft=new Array(16),mt=0;for(ut=1;ut<=I;ut++)ft[ut]=mt=mt+nt[ut-1]<<1;for(ct=0;ct<=ot;ct++){var gt=Q[2*ct+1];gt!==0&&(Q[2*ct]=J(ft[gt]++,gt))}}function G(Q){var ot;for(ot=0;ot<S;ot++)Q.dyn_ltree[2*ot]=0;for(ot=0;ot<C;ot++)Q.dyn_dtree[2*ot]=0;for(ot=0;ot<19;ot++)Q.bl_tree[2*ot]=0;Q.dyn_ltree[512]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function N(Q){8<Q.bi_valid?j(Q,Q.bi_buf):0<Q.bi_valid&&(Q.pending_buf[Q.pending++]=Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0}function R(Q,ot,nt,ut){var ct=2*ot,ft=2*nt;return Q[ct]<Q[ft]||Q[ct]===Q[ft]&&ut[ot]<=ut[nt]}function U(Q,ot,nt){for(var ut=Q.heap[nt],ct=nt<<1;ct<=Q.heap_len&&(ct<Q.heap_len&&R(ot,Q.heap[ct+1],Q.heap[ct],Q.depth)&&ct++,!R(ot,ut,Q.heap[ct],Q.depth));)Q.heap[nt]=Q.heap[ct],nt=ct,ct<<=1;Q.heap[nt]=ut}function K(Q,ot,nt){var ut,ct,ft,mt,gt=0;if(Q.last_lit!==0)for(;ut=Q.pending_buf[Q.d_buf+2*gt]<<8|Q.pending_buf[Q.d_buf+2*gt+1],ct=Q.pending_buf[Q.l_buf+gt],gt++,ut===0?X(Q,ct,ot):(X(Q,(ft=A[ct])+g+1,ot),(mt=D[ft])!==0&&V(Q,ct-=M[ft],mt),X(Q,ft=O(--ut),nt),(mt=z[ft])!==0&&V(Q,ut-=x[ft],mt)),gt<Q.last_lit;);X(Q,256,ot)}function rt(Q,ot){var nt,ut,ct,ft=ot.dyn_tree,mt=ot.stat_desc.static_tree,gt=ot.stat_desc.has_stree,xt=ot.stat_desc.elems,Nt=-1;for(Q.heap_len=0,Q.heap_max=573,nt=0;nt<xt;nt++)ft[2*nt]!==0?(Q.heap[++Q.heap_len]=Nt=nt,Q.depth[nt]=0):ft[2*nt+1]=0;for(;Q.heap_len<2;)ft[2*(ct=Q.heap[++Q.heap_len]=Nt<2?++Nt:0)]=1,Q.depth[ct]=0,Q.opt_len--,gt&&(Q.static_len-=mt[2*ct+1]);for(ot.max_code=Nt,nt=Q.heap_len>>1;1<=nt;nt--)U(Q,ft,nt);for(ct=xt;nt=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],U(Q,ft,1),ut=Q.heap[1],Q.heap[--Q.heap_max]=nt,Q.heap[--Q.heap_max]=ut,ft[2*ct]=ft[2*nt]+ft[2*ut],Q.depth[ct]=(Q.depth[nt]>=Q.depth[ut]?Q.depth[nt]:Q.depth[ut])+1,ft[2*nt+1]=ft[2*ut+1]=ct,Q.heap[1]=ct++,U(Q,ft,1),2<=Q.heap_len;);Q.heap[--Q.heap_max]=Q.heap[1],(function(It,At){var Ut,Ht,zt,Xt,jt,Ct,$t=At.dyn_tree,qt=At.max_code,Pt=At.stat_desc.static_tree,fe=At.stat_desc.has_stree,ke=At.stat_desc.extra_bits,Yt=At.stat_desc.extra_base,we=At.stat_desc.max_length,ue=0;for(Xt=0;Xt<=I;Xt++)It.bl_count[Xt]=0;for($t[2*It.heap[It.heap_max]+1]=0,Ut=It.heap_max+1;Ut<573;Ut++)we<(Xt=$t[2*$t[2*(Ht=It.heap[Ut])+1]+1]+1)&&(Xt=we,ue++),$t[2*Ht+1]=Xt,qt<Ht||(It.bl_count[Xt]++,jt=0,Yt<=Ht&&(jt=ke[Ht-Yt]),Ct=$t[2*Ht],It.opt_len+=Ct*(Xt+jt),fe&&(It.static_len+=Ct*(Pt[2*Ht+1]+jt)));if(ue!==0){do{for(Xt=we-1;It.bl_count[Xt]===0;)Xt--;It.bl_count[Xt]--,It.bl_count[Xt+1]+=2,It.bl_count[we]--,ue-=2}while(0<ue);for(Xt=we;Xt!==0;Xt--)for(Ht=It.bl_count[Xt];Ht!==0;)qt<(zt=It.heap[--Ut])||($t[2*zt+1]!==Xt&&(It.opt_len+=(Xt-$t[2*zt+1])*$t[2*zt],$t[2*zt+1]=Xt),Ht--)}})(Q,ot),L(ft,Nt,Q.bl_count)}function Z(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ot[2*(nt+1)+1]=65535,ut=0;ut<=nt;ut++)ct=mt,mt=ot[2*(ut+1)+1],++gt<xt&&ct===mt||(gt<Nt?Q.bl_tree[2*ct]+=gt:ct!==0?(ct!==ft&&Q.bl_tree[2*ct]++,Q.bl_tree[32]++):gt<=10?Q.bl_tree[34]++:Q.bl_tree[36]++,ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4))}function et(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ut=0;ut<=nt;ut++)if(ct=mt,mt=ot[2*(ut+1)+1],!(++gt<xt&&ct===mt)){if(gt<Nt)for(;X(Q,ct,Q.bl_tree),--gt!=0;);else ct!==0?(ct!==ft&&(X(Q,ct,Q.bl_tree),gt--),X(Q,16,Q.bl_tree),V(Q,gt-3,2)):gt<=10?(X(Q,17,Q.bl_tree),V(Q,gt-3,3)):(X(Q,18,Q.bl_tree),V(Q,gt-11,7));ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4)}}b(x);var ht=!1;function lt(Q,ot,nt,ut){V(Q,0+(ut?1:0),3),(function(ct,ft,mt,gt){N(ct),j(ct,mt),j(ct,~mt),d.arraySet(ct.pending_buf,ct.window,ft,mt,ct.pending),ct.pending+=mt})(Q,ot,nt)}m._tr_init=function(Q){ht||((function(){var ot,nt,ut,ct,ft,mt=new Array(16);for(ct=ut=0;ct<28;ct++)for(M[ct]=ut,ot=0;ot<1<<D[ct];ot++)A[ut++]=ct;for(A[ut-1]=ct,ct=ft=0;ct<16;ct++)for(x[ct]=ft,ot=0;ot<1<<z[ct];ot++)q[ft++]=ct;for(ft>>=7;ct<C;ct++)for(x[ct]=ft<<7,ot=0;ot<1<<z[ct]-7;ot++)q[256+ft++]=ct;for(nt=0;nt<=I;nt++)mt[nt]=0;for(ot=0;ot<=143;)F[2*ot+1]=8,ot++,mt[8]++;for(;ot<=255;)F[2*ot+1]=9,ot++,mt[9]++;for(;ot<=279;)F[2*ot+1]=7,ot++,mt[7]++;for(;ot<=287;)F[2*ot+1]=8,ot++,mt[8]++;for(L(F,287,mt),ot=0;ot<C;ot++)W[2*ot+1]=5,W[2*ot]=J(ot,5);k=new _(F,D,257,S,I),y=new _(W,z,0,C,I),w=new _(new Array(0),P,0,19,7)})(),ht=!0),Q.l_desc=new T(Q.dyn_ltree,k),Q.d_desc=new T(Q.dyn_dtree,y),Q.bl_desc=new T(Q.bl_tree,w),Q.bi_buf=0,Q.bi_valid=0,G(Q)},m._tr_stored_block=lt,m._tr_flush_block=function(Q,ot,nt,ut){var ct,ft,mt=0;0<Q.level?(Q.strm.data_type===2&&(Q.strm.data_type=(function(gt){var xt,Nt=4093624447;for(xt=0;xt<=31;xt++,Nt>>>=1)if(1&Nt&>.dyn_ltree[2*xt]!==0)return 0;if(gt.dyn_ltree[18]!==0||gt.dyn_ltree[20]!==0||gt.dyn_ltree[26]!==0)return 1;for(xt=32;xt<g;xt++)if(gt.dyn_ltree[2*xt]!==0)return 1;return 0})(Q)),rt(Q,Q.l_desc),rt(Q,Q.d_desc),mt=(function(gt){var xt;for(Z(gt,gt.dyn_ltree,gt.l_desc.max_code),Z(gt,gt.dyn_dtree,gt.d_desc.max_code),rt(gt,gt.bl_desc),xt=18;3<=xt&>.bl_tree[2*B[xt]+1]===0;xt--);return gt.opt_len+=3*(xt+1)+5+5+4,xt})(Q),ct=Q.opt_len+3+7>>>3,(ft=Q.static_len+3+7>>>3)<=ct&&(ct=ft)):ct=ft=nt+5,nt+4<=ct&&ot!==-1?lt(Q,ot,nt,ut):Q.strategy===4||ft===ct?(V(Q,2+(ut?1:0),3),K(Q,F,W)):(V(Q,4+(ut?1:0),3),(function(gt,xt,Nt,It){var At;for(V(gt,xt-257,5),V(gt,Nt-1,5),V(gt,It-4,4),At=0;At<It;At++)V(gt,gt.bl_tree[2*B[At]+1],3);et(gt,gt.dyn_ltree,xt-1),et(gt,gt.dyn_dtree,Nt-1)})(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,mt+1),K(Q,Q.dyn_ltree,Q.dyn_dtree)),G(Q),ut&&N(Q)},m._tr_tally=function(Q,ot,nt){return Q.pending_buf[Q.d_buf+2*Q.last_lit]=ot>>>8&255,Q.pending_buf[Q.d_buf+2*Q.last_lit+1]=255&ot,Q.pending_buf[Q.l_buf+Q.last_lit]=255&nt,Q.last_lit++,ot===0?Q.dyn_ltree[2*nt]++:(Q.matches++,ot--,Q.dyn_ltree[2*(A[nt]+g+1)]++,Q.dyn_dtree[2*O(ot)]++),Q.last_lit===Q.lit_bufsize-1},m._tr_align=function(Q){V(Q,2,3),X(Q,256,F),(function(ot){ot.bi_valid===16?(j(ot,ot.bi_buf),ot.bi_buf=0,ot.bi_valid=0):8<=ot.bi_valid&&(ot.pending_buf[ot.pending++]=255&ot.bi_buf,ot.bi_buf>>=8,ot.bi_valid-=8)})(Q)}},{"../utils/common":41}],53:[function(h,p,m){p.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(h,p,m){(function(d){(function(b,g){if(!b.setImmediate){var S,C,I,D,z=1,P={},B=!1,F=b.document,W=Object.getPrototypeOf&&Object.getPrototypeOf(b);W=W&&W.setTimeout?W:b,S={}.toString.call(b.process)==="[object process]"?function(k){o.nextTick((function(){A(k)}))}:(function(){if(b.postMessage&&!b.importScripts){var k=!0,y=b.onmessage;return b.onmessage=function(){k=!1},b.postMessage("","*"),b.onmessage=y,k}})()?(D="setImmediate$"+Math.random()+"$",b.addEventListener?b.addEventListener("message",M,!1):b.attachEvent("onmessage",M),function(k){b.postMessage(D+k,"*")}):b.MessageChannel?((I=new MessageChannel).port1.onmessage=function(k){A(k.data)},function(k){I.port2.postMessage(k)}):F&&"onreadystatechange"in F.createElement("script")?(C=F.documentElement,function(k){var y=F.createElement("script");y.onreadystatechange=function(){A(k),y.onreadystatechange=null,C.removeChild(y),y=null},C.appendChild(y)}):function(k){setTimeout(A,0,k)},W.setImmediate=function(k){typeof k!="function"&&(k=new Function(""+k));for(var y=new Array(arguments.length-1),w=0;w<y.length;w++)y[w]=arguments[w+1];var x={callback:k,args:y};return P[z]=x,S(z),z++},W.clearImmediate=q}function q(k){delete P[k]}function A(k){if(B)setTimeout(A,0,k);else{var y=P[k];if(y){B=!0;try{(function(w){var x=w.callback,_=w.args;switch(_.length){case 0:x();break;case 1:x(_[0]);break;case 2:x(_[0],_[1]);break;case 3:x(_[0],_[1],_[2]);break;default:x.apply(void 0,_)}})(y)}finally{q(k),B=!1}}}}function M(k){k.source===b&&typeof k.data=="string"&&k.data.indexOf(D)===0&&A(+k.data.slice(D.length))}})(typeof self>"u"?d===void 0?this:d:self)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}))}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],t("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(t,l,c){(function(o){(function(){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source),s=typeof o=="object"&&o&&o.Object===Object&&o,e=typeof self=="object"&&self&&self.Object===Object&&self,i=s||e||Function("return this")(),u=Object.prototype.toString,a=i.Symbol,h=a?a.prototype:void 0,p=h?h.toString:void 0;function m(d){if(typeof d=="string")return d;if((function(g){return typeof g=="symbol"||(function(S){return!!S&&typeof S=="object"})(g)&&u.call(g)=="[object Symbol]"})(d))return p?p.call(d):"";var b=d+"";return b=="0"&&1/d==-1/0?"-0":b}l.exports=function(d){var b;return(d=(b=d)==null?"":m(b))&&n.test(d)?d.replace(r,"\\$&"):d}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,a=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[r]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b["[object Function]"]=b[n]=b["[object Number]"]=b[s]=b["[object RegExp]"]=b[e]=b["[object String]"]=b["[object WeakMap]"]=!1;var g=typeof o=="object"&&o&&o.Object===Object&&o,S=typeof self=="object"&&self&&self.Object===Object&&self,C=g||S||Function("return this")(),I=typeof c=="object"&&c&&!c.nodeType&&c,D=I&&typeof l=="object"&&l&&!l.nodeType&&l,z=D&&D.exports===I&&g.process,P=(function(){try{return z&&z.binding("util")}catch{}})(),B=P&&P.isTypedArray;function F(st,pt,wt,_t){for(var Bt=-1,Et=st?st.length:0;++Bt<Et;){var Rt=st[Bt];pt(_t,Rt,wt(Rt),st)}return _t}function W(st,pt){for(var wt=-1,_t=st?st.length:0;++wt<_t;)if(pt(st[wt],wt,st))return!0;return!1}function q(st){var pt=!1;if(st!=null&&typeof st.toString!="function")try{pt=!!(st+"")}catch{}return pt}function A(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t,Bt){wt[++pt]=[Bt,_t]})),wt}function M(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t){wt[++pt]=_t})),wt}var k,y,w,x=Array.prototype,_=Function.prototype,T=Object.prototype,O=C["__core-js_shared__"],j=(k=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",V=_.toString,X=T.hasOwnProperty,J=T.toString,L=RegExp("^"+V.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=C.Symbol,N=C.Uint8Array,R=T.propertyIsEnumerable,U=x.splice,K=(y=Object.keys,w=Object,function(st){return y(w(st))}),rt=Qt(C,"DataView"),Z=Qt(C,"Map"),et=Qt(C,"Promise"),ht=Qt(C,"Set"),lt=Qt(C,"WeakMap"),Q=Qt(Object,"create"),ot=dt(rt),nt=dt(Z),ut=dt(et),ct=dt(ht),ft=dt(lt),mt=G?G.prototype:void 0,gt=mt?mt.valueOf:void 0,xt=mt?mt.toString:void 0;function Nt(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function It(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function At(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function Ut(st){var pt=-1,wt=st?st.length:0;for(this.__data__=new At;++pt<wt;)this.add(st[pt])}function Ht(st){this.__data__=new It(st)}function zt(st,pt){var wt=Zt(st)||ee(st)?(function(Rt,ge){for(var oe=-1,he=Array(Rt);++oe<Rt;)he[oe]=ge(oe);return he})(st.length,String):[],_t=wt.length,Bt=!!_t;for(var Et in st)!X.call(st,Et)||Bt&&(Et=="length"||Te(Et,_t))||wt.push(Et);return wt}function Xt(st,pt){for(var wt=st.length;wt--;)if(Mt(st[wt][0],pt))return wt;return-1}function jt(st,pt,wt,_t){return $t(st,(function(Bt,Et,Rt){pt(_t,Bt,wt(Bt),Rt)})),_t}Nt.prototype.clear=function(){this.__data__=Q?Q(null):{}},Nt.prototype.delete=function(st){return this.has(st)&&delete this.__data__[st]},Nt.prototype.get=function(st){var pt=this.__data__;if(Q){var wt=pt[st];return wt==="__lodash_hash_undefined__"?void 0:wt}return X.call(pt,st)?pt[st]:void 0},Nt.prototype.has=function(st){var pt=this.__data__;return Q?pt[st]!==void 0:X.call(pt,st)},Nt.prototype.set=function(st,pt){return this.__data__[st]=Q&&pt===void 0?"__lodash_hash_undefined__":pt,this},It.prototype.clear=function(){this.__data__=[]},It.prototype.delete=function(st){var pt=this.__data__,wt=Xt(pt,st);return!(wt<0)&&(wt==pt.length-1?pt.pop():U.call(pt,wt,1),!0)},It.prototype.get=function(st){var pt=this.__data__,wt=Xt(pt,st);return wt<0?void 0:pt[wt][1]},It.prototype.has=function(st){return Xt(this.__data__,st)>-1},It.prototype.set=function(st,pt){var wt=this.__data__,_t=Xt(wt,st);return _t<0?wt.push([st,pt]):wt[_t][1]=pt,this},At.prototype.clear=function(){this.__data__={hash:new Nt,map:new(Z||It),string:new Nt}},At.prototype.delete=function(st){return xe(this,st).delete(st)},At.prototype.get=function(st){return xe(this,st).get(st)},At.prototype.has=function(st){return xe(this,st).has(st)},At.prototype.set=function(st,pt){return xe(this,st).set(st,pt),this},Ut.prototype.add=Ut.prototype.push=function(st){return this.__data__.set(st,"__lodash_hash_undefined__"),this},Ut.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.clear=function(){this.__data__=new It},Ht.prototype.delete=function(st){return this.__data__.delete(st)},Ht.prototype.get=function(st){return this.__data__.get(st)},Ht.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.set=function(st,pt){var wt=this.__data__;if(wt instanceof It){var _t=wt.__data__;if(!Z||_t.length<199)return _t.push([st,pt]),this;wt=this.__data__=new At(_t)}return wt.set(st,pt),this};var Ct,$t=(Ct=function(st,pt){return st&&qt(st,pt,er)},function(st,pt){if(st==null)return st;if(!Vt(st))return Ct(st,pt);for(var wt=st.length,_t=-1,Bt=Object(st);++_t<wt&&pt(Bt[_t],_t,Bt)!==!1;);return st}),qt=(function(st){return function(pt,wt,_t){for(var Bt=-1,Et=Object(pt),Rt=_t(pt),ge=Rt.length;ge--;){var oe=Rt[++Bt];if(wt(Et[oe],oe,Et)===!1)break}return pt}})();function Pt(st,pt){for(var wt=0,_t=(pt=te(pt,st)?[pt]:se(pt)).length;st!=null&&wt<_t;)st=st[at(pt[wt++])];return wt&&wt==_t?st:void 0}function fe(st,pt){return st!=null&&pt in Object(st)}function ke(st,pt,wt,_t,Bt){return st===pt||(st==null||pt==null||!le(st)&&!ze(pt)?st!=st&&pt!=pt:(function(Et,Rt,ge,oe,he,Jt){var Ce=Zt(Et),Ee=Zt(Rt),Me="[object Array]",qe="[object Array]";Ce||(Me=(Me=be(Et))==r?s:Me),Ee||(qe=(qe=be(Rt))==r?s:qe);var ir=Me==s&&!q(Et),mr=qe==s&&!q(Rt),Yr=Me==qe;if(Yr&&!ir)return Jt||(Jt=new Ht),Ce||tr(Et)?je(Et,Rt,ge,oe,he,Jt):(function(Ae,ye,Ks,Ei,Jc,Or,Ss){switch(Ks){case"[object DataView]":if(Ae.byteLength!=ye.byteLength||Ae.byteOffset!=ye.byteOffset)return!1;Ae=Ae.buffer,ye=ye.buffer;case"[object ArrayBuffer]":return!(Ae.byteLength!=ye.byteLength||!Ei(new N(Ae),new N(ye)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Mt(+Ae,+ye);case"[object Error]":return Ae.name==ye.name&&Ae.message==ye.message;case"[object RegExp]":case"[object String]":return Ae==ye+"";case n:var Zs=A;case e:var jl=2⩔if(Zs||(Zs=M),Ae.size!=ye.size&&!jl)return!1;var Qc=Ss.get(Ae);if(Qc)return Qc==ye;Or|=1,Ss.set(Ae,ye);var Yn=je(Zs(Ae),Zs(ye),Ei,Jc,Or,Ss);return Ss.delete(Ae),Yn;case"[object Symbol]":if(gt)return gt.call(Ae)==gt.call(ye)}return!1})(Et,Rt,Me,ge,oe,he,Jt);if(!(2&he)){var Ci=ir&&X.call(Et,"__wrapped__"),Vn=mr&&X.call(Rt,"__wrapped__");if(Ci||Vn){var Wn=Ci?Et.value():Et,Xn=Vn?Rt.value():Rt;return Jt||(Jt=new Ht),ge(Wn,Xn,oe,he,Jt)}}return Yr?(Jt||(Jt=new Ht),(function(Ae,ye,Ks,Ei,Jc,Or){var Ss=2&Jc,Zs=er(Ae),jl=Zs.length,Qc=er(ye).length;if(jl!=Qc&&!Ss)return!1;for(var Yn=jl;Yn--;){var Js=Zs[Yn];if(!(Ss?Js in ye:X.call(ye,Js)))return!1}var Tu=Or.get(Ae);if(Tu&&Or.get(ye))return Tu==ye;var tu=!0;Or.set(Ae,ye),Or.set(ye,Ae);for(var bu=Ss;++Yn<jl;){Js=Zs[Yn];var eu=Ae[Js],ru=ye[Js];if(Ei)var Ru=Ss?Ei(ru,eu,Js,ye,Ae,Or):Ei(eu,ru,Js,Ae,ye,Or);if(!(Ru===void 0?eu===ru||Ks(eu,ru,Ei,Jc,Or):Ru)){tu=!1;break}bu||(bu=Js=="constructor")}if(tu&&!bu){var su=Ae.constructor,iu=ye.constructor;su==iu||!("constructor"in Ae)||!("constructor"in ye)||typeof su=="function"&&su instanceof su&&typeof iu=="function"&&iu instanceof iu||(tu=!1)}return Or.delete(Ae),Or.delete(ye),tu})(Et,Rt,ge,oe,he,Jt)):!1})(st,pt,ke,wt,_t,Bt))}function Yt(st){return!(!le(st)||(function(pt){return!!j&&j in pt})(st))&&(ie(st)||q(st)?L:m).test(dt(st))}function we(st){return typeof st=="function"?st:st==null?xr:typeof st=="object"?Zt(st)?(function(_t,Bt){return te(_t)&&_e(Bt)?Re(at(_t),Bt):function(Et){var Rt=(function(ge,oe,he){var Jt=ge==null?void 0:Pt(ge,oe);return Jt===void 0?he:Jt})(Et,_t);return Rt===void 0&&Rt===Bt?(function(ge,oe){return ge!=null&&(function(he,Jt,Ce){Jt=te(Jt,he)?[Jt]:se(Jt);for(var Ee,Me=-1,qe=Jt.length;++Me<qe;){var ir=at(Jt[Me]);if(!(Ee=he!=null&&Ce(he,ir)))break;he=he[ir]}return Ee||!!(qe=he?he.length:0)&&re(qe)&&Te(ir,qe)&&(Zt(he)||ee(he))})(ge,oe,fe)})(Et,_t):ke(Bt,Rt,void 0,3)}})(st[0],st[1]):(function(_t){var Bt=(function(Et){for(var Rt=er(Et),ge=Rt.length;ge--;){var oe=Rt[ge],he=Et[oe];Rt[ge]=[oe,he,_e(he)]}return Rt})(_t);return Bt.length==1&&Bt[0][2]?Re(Bt[0][0],Bt[0][1]):function(Et){return Et===_t||(function(Rt,ge,oe,he){var Jt=oe.length,Ce=Jt;if(Rt==null)return!Ce;for(Rt=Object(Rt);Jt--;){var Ee=oe[Jt];if(Ee[2]?Ee[1]!==Rt[Ee[0]]:!(Ee[0]in Rt))return!1}for(;++Jt<Ce;){var Me=(Ee=oe[Jt])[0],qe=Rt[Me],ir=Ee[1];if(Ee[2]){if(qe===void 0&&!(Me in Rt))return!1}else{var mr=new Ht,Yr;if(!(Yr===void 0?ke(ir,qe,he,3,mr):Yr))return!1}}return!0})(Et,_t,Bt)}})(st):te(pt=st)?(wt=at(pt),function(_t){return _t==null?void 0:_t[wt]}):(function(_t){return function(Bt){return Pt(Bt,_t)}})(pt);var pt,wt}function ue(st){if(wt=(pt=st)&&pt.constructor,_t=typeof wt=="function"&&wt.prototype||T,pt!==_t)return K(st);var pt,wt,_t,Bt=[];for(var Et in Object(st))X.call(st,Et)&&Et!="constructor"&&Bt.push(Et);return Bt}function se(st){return Zt(st)?st:ne(st)}function je(st,pt,wt,_t,Bt,Et){var Rt=2&Bt,ge=st.length,oe=pt.length;if(ge!=oe&&!(Rt&&oe>ge))return!1;var he=Et.get(st);if(he&&Et.get(pt))return he==pt;var Jt=-1,Ce=!0,Ee=1&Bt?new Ut:void 0;for(Et.set(st,pt),Et.set(pt,st);++Jt<ge;){var Me=st[Jt],qe=pt[Jt];if(_t)var ir=Rt?_t(qe,Me,Jt,pt,st,Et):_t(Me,qe,Jt,st,pt,Et);if(ir!==void 0){if(ir)continue;Ce=!1;break}if(Ee){if(!W(pt,(function(mr,Yr){if(!Ee.has(Yr)&&(Me===mr||wt(Me,mr,_t,Bt,Et)))return Ee.add(Yr)}))){Ce=!1;break}}else if(Me!==qe&&!wt(Me,qe,_t,Bt,Et)){Ce=!1;break}}return Et.delete(st),Et.delete(pt),Ce}function xe(st,pt){var wt,_t,Bt=st.__data__;return((_t=typeof(wt=pt))=="string"||_t=="number"||_t=="symbol"||_t=="boolean"?wt!=="__proto__":wt===null)?Bt[typeof pt=="string"?"string":"hash"]:Bt.map}function Qt(st,pt){var wt=(function(_t,Bt){return _t==null?void 0:_t[Bt]})(st,pt);return Yt(wt)?wt:void 0}var be=function(st){return J.call(st)};function Te(st,pt){return!!(pt=pt??9007199254740991)&&(typeof st=="number"||d.test(st))&&st>-1&&st%1==0&&st<pt}function te(st,pt){if(Zt(st))return!1;var wt=typeof st;return!(wt!="number"&&wt!="symbol"&&wt!="boolean"&&st!=null&&!$e(st))||u.test(st)||!i.test(st)||pt!=null&&st in Object(pt)}function _e(st){return st==st&&!le(st)}function Re(st,pt){return function(wt){return wt!=null&&wt[st]===pt&&(pt!==void 0||st in Object(wt))}}(rt&&be(new rt(new ArrayBuffer(1)))!="[object DataView]"||Z&&be(new Z)!=n||et&&be(et.resolve())!="[object Promise]"||ht&&be(new ht)!=e||lt&&be(new lt)!="[object WeakMap]")&&(be=function(st){var pt=J.call(st),wt=pt==s?st.constructor:void 0,_t=wt?dt(wt):void 0;if(_t)switch(_t){case ot:return"[object DataView]";case nt:return n;case ut:return"[object Promise]";case ct:return e;case ft:return"[object WeakMap]"}return pt});var ne=Kt((function(st){var pt;st=(pt=st)==null?"":(function(_t){if(typeof _t=="string")return _t;if($e(_t))return xt?xt.call(_t):"";var Bt=_t+"";return Bt=="0"&&1/_t==-1/0?"-0":Bt})(pt);var wt=[];return a.test(st)&&wt.push(""),st.replace(h,(function(_t,Bt,Et,Rt){wt.push(Et?Rt.replace(p,"$1"):Bt||_t)})),wt}));function at(st){if(typeof st=="string"||$e(st))return st;var pt=st+"";return pt=="0"&&1/st==-1/0?"-0":pt}function dt(st){if(st!=null){try{return V.call(st)}catch{}try{return st+""}catch{}}return""}var bt,Tt=(bt=function(st,pt,wt){X.call(st,wt)?st[wt].push(pt):st[wt]=[pt]},function(st,pt){var wt=Zt(st)?F:jt,_t={};return wt(st,bt,we(pt),_t)});function Kt(st,pt){if(typeof st!="function"||pt&&typeof pt!="function")throw new TypeError("Expected a function");var wt=function(){var _t=arguments,Bt=pt?pt.apply(this,_t):_t[0],Et=wt.cache;if(Et.has(Bt))return Et.get(Bt);var Rt=st.apply(this,_t);return wt.cache=Et.set(Bt,Rt),Rt};return wt.cache=new(Kt.Cache||At),wt}function Mt(st,pt){return st===pt||st!=st&&pt!=pt}function ee(st){return(function(pt){return ze(pt)&&Vt(pt)})(st)&&X.call(st,"callee")&&(!R.call(st,"callee")||J.call(st)==r)}Kt.Cache=At;var Zt=Array.isArray;function Vt(st){return st!=null&&re(st.length)&&!ie(st)}function ie(st){var pt=le(st)?J.call(st):"";return pt=="[object Function]"||pt=="[object GeneratorFunction]"}function re(st){return typeof st=="number"&&st>-1&&st%1==0&&st<=9007199254740991}function le(st){var pt=typeof st;return!!st&&(pt=="object"||pt=="function")}function ze(st){return!!st&&typeof st=="object"}function $e(st){return typeof st=="symbol"||ze(st)&&J.call(st)=="[object Symbol]"}var tr=B?(function(st){return function(pt){return st(pt)}})(B):function(st){return ze(st)&&re(st.length)&&!!b[J.call(st)]};function er(st){return Vt(st)?zt(st):ue(st)}function xr(st){return st}l.exports=Tt}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(t,l,c){var o=Object.prototype.toString;l.exports=function(r){return r===!0||r===!1||(function(n){return!!n&&typeof n=="object"})(r)&&o.call(r)=="[object Boolean]"}},{}],445:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a[r]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a[n]=a["[object Number]"]=a[s]=a["[object RegExp]"]=a[e]=a["[object String]"]=a["[object WeakMap]"]=!1;var h=typeof o=="object"&&o&&o.Object===Object&&o,p=typeof self=="object"&&self&&self.Object===Object&&self,m=h||p||Function("return this")(),d=typeof c=="object"&&c&&!c.nodeType&&c,b=d&&typeof l=="object"&&l&&!l.nodeType&&l,g=b&&b.exports===d,S=g&&h.process,C=(function(){try{return S&&S.binding&&S.binding("util")}catch{}})(),I=C&&C.isTypedArray;function D(at,dt){for(var bt=-1,Tt=at==null?0:at.length;++bt<Tt;)if(dt(at[bt],bt,at))return!0;return!1}function z(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt,Kt){bt[++dt]=[Kt,Tt]})),bt}function P(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt){bt[++dt]=Tt})),bt}var B,F,W,q=Array.prototype,A=Function.prototype,M=Object.prototype,k=m["__core-js_shared__"],y=A.toString,w=M.hasOwnProperty,x=(B=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"",_=M.toString,T=RegExp("^"+y.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=g?m.Buffer:void 0,j=m.Symbol,V=m.Uint8Array,X=M.propertyIsEnumerable,J=q.splice,L=j?j.toStringTag:void 0,G=Object.getOwnPropertySymbols,N=O?O.isBuffer:void 0,R=(F=Object.keys,W=Object,function(at){return F(W(at))}),U=fe(m,"DataView"),K=fe(m,"Map"),rt=fe(m,"Promise"),Z=fe(m,"Set"),et=fe(m,"WeakMap"),ht=fe(Object,"create"),lt=ue(U),Q=ue(K),ot=ue(rt),nt=ue(Z),ut=ue(et),ct=j?j.prototype:void 0,ft=ct?ct.valueOf:void 0;function mt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function gt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function xt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function Nt(at){var dt=-1,bt=at==null?0:at.length;for(this.__data__=new xt;++dt<bt;)this.add(at[dt])}function It(at){var dt=this.__data__=new gt(at);this.size=dt.size}function At(at,dt){var bt=xe(at),Tt=!bt&&je(at),Kt=!bt&&!Tt&&Qt(at),Mt=!bt&&!Tt&&!Kt&&Re(at),ee=bt||Tt||Kt||Mt,Zt=ee?(function(re,le){for(var ze=-1,$e=Array(re);++ze<re;)$e[ze]=le(ze);return $e})(at.length,String):[],Vt=Zt.length;for(var ie in at)!w.call(at,ie)||ee&&(ie=="length"||Kt&&(ie=="offset"||ie=="parent")||Mt&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||we(ie,Vt))||Zt.push(ie);return Zt}function Ut(at,dt){for(var bt=at.length;bt--;)if(se(at[bt][0],dt))return bt;return-1}function Ht(at){return at==null?at===void 0?"[object Undefined]":"[object Null]":L&&L in Object(at)?(function(dt){var bt=w.call(dt,L),Tt=dt[L];try{dt[L]=void 0;var Kt=!0}catch{}var Mt=_.call(dt);return Kt&&(bt?dt[L]=Tt:delete dt[L]),Mt})(at):(function(dt){return _.call(dt)})(at)}function zt(at){return _e(at)&&Ht(at)==r}function Xt(at,dt,bt,Tt,Kt){return at===dt||(at==null||dt==null||!_e(at)&&!_e(dt)?at!=at&&dt!=dt:(function(Mt,ee,Zt,Vt,ie,re){var le=xe(Mt),ze=xe(ee),$e=le?"[object Array]":Yt(Mt),tr=ze?"[object Array]":Yt(ee),er=($e=$e==r?s:$e)==s,xr=(tr=tr==r?s:tr)==s,st=$e==tr;if(st&&Qt(Mt)){if(!Qt(ee))return!1;le=!0,er=!1}if(st&&!er)return re||(re=new It),le||Re(Mt)?$t(Mt,ee,Zt,Vt,ie,re):(function(Et,Rt,ge,oe,he,Jt,Ce){switch(ge){case"[object DataView]":if(Et.byteLength!=Rt.byteLength||Et.byteOffset!=Rt.byteOffset)return!1;Et=Et.buffer,Rt=Rt.buffer;case"[object ArrayBuffer]":return!(Et.byteLength!=Rt.byteLength||!Jt(new V(Et),new V(Rt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return se(+Et,+Rt);case"[object Error]":return Et.name==Rt.name&&Et.message==Rt.message;case"[object RegExp]":case"[object String]":return Et==Rt+"";case n:var Ee=z;case e:var Me=1&oe;if(Ee||(Ee=P),Et.size!=Rt.size&&!Me)return!1;var qe=Ce.get(Et);if(qe)return qe==Rt;oe|=2,Ce.set(Et,Rt);var ir=$t(Ee(Et),Ee(Rt),oe,he,Jt,Ce);return Ce.delete(Et),ir;case"[object Symbol]":if(ft)return ft.call(Et)==ft.call(Rt)}return!1})(Mt,ee,$e,Zt,Vt,ie,re);if(!(1&Zt)){var pt=er&&w.call(Mt,"__wrapped__"),wt=xr&&w.call(ee,"__wrapped__");if(pt||wt){var _t=pt?Mt.value():Mt,Bt=wt?ee.value():ee;return re||(re=new It),ie(_t,Bt,Zt,Vt,re)}}return st?(re||(re=new It),(function(Et,Rt,ge,oe,he,Jt){var Ce=1&ge,Ee=qt(Et),Me=Ee.length,qe=qt(Rt).length;if(Me!=qe&&!Ce)return!1;for(var ir=Me;ir--;){var mr=Ee[ir];if(!(Ce?mr in Rt:w.call(Rt,mr)))return!1}var Yr=Jt.get(Et);if(Yr&&Jt.get(Rt))return Yr==Rt;var Ci=!0;Jt.set(Et,Rt),Jt.set(Rt,Et);for(var Vn=Ce;++ir<Me;){mr=Ee[ir];var Wn=Et[mr],Xn=Rt[mr];if(oe)var Ae=Ce?oe(Xn,Wn,mr,Rt,Et,Jt):oe(Wn,Xn,mr,Et,Rt,Jt);if(!(Ae===void 0?Wn===Xn||he(Wn,Xn,ge,oe,Jt):Ae)){Ci=!1;break}Vn||(Vn=mr=="constructor")}if(Ci&&!Vn){var ye=Et.constructor,Ks=Rt.constructor;ye==Ks||!("constructor"in Et)||!("constructor"in Rt)||typeof ye=="function"&&ye instanceof ye&&typeof Ks=="function"&&Ks instanceof Ks||(Ci=!1)}return Jt.delete(Et),Jt.delete(Rt),Ci})(Mt,ee,Zt,Vt,ie,re)):!1})(at,dt,bt,Tt,Xt,Kt))}function jt(at){return!(!te(at)||(function(dt){return!!x&&x in dt})(at))&&(be(at)?T:i).test(ue(at))}function Ct(at){if(bt=(dt=at)&&dt.constructor,Tt=typeof bt=="function"&&bt.prototype||M,dt!==Tt)return R(at);var dt,bt,Tt,Kt=[];for(var Mt in Object(at))w.call(at,Mt)&&Mt!="constructor"&&Kt.push(Mt);return Kt}function $t(at,dt,bt,Tt,Kt,Mt){var ee=1&bt,Zt=at.length,Vt=dt.length;if(Zt!=Vt&&!(ee&&Vt>Zt))return!1;var ie=Mt.get(at);if(ie&&Mt.get(dt))return ie==dt;var re=-1,le=!0,ze=2&bt?new Nt:void 0;for(Mt.set(at,dt),Mt.set(dt,at);++re<Zt;){var $e=at[re],tr=dt[re];if(Tt)var er=ee?Tt(tr,$e,re,dt,at,Mt):Tt($e,tr,re,at,dt,Mt);if(er!==void 0){if(er)continue;le=!1;break}if(ze){if(!D(dt,(function(xr,st){if(pt=st,!ze.has(pt)&&($e===xr||Kt($e,xr,bt,Tt,Mt)))return ze.push(st);var pt}))){le=!1;break}}else if($e!==tr&&!Kt($e,tr,bt,Tt,Mt)){le=!1;break}}return Mt.delete(at),Mt.delete(dt),le}function qt(at){return(function(dt,bt,Tt){var Kt=bt(dt);return xe(dt)?Kt:(function(Mt,ee){for(var Zt=-1,Vt=ee.length,ie=Mt.length;++Zt<Vt;)Mt[ie+Zt]=ee[Zt];return Mt})(Kt,Tt(dt))})(at,ne,ke)}function Pt(at,dt){var bt,Tt,Kt=at.__data__;return((Tt=typeof(bt=dt))=="string"||Tt=="number"||Tt=="symbol"||Tt=="boolean"?bt!=="__proto__":bt===null)?Kt[typeof dt=="string"?"string":"hash"]:Kt.map}function fe(at,dt){var bt=(function(Tt,Kt){return Tt==null?void 0:Tt[Kt]})(at,dt);return jt(bt)?bt:void 0}mt.prototype.clear=function(){this.__data__=ht?ht(null):{},this.size=0},mt.prototype.delete=function(at){var dt=this.has(at)&&delete this.__data__[at];return this.size-=dt?1:0,dt},mt.prototype.get=function(at){var dt=this.__data__;if(ht){var bt=dt[at];return bt==="__lodash_hash_undefined__"?void 0:bt}return w.call(dt,at)?dt[at]:void 0},mt.prototype.has=function(at){var dt=this.__data__;return ht?dt[at]!==void 0:w.call(dt,at)},mt.prototype.set=function(at,dt){var bt=this.__data__;return this.size+=this.has(at)?0:1,bt[at]=ht&&dt===void 0?"__lodash_hash_undefined__":dt,this},gt.prototype.clear=function(){this.__data__=[],this.size=0},gt.prototype.delete=function(at){var dt=this.__data__,bt=Ut(dt,at);return!(bt<0)&&(bt==dt.length-1?dt.pop():J.call(dt,bt,1),--this.size,!0)},gt.prototype.get=function(at){var dt=this.__data__,bt=Ut(dt,at);return bt<0?void 0:dt[bt][1]},gt.prototype.has=function(at){return Ut(this.__data__,at)>-1},gt.prototype.set=function(at,dt){var bt=this.__data__,Tt=Ut(bt,at);return Tt<0?(++this.size,bt.push([at,dt])):bt[Tt][1]=dt,this},xt.prototype.clear=function(){this.size=0,this.__data__={hash:new mt,map:new(K||gt),string:new mt}},xt.prototype.delete=function(at){var dt=Pt(this,at).delete(at);return this.size-=dt?1:0,dt},xt.prototype.get=function(at){return Pt(this,at).get(at)},xt.prototype.has=function(at){return Pt(this,at).has(at)},xt.prototype.set=function(at,dt){var bt=Pt(this,at),Tt=bt.size;return bt.set(at,dt),this.size+=bt.size==Tt?0:1,this},Nt.prototype.add=Nt.prototype.push=function(at){return this.__data__.set(at,"__lodash_hash_undefined__"),this},Nt.prototype.has=function(at){return this.__data__.has(at)},It.prototype.clear=function(){this.__data__=new gt,this.size=0},It.prototype.delete=function(at){var dt=this.__data__,bt=dt.delete(at);return this.size=dt.size,bt},It.prototype.get=function(at){return this.__data__.get(at)},It.prototype.has=function(at){return this.__data__.has(at)},It.prototype.set=function(at,dt){var bt=this.__data__;if(bt instanceof gt){var Tt=bt.__data__;if(!K||Tt.length<199)return Tt.push([at,dt]),this.size=++bt.size,this;bt=this.__data__=new xt(Tt)}return bt.set(at,dt),this.size=bt.size,this};var ke=G?function(at){return at==null?[]:(at=Object(at),(function(dt,bt){for(var Tt=-1,Kt=dt==null?0:dt.length,Mt=0,ee=[];++Tt<Kt;){var Zt=dt[Tt];bt(Zt,Tt,dt)&&(ee[Mt++]=Zt)}return ee})(G(at),(function(dt){return X.call(at,dt)})))}:function(){return[]},Yt=Ht;function we(at,dt){return!!(dt=dt??9007199254740991)&&(typeof at=="number"||u.test(at))&&at>-1&&at%1==0&&at<dt}function ue(at){if(at!=null){try{return y.call(at)}catch{}try{return at+""}catch{}}return""}function se(at,dt){return at===dt||at!=at&&dt!=dt}(U&&Yt(new U(new ArrayBuffer(1)))!="[object DataView]"||K&&Yt(new K)!=n||rt&&Yt(rt.resolve())!="[object Promise]"||Z&&Yt(new Z)!=e||et&&Yt(new et)!="[object WeakMap]")&&(Yt=function(at){var dt=Ht(at),bt=dt==s?at.constructor:void 0,Tt=bt?ue(bt):"";if(Tt)switch(Tt){case lt:return"[object DataView]";case Q:return n;case ot:return"[object Promise]";case nt:return e;case ut:return"[object WeakMap]"}return dt});var je=zt((function(){return arguments})())?zt:function(at){return _e(at)&&w.call(at,"callee")&&!X.call(at,"callee")},xe=Array.isArray,Qt=N||function(){return!1};function be(at){if(!te(at))return!1;var dt=Ht(at);return dt=="[object Function]"||dt=="[object GeneratorFunction]"||dt=="[object AsyncFunction]"||dt=="[object Proxy]"}function Te(at){return typeof at=="number"&&at>-1&&at%1==0&&at<=9007199254740991}function te(at){var dt=typeof at;return at!=null&&(dt=="object"||dt=="function")}function _e(at){return at!=null&&typeof at=="object"}var Re=I?(function(at){return function(dt){return at(dt)}})(I):function(at){return _e(at)&&Te(at.length)&&!!a[Ht(at)]};function ne(at){return(dt=at)!=null&&Te(dt.length)&&!be(dt)?At(at):Ct(at);var dt}l.exports=function(at,dt){return Xt(at,dt)}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(t,l,c){(function(o){(function(){var r=typeof o=="object"&&o&&o.Object===Object&&o,n=typeof self=="object"&&self&&self.Object===Object&&self,s=r||n||Function("return this")(),e=Object.prototype,i=e.hasOwnProperty,u=e.toString,a=s.Symbol,h=a?a.toStringTag:void 0;function p(m){return m==null?m===void 0?"[object Undefined]":"[object Null]":h&&h in Object(m)?(function(d){var b=i.call(d,h),g=d[h];try{d[h]=void 0;var S=!0}catch{}var C=u.call(d);return S&&(b?d[h]=g:delete d[h]),C})(m):(function(d){return u.call(d)})(m)}l.exports=function(m){if(!(function(b){var g=typeof b;return b!=null&&(g=="object"||g=="function")})(m))return!1;var d=p(m);return d=="[object Function]"||d=="[object GeneratorFunction]"||d=="[object AsyncFunction]"||d=="[object Proxy]"}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(t,l,c){l.exports=function(o){return o==null}},{}],448:[function(t,l,c){l.exports=function(o){return o===void 0}},{}],449:[function(t,l,c){(function(o){(function(){var r=/^\[object .+?Constructor\]$/,n=typeof o=="object"&&o&&o.Object===Object&&o,s=typeof self=="object"&&self&&self.Object===Object&&self,e=n||s||Function("return this")();function i(j,V){return!!(j&&j.length)&&(function(X,J,L){if(J!=J)return(function(R,U,K,rt){for(var Z=R.length,et=K+-1;++et<Z;)if(U(R[et],et,R))return et;return-1})(X,u,L);for(var G=L-1,N=X.length;++G<N;)if(X[G]===J)return G;return-1})(j,V,0)>-1}function u(j){return j!=j}function a(j,V){return j.has(V)}function h(j){var V=-1,X=Array(j.size);return j.forEach((function(J){X[++V]=J})),X}var p,m=Array.prototype,d=Function.prototype,b=Object.prototype,g=e["__core-js_shared__"],S=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",C=d.toString,I=b.hasOwnProperty,D=b.toString,z=RegExp("^"+C.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.splice,B=T(e,"Map"),F=T(e,"Set"),W=T(Object,"create");function q(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function A(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function M(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function k(j){var V=-1,X=j?j.length:0;for(this.__data__=new M;++V<X;)this.add(j[V])}function y(j,V){for(var X,J,L=j.length;L--;)if((X=j[L][0])===(J=V)||X!=X&&J!=J)return L;return-1}function w(j){return!(!O(j)||(V=j,S&&S in V))&&((function(X){var J=O(X)?D.call(X):"";return J=="[object Function]"||J=="[object GeneratorFunction]"})(j)||(function(X){var J=!1;if(X!=null&&typeof X.toString!="function")try{J=!!(X+"")}catch{}return J})(j)?z:r).test((function(X){if(X!=null){try{return C.call(X)}catch{}try{return X+""}catch{}}return""})(j));var V}q.prototype.clear=function(){this.__data__=W?W(null):{}},q.prototype.delete=function(j){return this.has(j)&&delete this.__data__[j]},q.prototype.get=function(j){var V=this.__data__;if(W){var X=V[j];return X==="__lodash_hash_undefined__"?void 0:X}return I.call(V,j)?V[j]:void 0},q.prototype.has=function(j){var V=this.__data__;return W?V[j]!==void 0:I.call(V,j)},q.prototype.set=function(j,V){return this.__data__[j]=W&&V===void 0?"__lodash_hash_undefined__":V,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(j){var V=this.__data__,X=y(V,j);return!(X<0)&&(X==V.length-1?V.pop():P.call(V,X,1),!0)},A.prototype.get=function(j){var V=this.__data__,X=y(V,j);return X<0?void 0:V[X][1]},A.prototype.has=function(j){return y(this.__data__,j)>-1},A.prototype.set=function(j,V){var X=this.__data__,J=y(X,j);return J<0?X.push([j,V]):X[J][1]=V,this},M.prototype.clear=function(){this.__data__={hash:new q,map:new(B||A),string:new q}},M.prototype.delete=function(j){return _(this,j).delete(j)},M.prototype.get=function(j){return _(this,j).get(j)},M.prototype.has=function(j){return _(this,j).has(j)},M.prototype.set=function(j,V){return _(this,j).set(j,V),this},k.prototype.add=k.prototype.push=function(j){return this.__data__.set(j,"__lodash_hash_undefined__"),this},k.prototype.has=function(j){return this.__data__.has(j)};var x=F&&1/h(new F([,-0]))[1]==1/0?function(j){return new F(j)}:function(){};function _(j,V){var X,J,L=j.__data__;return((J=typeof(X=V))=="string"||J=="number"||J=="symbol"||J=="boolean"?X!=="__proto__":X===null)?L[typeof V=="string"?"string":"hash"]:L.map}function T(j,V){var X=(function(J,L){return J==null?void 0:J[L]})(j,V);return w(X)?X:void 0}function O(j){var V=typeof j;return!!j&&(V=="object"||V=="function")}l.exports=function(j){return j&&j.length?(function(V,X,J){var L=-1,G=i,N=V.length,R=!0,U=[],K=U;if(N>=200){var rt=x(V);if(rt)return h(rt);R=!1,G=a,K=new k}else K=U;t:for(;++L<N;){var Z=V[L],et=Z;if(Z=Z!==0?Z:0,R&&et==et){for(var ht=K.length;ht--;)if(K[ht]===et)continue t;U.push(Z)}else G(K,et,J)||(K!==U&&K.push(et),U.push(Z))}return U})(j):[]}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(t,l,c){var o=t("inherits"),r=t("hash-base"),n=t("safe-buffer").Buffer,s=new Array(16);function e(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(m,d){return m<<d|m>>>32-d}function u(m,d,b,g,S,C,I){return i(m+(d&b|~d&g)+S+C|0,I)+d|0}function a(m,d,b,g,S,C,I){return i(m+(d&g|b&~g)+S+C|0,I)+d|0}function h(m,d,b,g,S,C,I){return i(m+(d^b^g)+S+C|0,I)+d|0}function p(m,d,b,g,S,C,I){return i(m+(b^(d|~g))+S+C|0,I)+d|0}o(e,r),e.prototype._update=function(){for(var m=s,d=0;d<16;++d)m[d]=this._block.readInt32LE(4*d);var b=this._a,g=this._b,S=this._c,C=this._d;b=u(b,g,S,C,m[0],3614090360,7),C=u(C,b,g,S,m[1],3905402710,12),S=u(S,C,b,g,m[2],606105819,17),g=u(g,S,C,b,m[3],3250441966,22),b=u(b,g,S,C,m[4],4118548399,7),C=u(C,b,g,S,m[5],1200080426,12),S=u(S,C,b,g,m[6],2821735955,17),g=u(g,S,C,b,m[7],4249261313,22),b=u(b,g,S,C,m[8],1770035416,7),C=u(C,b,g,S,m[9],2336552879,12),S=u(S,C,b,g,m[10],4294925233,17),g=u(g,S,C,b,m[11],2304563134,22),b=u(b,g,S,C,m[12],1804603682,7),C=u(C,b,g,S,m[13],4254626195,12),S=u(S,C,b,g,m[14],2792965006,17),b=a(b,g=u(g,S,C,b,m[15],1236535329,22),S,C,m[1],4129170786,5),C=a(C,b,g,S,m[6],3225465664,9),S=a(S,C,b,g,m[11],643717713,14),g=a(g,S,C,b,m[0],3921069994,20),b=a(b,g,S,C,m[5],3593408605,5),C=a(C,b,g,S,m[10],38016083,9),S=a(S,C,b,g,m[15],3634488961,14),g=a(g,S,C,b,m[4],3889429448,20),b=a(b,g,S,C,m[9],568446438,5),C=a(C,b,g,S,m[14],3275163606,9),S=a(S,C,b,g,m[3],4107603335,14),g=a(g,S,C,b,m[8],1163531501,20),b=a(b,g,S,C,m[13],2850285829,5),C=a(C,b,g,S,m[2],4243563512,9),S=a(S,C,b,g,m[7],1735328473,14),b=h(b,g=a(g,S,C,b,m[12],2368359562,20),S,C,m[5],4294588738,4),C=h(C,b,g,S,m[8],2272392833,11),S=h(S,C,b,g,m[11],1839030562,16),g=h(g,S,C,b,m[14],4259657740,23),b=h(b,g,S,C,m[1],2763975236,4),C=h(C,b,g,S,m[4],1272893353,11),S=h(S,C,b,g,m[7],4139469664,16),g=h(g,S,C,b,m[10],3200236656,23),b=h(b,g,S,C,m[13],681279174,4),C=h(C,b,g,S,m[0],3936430074,11),S=h(S,C,b,g,m[3],3572445317,16),g=h(g,S,C,b,m[6],76029189,23),b=h(b,g,S,C,m[9],3654602809,4),C=h(C,b,g,S,m[12],3873151461,11),S=h(S,C,b,g,m[15],530742520,16),b=p(b,g=h(g,S,C,b,m[2],3299628645,23),S,C,m[0],4096336452,6),C=p(C,b,g,S,m[7],1126891415,10),S=p(S,C,b,g,m[14],2878612391,15),g=p(g,S,C,b,m[5],4237533241,21),b=p(b,g,S,C,m[12],1700485571,6),C=p(C,b,g,S,m[3],2399980690,10),S=p(S,C,b,g,m[10],4293915773,15),g=p(g,S,C,b,m[1],2240044497,21),b=p(b,g,S,C,m[8],1873313359,6),C=p(C,b,g,S,m[15],4264355552,10),S=p(S,C,b,g,m[6],2734768916,15),g=p(g,S,C,b,m[13],1309151649,21),b=p(b,g,S,C,m[4],4149444226,6),C=p(C,b,g,S,m[11],3174756917,10),S=p(S,C,b,g,m[2],718787259,15),g=p(g,S,C,b,m[9],3951481745,21),this._a=this._a+b|0,this._b=this._b+g|0,this._c=this._c+S|0,this._d=this._d+C|0},e.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var m=n.allocUnsafe(16);return m.writeInt32LE(this._a,0),m.writeInt32LE(this._b,4),m.writeInt32LE(this._c,8),m.writeInt32LE(this._d,12),m},l.exports=e},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(t,l,c){var o=t("bn.js"),r=t("brorand");function n(s){this.rand=s||new r.Rand}l.exports=n,n.create=function(s){return new n(s)},n.prototype._randbelow=function(s){var e=s.bitLength(),i=Math.ceil(e/8);do var u=new o(this.rand.generate(i));while(u.cmp(s)>=0);return u},n.prototype._randrange=function(s,e){var i=e.sub(s);return s.add(this._randbelow(i))},n.prototype.test=function(s,e,i){var u=s.bitLength(),a=o.mont(s),h=new o(1).toRed(a);e||(e=Math.max(1,u/48|0));for(var p=s.subn(1),m=0;!p.testn(m);m++);for(var d=s.shrn(m),b=p.toRed(a);e>0;e--){var g=this._randrange(new o(2),p);i&&i(g);var S=g.toRed(a).redPow(d);if(S.cmp(h)!==0&&S.cmp(b)!==0){for(var C=1;C<m;C++){if((S=S.redSqr()).cmp(h)===0)return!1;if(S.cmp(b)===0)break}if(C===m)return!1}}return!0},n.prototype.getDivisor=function(s,e){var i=s.bitLength(),u=o.mont(s),a=new o(1).toRed(u);e||(e=Math.max(1,i/48|0));for(var h=s.subn(1),p=0;!h.testn(p);p++);for(var m=s.shrn(p),d=h.toRed(u);e>0;e--){var b=this._randrange(new o(2),h),g=s.gcd(b);if(g.cmpn(1)!==0)return g;var S=b.toRed(u).redPow(m);if(S.cmp(a)!==0&&S.cmp(d)!==0){for(var C=1;C<p;C++){if((S=S.redSqr()).cmp(a)===0)return S.fromRed().subn(1).gcd(s);if(S.cmp(d)===0)break}if(C===p)return(S=S.redSqr()).fromRed().subn(1).gcd(s)}}return!1}},{"bn.js":452,brorand:187}],452:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],453:[function(t,l,c){function o(r,n){if(!r)throw new Error(n||"Assertion failed")}l.exports=o,o.equal=function(r,n,s){if(r!=n)throw new Error(s||"Assertion failed: "+r+" != "+n)}},{}],454:[function(t,l,c){var o=c;function r(s){return s.length===1?"0"+s:s}function n(s){for(var e="",i=0;i<s.length;i++)e+=r(s[i].toString(16));return e}o.toArray=function(s,e){if(Array.isArray(s))return s.slice();if(!s)return[];var i=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)i[u]=0|s[u];return i}if(e==="hex")for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),u=0;u<s.length;u+=2)i.push(parseInt(s[u]+s[u+1],16));else for(u=0;u<s.length;u++){var a=s.charCodeAt(u),h=a>>8,p=255&a;h?i.push(h,p):i.push(p)}return i},o.zero2=r,o.toHex=n,o.encode=function(s,e){return e==="hex"?n(s):s}},{}],455:[function(t,l,c){l.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(t,l,c){var o=t("asn1.js");c.certificate=t("./certificate");var r=o.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));c.RSAPrivateKey=r;var n=o.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));c.RSAPublicKey=n;var s=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(e),this.key("subjectPublicKey").bitstr())}));c.PublicKey=s;var e=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),i=o.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(e),this.key("subjectPrivateKey").octstr())}));c.PrivateKey=i;var u=o.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));c.EncryptedPrivateKey=u;var a=o.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));c.DSAPrivateKey=a,c.DSAparam=o.define("DSAparam",(function(){this.int()}));var h=o.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())}));c.ECPrivateKey=h;var p=o.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));c.signature=o.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":170}],457:[function(t,l,c){var o=t("asn1.js"),r=o.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),n=o.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),e=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),i=o.define("RelativeDistinguishedName",(function(){this.setof(n)})),u=o.define("RDNSequence",(function(){this.seqof(i)})),a=o.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=o.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),p=o.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),m=o.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(a),this.key("validity").use(h),this.key("subject").use(a),this.key("subjectPublicKeyInfo").use(e),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())})),d=o.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(m),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));l.exports=d},{"asn1.js":170}],458:[function(t,l,c){var o=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=t("evp_bytestokey"),e=t("browserify-aes"),i=t("safe-buffer").Buffer;l.exports=function(u,a){var h,p=u.toString(),m=p.match(o);if(m){var d="aes"+m[1],b=i.from(m[2],"hex"),g=i.from(m[3].replace(/[\r\n]/g,""),"base64"),S=s(a,b.slice(0,8),parseInt(m[1],10)).key,C=[],I=e.createDecipheriv(d,S,b);C.push(I.update(g)),C.push(I.final()),h=i.concat(C)}else{var D=p.match(n);h=i.from(D[2].replace(/[\r\n]/g,""),"base64")}return{tag:p.match(r)[1],data:h}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(t,l,c){var o=t("./asn1"),r=t("./aesid.json"),n=t("./fixProc"),s=t("browserify-aes"),e=t("pbkdf2"),i=t("safe-buffer").Buffer;function u(a){var h;typeof a!="object"||i.isBuffer(a)||(h=a.passphrase,a=a.key),typeof a=="string"&&(a=i.from(a));var p,m,d=n(a,h),b=d.tag,g=d.data;switch(b){case"CERTIFICATE":m=o.certificate.decode(g,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(m||(m=o.PublicKey.decode(g,"der")),p=m.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(m.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return m.subjectPrivateKey=m.subjectPublicKey,{type:"ec",data:m};case"1.2.840.10040.4.1":return m.algorithm.params.pub_key=o.DSAparam.decode(m.subjectPublicKey.data,"der"),{type:"dsa",data:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"ENCRYPTED PRIVATE KEY":g=(function(S,C){var I=S.algorithm.decrypt.kde.kdeparams.salt,D=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),z=r[S.algorithm.decrypt.cipher.algo.join(".")],P=S.algorithm.decrypt.cipher.iv,B=S.subjectPrivateKey,F=parseInt(z.split("-")[1],10)/8,W=e.pbkdf2Sync(C,I,D,F,"sha1"),q=s.createDecipheriv(z,W,P),A=[];return A.push(q.update(B)),A.push(q.final()),i.concat(A)})(g=o.EncryptedPrivateKey.decode(g,"der"),h);case"PRIVATE KEY":switch(p=(m=o.PrivateKey.decode(g,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(m.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:m.algorithm.curve,privateKey:o.ECPrivateKey.decode(m.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return m.algorithm.params.priv_key=o.DSAparam.decode(m.subjectPrivateKey,"der"),{type:"dsa",params:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(g,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(g,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(g,"der")};case"EC PRIVATE KEY":return{curve:(g=o.ECPrivateKey.decode(g,"der")).parameters.value,privateKey:g.privateKey};default:throw new Error("unknown key type "+b)}}l.exports=u,u.signature=o.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(t,l,c){c.pbkdf2=t("./lib/async"),c.pbkdf2Sync=t("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(t,l,c){(function(o){(function(){var r,n,s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./sync"),a=t("./to-buffer"),h=o.crypto&&o.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function d(){return n||(n=o.process&&o.process.nextTick?o.process.nextTick:o.queueMicrotask?o.queueMicrotask:o.setImmediate?o.setImmediate:o.setTimeout)}function b(g,S,C,I,D){return h.importKey("raw",g,{name:"PBKDF2"},!1,["deriveBits"]).then((function(z){return h.deriveBits({name:"PBKDF2",salt:S,iterations:C,hash:{name:D}},z,I<<3)})).then((function(z){return s.from(z)}))}l.exports=function(g,S,C,I,D,z){typeof D=="function"&&(z=D,D=void 0);var P=p[(D=D||"sha1").toLowerCase()];if(P&&typeof o.Promise=="function"){if(e(C,I),g=a(g,i,"Password"),S=a(S,i,"Salt"),typeof z!="function")throw new Error("No callback provided to pbkdf2");(function(B,F){B.then((function(W){d()((function(){F(null,W)}))}),(function(W){d()((function(){F(W)}))}))})((function(B){if(o.process&&!o.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(m[B]!==void 0)return m[B];var F=b(r=r||s.alloc(8),r,10,128,B).then((function(){return!0})).catch((function(){return!1}));return m[B]=F,F})(P).then((function(B){return B?b(g,S,C,I,P):u(g,S,C,I,D)})),z)}else d()((function(){var B;try{B=u(g,S,C,I,D)}catch(F){return z(F)}z(null,B)}))}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(t,l,c){(function(o,r){(function(){var n;r.process&&r.process.browser?n="utf-8":r.process&&r.process.version?n=parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":n="utf-8",l.exports=n}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(t,l,c){var o=Math.pow(2,30)-1;l.exports=function(r,n){if(typeof r!="number")throw new TypeError("Iterations not a number");if(r<0)throw new TypeError("Bad iterations");if(typeof n!="number")throw new TypeError("Key length not a number");if(n<0||n>o||n!=n)throw new TypeError("Bad key length")}},{}],464:[function(t,l,c){var o=t("create-hash/md5"),r=t("ripemd160"),n=t("sha.js"),s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./to-buffer"),a=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(m,d,b){var g=(function(P){function B(F){return n(P).update(F).digest()}return P==="rmd160"||P==="ripemd160"?function(F){return new r().update(F).digest()}:P==="md5"?o:B})(m),S=m==="sha512"||m==="sha384"?128:64;d.length>S?d=g(d):d.length<S&&(d=s.concat([d,a],S));for(var C=s.allocUnsafe(S+h[m]),I=s.allocUnsafe(S+h[m]),D=0;D<S;D++)C[D]=54^d[D],I[D]=92^d[D];var z=s.allocUnsafe(S+b+4);C.copy(z,0,0,S),this.ipad1=z,this.ipad2=C,this.opad=I,this.alg=m,this.blocksize=S,this.hash=g,this.size=h[m]}p.prototype.run=function(m,d){return m.copy(d,this.blocksize),this.hash(d).copy(this.opad,this.blocksize),this.hash(this.opad)},l.exports=function(m,d,b,g,S){e(b,g);var C=new p(S=S||"sha1",m=u(m,i,"Password"),(d=u(d,i,"Salt")).length),I=s.allocUnsafe(g),D=s.allocUnsafe(d.length+4);d.copy(D,0,0,d.length);for(var z=0,P=h[S],B=Math.ceil(g/P),F=1;F<=B;F++){D.writeUInt32BE(F,d.length);for(var W=C.run(D,C.ipad1),q=W,A=1;A<b;A++){q=C.run(q,C.ipad2);for(var M=0;M<P;M++)W[M]^=q[M]}W.copy(I,z),z+=P}return I}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(t,l,c){var o=t("safe-buffer").Buffer;l.exports=function(r,n,s){if(o.isBuffer(r))return r;if(typeof r=="string")return o.from(r,n);if(ArrayBuffer.isView(r))return o.from(r.buffer);throw new TypeError(s+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(t,l,c){(function(o){(function(){o===void 0||!o.version||o.version.indexOf("v0.")===0||o.version.indexOf("v1.")===0&&o.version.indexOf("v1.8.")!==0?l.exports={nextTick:function(r,n,s,e){if(typeof r!="function")throw new TypeError('"callback" argument must be a function');var i,u,a=arguments.length;switch(a){case 0:case 1:return o.nextTick(r);case 2:return o.nextTick((function(){r.call(null,n)}));case 3:return o.nextTick((function(){r.call(null,n,s)}));case 4:return o.nextTick((function(){r.call(null,n,s,e)}));default:for(i=new Array(a-1),u=0;u<i.length;)i[u++]=arguments[u];return o.nextTick((function(){r.apply(null,i)}))}}}:l.exports=o}).call(this)}).call(this,t("_process"))},{_process:467}],467:[function(t,l,c){var o,r,n=l.exports={};function s(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function i(S){if(o===setTimeout)return setTimeout(S,0);if((o===s||!o)&&setTimeout)return o=setTimeout,setTimeout(S,0);try{return o(S,0)}catch{try{return o.call(null,S,0)}catch{return o.call(this,S,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:s}catch{o=s}try{r=typeof clearTimeout=="function"?clearTimeout:e}catch{r=e}})();var u,a=[],h=!1,p=-1;function m(){h&&u&&(h=!1,u.length?a=u.concat(a):p=-1,a.length&&d())}function d(){if(!h){var S=i(m);h=!0;for(var C=a.length;C;){for(u=a,a=[];++p<C;)u&&u[p].run();p=-1,C=a.length}u=null,h=!1,(function(I){if(r===clearTimeout)return clearTimeout(I);if((r===e||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(I);try{r(I)}catch{try{return r.call(null,I)}catch{return r.call(this,I)}}})(S)}}function b(S,C){this.fun=S,this.array=C}function g(){}n.nextTick=function(S){var C=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)C[I-1]=arguments[I];a.push(new b(S,C)),a.length!==1||h||i(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(S){return[]},n.binding=function(S){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(S){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],468:[function(t,l,c){c.publicEncrypt=t("./publicEncrypt"),c.privateDecrypt=t("./privateDecrypt"),c.privateEncrypt=function(o,r){return c.publicEncrypt(o,r,!0)},c.publicDecrypt=function(o,r){return c.privateDecrypt(o,r,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(t,l,c){var o=t("create-hash"),r=t("safe-buffer").Buffer;function n(s){var e=r.allocUnsafe(4);return e.writeUInt32BE(s,0),e}l.exports=function(s,e){for(var i,u=r.alloc(0),a=0;u.length<e;)i=n(a++),u=r.concat([u,o("sha1").update(s).update(i).digest()]);return u.slice(0,e)}},{"create-hash":386,"safe-buffer":494}],470:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],471:[function(t,l,c){var o=t("parse-asn1"),r=t("./mgf"),n=t("./xor"),s=t("bn.js"),e=t("browserify-rsa"),i=t("create-hash"),u=t("./withPublic"),a=t("safe-buffer").Buffer;l.exports=function(h,p,m){var d;d=h.padding?h.padding:m?1:4;var b,g=o(h),S=g.modulus.byteLength();if(p.length>S||new s(p).cmp(g.modulus)>=0)throw new Error("decryption error");b=m?u(new s(p),g):e(p,g);var C=a.alloc(S-b.length);if(b=a.concat([C,b],S),d===4)return(function(I,D){var z=I.modulus.byteLength(),P=i("sha1").update(a.alloc(0)).digest(),B=P.length;if(D[0]!==0)throw new Error("decryption error");var F=D.slice(1,B+1),W=D.slice(B+1),q=n(F,r(W,B)),A=n(W,r(q,z-B-1));if((function(k,y){k=a.from(k),y=a.from(y);var w=0,x=k.length;k.length!==y.length&&(w++,x=Math.min(k.length,y.length));for(var _=-1;++_<x;)w+=k[_]^y[_];return w})(P,A.slice(0,B)))throw new Error("decryption error");for(var M=B;A[M]===0;)M++;if(A[M++]!==1)throw new Error("decryption error");return A.slice(M)})(g,b);if(d===1)return(function(I,D,z){for(var P=D.slice(0,2),B=2,F=0;D[B++]!==0;)if(B>=D.length){F++;break}var W=D.slice(2,B-1);if((P.toString("hex")!=="0002"&&!z||P.toString("hex")!=="0001"&&z)&&F++,W.length<8&&F++,F)throw new Error("decryption error");return D.slice(B)})(0,b,m);if(d===3)return b;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(t,l,c){var o=t("parse-asn1"),r=t("randombytes"),n=t("create-hash"),s=t("./mgf"),e=t("./xor"),i=t("bn.js"),u=t("./withPublic"),a=t("browserify-rsa"),h=t("safe-buffer").Buffer;l.exports=function(p,m,d){var b;b=p.padding?p.padding:d?1:4;var g,S=o(p);if(b===4)g=(function(C,I){var D=C.modulus.byteLength(),z=I.length,P=n("sha1").update(h.alloc(0)).digest(),B=P.length,F=2*B;if(z>D-F-2)throw new Error("message too long");var W=h.alloc(D-z-F-2),q=D-B-1,A=r(B),M=e(h.concat([P,W,h.alloc(1,1),I],q),s(A,q)),k=e(A,s(M,B));return new i(h.concat([h.alloc(1),k,M],D))})(S,m);else if(b===1)g=(function(C,I,D){var z,P=I.length,B=C.modulus.byteLength();if(P>B-11)throw new Error("message too long");return z=D?h.alloc(B-P-3,255):(function(F){for(var W,q=h.allocUnsafe(F),A=0,M=r(2*F),k=0;A<F;)k===M.length&&(M=r(2*F),k=0),(W=M[k++])&&(q[A++]=W);return q})(B-P-3),new i(h.concat([h.from([0,D?1:2]),z,h.alloc(1),I],B))})(S,m,d);else{if(b!==3)throw new Error("unknown padding");if((g=new i(m)).cmp(S.modulus)>=0)throw new Error("data too long for modulus")}return d?a(g,S):u(g,S)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(t,l,c){var o=t("bn.js"),r=t("safe-buffer").Buffer;l.exports=function(n,s){return r.from(n.toRed(o.mont(s.modulus)).redPow(new o(s.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(t,l,c){l.exports=function(o,r){for(var n=o.length,s=-1;++s<n;)o[s]^=r[s];return o}},{}],475:[function(t,l,c){(function(o,r){(function(){var n=t("safe-buffer").Buffer,s=r.crypto||r.msCrypto;s&&s.getRandomValues?l.exports=function(e,i){if(e>4294967295)throw new RangeError("requested too many random bytes");var u=n.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)s.getRandomValues(u.slice(a,a+65536));else s.getRandomValues(u);return typeof i=="function"?o.nextTick((function(){i(null,u)})):u}:l.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
275
|
+
\0`,ht+=d(rt,2),ht+=w.magic,ht+=d(M,2),ht+=d(k,2),ht+=d(K.crc32,4),ht+=d(K.compressedSize,4),ht+=d(K.uncompressedSize,4),ht+=d(_.length,2),ht+=d(L.length,2),{fileRecord:D.LOCAL_FILE_HEADER+ht+_+L,dirRecord:D.CENTRAL_FILE_HEADER+d(et,2)+ht+d(j.length,2)+"\0\0\0\0"+d(Z,4)+d(W,4)+_+L+j}}var g=h("../utils"),S=h("../stream/GenericWorker"),C=h("../utf8"),I=h("../crc32"),D=h("../signature");function z(P,B,F,W){S.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=F,this.encodeFileName=W,this.streamFiles=P,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}g.inherits(z,S),z.prototype.push=function(P){var B=P.meta.percent||0,F=this.entriesCount,W=this._sources.length;this.accumulate?this.contentBuffer.push(P):(this.bytesWritten+=P.data.length,S.prototype.push.call(this,{data:P.data,meta:{currentFile:this.currentFile,percent:F?(B+100*(F-W-1))/F:100}}))},z.prototype.openedSource=function(P){this.currentSourceOffset=this.bytesWritten,this.currentFile=P.file.name;var B=this.streamFiles&&!P.file.dir;if(B){var F=b(P,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:F.fileRecord,meta:{percent:0}})}else this.accumulate=!0},z.prototype.closedSource=function(P){this.accumulate=!1;var B=this.streamFiles&&!P.file.dir,F=b(P,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(F.dirRecord),B)this.push({data:(function(W){return D.DATA_DESCRIPTOR+d(W.crc32,4)+d(W.compressedSize,4)+d(W.uncompressedSize,4)})(P),meta:{percent:100}});else for(this.push({data:F.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},z.prototype.flush=function(){for(var P=this.bytesWritten,B=0;B<this.dirRecords.length;B++)this.push({data:this.dirRecords[B],meta:{percent:100}});var F=this.bytesWritten-P,W=(function(q,A,M,k,y){var w=g.transformTo("string",y(k));return D.CENTRAL_DIRECTORY_END+"\0\0\0\0"+d(q,2)+d(q,2)+d(A,4)+d(M,4)+d(w.length,2)+w})(this.dirRecords.length,F,P,this.zipComment,this.encodeFileName);this.push({data:W,meta:{percent:100}})},z.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},z.prototype.registerPrevious=function(P){this._sources.push(P);var B=this;return P.on("data",(function(F){B.processChunk(F)})),P.on("end",(function(){B.closedSource(B.previous.streamInfo),B._sources.length?B.prepareNextSource():B.end()})),P.on("error",(function(F){B.error(F)})),this},z.prototype.resume=function(){return!!S.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},z.prototype.error=function(P){var B=this._sources;if(!S.prototype.error.call(this,P))return!1;for(var F=0;F<B.length;F++)try{B[F].error(P)}catch{}return!0},z.prototype.lock=function(){S.prototype.lock.call(this);for(var P=this._sources,B=0;B<P.length;B++)P[B].lock()},p.exports=z},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(h,p,m){var d=h("../compressions"),b=h("./ZipFileWorker");m.generateWorker=function(g,S,C){var I=new b(S.streamFiles,C,S.platform,S.encodeFileName),D=0;try{g.forEach((function(z,P){D++;var B=(function(A,M){var k=A||M,y=d[k];if(!y)throw new Error(k+" is not a valid compression method !");return y})(P.options.compression,S.compression),F=P.options.compressionOptions||S.compressionOptions||{},W=P.dir,q=P.date;P._compressWorker(B,F).withStreamInfo("file",{name:z,dir:W,date:q,comment:P.comment||"",unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions}).pipe(I)})),I.entriesCount=D}catch(z){I.error(z)}return I}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(h,p,m){function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var b=new d;for(var g in this)typeof this[g]!="function"&&(b[g]=this[g]);return b}}(d.prototype=h("./object")).loadAsync=h("./load"),d.support=h("./support"),d.defaults=h("./defaults"),d.version="3.10.1",d.loadAsync=function(b,g){return new d().loadAsync(b,g)},d.external=h("./external"),p.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(h,p,m){var d=h("./utils"),b=h("./external"),g=h("./utf8"),S=h("./zipEntries"),C=h("./stream/Crc32Probe"),I=h("./nodejsUtils");function D(z){return new b.Promise((function(P,B){var F=z.decompressed.getContentWorker().pipe(new C);F.on("error",(function(W){B(W)})).on("end",(function(){F.streamInfo.crc32!==z.decompressed.crc32?B(new Error("Corrupted zip : CRC32 mismatch")):P()})).resume()}))}p.exports=function(z,P){var B=this;return P=d.extend(P||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),I.isNode&&I.isStream(z)?b.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",z,!0,P.optimizedBinaryString,P.base64).then((function(F){var W=new S(P);return W.load(F),W})).then((function(F){var W=[b.Promise.resolve(F)],q=F.files;if(P.checkCRC32)for(var A=0;A<q.length;A++)W.push(D(q[A]));return b.Promise.all(W)})).then((function(F){for(var W=F.shift(),q=W.files,A=0;A<q.length;A++){var M=q[A],k=M.fileNameStr,y=d.resolve(M.fileNameStr);B.file(y,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:P.createFolders}),M.dir||(B.file(y).unsafeOriginalName=k)}return W.zipComment.length&&(B.comment=W.zipComment),B}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(h,p,m){var d=h("../utils"),b=h("../stream/GenericWorker");function g(S,C){b.call(this,"Nodejs stream input adapter for "+S),this._upstreamEnded=!1,this._bindStream(C)}d.inherits(g,b),g.prototype._bindStream=function(S){var C=this;(this._stream=S).pause(),S.on("data",(function(I){C.push({data:I,meta:{percent:0}})})).on("error",(function(I){C.isPaused?this.generatedError=I:C.error(I)})).on("end",(function(){C.isPaused?C._upstreamEnded=!0:C.end()}))},g.prototype.pause=function(){return!!b.prototype.pause.call(this)&&(this._stream.pause(),!0)},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=g},{"../stream/GenericWorker":28,"../utils":32}],13:[function(h,p,m){var d=h("readable-stream").Readable;function b(g,S,C){d.call(this,S),this._helper=g;var I=this;g.on("data",(function(D,z){I.push(D)||I._helper.pause(),C&&C(z)})).on("error",(function(D){I.emit("error",D)})).on("end",(function(){I.push(null)}))}h("../utils").inherits(b,d),b.prototype._read=function(){this._helper.resume()},p.exports=b},{"../utils":32,"readable-stream":16}],14:[function(h,p,m){p.exports={isNode:n!==void 0,newBufferFrom:function(d,b){if(n.from&&n.from!==Uint8Array.from)return n.from(d,b);if(typeof d=="number")throw new Error('The "data" argument must not be a number');return new n(d,b)},allocBuffer:function(d){if(n.alloc)return n.alloc(d);var b=new n(d);return b.fill(0),b},isBuffer:function(d){return n.isBuffer(d)},isStream:function(d){return d&&typeof d.on=="function"&&typeof d.pause=="function"&&typeof d.resume=="function"}}},{}],15:[function(h,p,m){function d(y,w,x){var _,T=g.getTypeOf(w),O=g.extend(x||{},I);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(y=q(y)),O.createFolders&&(_=W(y))&&A.call(this,_,!0);var j=T==="string"&&O.binary===!1&&O.base64===!1;x&&x.binary!==void 0||(O.binary=!j),(w instanceof D&&w.uncompressedSize===0||O.dir||!w||w.length===0)&&(O.base64=!1,O.binary=!0,w="",O.compression="STORE",T="string");var V;V=w instanceof D||w instanceof S?w:B.isNode&&B.isStream(w)?new F(y,w):g.prepareContent(y,w,O.binary,O.optimizedBinaryString,O.base64);var X=new z(y,V,O);this.files[y]=X}var b=h("./utf8"),g=h("./utils"),S=h("./stream/GenericWorker"),C=h("./stream/StreamHelper"),I=h("./defaults"),D=h("./compressedObject"),z=h("./zipObject"),P=h("./generate"),B=h("./nodejsUtils"),F=h("./nodejs/NodejsStreamInputAdapter"),W=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var w=y.lastIndexOf("/");return 0<w?y.substring(0,w):""},q=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},A=function(y,w){return w=w!==void 0?w:I.createFolders,y=q(y),this.files[y]||d.call(this,y,null,{dir:!0,createFolders:w}),this.files[y]};function M(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var k={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var w,x,_;for(w in this.files)_=this.files[w],(x=w.slice(this.root.length,w.length))&&w.slice(0,this.root.length)===this.root&&y(x,_)},filter:function(y){var w=[];return this.forEach((function(x,_){y(x,_)&&w.push(_)})),w},file:function(y,w,x){if(arguments.length!==1)return y=this.root+y,d.call(this,y,w,x),this;if(M(y)){var _=y;return this.filter((function(O,j){return!j.dir&&_.test(O)}))}var T=this.files[this.root+y];return T&&!T.dir?T:null},folder:function(y){if(!y)return this;if(M(y))return this.filter((function(T,O){return O.dir&&y.test(T)}));var w=this.root+y,x=A.call(this,w),_=this.clone();return _.root=x.name,_},remove:function(y){y=this.root+y;var w=this.files[y];if(w||(y.slice(-1)!=="/"&&(y+="/"),w=this.files[y]),w&&!w.dir)delete this.files[y];else for(var x=this.filter((function(T,O){return O.name.slice(0,y.length)===y})),_=0;_<x.length;_++)delete this.files[x[_].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(y){var w,x={};try{if((x=g.extend(y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:b.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");g.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var _=x.comment||this.comment||"";w=P.generateWorker(this,x,_)}catch(T){(w=new S("error")).error(T)}return new C(w,x.type||"string",x.mimeType)},generateAsync:function(y,w){return this.generateInternalStream(y).accumulate(w)},generateNodeStream:function(y,w){return(y=y||{}).type||(y.type="nodebuffer"),this.generateInternalStream(y).toNodejsStream(w)}};p.exports=k},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(h,p,m){p.exports=h("stream")},{stream:void 0}],17:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g);for(var S=0;S<this.data.length;S++)g[S]=255&g[S]}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data[this.zero+g]},b.prototype.lastIndexOfSignature=function(g){for(var S=g.charCodeAt(0),C=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.length-4;0<=z;--z)if(this.data[z]===S&&this.data[z+1]===C&&this.data[z+2]===I&&this.data[z+3]===D)return z-this.zero;return-1},b.prototype.readAndCheckSignature=function(g){var S=g.charCodeAt(0),C=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.readData(4);return S===z[0]&&C===z[1]&&I===z[2]&&D===z[3]},b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return[];var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],18:[function(h,p,m){var d=h("../utils");function b(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}b.prototype={checkOffset:function(g){this.checkIndex(this.index+g)},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g},skip:function(g){this.setIndex(this.index+g)},byteAt:function(){},readInt:function(g){var S,C=0;for(this.checkOffset(g),S=this.index+g-1;S>=this.index;S--)C=(C<<8)+this.byteAt(S);return this.index+=g,C},readString:function(g){return d.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},p.exports=b},{"../utils":32}],19:[function(h,p,m){var d=h("./Uint8ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},b.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},b.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],21:[function(h,p,m){var d=h("./ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var S=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./ArrayReader":17}],22:[function(h,p,m){var d=h("../utils"),b=h("../support"),g=h("./ArrayReader"),S=h("./StringReader"),C=h("./NodeBufferReader"),I=h("./Uint8ArrayReader");p.exports=function(D){var z=d.getTypeOf(D);return d.checkSupport(z),z!=="string"||b.uint8array?z==="nodebuffer"?new C(D):b.uint8array?new I(d.transformTo("uint8array",D)):new g(d.transformTo("array",D)):new S(D)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(h,p,m){m.LOCAL_FILE_HEADER="PK",m.CENTRAL_FILE_HEADER="PK",m.CENTRAL_DIRECTORY_END="PK",m.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",m.ZIP64_CENTRAL_DIRECTORY_END="PK",m.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(h,p,m){var d=h("./GenericWorker"),b=h("../utils");function g(S){d.call(this,"ConvertWorker to "+S),this.destType=S}b.inherits(g,d),g.prototype.processChunk=function(S){this.push({data:b.transformTo(this.destType,S.data),meta:S.meta})},p.exports=g},{"../utils":32,"./GenericWorker":28}],25:[function(h,p,m){var d=h("./GenericWorker"),b=h("../crc32");function g(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h("../utils").inherits(g,d),g.prototype.processChunk=function(S){this.streamInfo.crc32=b(S.data,this.streamInfo.crc32||0),this.push(S)},p.exports=g},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataLengthProbe for "+S),this.propName=S,this.withStreamInfo(S,0)}d.inherits(g,b),g.prototype.processChunk=function(S){if(S){var C=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=C+S.data.length}b.prototype.processChunk.call(this,S)},p.exports=g},{"../utils":32,"./GenericWorker":28}],27:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataWorker");var C=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,S.then((function(I){C.dataIsReady=!0,C.data=I,C.max=I&&I.length||0,C.type=d.getTypeOf(I),C.isPaused||C._tickAndRepeat()}),(function(I){C.error(I)}))}d.inherits(g,b),g.prototype.cleanUp=function(){b.prototype.cleanUp.call(this),this.data=null},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},g.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var S=null,C=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":S=this.data.substring(this.index,C);break;case"uint8array":S=this.data.subarray(this.index,C);break;case"array":case"nodebuffer":S=this.data.slice(this.index,C)}return this.index=C,this.push({data:S,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=g},{"../utils":32,"./GenericWorker":28}],28:[function(h,p,m){function d(b){this.name=b||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(b){this.emit("data",b)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(b){this.emit("error",b)}return!0},error:function(b){return!this.isFinished&&(this.isPaused?this.generatedError=b:(this.isFinished=!0,this.emit("error",b),this.previous&&this.previous.error(b),this.cleanUp()),!0)},on:function(b,g){return this._listeners[b].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(b,g){if(this._listeners[b])for(var S=0;S<this._listeners[b].length;S++)this._listeners[b][S].call(this,g)},pipe:function(b){return b.registerPrevious(this)},registerPrevious:function(b){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=b.streamInfo,this.mergeStreamInfo(),this.previous=b;var g=this;return b.on("data",(function(S){g.processChunk(S)})),b.on("end",(function(){g.end()})),b.on("error",(function(S){g.error(S)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var b=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),b=!0),this.previous&&this.previous.resume(),!b},flush:function(){},processChunk:function(b){this.push(b)},withStreamInfo:function(b,g){return this.extraStreamInfo[b]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var b in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,b)&&(this.streamInfo[b]=this.extraStreamInfo[b])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var b="Worker "+this.name;return this.previous?this.previous+" -> "+b:b}},p.exports=d},{}],29:[function(h,p,m){var d=h("../utils"),b=h("./ConvertWorker"),g=h("./GenericWorker"),S=h("../base64"),C=h("../support"),I=h("../external"),D=null;if(C.nodestream)try{D=h("../nodejs/NodejsStreamOutputAdapter")}catch{}function z(P,B,F){var W=B;switch(B){case"blob":case"arraybuffer":W="uint8array";break;case"base64":W="string"}try{this._internalType=W,this._outputType=B,this._mimeType=F,d.checkSupport(W),this._worker=P.pipe(new b(W)),P.lock()}catch(q){this._worker=new g("error"),this._worker.error(q)}}z.prototype={accumulate:function(P){return(function(B,F){return new I.Promise((function(W,q){var A=[],M=B._internalType,k=B._outputType,y=B._mimeType;B.on("data",(function(w,x){A.push(w),F&&F(x)})).on("error",(function(w){A=[],q(w)})).on("end",(function(){try{var w=(function(x,_,T){switch(x){case"blob":return d.newBlob(d.transformTo("arraybuffer",_),T);case"base64":return S.encode(_);default:return d.transformTo(x,_)}})(k,(function(x,_){var T,O=0,j=null,V=0;for(T=0;T<_.length;T++)V+=_[T].length;switch(x){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(j=new Uint8Array(V),T=0;T<_.length;T++)j.set(_[T],O),O+=_[T].length;return j;case"nodebuffer":return n.concat(_);default:throw new Error("concat : unsupported type '"+x+"'")}})(M,A),y);W(w)}catch(x){q(x)}A=[]})).resume()}))})(this,P)},on:function(P,B){var F=this;return P==="data"?this._worker.on(P,(function(W){B.call(F,W.data,W.meta)})):this._worker.on(P,(function(){d.delay(B,arguments,F)})),this},resume:function(){return d.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(P){if(d.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new D(this,{objectMode:this._outputType!=="nodebuffer"},P)}},p.exports=z},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(h,p,m){if(m.base64=!0,m.array=!0,m.string=!0,m.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",m.nodebuffer=n!==void 0,m.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")m.blob=!1;else{var d=new ArrayBuffer(0);try{m.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);b.append(d),m.blob=b.getBlob("application/zip").size===0}catch{m.blob=!1}}}try{m.nodestream=!!h("readable-stream").Readable}catch{m.nodestream=!1}},{"readable-stream":16}],31:[function(h,p,m){for(var d=h("./utils"),b=h("./support"),g=h("./nodejsUtils"),S=h("./stream/GenericWorker"),C=new Array(256),I=0;I<256;I++)C[I]=252<=I?6:248<=I?5:240<=I?4:224<=I?3:192<=I?2:1;function D(){S.call(this,"utf-8 decode"),this.leftOver=null}function z(){S.call(this,"utf-8 encode")}C[254]=C[254]=1,m.utf8encode=function(P){return b.nodebuffer?g.newBufferFrom(P,"utf-8"):(function(B){var F,W,q,A,M,k=B.length,y=0;for(A=0;A<k;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),y+=W<128?1:W<2048?2:W<65536?3:4;for(F=b.uint8array?new Uint8Array(y):new Array(y),A=M=0;M<y;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),W<128?F[M++]=W:(W<2048?F[M++]=192|W>>>6:(W<65536?F[M++]=224|W>>>12:(F[M++]=240|W>>>18,F[M++]=128|W>>>12&63),F[M++]=128|W>>>6&63),F[M++]=128|63&W);return F})(P)},m.utf8decode=function(P){return b.nodebuffer?d.transformTo("nodebuffer",P).toString("utf-8"):(function(B){var F,W,q,A,M=B.length,k=new Array(2*M);for(F=W=0;F<M;)if((q=B[F++])<128)k[W++]=q;else if(4<(A=C[q]))k[W++]=65533,F+=A-1;else{for(q&=A===2?31:A===3?15:7;1<A&&F<M;)q=q<<6|63&B[F++],A--;1<A?k[W++]=65533:q<65536?k[W++]=q:(q-=65536,k[W++]=55296|q>>10&1023,k[W++]=56320|1023&q)}return k.length!==W&&(k.subarray?k=k.subarray(0,W):k.length=W),d.applyFromCharCode(k)})(P=d.transformTo(b.uint8array?"uint8array":"array",P))},d.inherits(D,S),D.prototype.processChunk=function(P){var B=d.transformTo(b.uint8array?"uint8array":"array",P.data);if(this.leftOver&&this.leftOver.length){if(b.uint8array){var F=B;(B=new Uint8Array(F.length+this.leftOver.length)).set(this.leftOver,0),B.set(F,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var W=(function(A,M){var k;for((M=M||A.length)>A.length&&(M=A.length),k=M-1;0<=k&&(192&A[k])==128;)k--;return k<0||k===0?M:k+C[A[k]]>M?k:M})(B),q=B;W!==B.length&&(b.uint8array?(q=B.subarray(0,W),this.leftOver=B.subarray(W,B.length)):(q=B.slice(0,W),this.leftOver=B.slice(W,B.length))),this.push({data:m.utf8decode(q),meta:P.meta})},D.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:m.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},m.Utf8DecodeWorker=D,d.inherits(z,S),z.prototype.processChunk=function(P){this.push({data:m.utf8encode(P.data),meta:P.meta})},m.Utf8EncodeWorker=z},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(h,p,m){var d=h("./support"),b=h("./base64"),g=h("./nodejsUtils"),S=h("./external");function C(F){return F}function I(F,W){for(var q=0;q<F.length;++q)W[q]=255&F.charCodeAt(q);return W}h("setimmediate"),m.newBlob=function(F,W){m.checkSupport("blob");try{return new Blob([F],{type:W})}catch{try{var q=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return q.append(F),q.getBlob(W)}catch{throw new Error("Bug : can't construct the Blob.")}}};var D={stringifyByChunk:function(F,W,q){var A=[],M=0,k=F.length;if(k<=q)return String.fromCharCode.apply(null,F);for(;M<k;)W==="array"||W==="nodebuffer"?A.push(String.fromCharCode.apply(null,F.slice(M,Math.min(M+q,k)))):A.push(String.fromCharCode.apply(null,F.subarray(M,Math.min(M+q,k)))),M+=q;return A.join("")},stringifyByChar:function(F){for(var W="",q=0;q<F.length;q++)W+=String.fromCharCode(F[q]);return W},applyCanBeUsed:{uint8array:(function(){try{return d.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return d.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}})()}};function z(F){var W=65536,q=m.getTypeOf(F),A=!0;if(q==="uint8array"?A=D.applyCanBeUsed.uint8array:q==="nodebuffer"&&(A=D.applyCanBeUsed.nodebuffer),A)for(;1<W;)try{return D.stringifyByChunk(F,q,W)}catch{W=Math.floor(W/2)}return D.stringifyByChar(F)}function P(F,W){for(var q=0;q<F.length;q++)W[q]=F[q];return W}m.applyFromCharCode=z;var B={};B.string={string:C,array:function(F){return I(F,new Array(F.length))},arraybuffer:function(F){return B.string.uint8array(F).buffer},uint8array:function(F){return I(F,new Uint8Array(F.length))},nodebuffer:function(F){return I(F,g.allocBuffer(F.length))}},B.array={string:z,array:C,arraybuffer:function(F){return new Uint8Array(F).buffer},uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(F)}},B.arraybuffer={string:function(F){return z(new Uint8Array(F))},array:function(F){return P(new Uint8Array(F),new Array(F.byteLength))},arraybuffer:C,uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(new Uint8Array(F))}},B.uint8array={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return F.buffer},uint8array:C,nodebuffer:function(F){return g.newBufferFrom(F)}},B.nodebuffer={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return B.nodebuffer.uint8array(F).buffer},uint8array:function(F){return P(F,new Uint8Array(F.length))},nodebuffer:C},m.transformTo=function(F,W){if(W=W||"",!F)return W;m.checkSupport(F);var q=m.getTypeOf(W);return B[q][F](W)},m.resolve=function(F){for(var W=F.split("/"),q=[],A=0;A<W.length;A++){var M=W[A];M==="."||M===""&&A!==0&&A!==W.length-1||(M===".."?q.pop():q.push(M))}return q.join("/")},m.getTypeOf=function(F){return typeof F=="string"?"string":Object.prototype.toString.call(F)==="[object Array]"?"array":d.nodebuffer&&g.isBuffer(F)?"nodebuffer":d.uint8array&&F instanceof Uint8Array?"uint8array":d.arraybuffer&&F instanceof ArrayBuffer?"arraybuffer":void 0},m.checkSupport=function(F){if(!d[F.toLowerCase()])throw new Error(F+" is not supported by this platform")},m.MAX_VALUE_16BITS=65535,m.MAX_VALUE_32BITS=-1,m.pretty=function(F){var W,q,A="";for(q=0;q<(F||"").length;q++)A+="\\x"+((W=F.charCodeAt(q))<16?"0":"")+W.toString(16).toUpperCase();return A},m.delay=function(F,W,q){a((function(){F.apply(q||null,W||[])}))},m.inherits=function(F,W){function q(){}q.prototype=W.prototype,F.prototype=new q},m.extend=function(){var F,W,q={};for(F=0;F<arguments.length;F++)for(W in arguments[F])Object.prototype.hasOwnProperty.call(arguments[F],W)&&q[W]===void 0&&(q[W]=arguments[F][W]);return q},m.prepareContent=function(F,W,q,A,M){return S.Promise.resolve(W).then((function(k){return d.blob&&(k instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(k))!==-1)&&typeof FileReader<"u"?new S.Promise((function(y,w){var x=new FileReader;x.onload=function(_){y(_.target.result)},x.onerror=function(_){w(_.target.error)},x.readAsArrayBuffer(k)})):k})).then((function(k){var y=m.getTypeOf(k);return y?(y==="arraybuffer"?k=m.transformTo("uint8array",k):y==="string"&&(M?k=b.decode(k):q&&A!==!0&&(k=(function(w){return I(w,d.uint8array?new Uint8Array(w.length):new Array(w.length))})(k))),k):S.Promise.reject(new Error("Can't read the data of '"+F+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./signature"),S=h("./zipEntry"),C=h("./support");function I(D){this.files=[],this.loadOptions=D}I.prototype={checkSignature:function(D){if(!this.reader.readAndCheckSignature(D)){this.reader.index-=4;var z=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+b.pretty(z)+", expected "+b.pretty(D)+")")}},isSignature:function(D,z){var P=this.reader.index;this.reader.setIndex(D);var B=this.reader.readString(4)===z;return this.reader.setIndex(P),B},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var D=this.reader.readData(this.zipCommentLength),z=C.uint8array?"uint8array":"array",P=b.transformTo(z,D);this.zipComment=this.loadOptions.decodeFileName(P)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var D,z,P,B=this.zip64EndOfCentralSize-44;0<B;)D=this.reader.readInt(2),z=this.reader.readInt(4),P=this.reader.readData(z),this.zip64ExtensibleData[D]={id:D,length:z,value:P}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var D,z;for(D=0;D<this.files.length;D++)z=this.files[D],this.reader.setIndex(z.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),z.readLocalPart(this.reader),z.handleUTF8(),z.processAttributes()},readCentralDir:function(){var D;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(D=new S({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(D);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var D=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(D<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(D);var z=D;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===b.MAX_VALUE_16BITS||this.diskWithCentralDirStart===b.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===b.MAX_VALUE_16BITS||this.centralDirRecords===b.MAX_VALUE_16BITS||this.centralDirSize===b.MAX_VALUE_32BITS||this.centralDirOffset===b.MAX_VALUE_32BITS){if(this.zip64=!0,(D=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(D),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var P=this.centralDirOffset+this.centralDirSize;this.zip64&&(P+=20,P+=12+this.zip64EndOfCentralSize);var B=z-P;if(0<B)this.isSignature(z,g.CENTRAL_FILE_HEADER)||(this.reader.zero=B);else if(B<0)throw new Error("Corrupted zip: missing "+Math.abs(B)+" bytes.")},prepareReader:function(D){this.reader=d(D)},load:function(D){this.prepareReader(D),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=I},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./compressedObject"),S=h("./crc32"),C=h("./utf8"),I=h("./compressions"),D=h("./support");function z(P,B){this.options=P,this.loadOptions=B}z.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(P){var B,F;if(P.skip(22),this.fileNameLength=P.readInt(2),F=P.readInt(2),this.fileName=P.readData(this.fileNameLength),P.skip(F),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((B=(function(W){for(var q in I)if(Object.prototype.hasOwnProperty.call(I,q)&&I[q].magic===W)return I[q];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+b.pretty(this.compressionMethod)+" unknown (inner file : "+b.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,B,P.readData(this.compressedSize))},readCentralPart:function(P){this.versionMadeBy=P.readInt(2),P.skip(2),this.bitFlag=P.readInt(2),this.compressionMethod=P.readString(2),this.date=P.readDate(),this.crc32=P.readInt(4),this.compressedSize=P.readInt(4),this.uncompressedSize=P.readInt(4);var B=P.readInt(2);if(this.extraFieldsLength=P.readInt(2),this.fileCommentLength=P.readInt(2),this.diskNumberStart=P.readInt(2),this.internalFileAttributes=P.readInt(2),this.externalFileAttributes=P.readInt(4),this.localHeaderOffset=P.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");P.skip(B),this.readExtraFields(P),this.parseZIP64ExtraField(P),this.fileComment=P.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var P=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),P==0&&(this.dosPermissions=63&this.externalFileAttributes),P==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var P=d(this.extraFields[1].value);this.uncompressedSize===b.MAX_VALUE_32BITS&&(this.uncompressedSize=P.readInt(8)),this.compressedSize===b.MAX_VALUE_32BITS&&(this.compressedSize=P.readInt(8)),this.localHeaderOffset===b.MAX_VALUE_32BITS&&(this.localHeaderOffset=P.readInt(8)),this.diskNumberStart===b.MAX_VALUE_32BITS&&(this.diskNumberStart=P.readInt(4))}},readExtraFields:function(P){var B,F,W,q=P.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});P.index+4<q;)B=P.readInt(2),F=P.readInt(2),W=P.readData(F),this.extraFields[B]={id:B,length:F,value:W};P.setIndex(q)},handleUTF8:function(){var P=D.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=C.utf8decode(this.fileName),this.fileCommentStr=C.utf8decode(this.fileComment);else{var B=this.findExtraFieldUnicodePath();if(B!==null)this.fileNameStr=B;else{var F=b.transformTo(P,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(F)}var W=this.findExtraFieldUnicodeComment();if(W!==null)this.fileCommentStr=W;else{var q=b.transformTo(P,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(q)}}},findExtraFieldUnicodePath:function(){var P=this.extraFields[28789];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileName)!==B.readInt(4)?null:C.utf8decode(B.readData(P.length-5))}return null},findExtraFieldUnicodeComment:function(){var P=this.extraFields[25461];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileComment)!==B.readInt(4)?null:C.utf8decode(B.readData(P.length-5))}return null}},p.exports=z},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(h,p,m){function d(B,F,W){this.name=B,this.dir=W.dir,this.date=W.date,this.comment=W.comment,this.unixPermissions=W.unixPermissions,this.dosPermissions=W.dosPermissions,this._data=F,this._dataBinary=W.binary,this.options={compression:W.compression,compressionOptions:W.compressionOptions}}var b=h("./stream/StreamHelper"),g=h("./stream/DataWorker"),S=h("./utf8"),C=h("./compressedObject"),I=h("./stream/GenericWorker");d.prototype={internalStream:function(B){var F=null,W="string";try{if(!B)throw new Error("No output type specified.");var q=(W=B.toLowerCase())==="string"||W==="text";W!=="binarystring"&&W!=="text"||(W="string"),F=this._decompressWorker();var A=!this._dataBinary;A&&!q&&(F=F.pipe(new S.Utf8EncodeWorker)),!A&&q&&(F=F.pipe(new S.Utf8DecodeWorker))}catch(M){(F=new I("error")).error(M)}return new b(F,W,"")},async:function(B,F){return this.internalStream(B).accumulate(F)},nodeStream:function(B,F){return this.internalStream(B||"nodebuffer").toNodejsStream(F)},_compressWorker:function(B,F){if(this._data instanceof C&&this._data.compression.magic===B.magic)return this._data.getCompressedWorker();var W=this._decompressWorker();return this._dataBinary||(W=W.pipe(new S.Utf8EncodeWorker)),C.createWorkerFrom(W,B,F)},_decompressWorker:function(){return this._data instanceof C?this._data.getContentWorker():this._data instanceof I?this._data:new g(this._data)}};for(var D=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],z=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},P=0;P<D.length;P++)d.prototype[D[P]]=z;p.exports=d},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(h,p,m){(function(d){var b,g,S=d.MutationObserver||d.WebKitMutationObserver;if(S){var C=0,I=new S(B),D=d.document.createTextNode("");I.observe(D,{characterData:!0}),b=function(){D.data=C=++C%2}}else if(d.setImmediate||d.MessageChannel===void 0)b="document"in d&&"onreadystatechange"in d.document.createElement("script")?function(){var F=d.document.createElement("script");F.onreadystatechange=function(){B(),F.onreadystatechange=null,F.parentNode.removeChild(F),F=null},d.document.documentElement.appendChild(F)}:function(){setTimeout(B,0)};else{var z=new d.MessageChannel;z.port1.onmessage=B,b=function(){z.port2.postMessage(0)}}var P=[];function B(){var F,W;g=!0;for(var q=P.length;q;){for(W=P,P=[],F=-1;++F<q;)W[F]();q=P.length}g=!1}p.exports=function(F){P.push(F)!==1||g||b()}}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(h,p,m){var d=h("immediate");function b(){}var g={},S=["REJECTED"],C=["FULFILLED"],I=["PENDING"];function D(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=I,this.queue=[],this.outcome=void 0,q!==b&&F(this,q)}function z(q,A,M){this.promise=q,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function P(q,A,M){d((function(){var k;try{k=A(M)}catch(y){return g.reject(q,y)}k===q?g.reject(q,new TypeError("Cannot resolve promise with itself")):g.resolve(q,k)}))}function B(q){var A=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof A=="function")return function(){A.apply(q,arguments)}}function F(q,A){var M=!1;function k(x){M||(M=!0,g.reject(q,x))}function y(x){M||(M=!0,g.resolve(q,x))}var w=W((function(){A(y,k)}));w.status==="error"&&k(w.value)}function W(q,A){var M={};try{M.value=q(A),M.status="success"}catch(k){M.status="error",M.value=k}return M}(p.exports=D).prototype.finally=function(q){if(typeof q!="function")return this;var A=this.constructor;return this.then((function(M){return A.resolve(q()).then((function(){return M}))}),(function(M){return A.resolve(q()).then((function(){throw M}))}))},D.prototype.catch=function(q){return this.then(null,q)},D.prototype.then=function(q,A){if(typeof q!="function"&&this.state===C||typeof A!="function"&&this.state===S)return this;var M=new this.constructor(b);return this.state!==I?P(M,this.state===C?q:A,this.outcome):this.queue.push(new z(M,q,A)),M},z.prototype.callFulfilled=function(q){g.resolve(this.promise,q)},z.prototype.otherCallFulfilled=function(q){P(this.promise,this.onFulfilled,q)},z.prototype.callRejected=function(q){g.reject(this.promise,q)},z.prototype.otherCallRejected=function(q){P(this.promise,this.onRejected,q)},g.resolve=function(q,A){var M=W(B,A);if(M.status==="error")return g.reject(q,M.value);var k=M.value;if(k)F(q,k);else{q.state=C,q.outcome=A;for(var y=-1,w=q.queue.length;++y<w;)q.queue[y].callFulfilled(A)}return q},g.reject=function(q,A){q.state=S,q.outcome=A;for(var M=-1,k=q.queue.length;++M<k;)q.queue[M].callRejected(A);return q},D.resolve=function(q){return q instanceof this?q:g.resolve(new this(b),q)},D.reject=function(q){var A=new this(b);return g.reject(A,q)},D.all=function(q){var A=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=q.length,k=!1;if(!M)return this.resolve([]);for(var y=new Array(M),w=0,x=-1,_=new this(b);++x<M;)T(q[x],x);return _;function T(O,j){A.resolve(O).then((function(V){y[j]=V,++w!==M||k||(k=!0,g.resolve(_,y))}),(function(V){k||(k=!0,g.reject(_,V))}))}},D.race=function(q){if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=q.length,M=!1;if(!A)return this.resolve([]);for(var k,y=-1,w=new this(b);++y<A;)k=q[y],this.resolve(k).then((function(x){M||(M=!0,g.resolve(w,x))}),(function(x){M||(M=!0,g.reject(w,x))}));return w}},{immediate:36}],38:[function(h,p,m){var d={};(0,h("./lib/utils/common").assign)(d,h("./lib/deflate"),h("./lib/inflate"),h("./lib/zlib/constants")),p.exports=d},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(h,p,m){var d=h("./zlib/deflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/messages"),C=h("./zlib/zstream"),I=Object.prototype.toString;function D(P){if(!(this instanceof D))return new D(P);this.options=b.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},P||{});var B=this.options;B.raw&&0<B.windowBits?B.windowBits=-B.windowBits:B.gzip&&0<B.windowBits&&B.windowBits<16&&(B.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new C,this.strm.avail_out=0;var F=d.deflateInit2(this.strm,B.level,B.method,B.windowBits,B.memLevel,B.strategy);if(F!==0)throw new Error(S[F]);if(B.header&&d.deflateSetHeader(this.strm,B.header),B.dictionary){var W;if(W=typeof B.dictionary=="string"?g.string2buf(B.dictionary):I.call(B.dictionary)==="[object ArrayBuffer]"?new Uint8Array(B.dictionary):B.dictionary,(F=d.deflateSetDictionary(this.strm,W))!==0)throw new Error(S[F]);this._dict_set=!0}}function z(P,B){var F=new D(B);if(F.push(P,!0),F.err)throw F.msg||S[F.err];return F.result}D.prototype.push=function(P,B){var F,W,q=this.strm,A=this.options.chunkSize;if(this.ended)return!1;W=B===~~B?B:B===!0?4:0,typeof P=="string"?q.input=g.string2buf(P):I.call(P)==="[object ArrayBuffer]"?q.input=new Uint8Array(P):q.input=P,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new b.Buf8(A),q.next_out=0,q.avail_out=A),(F=d.deflate(q,W))!==1&&F!==0)return this.onEnd(F),!(this.ended=!0);q.avail_out!==0&&(q.avail_in!==0||W!==4&&W!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(b.shrinkBuf(q.output,q.next_out))):this.onData(b.shrinkBuf(q.output,q.next_out)))}while((0<q.avail_in||q.avail_out===0)&&F!==1);return W===4?(F=d.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===0):W!==2||(this.onEnd(0),!(q.avail_out=0))},D.prototype.onData=function(P){this.chunks.push(P)},D.prototype.onEnd=function(P){P===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg},m.Deflate=D,m.deflate=z,m.deflateRaw=function(P,B){return(B=B||{}).raw=!0,z(P,B)},m.gzip=function(P,B){return(B=B||{}).gzip=!0,z(P,B)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(h,p,m){var d=h("./zlib/inflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/constants"),C=h("./zlib/messages"),I=h("./zlib/zstream"),D=h("./zlib/gzheader"),z=Object.prototype.toString;function P(F){if(!(this instanceof P))return new P(F);this.options=b.assign({chunkSize:16384,windowBits:0,to:""},F||{});var W=this.options;W.raw&&0<=W.windowBits&&W.windowBits<16&&(W.windowBits=-W.windowBits,W.windowBits===0&&(W.windowBits=-15)),!(0<=W.windowBits&&W.windowBits<16)||F&&F.windowBits||(W.windowBits+=32),15<W.windowBits&&W.windowBits<48&&(15&W.windowBits)==0&&(W.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new I,this.strm.avail_out=0;var q=d.inflateInit2(this.strm,W.windowBits);if(q!==S.Z_OK)throw new Error(C[q]);this.header=new D,d.inflateGetHeader(this.strm,this.header)}function B(F,W){var q=new P(W);if(q.push(F,!0),q.err)throw q.msg||C[q.err];return q.result}P.prototype.push=function(F,W){var q,A,M,k,y,w,x=this.strm,_=this.options.chunkSize,T=this.options.dictionary,O=!1;if(this.ended)return!1;A=W===~~W?W:W===!0?S.Z_FINISH:S.Z_NO_FLUSH,typeof F=="string"?x.input=g.binstring2buf(F):z.call(F)==="[object ArrayBuffer]"?x.input=new Uint8Array(F):x.input=F,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new b.Buf8(_),x.next_out=0,x.avail_out=_),(q=d.inflate(x,S.Z_NO_FLUSH))===S.Z_NEED_DICT&&T&&(w=typeof T=="string"?g.string2buf(T):z.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,q=d.inflateSetDictionary(this.strm,w)),q===S.Z_BUF_ERROR&&O===!0&&(q=S.Z_OK,O=!1),q!==S.Z_STREAM_END&&q!==S.Z_OK)return this.onEnd(q),!(this.ended=!0);x.next_out&&(x.avail_out!==0&&q!==S.Z_STREAM_END&&(x.avail_in!==0||A!==S.Z_FINISH&&A!==S.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=g.utf8border(x.output,x.next_out),k=x.next_out-M,y=g.buf2string(x.output,M),x.next_out=k,x.avail_out=_-k,k&&b.arraySet(x.output,x.output,M,k,0),this.onData(y)):this.onData(b.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(O=!0)}while((0<x.avail_in||x.avail_out===0)&&q!==S.Z_STREAM_END);return q===S.Z_STREAM_END&&(A=S.Z_FINISH),A===S.Z_FINISH?(q=d.inflateEnd(this.strm),this.onEnd(q),this.ended=!0,q===S.Z_OK):A!==S.Z_SYNC_FLUSH||(this.onEnd(S.Z_OK),!(x.avail_out=0))},P.prototype.onData=function(F){this.chunks.push(F)},P.prototype.onEnd=function(F){F===S.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=F,this.msg=this.strm.msg},m.Inflate=P,m.inflate=B,m.inflateRaw=function(F,W){return(W=W||{}).raw=!0,B(F,W)},m.ungzip=B},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";m.assign=function(S){for(var C=Array.prototype.slice.call(arguments,1);C.length;){var I=C.shift();if(I){if(typeof I!="object")throw new TypeError(I+"must be non-object");for(var D in I)I.hasOwnProperty(D)&&(S[D]=I[D])}}return S},m.shrinkBuf=function(S,C){return S.length===C?S:S.subarray?S.subarray(0,C):(S.length=C,S)};var b={arraySet:function(S,C,I,D,z){if(C.subarray&&S.subarray)S.set(C.subarray(I,I+D),z);else for(var P=0;P<D;P++)S[z+P]=C[I+P]},flattenChunks:function(S){var C,I,D,z,P,B;for(C=D=0,I=S.length;C<I;C++)D+=S[C].length;for(B=new Uint8Array(D),C=z=0,I=S.length;C<I;C++)P=S[C],B.set(P,z),z+=P.length;return B}},g={arraySet:function(S,C,I,D,z){for(var P=0;P<D;P++)S[z+P]=C[I+P]},flattenChunks:function(S){return[].concat.apply([],S)}};m.setTyped=function(S){S?(m.Buf8=Uint8Array,m.Buf16=Uint16Array,m.Buf32=Int32Array,m.assign(m,b)):(m.Buf8=Array,m.Buf16=Array,m.Buf32=Array,m.assign(m,g))},m.setTyped(d)},{}],42:[function(h,p,m){var d=h("./common"),b=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{b=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}for(var S=new d.Buf8(256),C=0;C<256;C++)S[C]=252<=C?6:248<=C?5:240<=C?4:224<=C?3:192<=C?2:1;function I(D,z){if(z<65537&&(D.subarray&&g||!D.subarray&&b))return String.fromCharCode.apply(null,d.shrinkBuf(D,z));for(var P="",B=0;B<z;B++)P+=String.fromCharCode(D[B]);return P}S[254]=S[254]=1,m.string2buf=function(D){var z,P,B,F,W,q=D.length,A=0;for(F=0;F<q;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),A+=P<128?1:P<2048?2:P<65536?3:4;for(z=new d.Buf8(A),F=W=0;W<A;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),P<128?z[W++]=P:(P<2048?z[W++]=192|P>>>6:(P<65536?z[W++]=224|P>>>12:(z[W++]=240|P>>>18,z[W++]=128|P>>>12&63),z[W++]=128|P>>>6&63),z[W++]=128|63&P);return z},m.buf2binstring=function(D){return I(D,D.length)},m.binstring2buf=function(D){for(var z=new d.Buf8(D.length),P=0,B=z.length;P<B;P++)z[P]=D.charCodeAt(P);return z},m.buf2string=function(D,z){var P,B,F,W,q=z||D.length,A=new Array(2*q);for(P=B=0;P<q;)if((F=D[P++])<128)A[B++]=F;else if(4<(W=S[F]))A[B++]=65533,P+=W-1;else{for(F&=W===2?31:W===3?15:7;1<W&&P<q;)F=F<<6|63&D[P++],W--;1<W?A[B++]=65533:F<65536?A[B++]=F:(F-=65536,A[B++]=55296|F>>10&1023,A[B++]=56320|1023&F)}return I(A,B)},m.utf8border=function(D,z){var P;for((z=z||D.length)>D.length&&(z=D.length),P=z-1;0<=P&&(192&D[P])==128;)P--;return P<0||P===0?z:P+S[D[P]]>z?P:z}},{"./common":41}],43:[function(h,p,m){p.exports=function(d,b,g,S){for(var C=65535&d|0,I=d>>>16&65535|0,D=0;g!==0;){for(g-=D=2e3<g?2e3:g;I=I+(C=C+b[S++]|0)|0,--D;);C%=65521,I%=65521}return C|I<<16|0}},{}],44:[function(h,p,m){p.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(h,p,m){var d=(function(){for(var b,g=[],S=0;S<256;S++){b=S;for(var C=0;C<8;C++)b=1&b?3988292384^b>>>1:b>>>1;g[S]=b}return g})();p.exports=function(b,g,S,C){var I=d,D=C+S;b^=-1;for(var z=C;z<D;z++)b=b>>>8^I[255&(b^g[z])];return-1^b}},{}],46:[function(h,p,m){var d,b=h("../utils/common"),g=h("./trees"),S=h("./adler32"),C=h("./crc32"),I=h("./messages"),D=-2,z=258,P=262,B=113;function F(L,G){return L.msg=I[G],G}function W(L){return(L<<1)-(4<L?9:0)}function q(L){for(var G=L.length;0<=--G;)L[G]=0}function A(L){var G=L.state,N=G.pending;N>L.avail_out&&(N=L.avail_out),N!==0&&(b.arraySet(L.output,G.pending_buf,G.pending_out,N,L.next_out),L.next_out+=N,G.pending_out+=N,L.total_out+=N,L.avail_out-=N,G.pending-=N,G.pending===0&&(G.pending_out=0))}function M(L,G){g._tr_flush_block(L,0<=L.block_start?L.block_start:-1,L.strstart-L.block_start,G),L.block_start=L.strstart,A(L.strm)}function k(L,G){L.pending_buf[L.pending++]=G}function y(L,G){L.pending_buf[L.pending++]=G>>>8&255,L.pending_buf[L.pending++]=255&G}function w(L,G){var N,R,U=L.max_chain_length,K=L.strstart,rt=L.prev_length,Z=L.nice_match,et=L.strstart>L.w_size-P?L.strstart-(L.w_size-P):0,ht=L.window,lt=L.w_mask,Q=L.prev,ot=L.strstart+z,nt=ht[K+rt-1],ut=ht[K+rt];L.prev_length>=L.good_match&&(U>>=2),Z>L.lookahead&&(Z=L.lookahead);do if(ht[(N=G)+rt]===ut&&ht[N+rt-1]===nt&&ht[N]===ht[K]&&ht[++N]===ht[K+1]){K+=2,N++;do;while(ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&K<ot);if(R=z-(ot-K),K=ot-z,rt<R){if(L.match_start=G,Z<=(rt=R))break;nt=ht[K+rt-1],ut=ht[K+rt]}}while((G=Q[G<])>et&&--U!=0);return rt<=L.lookahead?rt:L.lookahead}function x(L){var G,N,R,U,K,rt,Z,et,ht,lt,Q=L.w_size;do{if(U=L.window_size-L.lookahead-L.strstart,L.strstart>=Q+(Q-P)){for(b.arraySet(L.window,L.window,Q,Q,0),L.match_start-=Q,L.strstart-=Q,L.block_start-=Q,G=N=L.hash_size;R=L.head[--G],L.head[G]=Q<=R?R-Q:0,--N;);for(G=N=Q;R=L.prev[--G],L.prev[G]=Q<=R?R-Q:0,--N;);U+=Q}if(L.strm.avail_in===0)break;if(rt=L.strm,Z=L.window,et=L.strstart+L.lookahead,lt=void 0,(ht=U)<(lt=rt.avail_in)&&(lt=ht),N=lt===0?0:(rt.avail_in-=lt,b.arraySet(Z,rt.input,rt.next_in,lt,et),rt.state.wrap===1?rt.adler=S(rt.adler,Z,lt,et):rt.state.wrap===2&&(rt.adler=C(rt.adler,Z,lt,et)),rt.next_in+=lt,rt.total_in+=lt,lt),L.lookahead+=N,L.lookahead+L.insert>=3)for(K=L.strstart-L.insert,L.ins_h=L.window[K],L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+1])&L.hash_mask;L.insert&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+3-1])&L.hash_mask,L.prev[K&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=K,K++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<P&&L.strm.avail_in!==0)}function _(L,G){for(var N,R;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),N!==0&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N)),L.match_length>=3)if(R=g._tr_tally(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){for(L.match_length--;L.strstart++,L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart,--L.match_length!=0;);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+1])&L.hash_mask;else R=g._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(R&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function T(L,G){for(var N,R,U;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,N!==0&&L.prev_length<L.max_lazy_match&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N),L.match_length<=5&&(L.strategy===1||L.match_length===3&&4096<L.strstart-L.match_start)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){for(U=L.strstart+L.lookahead-3,R=g._tr_tally(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;++L.strstart<=U&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),--L.prev_length!=0;);if(L.match_available=0,L.match_length=2,L.strstart++,R&&(M(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if((R=g._tr_tally(L,0,L.window[L.strstart-1]))&&M(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(R=g._tr_tally(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function O(L,G,N,R,U){this.good_length=L,this.max_lazy=G,this.nice_length=N,this.max_chain=R,this.func=U}function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new b.Buf16(1146),this.dyn_dtree=new b.Buf16(122),this.bl_tree=new b.Buf16(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new b.Buf16(16),this.heap=new b.Buf16(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new b.Buf16(573),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function V(L){var G;return L&&L.state?(L.total_in=L.total_out=0,L.data_type=2,(G=L.state).pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?42:B,L.adler=G.wrap===2?0:1,G.last_flush=0,g._tr_init(G),0):F(L,D)}function X(L){var G=V(L);return G===0&&(function(N){N.window_size=2*N.w_size,q(N.head),N.max_lazy_match=d[N.level].max_lazy,N.good_match=d[N.level].good_length,N.nice_match=d[N.level].nice_length,N.max_chain_length=d[N.level].max_chain,N.strstart=0,N.block_start=0,N.lookahead=0,N.insert=0,N.match_length=N.prev_length=2,N.match_available=0,N.ins_h=0})(L.state),G}function J(L,G,N,R,U,K){if(!L)return D;var rt=1;if(G===-1&&(G=6),R<0?(rt=0,R=-R):15<R&&(rt=2,R-=16),U<1||9<U||N!==8||R<8||15<R||G<0||9<G||K<0||4<K)return F(L,D);R===8&&(R=9);var Z=new j;return(L.state=Z).strm=L,Z.wrap=rt,Z.gzhead=null,Z.w_bits=R,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=U+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+3-1)/3),Z.window=new b.Buf8(2*Z.w_size),Z.head=new b.Buf16(Z.hash_size),Z.prev=new b.Buf16(Z.w_size),Z.lit_bufsize=1<<U+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new b.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=G,Z.strategy=K,Z.method=N,X(L)}d=[new O(0,0,0,0,(function(L,G){var N=65535;for(N>L.pending_buf_size-5&&(N=L.pending_buf_size-5);;){if(L.lookahead<=1){if(x(L),L.lookahead===0&&G===0)return 1;if(L.lookahead===0)break}L.strstart+=L.lookahead,L.lookahead=0;var R=L.block_start+N;if((L.strstart===0||L.strstart>=R)&&(L.lookahead=L.strstart-R,L.strstart=R,M(L,!1),L.strm.avail_out===0)||L.strstart-L.block_start>=L.w_size-P&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,G===4?(M(L,!0),L.strm.avail_out===0?3:4):(L.strstart>L.block_start&&(M(L,!1),L.strm.avail_out),1)})),new O(4,4,8,4,_),new O(4,5,16,8,_),new O(4,6,32,32,_),new O(4,4,16,16,T),new O(8,16,32,32,T),new O(8,16,128,128,T),new O(8,32,128,256,T),new O(32,128,258,1024,T),new O(32,258,258,4096,T)],m.deflateInit=function(L,G){return J(L,G,8,15,8,0)},m.deflateInit2=J,m.deflateReset=X,m.deflateResetKeep=V,m.deflateSetHeader=function(L,G){return L&&L.state?L.state.wrap!==2?D:(L.state.gzhead=G,0):D},m.deflate=function(L,G){var N,R,U,K;if(!L||!L.state||5<G||G<0)return L?F(L,D):D;if(R=L.state,!L.output||!L.input&&L.avail_in!==0||R.status===666&&G!==4)return F(L,L.avail_out===0?-5:D);if(R.strm=L,N=R.last_flush,R.last_flush=G,R.status===42)if(R.wrap===2)L.adler=0,k(R,31),k(R,139),k(R,8),R.gzhead?(k(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),k(R,255&R.gzhead.time),k(R,R.gzhead.time>>8&255),k(R,R.gzhead.time>>16&255),k(R,R.gzhead.time>>24&255),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(k(R,255&R.gzhead.extra.length),k(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(L.adler=C(L.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(k(R,0),k(R,0),k(R,0),k(R,0),k(R,0),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,3),R.status=B);else{var rt=8+(R.w_bits-8<<4)<<8;rt|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(rt|=32),rt+=31-rt%31,R.status=B,y(R,rt),R.strstart!==0&&(y(R,L.adler>>>16),y(R,65535&L.adler)),L.adler=1}if(R.status===69)if(R.gzhead.extra){for(U=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending!==R.pending_buf_size));)k(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&A(L),R.pending+2<=R.pending_buf_size&&(k(R,255&L.adler),k(R,L.adler>>8&255),L.adler=0,R.status=B)):R.status=B),R.pending!==0){if(A(L),L.avail_out===0)return R.last_flush=-1,0}else if(L.avail_in===0&&W(G)<=W(N)&&G!==4)return F(L,-5);if(R.status===666&&L.avail_in!==0)return F(L,-5);if(L.avail_in!==0||R.lookahead!==0||G!==0&&R.status!==666){var Z=R.strategy===2?(function(et,ht){for(var lt;;){if(et.lookahead===0&&(x(et),et.lookahead===0)){if(ht===0)return 1;break}if(et.match_length=0,lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++,lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):R.strategy===3?(function(et,ht){for(var lt,Q,ot,nt,ut=et.window;;){if(et.lookahead<=z){if(x(et),et.lookahead<=z&&ht===0)return 1;if(et.lookahead===0)break}if(et.match_length=0,et.lookahead>=3&&0<et.strstart&&(Q=ut[ot=et.strstart-1])===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]){nt=et.strstart+z;do;while(Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&ot<nt);et.match_length=z-(nt-ot),et.match_length>et.lookahead&&(et.match_length=et.lookahead)}if(et.match_length>=3?(lt=g._tr_tally(et,1,et.match_length-3),et.lookahead-=et.match_length,et.strstart+=et.match_length,et.match_length=0):(lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++),lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):d[R.level].func(R,G);if(Z!==3&&Z!==4||(R.status=666),Z===1||Z===3)return L.avail_out===0&&(R.last_flush=-1),0;if(Z===2&&(G===1?g._tr_align(R):G!==5&&(g._tr_stored_block(R,0,0,!1),G===3&&(q(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),A(L),L.avail_out===0))return R.last_flush=-1,0}return G!==4?0:R.wrap<=0?1:(R.wrap===2?(k(R,255&L.adler),k(R,L.adler>>8&255),k(R,L.adler>>16&255),k(R,L.adler>>24&255),k(R,255&L.total_in),k(R,L.total_in>>8&255),k(R,L.total_in>>16&255),k(R,L.total_in>>24&255)):(y(R,L.adler>>>16),y(R,65535&L.adler)),A(L),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?0:1)},m.deflateEnd=function(L){var G;return L&&L.state?(G=L.state.status)!==42&&G!==69&&G!==73&&G!==91&&G!==103&&G!==B&&G!==666?F(L,D):(L.state=null,G===B?F(L,-3):0):D},m.deflateSetDictionary=function(L,G){var N,R,U,K,rt,Z,et,ht,lt=G.length;if(!L||!L.state||(K=(N=L.state).wrap)===2||K===1&&N.status!==42||N.lookahead)return D;for(K===1&&(L.adler=S(L.adler,G,lt,0)),N.wrap=0,lt>=N.w_size&&(K===0&&(q(N.head),N.strstart=0,N.block_start=0,N.insert=0),ht=new b.Buf8(N.w_size),b.arraySet(ht,G,lt-N.w_size,N.w_size,0),G=ht,lt=N.w_size),rt=L.avail_in,Z=L.next_in,et=L.input,L.avail_in=lt,L.next_in=0,L.input=G,x(N);N.lookahead>=3;){for(R=N.strstart,U=N.lookahead-2;N.ins_h=(N.ins_h<<N.hash_shift^N.window[R+3-1])&N.hash_mask,N.prev[R&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=R,R++,--U;);N.strstart=R,N.lookahead=2,x(N)}return N.strstart+=N.lookahead,N.block_start=N.strstart,N.insert=N.lookahead,N.lookahead=0,N.match_length=N.prev_length=2,N.match_available=0,L.next_in=Z,L.input=et,L.avail_in=rt,N.wrap=K,0},m.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(h,p,m){p.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(h,p,m){p.exports=function(d,b){var g,S,C,I,D,z,P,B,F,W,q,A,M,k,y,w,x,_,T,O,j,V,X,J,L;g=d.state,S=d.next_in,J=d.input,C=S+(d.avail_in-5),I=d.next_out,L=d.output,D=I-(b-d.avail_out),z=I+(d.avail_out-257),P=g.dmax,B=g.wsize,F=g.whave,W=g.wnext,q=g.window,A=g.hold,M=g.bits,k=g.lencode,y=g.distcode,w=(1<<g.lenbits)-1,x=(1<<g.distbits)-1;t:do{M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=k[A&w];e:for(;;){if(A>>>=T=_>>>24,M-=T,(T=_>>>16&255)==0)L[I++]=65535&_;else{if(!(16&T)){if((64&T)==0){_=k[(65535&_)+(A&(1<<T)-1)];continue e}if(32&T){g.mode=12;break t}d.msg="invalid literal/length code",g.mode=30;break t}O=65535&_,(T&=15)&&(M<T&&(A+=J[S++]<<M,M+=8),O+=A&(1<<T)-1,A>>>=T,M-=T),M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=y[A&x];r:for(;;){if(A>>>=T=_>>>24,M-=T,!(16&(T=_>>>16&255))){if((64&T)==0){_=y[(65535&_)+(A&(1<<T)-1)];continue r}d.msg="invalid distance code",g.mode=30;break t}if(j=65535&_,M<(T&=15)&&(A+=J[S++]<<M,(M+=8)<T&&(A+=J[S++]<<M,M+=8)),P<(j+=A&(1<<T)-1)){d.msg="invalid distance too far back",g.mode=30;break t}if(A>>>=T,M-=T,(T=I-D)<j){if(F<(T=j-T)&&g.sane){d.msg="invalid distance too far back",g.mode=30;break t}if(X=q,(V=0)===W){if(V+=B-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}}else if(W<T){if(V+=B+W-T,(T-=W)<O){for(O-=T;L[I++]=q[V++],--T;);if(V=0,W<O){for(O-=T=W;L[I++]=q[V++],--T;);V=I-j,X=L}}}else if(V+=W-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}for(;2<O;)L[I++]=X[V++],L[I++]=X[V++],L[I++]=X[V++],O-=3;O&&(L[I++]=X[V++],1<O&&(L[I++]=X[V++]))}else{for(V=I-j;L[I++]=L[V++],L[I++]=L[V++],L[I++]=L[V++],2<(O-=3););O&&(L[I++]=L[V++],1<O&&(L[I++]=L[V++]))}break}}break}}while(S<C&&I<z);S-=O=M>>3,A&=(1<<(M-=O<<3))-1,d.next_in=S,d.next_out=I,d.avail_in=S<C?C-S+5:5-(S-C),d.avail_out=I<z?z-I+257:257-(I-z),g.hold=A,g.bits=M}},{}],49:[function(h,p,m){var d=h("../utils/common"),b=h("./adler32"),g=h("./crc32"),S=h("./inffast"),C=h("./inftrees"),I=-2;function D(w){return(w>>>24&255)+(w>>>8&65280)+((65280&w)<<8)+((255&w)<<24)}function z(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function P(w){var x;return w&&w.state?(x=w.state,w.total_in=w.total_out=x.total=0,w.msg="",x.wrap&&(w.adler=1&x.wrap),x.mode=1,x.last=0,x.havedict=0,x.dmax=32768,x.head=null,x.hold=0,x.bits=0,x.lencode=x.lendyn=new d.Buf32(852),x.distcode=x.distdyn=new d.Buf32(592),x.sane=1,x.back=-1,0):I}function B(w){var x;return w&&w.state?((x=w.state).wsize=0,x.whave=0,x.wnext=0,P(w)):I}function F(w,x){var _,T;return w&&w.state?(T=w.state,x<0?(_=0,x=-x):(_=1+(x>>4),x<48&&(x&=15)),x&&(x<8||15<x)?I:(T.window!==null&&T.wbits!==x&&(T.window=null),T.wrap=_,T.wbits=x,B(w))):I}function W(w,x){var _,T;return w?(T=new z,(w.state=T).window=null,(_=F(w,x))!==0&&(w.state=null),_):I}var q,A,M=!0;function k(w){if(M){var x;for(q=new d.Buf32(512),A=new d.Buf32(32),x=0;x<144;)w.lens[x++]=8;for(;x<256;)w.lens[x++]=9;for(;x<280;)w.lens[x++]=7;for(;x<288;)w.lens[x++]=8;for(C(1,w.lens,0,288,q,0,w.work,{bits:9}),x=0;x<32;)w.lens[x++]=5;C(2,w.lens,0,32,A,0,w.work,{bits:5}),M=!1}w.lencode=q,w.lenbits=9,w.distcode=A,w.distbits=5}function y(w,x,_,T){var O,j=w.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new d.Buf8(j.wsize)),T>=j.wsize?(d.arraySet(j.window,x,_-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(T<(O=j.wsize-j.wnext)&&(O=T),d.arraySet(j.window,x,_-T,O,j.wnext),(T-=O)?(d.arraySet(j.window,x,_-T,T,0),j.wnext=T,j.whave=j.wsize):(j.wnext+=O,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=O))),0}m.inflateReset=B,m.inflateReset2=F,m.inflateResetKeep=P,m.inflateInit=function(w){return W(w,15)},m.inflateInit2=W,m.inflate=function(w,x){var _,T,O,j,V,X,J,L,G,N,R,U,K,rt,Z,et,ht,lt,Q,ot,nt,ut,ct,ft,mt=0,gt=new d.Buf8(4),xt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!w||!w.state||!w.output||!w.input&&w.avail_in!==0)return I;(_=w.state).mode===12&&(_.mode=13),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,N=X,R=J,ut=0;t:for(;;)switch(_.mode){case 1:if(_.wrap===0){_.mode=13;break}for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(2&_.wrap&&L===35615){gt[_.check=0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0),G=L=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&L)<<8)+(L>>8))%31){w.msg="incorrect header check",_.mode=30;break}if((15&L)!=8){w.msg="unknown compression method",_.mode=30;break}if(G-=4,nt=8+(15&(L>>>=4)),_.wbits===0)_.wbits=nt;else if(nt>_.wbits){w.msg="invalid window size",_.mode=30;break}_.dmax=1<<nt,w.adler=_.check=1,_.mode=512&L?10:12,G=L=0;break;case 2:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.flags=L,(255&_.flags)!=8){w.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){w.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=L>>8&1),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=3;case 3:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.time=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,gt[2]=L>>>16&255,gt[3]=L>>>24&255,_.check=g(_.check,gt,4,0)),G=L=0,_.mode=4;case 4:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.xflags=255&L,_.head.os=L>>8),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=5;case 5:if(1024&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length=L,_.head&&(_.head.extra_len=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(X<(U=_.length)&&(U=X),U&&(_.head&&(nt=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),d.arraySet(_.head.extra,T,j,U,nt)),512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,_.length-=U),_.length))break t;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.name+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.comment+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(65535&_.check)){w.msg="header crc mismatch",_.mode=30;break}G=L=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),w.adler=_.check=0,_.mode=12;break;case 10:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}w.adler=_.check=D(L),G=L=0,_.mode=11;case 11:if(_.havedict===0)return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,2;w.adler=_.check=1,_.mode=12;case 12:if(x===5||x===6)break t;case 13:if(_.last){L>>>=7&G,G-=7&G,_.mode=27;break}for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}switch(_.last=1&L,G-=1,3&(L>>>=1)){case 0:_.mode=14;break;case 1:if(k(_),_.mode=20,x!==6)break;L>>>=2,G-=2;break t;case 2:_.mode=17;break;case 3:w.msg="invalid block type",_.mode=30}L>>>=2,G-=2;break;case 14:for(L>>>=7&G,G-=7&G;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((65535&L)!=(L>>>16^65535)){w.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&L,G=L=0,_.mode=15,x===6)break t;case 15:_.mode=16;case 16:if(U=_.length){if(X<U&&(U=X),J<U&&(U=J),U===0)break t;d.arraySet(O,T,j,U,V),X-=U,j+=U,J-=U,V+=U,_.length-=U;break}_.mode=12;break;case 17:for(;G<14;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.nlen=257+(31&L),L>>>=5,G-=5,_.ndist=1+(31&L),L>>>=5,G-=5,_.ncode=4+(15&L),L>>>=4,G-=4,286<_.nlen||30<_.ndist){w.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.lens[xt[_.have++]]=7&L,L>>>=3,G-=3}for(;_.have<19;)_.lens[xt[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,ct={bits:_.lenbits},ut=C(0,_.lens,0,19,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(ht<16)L>>>=Z,G-=Z,_.lens[_.have++]=ht;else{if(ht===16){for(ft=Z+2;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L>>>=Z,G-=Z,_.have===0){w.msg="invalid bit length repeat",_.mode=30;break}nt=_.lens[_.have-1],U=3+(3&L),L>>>=2,G-=2}else if(ht===17){for(ft=Z+3;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=3+(7&(L>>>=Z)),L>>>=3,G-=3}else{for(ft=Z+7;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=11+(127&(L>>>=Z)),L>>>=7,G-=7}if(_.have+U>_.nlen+_.ndist){w.msg="invalid bit length repeat",_.mode=30;break}for(;U--;)_.lens[_.have++]=nt}}if(_.mode===30)break;if(_.lens[256]===0){w.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,ct={bits:_.lenbits},ut=C(1,_.lens,0,_.nlen,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,ct={bits:_.distbits},ut=C(2,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,ct),_.distbits=ct.bits,ut){w.msg="invalid distances set",_.mode=30;break}if(_.mode=20,x===6)break t;case 20:_.mode=21;case 21:if(6<=X&&258<=J){w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,S(w,R),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(et&&(240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.lencode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,_.length=ht,et===0){_.mode=26;break}if(32&et){_.back=-1,_.mode=12;break}if(64&et){w.msg="invalid literal/length code",_.mode=30;break}_.extra=15&et,_.mode=22;case 22:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;et=(mt=_.distcode[L&(1<<_.distbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.distcode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,64&et){w.msg="invalid distance code",_.mode=30;break}_.offset=ht,_.extra=15&et,_.mode=24;case 24:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.offset+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){w.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(J===0)break t;if(U=R-J,_.offset>U){if((U=_.offset-U)>_.whave&&_.sane){w.msg="invalid distance too far back",_.mode=30;break}K=U>_.wnext?(U-=_.wnext,_.wsize-U):_.wnext-U,U>_.length&&(U=_.length),rt=_.window}else rt=O,K=V-_.offset,U=_.length;for(J<U&&(U=J),J-=U,_.length-=U;O[V++]=rt[K++],--U;);_.length===0&&(_.mode=21);break;case 26:if(J===0)break t;O[V++]=_.length,J--,_.mode=21;break;case 27:if(_.wrap){for(;G<32;){if(X===0)break t;X--,L|=T[j++]<<G,G+=8}if(R-=J,w.total_out+=R,_.total+=R,R&&(w.adler=_.check=_.flags?g(_.check,O,R,V-R):b(_.check,O,R,V-R)),R=J,(_.flags?L:D(L))!==_.check){w.msg="incorrect data check",_.mode=30;break}G=L=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(4294967295&_.total)){w.msg="incorrect length check",_.mode=30;break}G=L=0}_.mode=29;case 29:ut=1;break t;case 30:ut=-3;break t;case 31:return-4;case 32:default:return I}return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,(_.wsize||R!==w.avail_out&&_.mode<30&&(_.mode<27||x!==4))&&y(w,w.output,w.next_out,R-w.avail_out)?(_.mode=31,-4):(N-=w.avail_in,R-=w.avail_out,w.total_in+=N,w.total_out+=R,_.total+=R,_.wrap&&R&&(w.adler=_.check=_.flags?g(_.check,O,R,w.next_out-R):b(_.check,O,R,w.next_out-R)),w.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(N==0&&R===0||x===4)&&ut===0&&(ut=-5),ut)},m.inflateEnd=function(w){if(!w||!w.state)return I;var x=w.state;return x.window&&(x.window=null),w.state=null,0},m.inflateGetHeader=function(w,x){var _;return w&&w.state?(2&(_=w.state).wrap)==0?I:((_.head=x).done=!1,0):I},m.inflateSetDictionary=function(w,x){var _,T=x.length;return w&&w.state?(_=w.state).wrap!==0&&_.mode!==11?I:_.mode===11&&b(1,x,T,0)!==_.check?-3:y(w,x,T,T)?(_.mode=31,-4):(_.havedict=1,0):I},m.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(h,p,m){var d=h("../utils/common"),b=[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,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],S=[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,0,0],C=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];p.exports=function(I,D,z,P,B,F,W,q){var A,M,k,y,w,x,_,T,O,j=q.bits,V=0,X=0,J=0,L=0,G=0,N=0,R=0,U=0,K=0,rt=0,Z=null,et=0,ht=new d.Buf16(16),lt=new d.Buf16(16),Q=null,ot=0;for(V=0;V<=15;V++)ht[V]=0;for(X=0;X<P;X++)ht[D[z+X]]++;for(G=j,L=15;1<=L&&ht[L]===0;L--);if(L<G&&(G=L),L===0)return B[F++]=20971520,B[F++]=20971520,q.bits=1,0;for(J=1;J<L&&ht[J]===0;J++);for(G<J&&(G=J),V=U=1;V<=15;V++)if(U<<=1,(U-=ht[V])<0)return-1;if(0<U&&(I===0||L!==1))return-1;for(lt[1]=0,V=1;V<15;V++)lt[V+1]=lt[V]+ht[V];for(X=0;X<P;X++)D[z+X]!==0&&(W[lt[D[z+X]]++]=X);if(x=I===0?(Z=Q=W,19):I===1?(Z=b,et-=257,Q=g,ot-=257,256):(Z=S,Q=C,-1),V=J,w=F,R=X=rt=0,k=-1,y=(K=1<<(N=G))-1,I===1&&852<K||I===2&&592<K)return 1;for(;;){for(_=V-R,O=W[X]<x?(T=0,W[X]):W[X]>x?(T=Q[ot+W[X]],Z[et+W[X]]):(T=96,0),A=1<<V-R,J=M=1<<N;B[w+(rt>>R)+(M-=A)]=_<<24|T<<16|O|0,M!==0;);for(A=1<<V-1;rt&A;)A>>=1;if(A!==0?(rt&=A-1,rt+=A):rt=0,X++,--ht[V]==0){if(V===L)break;V=D[z+W[X]]}if(G<V&&(rt&y)!==k){for(R===0&&(R=G),w+=J,U=1<<(N=V-R);N+R<L&&!((U-=ht[N+R])<=0);)N++,U<<=1;if(K+=1<<N,I===1&&852<K||I===2&&592<K)return 1;B[k=rt&y]=G<<24|N<<16|w-F|0}}return rt!==0&&(B[w+rt]=V-R<<24|64<<16|0),q.bits=G,0}},{"../utils/common":41}],51:[function(h,p,m){p.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(h,p,m){var d=h("../utils/common");function b(Q){for(var ot=Q.length;0<=--ot;)Q[ot]=0}var g=256,S=286,C=30,I=15,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=new Array(576);b(F);var W=new Array(60);b(W);var q=new Array(512);b(q);var A=new Array(256);b(A);var M=new Array(29);b(M);var k,y,w,x=new Array(C);function _(Q,ot,nt,ut,ct){this.static_tree=Q,this.extra_bits=ot,this.extra_base=nt,this.elems=ut,this.max_length=ct,this.has_stree=Q&&Q.length}function T(Q,ot){this.dyn_tree=Q,this.max_code=0,this.stat_desc=ot}function O(Q){return Q<256?q[Q]:q[256+(Q>>>7)]}function j(Q,ot){Q.pending_buf[Q.pending++]=255&ot,Q.pending_buf[Q.pending++]=ot>>>8&255}function V(Q,ot,nt){Q.bi_valid>16-nt?(Q.bi_buf|=ot<<Q.bi_valid&65535,j(Q,Q.bi_buf),Q.bi_buf=ot>>16-Q.bi_valid,Q.bi_valid+=nt-16):(Q.bi_buf|=ot<<Q.bi_valid&65535,Q.bi_valid+=nt)}function X(Q,ot,nt){V(Q,nt[2*ot],nt[2*ot+1])}function J(Q,ot){for(var nt=0;nt|=1&Q,Q>>>=1,nt<<=1,0<--ot;);return nt>>>1}function L(Q,ot,nt){var ut,ct,ft=new Array(16),mt=0;for(ut=1;ut<=I;ut++)ft[ut]=mt=mt+nt[ut-1]<<1;for(ct=0;ct<=ot;ct++){var gt=Q[2*ct+1];gt!==0&&(Q[2*ct]=J(ft[gt]++,gt))}}function G(Q){var ot;for(ot=0;ot<S;ot++)Q.dyn_ltree[2*ot]=0;for(ot=0;ot<C;ot++)Q.dyn_dtree[2*ot]=0;for(ot=0;ot<19;ot++)Q.bl_tree[2*ot]=0;Q.dyn_ltree[512]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function N(Q){8<Q.bi_valid?j(Q,Q.bi_buf):0<Q.bi_valid&&(Q.pending_buf[Q.pending++]=Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0}function R(Q,ot,nt,ut){var ct=2*ot,ft=2*nt;return Q[ct]<Q[ft]||Q[ct]===Q[ft]&&ut[ot]<=ut[nt]}function U(Q,ot,nt){for(var ut=Q.heap[nt],ct=nt<<1;ct<=Q.heap_len&&(ct<Q.heap_len&&R(ot,Q.heap[ct+1],Q.heap[ct],Q.depth)&&ct++,!R(ot,ut,Q.heap[ct],Q.depth));)Q.heap[nt]=Q.heap[ct],nt=ct,ct<<=1;Q.heap[nt]=ut}function K(Q,ot,nt){var ut,ct,ft,mt,gt=0;if(Q.last_lit!==0)for(;ut=Q.pending_buf[Q.d_buf+2*gt]<<8|Q.pending_buf[Q.d_buf+2*gt+1],ct=Q.pending_buf[Q.l_buf+gt],gt++,ut===0?X(Q,ct,ot):(X(Q,(ft=A[ct])+g+1,ot),(mt=D[ft])!==0&&V(Q,ct-=M[ft],mt),X(Q,ft=O(--ut),nt),(mt=z[ft])!==0&&V(Q,ut-=x[ft],mt)),gt<Q.last_lit;);X(Q,256,ot)}function rt(Q,ot){var nt,ut,ct,ft=ot.dyn_tree,mt=ot.stat_desc.static_tree,gt=ot.stat_desc.has_stree,xt=ot.stat_desc.elems,Nt=-1;for(Q.heap_len=0,Q.heap_max=573,nt=0;nt<xt;nt++)ft[2*nt]!==0?(Q.heap[++Q.heap_len]=Nt=nt,Q.depth[nt]=0):ft[2*nt+1]=0;for(;Q.heap_len<2;)ft[2*(ct=Q.heap[++Q.heap_len]=Nt<2?++Nt:0)]=1,Q.depth[ct]=0,Q.opt_len--,gt&&(Q.static_len-=mt[2*ct+1]);for(ot.max_code=Nt,nt=Q.heap_len>>1;1<=nt;nt--)U(Q,ft,nt);for(ct=xt;nt=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],U(Q,ft,1),ut=Q.heap[1],Q.heap[--Q.heap_max]=nt,Q.heap[--Q.heap_max]=ut,ft[2*ct]=ft[2*nt]+ft[2*ut],Q.depth[ct]=(Q.depth[nt]>=Q.depth[ut]?Q.depth[nt]:Q.depth[ut])+1,ft[2*nt+1]=ft[2*ut+1]=ct,Q.heap[1]=ct++,U(Q,ft,1),2<=Q.heap_len;);Q.heap[--Q.heap_max]=Q.heap[1],(function(It,At){var Ut,Ht,zt,Xt,jt,Ct,$t=At.dyn_tree,qt=At.max_code,Pt=At.stat_desc.static_tree,fe=At.stat_desc.has_stree,ke=At.stat_desc.extra_bits,Yt=At.stat_desc.extra_base,we=At.stat_desc.max_length,ue=0;for(Xt=0;Xt<=I;Xt++)It.bl_count[Xt]=0;for($t[2*It.heap[It.heap_max]+1]=0,Ut=It.heap_max+1;Ut<573;Ut++)we<(Xt=$t[2*$t[2*(Ht=It.heap[Ut])+1]+1]+1)&&(Xt=we,ue++),$t[2*Ht+1]=Xt,qt<Ht||(It.bl_count[Xt]++,jt=0,Yt<=Ht&&(jt=ke[Ht-Yt]),Ct=$t[2*Ht],It.opt_len+=Ct*(Xt+jt),fe&&(It.static_len+=Ct*(Pt[2*Ht+1]+jt)));if(ue!==0){do{for(Xt=we-1;It.bl_count[Xt]===0;)Xt--;It.bl_count[Xt]--,It.bl_count[Xt+1]+=2,It.bl_count[we]--,ue-=2}while(0<ue);for(Xt=we;Xt!==0;Xt--)for(Ht=It.bl_count[Xt];Ht!==0;)qt<(zt=It.heap[--Ut])||($t[2*zt+1]!==Xt&&(It.opt_len+=(Xt-$t[2*zt+1])*$t[2*zt],$t[2*zt+1]=Xt),Ht--)}})(Q,ot),L(ft,Nt,Q.bl_count)}function Z(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ot[2*(nt+1)+1]=65535,ut=0;ut<=nt;ut++)ct=mt,mt=ot[2*(ut+1)+1],++gt<xt&&ct===mt||(gt<Nt?Q.bl_tree[2*ct]+=gt:ct!==0?(ct!==ft&&Q.bl_tree[2*ct]++,Q.bl_tree[32]++):gt<=10?Q.bl_tree[34]++:Q.bl_tree[36]++,ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4))}function et(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ut=0;ut<=nt;ut++)if(ct=mt,mt=ot[2*(ut+1)+1],!(++gt<xt&&ct===mt)){if(gt<Nt)for(;X(Q,ct,Q.bl_tree),--gt!=0;);else ct!==0?(ct!==ft&&(X(Q,ct,Q.bl_tree),gt--),X(Q,16,Q.bl_tree),V(Q,gt-3,2)):gt<=10?(X(Q,17,Q.bl_tree),V(Q,gt-3,3)):(X(Q,18,Q.bl_tree),V(Q,gt-11,7));ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4)}}b(x);var ht=!1;function lt(Q,ot,nt,ut){V(Q,0+(ut?1:0),3),(function(ct,ft,mt,gt){N(ct),j(ct,mt),j(ct,~mt),d.arraySet(ct.pending_buf,ct.window,ft,mt,ct.pending),ct.pending+=mt})(Q,ot,nt)}m._tr_init=function(Q){ht||((function(){var ot,nt,ut,ct,ft,mt=new Array(16);for(ct=ut=0;ct<28;ct++)for(M[ct]=ut,ot=0;ot<1<<D[ct];ot++)A[ut++]=ct;for(A[ut-1]=ct,ct=ft=0;ct<16;ct++)for(x[ct]=ft,ot=0;ot<1<<z[ct];ot++)q[ft++]=ct;for(ft>>=7;ct<C;ct++)for(x[ct]=ft<<7,ot=0;ot<1<<z[ct]-7;ot++)q[256+ft++]=ct;for(nt=0;nt<=I;nt++)mt[nt]=0;for(ot=0;ot<=143;)F[2*ot+1]=8,ot++,mt[8]++;for(;ot<=255;)F[2*ot+1]=9,ot++,mt[9]++;for(;ot<=279;)F[2*ot+1]=7,ot++,mt[7]++;for(;ot<=287;)F[2*ot+1]=8,ot++,mt[8]++;for(L(F,287,mt),ot=0;ot<C;ot++)W[2*ot+1]=5,W[2*ot]=J(ot,5);k=new _(F,D,257,S,I),y=new _(W,z,0,C,I),w=new _(new Array(0),P,0,19,7)})(),ht=!0),Q.l_desc=new T(Q.dyn_ltree,k),Q.d_desc=new T(Q.dyn_dtree,y),Q.bl_desc=new T(Q.bl_tree,w),Q.bi_buf=0,Q.bi_valid=0,G(Q)},m._tr_stored_block=lt,m._tr_flush_block=function(Q,ot,nt,ut){var ct,ft,mt=0;0<Q.level?(Q.strm.data_type===2&&(Q.strm.data_type=(function(gt){var xt,Nt=4093624447;for(xt=0;xt<=31;xt++,Nt>>>=1)if(1&Nt&>.dyn_ltree[2*xt]!==0)return 0;if(gt.dyn_ltree[18]!==0||gt.dyn_ltree[20]!==0||gt.dyn_ltree[26]!==0)return 1;for(xt=32;xt<g;xt++)if(gt.dyn_ltree[2*xt]!==0)return 1;return 0})(Q)),rt(Q,Q.l_desc),rt(Q,Q.d_desc),mt=(function(gt){var xt;for(Z(gt,gt.dyn_ltree,gt.l_desc.max_code),Z(gt,gt.dyn_dtree,gt.d_desc.max_code),rt(gt,gt.bl_desc),xt=18;3<=xt&>.bl_tree[2*B[xt]+1]===0;xt--);return gt.opt_len+=3*(xt+1)+5+5+4,xt})(Q),ct=Q.opt_len+3+7>>>3,(ft=Q.static_len+3+7>>>3)<=ct&&(ct=ft)):ct=ft=nt+5,nt+4<=ct&&ot!==-1?lt(Q,ot,nt,ut):Q.strategy===4||ft===ct?(V(Q,2+(ut?1:0),3),K(Q,F,W)):(V(Q,4+(ut?1:0),3),(function(gt,xt,Nt,It){var At;for(V(gt,xt-257,5),V(gt,Nt-1,5),V(gt,It-4,4),At=0;At<It;At++)V(gt,gt.bl_tree[2*B[At]+1],3);et(gt,gt.dyn_ltree,xt-1),et(gt,gt.dyn_dtree,Nt-1)})(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,mt+1),K(Q,Q.dyn_ltree,Q.dyn_dtree)),G(Q),ut&&N(Q)},m._tr_tally=function(Q,ot,nt){return Q.pending_buf[Q.d_buf+2*Q.last_lit]=ot>>>8&255,Q.pending_buf[Q.d_buf+2*Q.last_lit+1]=255&ot,Q.pending_buf[Q.l_buf+Q.last_lit]=255&nt,Q.last_lit++,ot===0?Q.dyn_ltree[2*nt]++:(Q.matches++,ot--,Q.dyn_ltree[2*(A[nt]+g+1)]++,Q.dyn_dtree[2*O(ot)]++),Q.last_lit===Q.lit_bufsize-1},m._tr_align=function(Q){V(Q,2,3),X(Q,256,F),(function(ot){ot.bi_valid===16?(j(ot,ot.bi_buf),ot.bi_buf=0,ot.bi_valid=0):8<=ot.bi_valid&&(ot.pending_buf[ot.pending++]=255&ot.bi_buf,ot.bi_buf>>=8,ot.bi_valid-=8)})(Q)}},{"../utils/common":41}],53:[function(h,p,m){p.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(h,p,m){(function(d){(function(b,g){if(!b.setImmediate){var S,C,I,D,z=1,P={},B=!1,F=b.document,W=Object.getPrototypeOf&&Object.getPrototypeOf(b);W=W&&W.setTimeout?W:b,S={}.toString.call(b.process)==="[object process]"?function(k){o.nextTick((function(){A(k)}))}:(function(){if(b.postMessage&&!b.importScripts){var k=!0,y=b.onmessage;return b.onmessage=function(){k=!1},b.postMessage("","*"),b.onmessage=y,k}})()?(D="setImmediate$"+Math.random()+"$",b.addEventListener?b.addEventListener("message",M,!1):b.attachEvent("onmessage",M),function(k){b.postMessage(D+k,"*")}):b.MessageChannel?((I=new MessageChannel).port1.onmessage=function(k){A(k.data)},function(k){I.port2.postMessage(k)}):F&&"onreadystatechange"in F.createElement("script")?(C=F.documentElement,function(k){var y=F.createElement("script");y.onreadystatechange=function(){A(k),y.onreadystatechange=null,C.removeChild(y),y=null},C.appendChild(y)}):function(k){setTimeout(A,0,k)},W.setImmediate=function(k){typeof k!="function"&&(k=new Function(""+k));for(var y=new Array(arguments.length-1),w=0;w<y.length;w++)y[w]=arguments[w+1];var x={callback:k,args:y};return P[z]=x,S(z),z++},W.clearImmediate=q}function q(k){delete P[k]}function A(k){if(B)setTimeout(A,0,k);else{var y=P[k];if(y){B=!0;try{(function(w){var x=w.callback,_=w.args;switch(_.length){case 0:x();break;case 1:x(_[0]);break;case 2:x(_[0],_[1]);break;case 3:x(_[0],_[1],_[2]);break;default:x.apply(void 0,_)}})(y)}finally{q(k),B=!1}}}}function M(k){k.source===b&&typeof k.data=="string"&&k.data.indexOf(D)===0&&A(+k.data.slice(D.length))}})(typeof self>"u"?d===void 0?this:d:self)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}))}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],t("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(t,l,c){(function(o){(function(){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source),s=typeof o=="object"&&o&&o.Object===Object&&o,e=typeof self=="object"&&self&&self.Object===Object&&self,i=s||e||Function("return this")(),u=Object.prototype.toString,a=i.Symbol,h=a?a.prototype:void 0,p=h?h.toString:void 0;function m(d){if(typeof d=="string")return d;if((function(g){return typeof g=="symbol"||(function(S){return!!S&&typeof S=="object"})(g)&&u.call(g)=="[object Symbol]"})(d))return p?p.call(d):"";var b=d+"";return b=="0"&&1/d==-1/0?"-0":b}l.exports=function(d){var b;return(d=(b=d)==null?"":m(b))&&n.test(d)?d.replace(r,"\\$&"):d}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,a=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[r]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b["[object Function]"]=b[n]=b["[object Number]"]=b[s]=b["[object RegExp]"]=b[e]=b["[object String]"]=b["[object WeakMap]"]=!1;var g=typeof o=="object"&&o&&o.Object===Object&&o,S=typeof self=="object"&&self&&self.Object===Object&&self,C=g||S||Function("return this")(),I=typeof c=="object"&&c&&!c.nodeType&&c,D=I&&typeof l=="object"&&l&&!l.nodeType&&l,z=D&&D.exports===I&&g.process,P=(function(){try{return z&&z.binding("util")}catch{}})(),B=P&&P.isTypedArray;function F(st,pt,wt,_t){for(var Bt=-1,Et=st?st.length:0;++Bt<Et;){var Rt=st[Bt];pt(_t,Rt,wt(Rt),st)}return _t}function W(st,pt){for(var wt=-1,_t=st?st.length:0;++wt<_t;)if(pt(st[wt],wt,st))return!0;return!1}function q(st){var pt=!1;if(st!=null&&typeof st.toString!="function")try{pt=!!(st+"")}catch{}return pt}function A(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t,Bt){wt[++pt]=[Bt,_t]})),wt}function M(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t){wt[++pt]=_t})),wt}var k,y,w,x=Array.prototype,_=Function.prototype,T=Object.prototype,O=C["__core-js_shared__"],j=(k=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",V=_.toString,X=T.hasOwnProperty,J=T.toString,L=RegExp("^"+V.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=C.Symbol,N=C.Uint8Array,R=T.propertyIsEnumerable,U=x.splice,K=(y=Object.keys,w=Object,function(st){return y(w(st))}),rt=Qt(C,"DataView"),Z=Qt(C,"Map"),et=Qt(C,"Promise"),ht=Qt(C,"Set"),lt=Qt(C,"WeakMap"),Q=Qt(Object,"create"),ot=dt(rt),nt=dt(Z),ut=dt(et),ct=dt(ht),ft=dt(lt),mt=G?G.prototype:void 0,gt=mt?mt.valueOf:void 0,xt=mt?mt.toString:void 0;function Nt(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function It(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function At(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function Ut(st){var pt=-1,wt=st?st.length:0;for(this.__data__=new At;++pt<wt;)this.add(st[pt])}function Ht(st){this.__data__=new It(st)}function zt(st,pt){var wt=Zt(st)||ee(st)?(function(Rt,ge){for(var oe=-1,he=Array(Rt);++oe<Rt;)he[oe]=ge(oe);return he})(st.length,String):[],_t=wt.length,Bt=!!_t;for(var Et in st)!X.call(st,Et)||Bt&&(Et=="length"||Te(Et,_t))||wt.push(Et);return wt}function Xt(st,pt){for(var wt=st.length;wt--;)if(Mt(st[wt][0],pt))return wt;return-1}function jt(st,pt,wt,_t){return $t(st,(function(Bt,Et,Rt){pt(_t,Bt,wt(Bt),Rt)})),_t}Nt.prototype.clear=function(){this.__data__=Q?Q(null):{}},Nt.prototype.delete=function(st){return this.has(st)&&delete this.__data__[st]},Nt.prototype.get=function(st){var pt=this.__data__;if(Q){var wt=pt[st];return wt==="__lodash_hash_undefined__"?void 0:wt}return X.call(pt,st)?pt[st]:void 0},Nt.prototype.has=function(st){var pt=this.__data__;return Q?pt[st]!==void 0:X.call(pt,st)},Nt.prototype.set=function(st,pt){return this.__data__[st]=Q&&pt===void 0?"__lodash_hash_undefined__":pt,this},It.prototype.clear=function(){this.__data__=[]},It.prototype.delete=function(st){var pt=this.__data__,wt=Xt(pt,st);return!(wt<0)&&(wt==pt.length-1?pt.pop():U.call(pt,wt,1),!0)},It.prototype.get=function(st){var pt=this.__data__,wt=Xt(pt,st);return wt<0?void 0:pt[wt][1]},It.prototype.has=function(st){return Xt(this.__data__,st)>-1},It.prototype.set=function(st,pt){var wt=this.__data__,_t=Xt(wt,st);return _t<0?wt.push([st,pt]):wt[_t][1]=pt,this},At.prototype.clear=function(){this.__data__={hash:new Nt,map:new(Z||It),string:new Nt}},At.prototype.delete=function(st){return xe(this,st).delete(st)},At.prototype.get=function(st){return xe(this,st).get(st)},At.prototype.has=function(st){return xe(this,st).has(st)},At.prototype.set=function(st,pt){return xe(this,st).set(st,pt),this},Ut.prototype.add=Ut.prototype.push=function(st){return this.__data__.set(st,"__lodash_hash_undefined__"),this},Ut.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.clear=function(){this.__data__=new It},Ht.prototype.delete=function(st){return this.__data__.delete(st)},Ht.prototype.get=function(st){return this.__data__.get(st)},Ht.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.set=function(st,pt){var wt=this.__data__;if(wt instanceof It){var _t=wt.__data__;if(!Z||_t.length<199)return _t.push([st,pt]),this;wt=this.__data__=new At(_t)}return wt.set(st,pt),this};var Ct,$t=(Ct=function(st,pt){return st&&qt(st,pt,er)},function(st,pt){if(st==null)return st;if(!Vt(st))return Ct(st,pt);for(var wt=st.length,_t=-1,Bt=Object(st);++_t<wt&&pt(Bt[_t],_t,Bt)!==!1;);return st}),qt=(function(st){return function(pt,wt,_t){for(var Bt=-1,Et=Object(pt),Rt=_t(pt),ge=Rt.length;ge--;){var oe=Rt[++Bt];if(wt(Et[oe],oe,Et)===!1)break}return pt}})();function Pt(st,pt){for(var wt=0,_t=(pt=te(pt,st)?[pt]:se(pt)).length;st!=null&&wt<_t;)st=st[at(pt[wt++])];return wt&&wt==_t?st:void 0}function fe(st,pt){return st!=null&&pt in Object(st)}function ke(st,pt,wt,_t,Bt){return st===pt||(st==null||pt==null||!le(st)&&!ze(pt)?st!=st&&pt!=pt:(function(Et,Rt,ge,oe,he,Jt){var Ce=Zt(Et),Ee=Zt(Rt),Me="[object Array]",qe="[object Array]";Ce||(Me=(Me=be(Et))==r?s:Me),Ee||(qe=(qe=be(Rt))==r?s:qe);var ir=Me==s&&!q(Et),mr=qe==s&&!q(Rt),Yr=Me==qe;if(Yr&&!ir)return Jt||(Jt=new Ht),Ce||tr(Et)?je(Et,Rt,ge,oe,he,Jt):(function(Ae,ye,Ks,Ei,Jc,Or,Ss){switch(Ks){case"[object DataView]":if(Ae.byteLength!=ye.byteLength||Ae.byteOffset!=ye.byteOffset)return!1;Ae=Ae.buffer,ye=ye.buffer;case"[object ArrayBuffer]":return!(Ae.byteLength!=ye.byteLength||!Ei(new N(Ae),new N(ye)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Mt(+Ae,+ye);case"[object Error]":return Ae.name==ye.name&&Ae.message==ye.message;case"[object RegExp]":case"[object String]":return Ae==ye+"";case n:var Zs=A;case e:var jl=2⩔if(Zs||(Zs=M),Ae.size!=ye.size&&!jl)return!1;var Qc=Ss.get(Ae);if(Qc)return Qc==ye;Or|=1,Ss.set(Ae,ye);var Yn=je(Zs(Ae),Zs(ye),Ei,Jc,Or,Ss);return Ss.delete(Ae),Yn;case"[object Symbol]":if(gt)return gt.call(Ae)==gt.call(ye)}return!1})(Et,Rt,Me,ge,oe,he,Jt);if(!(2&he)){var Ci=ir&&X.call(Et,"__wrapped__"),Vn=mr&&X.call(Rt,"__wrapped__");if(Ci||Vn){var Wn=Ci?Et.value():Et,Xn=Vn?Rt.value():Rt;return Jt||(Jt=new Ht),ge(Wn,Xn,oe,he,Jt)}}return Yr?(Jt||(Jt=new Ht),(function(Ae,ye,Ks,Ei,Jc,Or){var Ss=2&Jc,Zs=er(Ae),jl=Zs.length,Qc=er(ye).length;if(jl!=Qc&&!Ss)return!1;for(var Yn=jl;Yn--;){var Js=Zs[Yn];if(!(Ss?Js in ye:X.call(ye,Js)))return!1}var Tu=Or.get(Ae);if(Tu&&Or.get(ye))return Tu==ye;var tu=!0;Or.set(Ae,ye),Or.set(ye,Ae);for(var yu=Ss;++Yn<jl;){Js=Zs[Yn];var eu=Ae[Js],ru=ye[Js];if(Ei)var Ru=Ss?Ei(ru,eu,Js,ye,Ae,Or):Ei(eu,ru,Js,Ae,ye,Or);if(!(Ru===void 0?eu===ru||Ks(eu,ru,Ei,Jc,Or):Ru)){tu=!1;break}yu||(yu=Js=="constructor")}if(tu&&!yu){var su=Ae.constructor,iu=ye.constructor;su==iu||!("constructor"in Ae)||!("constructor"in ye)||typeof su=="function"&&su instanceof su&&typeof iu=="function"&&iu instanceof iu||(tu=!1)}return Or.delete(Ae),Or.delete(ye),tu})(Et,Rt,ge,oe,he,Jt)):!1})(st,pt,ke,wt,_t,Bt))}function Yt(st){return!(!le(st)||(function(pt){return!!j&&j in pt})(st))&&(ie(st)||q(st)?L:m).test(dt(st))}function we(st){return typeof st=="function"?st:st==null?xr:typeof st=="object"?Zt(st)?(function(_t,Bt){return te(_t)&&_e(Bt)?Re(at(_t),Bt):function(Et){var Rt=(function(ge,oe,he){var Jt=ge==null?void 0:Pt(ge,oe);return Jt===void 0?he:Jt})(Et,_t);return Rt===void 0&&Rt===Bt?(function(ge,oe){return ge!=null&&(function(he,Jt,Ce){Jt=te(Jt,he)?[Jt]:se(Jt);for(var Ee,Me=-1,qe=Jt.length;++Me<qe;){var ir=at(Jt[Me]);if(!(Ee=he!=null&&Ce(he,ir)))break;he=he[ir]}return Ee||!!(qe=he?he.length:0)&&re(qe)&&Te(ir,qe)&&(Zt(he)||ee(he))})(ge,oe,fe)})(Et,_t):ke(Bt,Rt,void 0,3)}})(st[0],st[1]):(function(_t){var Bt=(function(Et){for(var Rt=er(Et),ge=Rt.length;ge--;){var oe=Rt[ge],he=Et[oe];Rt[ge]=[oe,he,_e(he)]}return Rt})(_t);return Bt.length==1&&Bt[0][2]?Re(Bt[0][0],Bt[0][1]):function(Et){return Et===_t||(function(Rt,ge,oe,he){var Jt=oe.length,Ce=Jt;if(Rt==null)return!Ce;for(Rt=Object(Rt);Jt--;){var Ee=oe[Jt];if(Ee[2]?Ee[1]!==Rt[Ee[0]]:!(Ee[0]in Rt))return!1}for(;++Jt<Ce;){var Me=(Ee=oe[Jt])[0],qe=Rt[Me],ir=Ee[1];if(Ee[2]){if(qe===void 0&&!(Me in Rt))return!1}else{var mr=new Ht,Yr;if(!(Yr===void 0?ke(ir,qe,he,3,mr):Yr))return!1}}return!0})(Et,_t,Bt)}})(st):te(pt=st)?(wt=at(pt),function(_t){return _t==null?void 0:_t[wt]}):(function(_t){return function(Bt){return Pt(Bt,_t)}})(pt);var pt,wt}function ue(st){if(wt=(pt=st)&&pt.constructor,_t=typeof wt=="function"&&wt.prototype||T,pt!==_t)return K(st);var pt,wt,_t,Bt=[];for(var Et in Object(st))X.call(st,Et)&&Et!="constructor"&&Bt.push(Et);return Bt}function se(st){return Zt(st)?st:ne(st)}function je(st,pt,wt,_t,Bt,Et){var Rt=2&Bt,ge=st.length,oe=pt.length;if(ge!=oe&&!(Rt&&oe>ge))return!1;var he=Et.get(st);if(he&&Et.get(pt))return he==pt;var Jt=-1,Ce=!0,Ee=1&Bt?new Ut:void 0;for(Et.set(st,pt),Et.set(pt,st);++Jt<ge;){var Me=st[Jt],qe=pt[Jt];if(_t)var ir=Rt?_t(qe,Me,Jt,pt,st,Et):_t(Me,qe,Jt,st,pt,Et);if(ir!==void 0){if(ir)continue;Ce=!1;break}if(Ee){if(!W(pt,(function(mr,Yr){if(!Ee.has(Yr)&&(Me===mr||wt(Me,mr,_t,Bt,Et)))return Ee.add(Yr)}))){Ce=!1;break}}else if(Me!==qe&&!wt(Me,qe,_t,Bt,Et)){Ce=!1;break}}return Et.delete(st),Et.delete(pt),Ce}function xe(st,pt){var wt,_t,Bt=st.__data__;return((_t=typeof(wt=pt))=="string"||_t=="number"||_t=="symbol"||_t=="boolean"?wt!=="__proto__":wt===null)?Bt[typeof pt=="string"?"string":"hash"]:Bt.map}function Qt(st,pt){var wt=(function(_t,Bt){return _t==null?void 0:_t[Bt]})(st,pt);return Yt(wt)?wt:void 0}var be=function(st){return J.call(st)};function Te(st,pt){return!!(pt=pt??9007199254740991)&&(typeof st=="number"||d.test(st))&&st>-1&&st%1==0&&st<pt}function te(st,pt){if(Zt(st))return!1;var wt=typeof st;return!(wt!="number"&&wt!="symbol"&&wt!="boolean"&&st!=null&&!$e(st))||u.test(st)||!i.test(st)||pt!=null&&st in Object(pt)}function _e(st){return st==st&&!le(st)}function Re(st,pt){return function(wt){return wt!=null&&wt[st]===pt&&(pt!==void 0||st in Object(wt))}}(rt&&be(new rt(new ArrayBuffer(1)))!="[object DataView]"||Z&&be(new Z)!=n||et&&be(et.resolve())!="[object Promise]"||ht&&be(new ht)!=e||lt&&be(new lt)!="[object WeakMap]")&&(be=function(st){var pt=J.call(st),wt=pt==s?st.constructor:void 0,_t=wt?dt(wt):void 0;if(_t)switch(_t){case ot:return"[object DataView]";case nt:return n;case ut:return"[object Promise]";case ct:return e;case ft:return"[object WeakMap]"}return pt});var ne=Kt((function(st){var pt;st=(pt=st)==null?"":(function(_t){if(typeof _t=="string")return _t;if($e(_t))return xt?xt.call(_t):"";var Bt=_t+"";return Bt=="0"&&1/_t==-1/0?"-0":Bt})(pt);var wt=[];return a.test(st)&&wt.push(""),st.replace(h,(function(_t,Bt,Et,Rt){wt.push(Et?Rt.replace(p,"$1"):Bt||_t)})),wt}));function at(st){if(typeof st=="string"||$e(st))return st;var pt=st+"";return pt=="0"&&1/st==-1/0?"-0":pt}function dt(st){if(st!=null){try{return V.call(st)}catch{}try{return st+""}catch{}}return""}var bt,Tt=(bt=function(st,pt,wt){X.call(st,wt)?st[wt].push(pt):st[wt]=[pt]},function(st,pt){var wt=Zt(st)?F:jt,_t={};return wt(st,bt,we(pt),_t)});function Kt(st,pt){if(typeof st!="function"||pt&&typeof pt!="function")throw new TypeError("Expected a function");var wt=function(){var _t=arguments,Bt=pt?pt.apply(this,_t):_t[0],Et=wt.cache;if(Et.has(Bt))return Et.get(Bt);var Rt=st.apply(this,_t);return wt.cache=Et.set(Bt,Rt),Rt};return wt.cache=new(Kt.Cache||At),wt}function Mt(st,pt){return st===pt||st!=st&&pt!=pt}function ee(st){return(function(pt){return ze(pt)&&Vt(pt)})(st)&&X.call(st,"callee")&&(!R.call(st,"callee")||J.call(st)==r)}Kt.Cache=At;var Zt=Array.isArray;function Vt(st){return st!=null&&re(st.length)&&!ie(st)}function ie(st){var pt=le(st)?J.call(st):"";return pt=="[object Function]"||pt=="[object GeneratorFunction]"}function re(st){return typeof st=="number"&&st>-1&&st%1==0&&st<=9007199254740991}function le(st){var pt=typeof st;return!!st&&(pt=="object"||pt=="function")}function ze(st){return!!st&&typeof st=="object"}function $e(st){return typeof st=="symbol"||ze(st)&&J.call(st)=="[object Symbol]"}var tr=B?(function(st){return function(pt){return st(pt)}})(B):function(st){return ze(st)&&re(st.length)&&!!b[J.call(st)]};function er(st){return Vt(st)?zt(st):ue(st)}function xr(st){return st}l.exports=Tt}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(t,l,c){var o=Object.prototype.toString;l.exports=function(r){return r===!0||r===!1||(function(n){return!!n&&typeof n=="object"})(r)&&o.call(r)=="[object Boolean]"}},{}],445:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a[r]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a[n]=a["[object Number]"]=a[s]=a["[object RegExp]"]=a[e]=a["[object String]"]=a["[object WeakMap]"]=!1;var h=typeof o=="object"&&o&&o.Object===Object&&o,p=typeof self=="object"&&self&&self.Object===Object&&self,m=h||p||Function("return this")(),d=typeof c=="object"&&c&&!c.nodeType&&c,b=d&&typeof l=="object"&&l&&!l.nodeType&&l,g=b&&b.exports===d,S=g&&h.process,C=(function(){try{return S&&S.binding&&S.binding("util")}catch{}})(),I=C&&C.isTypedArray;function D(at,dt){for(var bt=-1,Tt=at==null?0:at.length;++bt<Tt;)if(dt(at[bt],bt,at))return!0;return!1}function z(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt,Kt){bt[++dt]=[Kt,Tt]})),bt}function P(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt){bt[++dt]=Tt})),bt}var B,F,W,q=Array.prototype,A=Function.prototype,M=Object.prototype,k=m["__core-js_shared__"],y=A.toString,w=M.hasOwnProperty,x=(B=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"",_=M.toString,T=RegExp("^"+y.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=g?m.Buffer:void 0,j=m.Symbol,V=m.Uint8Array,X=M.propertyIsEnumerable,J=q.splice,L=j?j.toStringTag:void 0,G=Object.getOwnPropertySymbols,N=O?O.isBuffer:void 0,R=(F=Object.keys,W=Object,function(at){return F(W(at))}),U=fe(m,"DataView"),K=fe(m,"Map"),rt=fe(m,"Promise"),Z=fe(m,"Set"),et=fe(m,"WeakMap"),ht=fe(Object,"create"),lt=ue(U),Q=ue(K),ot=ue(rt),nt=ue(Z),ut=ue(et),ct=j?j.prototype:void 0,ft=ct?ct.valueOf:void 0;function mt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function gt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function xt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function Nt(at){var dt=-1,bt=at==null?0:at.length;for(this.__data__=new xt;++dt<bt;)this.add(at[dt])}function It(at){var dt=this.__data__=new gt(at);this.size=dt.size}function At(at,dt){var bt=xe(at),Tt=!bt&&je(at),Kt=!bt&&!Tt&&Qt(at),Mt=!bt&&!Tt&&!Kt&&Re(at),ee=bt||Tt||Kt||Mt,Zt=ee?(function(re,le){for(var ze=-1,$e=Array(re);++ze<re;)$e[ze]=le(ze);return $e})(at.length,String):[],Vt=Zt.length;for(var ie in at)!w.call(at,ie)||ee&&(ie=="length"||Kt&&(ie=="offset"||ie=="parent")||Mt&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||we(ie,Vt))||Zt.push(ie);return Zt}function Ut(at,dt){for(var bt=at.length;bt--;)if(se(at[bt][0],dt))return bt;return-1}function Ht(at){return at==null?at===void 0?"[object Undefined]":"[object Null]":L&&L in Object(at)?(function(dt){var bt=w.call(dt,L),Tt=dt[L];try{dt[L]=void 0;var Kt=!0}catch{}var Mt=_.call(dt);return Kt&&(bt?dt[L]=Tt:delete dt[L]),Mt})(at):(function(dt){return _.call(dt)})(at)}function zt(at){return _e(at)&&Ht(at)==r}function Xt(at,dt,bt,Tt,Kt){return at===dt||(at==null||dt==null||!_e(at)&&!_e(dt)?at!=at&&dt!=dt:(function(Mt,ee,Zt,Vt,ie,re){var le=xe(Mt),ze=xe(ee),$e=le?"[object Array]":Yt(Mt),tr=ze?"[object Array]":Yt(ee),er=($e=$e==r?s:$e)==s,xr=(tr=tr==r?s:tr)==s,st=$e==tr;if(st&&Qt(Mt)){if(!Qt(ee))return!1;le=!0,er=!1}if(st&&!er)return re||(re=new It),le||Re(Mt)?$t(Mt,ee,Zt,Vt,ie,re):(function(Et,Rt,ge,oe,he,Jt,Ce){switch(ge){case"[object DataView]":if(Et.byteLength!=Rt.byteLength||Et.byteOffset!=Rt.byteOffset)return!1;Et=Et.buffer,Rt=Rt.buffer;case"[object ArrayBuffer]":return!(Et.byteLength!=Rt.byteLength||!Jt(new V(Et),new V(Rt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return se(+Et,+Rt);case"[object Error]":return Et.name==Rt.name&&Et.message==Rt.message;case"[object RegExp]":case"[object String]":return Et==Rt+"";case n:var Ee=z;case e:var Me=1&oe;if(Ee||(Ee=P),Et.size!=Rt.size&&!Me)return!1;var qe=Ce.get(Et);if(qe)return qe==Rt;oe|=2,Ce.set(Et,Rt);var ir=$t(Ee(Et),Ee(Rt),oe,he,Jt,Ce);return Ce.delete(Et),ir;case"[object Symbol]":if(ft)return ft.call(Et)==ft.call(Rt)}return!1})(Mt,ee,$e,Zt,Vt,ie,re);if(!(1&Zt)){var pt=er&&w.call(Mt,"__wrapped__"),wt=xr&&w.call(ee,"__wrapped__");if(pt||wt){var _t=pt?Mt.value():Mt,Bt=wt?ee.value():ee;return re||(re=new It),ie(_t,Bt,Zt,Vt,re)}}return st?(re||(re=new It),(function(Et,Rt,ge,oe,he,Jt){var Ce=1&ge,Ee=qt(Et),Me=Ee.length,qe=qt(Rt).length;if(Me!=qe&&!Ce)return!1;for(var ir=Me;ir--;){var mr=Ee[ir];if(!(Ce?mr in Rt:w.call(Rt,mr)))return!1}var Yr=Jt.get(Et);if(Yr&&Jt.get(Rt))return Yr==Rt;var Ci=!0;Jt.set(Et,Rt),Jt.set(Rt,Et);for(var Vn=Ce;++ir<Me;){mr=Ee[ir];var Wn=Et[mr],Xn=Rt[mr];if(oe)var Ae=Ce?oe(Xn,Wn,mr,Rt,Et,Jt):oe(Wn,Xn,mr,Et,Rt,Jt);if(!(Ae===void 0?Wn===Xn||he(Wn,Xn,ge,oe,Jt):Ae)){Ci=!1;break}Vn||(Vn=mr=="constructor")}if(Ci&&!Vn){var ye=Et.constructor,Ks=Rt.constructor;ye==Ks||!("constructor"in Et)||!("constructor"in Rt)||typeof ye=="function"&&ye instanceof ye&&typeof Ks=="function"&&Ks instanceof Ks||(Ci=!1)}return Jt.delete(Et),Jt.delete(Rt),Ci})(Mt,ee,Zt,Vt,ie,re)):!1})(at,dt,bt,Tt,Xt,Kt))}function jt(at){return!(!te(at)||(function(dt){return!!x&&x in dt})(at))&&(be(at)?T:i).test(ue(at))}function Ct(at){if(bt=(dt=at)&&dt.constructor,Tt=typeof bt=="function"&&bt.prototype||M,dt!==Tt)return R(at);var dt,bt,Tt,Kt=[];for(var Mt in Object(at))w.call(at,Mt)&&Mt!="constructor"&&Kt.push(Mt);return Kt}function $t(at,dt,bt,Tt,Kt,Mt){var ee=1&bt,Zt=at.length,Vt=dt.length;if(Zt!=Vt&&!(ee&&Vt>Zt))return!1;var ie=Mt.get(at);if(ie&&Mt.get(dt))return ie==dt;var re=-1,le=!0,ze=2&bt?new Nt:void 0;for(Mt.set(at,dt),Mt.set(dt,at);++re<Zt;){var $e=at[re],tr=dt[re];if(Tt)var er=ee?Tt(tr,$e,re,dt,at,Mt):Tt($e,tr,re,at,dt,Mt);if(er!==void 0){if(er)continue;le=!1;break}if(ze){if(!D(dt,(function(xr,st){if(pt=st,!ze.has(pt)&&($e===xr||Kt($e,xr,bt,Tt,Mt)))return ze.push(st);var pt}))){le=!1;break}}else if($e!==tr&&!Kt($e,tr,bt,Tt,Mt)){le=!1;break}}return Mt.delete(at),Mt.delete(dt),le}function qt(at){return(function(dt,bt,Tt){var Kt=bt(dt);return xe(dt)?Kt:(function(Mt,ee){for(var Zt=-1,Vt=ee.length,ie=Mt.length;++Zt<Vt;)Mt[ie+Zt]=ee[Zt];return Mt})(Kt,Tt(dt))})(at,ne,ke)}function Pt(at,dt){var bt,Tt,Kt=at.__data__;return((Tt=typeof(bt=dt))=="string"||Tt=="number"||Tt=="symbol"||Tt=="boolean"?bt!=="__proto__":bt===null)?Kt[typeof dt=="string"?"string":"hash"]:Kt.map}function fe(at,dt){var bt=(function(Tt,Kt){return Tt==null?void 0:Tt[Kt]})(at,dt);return jt(bt)?bt:void 0}mt.prototype.clear=function(){this.__data__=ht?ht(null):{},this.size=0},mt.prototype.delete=function(at){var dt=this.has(at)&&delete this.__data__[at];return this.size-=dt?1:0,dt},mt.prototype.get=function(at){var dt=this.__data__;if(ht){var bt=dt[at];return bt==="__lodash_hash_undefined__"?void 0:bt}return w.call(dt,at)?dt[at]:void 0},mt.prototype.has=function(at){var dt=this.__data__;return ht?dt[at]!==void 0:w.call(dt,at)},mt.prototype.set=function(at,dt){var bt=this.__data__;return this.size+=this.has(at)?0:1,bt[at]=ht&&dt===void 0?"__lodash_hash_undefined__":dt,this},gt.prototype.clear=function(){this.__data__=[],this.size=0},gt.prototype.delete=function(at){var dt=this.__data__,bt=Ut(dt,at);return!(bt<0)&&(bt==dt.length-1?dt.pop():J.call(dt,bt,1),--this.size,!0)},gt.prototype.get=function(at){var dt=this.__data__,bt=Ut(dt,at);return bt<0?void 0:dt[bt][1]},gt.prototype.has=function(at){return Ut(this.__data__,at)>-1},gt.prototype.set=function(at,dt){var bt=this.__data__,Tt=Ut(bt,at);return Tt<0?(++this.size,bt.push([at,dt])):bt[Tt][1]=dt,this},xt.prototype.clear=function(){this.size=0,this.__data__={hash:new mt,map:new(K||gt),string:new mt}},xt.prototype.delete=function(at){var dt=Pt(this,at).delete(at);return this.size-=dt?1:0,dt},xt.prototype.get=function(at){return Pt(this,at).get(at)},xt.prototype.has=function(at){return Pt(this,at).has(at)},xt.prototype.set=function(at,dt){var bt=Pt(this,at),Tt=bt.size;return bt.set(at,dt),this.size+=bt.size==Tt?0:1,this},Nt.prototype.add=Nt.prototype.push=function(at){return this.__data__.set(at,"__lodash_hash_undefined__"),this},Nt.prototype.has=function(at){return this.__data__.has(at)},It.prototype.clear=function(){this.__data__=new gt,this.size=0},It.prototype.delete=function(at){var dt=this.__data__,bt=dt.delete(at);return this.size=dt.size,bt},It.prototype.get=function(at){return this.__data__.get(at)},It.prototype.has=function(at){return this.__data__.has(at)},It.prototype.set=function(at,dt){var bt=this.__data__;if(bt instanceof gt){var Tt=bt.__data__;if(!K||Tt.length<199)return Tt.push([at,dt]),this.size=++bt.size,this;bt=this.__data__=new xt(Tt)}return bt.set(at,dt),this.size=bt.size,this};var ke=G?function(at){return at==null?[]:(at=Object(at),(function(dt,bt){for(var Tt=-1,Kt=dt==null?0:dt.length,Mt=0,ee=[];++Tt<Kt;){var Zt=dt[Tt];bt(Zt,Tt,dt)&&(ee[Mt++]=Zt)}return ee})(G(at),(function(dt){return X.call(at,dt)})))}:function(){return[]},Yt=Ht;function we(at,dt){return!!(dt=dt??9007199254740991)&&(typeof at=="number"||u.test(at))&&at>-1&&at%1==0&&at<dt}function ue(at){if(at!=null){try{return y.call(at)}catch{}try{return at+""}catch{}}return""}function se(at,dt){return at===dt||at!=at&&dt!=dt}(U&&Yt(new U(new ArrayBuffer(1)))!="[object DataView]"||K&&Yt(new K)!=n||rt&&Yt(rt.resolve())!="[object Promise]"||Z&&Yt(new Z)!=e||et&&Yt(new et)!="[object WeakMap]")&&(Yt=function(at){var dt=Ht(at),bt=dt==s?at.constructor:void 0,Tt=bt?ue(bt):"";if(Tt)switch(Tt){case lt:return"[object DataView]";case Q:return n;case ot:return"[object Promise]";case nt:return e;case ut:return"[object WeakMap]"}return dt});var je=zt((function(){return arguments})())?zt:function(at){return _e(at)&&w.call(at,"callee")&&!X.call(at,"callee")},xe=Array.isArray,Qt=N||function(){return!1};function be(at){if(!te(at))return!1;var dt=Ht(at);return dt=="[object Function]"||dt=="[object GeneratorFunction]"||dt=="[object AsyncFunction]"||dt=="[object Proxy]"}function Te(at){return typeof at=="number"&&at>-1&&at%1==0&&at<=9007199254740991}function te(at){var dt=typeof at;return at!=null&&(dt=="object"||dt=="function")}function _e(at){return at!=null&&typeof at=="object"}var Re=I?(function(at){return function(dt){return at(dt)}})(I):function(at){return _e(at)&&Te(at.length)&&!!a[Ht(at)]};function ne(at){return(dt=at)!=null&&Te(dt.length)&&!be(dt)?At(at):Ct(at);var dt}l.exports=function(at,dt){return Xt(at,dt)}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(t,l,c){(function(o){(function(){var r=typeof o=="object"&&o&&o.Object===Object&&o,n=typeof self=="object"&&self&&self.Object===Object&&self,s=r||n||Function("return this")(),e=Object.prototype,i=e.hasOwnProperty,u=e.toString,a=s.Symbol,h=a?a.toStringTag:void 0;function p(m){return m==null?m===void 0?"[object Undefined]":"[object Null]":h&&h in Object(m)?(function(d){var b=i.call(d,h),g=d[h];try{d[h]=void 0;var S=!0}catch{}var C=u.call(d);return S&&(b?d[h]=g:delete d[h]),C})(m):(function(d){return u.call(d)})(m)}l.exports=function(m){if(!(function(b){var g=typeof b;return b!=null&&(g=="object"||g=="function")})(m))return!1;var d=p(m);return d=="[object Function]"||d=="[object GeneratorFunction]"||d=="[object AsyncFunction]"||d=="[object Proxy]"}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(t,l,c){l.exports=function(o){return o==null}},{}],448:[function(t,l,c){l.exports=function(o){return o===void 0}},{}],449:[function(t,l,c){(function(o){(function(){var r=/^\[object .+?Constructor\]$/,n=typeof o=="object"&&o&&o.Object===Object&&o,s=typeof self=="object"&&self&&self.Object===Object&&self,e=n||s||Function("return this")();function i(j,V){return!!(j&&j.length)&&(function(X,J,L){if(J!=J)return(function(R,U,K,rt){for(var Z=R.length,et=K+-1;++et<Z;)if(U(R[et],et,R))return et;return-1})(X,u,L);for(var G=L-1,N=X.length;++G<N;)if(X[G]===J)return G;return-1})(j,V,0)>-1}function u(j){return j!=j}function a(j,V){return j.has(V)}function h(j){var V=-1,X=Array(j.size);return j.forEach((function(J){X[++V]=J})),X}var p,m=Array.prototype,d=Function.prototype,b=Object.prototype,g=e["__core-js_shared__"],S=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",C=d.toString,I=b.hasOwnProperty,D=b.toString,z=RegExp("^"+C.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.splice,B=T(e,"Map"),F=T(e,"Set"),W=T(Object,"create");function q(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function A(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function M(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function k(j){var V=-1,X=j?j.length:0;for(this.__data__=new M;++V<X;)this.add(j[V])}function y(j,V){for(var X,J,L=j.length;L--;)if((X=j[L][0])===(J=V)||X!=X&&J!=J)return L;return-1}function w(j){return!(!O(j)||(V=j,S&&S in V))&&((function(X){var J=O(X)?D.call(X):"";return J=="[object Function]"||J=="[object GeneratorFunction]"})(j)||(function(X){var J=!1;if(X!=null&&typeof X.toString!="function")try{J=!!(X+"")}catch{}return J})(j)?z:r).test((function(X){if(X!=null){try{return C.call(X)}catch{}try{return X+""}catch{}}return""})(j));var V}q.prototype.clear=function(){this.__data__=W?W(null):{}},q.prototype.delete=function(j){return this.has(j)&&delete this.__data__[j]},q.prototype.get=function(j){var V=this.__data__;if(W){var X=V[j];return X==="__lodash_hash_undefined__"?void 0:X}return I.call(V,j)?V[j]:void 0},q.prototype.has=function(j){var V=this.__data__;return W?V[j]!==void 0:I.call(V,j)},q.prototype.set=function(j,V){return this.__data__[j]=W&&V===void 0?"__lodash_hash_undefined__":V,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(j){var V=this.__data__,X=y(V,j);return!(X<0)&&(X==V.length-1?V.pop():P.call(V,X,1),!0)},A.prototype.get=function(j){var V=this.__data__,X=y(V,j);return X<0?void 0:V[X][1]},A.prototype.has=function(j){return y(this.__data__,j)>-1},A.prototype.set=function(j,V){var X=this.__data__,J=y(X,j);return J<0?X.push([j,V]):X[J][1]=V,this},M.prototype.clear=function(){this.__data__={hash:new q,map:new(B||A),string:new q}},M.prototype.delete=function(j){return _(this,j).delete(j)},M.prototype.get=function(j){return _(this,j).get(j)},M.prototype.has=function(j){return _(this,j).has(j)},M.prototype.set=function(j,V){return _(this,j).set(j,V),this},k.prototype.add=k.prototype.push=function(j){return this.__data__.set(j,"__lodash_hash_undefined__"),this},k.prototype.has=function(j){return this.__data__.has(j)};var x=F&&1/h(new F([,-0]))[1]==1/0?function(j){return new F(j)}:function(){};function _(j,V){var X,J,L=j.__data__;return((J=typeof(X=V))=="string"||J=="number"||J=="symbol"||J=="boolean"?X!=="__proto__":X===null)?L[typeof V=="string"?"string":"hash"]:L.map}function T(j,V){var X=(function(J,L){return J==null?void 0:J[L]})(j,V);return w(X)?X:void 0}function O(j){var V=typeof j;return!!j&&(V=="object"||V=="function")}l.exports=function(j){return j&&j.length?(function(V,X,J){var L=-1,G=i,N=V.length,R=!0,U=[],K=U;if(N>=200){var rt=x(V);if(rt)return h(rt);R=!1,G=a,K=new k}else K=U;t:for(;++L<N;){var Z=V[L],et=Z;if(Z=Z!==0?Z:0,R&&et==et){for(var ht=K.length;ht--;)if(K[ht]===et)continue t;U.push(Z)}else G(K,et,J)||(K!==U&&K.push(et),U.push(Z))}return U})(j):[]}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(t,l,c){var o=t("inherits"),r=t("hash-base"),n=t("safe-buffer").Buffer,s=new Array(16);function e(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(m,d){return m<<d|m>>>32-d}function u(m,d,b,g,S,C,I){return i(m+(d&b|~d&g)+S+C|0,I)+d|0}function a(m,d,b,g,S,C,I){return i(m+(d&g|b&~g)+S+C|0,I)+d|0}function h(m,d,b,g,S,C,I){return i(m+(d^b^g)+S+C|0,I)+d|0}function p(m,d,b,g,S,C,I){return i(m+(b^(d|~g))+S+C|0,I)+d|0}o(e,r),e.prototype._update=function(){for(var m=s,d=0;d<16;++d)m[d]=this._block.readInt32LE(4*d);var b=this._a,g=this._b,S=this._c,C=this._d;b=u(b,g,S,C,m[0],3614090360,7),C=u(C,b,g,S,m[1],3905402710,12),S=u(S,C,b,g,m[2],606105819,17),g=u(g,S,C,b,m[3],3250441966,22),b=u(b,g,S,C,m[4],4118548399,7),C=u(C,b,g,S,m[5],1200080426,12),S=u(S,C,b,g,m[6],2821735955,17),g=u(g,S,C,b,m[7],4249261313,22),b=u(b,g,S,C,m[8],1770035416,7),C=u(C,b,g,S,m[9],2336552879,12),S=u(S,C,b,g,m[10],4294925233,17),g=u(g,S,C,b,m[11],2304563134,22),b=u(b,g,S,C,m[12],1804603682,7),C=u(C,b,g,S,m[13],4254626195,12),S=u(S,C,b,g,m[14],2792965006,17),b=a(b,g=u(g,S,C,b,m[15],1236535329,22),S,C,m[1],4129170786,5),C=a(C,b,g,S,m[6],3225465664,9),S=a(S,C,b,g,m[11],643717713,14),g=a(g,S,C,b,m[0],3921069994,20),b=a(b,g,S,C,m[5],3593408605,5),C=a(C,b,g,S,m[10],38016083,9),S=a(S,C,b,g,m[15],3634488961,14),g=a(g,S,C,b,m[4],3889429448,20),b=a(b,g,S,C,m[9],568446438,5),C=a(C,b,g,S,m[14],3275163606,9),S=a(S,C,b,g,m[3],4107603335,14),g=a(g,S,C,b,m[8],1163531501,20),b=a(b,g,S,C,m[13],2850285829,5),C=a(C,b,g,S,m[2],4243563512,9),S=a(S,C,b,g,m[7],1735328473,14),b=h(b,g=a(g,S,C,b,m[12],2368359562,20),S,C,m[5],4294588738,4),C=h(C,b,g,S,m[8],2272392833,11),S=h(S,C,b,g,m[11],1839030562,16),g=h(g,S,C,b,m[14],4259657740,23),b=h(b,g,S,C,m[1],2763975236,4),C=h(C,b,g,S,m[4],1272893353,11),S=h(S,C,b,g,m[7],4139469664,16),g=h(g,S,C,b,m[10],3200236656,23),b=h(b,g,S,C,m[13],681279174,4),C=h(C,b,g,S,m[0],3936430074,11),S=h(S,C,b,g,m[3],3572445317,16),g=h(g,S,C,b,m[6],76029189,23),b=h(b,g,S,C,m[9],3654602809,4),C=h(C,b,g,S,m[12],3873151461,11),S=h(S,C,b,g,m[15],530742520,16),b=p(b,g=h(g,S,C,b,m[2],3299628645,23),S,C,m[0],4096336452,6),C=p(C,b,g,S,m[7],1126891415,10),S=p(S,C,b,g,m[14],2878612391,15),g=p(g,S,C,b,m[5],4237533241,21),b=p(b,g,S,C,m[12],1700485571,6),C=p(C,b,g,S,m[3],2399980690,10),S=p(S,C,b,g,m[10],4293915773,15),g=p(g,S,C,b,m[1],2240044497,21),b=p(b,g,S,C,m[8],1873313359,6),C=p(C,b,g,S,m[15],4264355552,10),S=p(S,C,b,g,m[6],2734768916,15),g=p(g,S,C,b,m[13],1309151649,21),b=p(b,g,S,C,m[4],4149444226,6),C=p(C,b,g,S,m[11],3174756917,10),S=p(S,C,b,g,m[2],718787259,15),g=p(g,S,C,b,m[9],3951481745,21),this._a=this._a+b|0,this._b=this._b+g|0,this._c=this._c+S|0,this._d=this._d+C|0},e.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var m=n.allocUnsafe(16);return m.writeInt32LE(this._a,0),m.writeInt32LE(this._b,4),m.writeInt32LE(this._c,8),m.writeInt32LE(this._d,12),m},l.exports=e},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(t,l,c){var o=t("bn.js"),r=t("brorand");function n(s){this.rand=s||new r.Rand}l.exports=n,n.create=function(s){return new n(s)},n.prototype._randbelow=function(s){var e=s.bitLength(),i=Math.ceil(e/8);do var u=new o(this.rand.generate(i));while(u.cmp(s)>=0);return u},n.prototype._randrange=function(s,e){var i=e.sub(s);return s.add(this._randbelow(i))},n.prototype.test=function(s,e,i){var u=s.bitLength(),a=o.mont(s),h=new o(1).toRed(a);e||(e=Math.max(1,u/48|0));for(var p=s.subn(1),m=0;!p.testn(m);m++);for(var d=s.shrn(m),b=p.toRed(a);e>0;e--){var g=this._randrange(new o(2),p);i&&i(g);var S=g.toRed(a).redPow(d);if(S.cmp(h)!==0&&S.cmp(b)!==0){for(var C=1;C<m;C++){if((S=S.redSqr()).cmp(h)===0)return!1;if(S.cmp(b)===0)break}if(C===m)return!1}}return!0},n.prototype.getDivisor=function(s,e){var i=s.bitLength(),u=o.mont(s),a=new o(1).toRed(u);e||(e=Math.max(1,i/48|0));for(var h=s.subn(1),p=0;!h.testn(p);p++);for(var m=s.shrn(p),d=h.toRed(u);e>0;e--){var b=this._randrange(new o(2),h),g=s.gcd(b);if(g.cmpn(1)!==0)return g;var S=b.toRed(u).redPow(m);if(S.cmp(a)!==0&&S.cmp(d)!==0){for(var C=1;C<p;C++){if((S=S.redSqr()).cmp(a)===0)return S.fromRed().subn(1).gcd(s);if(S.cmp(d)===0)break}if(C===p)return(S=S.redSqr()).fromRed().subn(1).gcd(s)}}return!1}},{"bn.js":452,brorand:187}],452:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],453:[function(t,l,c){function o(r,n){if(!r)throw new Error(n||"Assertion failed")}l.exports=o,o.equal=function(r,n,s){if(r!=n)throw new Error(s||"Assertion failed: "+r+" != "+n)}},{}],454:[function(t,l,c){var o=c;function r(s){return s.length===1?"0"+s:s}function n(s){for(var e="",i=0;i<s.length;i++)e+=r(s[i].toString(16));return e}o.toArray=function(s,e){if(Array.isArray(s))return s.slice();if(!s)return[];var i=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)i[u]=0|s[u];return i}if(e==="hex")for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),u=0;u<s.length;u+=2)i.push(parseInt(s[u]+s[u+1],16));else for(u=0;u<s.length;u++){var a=s.charCodeAt(u),h=a>>8,p=255&a;h?i.push(h,p):i.push(p)}return i},o.zero2=r,o.toHex=n,o.encode=function(s,e){return e==="hex"?n(s):s}},{}],455:[function(t,l,c){l.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(t,l,c){var o=t("asn1.js");c.certificate=t("./certificate");var r=o.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));c.RSAPrivateKey=r;var n=o.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));c.RSAPublicKey=n;var s=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(e),this.key("subjectPublicKey").bitstr())}));c.PublicKey=s;var e=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),i=o.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(e),this.key("subjectPrivateKey").octstr())}));c.PrivateKey=i;var u=o.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));c.EncryptedPrivateKey=u;var a=o.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));c.DSAPrivateKey=a,c.DSAparam=o.define("DSAparam",(function(){this.int()}));var h=o.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())}));c.ECPrivateKey=h;var p=o.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));c.signature=o.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":170}],457:[function(t,l,c){var o=t("asn1.js"),r=o.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),n=o.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),e=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),i=o.define("RelativeDistinguishedName",(function(){this.setof(n)})),u=o.define("RDNSequence",(function(){this.seqof(i)})),a=o.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=o.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),p=o.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),m=o.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(a),this.key("validity").use(h),this.key("subject").use(a),this.key("subjectPublicKeyInfo").use(e),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())})),d=o.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(m),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));l.exports=d},{"asn1.js":170}],458:[function(t,l,c){var o=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=t("evp_bytestokey"),e=t("browserify-aes"),i=t("safe-buffer").Buffer;l.exports=function(u,a){var h,p=u.toString(),m=p.match(o);if(m){var d="aes"+m[1],b=i.from(m[2],"hex"),g=i.from(m[3].replace(/[\r\n]/g,""),"base64"),S=s(a,b.slice(0,8),parseInt(m[1],10)).key,C=[],I=e.createDecipheriv(d,S,b);C.push(I.update(g)),C.push(I.final()),h=i.concat(C)}else{var D=p.match(n);h=i.from(D[2].replace(/[\r\n]/g,""),"base64")}return{tag:p.match(r)[1],data:h}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(t,l,c){var o=t("./asn1"),r=t("./aesid.json"),n=t("./fixProc"),s=t("browserify-aes"),e=t("pbkdf2"),i=t("safe-buffer").Buffer;function u(a){var h;typeof a!="object"||i.isBuffer(a)||(h=a.passphrase,a=a.key),typeof a=="string"&&(a=i.from(a));var p,m,d=n(a,h),b=d.tag,g=d.data;switch(b){case"CERTIFICATE":m=o.certificate.decode(g,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(m||(m=o.PublicKey.decode(g,"der")),p=m.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(m.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return m.subjectPrivateKey=m.subjectPublicKey,{type:"ec",data:m};case"1.2.840.10040.4.1":return m.algorithm.params.pub_key=o.DSAparam.decode(m.subjectPublicKey.data,"der"),{type:"dsa",data:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"ENCRYPTED PRIVATE KEY":g=(function(S,C){var I=S.algorithm.decrypt.kde.kdeparams.salt,D=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),z=r[S.algorithm.decrypt.cipher.algo.join(".")],P=S.algorithm.decrypt.cipher.iv,B=S.subjectPrivateKey,F=parseInt(z.split("-")[1],10)/8,W=e.pbkdf2Sync(C,I,D,F,"sha1"),q=s.createDecipheriv(z,W,P),A=[];return A.push(q.update(B)),A.push(q.final()),i.concat(A)})(g=o.EncryptedPrivateKey.decode(g,"der"),h);case"PRIVATE KEY":switch(p=(m=o.PrivateKey.decode(g,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(m.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:m.algorithm.curve,privateKey:o.ECPrivateKey.decode(m.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return m.algorithm.params.priv_key=o.DSAparam.decode(m.subjectPrivateKey,"der"),{type:"dsa",params:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(g,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(g,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(g,"der")};case"EC PRIVATE KEY":return{curve:(g=o.ECPrivateKey.decode(g,"der")).parameters.value,privateKey:g.privateKey};default:throw new Error("unknown key type "+b)}}l.exports=u,u.signature=o.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(t,l,c){c.pbkdf2=t("./lib/async"),c.pbkdf2Sync=t("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(t,l,c){(function(o){(function(){var r,n,s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./sync"),a=t("./to-buffer"),h=o.crypto&&o.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function d(){return n||(n=o.process&&o.process.nextTick?o.process.nextTick:o.queueMicrotask?o.queueMicrotask:o.setImmediate?o.setImmediate:o.setTimeout)}function b(g,S,C,I,D){return h.importKey("raw",g,{name:"PBKDF2"},!1,["deriveBits"]).then((function(z){return h.deriveBits({name:"PBKDF2",salt:S,iterations:C,hash:{name:D}},z,I<<3)})).then((function(z){return s.from(z)}))}l.exports=function(g,S,C,I,D,z){typeof D=="function"&&(z=D,D=void 0);var P=p[(D=D||"sha1").toLowerCase()];if(P&&typeof o.Promise=="function"){if(e(C,I),g=a(g,i,"Password"),S=a(S,i,"Salt"),typeof z!="function")throw new Error("No callback provided to pbkdf2");(function(B,F){B.then((function(W){d()((function(){F(null,W)}))}),(function(W){d()((function(){F(W)}))}))})((function(B){if(o.process&&!o.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(m[B]!==void 0)return m[B];var F=b(r=r||s.alloc(8),r,10,128,B).then((function(){return!0})).catch((function(){return!1}));return m[B]=F,F})(P).then((function(B){return B?b(g,S,C,I,P):u(g,S,C,I,D)})),z)}else d()((function(){var B;try{B=u(g,S,C,I,D)}catch(F){return z(F)}z(null,B)}))}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(t,l,c){(function(o,r){(function(){var n;r.process&&r.process.browser?n="utf-8":r.process&&r.process.version?n=parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":n="utf-8",l.exports=n}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(t,l,c){var o=Math.pow(2,30)-1;l.exports=function(r,n){if(typeof r!="number")throw new TypeError("Iterations not a number");if(r<0)throw new TypeError("Bad iterations");if(typeof n!="number")throw new TypeError("Key length not a number");if(n<0||n>o||n!=n)throw new TypeError("Bad key length")}},{}],464:[function(t,l,c){var o=t("create-hash/md5"),r=t("ripemd160"),n=t("sha.js"),s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./to-buffer"),a=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(m,d,b){var g=(function(P){function B(F){return n(P).update(F).digest()}return P==="rmd160"||P==="ripemd160"?function(F){return new r().update(F).digest()}:P==="md5"?o:B})(m),S=m==="sha512"||m==="sha384"?128:64;d.length>S?d=g(d):d.length<S&&(d=s.concat([d,a],S));for(var C=s.allocUnsafe(S+h[m]),I=s.allocUnsafe(S+h[m]),D=0;D<S;D++)C[D]=54^d[D],I[D]=92^d[D];var z=s.allocUnsafe(S+b+4);C.copy(z,0,0,S),this.ipad1=z,this.ipad2=C,this.opad=I,this.alg=m,this.blocksize=S,this.hash=g,this.size=h[m]}p.prototype.run=function(m,d){return m.copy(d,this.blocksize),this.hash(d).copy(this.opad,this.blocksize),this.hash(this.opad)},l.exports=function(m,d,b,g,S){e(b,g);var C=new p(S=S||"sha1",m=u(m,i,"Password"),(d=u(d,i,"Salt")).length),I=s.allocUnsafe(g),D=s.allocUnsafe(d.length+4);d.copy(D,0,0,d.length);for(var z=0,P=h[S],B=Math.ceil(g/P),F=1;F<=B;F++){D.writeUInt32BE(F,d.length);for(var W=C.run(D,C.ipad1),q=W,A=1;A<b;A++){q=C.run(q,C.ipad2);for(var M=0;M<P;M++)W[M]^=q[M]}W.copy(I,z),z+=P}return I}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(t,l,c){var o=t("safe-buffer").Buffer;l.exports=function(r,n,s){if(o.isBuffer(r))return r;if(typeof r=="string")return o.from(r,n);if(ArrayBuffer.isView(r))return o.from(r.buffer);throw new TypeError(s+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(t,l,c){(function(o){(function(){o===void 0||!o.version||o.version.indexOf("v0.")===0||o.version.indexOf("v1.")===0&&o.version.indexOf("v1.8.")!==0?l.exports={nextTick:function(r,n,s,e){if(typeof r!="function")throw new TypeError('"callback" argument must be a function');var i,u,a=arguments.length;switch(a){case 0:case 1:return o.nextTick(r);case 2:return o.nextTick((function(){r.call(null,n)}));case 3:return o.nextTick((function(){r.call(null,n,s)}));case 4:return o.nextTick((function(){r.call(null,n,s,e)}));default:for(i=new Array(a-1),u=0;u<i.length;)i[u++]=arguments[u];return o.nextTick((function(){r.apply(null,i)}))}}}:l.exports=o}).call(this)}).call(this,t("_process"))},{_process:467}],467:[function(t,l,c){var o,r,n=l.exports={};function s(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function i(S){if(o===setTimeout)return setTimeout(S,0);if((o===s||!o)&&setTimeout)return o=setTimeout,setTimeout(S,0);try{return o(S,0)}catch{try{return o.call(null,S,0)}catch{return o.call(this,S,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:s}catch{o=s}try{r=typeof clearTimeout=="function"?clearTimeout:e}catch{r=e}})();var u,a=[],h=!1,p=-1;function m(){h&&u&&(h=!1,u.length?a=u.concat(a):p=-1,a.length&&d())}function d(){if(!h){var S=i(m);h=!0;for(var C=a.length;C;){for(u=a,a=[];++p<C;)u&&u[p].run();p=-1,C=a.length}u=null,h=!1,(function(I){if(r===clearTimeout)return clearTimeout(I);if((r===e||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(I);try{r(I)}catch{try{return r.call(null,I)}catch{return r.call(this,I)}}})(S)}}function b(S,C){this.fun=S,this.array=C}function g(){}n.nextTick=function(S){var C=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)C[I-1]=arguments[I];a.push(new b(S,C)),a.length!==1||h||i(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(S){return[]},n.binding=function(S){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(S){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],468:[function(t,l,c){c.publicEncrypt=t("./publicEncrypt"),c.privateDecrypt=t("./privateDecrypt"),c.privateEncrypt=function(o,r){return c.publicEncrypt(o,r,!0)},c.publicDecrypt=function(o,r){return c.privateDecrypt(o,r,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(t,l,c){var o=t("create-hash"),r=t("safe-buffer").Buffer;function n(s){var e=r.allocUnsafe(4);return e.writeUInt32BE(s,0),e}l.exports=function(s,e){for(var i,u=r.alloc(0),a=0;u.length<e;)i=n(a++),u=r.concat([u,o("sha1").update(s).update(i).digest()]);return u.slice(0,e)}},{"create-hash":386,"safe-buffer":494}],470:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],471:[function(t,l,c){var o=t("parse-asn1"),r=t("./mgf"),n=t("./xor"),s=t("bn.js"),e=t("browserify-rsa"),i=t("create-hash"),u=t("./withPublic"),a=t("safe-buffer").Buffer;l.exports=function(h,p,m){var d;d=h.padding?h.padding:m?1:4;var b,g=o(h),S=g.modulus.byteLength();if(p.length>S||new s(p).cmp(g.modulus)>=0)throw new Error("decryption error");b=m?u(new s(p),g):e(p,g);var C=a.alloc(S-b.length);if(b=a.concat([C,b],S),d===4)return(function(I,D){var z=I.modulus.byteLength(),P=i("sha1").update(a.alloc(0)).digest(),B=P.length;if(D[0]!==0)throw new Error("decryption error");var F=D.slice(1,B+1),W=D.slice(B+1),q=n(F,r(W,B)),A=n(W,r(q,z-B-1));if((function(k,y){k=a.from(k),y=a.from(y);var w=0,x=k.length;k.length!==y.length&&(w++,x=Math.min(k.length,y.length));for(var _=-1;++_<x;)w+=k[_]^y[_];return w})(P,A.slice(0,B)))throw new Error("decryption error");for(var M=B;A[M]===0;)M++;if(A[M++]!==1)throw new Error("decryption error");return A.slice(M)})(g,b);if(d===1)return(function(I,D,z){for(var P=D.slice(0,2),B=2,F=0;D[B++]!==0;)if(B>=D.length){F++;break}var W=D.slice(2,B-1);if((P.toString("hex")!=="0002"&&!z||P.toString("hex")!=="0001"&&z)&&F++,W.length<8&&F++,F)throw new Error("decryption error");return D.slice(B)})(0,b,m);if(d===3)return b;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(t,l,c){var o=t("parse-asn1"),r=t("randombytes"),n=t("create-hash"),s=t("./mgf"),e=t("./xor"),i=t("bn.js"),u=t("./withPublic"),a=t("browserify-rsa"),h=t("safe-buffer").Buffer;l.exports=function(p,m,d){var b;b=p.padding?p.padding:d?1:4;var g,S=o(p);if(b===4)g=(function(C,I){var D=C.modulus.byteLength(),z=I.length,P=n("sha1").update(h.alloc(0)).digest(),B=P.length,F=2*B;if(z>D-F-2)throw new Error("message too long");var W=h.alloc(D-z-F-2),q=D-B-1,A=r(B),M=e(h.concat([P,W,h.alloc(1,1),I],q),s(A,q)),k=e(A,s(M,B));return new i(h.concat([h.alloc(1),k,M],D))})(S,m);else if(b===1)g=(function(C,I,D){var z,P=I.length,B=C.modulus.byteLength();if(P>B-11)throw new Error("message too long");return z=D?h.alloc(B-P-3,255):(function(F){for(var W,q=h.allocUnsafe(F),A=0,M=r(2*F),k=0;A<F;)k===M.length&&(M=r(2*F),k=0),(W=M[k++])&&(q[A++]=W);return q})(B-P-3),new i(h.concat([h.from([0,D?1:2]),z,h.alloc(1),I],B))})(S,m,d);else{if(b!==3)throw new Error("unknown padding");if((g=new i(m)).cmp(S.modulus)>=0)throw new Error("data too long for modulus")}return d?a(g,S):u(g,S)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(t,l,c){var o=t("bn.js"),r=t("safe-buffer").Buffer;l.exports=function(n,s){return r.from(n.toRed(o.mont(s.modulus)).redPow(new o(s.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(t,l,c){l.exports=function(o,r){for(var n=o.length,s=-1;++s<n;)o[s]^=r[s];return o}},{}],475:[function(t,l,c){(function(o,r){(function(){var n=t("safe-buffer").Buffer,s=r.crypto||r.msCrypto;s&&s.getRandomValues?l.exports=function(e,i){if(e>4294967295)throw new RangeError("requested too many random bytes");var u=n.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)s.getRandomValues(u.slice(a,a+65536));else s.getRandomValues(u);return typeof i=="function"?o.nextTick((function(){i(null,u)})):u}:l.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
276
276
|
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(t,l,c){(function(o,r){(function(){function n(){throw new Error(`secure random number generation not supported by this browser
|
|
277
277
|
use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("randombytes"),i=s.Buffer,u=s.kMaxLength,a=r.crypto||r.msCrypto,h=Math.pow(2,32)-1;function p(b,g){if(typeof b!="number"||b!=b)throw new TypeError("offset must be a number");if(b>h||b<0)throw new TypeError("offset must be a uint32");if(b>u||b>g)throw new RangeError("offset out of range")}function m(b,g,S){if(typeof b!="number"||b!=b)throw new TypeError("size must be a number");if(b>h||b<0)throw new TypeError("size must be a uint32");if(b+g>S||b>u)throw new RangeError("buffer too small")}function d(b,g,S,C){if(o.browser){var I=b.buffer,D=new Uint8Array(I,g,S);return a.getRandomValues(D),C?void o.nextTick((function(){C(null,b)})):b}if(!C)return e(S).copy(b,g),b;e(S,(function(z,P){if(z)return C(z);P.copy(b,g),C(null,b)}))}a&&a.getRandomValues||!o.browser?(c.randomFill=function(b,g,S,C){if(!(i.isBuffer(b)||b instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof g=="function")C=g,g=0,S=b.length;else if(typeof S=="function")C=S,S=b.length-g;else if(typeof C!="function")throw new TypeError('"cb" argument must be a function');return p(g,b.length),m(S,g,b.length),d(b,g,S,C)},c.randomFillSync=function(b,g,S){if(g===void 0&&(g=0),!(i.isBuffer(b)||b instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return p(g,b.length),S===void 0&&(S=b.length-g),m(S,g,b.length),d(b,g,S)}):(c.randomFill=n,c.randomFillSync=n)}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(t,l,c){var o={};function r(s,e,i){i||(i=Error);var u=(function(a){var h,p;function m(d,b,g){return a.call(this,(function(S,C,I){return typeof e=="string"?e:e(S,C,I)})(d,b,g))||this}return p=a,(h=m).prototype=Object.create(p.prototype),h.prototype.constructor=h,h.__proto__=p,m})(i);u.prototype.name=i.name,u.prototype.code=s,o[s]=u}function n(s,e){if(Array.isArray(s)){var i=s.length;return s=s.map((function(u){return String(u)})),i>2?"one of ".concat(e," ").concat(s.slice(0,i-1).join(", "),", or ")+s[i-1]:i===2?"one of ".concat(e," ").concat(s[0]," or ").concat(s[1]):"of ".concat(e," ").concat(s[0])}return"of ".concat(e," ").concat(String(s))}r("ERR_INVALID_OPT_VALUE",(function(s,e){return'The value "'+e+'" is invalid for option "'+s+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(s,e,i){var u,a,h;if(typeof e=="string"&&(a="not ",e.substr(0,a.length)===a)?(u="must not be",e=e.replace(/^not /,"")):u="must be",(function(m,d,b){return(b===void 0||b>m.length)&&(b=m.length),m.substring(b-d.length,b)===d})(s," argument"))h="The ".concat(s," ").concat(u," ").concat(n(e,"type"));else{var p=(function(m,d,b){return typeof b!="number"&&(b=0),!(b+d.length>m.length)&&m.indexOf(d,b)!==-1})(s,".")?"property":"argument";h='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(n(e,"type"))}return h+=". Received type ".concat(typeof i)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(s){return"The "+s+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(s){return"Cannot call "+s+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(s){return"Unknown encoding: "+s}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),l.exports.codes=o},{}],478:[function(t,l,c){(function(o){(function(){var r=Object.keys||function(m){var d=[];for(var b in m)d.push(b);return d};l.exports=a;var n=t("./_stream_readable"),s=t("./_stream_writable");t("inherits")(a,n);for(var e=r(s.prototype),i=0;i<e.length;i++){var u=e[i];a.prototype[u]||(a.prototype[u]=s.prototype[u])}function a(m){if(!(this instanceof a))return new a(m);n.call(this,m),s.call(this,m),this.allowHalfOpen=!0,m&&(m.readable===!1&&(this.readable=!1),m.writable===!1&&(this.writable=!1),m.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||o.nextTick(p,this)}function p(m){m.end()}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(m){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=m,this._writableState.destroyed=m)}})}).call(this)}).call(this,t("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(t,l,c){l.exports=r;var o=t("./_stream_transform");function r(n){if(!(this instanceof r))return new r(n);o.call(this,n)}t("inherits")(r,o),r.prototype._transform=function(n,s,e){e(null,n)}},{"./_stream_transform":481,inherits:440}],480:[function(t,l,c){(function(o,r){(function(){var n;l.exports=q,q.ReadableState=W,t("events").EventEmitter;var s=function(N,R){return N.listeners(R).length},e=t("./internal/streams/stream"),i=t("buffer").Buffer,u=(r!==void 0?r:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},a,h=t("util");a=h&&h.debuglog?h.debuglog("stream"):function(){};var p,m,d,b=t("./internal/streams/buffer_list"),g=t("./internal/streams/destroy"),S=t("./internal/streams/state").getHighWaterMark,C=t("../errors").codes,I=C.ERR_INVALID_ARG_TYPE,D=C.ERR_STREAM_PUSH_AFTER_EOF,z=C.ERR_METHOD_NOT_IMPLEMENTED,P=C.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t("inherits")(q,e);var B=g.errorOrDestroy,F=["error","close","destroy","pause","resume"];function W(N,R,U){n=n||t("./_stream_duplex"),N=N||{},typeof U!="boolean"&&(U=R instanceof n),this.objectMode=!!N.objectMode,U&&(this.objectMode=this.objectMode||!!N.readableObjectMode),this.highWaterMark=S(this,N,"readableHighWaterMark",U),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.destroyed=!1,this.defaultEncoding=N.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,N.encoding&&(p||(p=t("string_decoder/").StringDecoder),this.decoder=new p(N.encoding),this.encoding=N.encoding)}function q(N){if(n=n||t("./_stream_duplex"),!(this instanceof q))return new q(N);var R=this instanceof n;this._readableState=new W(N,this,R),this.readable=!0,N&&(typeof N.read=="function"&&(this._read=N.read),typeof N.destroy=="function"&&(this._destroy=N.destroy)),e.call(this)}function A(N,R,U,K,rt){a("readableAddChunk",R);var Z,et=N._readableState;if(R===null)et.reading=!1,(function(ht,lt){if(a("onEofChunk"),!lt.ended){if(lt.decoder){var Q=lt.decoder.end();Q&&Q.length&&(lt.buffer.push(Q),lt.length+=lt.objectMode?1:Q.length)}lt.ended=!0,lt.sync?y(ht):(lt.needReadable=!1,lt.emittedReadable||(lt.emittedReadable=!0,w(ht)))}})(N,et);else if(rt||(Z=(function(ht,lt){var Q;ot=lt,i.isBuffer(ot)||ot instanceof u||typeof lt=="string"||lt===void 0||ht.objectMode||(Q=new I("chunk",["string","Buffer","Uint8Array"],lt));var ot;return Q})(et,R)),Z)B(N,Z);else if(et.objectMode||R&&R.length>0)if(typeof R=="string"||et.objectMode||Object.getPrototypeOf(R)===i.prototype||(R=(function(ht){return i.from(ht)})(R)),K)et.endEmitted?B(N,new P):M(N,et,R,!0);else if(et.ended)B(N,new D);else{if(et.destroyed)return!1;et.reading=!1,et.decoder&&!U?(R=et.decoder.write(R),et.objectMode||R.length!==0?M(N,et,R,!1):x(N,et)):M(N,et,R,!1)}else K||(et.reading=!1,x(N,et));return!et.ended&&(et.length<et.highWaterMark||et.length===0)}function M(N,R,U,K){R.flowing&&R.length===0&&!R.sync?(R.awaitDrain=0,N.emit("data",U)):(R.length+=R.objectMode?1:U.length,K?R.buffer.unshift(U):R.buffer.push(U),R.needReadable&&y(N)),x(N,R)}Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(N){this._readableState&&(this._readableState.destroyed=N)}}),q.prototype.destroy=g.destroy,q.prototype._undestroy=g.undestroy,q.prototype._destroy=function(N,R){R(N)},q.prototype.push=function(N,R){var U,K=this._readableState;return K.objectMode?U=!0:typeof N=="string"&&((R=R||K.defaultEncoding)!==K.encoding&&(N=i.from(N,R),R=""),U=!0),A(this,N,R,!1,U)},q.prototype.unshift=function(N){return A(this,N,null,!0,!1)},q.prototype.isPaused=function(){return this._readableState.flowing===!1},q.prototype.setEncoding=function(N){p||(p=t("string_decoder/").StringDecoder);var R=new p(N);this._readableState.decoder=R,this._readableState.encoding=this._readableState.decoder.encoding;for(var U=this._readableState.buffer.head,K="";U!==null;)K+=R.write(U.data),U=U.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};function k(N,R){return N<=0||R.length===0&&R.ended?0:R.objectMode?1:N!=N?R.flowing&&R.length?R.buffer.head.data.length:R.length:(N>R.highWaterMark&&(R.highWaterMark=(function(U){return U>=1073741824?U=1073741824:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U})(N)),N<=R.length?N:R.ended?R.length:(R.needReadable=!0,0))}function y(N){var R=N._readableState;a("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(a("emitReadable",R.flowing),R.emittedReadable=!0,o.nextTick(w,N))}function w(N){var R=N._readableState;a("emitReadable_",R.destroyed,R.length,R.ended),R.destroyed||!R.length&&!R.ended||(N.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,V(N)}function x(N,R){R.readingMore||(R.readingMore=!0,o.nextTick(_,N,R))}function _(N,R){for(;!R.reading&&!R.ended&&(R.length<R.highWaterMark||R.flowing&&R.length===0);){var U=R.length;if(a("maybeReadMore read 0"),N.read(0),U===R.length)break}R.readingMore=!1}function T(N){var R=N._readableState;R.readableListening=N.listenerCount("readable")>0,R.resumeScheduled&&!R.paused?R.flowing=!0:N.listenerCount("data")>0&&N.resume()}function O(N){a("readable nexttick read 0"),N.read(0)}function j(N,R){a("resume",R.reading),R.reading||N.read(0),R.resumeScheduled=!1,N.emit("resume"),V(N),R.flowing&&!R.reading&&N.read(0)}function V(N){var R=N._readableState;for(a("flow",R.flowing);R.flowing&&N.read()!==null;);}function X(N,R){return R.length===0?null:(R.objectMode?U=R.buffer.shift():!N||N>=R.length?(U=R.decoder?R.buffer.join(""):R.buffer.length===1?R.buffer.first():R.buffer.concat(R.length),R.buffer.clear()):U=R.buffer.consume(N,R.decoder),U);var U}function J(N){var R=N._readableState;a("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,o.nextTick(L,R,N))}function L(N,R){if(a("endReadableNT",N.endEmitted,N.length),!N.endEmitted&&N.length===0&&(N.endEmitted=!0,R.readable=!1,R.emit("end"),N.autoDestroy)){var U=R._writableState;(!U||U.autoDestroy&&U.finished)&&R.destroy()}}function G(N,R){for(var U=0,K=N.length;U<K;U++)if(N[U]===R)return U;return-1}q.prototype.read=function(N){a("read",N),N=parseInt(N,10);var R=this._readableState,U=N;if(N!==0&&(R.emittedReadable=!1),N===0&&R.needReadable&&((R.highWaterMark!==0?R.length>=R.highWaterMark:R.length>0)||R.ended))return a("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?J(this):y(this),null;if((N=k(N,R))===0&&R.ended)return R.length===0&&J(this),null;var K,rt=R.needReadable;return a("need readable",rt),(R.length===0||R.length-N<R.highWaterMark)&&a("length less than watermark",rt=!0),R.ended||R.reading?a("reading or ended",rt=!1):rt&&(a("do read"),R.reading=!0,R.sync=!0,R.length===0&&(R.needReadable=!0),this._read(R.highWaterMark),R.sync=!1,R.reading||(N=k(U,R))),(K=N>0?X(N,R):null)===null?(R.needReadable=R.length<=R.highWaterMark,N=0):(R.length-=N,R.awaitDrain=0),R.length===0&&(R.ended||(R.needReadable=!0),U!==N&&R.ended&&J(this)),K!==null&&this.emit("data",K),K},q.prototype._read=function(N){B(this,new z("_read()"))},q.prototype.pipe=function(N,R){var U=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=N;break;case 1:K.pipes=[K.pipes,N];break;default:K.pipes.push(N)}K.pipesCount+=1,a("pipe count=%d opts=%j",K.pipesCount,R);var rt=(!R||R.end!==!1)&&N!==o.stdout&&N!==o.stderr?et:ct;function Z(ft,mt){a("onunpipe"),ft===U&&mt&&mt.hasUnpiped===!1&&(mt.hasUnpiped=!0,a("cleanup"),N.removeListener("close",nt),N.removeListener("finish",ut),N.removeListener("drain",ht),N.removeListener("error",ot),N.removeListener("unpipe",Z),U.removeListener("end",et),U.removeListener("end",ct),U.removeListener("data",Q),lt=!0,!K.awaitDrain||N._writableState&&!N._writableState.needDrain||ht())}function et(){a("onend"),N.end()}K.endEmitted?o.nextTick(rt):U.once("end",rt),N.on("unpipe",Z);var ht=(function(ft){return function(){var mt=ft._readableState;a("pipeOnDrain",mt.awaitDrain),mt.awaitDrain&&mt.awaitDrain--,mt.awaitDrain===0&&s(ft,"data")&&(mt.flowing=!0,V(ft))}})(U);N.on("drain",ht);var lt=!1;function Q(ft){a("ondata");var mt=N.write(ft);a("dest.write",mt),mt===!1&&((K.pipesCount===1&&K.pipes===N||K.pipesCount>1&&G(K.pipes,N)!==-1)&&!lt&&(a("false write response, pause",K.awaitDrain),K.awaitDrain++),U.pause())}function ot(ft){a("onerror",ft),ct(),N.removeListener("error",ot),s(N,"error")===0&&B(N,ft)}function nt(){N.removeListener("finish",ut),ct()}function ut(){a("onfinish"),N.removeListener("close",nt),ct()}function ct(){a("unpipe"),U.unpipe(N)}return U.on("data",Q),(function(ft,mt,gt){if(typeof ft.prependListener=="function")return ft.prependListener(mt,gt);ft._events&&ft._events[mt]?Array.isArray(ft._events[mt])?ft._events[mt].unshift(gt):ft._events[mt]=[gt,ft._events[mt]]:ft.on(mt,gt)})(N,"error",ot),N.once("close",nt),N.once("finish",ut),N.emit("pipe",U),K.flowing||(a("pipe resume"),U.resume()),N},q.prototype.unpipe=function(N){var R=this._readableState,U={hasUnpiped:!1};if(R.pipesCount===0)return this;if(R.pipesCount===1)return N&&N!==R.pipes||(N||(N=R.pipes),R.pipes=null,R.pipesCount=0,R.flowing=!1,N&&N.emit("unpipe",this,U)),this;if(!N){var K=R.pipes,rt=R.pipesCount;R.pipes=null,R.pipesCount=0,R.flowing=!1;for(var Z=0;Z<rt;Z++)K[Z].emit("unpipe",this,{hasUnpiped:!1});return this}var et=G(R.pipes,N);return et===-1||(R.pipes.splice(et,1),R.pipesCount-=1,R.pipesCount===1&&(R.pipes=R.pipes[0]),N.emit("unpipe",this,U)),this},q.prototype.on=function(N,R){var U=e.prototype.on.call(this,N,R),K=this._readableState;return N==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):N==="readable"&&(K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,a("on readable",K.length,K.reading),K.length?y(this):K.reading||o.nextTick(O,this))),U},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(N,R){var U=e.prototype.removeListener.call(this,N,R);return N==="readable"&&o.nextTick(T,this),U},q.prototype.removeAllListeners=function(N){var R=e.prototype.removeAllListeners.apply(this,arguments);return N!=="readable"&&N!==void 0||o.nextTick(T,this),R},q.prototype.resume=function(){var N=this._readableState;return N.flowing||(a("resume"),N.flowing=!N.readableListening,(function(R,U){U.resumeScheduled||(U.resumeScheduled=!0,o.nextTick(j,R,U))})(this,N)),N.paused=!1,this},q.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},q.prototype.wrap=function(N){var R=this,U=this._readableState,K=!1;for(var rt in N.on("end",(function(){if(a("wrapped end"),U.decoder&&!U.ended){var et=U.decoder.end();et&&et.length&&R.push(et)}R.push(null)})),N.on("data",(function(et){a("wrapped data"),U.decoder&&(et=U.decoder.write(et)),U.objectMode&&et==null||(U.objectMode||et&&et.length)&&(R.push(et)||(K=!0,N.pause()))})),N)this[rt]===void 0&&typeof N[rt]=="function"&&(this[rt]=(function(et){return function(){return N[et].apply(N,arguments)}})(rt));for(var Z=0;Z<F.length;Z++)N.on(F[Z],this.emit.bind(this,F[Z]));return this._read=function(et){a("wrapped _read",et),K&&(K=!1,N.resume())},this},typeof Symbol=="function"&&(q.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=t("./internal/streams/async_iterator")),m(this)}),Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(N){this._readableState&&(this._readableState.flowing=N)}}),q._fromList=X,Object.defineProperty(q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(q.from=function(N,R){return d===void 0&&(d=t("./internal/streams/from")),d(q,N,R)})}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/async_iterator":483,"./internal/streams/buffer_list":484,"./internal/streams/destroy":485,"./internal/streams/from":487,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,events:422,inherits:440,"string_decoder/":522,util:188}],481:[function(t,l,c){l.exports=a;var o=t("../errors").codes,r=o.ERR_METHOD_NOT_IMPLEMENTED,n=o.ERR_MULTIPLE_CALLBACK,s=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=o.ERR_TRANSFORM_WITH_LENGTH_0,i=t("./_stream_duplex");function u(m,d){var b=this._transformState;b.transforming=!1;var g=b.writecb;if(g===null)return this.emit("error",new n);b.writechunk=null,b.writecb=null,d!=null&&this.push(d),g(m);var S=this._readableState;S.reading=!1,(S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}function a(m){if(!(this instanceof a))return new a(m);i.call(this,m),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,m&&(typeof m.transform=="function"&&(this._transform=m.transform),typeof m.flush=="function"&&(this._flush=m.flush)),this.on("prefinish",h)}function h(){var m=this;typeof this._flush!="function"||this._readableState.destroyed?p(this,null,null):this._flush((function(d,b){p(m,d,b)}))}function p(m,d,b){if(d)return m.emit("error",d);if(b!=null&&m.push(b),m._writableState.length)throw new e;if(m._transformState.transforming)throw new s;return m.push(null)}t("inherits")(a,i),a.prototype.push=function(m,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,m,d)},a.prototype._transform=function(m,d,b){b(new r("_transform()"))},a.prototype._write=function(m,d,b){var g=this._transformState;if(g.writecb=b,g.writechunk=m,g.writeencoding=d,!g.transforming){var S=this._readableState;(g.needTransform||S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}},a.prototype._read=function(m){var d=this._transformState;d.writechunk===null||d.transforming?d.needTransform=!0:(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform))},a.prototype._destroy=function(m,d){i.prototype._destroy.call(this,m,(function(b){d(b)}))}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(t,l,c){(function(o,r){(function(){function n(_){var T=this;this.next=null,this.entry=null,this.finish=function(){(function(O,j,V){var X=O.entry;for(O.entry=null;X;){var J=X.callback;j.pendingcb--,J(V),X=X.next}j.corkedRequestsFree.next=O})(T,_)}}var s;l.exports=q,q.WritableState=W;var e={deprecate:t("util-deprecate")},i=t("./internal/streams/stream"),u=t("buffer").Buffer,a=(r!==void 0?r:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},h,p=t("./internal/streams/destroy"),m=t("./internal/streams/state").getHighWaterMark,d=t("../errors").codes,b=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,S=d.ERR_MULTIPLE_CALLBACK,C=d.ERR_STREAM_CANNOT_PIPE,I=d.ERR_STREAM_DESTROYED,D=d.ERR_STREAM_NULL_VALUES,z=d.ERR_STREAM_WRITE_AFTER_END,P=d.ERR_UNKNOWN_ENCODING,B=p.errorOrDestroy;function F(){}function W(_,T,O){s=s||t("./_stream_duplex"),_=_||{},typeof O!="boolean"&&(O=T instanceof s),this.objectMode=!!_.objectMode,O&&(this.objectMode=this.objectMode||!!_.writableObjectMode),this.highWaterMark=m(this,_,"writableHighWaterMark",O),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=_.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(V){(function(X,J){var L=X._writableState,G=L.sync,N=L.writecb;if(typeof N!="function")throw new S;if((function(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0})(L),J)(function(U,K,rt,Z,et){--K.pendingcb,rt?(o.nextTick(et,Z),o.nextTick(x,U,K),U._writableState.errorEmitted=!0,B(U,Z)):(et(Z),U._writableState.errorEmitted=!0,B(U,Z),x(U,K))})(X,L,G,J,N);else{var R=y(L)||X.destroyed;R||L.corked||L.bufferProcessing||!L.bufferedRequest||k(X,L),G?o.nextTick(M,X,L,R,N):M(X,L,R,N)}})(T,V)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=_.emitClose!==!1,this.autoDestroy=!!_.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function q(_){var T=this instanceof(s=s||t("./_stream_duplex"));if(!T&&!h.call(q,this))return new q(_);this._writableState=new W(_,this,T),this.writable=!0,_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final)),i.call(this)}function A(_,T,O,j,V,X,J){T.writelen=j,T.writecb=J,T.writing=!0,T.sync=!0,T.destroyed?T.onwrite(new I("write")):O?_._writev(V,T.onwrite):_._write(V,X,T.onwrite),T.sync=!1}function M(_,T,O,j){O||(function(V,X){X.length===0&&X.needDrain&&(X.needDrain=!1,V.emit("drain"))})(_,T),T.pendingcb--,j(),x(_,T)}function k(_,T){T.bufferProcessing=!0;var O=T.bufferedRequest;if(_._writev&&O&&O.next){var j=T.bufferedRequestCount,V=new Array(j),X=T.corkedRequestsFree;X.entry=O;for(var J=0,L=!0;O;)V[J]=O,O.isBuf||(L=!1),O=O.next,J+=1;V.allBuffers=L,A(_,T,!0,T.length,V,"",X.finish),T.pendingcb++,T.lastBufferedRequest=null,X.next?(T.corkedRequestsFree=X.next,X.next=null):T.corkedRequestsFree=new n(T),T.bufferedRequestCount=0}else{for(;O;){var G=O.chunk,N=O.encoding,R=O.callback;if(A(_,T,!1,T.objectMode?1:G.length,G,N,R),O=O.next,T.bufferedRequestCount--,T.writing)break}O===null&&(T.lastBufferedRequest=null)}T.bufferedRequest=O,T.bufferProcessing=!1}function y(_){return _.ending&&_.length===0&&_.bufferedRequest===null&&!_.finished&&!_.writing}function w(_,T){_._final((function(O){T.pendingcb--,O&&B(_,O),T.prefinished=!0,_.emit("prefinish"),x(_,T)}))}function x(_,T){var O=y(T);if(O&&((function(V,X){X.prefinished||X.finalCalled||(typeof V._final!="function"||X.destroyed?(X.prefinished=!0,V.emit("prefinish")):(X.pendingcb++,X.finalCalled=!0,o.nextTick(w,V,X)))})(_,T),T.pendingcb===0&&(T.finished=!0,_.emit("finish"),T.autoDestroy))){var j=_._readableState;(!j||j.autoDestroy&&j.endEmitted)&&_.destroy()}return O}t("inherits")(q,i),W.prototype.getBuffer=function(){for(var _=this.bufferedRequest,T=[];_;)T.push(_),_=_.next;return T},(function(){try{Object.defineProperty(W.prototype,"buffer",{get:e.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:function(_){return!!h.call(this,_)||this===q&&_&&_._writableState instanceof W}})):h=function(_){return _ instanceof this},q.prototype.pipe=function(){B(this,new C)},q.prototype.write=function(_,T,O){var j,V=this._writableState,X=!1,J=!V.objectMode&&(j=_,u.isBuffer(j)||j instanceof a);return J&&!u.isBuffer(_)&&(_=(function(L){return u.from(L)})(_)),typeof T=="function"&&(O=T,T=null),J?T="buffer":T||(T=V.defaultEncoding),typeof O!="function"&&(O=F),V.ending?(function(L,G){var N=new z;B(L,N),o.nextTick(G,N)})(this,O):(J||(function(L,G,N,R){var U;return N===null?U=new D:typeof N=="string"||G.objectMode||(U=new b("chunk",["string","Buffer"],N)),!U||(B(L,U),o.nextTick(R,U),!1)})(this,V,_,O))&&(V.pendingcb++,X=(function(L,G,N,R,U,K){if(!N){var rt=(function(lt,Q,ot){return lt.objectMode||lt.decodeStrings===!1||typeof Q!="string"||(Q=u.from(Q,ot)),Q})(G,R,U);R!==rt&&(N=!0,U="buffer",R=rt)}var Z=G.objectMode?1:R.length;G.length+=Z;var et=G.length<G.highWaterMark;if(et||(G.needDrain=!0),G.writing||G.corked){var ht=G.lastBufferedRequest;G.lastBufferedRequest={chunk:R,encoding:U,isBuf:N,callback:K,next:null},ht?ht.next=G.lastBufferedRequest:G.bufferedRequest=G.lastBufferedRequest,G.bufferedRequestCount+=1}else A(L,G,!1,Z,R,U,K);return et})(this,V,J,_,T,O)),X},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){var _=this._writableState;_.corked&&(_.corked--,_.writing||_.corked||_.bufferProcessing||!_.bufferedRequest||k(this,_))},q.prototype.setDefaultEncoding=function(_){if(typeof _=="string"&&(_=_.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((_+"").toLowerCase())>-1))throw new P(_);return this._writableState.defaultEncoding=_,this},Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),q.prototype._write=function(_,T,O){O(new g("_write()"))},q.prototype._writev=null,q.prototype.end=function(_,T,O){var j=this._writableState;return typeof _=="function"?(O=_,_=null,T=null):typeof T=="function"&&(O=T,T=null),_!=null&&this.write(_,T),j.corked&&(j.corked=1,this.uncork()),j.ending||(function(V,X,J){X.ending=!0,x(V,X),J&&(X.finished?o.nextTick(J):V.once("finish",J)),X.ended=!0,V.writable=!1})(this,j,O),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(_){this._writableState&&(this._writableState.destroyed=_)}}),q.prototype.destroy=p.destroy,q.prototype._undestroy=p.undestroy,q.prototype._destroy=function(_,T){T(_)}}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,inherits:440,"util-deprecate":524}],483:[function(t,l,c){(function(o){(function(){var r;function n(I,D,z){return(D=(function(P){var B=(function(F,W){if(typeof F!="object"||F===null)return F;var q=F[Symbol.toPrimitive];if(q!==void 0){var A=q.call(F,W);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(F)})(P,"string");return typeof B=="symbol"?B:String(B)})(D))in I?Object.defineProperty(I,D,{value:z,enumerable:!0,configurable:!0,writable:!0}):I[D]=z,I}var s=t("./end-of-stream"),e=Symbol("lastResolve"),i=Symbol("lastReject"),u=Symbol("error"),a=Symbol("ended"),h=Symbol("lastPromise"),p=Symbol("handlePromise"),m=Symbol("stream");function d(I,D){return{value:I,done:D}}function b(I){var D=I[e];if(D!==null){var z=I[m].read();z!==null&&(I[h]=null,I[e]=null,I[i]=null,D(d(z,!1)))}}function g(I){o.nextTick(b,I)}var S=Object.getPrototypeOf((function(){})),C=Object.setPrototypeOf((n(r={get stream(){return this[m]},next:function(){var I=this,D=this[u];if(D!==null)return Promise.reject(D);if(this[a])return Promise.resolve(d(void 0,!0));if(this[m].destroyed)return new Promise((function(F,W){o.nextTick((function(){I[u]?W(I[u]):F(d(void 0,!0))}))}));var z,P=this[h];if(P)z=new Promise((function(F,W){return function(q,A){F.then((function(){W[a]?q(d(void 0,!0)):W[p](q,A)}),A)}})(P,this));else{var B=this[m].read();if(B!==null)return Promise.resolve(d(B,!1));z=new Promise(this[p])}return this[h]=z,z}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var I=this;return new Promise((function(D,z){I[m].destroy(null,(function(P){P?z(P):D(d(void 0,!0))}))}))})),r),S);l.exports=function(I){var D,z=Object.create(C,(n(D={},m,{value:I,writable:!0}),n(D,e,{value:null,writable:!0}),n(D,i,{value:null,writable:!0}),n(D,u,{value:null,writable:!0}),n(D,a,{value:I._readableState.endEmitted,writable:!0}),n(D,p,{value:function(P,B){var F=z[m].read();F?(z[h]=null,z[e]=null,z[i]=null,P(d(F,!1))):(z[e]=P,z[i]=B)},writable:!0}),D));return z[h]=null,s(I,(function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var B=z[i];return B!==null&&(z[h]=null,z[e]=null,z[i]=null,B(P)),void(z[u]=P)}var F=z[e];F!==null&&(z[h]=null,z[e]=null,z[i]=null,F(d(void 0,!0))),z[a]=!0})),I.on("readable",g.bind(null,z)),z}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":486,_process:467}],484:[function(t,l,c){function o(h,p){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(h);p&&(d=d.filter((function(b){return Object.getOwnPropertyDescriptor(h,b).enumerable}))),m.push.apply(m,d)}return m}function r(h){for(var p=1;p<arguments.length;p++){var m=arguments[p]!=null?arguments[p]:{};p%2?o(Object(m),!0).forEach((function(d){n(h,d,m[d])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):o(Object(m)).forEach((function(d){Object.defineProperty(h,d,Object.getOwnPropertyDescriptor(m,d))}))}return h}function n(h,p,m){return(p=e(p))in h?Object.defineProperty(h,p,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[p]=m,h}function s(h,p){for(var m=0;m<p.length;m++){var d=p[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,e(d.key),d)}}function e(h){var p=(function(m,d){if(typeof m!="object"||m===null)return m;var b=m[Symbol.toPrimitive];if(b!==void 0){var g=b.call(m,d);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(m)})(h,"string");return typeof p=="symbol"?p:String(p)}var i=t("buffer").Buffer,u=t("util").inspect,a=u&&u.custom||"inspect";l.exports=(function(){function h(){(function(d,b){if(!(d instanceof b))throw new TypeError("Cannot call a class as a function")})(this,h),this.head=null,this.tail=null,this.length=0}var p,m;return p=h,(m=[{key:"push",value:function(d){var b={data:d,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(d){var b={data:d,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(d){if(this.length===0)return"";for(var b=this.head,g=""+b.data;b=b.next;)g+=d+b.data;return g}},{key:"concat",value:function(d){if(this.length===0)return i.alloc(0);for(var b,g,S,C=i.allocUnsafe(d>>>0),I=this.head,D=0;I;)b=I.data,g=C,S=D,i.prototype.copy.call(b,g,S),D+=I.data.length,I=I.next;return C}},{key:"consume",value:function(d,b){var g;return d<this.head.data.length?(g=this.head.data.slice(0,d),this.head.data=this.head.data.slice(d)):g=d===this.head.data.length?this.shift():b?this._getString(d):this._getBuffer(d),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(d){var b=this.head,g=1,S=b.data;for(d-=S.length;b=b.next;){var C=b.data,I=d>C.length?C.length:d;if(I===C.length?S+=C:S+=C.slice(0,d),(d-=I)==0){I===C.length?(++g,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=C.slice(I));break}++g}return this.length-=g,S}},{key:"_getBuffer",value:function(d){var b=i.allocUnsafe(d),g=this.head,S=1;for(g.data.copy(b),d-=g.data.length;g=g.next;){var C=g.data,I=d>C.length?C.length:d;if(C.copy(b,b.length-d,0,I),(d-=I)==0){I===C.length?(++S,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=C.slice(I));break}++S}return this.length-=S,b}},{key:a,value:function(d,b){return u(this,r(r({},b),{},{depth:0,customInspect:!1}))}}])&&s(p.prototype,m),Object.defineProperty(p,"prototype",{writable:!1}),h})()},{buffer:220,util:188}],485:[function(t,l,c){(function(o){(function(){function r(e,i){s(e,i),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,i){e.emit("error",i)}l.exports={destroy:function(e,i){var u=this,a=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return a||h?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(s,this,e)):o.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(p){!i&&p?u._writableState?u._writableState.errorEmitted?o.nextTick(n,u):(u._writableState.errorEmitted=!0,o.nextTick(r,u,p)):o.nextTick(r,u,p):i?(o.nextTick(n,u),i(p)):o.nextTick(n,u)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,i){var u=e._readableState,a=e._writableState;u&&u.autoDestroy||a&&a.autoDestroy?e.destroy(i):e.emit("error",i)}}}).call(this)}).call(this,t("_process"))},{_process:467}],486:[function(t,l,c){var o=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function r(){}l.exports=function n(s,e,i){if(typeof e=="function")return n(s,null,e);e||(e={}),i=(function(I){var D=!1;return function(){if(!D){D=!0;for(var z=arguments.length,P=new Array(z),B=0;B<z;B++)P[B]=arguments[B];I.apply(this,P)}}})(i||r);var u=e.readable||e.readable!==!1&&s.readable,a=e.writable||e.writable!==!1&&s.writable,h=function(){s.writable||m()},p=s._writableState&&s._writableState.finished,m=function(){a=!1,p=!0,u||i.call(s)},d=s._readableState&&s._readableState.endEmitted,b=function(){u=!1,d=!0,a||i.call(s)},g=function(I){i.call(s,I)},S=function(){var I;return u&&!d?(s._readableState&&s._readableState.ended||(I=new o),i.call(s,I)):a&&!p?(s._writableState&&s._writableState.ended||(I=new o),i.call(s,I)):void 0},C=function(){s.req.on("finish",m)};return(function(I){return I.setHeader&&typeof I.abort=="function"})(s)?(s.on("complete",m),s.on("abort",S),s.req?C():s.on("request",C)):a&&!s._writableState&&(s.on("end",h),s.on("close",h)),s.on("end",b),s.on("finish",m),e.error!==!1&&s.on("error",g),s.on("close",S),function(){s.removeListener("complete",m),s.removeListener("abort",S),s.removeListener("request",C),s.req&&s.req.removeListener("finish",m),s.removeListener("end",h),s.removeListener("close",h),s.removeListener("finish",m),s.removeListener("end",b),s.removeListener("error",g),s.removeListener("close",S)}}},{"../../../errors":477}],487:[function(t,l,c){l.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(t,l,c){var o,r=t("../../../errors").codes,n=r.ERR_MISSING_ARGS,s=r.ERR_STREAM_DESTROYED;function e(p){if(p)throw p}function i(p,m,d,b){b=(function(C){var I=!1;return function(){I||(I=!0,C.apply(void 0,arguments))}})(b);var g=!1;p.on("close",(function(){g=!0})),o===void 0&&(o=t("./end-of-stream")),o(p,{readable:m,writable:d},(function(C){if(C)return b(C);g=!0,b()}));var S=!1;return function(C){if(!g&&!S)return S=!0,(function(I){return I.setHeader&&typeof I.abort=="function"})(p)?p.abort():typeof p.destroy=="function"?p.destroy():void b(C||new s("pipe"))}}function u(p){p()}function a(p,m){return p.pipe(m)}function h(p){return p.length?typeof p[p.length-1]!="function"?e:p.pop():e}l.exports=function(){for(var p=arguments.length,m=new Array(p),d=0;d<p;d++)m[d]=arguments[d];var b,g=h(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new n("streams");var S=m.map((function(C,I){var D=I<m.length-1;return i(C,D,I>0,(function(z){b||(b=z),z&&S.forEach(u),D||(S.forEach(u),g(b))}))}));return m.reduce(a)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(t,l,c){var o=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;l.exports={getHighWaterMark:function(r,n,s,e){var i=(function(u,a,h){return u.highWaterMark!=null?u.highWaterMark:a?u[h]:null})(n,e,s);if(i!=null){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new o(e?s:"highWaterMark",i);return Math.floor(i)}return r.objectMode?16:16384}}},{"../../../errors":477}],490:[function(t,l,c){l.exports=t("events").EventEmitter},{events:422}],491:[function(t,l,c){(c=l.exports=t("./lib/_stream_readable.js")).Stream=c,c.Readable=c,c.Writable=t("./lib/_stream_writable.js"),c.Duplex=t("./lib/_stream_duplex.js"),c.Transform=t("./lib/_stream_transform.js"),c.PassThrough=t("./lib/_stream_passthrough.js"),c.finished=t("./lib/internal/streams/end-of-stream.js"),c.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(t,l,c){var o=(function(r){var n=Object.prototype,s=n.hasOwnProperty,e=Object.defineProperty||function(x,_,T){x[_]=T.value},i=typeof Symbol=="function"?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",h=i.toStringTag||"@@toStringTag";function p(x,_,T){return Object.defineProperty(x,_,{value:T,enumerable:!0,configurable:!0,writable:!0}),x[_]}try{p({},"")}catch{p=function(_,T,O){return _[T]=O}}function m(x,_,T,O){var j=_&&_.prototype instanceof g?_:g,V=Object.create(j.prototype),X=new k(O||[]);return e(V,"_invoke",{value:W(x,T,X)}),V}function d(x,_,T){try{return{type:"normal",arg:x.call(_,T)}}catch(O){return{type:"throw",arg:O}}}r.wrap=m;var b={};function g(){}function S(){}function C(){}var I={};p(I,u,(function(){return this}));var D=Object.getPrototypeOf,z=D&&D(D(y([])));z&&z!==n&&s.call(z,u)&&(I=z);var P=C.prototype=g.prototype=Object.create(I);function B(x){["next","throw","return"].forEach((function(_){p(x,_,(function(T){return this._invoke(_,T)}))}))}function F(x,_){var T;e(this,"_invoke",{value:function(O,j){function V(){return new _((function(X,J){(function L(G,N,R,U){var K=d(x[G],x,N);if(K.type!=="throw"){var rt=K.arg,Z=rt.value;return Z&&typeof Z=="object"&&s.call(Z,"__await")?_.resolve(Z.__await).then((function(et){L("next",et,R,U)}),(function(et){L("throw",et,R,U)})):_.resolve(Z).then((function(et){rt.value=et,R(rt)}),(function(et){return L("throw",et,R,U)}))}U(K.arg)})(O,j,X,J)}))}return T=T?T.then(V,V):V()}})}function W(x,_,T){var O="suspendedStart";return function(j,V){if(O==="executing")throw new Error("Generator is already running");if(O==="completed"){if(j==="throw")throw V;return w()}for(T.method=j,T.arg=V;;){var X=T.delegate;if(X){var J=q(X,T);if(J){if(J===b)continue;return J}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(O==="suspendedStart")throw O="completed",T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);O="executing";var L=d(x,_,T);if(L.type==="normal"){if(O=T.done?"completed":"suspendedYield",L.arg===b)continue;return{value:L.arg,done:T.done}}L.type==="throw"&&(O="completed",T.method="throw",T.arg=L.arg)}}}function q(x,_){var T=_.method,O=x.iterator[T];if(O===void 0)return _.delegate=null,T==="throw"&&x.iterator.return&&(_.method="return",_.arg=void 0,q(x,_),_.method==="throw")||T!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+T+"' method")),b;var j=d(O,x.iterator,_.arg);if(j.type==="throw")return _.method="throw",_.arg=j.arg,_.delegate=null,b;var V=j.arg;return V?V.done?(_[x.resultName]=V.value,_.next=x.nextLoc,_.method!=="return"&&(_.method="next",_.arg=void 0),_.delegate=null,b):V:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,b)}function A(x){var _={tryLoc:x[0]};1 in x&&(_.catchLoc=x[1]),2 in x&&(_.finallyLoc=x[2],_.afterLoc=x[3]),this.tryEntries.push(_)}function M(x){var _=x.completion||{};_.type="normal",delete _.arg,x.completion=_}function k(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(A,this),this.reset(!0)}function y(x){if(x){var _=x[u];if(_)return _.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var T=-1,O=function j(){for(;++T<x.length;)if(s.call(x,T))return j.value=x[T],j.done=!1,j;return j.value=void 0,j.done=!0,j};return O.next=O}}return{next:w}}function w(){return{value:void 0,done:!0}}return S.prototype=C,e(P,"constructor",{value:C,configurable:!0}),e(C,"constructor",{value:S,configurable:!0}),S.displayName=p(C,h,"GeneratorFunction"),r.isGeneratorFunction=function(x){var _=typeof x=="function"&&x.constructor;return!!_&&(_===S||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,C):(x.__proto__=C,p(x,h,"GeneratorFunction")),x.prototype=Object.create(P),x},r.awrap=function(x){return{__await:x}},B(F.prototype),p(F.prototype,a,(function(){return this})),r.AsyncIterator=F,r.async=function(x,_,T,O,j){j===void 0&&(j=Promise);var V=new F(m(x,_,T,O),j);return r.isGeneratorFunction(_)?V:V.next().then((function(X){return X.done?X.value:V.next()}))},B(P),p(P,h,"Generator"),p(P,u,(function(){return this})),p(P,"toString",(function(){return"[object Generator]"})),r.keys=function(x){var _=Object(x),T=[];for(var O in _)T.push(O);return T.reverse(),function j(){for(;T.length;){var V=T.pop();if(V in _)return j.value=V,j.done=!1,j}return j.done=!0,j}},r.values=y,k.prototype={constructor:k,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!x)for(var _ in this)_.charAt(0)==="t"&&s.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=void 0)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function T(L,G){return V.type="throw",V.arg=x,_.next=L,G&&(_.method="next",_.arg=void 0),!!G}for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O],V=j.completion;if(j.tryLoc==="root")return T("end");if(j.tryLoc<=this.prev){var X=s.call(j,"catchLoc"),J=s.call(j,"finallyLoc");if(X&&J){if(this.prev<j.catchLoc)return T(j.catchLoc,!0);if(this.prev<j.finallyLoc)return T(j.finallyLoc)}else if(X){if(this.prev<j.catchLoc)return T(j.catchLoc,!0)}else{if(!J)throw new Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return T(j.finallyLoc)}}}},abrupt:function(x,_){for(var T=this.tryEntries.length-1;T>=0;--T){var O=this.tryEntries[T];if(O.tryLoc<=this.prev&&s.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var j=O;break}}j&&(x==="break"||x==="continue")&&j.tryLoc<=_&&_<=j.finallyLoc&&(j=null);var V=j?j.completion:{};return V.type=x,V.arg=_,j?(this.method="next",this.next=j.finallyLoc,b):this.complete(V)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),b},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var T=this.tryEntries[_];if(T.finallyLoc===x)return this.complete(T.completion,T.afterLoc),M(T),b}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var T=this.tryEntries[_];if(T.tryLoc===x){var O=T.completion;if(O.type==="throw"){var j=O.arg;M(T)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(x,_,T){return this.delegate={iterator:y(x),resultName:_,nextLoc:T},this.method==="next"&&(this.arg=void 0),b}},r})(typeof l=="object"?l.exports:{});try{regeneratorRuntime=o}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},{}],493:[function(t,l,c){var o=t("buffer").Buffer,r=t("inherits"),n=t("hash-base"),s=new Array(16),e=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],i=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],a=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function m(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(D,z){return D<<z|D>>>32-z}function b(D,z,P,B,F,W,q,A){return d(D+(z^P^B)+W+q|0,A)+F|0}function g(D,z,P,B,F,W,q,A){return d(D+(z&P|~z&B)+W+q|0,A)+F|0}function S(D,z,P,B,F,W,q,A){return d(D+((z|~P)^B)+W+q|0,A)+F|0}function C(D,z,P,B,F,W,q,A){return d(D+(z&B|P&~B)+W+q|0,A)+F|0}function I(D,z,P,B,F,W,q,A){return d(D+(z^(P|~B))+W+q|0,A)+F|0}r(m,n),m.prototype._update=function(){for(var D=s,z=0;z<16;++z)D[z]=this._block.readInt32LE(4*z);for(var P=0|this._a,B=0|this._b,F=0|this._c,W=0|this._d,q=0|this._e,A=0|this._a,M=0|this._b,k=0|this._c,y=0|this._d,w=0|this._e,x=0;x<80;x+=1){var _,T;x<16?(_=b(P,B,F,W,q,D[e[x]],h[0],u[x]),T=I(A,M,k,y,w,D[i[x]],p[0],a[x])):x<32?(_=g(P,B,F,W,q,D[e[x]],h[1],u[x]),T=C(A,M,k,y,w,D[i[x]],p[1],a[x])):x<48?(_=S(P,B,F,W,q,D[e[x]],h[2],u[x]),T=S(A,M,k,y,w,D[i[x]],p[2],a[x])):x<64?(_=C(P,B,F,W,q,D[e[x]],h[3],u[x]),T=g(A,M,k,y,w,D[i[x]],p[3],a[x])):(_=I(P,B,F,W,q,D[e[x]],h[4],u[x]),T=b(A,M,k,y,w,D[i[x]],p[4],a[x])),P=q,q=W,W=d(F,10),F=B,B=_,A=w,w=y,y=d(k,10),k=M,M=T}var O=this._b+F+y|0;this._b=this._c+W+w|0,this._c=this._d+q+A|0,this._d=this._e+P+M|0,this._e=this._a+B+k|0,this._a=O},m.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var D=o.alloc?o.alloc(20):new o(20);return D.writeInt32LE(this._a,0),D.writeInt32LE(this._b,4),D.writeInt32LE(this._c,8),D.writeInt32LE(this._d,12),D.writeInt32LE(this._e,16),D},l.exports=m},{buffer:220,"hash-base":425,inherits:440}],494:[function(t,l,c){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var o=t("buffer"),r=o.Buffer;function n(e,i){for(var u in e)i[u]=e[u]}function s(e,i,u){return r(e,i,u)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?l.exports=o:(n(o,c),c.Buffer=s),s.prototype=Object.create(r.prototype),n(r,s),s.from=function(e,i,u){if(typeof e=="number")throw new TypeError("Argument must not be a number");return r(e,i,u)},s.alloc=function(e,i,u){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=r(e);return i!==void 0?typeof u=="string"?a.fill(i,u):a.fill(i):a.fill(0),a},s.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}},{buffer:220}],495:[function(t,l,c){(function(o){(function(){var r,n=t("buffer"),s=n.Buffer,e={};for(r in n)n.hasOwnProperty(r)&&r!=="SlowBuffer"&&r!=="Buffer"&&(e[r]=n[r]);var i=e.Buffer={};for(r in s)s.hasOwnProperty(r)&&r!=="allocUnsafe"&&r!=="allocUnsafeSlow"&&(i[r]=s[r]);if(e.Buffer.prototype=s.prototype,i.from&&i.from!==Uint8Array.from||(i.from=function(u,a,h){if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof u);if(u&&u.length===void 0)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);return s(u,a,h)}),i.alloc||(i.alloc=function(u,a,h){if(typeof u!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof u);if(u<0||u>=2*(1<<30))throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=s(u);return a&&a.length!==0?typeof h=="string"?p.fill(a,h):p.fill(a):p.fill(0),p}),!e.kStringMaxLength)try{e.kStringMaxLength=o.binding("buffer").kStringMaxLength}catch{}e.constants||(e.constants={MAX_LENGTH:e.kMaxLength},e.kStringMaxLength&&(e.constants.MAX_STRING_LENGTH=e.kStringMaxLength)),l.exports=e}).call(this)}).call(this,t("_process"))},{_process:467,buffer:220}],496:[function(t,l,c){Object.defineProperty(c,"__esModule",{value:!0});const o=t("xmlchars/xml/1.0/ed5"),r=t("xmlchars/xml/1.1/ed2"),n=t("xmlchars/xmlns/1.0/ed3");var s=o.isS,e=o.isChar,i=o.isNameStartChar,u=o.isNameChar,a=o.S_LIST,h=o.NAME_RE,p=r.isChar,m=n.isNCNameStartChar,d=n.isNCNameChar,b=n.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",S="http://www.w3.org/2000/xmlns/",C={__proto__:null,xml:g,xmlns:S},I={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},D=y=>y===34||y===39,z=[34,39],P=[...z,91,62],B=[...z,60,93],F=[61,63,...a],W=[...a,62,38,60];function q(y,w,x){switch(w){case"xml":x!==g&&y.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":x!==S&&y.fail(`xmlns prefix must be bound to ${S}.`)}switch(x){case S:y.fail(w===""?`the default namespace may not be set to ${x}.`:`may not assign a prefix (even "xmlns") to the URI ${S}.`);break;case g:switch(w){case"xml":break;case"":y.fail(`the default namespace may not be set to ${x}.`);break;default:y.fail("may not assign the xml namespace to another prefix.")}}}const A=y=>b.test(y),M=y=>h.test(y);c.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const k={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};c.SaxesParser=class{constructor(y){this.opt=y??{},this.fragmentOpt=!!this.opt.fragment;const w=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,w){this.nameStartCheck=m,this.nameCheck=d,this.isName=A,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},C);const x=this.opt.additionalNamespaces;x!=null&&((function(_,T){for(const O of Object.keys(T))q(_,O,T[O])})(this,x),Object.assign(this.ns,x))}else this.nameStartCheck=i,this.nameCheck=u,this.isName=M,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var y;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:w}=this;this.state=w?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=w,this.xmlDeclPossible=!w,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:x}=this.opt;if(x===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");x="1.0"}this.setXMLVersion(x),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(I),(y=this.readyHandler)===null||y===void 0||y.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(y,w){this[k[y]]=w}off(y){this[k[y]]=void 0}makeError(y){var w;let x=(w=this.fileName)!==null&&w!==void 0?w:"";return this.trackPosition&&(x.length>0&&(x+=":"),x+=`${this.line}:${this.column}`),x.length>0&&(x+=": "),new Error(x+y)}fail(y){const w=this.makeError(y),x=this.errorHandler;if(x===void 0)throw w;return x(w),this}write(y){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let w=!1;y===null?(w=!0,y=""):typeof y=="object"&&(y=y.toString()),this.carriedFromPrevious!==void 0&&(y=`${this.carriedFromPrevious}${y}`,this.carriedFromPrevious=void 0);let x=y.length;const _=y.charCodeAt(x-1);!w&&(_===13||_>=55296&&_<=56319)&&(this.carriedFromPrevious=y[x-1],x--,y=y.slice(0,x));const{stateTable:T}=this;for(this.chunk=y,this.i=0;this.i<x;)T[this.state].call(this);return this.chunkPosition+=x,w?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:y,i:w}=this;if(this.prevI=w,this.i=w+1,w>=y.length)return-1;const x=y.charCodeAt(w);if(this.column++,x<55296){if(x>=32||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return y.charCodeAt(w+1)===10&&(this.i=w+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;const _=65536+1024*(x-55296)+(y.charCodeAt(w+1)-56320);return this.i=w+2,_>1114111&&this.fail("disallowed character."),_}getCode11(){const{chunk:y,i:w}=this;if(this.prevI=w,this.i=w+1,w>=y.length)return-1;const x=y.charCodeAt(w);if(this.column++,x<55296){if(x>31&&x<127||x>159&&x!==8232||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const T=y.charCodeAt(w+1);T!==10&&T!==133||(this.i=w+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;const _=65536+1024*(x-55296)+(y.charCodeAt(w+1)-56320);return this.i=w+2,_>1114111&&this.fail("disallowed character."),_}getCodeNorm(){const y=this.getCode();return y===-2?10:y}unget(){this.i=this.prevI,this.column--}captureTo(y){let{i:w}=this;const{chunk:x}=this;for(;;){const _=this.getCode(),T=_===-2,O=T?10:_;if(O===-1||y.includes(O))return this.text+=x.slice(w,this.prevI),O;T&&(this.text+=x.slice(w,this.prevI)+`
|
|
278
278
|
`,w=this.i)}}captureToChar(y){let{i:w}=this;const{chunk:x}=this;for(;;){let _=this.getCode();switch(_){case-2:this.text+=x.slice(w,this.prevI)+`
|
|
@@ -309,7 +309,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
309
309
|
* @author Louis-Dominique Dubeau
|
|
310
310
|
* @license MIT
|
|
311
311
|
* @copyright Louis-Dominique Dubeau
|
|
312
|
-
*/function o(r){return r>=65&&r<=90||r===95||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533||r>=65536&&r<=983039}Object.defineProperty(c,"__esModule",{value:!0}),c.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",c.NC_NAME_CHAR="-"+c.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",c.NC_NAME_START_CHAR_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]$","u"),c.NC_NAME_CHAR_RE=new RegExp("^["+c.NC_NAME_CHAR+"]$","u"),c.NC_NAME_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]["+c.NC_NAME_CHAR+"]*$","u"),c.isNCNameStartChar=o,c.isNCNameChar=function(r){return o(r)||r===45||r===46||r>=48&&r<=57||r===183||r>=768&&r<=879||r>=8255&&r<=8256}},{}]},{},[15])(15)}))})(
|
|
312
|
+
*/function o(r){return r>=65&&r<=90||r===95||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533||r>=65536&&r<=983039}Object.defineProperty(c,"__esModule",{value:!0}),c.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",c.NC_NAME_CHAR="-"+c.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",c.NC_NAME_START_CHAR_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]$","u"),c.NC_NAME_CHAR_RE=new RegExp("^["+c.NC_NAME_CHAR+"]$","u"),c.NC_NAME_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]["+c.NC_NAME_CHAR+"]*$","u"),c.isNCNameStartChar=o,c.isNCNameChar=function(r){return o(r)||r===45||r===46||r>=48&&r<=57||r===183||r>=768&&r<=879||r>=8255&&r<=8256}},{}]},{},[15])(15)}))})(ou)),ou.exports}var yd=bd();const vd=gd(yd);class wd{constructor(E,t){Y(this,Ne);Y(this,Go);Y(this,ln);Y(this,us);it(this,"export",()=>{var E={fileName:(f(this,Ne).getAttribute("caption")||"export").replace(/[`~!@#$%^&*|\\\'\";:\/?]/gi,""),afterFunc:()=>{}},t=H.nvl(E.fileName,"temp");const l=async(p,m)=>{console.log("export...."),p.xlsx.writeBuffer().then(d=>{var b=new Blob([d],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});const g=window.URL.createObjectURL(b),S=document.createElement("a");document.body.appendChild(S),S.href=g,S.download=m+".xlsx",S.click(),setTimeout(()=>{window.URL.revokeObjectURL(g),document.body.removeChild(S),console.log("completed")},0)})},c=()=>({type:"pattern",pattern:"solid",fgColor:{argb:"FFCCCCCC"}}),o=()=>({top:{style:"thin",color:{argb:"FF999999"}},left:{style:"thin",color:{argb:"FF999999"}},bottom:{style:"thin",color:{argb:"FF999999"}},right:{style:"thin",color:{argb:"FF999999"}}}),r=p=>{var m=$(".ng-container-body thead tr:not(.col-indicator-rowgroup)",f(this,Ne).body).length+1+f(this,Ne).template.length,d=f(this,Ne).data.get(p);$(f(this,Ne).template).each((b,g)=>{var S=parseInt(p*f(this,Ne).template.length)+m+b;if(b==0){var C=s.getCell(S,1);C.alignment={horizontal:"center",vertical:"middle",wrapText:!0},C.dataValidation={type:"list",allowBlank:!0,formulae:['"NONE,INSERT,UPDATE,DELETE"']},C.fill=c(),C.border=o(),f(this,Ne).template.length>1&&s.mergeCells(S,1,S+f(this,Ne).template.length-1,1)}$("th,td",g).not(".dummy").not(".first").not(".last").each((I,D)=>{var z=parseInt(D.dataset.index),P=s.getCell(S,z),B="";if(H.isNull(D.dataset.expr))H.isNull(D.dataset.bind)||(B=d[D.dataset.bind]||"");else try{B=f(this,Ne).exprFunction(D.dataset.expr).call(this,d,p)}catch(A){console.error(A,p,D.dataset.bind,D.dataset.expr)}P.value=B;var F=D.querySelector("ng-combo");if(F){var W=F.getAttribute("data-source");if(W){const A=F.getAttribute("value");W=f(this,Ne).exprFunction(W).call(this,d,p);const M=[...new Set(W.map(k=>k[A].replaceAll(","," ")))];M.length>0&&(P.dataValidation={type:"list",allowBlank:!0,formulae:['"'+M.join(",")+'"']})}}var q=D.querySelector("ng-radio");if(q){var W=q.getAttribute("data-source");if(W){q.getAttribute("value"),W=f(this,Ne).exprFunction(W).call(this,d,p);const M=[...new Set(W.map(k=>k.value))];M.length>0&&(P.dataValidation={type:"list",allowBlank:!0,formulae:['"'+M.join(",")+'"']})}}P.alignment={horizontal:D.getAttribute("text-align")||"left",vertical:"middle",wrapText:!0},(D.colSpan>1||D.rowSpan>1)&&s.mergeCells(S,z,S+D.rowSpan-1,z+D.colSpan-1)})})};$(f(this,ln)).html("generate..."),f(this,us).setAttribute("max",f(this,Ne).data.count()),f(this,us).setAttribute("value",0);const n=new vd.Workbook,s=n.addWorksheet("Sheet1");var e=0;s.getColumn(++e).width=10,$(".col-indicator-rowgroup .col-indicator:not(.dummy)",f(this,Ne).body).not(".first").not(".last").each((p,m)=>{if(p==0)return!0;m.dataset.index=++e,$(`[data-col="${m.dataset.col}"]`,f(this,Ne).template).each((d,b)=>{b.dataset.index=e}),f(this,Ne).body.querySelectorAll(`thead [data-col="${m.dataset.col}"]`).forEach(d=>{d.dataset.index=e}),s.getColumn(e).width=$(m).width()/7}),$(f(this,Ne).template).each((p,m)=>{var d=p+1;if(p==0){var b=s.getCell(d,1);b.fill=c(),b.border=o(),f(this,Ne).template.length>1&&s.mergeCells(d,1,d+f(this,Ne).template.length-1,1)}$("th:not(.dummy),td:not(.dummy)",m).not(".first").not(".last").each((g,S)=>{var C=parseInt(S.dataset.index),I=s.getCell(d,C);["rowState"].includes(S.dataset.bind)||(I.value=S.dataset.bind),(S.colSpan>1||S.rowSpan>1)&&s.mergeCells(d,C,d+S.rowSpan-1,C+S.colSpan-1),I.font={size:6},I.fill=c(),I.border=o()})}),$("thead tr:not(.col-indicator-rowgroup)",f(this,Ne).body).each((p,m)=>{var d=m.sectionRowIndex+f(this,Ne).template.length;if(p==0){var b=s.getCell(d,1);b.value="CRUD",b.alignment={horizontal:"center",vertical:"middle",wrapText:!0},b.fill=c(),b.border=o(),f(this,Ne).template.length>1&&s.mergeCells(d,1,d+f(this,Ne).template.length-1,1)}$("th:not(.dummy),td:not(.dummy)",m).not(".first").not(".last").each((g,S)=>{var C=parseInt(S.dataset.index),I=s.getCell(d,C);I.value=$(S).text(),(S.colSpan>1||S.rowSpan>1)&&s.mergeCells(d,C,d+S.rowSpan-1,C+S.colSpan-1),I.alignment={horizontal:"center",vertical:"middle",wrapText:!0},I.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFEEEEEE"}},I.border={top:{style:"thin",color:{argb:"FFCCCCCC"}},left:{style:"thin",color:{argb:"FFCCCCCC"}},bottom:{style:"thin",color:{argb:"FFCCCCCC"}},right:{style:"thin",color:{argb:"FFCCCCCC"}}}})});for(var i=f(this,Ne).data.getValidData(),u=0,a=0;a<i.length;a++)setTimeout(()=>{r(u++),f(this,us).setAttribute("value",u+1),$(f(this,ln)).html(u+1>=i.length?"downloading...":"processing... "+u.toLocaleString()+" / "+i.length.toLocaleString())});var h=setInterval(()=>{parseInt(f(this,us).getAttribute("value"))>=parseInt(f(this,us).getAttribute("max"))&&(clearInterval(h),setTimeout(()=>{l(n,t).then(p=>{}),E.afterFunc&&E.afterFunc.call(f(this,Ne))}),setTimeout(()=>{f(this,Go).close()}))},500)});it(this,"exportPdf",()=>{console.log("exportPdf")});tt(this,Ne,E),tt(this,Go,t),tt(this,ln,t.querySelector("#message-box")),tt(this,us,t.querySelector("#progress-bar"))}}Ne=new WeakMap,Go=new WeakMap,ln=new WeakMap,us=new WeakMap;class Eu extends HTMLElement{constructor(){super();Y(this,li);Y(this,hn);Y(this,Ko);Y(this,fu);Y(this,pu,{});Y(this,wh,()=>{});it(this,"exportExcel",()=>{f(this,hn).data.count()>500&&(f(this,li).showModal(),$(".title",f(this,li)).html("Export Excel")),f(this,Ko).export()});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,hn,this.getRootNode().host),this.shadowRoot.innerHTML=`
|
|
313
313
|
<style>
|
|
314
314
|
@import "https://cdn.jsdelivr.net/npm/ninegrid/ninegrid.css";
|
|
315
315
|
|
|
@@ -349,7 +349,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
349
349
|
</div>
|
|
350
350
|
<progress id="progress-bar" value="0" max="100">50%</progress>
|
|
351
351
|
</nx-dialog>
|
|
352
|
-
`,tt(this,li,this.shadowRoot.querySelector("dialog")),tt(this,Ko,new wd(f(this,hn),f(this,li))),f(this,wh).call(this)}}li=new WeakMap,hn=new WeakMap,Ko=new WeakMap,
|
|
352
|
+
`,tt(this,li,this.shadowRoot.querySelector("dialog")),tt(this,Ko,new wd(f(this,hn),f(this,li))),f(this,wh).call(this)}}li=new WeakMap,hn=new WeakMap,Ko=new WeakMap,fu=new WeakMap,pu=new WeakMap,wh=new WeakMap,customElements.get("ng-export")||customElements.define("ng-export",Eu);class xd{constructor(E){Y(this,Zo);Y(this,hr);it(this,"add",E=>{f(this,hr).push(...E),f(this,Jo).call(this)});Y(this,Jo,()=>{tt(this,hr,[...new Set(f(this,hr))]),["","__ng"].forEach(E=>{const t=f(this,hr).indexOf(E);t>-1&&f(this,hr).splice(t,1)}),f(this,hr).sort((E,t)=>E.length<t.length?1:-1)});Y(this,xh,()=>{tt(this,hr,[]);const E=f(this,Zo).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");if(E){for(const t of E.tables)$("[data-bind]",t).each((l,c)=>{f(this,hr).push(c.dataset.bind)}),["data-expr","background-color","color","tooltip","visible","readonly","enable-button","enable-check","class-expr","icon-color","icon-src"].forEach(l=>{$(`[${l}]`,t).each((c,o)=>{var r=o.getAttribute(l);if(r.indexOf("data.")<0){const n=r.search(/[(]/g);if(n>0)try{r=String(window[r.substring(0,n).trim()])}catch{r=""}}r.split("data.").forEach(n=>{if(n.trim()!=""){const s=n.search(/[^_A-Za-z0-9]/g);s>=0?f(this,hr).push(n.substring(0,s)):r.startsWith("data.")&&f(this,hr).push(n.replace("data.",""))}})})});f(this,Jo).call(this)}});tt(this,Zo,E),f(this,xh).call(this)}get(){return f(this,hr)}indexOf(E){return f(this,hr).indexOf(E)}includes(E){return f(this,hr).includes(E)}}Zo=new WeakMap,hr=new WeakMap,Jo=new WeakMap,xh=new WeakMap;class _d extends HTMLElement{constructor(){super();Y(this,_h);this.attachShadow({mode:"open"})}connectedCallback(){tt(this,_h,this.getRootNode().host),this.shadowRoot.innerHTML=`
|
|
353
353
|
<style>
|
|
354
354
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngFoot.css";
|
|
355
355
|
${H.getCustomPath(this,"ngFoot.css")}
|
|
@@ -638,7 +638,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
638
638
|
</svg>
|
|
639
639
|
</div>
|
|
640
640
|
</div>
|
|
641
|
-
`,super.connectedCallback(),this.cell.removeAttribute("tabindex"),this.cell.dataset.bind="rowState",this.cell.dataset.expr=H.nvl(this.cell.dataset.expr,"data.__ng._[ninegrid.ROW.ORDER]"),this.cell.setAttribute("text-align","center"),tt(this,ma,this.shadowRoot.querySelector("span")),f(this,Uh).call(this)}}ma=new WeakMap,Uh=new WeakMap;class Kd extends HTMLElement{constructor(){super();Y(this,fr);Y(this,rs);Y(this,ga);Y(this,br);Y(this,qs);Y(this,gi);Y(this,
|
|
641
|
+
`,super.connectedCallback(),this.cell.removeAttribute("tabindex"),this.cell.dataset.bind="rowState",this.cell.dataset.expr=H.nvl(this.cell.dataset.expr,"data.__ng._[ninegrid.ROW.ORDER]"),this.cell.setAttribute("text-align","center"),tt(this,ma,this.shadowRoot.querySelector("span")),f(this,Uh).call(this)}}ma=new WeakMap,Uh=new WeakMap;class Kd extends HTMLElement{constructor(){super();Y(this,fr);Y(this,rs);Y(this,ga);Y(this,br);Y(this,qs);Y(this,gi);Y(this,mu);Y(this,ss);Y(this,Vh);Y(this,Wh,()=>{if(f(this,fr)){var t=f(this,fr).querySelector("div.resizer-row-panel");t?tt(this,br,$(t)):(tt(this,br,$('<div class="resizer-row-panel"><div class="grip"></div><div class="tooltip"><div></div><span></span><div></div></div></div>').hide()),$(f(this,fr).body).append(f(this,br))),tt(this,qs,$(".grip",f(this,br))),tt(this,gi,$(".tooltip",f(this,br))),$(this).on("mousedown",l=>{H.j.querySelectorAll(f(this,rs).closest("tbody")).hasClass("fixed")||tt(this,ga,setTimeout(()=>{f(this,Xh).call(this,l)},500))}).on("dblclick",l=>{H.j.querySelectorAll(f(this,rs).closest("tbody")).hasClass("fixed")||f(this,Yh).call(this,l)}),$(document).on("mouseup",l=>{clearTimeout(f(this,ga))})}});Y(this,Xh,t=>{if(!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftkey)){var l=parseInt(t.target.getAttribute("rowIndex"));l<0||(f(this,rs).busy=!0,tt(this,Vh,t.target),tt(this,ss,$(".ng-container-body table tbody.bindable tr",f(this,fr).body).eq(l)),f(this,br).show(),f(this,qs).width(f(this,fr).body.querySelector(".ng-container").offsetWidth),f(this,va).call(this,t.pageY),$(f(this,br)).on("mousemove",f(this,ba)),$(f(this,br)).on("mouseup",f(this,ya)))}});Y(this,ba,t=>{t.altKey||t.ctrlKey||t.shiftKey||f(this,va).call(this,t.pageY)});Y(this,ya,t=>{var l=f(this,qs).offset().top-f(this,ss).offset().top;l<=1&&(l=0),l=f(this,fr).tableUtils.height(f(this,ss)[0].sectionRowIndex,l);var c=parseInt(f(this,ss)[0].dataset.row*f(this,fr).template.length+f(this,ss)[0].sectionRowIndex%f(this,fr).template.length);f(this,fr).matrix.setHeight(c,l),f(this,rs).querySelector("ng-row-indicator").refresh(),$(f(this,br)).off("mousemove",f(this,ba)),$(f(this,br)).off("mouseup",f(this,ya)),f(this,br).hide(),f(this,fr).view.redraw(),f(this,rs).busy=!1});Y(this,va,t=>{var l=$(".ng-container-body table tbody.bindable",f(this,fr).body);if(!(t<l.offset().top)){f(this,qs).offset({top:t});var c=parseInt(f(this,qs).offset().top),o=parseInt(c-f(this,ss).offset().top);o<=1&&(o=0),f(this,gi).height(o),f(this,gi).offset({top:f(this,ss).offset().top-1}),f(this,gi).find("span").text(o)}});Y(this,Yh,t=>{})}connectedCallback(){tt(this,rs,this.cell),tt(this,fr,f(this,rs).getRootNode().host),this.setAttribute("class","row-resizer"),f(this,Wh).call(this)}}fr=new WeakMap,rs=new WeakMap,ga=new WeakMap,br=new WeakMap,qs=new WeakMap,gi=new WeakMap,mu=new WeakMap,ss=new WeakMap,Vh=new WeakMap,Wh=new WeakMap,Xh=new WeakMap,ba=new WeakMap,ya=new WeakMap,va=new WeakMap,Yh=new WeakMap,customElements.get("ng-row-indicator")||customElements.define("ng-row-indicator",Gd),customElements.get("ng-row-resizer")||customElements.define("ng-row-resizer",Kd);class Zd extends _r{constructor(){super();it(this,"dataRefresh",t=>{!this.owner||!this.cell||!this.data||(this.cell.closest("tbody.fixed")?H.j.querySelectorAll(this).addClass("pin"):H.j.querySelectorAll(this).removeClass("pin"),t||this.reset())});Y(this,Gh,()=>{H.isMobile()||this.shadowRoot.querySelector("svg").addEventListener("click",t=>{const l=this.cell.closest("tr").dataset.row;this.cell.closest("tbody.fixed")?this.owner.pin.remove(l):this.owner.pin.add(this.data.__ng._[H.ROW.INDEX])})})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
642
642
|
<style>
|
|
643
643
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRowPin.css";
|
|
644
644
|
${H.getCustomPath(this,"ngRowPin.css")}
|
|
@@ -652,7 +652,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
652
652
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRowState.css";
|
|
653
653
|
${H.getCustomPath(this,"ngRowState.css")}
|
|
654
654
|
</style>
|
|
655
|
-
`,super.connectedCallback(),this.cell.dataset.bind="rowState"}}customElements.get("ng-row-state")||customElements.define("ng-row-state",Qd);class tf extends HTMLElement{constructor(){super();Y(this,tc);Y(this,Dt);Y(this,is);Y(this,me);Y(this,yr);Y(this,vr);Y(this,xn);Y(this,wa,0);Y(this,Kh,0);it(this,"refresh",()=>{if(!f(this,Dt))return;var t=$(".ng-container-body",f(this,Dt).body),l=$(".ng-scroll-thumb",this.shadowRoot),c=$("table > thead",t),o=f(this,Dt).dataManager.viewRecords.rawIndex,r=$(f(this,me).track).height(),n=$(f(this,me).thumb).height();Number(f(this,Dt).getAttribute("display-row-count")||0)>=f(this,Dt).dataManager.rawRecords.length||parseInt($(".ng-container .ng-table tr.nodata",f(this,Dt).body).height())>0&&(f(this,Dt).dataManager.rawRecords.length==0||f(this,Dt).dataManager.viewRecords.rawIndex==0)?$(this).hide():$(this).show();var e=Math.min(r*(t.height()-c.height())/(f(this,Dt).template.height()*f(this,Dt).template.length*f(this,Dt).data.count()),r);l[0].dataset.height=e,e<16&&(e=16);var i=r-f(this,Sn).call(this);if(i!=0){e>=r?l.css({top:0,height:e-20}):l.css({height:e});var u;if(f(this,Dt).isFirstPage)u=0;else if(f(this,Dt).isLastPage)u=r-n-2;else{var a=parseInt($(".ng-container-body tbody.bindable tr",f(this,Dt).body).not(".nodata").length/f(this,Dt).template.length);u=parseInt(o*i/(f(this,Dt).data.count()-a+1)),u>r-n-3&&(u=r-n-3)}f(this,me).thumb.style.top=u+"px",f(this,me).top.disabled=!!f(this,Dt).isFirstPage,f(this,me).bottom.disabled=!!f(this,Dt).isLastPage,$(this).is(":visible")&&$("ng-hscrollbar",f(this,Dt).body).is(":visible")?$(".ng-scroll-edge",f(this,Dt).body).show():$(".ng-scroll-edge",f(this,Dt).body).hide()}});it(this,"refreshV2",()=>{if(f(this,Dt)){var t=$(".ng-scroll-thumb",this.shadowRoot),l=f(this,Dt).dataManager.viewRecords.rawIndex,c=this.trackHeight,o=this.thumbHeight,r=Math.min(c*(this.bodyHeight-this.theadHeight)/(this.templateHeight*f(this,Dt).template.length*f(this,Dt).data.count()),c);t[0].dataset.height=r,r<16&&(r=16);var n=c-f(this,Sn).call(this),s;if(f(this,Dt).isFirstPage)s=0;else if(f(this,Dt).isLastPage)s=c-o-2;else{var e=parseInt($(".ng-container-body tbody.bindable tr",f(this,Dt).body).not(".nodata").length/f(this,Dt).template.length);s=parseInt(l*n/(f(this,Dt).data.count()-e+1)),s>c-o-3&&(s=c-o-3)}f(this,me).thumb.style.top=s+"px",f(this,me).top.disabled=!!f(this,Dt).isFirstPage,f(this,me).bottom.disabled=!!f(this,Dt).isLastPage}});it(this,"delayScroll",(t,l,c,o)=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,Dt).scrollBy(t),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,Dt).scrollBy(t)?o&&o.call():clearInterval(f(this,vr))},c))},l))});it(this,"stopScroll",()=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))});Y(this,Zh,()=>{var t=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,Dt).scrollBy(l),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,Dt).scrollBy(l)},10))},500))};$(f(this,me).top).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(-1)}),$(f(this,me).bottom).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(1)}),$(f(this,me).top).on("touchstart",l=>{t(-1)}),$(f(this,me).bottom).on("touchstart",l=>{t(1)}),f(this,me).top.ontouchend=f(this,me).bottom.ontouchend=f(this,me).track.ontouchend=f(this,me).top.onmouseup=f(this,me).top.onmouseleave=f(this,me).bottom.onmouseup=f(this,me).bottom.onmouseleave=f(this,me).track.onmouseup=f(this,me).track.onmouseleave=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))},$(f(this,me).track).on("mousedown",f(this,xa)),$(f(this,me).track).on("touchstart",f(this,Jh)),$(f(this,me).thumb).on("mousedown",f(this,Sa)),$(f(this,me).thumb).on("touchstart",f(this,Qh)),document.addEventListener("mouseup",l=>{f(this,is)&&tt(this,is,!1),document.removeEventListener("mousemove",f(this,_n)),typeof this.onDragStop=="function"&&this.onDragStop()}),document.addEventListener("touchend",l=>{tt(this,is,!1),document.removeEventListener("touchmove",f(this,_a)),typeof this.onDragStop=="function"&&this.onDragStop()})});Y(this,Jh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,xa).call(this,t)});Y(this,xa,t=>{if(!f(this,is)&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftKey)){t.preventDefault();var l=f(this,me).thumb.getBoundingClientRect();clearInterval(f(this,yr)),clearInterval(f(this,vr)),t.clientY>l.y?f(this,Dt).pageDown():f(this,Dt).pageUp(),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{var c=f(this,me).thumb.getBoundingClientRect();if(t.clientY>c.y&&t.clientY<c.y+c.height)clearInterval(f(this,vr));else{var o=t.clientY>c.y?f(this,Dt).pageDown():f(this,Dt).pageUp();o||clearInterval(f(this,vr))}},10))},500))}});Y(this,Qh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,Sa).call(this,t),document.addEventListener("touchmove",f(this,_a))});Y(this,_a,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,_n).call(this,t)});Y(this,Sa,t=>{tt(this,wa,t.clientY),
|
|
655
|
+
`,super.connectedCallback(),this.cell.dataset.bind="rowState"}}customElements.get("ng-row-state")||customElements.define("ng-row-state",Qd);class tf extends HTMLElement{constructor(){super();Y(this,tc);Y(this,Dt);Y(this,is);Y(this,me);Y(this,yr);Y(this,vr);Y(this,xn);Y(this,wa,0);Y(this,Kh,0);it(this,"refresh",()=>{if(!f(this,Dt))return;var t=$(".ng-container-body",f(this,Dt).body),l=$(".ng-scroll-thumb",this.shadowRoot),c=$("table > thead",t),o=f(this,Dt).dataManager.viewRecords.rawIndex,r=$(f(this,me).track).height(),n=$(f(this,me).thumb).height();Number(f(this,Dt).getAttribute("display-row-count")||0)>=f(this,Dt).dataManager.rawRecords.length||parseInt($(".ng-container .ng-table tr.nodata",f(this,Dt).body).height())>0&&(f(this,Dt).dataManager.rawRecords.length==0||f(this,Dt).dataManager.viewRecords.rawIndex==0)?$(this).hide():$(this).show();var e=Math.min(r*(t.height()-c.height())/(f(this,Dt).template.height()*f(this,Dt).template.length*f(this,Dt).data.count()),r);l[0].dataset.height=e,e<16&&(e=16);var i=r-f(this,Sn).call(this);if(i!=0){e>=r?l.css({top:0,height:e-20}):l.css({height:e});var u;if(f(this,Dt).isFirstPage)u=0;else if(f(this,Dt).isLastPage)u=r-n-2;else{var a=parseInt($(".ng-container-body tbody.bindable tr",f(this,Dt).body).not(".nodata").length/f(this,Dt).template.length);u=parseInt(o*i/(f(this,Dt).data.count()-a+1)),u>r-n-3&&(u=r-n-3)}f(this,me).thumb.style.top=u+"px",nu.log(":::",u),f(this,me).top.disabled=!!f(this,Dt).isFirstPage,f(this,me).bottom.disabled=!!f(this,Dt).isLastPage,$(this).is(":visible")&&$("ng-hscrollbar",f(this,Dt).body).is(":visible")?$(".ng-scroll-edge",f(this,Dt).body).show():$(".ng-scroll-edge",f(this,Dt).body).hide()}});it(this,"refreshV2",()=>{if(f(this,Dt)){var t=$(".ng-scroll-thumb",this.shadowRoot),l=f(this,Dt).dataManager.viewRecords.rawIndex,c=this.trackHeight,o=this.thumbHeight,r=Math.min(c*(this.bodyHeight-this.theadHeight)/(this.templateHeight*f(this,Dt).template.length*f(this,Dt).data.count()),c);t[0].dataset.height=r,r<16&&(r=16);var n=c-f(this,Sn).call(this),s;if(f(this,Dt).isFirstPage)s=0;else if(f(this,Dt).isLastPage)s=c-o-2;else{var e=parseInt($(".ng-container-body tbody.bindable tr",f(this,Dt).body).not(".nodata").length/f(this,Dt).template.length);s=parseInt(l*n/(f(this,Dt).data.count()-e+1)),s>c-o-3&&(s=c-o-3)}f(this,me).thumb.style.top=s+"px",f(this,me).top.disabled=!!f(this,Dt).isFirstPage,f(this,me).bottom.disabled=!!f(this,Dt).isLastPage}});it(this,"delayScroll",(t,l,c,o)=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,Dt).scrollBy(t),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,Dt).scrollBy(t)?o&&o.call():clearInterval(f(this,vr))},c))},l))});it(this,"stopScroll",()=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))});Y(this,Zh,()=>{var t=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,Dt).scrollBy(l),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,Dt).scrollBy(l)},10))},500))};$(f(this,me).top).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(-1)}),$(f(this,me).bottom).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(1)}),$(f(this,me).top).on("touchstart",l=>{t(-1)}),$(f(this,me).bottom).on("touchstart",l=>{t(1)}),f(this,me).top.ontouchend=f(this,me).bottom.ontouchend=f(this,me).track.ontouchend=f(this,me).top.onmouseup=f(this,me).top.onmouseleave=f(this,me).bottom.onmouseup=f(this,me).bottom.onmouseleave=f(this,me).track.onmouseup=f(this,me).track.onmouseleave=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))},$(f(this,me).track).on("mousedown",f(this,xa)),$(f(this,me).track).on("touchstart",f(this,Jh)),$(f(this,me).thumb).on("mousedown",f(this,Sa)),$(f(this,me).thumb).on("touchstart",f(this,Qh)),document.addEventListener("mouseup",l=>{f(this,is)&&tt(this,is,!1),document.removeEventListener("mousemove",f(this,_n)),typeof this.onDragStop=="function"&&this.onDragStop()}),document.addEventListener("touchend",l=>{tt(this,is,!1),document.removeEventListener("touchmove",f(this,_a)),typeof this.onDragStop=="function"&&this.onDragStop()})});Y(this,Jh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,xa).call(this,t)});Y(this,xa,t=>{if(!f(this,is)&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftKey)){t.preventDefault();var l=f(this,me).thumb.getBoundingClientRect();clearInterval(f(this,yr)),clearInterval(f(this,vr)),t.clientY>l.y?f(this,Dt).pageDown():f(this,Dt).pageUp(),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{var c=f(this,me).thumb.getBoundingClientRect();if(t.clientY>c.y&&t.clientY<c.y+c.height)clearInterval(f(this,vr));else{var o=t.clientY>c.y?f(this,Dt).pageDown():f(this,Dt).pageUp();o||clearInterval(f(this,vr))}},10))},500))}});Y(this,Qh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,Sa).call(this,t),document.addEventListener("touchmove",f(this,_a))});Y(this,_a,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,_n).call(this,t)});Y(this,Sa,t=>{tt(this,wa,t.clientY),nu.log("::",t,t.clientY),tt(this,is,!0),this.shiftY=t.offsetY+f(this,me).track.getBoundingClientRect().y,this.trackHeight=$(f(this,me).track).height(),this.thumbHeight=$(f(this,me).thumb).height(),this.nodataHeight=$(".ng-container .ng-table tr.nodata",f(this,Dt).body).height(),this.bodyHeight=$(".ng-container-body",f(this,Dt).body).height(),this.templateHeight=f(this,Dt).template.height(),this.theadHeight=$(".ng-container-body table > thead",f(this,Dt).body).height()||0,this.tfootHeight=$(".ng-container-body table > tfoot",f(this,Dt).body).height()||0,this.fixedHeight=$(".ng-container-body tbody.fixed",f(this,Dt).body).height(),this.tableHeight=$(".ng-container-body .ng-table",f(this,Dt).body).height(),tt(this,xn,!0),document.addEventListener("mousemove",f(this,_n)),typeof this.onDragStart=="function"&&this.onDragStart()});Y(this,_n,t=>{if(!f(this,is))return;t.preventDefault(),t.clientY-f(this,wa),f(this,xn)&&(H.j.querySelectorAll("th,td",f(this,Dt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"),tt(this,xn,!1));var l=this.trackHeight;let c=f(this,Sn).call(this);var o=t.clientY-this.shiftY;o<0&&(o=0),o+this.thumbHeight>l&&(o=parseInt(l-c));var r=parseInt($(".ng-container-body tbody.bindable tr",f(this,Dt).body).not(".nodata").length/f(this,Dt).template.length),n=parseInt(o*(f(this,Dt).data.count()+1-r)/parseInt(l-c));if(Math.max(0,f(this,Dt).matrix.getTotalHeight()-this.bodyHeight),f(this,Dt).matrix.getHeight(n),f(this,Dt).dataManager.viewRecords.rawIndex!=n)f(this,Dt).scrollToV2(n),tt(this,Kh,0),Ke(this,tc,Du).call(this,0);else{f(this,me).thumb.style.top=o+"px",nu.log(o);return}});Y(this,Sn,()=>parseInt(f(this,me).thumb.dataset.height));this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Dt,this.getRootNode().host),f(this,Dt)&&(this.shadowRoot.innerHTML=`
|
|
656
656
|
<style>
|
|
657
657
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngVScrollBar.css";
|
|
658
658
|
${H.getCustomPath(this,"ngVScrollBar.css")}
|
|
@@ -702,7 +702,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
702
702
|
}else if(s&&!t){l[e].__ng._[H.ROW.COLLAPSE]=!0;//!b;
|
|
703
703
|
}else if(!s&&t){l[e].__ng._[H.ROW.COLLAPSE]=!0;//!b;
|
|
704
704
|
}else if(!s&&!t){l[e].__ng._[H.ROW.COLLAPSE]=!0;//!b;
|
|
705
|
-
}n=l[e]}});Y(this,
|
|
705
|
+
}n=l[e]}});Y(this,gu,t=>{var l=this.owner.data.getValidDataNF();const c=this.owner.data.findIndexNF_1(this.data.__ng._[H.ROW.INDEX]);if(!(c<0))for(var o=this.owner.fields.indexOf(this.cell.dataset.bind),r=this.value,n=c+1;n<l.length;n++){var s=l[n].v[o];if(s<=r)break;l[n].__ng._[H.ROW.COLLAPSE]=!t}});Y(this,Fa,t=>{if(t<=0)return-1;const l=this.owner.data.get(t,this.cell.dataset.bind),c=this.owner.fields.indexOf(this.cell.dataset.bind),o=this.owner.data.getValidData();for(var r=t-1;r>=0;r--){const n=o[r].v[c];if(l>n)return r}return-1});Y(this,qa,t=>{if(H.isNull(t)||t<0)throw`invalid row [${t}]`;if(t+1>=this.owner.data.count())return!0;const l=this.owner.data.get(t,this.cell.dataset.bind),c=this.owner.fields.indexOf(this.cell.dataset.bind),o=this.owner.data.getValidData();for(var r=t+1;r<o.length;r++){const n=o[r].v[c];if(n<l)return!0;if(n==l)return!1}return!0});Y(this,uc,()=>{var t=[],l=this.owner.data.getValidDataNF(),c=this.owner.data.findIndexNF_1(this.data.__ng._[H.ROW.INDEX]);if(c<0)throw`invalid row index [${this.data.__ng._[H.ROW.INDEX]}]`;var o=this.owner.fields.indexOf(this.cell.dataset.bind);const r=l[c].v[o];for(var n=c+1;n<l.length;n++){var s=l[n].v[o];if(r>=s)break;s==r+1&&t.push(l[n])}return t});Y(this,dc,()=>f(this,uc).call(this).length>0);Y(this,fc,t=>H.isNull(t)||t<0||this.owner.data.count()>=0?-1:this.owner.data.get(t,this.cell.dataset.bind))}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
706
706
|
<style>
|
|
707
707
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngTreeItem.css";
|
|
708
708
|
${H.getCustomPath(this,"ngTreeItem.css")}
|
|
@@ -717,7 +717,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
717
717
|
<div></div>
|
|
718
718
|
<span class="text">${this.displayValue}</span>
|
|
719
719
|
</div>
|
|
720
|
-
`,super.connectedCallback(),tt(this,Pa,this.shadowRoot.querySelector("div.ng-pad")),tt(this,Da,this.shadowRoot.querySelector("span"))}get prevLevel(){var t=parseInt(this.closest("tr").sectionRowIndex/this.owner.template.length);if(!this.owner.dataManager.viewRecords)return-1;if(t!=0){var l=this.owner.data.getNF(t-1);return l[this.cell.dataset.bind]}else for(var c=parseInt(this.cell.dataset.row)-1;c>=0;c--){var o=this.owner.data.get(c);if(!o.__ng._[H.ROW.EXPAND])return o[this.cell.dataset.bind]}return-1}}Pa=new WeakMap,Da=new WeakMap,Ba=new WeakMap,bi=new WeakSet,$l=function(){return this.data.__ng._[H.ROW.EXPAND]},ac=new WeakMap,lc=new WeakMap,hc=new WeakMap,cc=new WeakMap,mu=new WeakMap,Fa=new WeakMap,qa=new WeakMap,uc=new WeakMap,dc=new WeakMap,fc=new WeakMap,customElements.get("ng-tree-item")||customElements.define("ng-tree-item",lf);class hf{constructor(E){Y(this,yt);Y(this,Ge);Y(this,wr);Y(this,yi);Y(this,vi,[]);it(this,"init",()=>{tt(this,wr,{body:$(".ng-container-body",f(this,yt).body).height()||0,thead:$(".ng-container-body thead",f(this,yt).body).height()||0,tfoot:$(".ng-container-body tfoot",f(this,yt).body).height()||0}),!f(this,yi)&&($(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(f(this,wr).body),tt(this,yi,!0))});it(this,"redraw",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),f(this,yt).dataManager&&(tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,pc).call(this),f(this,Cn).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refresh())});it(this,"redrawV2",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,mc).call(this),f(this,Cn).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refreshV2()});it(this,"redrawV3",()=>{this.init(),tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,Cn).call(this)});Y(this,Ha,()=>{var E=0;return $(".ng-container-body tbody.fixed tr",f(this,yt).body).each((t,l)=>{l.data&&l.data.__ng&&(E+=f(this,yt).matrix.getHeight(l.data.__ng.height[parseInt(t%f(this,yt).template.length)]))}),E});Y(this,za,()=>{var E=f(this,Ha).call(this);const t=parseInt(f(this,Ge)*f(this,yt).template.length);return $(".ng-container-body tbody.bindable tr:not(.nodata)",f(this,yt).body).each((l,c)=>{E+=f(this,yt).matrix.getHeight(t+l)}),E});Y(this,Ua,()=>{const E=parseInt(f(this,yt).getAttribute("display-row-count"));if(f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple"))return 1;if([H.PAGINGTYPE.CLIENT,H.PAGINGTYPE.SERVER].includes(f(this,yt).paging.type))return f(this,yt).paging.linesPerPage;if(!isNaN(E))return f(this,Ge)+E>f(this,yt).data.count()&&(tt(this,Ge,E>=f(this,yt).data.count()?0:f(this,yt).data.count()-E),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge)),E;const t=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Ha).call(this);for(var l=0,c=0;c<t;)c+=this.getRowHeight(f(this,Ge)+l++);if(f(this,Ge)+l>f(this,yt).data.count()){l=0,c=0;for(var o=f(this,yt).data.count()-1;o>=0&&c<t;o--)c+=this.getRowHeight(o),l++;c>t&&l--,tt(this,Ge,f(this,yt).data.count()-l),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge)}return l});Y(this,Va,()=>{var E=f(this,Ua).call(this),t=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not("tr.nodata").length/(f(this,yt).template.length||1);const l=f(this,yt).template.clone(),c=l.clone(),o=l.clone();l.find("th,td").not("[fixed=left]").remove(),c.find("th,td").not("[fixed=right]").remove(),o.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const r=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-left")),n=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-right")),s=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-body"));for(var e=t;e<E;e++)l.each((u,a)=>{r.before(a.outerHTML)}),c.each((u,a)=>{n.before(a.outerHTML)}),o.each((u,a)=>{s.before(a.outerHTML)});return;var i;if(i.length>0)var t});Y(this,Wa,()=>{var E=Math.min(f(this,Ua).call(this),f(this,yt).data.count());$(".ng-container tbody.bindable tr:not(.nodata)",f(this,yt).body).each((t,l)=>{parseInt(l.sectionRowIndex/f(this,yt).template.length)>=E&&$(l).remove()}),f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{f(this,Ge)+parseInt(t.sectionRowIndex/f(this,yt).template.length)>=f(this,yt).data.count()&&$(t).remove()})});Y(this,pc,()=>{f(this,Va).call(this),f(this,Wa).call(this);var E=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,za).call(this);if(f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(E=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(E),f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple")){$("tr.nodata",f(this,yt).body).height(0);var E=47;$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata").each((l,c)=>{E+=$(c).height()}),$(f(this,yt).closest("dialog")).height(E)}});Y(this,mc,()=>{f(this,Va).call(this),f(this,Wa).call(this),f(this,yt).isLastPage});Y(this,gc,()=>{for(const E of f(this,vi))clearTimeout(E);tt(this,vi,[]),f(this,vi).push(setTimeout(()=>{tt(this,yi,!1);var E=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata"),t=$(".ng-container-left tbody.bindable tr",f(this,yt).body).not(".nodata"),l=$(".ng-container-right tbody.bindable tr",f(this,yt).body).not(".nodata");if(E.length>0){var c=parseInt(E[0].dataset.row*f(this,yt).template.length);E.each((r,n)=>{var s=f(this,yt).matrix.getHeight(c+r);$("canvas.chart",n).css({height:s-4}),$("canvas.chart",t.eq(r)).css({height:s-4}),$("canvas.chart",l.eq(r)).css({height:s-4}),$(n).css({height:s}).height(s),t.eq(r).css({height:s}).height(s),l.eq(r).css({height:s}).height(s)})}f(this,yt).cell.refresh(),$("ng-row-indicator",f(this,yt).body).each((r,n)=>{n.refresh()});var o=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,za).call(this);f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(o=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(o),f(this,yt).refreshBindRows(),f(this,yt).refreshData(),f(this,yt).paging.totalCount=f(this,yt).data.countNF(),f(this,yt).body.querySelector("ng-vscrollbar").refresh(),H.j.querySelectorAll(".ng-table tbody tr",f(this,yt).body).removeClass("hover"),H.j.querySelectorAll(f(this,yt)).removeClass("loading"),H.j.querySelectorAll("ng-filter-panel").removeClass("loading")},300)),f(this,vi).push(setTimeout(()=>{f(this,yt).refreshDataV2()}))});Y(this,Cn,()=>{var E=[];f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)").forEach(t=>{E.push(f(this,Ge)+parseInt(t.sectionRowIndex/f(this,yt).template.length))}),E=[...new Set(E)],f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{const l=parseInt(t.sectionRowIndex/f(this,yt).template.length);t.dataset.row=E[l],t.dataset.matrixRow=parseInt(E[l]*f(this,yt).template.length)+parseInt(t.sectionRowIndex%f(this,yt).template.length);for(const c of t.cells)c.dataset.row=t.dataset.row,c.dataset.matrixRow=t.dataset.matrixRow}),E.forEach(t=>{const l=f(this,yt).data.get(t);f(this,yt).body.querySelectorAll(`.ng-container tbody.bindable tr[data-row="${t}"]`).forEach(c=>{c.data=l})}),tt(this,Ge,parseInt(f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-of-type").getAttribute("data-row"))),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge),f(this,gc).call(this),f(this,yt).isFirstPage=f(this,Ge)==0,f(this,yt).isLastPage=E[E.length-1]==f(this,yt).data.count()-1});it(this,"getVisibleFirstRow",()=>{var E=f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-child");return parseInt(E.dataset.row)});it(this,"getVisibleLastRow",()=>{var E=f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)");return E.length>0?parseInt(E[E.length-1].dataset.row):-1});it(this,"getRowHeight",E=>{let t=0;for(var l=0;l<f(this,yt).template.length;l++)t+=f(this,yt).matrix.getHeight(parseInt(E*f(this,yt).template.length+l));return t});it(this,"getTranslateY",()=>{const E=f(this,yt).body.querySelector(".ng-container-body tbody.bindable");return!E||!E.style||!E.style.transform?0:parseFloat(E.style.transform.replace("translateY(","").replace(")",""))});it(this,"getTotalSpace",()=>$(f(this,yt).body.querySelector(".ng-container-body")).height()-($(f(this,yt).body.querySelector(".ng-container-body thead")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tfoot")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tbody.fixed")).height()||0));it(this,"fitPage",()=>{const E=this.getVisibleLastRow(),t=this.getTotalSpace();if(E==f(this,yt).data.count()-1){for(var l=0,c=E;c>=0;c--)if(l+=this.getRowHeight(c),l>t){f(this,yt).scrollTo(c+1);break}}});it(this,"selectArea",(E,t,l,c)=>{const o=f(this,zs).call(this,E),r=f(this,zs).call(this,l),n=f(this,Us).call(this,t),s=f(this,Us).call(this,c),e=parseInt(o*f(this,yt).template.length),i=parseInt(r*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=o,o>=0&&r>=0?f(this,yt).selection.selectArea(e,n,i,s):this.clearSelection()});it(this,"selectRow",(E,t)=>{const l=f(this,zs).call(this,E),c=H.isNull(t)?l:f(this,zs).call(this,t),o=parseInt(l*f(this,yt).template.length),r=parseInt(c*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=l,l>=0&&c>=0?f(this,yt).selection.selectArea(o,f(this,yt).firstCol,r,f(this,yt).lastCol):this.clearSelection()});it(this,"selectCol",(E,t)=>{const l=f(this,Us).call(this,E),c=H.isNull(t)?l:f(this,Us).call(this,t),o=0,r=parseInt(f(this,yt).data.count()*f(this,yt).template.length-1);l>=0&&c>=0?f(this,yt).selection.selectArea(o,l,r,c):this.clearSelection()});it(this,"selectCell",(E,t,l)=>{const c=f(this,zs).call(this,E),o=f(this,Us).call(this,t),r=parseInt(c*f(this,yt).template.length)+H.nvl(l,0);f(this,yt).row.at=c,c>=0?f(this,yt).selection.selectArea(r,o,r,o):this.clearSelection()});Y(this,zs,E=>{if(typeof E=="number")return E;if(typeof E=="function")return f(this,yt).data.findIndex(E);throw`invalid ${E}`});Y(this,Us,E=>{if(typeof E=="number")return E;if(typeof E=="string"&&f(this,yt).fields.includes(E))return parseInt($(`[data-bind="${E}"]`,f(this,yt).template)[0].dataset.col);throw`invalid ${E}`});it(this,"moveTo",E=>{f(this,yt).scrollTo(E)});tt(this,yt,E),tt(this,yi,!1),this.init()}}yt=new WeakMap,Ge=new WeakMap,wr=new WeakMap,yi=new WeakMap,vi=new WeakMap,Ha=new WeakMap,za=new WeakMap,Ua=new WeakMap,Va=new WeakMap,Wa=new WeakMap,pc=new WeakMap,mc=new WeakMap,gc=new WeakMap,Cn=new WeakMap,zs=new WeakMap,Us=new WeakMap;class cf{constructor(E){Y(this,Qe);Y(this,Vs);it(this,"initialize",()=>{tt(this,Vs,!1),f(this,Qe).data.clearFilter()});it(this,"isFiltering",()=>f(this,Vs));it(this,"on",E=>{tt(this,Vs,!0);const t=f(this,bc).call(this);f(this,Qe).body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach(l=>{var o,r;const c=(o=l.closest("tr"))==null?void 0:o.sectionRowIndex;if(c!==void 0&&c+l.rowSpan-1===t){const n=Array.from(f(this,Qe).activeTmpl.querySelectorAll(`[data-col="${l.dataset.col}"]`)).map(s=>s.dataset.bind?{colnm:s.dataset.bind,data:[]}:null).filter(Boolean);if(n.length>0){(r=l.querySelector("ng-filter-button"))==null||r.remove();const s=document.createElement("ng-filter-button");l.appendChild(s),s.filterOptions=n}}})});it(this,"off",()=>{tt(this,Vs,!1),f(this,Qe).body.querySelectorAll(".ng-table ng-filter-button").forEach(E=>{E.remove()})});it(this,"set",E=>{this.on();let t=Array.isArray(E)?Object.fromEntries(Object.keys(E[0]).map(l=>[l,[...new Set(E.map(c=>c[l]))]])):E;f(this,Qe).data.clearFilter(),Object.entries(t).forEach(([l,c])=>{const o=f(this,Qe).fields.indexOf(l);f(this,Qe).data.getValidData().some(r=>typeof r.v[o]=="number")&&(c=c.map(Number)),f(this,Qe).data.getValidData().filter(r=>c.nineBinarySearch(r.v[o]||"")<0).forEach(r=>{r.__ng.filtered=!0})}),f(this,Qe).data.refreshFilter(),f(this,Qe).shadowRoot.querySelectorAll("ng-filter-button").forEach(l=>{l.filterOptions.forEach(c=>{c.data=[]})}),Object.entries(t).forEach(([l,c])=>{f(this,Qe).shadowRoot.querySelectorAll("ng-filter-button").forEach(o=>{let r=o.filterOptions;r.forEach(n=>{n.colnm===l&&(n.data=c)}),o.filterOptions=r})}),f(this,Qe).scrollTo_V1(0),f(this,Qe).paging.reset()});Y(this,bc,(E="thead")=>[...f(this,Qe).body.querySelectorAll(`.ng-table ${E}`)].reduce((t,l)=>Math.max(l.rows.length-1,t),0));tt(this,Qe,E),tt(this,Vs,!1);const t=document.createElement("ng-filter-panel");t.style.display="none",f(this,Qe).shadowRoot.appendChild(t)}}Qe=new WeakMap,Vs=new WeakMap,bc=new WeakMap;class uf extends HTMLElement{constructor(){super();Y(this,Xa);Y(this,En);Y(this,Ya,t=>{var o;t.preventDefault(),t.stopPropagation();const l=f(this,Xa).shadowRoot.querySelector("ng-filter-panel"),c=(o=this.closest("th,td"))==null?void 0:o.dataset.col;l.col===c?l.close():l.open(this)})}connectedCallback(){tt(this,Xa,this.getRootNode().host),this.removeEventListener("click",f(this,Ya)),this.addEventListener("click",f(this,Ya))}get filterOptions(){return f(this,En)}set filterOptions(t){tt(this,En,t),this.classList.toggle("filtered",f(this,En).some(l=>l.data.length>0))}}Xa=new WeakMap,En=new WeakMap,Ya=new WeakMap;class df extends HTMLElement{constructor(){super();Y(this,Mr);Y(this,Ga);Y(this,Ka);Y(this,yc,t=>{const l=this.shadowRoot.querySelector("nine-grid");this.classList.add("loading"),setTimeout(()=>{const[c,o,r,n]=["LVL","CHK","COLNM","DATA"].map(u=>l.fields.indexOf(u)),s=l.data.getValidDataNF().filter(u=>u.v[c]===2&&u.v[o]==="Y"),e=s.length>0?[...new Set(s.map(u=>u.v[r]))].map(u=>({colnm:u,data:[...new Set(l.data.getValidData().filter(a=>a.v[o]==="Y"&&a.v[r]===u).map(a=>a.v[n]||""))].sort()})):[];f(this,Ga).filterOptions=e;const i=Object.fromEntries([...f(this,Mr).body.querySelectorAll("ng-filter-button")].flatMap(u=>u.filterOptions).filter(u=>u.data.length>0).map(u=>[u.colnm,u.data]));f(this,Mr).filtering.set(i),this.classList.remove("loading"),this.style.display="none"})});Y(this,vc,t=>{this.style.display="none"});Y(this,wc,t=>{const l=this.shadowRoot.querySelector("nine-grid"),c=l.fields.indexOf("CHK"),o=t.target.checked;l.data.getValidData().forEach(r=>{r.v[c]=o?"Y":"N"}),l.refreshData()});Y(this,xc,t=>{const l=this.shadowRoot.querySelector("nine-grid");l.classList.add("loading");const c=l.dataManager.rawRecords;c.forEach(s=>{s.__ng.filtered=!1});const o=t.target.value.toLowerCase(),[r,n]=["LVL","DATA"].map(s=>l.fields.indexOf(s));c.forEach(s=>{s.__ng.filtered=s.v[r]===2&&!String(s.v[n]||"").toLowerCase().includes(o)}),l.data.resetRecords(),clearTimeout(f(this,Ka)),tt(this,Ka,setTimeout(()=>{l.dataManager.viewRecords.reset(),l.dataManager.viewRecords.touch()},200))});it(this,"close",()=>{this.col=null,this.style.display="none"});it(this,"open",t=>{const l=t.closest("th,td"),{left:c}=t.getBoundingClientRect(),{left:o,width:r,top:n}=f(this,Mr).getBoundingClientRect(),{top:s,height:e}=l.getBoundingClientRect(),{width:i}=this.getBoundingClientRect();let u=Math.max(0,c-o);u=Math.min(u,r-i-5);const a=s+e-n;Object.assign(this.style,{left:`${u}px`,top:`${a}px`,display:"flex"}),this.classList.add("loading"),this.shadowRoot.querySelector("input[type=text]").value="",setTimeout(()=>{const h=f(this,Mr).data.getValidDataNF(),p=l.dataset.col;this.col=p,tt(this,Ga,t);const m=t.filterOptions.map((g,S)=>{const C=`<span class="group">${l.textContent}${t.filterOptions.length>1?` #${S+1} (${g.colnm})`:""}</span>`,I=f(this,Mr).activeTmpl.querySelector(`[data-col="${p}"][data-bind="${g.colnm}"]`),D=I==null?void 0:I.getAttribute("data-expr"),z=D?f(this,Mr).exprFunction(D):null,P=h.map(B=>{const F=f(this,Mr).fields.indexOf(g.colnm);return D?{v:B.v[F],v2:z(f(this,Mr).data.conv(B),B.__ng.rowidx,f(this,Mr).data)}:{v:B.v[F],v2:B.v[F]}});return[{LVL:1,CHK:"N",DATA2:C},...[...new Set(P.map(JSON.stringify))].map(JSON.parse).sort((B,F)=>(B.v2||"")>(F.v2||"")?1:(B.v2||"")<(F.v2||"")?-1:0).map(B=>({LVL:2,DATA:B.v,DATA2:B.v2||` <span class="empty">(empty)</span> ${B.v}`,COLNM:g.colnm,CHK:g.data.length===0||g.data.nineBinarySearch(B.v||"")>=0?"Y":"N"}))]}).flat(),d=this.shadowRoot.querySelector("nine-grid");d.fields.add(["DATA","DATA2","COLNM"]),d.data.set(m);const b=this.shadowRoot.querySelector("input[type=checkbox]");b.checked=d.data.getValidData().every(g=>!(g.LVL===2&&g.CHK!=="Y")),this.shadowRoot.querySelector("input").focus(),this.classList.remove("loading")})});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Mr,this.getRootNode().host);const t=this.getRootNode().host.closest("nine-grid").getAttribute("css-path")||"";this.shadowRoot.innerHTML=`
|
|
720
|
+
`,super.connectedCallback(),tt(this,Pa,this.shadowRoot.querySelector("div.ng-pad")),tt(this,Da,this.shadowRoot.querySelector("span"))}get prevLevel(){var t=parseInt(this.closest("tr").sectionRowIndex/this.owner.template.length);if(!this.owner.dataManager.viewRecords)return-1;if(t!=0){var l=this.owner.data.getNF(t-1);return l[this.cell.dataset.bind]}else for(var c=parseInt(this.cell.dataset.row)-1;c>=0;c--){var o=this.owner.data.get(c);if(!o.__ng._[H.ROW.EXPAND])return o[this.cell.dataset.bind]}return-1}}Pa=new WeakMap,Da=new WeakMap,Ba=new WeakMap,bi=new WeakSet,$l=function(){return this.data.__ng._[H.ROW.EXPAND]},ac=new WeakMap,lc=new WeakMap,hc=new WeakMap,cc=new WeakMap,gu=new WeakMap,Fa=new WeakMap,qa=new WeakMap,uc=new WeakMap,dc=new WeakMap,fc=new WeakMap,customElements.get("ng-tree-item")||customElements.define("ng-tree-item",lf);class hf{constructor(E){Y(this,yt);Y(this,Ge);Y(this,wr);Y(this,yi);Y(this,vi,[]);it(this,"init",()=>{tt(this,wr,{body:$(".ng-container-body",f(this,yt).body).height()||0,thead:$(".ng-container-body thead",f(this,yt).body).height()||0,tfoot:$(".ng-container-body tfoot",f(this,yt).body).height()||0}),!f(this,yi)&&($(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(f(this,wr).body),tt(this,yi,!0))});it(this,"redraw",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),f(this,yt).dataManager&&(tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,pc).call(this),f(this,Cn).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refresh())});it(this,"redrawV2",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,mc).call(this),f(this,Cn).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refreshV2()});it(this,"redrawV3",()=>{this.init(),tt(this,Ge,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,Cn).call(this)});Y(this,Ha,()=>{var E=0;return $(".ng-container-body tbody.fixed tr",f(this,yt).body).each((t,l)=>{l.data&&l.data.__ng&&(E+=f(this,yt).matrix.getHeight(l.data.__ng.height[parseInt(t%f(this,yt).template.length)]))}),E});Y(this,za,()=>{var E=f(this,Ha).call(this);const t=parseInt(f(this,Ge)*f(this,yt).template.length);return $(".ng-container-body tbody.bindable tr:not(.nodata)",f(this,yt).body).each((l,c)=>{E+=f(this,yt).matrix.getHeight(t+l)}),E});Y(this,Ua,()=>{const E=parseInt(f(this,yt).getAttribute("display-row-count"));if(f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple"))return 1;if([H.PAGINGTYPE.CLIENT,H.PAGINGTYPE.SERVER].includes(f(this,yt).paging.type))return f(this,yt).paging.linesPerPage;if(!isNaN(E))return f(this,Ge)+E>f(this,yt).data.count()&&(tt(this,Ge,E>=f(this,yt).data.count()?0:f(this,yt).data.count()-E),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge)),E;const t=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Ha).call(this);for(var l=0,c=0;c<t;)c+=this.getRowHeight(f(this,Ge)+l++);if(f(this,Ge)+l>f(this,yt).data.count()){l=0,c=0;for(var o=f(this,yt).data.count()-1;o>=0&&c<t;o--)c+=this.getRowHeight(o),l++;c>t&&l--,tt(this,Ge,f(this,yt).data.count()-l),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge)}return l});Y(this,Va,()=>{var E=f(this,Ua).call(this),t=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not("tr.nodata").length/(f(this,yt).template.length||1);const l=f(this,yt).template.clone(),c=l.clone(),o=l.clone();l.find("th,td").not("[fixed=left]").remove(),c.find("th,td").not("[fixed=right]").remove(),o.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const r=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-left")),n=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-right")),s=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-body"));for(var e=t;e<E;e++)l.each((u,a)=>{r.before(a.outerHTML)}),c.each((u,a)=>{n.before(a.outerHTML)}),o.each((u,a)=>{s.before(a.outerHTML)});return;var i;if(i.length>0)var t});Y(this,Wa,()=>{var E=Math.min(f(this,Ua).call(this),f(this,yt).data.count());$(".ng-container tbody.bindable tr:not(.nodata)",f(this,yt).body).each((t,l)=>{parseInt(l.sectionRowIndex/f(this,yt).template.length)>=E&&$(l).remove()}),f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{f(this,Ge)+parseInt(t.sectionRowIndex/f(this,yt).template.length)>=f(this,yt).data.count()&&$(t).remove()})});Y(this,pc,()=>{f(this,Va).call(this),f(this,Wa).call(this);var E=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,za).call(this);if(f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(E=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(E),f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple")){$("tr.nodata",f(this,yt).body).height(0);var E=47;$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata").each((l,c)=>{E+=$(c).height()}),$(f(this,yt).closest("dialog")).height(E)}});Y(this,mc,()=>{f(this,Va).call(this),f(this,Wa).call(this),f(this,yt).isLastPage});Y(this,gc,()=>{for(const E of f(this,vi))clearTimeout(E);tt(this,vi,[]),f(this,vi).push(setTimeout(()=>{tt(this,yi,!1);var E=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata"),t=$(".ng-container-left tbody.bindable tr",f(this,yt).body).not(".nodata"),l=$(".ng-container-right tbody.bindable tr",f(this,yt).body).not(".nodata");if(E.length>0){var c=parseInt(E[0].dataset.row*f(this,yt).template.length);E.each((r,n)=>{var s=f(this,yt).matrix.getHeight(c+r);$("canvas.chart",n).css({height:s-4}),$("canvas.chart",t.eq(r)).css({height:s-4}),$("canvas.chart",l.eq(r)).css({height:s-4}),$(n).css({height:s}).height(s),t.eq(r).css({height:s}).height(s),l.eq(r).css({height:s}).height(s)})}f(this,yt).cell.refresh(),$("ng-row-indicator",f(this,yt).body).each((r,n)=>{n.refresh()});var o=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,za).call(this);f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(o=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(o),f(this,yt).refreshBindRows(),f(this,yt).refreshData(),f(this,yt).paging.totalCount=f(this,yt).data.countNF(),f(this,yt).body.querySelector("ng-vscrollbar").refresh(),H.j.querySelectorAll(".ng-table tbody tr",f(this,yt).body).removeClass("hover"),H.j.querySelectorAll(f(this,yt)).removeClass("loading"),H.j.querySelectorAll("ng-filter-panel").removeClass("loading")},300)),f(this,vi).push(setTimeout(()=>{f(this,yt).refreshDataV2()}))});Y(this,Cn,()=>{var E=[];f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)").forEach(t=>{E.push(f(this,Ge)+parseInt(t.sectionRowIndex/f(this,yt).template.length))}),E=[...new Set(E)],f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{const l=parseInt(t.sectionRowIndex/f(this,yt).template.length);t.dataset.row=E[l],t.dataset.matrixRow=parseInt(E[l]*f(this,yt).template.length)+parseInt(t.sectionRowIndex%f(this,yt).template.length);for(const c of t.cells)c.dataset.row=t.dataset.row,c.dataset.matrixRow=t.dataset.matrixRow}),E.forEach(t=>{const l=f(this,yt).data.get(t);f(this,yt).body.querySelectorAll(`.ng-container tbody.bindable tr[data-row="${t}"]`).forEach(c=>{c.data=l})}),tt(this,Ge,parseInt(f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-of-type").getAttribute("data-row"))),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ge),f(this,gc).call(this),f(this,yt).isFirstPage=f(this,Ge)==0,f(this,yt).isLastPage=E[E.length-1]==f(this,yt).data.count()-1});it(this,"getVisibleFirstRow",()=>{var E=f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-child");return parseInt(E.dataset.row)});it(this,"getVisibleLastRow",()=>{var E=f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)");return E.length>0?parseInt(E[E.length-1].dataset.row):-1});it(this,"getRowHeight",E=>{let t=0;for(var l=0;l<f(this,yt).template.length;l++)t+=f(this,yt).matrix.getHeight(parseInt(E*f(this,yt).template.length+l));return t});it(this,"getTranslateY",()=>{const E=f(this,yt).body.querySelector(".ng-container-body tbody.bindable");return!E||!E.style||!E.style.transform?0:parseFloat(E.style.transform.replace("translateY(","").replace(")",""))});it(this,"getTotalSpace",()=>$(f(this,yt).body.querySelector(".ng-container-body")).height()-($(f(this,yt).body.querySelector(".ng-container-body thead")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tfoot")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tbody.fixed")).height()||0));it(this,"fitPage",()=>{const E=this.getVisibleLastRow(),t=this.getTotalSpace();if(E==f(this,yt).data.count()-1){for(var l=0,c=E;c>=0;c--)if(l+=this.getRowHeight(c),l>t){f(this,yt).scrollTo(c+1);break}}});it(this,"selectArea",(E,t,l,c)=>{const o=f(this,zs).call(this,E),r=f(this,zs).call(this,l),n=f(this,Us).call(this,t),s=f(this,Us).call(this,c),e=parseInt(o*f(this,yt).template.length),i=parseInt(r*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=o,o>=0&&r>=0?f(this,yt).selection.selectArea(e,n,i,s):this.clearSelection()});it(this,"selectRow",(E,t)=>{const l=f(this,zs).call(this,E),c=H.isNull(t)?l:f(this,zs).call(this,t),o=parseInt(l*f(this,yt).template.length),r=parseInt(c*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=l,l>=0&&c>=0?f(this,yt).selection.selectArea(o,f(this,yt).firstCol,r,f(this,yt).lastCol):this.clearSelection()});it(this,"selectCol",(E,t)=>{const l=f(this,Us).call(this,E),c=H.isNull(t)?l:f(this,Us).call(this,t),o=0,r=parseInt(f(this,yt).data.count()*f(this,yt).template.length-1);l>=0&&c>=0?f(this,yt).selection.selectArea(o,l,r,c):this.clearSelection()});it(this,"selectCell",(E,t,l)=>{const c=f(this,zs).call(this,E),o=f(this,Us).call(this,t),r=parseInt(c*f(this,yt).template.length)+H.nvl(l,0);f(this,yt).row.at=c,c>=0?f(this,yt).selection.selectArea(r,o,r,o):this.clearSelection()});Y(this,zs,E=>{if(typeof E=="number")return E;if(typeof E=="function")return f(this,yt).data.findIndex(E);throw`invalid ${E}`});Y(this,Us,E=>{if(typeof E=="number")return E;if(typeof E=="string"&&f(this,yt).fields.includes(E))return parseInt($(`[data-bind="${E}"]`,f(this,yt).template)[0].dataset.col);throw`invalid ${E}`});it(this,"moveTo",E=>{f(this,yt).scrollTo(E)});tt(this,yt,E),tt(this,yi,!1),this.init()}}yt=new WeakMap,Ge=new WeakMap,wr=new WeakMap,yi=new WeakMap,vi=new WeakMap,Ha=new WeakMap,za=new WeakMap,Ua=new WeakMap,Va=new WeakMap,Wa=new WeakMap,pc=new WeakMap,mc=new WeakMap,gc=new WeakMap,Cn=new WeakMap,zs=new WeakMap,Us=new WeakMap;class cf{constructor(E){Y(this,Qe);Y(this,Vs);it(this,"initialize",()=>{tt(this,Vs,!1),f(this,Qe).data.clearFilter()});it(this,"isFiltering",()=>f(this,Vs));it(this,"on",E=>{tt(this,Vs,!0);const t=f(this,bc).call(this);f(this,Qe).body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach(l=>{var o,r;const c=(o=l.closest("tr"))==null?void 0:o.sectionRowIndex;if(c!==void 0&&c+l.rowSpan-1===t){const n=Array.from(f(this,Qe).activeTmpl.querySelectorAll(`[data-col="${l.dataset.col}"]`)).map(s=>s.dataset.bind?{colnm:s.dataset.bind,data:[]}:null).filter(Boolean);if(n.length>0){(r=l.querySelector("ng-filter-button"))==null||r.remove();const s=document.createElement("ng-filter-button");l.appendChild(s),s.filterOptions=n}}})});it(this,"off",()=>{tt(this,Vs,!1),f(this,Qe).body.querySelectorAll(".ng-table ng-filter-button").forEach(E=>{E.remove()})});it(this,"set",E=>{this.on();let t=Array.isArray(E)?Object.fromEntries(Object.keys(E[0]).map(l=>[l,[...new Set(E.map(c=>c[l]))]])):E;f(this,Qe).data.clearFilter(),Object.entries(t).forEach(([l,c])=>{const o=f(this,Qe).fields.indexOf(l);f(this,Qe).data.getValidData().some(r=>typeof r.v[o]=="number")&&(c=c.map(Number)),f(this,Qe).data.getValidData().filter(r=>c.nineBinarySearch(r.v[o]||"")<0).forEach(r=>{r.__ng.filtered=!0})}),f(this,Qe).data.refreshFilter(),f(this,Qe).shadowRoot.querySelectorAll("ng-filter-button").forEach(l=>{l.filterOptions.forEach(c=>{c.data=[]})}),Object.entries(t).forEach(([l,c])=>{f(this,Qe).shadowRoot.querySelectorAll("ng-filter-button").forEach(o=>{let r=o.filterOptions;r.forEach(n=>{n.colnm===l&&(n.data=c)}),o.filterOptions=r})}),f(this,Qe).scrollTo_V1(0),f(this,Qe).paging.reset()});Y(this,bc,(E="thead")=>[...f(this,Qe).body.querySelectorAll(`.ng-table ${E}`)].reduce((t,l)=>Math.max(l.rows.length-1,t),0));tt(this,Qe,E),tt(this,Vs,!1);const t=document.createElement("ng-filter-panel");t.style.display="none",f(this,Qe).shadowRoot.appendChild(t)}}Qe=new WeakMap,Vs=new WeakMap,bc=new WeakMap;class uf extends HTMLElement{constructor(){super();Y(this,Xa);Y(this,En);Y(this,Ya,t=>{var o;t.preventDefault(),t.stopPropagation();const l=f(this,Xa).shadowRoot.querySelector("ng-filter-panel"),c=(o=this.closest("th,td"))==null?void 0:o.dataset.col;l.col===c?l.close():l.open(this)})}connectedCallback(){tt(this,Xa,this.getRootNode().host),this.removeEventListener("click",f(this,Ya)),this.addEventListener("click",f(this,Ya))}get filterOptions(){return f(this,En)}set filterOptions(t){tt(this,En,t),this.classList.toggle("filtered",f(this,En).some(l=>l.data.length>0))}}Xa=new WeakMap,En=new WeakMap,Ya=new WeakMap;class df extends HTMLElement{constructor(){super();Y(this,Mr);Y(this,Ga);Y(this,Ka);Y(this,yc,t=>{const l=this.shadowRoot.querySelector("nine-grid");this.classList.add("loading"),setTimeout(()=>{const[c,o,r,n]=["LVL","CHK","COLNM","DATA"].map(u=>l.fields.indexOf(u)),s=l.data.getValidDataNF().filter(u=>u.v[c]===2&&u.v[o]==="Y"),e=s.length>0?[...new Set(s.map(u=>u.v[r]))].map(u=>({colnm:u,data:[...new Set(l.data.getValidData().filter(a=>a.v[o]==="Y"&&a.v[r]===u).map(a=>a.v[n]||""))].sort()})):[];f(this,Ga).filterOptions=e;const i=Object.fromEntries([...f(this,Mr).body.querySelectorAll("ng-filter-button")].flatMap(u=>u.filterOptions).filter(u=>u.data.length>0).map(u=>[u.colnm,u.data]));f(this,Mr).filtering.set(i),this.classList.remove("loading"),this.style.display="none"})});Y(this,vc,t=>{this.style.display="none"});Y(this,wc,t=>{const l=this.shadowRoot.querySelector("nine-grid"),c=l.fields.indexOf("CHK"),o=t.target.checked;l.data.getValidData().forEach(r=>{r.v[c]=o?"Y":"N"}),l.refreshData()});Y(this,xc,t=>{const l=this.shadowRoot.querySelector("nine-grid");l.classList.add("loading");const c=l.dataManager.rawRecords;c.forEach(s=>{s.__ng.filtered=!1});const o=t.target.value.toLowerCase(),[r,n]=["LVL","DATA"].map(s=>l.fields.indexOf(s));c.forEach(s=>{s.__ng.filtered=s.v[r]===2&&!String(s.v[n]||"").toLowerCase().includes(o)}),l.data.resetRecords(),clearTimeout(f(this,Ka)),tt(this,Ka,setTimeout(()=>{l.dataManager.viewRecords.reset(),l.dataManager.viewRecords.touch()},200))});it(this,"close",()=>{this.col=null,this.style.display="none"});it(this,"open",t=>{const l=t.closest("th,td"),{left:c}=t.getBoundingClientRect(),{left:o,width:r,top:n}=f(this,Mr).getBoundingClientRect(),{top:s,height:e}=l.getBoundingClientRect(),{width:i}=this.getBoundingClientRect();let u=Math.max(0,c-o);u=Math.min(u,r-i-5);const a=s+e-n;Object.assign(this.style,{left:`${u}px`,top:`${a}px`,display:"flex"}),this.classList.add("loading"),this.shadowRoot.querySelector("input[type=text]").value="",setTimeout(()=>{const h=f(this,Mr).data.getValidDataNF(),p=l.dataset.col;this.col=p,tt(this,Ga,t);const m=t.filterOptions.map((g,S)=>{const C=`<span class="group">${l.textContent}${t.filterOptions.length>1?` #${S+1} (${g.colnm})`:""}</span>`,I=f(this,Mr).activeTmpl.querySelector(`[data-col="${p}"][data-bind="${g.colnm}"]`),D=I==null?void 0:I.getAttribute("data-expr"),z=D?f(this,Mr).exprFunction(D):null,P=h.map(B=>{const F=f(this,Mr).fields.indexOf(g.colnm);return D?{v:B.v[F],v2:z(f(this,Mr).data.conv(B),B.__ng.rowidx,f(this,Mr).data)}:{v:B.v[F],v2:B.v[F]}});return[{LVL:1,CHK:"N",DATA2:C},...[...new Set(P.map(JSON.stringify))].map(JSON.parse).sort((B,F)=>(B.v2||"")>(F.v2||"")?1:(B.v2||"")<(F.v2||"")?-1:0).map(B=>({LVL:2,DATA:B.v,DATA2:B.v2||` <span class="empty">(empty)</span> ${B.v}`,COLNM:g.colnm,CHK:g.data.length===0||g.data.nineBinarySearch(B.v||"")>=0?"Y":"N"}))]}).flat(),d=this.shadowRoot.querySelector("nine-grid");d.fields.add(["DATA","DATA2","COLNM"]),d.data.set(m);const b=this.shadowRoot.querySelector("input[type=checkbox]");b.checked=d.data.getValidData().every(g=>!(g.LVL===2&&g.CHK!=="Y")),this.shadowRoot.querySelector("input").focus(),this.classList.remove("loading")})});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Mr,this.getRootNode().host);const t=this.getRootNode().host.closest("nine-grid").getAttribute("css-path")||"";this.shadowRoot.innerHTML=`
|
|
721
721
|
<style>
|
|
722
722
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngFilterPanel.css";
|
|
723
723
|
${H.getCustomPath(this,"ngFilterPanel.css")}
|
|
@@ -1284,14 +1284,14 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1284
1284
|
${H.getCustomPath(this,"nxSplitter.css")}
|
|
1285
1285
|
</style>
|
|
1286
1286
|
${c}
|
|
1287
|
-
`,this.shadowRoot.appendChild(o.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".grip-h,.grip-v").forEach(r=>{r.addEventListener("mousedown",n=>f(this,Hc).call(this,n))}),f(this,wl).call(this),window.addEventListener("resize",()=>f(this,wl).call(this))});Y(this,wl,()=>{const t=f(this,Dr)==="h",l=this.parentElement,c=Array.from(l.children).filter(s=>s.tagName.toLowerCase()!=="nx-splitter");if(c.length<2)return;const o=l.getBoundingClientRect(),r=c.reduce((s,e)=>{const i=t?e.getBoundingClientRect().width:e.getBoundingClientRect().height;return s+i},0),n=t?o.width:o.height;c.forEach(s=>{const e=t?s.getBoundingClientRect().width:s.getBoundingClientRect().height,u=n*(e/r)/n;s.style.flex=`${u} ${u} 0`})});this.attachShadow({mode:"open"})}connectedCallback(){f(this,zc).call(this)}}Dr=new WeakMap,qc=new WeakMap,Hc=new WeakMap,zc=new WeakMap,wl=new WeakMap,customElements.get("nx-splitter")||customElements.define("nx-splitter",If);class Nf extends HTMLElement{constructor(){super();Y(this,
|
|
1287
|
+
`,this.shadowRoot.appendChild(o.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".grip-h,.grip-v").forEach(r=>{r.addEventListener("mousedown",n=>f(this,Hc).call(this,n))}),f(this,wl).call(this),window.addEventListener("resize",()=>f(this,wl).call(this))});Y(this,wl,()=>{const t=f(this,Dr)==="h",l=this.parentElement,c=Array.from(l.children).filter(s=>s.tagName.toLowerCase()!=="nx-splitter");if(c.length<2)return;const o=l.getBoundingClientRect(),r=c.reduce((s,e)=>{const i=t?e.getBoundingClientRect().width:e.getBoundingClientRect().height;return s+i},0),n=t?o.width:o.height;c.forEach(s=>{const e=t?s.getBoundingClientRect().width:s.getBoundingClientRect().height,u=n*(e/r)/n;s.style.flex=`${u} ${u} 0`})});this.attachShadow({mode:"open"})}connectedCallback(){f(this,zc).call(this)}}Dr=new WeakMap,qc=new WeakMap,Hc=new WeakMap,zc=new WeakMap,wl=new WeakMap,customElements.get("nx-splitter")||customElements.define("nx-splitter",If);class Nf extends HTMLElement{constructor(){super();Y(this,bu);it(this,"getData_BAK",()=>{const t={};return this.shadowRoot.querySelectorAll("[id]").forEach(l=>{l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.tagName==="SELECT"?t[l.id]=l.value:t[l.id]=l.textContent.trim()}),t});it(this,"getData",()=>{const t={};return this.shadowRoot.querySelectorAll("input, textarea, select, [id], [name]").forEach(l=>{const c=l.id||l.name;if(!c)return;const o=l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.tagName==="SELECT"?l.value:l.textContent.trim();t[c]?(Array.isArray(t[c])||(t[c]=[t[c]]),t[c].push(o)):t[c]=o}),t});Y(this,Uc,()=>{const t=this.innerHTML.trim();this.innerHTML="";const l=document.createElement("template");l.innerHTML=`
|
|
1288
1288
|
<style>
|
|
1289
1289
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxForm.css";
|
|
1290
1290
|
${H.getCustomPath(this,"nxForm.css")}
|
|
1291
1291
|
</style>
|
|
1292
1292
|
|
|
1293
1293
|
${t}
|
|
1294
|
-
`,this.shadowRoot.appendChild(l.content.cloneNode(!0))});this.attachShadow({mode:"open"})}connectedCallback(){f(this,Uc).call(this)}}
|
|
1294
|
+
`,this.shadowRoot.appendChild(l.content.cloneNode(!0))});this.attachShadow({mode:"open"})}connectedCallback(){f(this,Uc).call(this)}}bu=new WeakMap,Uc=new WeakMap,customElements.get("nx-form")||customElements.define("nx-form",Nf);class Of extends HTMLElement{constructor(){super();Y(this,Ir,[]);Y(this,xl,[]);Y(this,_l,()=>{H.delayQuerySelector("nx-side-menu-item.active").then(t=>{f(this,Sl).call(this,t),f(this,kl).call(this)})});Y(this,Sl,t=>{if(tt(this,Ir,[]),t){const l=t.caption;l&&f(this,Ir).unshift({path:t.getAttribute("href"),caption:l});let c=t,o=!1;for(;c;)if(c=c.previousElementSibling,c&&c.tagName==="NX-SIDE-MENU-ITEM"){const r=c.caption;if(c.getAttribute("type")==="group"){r&&!o&&(f(this,Ir).unshift({path:c.getAttribute("href"),caption:r}),o=!0);break}}}this.closest(".list-wrapper")||f(this,Ir).push({path:"",caption:this.getAttribute("caption")||"Current Page"}),f(this,Ir).unshift({path:"/",caption:"Home"}),tt(this,Ir,f(this,Ir).concat(f(this,xl)))});Y(this,kl,()=>{const t=H.querySelector("nx-side-menu-item.active"),l=t?t.caption:"No Caption";this.innerHTML.trim(),this.innerHTML="",this.shadowRoot.innerHTML="";const c=document.createElement("template");c.innerHTML=`
|
|
1295
1295
|
<style>
|
|
1296
1296
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxTitle.css";
|
|
1297
1297
|
${H.getCustomPath(this,"nxTitle.css")}
|
|
@@ -1315,7 +1315,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1315
1315
|
>${o.caption}</a>`:`<span class="breadcrumb-item ${n?"breadcrumb-current":""}">${o.caption}</span>`,e=r<f(this,Ir).length-1?'<span class="breadcrumb-separator"> > </span>':"";return`${s}${e}`}).join("")}
|
|
1316
1316
|
</div>
|
|
1317
1317
|
</div>
|
|
1318
|
-
`,this.shadowRoot.appendChild(c.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".breadcrumb-link").forEach(o=>{o.addEventListener("click",f(this,Vc))})});Y(this,Vc,t=>{console.log(t);const l=t.target.dataset.path;l&&(window.location.href=l)});this.attachShadow({mode:"open"})}connectedCallback(){f(this,_l).call(this)}disconnectedCallback(){document.removeEventListener("DOMContentLoaded",f(this,_l))}setDynamicPath(t){tt(this,xl,t),f(this,Sl).call(this),f(this,kl).call(this)}}Ir=new WeakMap,xl=new WeakMap,_l=new WeakMap,Sl=new WeakMap,kl=new WeakMap,Vc=new WeakMap,customElements.get("nx-title")||customElements.define("nx-title",Of);class
|
|
1318
|
+
`,this.shadowRoot.appendChild(c.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".breadcrumb-link").forEach(o=>{o.addEventListener("click",f(this,Vc))})});Y(this,Vc,t=>{console.log(t);const l=t.target.dataset.path;l&&(window.location.href=l)});this.attachShadow({mode:"open"})}connectedCallback(){f(this,_l).call(this)}disconnectedCallback(){document.removeEventListener("DOMContentLoaded",f(this,_l))}setDynamicPath(t){tt(this,xl,t),f(this,Sl).call(this),f(this,kl).call(this)}}Ir=new WeakMap,xl=new WeakMap,_l=new WeakMap,Sl=new WeakMap,kl=new WeakMap,Vc=new WeakMap,customElements.get("nx-title")||customElements.define("nx-title",Of);class au extends HTMLElement{constructor(){super();Y(this,Nr);it(this,"originContents");Y(this,Cl,!1);Y(this,ki);Y(this,El,!1);it(this,"getData",()=>{const t={};return Ke(this,Nr,Ll).call(this).forEach(l=>{const c=l.name;if(!c)return;let o;if(l.tagName==="INPUT"&&l.type==="checkbox"){let r=l.getAttribute("true-value")||"Y",n=l.getAttribute("false-value")||"N";o=l.checked?r:n}else l.tagName==="INPUT"&&l.type,o=l.value;t[c]?(Array.isArray(t[c])||(t[c]=[t[c]]),t[c].push(o)):t[c]=o}),t});it(this,"clearData",(t={})=>{Ke(this,Nr,xu).call(this),Ke(this,Nr,Ll).call(this).forEach(l=>{const c=l.name;if(!c)return;const o=t&&t[c]!==void 0?t[c]:"";Ke(this,Nr,wu).call(this,l,o)}),this.changed=!1});it(this,"setData",t=>{if(!t||typeof t!="object")return;Ke(this,Nr,xu).call(this);let l=!1;Ke(this,Nr,Ll).call(this).forEach(c=>{const o=c.name;!o||!t.hasOwnProperty(o)||Ke(this,Nr,wu).call(this,c,t[o])&&(l=!0)}),l&&(this.changed=!0)});it(this,"initData",t=>{this.clearData(t),this.changed=!1});Y(this,Al,t=>{this.changed=!0});Y(this,Wc,()=>{for(const t of this.attributes)t.name.startsWith("css-")&&this.style.setProperty(t.name.substring(4),t.value);this.originContents=this.innerHTML.trim(),this.innerHTML="",this.shadowRoot&&this.tagName.toLowerCase()==="nx-div"&&(this.shadowRoot.innerHTML=this.originContents)})}connectedCallback(){return f(this,Cl)?!1:(this.getAttribute("use-shadow")!=="false"&&!this.shadowRoot?(this.attachShadow({mode:"open"}),tt(this,ki,this.shadowRoot)):tt(this,ki,this),f(this,Wc).call(this),tt(this,Cl,!0),!0)}get changed(){return f(this,El)}set changed(t){const l=!!t;tt(this,El,l);const c=this.closest(".detail-wrapper");if(c){const o=c.querySelector("nx-title2");o&&(o.changed=l)}}get root(){return f(this,ki)||this}}Cl=new WeakMap,ki=new WeakMap,El=new WeakMap,Nr=new WeakSet,Ll=function(){return H.querySelectorAll("input[name], textarea[name], select[name], nx-editor[name]",f(this,ki))},wu=function(t,l){const c=t.tagName.toUpperCase(),o=t.type;let r=!1;if(["INPUT","TEXTAREA","SELECT","NX-EDITOR"].includes(c))if(o==="checkbox"){const n=t.getAttribute("true-value")||"Y",s=String(n)===String(l);t.checked!==s&&(r=!0),t.checked=s}else if(o==="radio"){const n=String(t.value)===String(l);t.checked!==n&&(r=!0),t.checked=n}else t.value!==l&&(r=!0),t.value=l;else t.textContent!==l&&(r=!0),t.textContent=l;return r},xu=function(){Ke(this,Nr,Ll).call(this).forEach(t=>{t.removeEventListener("input",f(this,Al)),t.addEventListener("input",f(this,Al))})},Al=new WeakMap,Wc=new WeakMap;class jf extends au{constructor(){super();Y(this,Tl,!1);Y(this,Xc,()=>{const t=this.getAttribute("caption")||"",l=document.createElement("template");l.innerHTML=`
|
|
1319
1319
|
<style>
|
|
1320
1320
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxTitle2.css";
|
|
1321
1321
|
${H.getCustomPath(this,"nxTitle2.css")}
|
|
@@ -1326,7 +1326,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1326
1326
|
</div>
|
|
1327
1327
|
|
|
1328
1328
|
${this.originContents}
|
|
1329
|
-
`,(this.shadowRoot||this).appendChild(l.content.cloneNode(!0))})}connectedCallback(){super.connectedCallback()&&f(this,Xc).call(this)}get changed(){return f(this,Tl)}set changed(t){tt(this,Tl,t),t?this.classList.add("changed"):this.classList.remove("changed")}}Tl=new WeakMap,Xc=new WeakMap,customElements.get("nx-title2")||customElements.define("nx-title2",jf);class $f extends HTMLElement{constructor(){super();Y(this,Rl);Y(this,qn)}connectedCallback(){tt(this,qn,Array.from(this.children).filter(t=>t.tagName.toLowerCase()!=="nx-splitter")),Ke(this,Rl,
|
|
1329
|
+
`,(this.shadowRoot||this).appendChild(l.content.cloneNode(!0))})}connectedCallback(){super.connectedCallback()&&f(this,Xc).call(this)}get changed(){return f(this,Tl)}set changed(t){tt(this,Tl,t),t?this.classList.add("changed"):this.classList.remove("changed")}}Tl=new WeakMap,Xc=new WeakMap,customElements.get("nx-title2")||customElements.define("nx-title2",jf);class $f extends HTMLElement{constructor(){super();Y(this,Rl);Y(this,qn)}connectedCallback(){tt(this,qn,Array.from(this.children).filter(t=>t.tagName.toLowerCase()!=="nx-splitter")),Ke(this,Rl,_u).call(this)}attributeChangedCallback(t,l,c){f(this,qn)&&l!==c&&Ke(this,Rl,_u).call(this)}static get observedAttributes(){return["columns"]}}qn=new WeakMap,Rl=new WeakSet,_u=function(){const t=f(this,qn);if(!t||t.length===0)return;for(;this.firstChild;)this.removeChild(this.firstChild);const l=(this.getAttribute("columns")||"1").split(",").map(Number),c=l.length;let o=0;for(let r=0;r<c;r++){const n=l[r],s=document.createElement("div");s.classList.add("row");for(let e=0;e<n;e++){if(t[o]){const i=t[o];s.appendChild(i),o++}if(e<n-1){const i=document.createElement("nx-splitter");s.appendChild(i)}}if(this.appendChild(s),r<c-1){const e=document.createElement("nx-splitter");e.classList.add("v"),this.appendChild(e)}}},customElements.get("nx-layout")||customElements.define("nx-layout",$f);class Lf extends HTMLElement{constructor(){super();Y(this,Gs);Y(this,Hn);Y(this,Yc,()=>{const t=c=>{const o=window.getComputedStyle(c),r=c.cloneNode(!0);r.style.fontSize=o.fontSize,r.style.fontFamily=o.fontFamily,r.style.fontWeight=o.fontWeight,r.style.position="absolute",r.style.left="-9999px",r.style.visibility="hidden",document.body.appendChild(r);const n=r.getBoundingClientRect().width;return document.body.removeChild(r),n+4},l=[];this.querySelectorAll(".row").forEach(c=>{c.querySelectorAll(".label").forEach((r,n)=>{l[n]||(l[n]=[]),l[n].push(r)})}),l.forEach(c=>{if(c&&c.length>0){const o=c.map(n=>t(n)),r=Math.max(...o);c.forEach(n=>{n.style.width=`${r}px`})}})})}static get observedAttributes(){return["columns","rows-height"]}connectedCallback(){tt(this,Hn,Array.from(this.children).filter(t=>t.tagName.toLowerCase()!=="nx-splitter")),Ke(this,Gs,ku).call(this)}attributeChangedCallback(t,l,c){l!==c&&(t==="rows-height"&&Ke(this,Gs,Su).call(this,c),f(this,Hn)&&Ke(this,Gs,ku).call(this))}}Hn=new WeakMap,Gs=new WeakSet,Su=function(t){if(t){const l=t.replace(/,/g," ").replace(/\*/g,"1fr");this.style.setProperty("--rows-template",l)}},ku=function(){Ke(this,Gs,Su).call(this,this.getAttribute("rows-height"));const t=f(this,Hn);if(!t||t.length===0)return;for(;this.firstChild;)this.removeChild(this.firstChild);const l=(this.getAttribute("columns")||"1").split(",").map(Number),c=l.length;let o=0;for(let r=0;r<c;r++){const n=l[r],s=document.createElement("div");s.classList.add("row");for(let e=0;e<n;e++)if(t[o]){const i=t[o];s.appendChild(i),o++}this.appendChild(s)}setTimeout(()=>{f(this,Yc).call(this)},300)},Yc=new WeakMap,customElements.get("nx-layout2")||customElements.define("nx-layout2",Lf);class Pf extends au{constructor(){super();Y(this,Gc,()=>{var r;const t=this.getAttribute("caption"),l=this.getAttribute("columns")||"",c=((r=this.getAttribute("rows-height"))==null?void 0:r.replace(/,/g," "))||"",o=document.createElement("template");o.innerHTML=`
|
|
1330
1330
|
<style>
|
|
1331
1331
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxPanel.css";
|
|
1332
1332
|
${H.getCustomPath(this,"nxPanel.css")}
|
|
@@ -1340,7 +1340,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1340
1340
|
${this.originContents}
|
|
1341
1341
|
</nx-layout2>
|
|
1342
1342
|
</div>
|
|
1343
|
-
`,(this.shadowRoot||this).appendChild(o.content.cloneNode(!0))})}connectedCallback(){super.connectedCallback()&&f(this,Gc).call(this)}}Gc=new WeakMap,customElements.get("nx-panel")||customElements.define("nx-panel",Pf);class Df extends
|
|
1343
|
+
`,(this.shadowRoot||this).appendChild(o.content.cloneNode(!0))})}connectedCallback(){super.connectedCallback()&&f(this,Gc).call(this)}}Gc=new WeakMap,customElements.get("nx-panel")||customElements.define("nx-panel",Pf);class Df extends au{constructor(){super();Y(this,Kc,()=>{const t=document.createElement("template");t.innerHTML=`
|
|
1344
1344
|
<style>
|
|
1345
1345
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxButtons.css";
|
|
1346
1346
|
${H.getCustomPath(this,"nxButtons.css")}
|